diff --git a/.github/workflows/submit.yml b/.github/workflows/submit.yml new file mode 100644 index 00000000000..f4d630a8f59 --- /dev/null +++ b/.github/workflows/submit.yml @@ -0,0 +1,949 @@ +name: Pre-submit tests + +on: + push: + branches-ignore: + - master + workflow_dispatch: + inputs: + platforms: + description: "Platform(s) to execute on" + required: true + default: "Linux x64, Windows x64, macOS x64" + +jobs: + prerequisites: + name: Prerequisites + runs-on: "ubuntu-latest" + outputs: + should_run: ${{ steps.check_submit.outputs.should_run }} + bundle_id: ${{ steps.check_bundle_id.outputs.bundle_id }} + platform_linux_x64: ${{ steps.check_platforms.outputs.platform_linux_x64 }} + platform_windows_x64: ${{ steps.check_platforms.outputs.platform_windows_x64 }} + platform_macos_x64: ${{ steps.check_platforms.outputs.platform_macos_x64 }} + dependencies: ${{ steps.check_deps.outputs.dependencies }} + + steps: + - name: Check if submit tests should actually run depending on secrets and manual triggering + id: check_submit + run: echo "::set-output name=should_run::${{ github.event.inputs.platforms != '' || (!secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/')) }}" + + - name: Check which platforms should be included + id: check_platforms + run: | + echo "::set-output name=platform_linux_x64::${{ contains(github.event.inputs.platforms, 'linux x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux x64'))) }}" + echo "::set-output name=platform_windows_x64::${{ contains(github.event.inputs.platforms, 'windows x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'windows x64'))) }}" + echo "::set-output name=platform_macos_x64::${{ contains(github.event.inputs.platforms, 'macos x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'macos x64'))) }}" + if: steps.check_submit.outputs.should_run != 'false' + + - name: Determine unique bundle identifier + run: echo "::set-output name=bundle_id::${GITHUB_ACTOR}_${GITHUB_SHA:0:8}" + if: steps.check_submit.outputs.should_run != 'false' + + - name: Checkout the source + uses: actions/checkout@v2 + with: + path: jdk + if: steps.check_submit.outputs.should_run != 'false' + + - name: Determine versions and locations to be used for dependencies + id: check_deps + run: "echo ::set-output name=dependencies::`cat make/autoconf/version-numbers make/conf/test-dependencies | sed -e '1i {' -e 's/#.*//g' -e 's/\"//g' -e 's/\\(.*\\)=\\(.*\\)/\"\\1\": \"\\2\",/g' -e '$s/,\\s\\{0,\\}$/\\}/'`" + working-directory: jdk + if: steps.check_submit.outputs.should_run != 'false' + + - name: Print extracted dependencies to the log + run: "echo '${{ steps.check_deps.outputs.dependencies }}'" + if: steps.check_submit.outputs.should_run != 'false' + + - name: Determine the jtreg ref to checkout + run: "echo JTREG_REF=jtreg${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_VERSION }}-${{ fromJson(steps.check_deps.outputs.dependencies).JTREG_BUILD }} >> $GITHUB_ENV" + if: steps.check_submit.outputs.should_run != 'false' + + - name: Check if a jtreg image is present in the cache + id: jtreg + uses: actions/cache@v2 + with: + path: ~/jtreg/ + key: jtreg-${{ env.JTREG_REF }}-v1 + if: steps.check_submit.outputs.should_run != 'false' + + - name: Checkout the jtreg source + uses: actions/checkout@v2 + with: + repository: "openjdk/jtreg" + ref: ${{ env.JTREG_REF }} + path: jtreg + if: steps.check_submit.outputs.should_run != 'false' && steps.jtreg.outputs.cache-hit != 'true' + + - name: Build jtreg + run: sh make/build-all.sh ${JAVA_HOME} + working-directory: jtreg + if: steps.check_submit.outputs.should_run != 'false' && steps.jtreg.outputs.cache-hit != 'true' + + - name: Move jtreg image to destination folder + run: mv build/images/jtreg ~/ + working-directory: jtreg + if: steps.check_submit.outputs.should_run != 'false' && steps.jtreg.outputs.cache-hit != 'true' + + - name: Store jtreg for use by later steps + uses: actions/upload-artifact@v2 + with: + name: transient_jtreg_${{ steps.check_bundle_id.outputs.bundle_id }} + path: ~/jtreg/ + if: steps.check_submit.outputs.should_run != 'false' + + linux_x64_build: + name: Linux x64 + runs-on: "ubuntu-latest" + needs: prerequisites + if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_x64 != 'false' + + strategy: + fail-fast: false + matrix: + flavor: + - build release + - build debug + - build hotspot no-pch + include: + - flavor: build debug + flags: --enable-debug + artifact: -debug + - flavor: build hotspot no-pch + flags: --disable-precompiled-headers + build-target: hotspot + + env: + JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" + BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}" + BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}" + BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}" + + steps: + - name: Checkout the source + uses: actions/checkout@v2 + with: + path: jdk + + - name: Restore boot JDK from cache + id: bootjdk + uses: actions/cache@v2 + with: + path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }} + key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1 + + - name: Download boot JDK + run: | + mkdir -p "${HOME}/bootjdk/${BOOT_JDK_VERSION}" + wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}" + echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | sha256sum -c >/dev/null - + tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}" + mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/" + if: steps.bootjdk.outputs.cache-hit != 'true' + + - name: Restore jtreg artifact + id: jtreg_restore + uses: actions/download-artifact@v2 + with: + name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jtreg/ + continue-on-error: true + + - name: Restore jtreg artifact (retry) + uses: actions/download-artifact@v2 + with: + name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jtreg/ + if: steps.jtreg_restore.outcome == 'failure' + + - name: Checkout gtest sources + uses: actions/checkout@v2 + with: + repository: "google/googletest" + ref: "release-${{ fromJson(needs.prerequisites.outputs.dependencies).GTEST_VERSION }}" + path: gtest + + - name: Install dependencies + run: sudo apt-get install libxrandr-dev libxtst-dev libcups2-dev libasound2-dev + + - name: Configure + run: > + bash configure + --with-conf-name=linux-x64 + ${{ matrix.flags }} + --with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA} + --with-version-build=0 + --with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION} + --with-jtreg=${HOME}/jtreg + --with-gtest=${GITHUB_WORKSPACE}/gtest + --with-default-make-target="product-bundles test-bundles" + --with-zlib=system + --enable-jtreg-failure-handler + working-directory: jdk + + - name: Build + run: make CONF_NAME=linux-x64 ${{ matrix.build-target }} + working-directory: jdk + + - name: Persist test bundles + uses: actions/upload-artifact@v2 + with: + name: transient_jdk-linux-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} + path: | + jdk/build/linux-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz + jdk/build/linux-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}.tar.gz + if: matrix.build-target == false + + linux_x64_test: + name: Linux x64 + runs-on: "ubuntu-latest" + needs: + - prerequisites + - linux_x64_build + + strategy: + fail-fast: false + matrix: + test: + - jdk/tier1 part 1 + - jdk/tier1 part 2 + - jdk/tier1 part 3 + - langtools/tier1 + - hs/tier1 common + - hs/tier1 compiler + - hs/tier1 gc + - hs/tier1 runtime + - hs/tier1 serviceability + include: + - test: jdk/tier1 part 1 + suites: test/jdk/:tier1_part1 + - test: jdk/tier1 part 2 + suites: test/jdk/:tier1_part2 + - test: jdk/tier1 part 3 + suites: test/jdk/:tier1_part3 + - test: langtools/tier1 + suites: test/langtools/:tier1 + - test: hs/tier1 common + suites: test/hotspot/jtreg/:tier1_common + artifact: -debug + - test: hs/tier1 compiler + suites: test/hotspot/jtreg/:tier1_compiler + artifact: -debug + - test: hs/tier1 gc + suites: test/hotspot/jtreg/:tier1_gc + artifact: -debug + - test: hs/tier1 runtime + suites: test/hotspot/jtreg/:tier1_runtime + artifact: -debug + - test: hs/tier1 serviceability + suites: test/hotspot/jtreg/:tier1_serviceability + artifact: -debug + + env: + JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" + BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}" + BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}" + BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}" + + steps: + - name: Checkout the source + uses: actions/checkout@v2 + + - name: Restore boot JDK from cache + id: bootjdk + uses: actions/cache@v2 + with: + path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }} + key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1 + + - name: Download boot JDK + run: | + mkdir -p "${HOME}/bootjdk/${BOOT_JDK_VERSION}" + wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}" + echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | sha256sum -c >/dev/null - + tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}" + mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/" + if: steps.bootjdk.outputs.cache-hit != 'true' + + - name: Restore jtreg artifact + id: jtreg_restore + uses: actions/download-artifact@v2 + with: + name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jtreg/ + continue-on-error: true + + - name: Restore jtreg artifact (retry) + uses: actions/download-artifact@v2 + with: + name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jtreg/ + if: steps.jtreg_restore.outcome == 'failure' + + - name: Restore build artifacts + id: build_restore + uses: actions/download-artifact@v2 + with: + name: transient_jdk-linux-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jdk-linux-x64${{ matrix.artifact }} + continue-on-error: true + + - name: Restore build artifacts (retry) + uses: actions/download-artifact@v2 + with: + name: transient_jdk-linux-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jdk-linux-x64${{ matrix.artifact }} + if: steps.build_restore.outcome == 'failure' + + - name: Unpack jdk + run: | + mkdir -p "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}" + tar -xf "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}" + + - name: Unpack tests + run: | + mkdir -p "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}" + tar -xf "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}" + + - name: Find root of jdk image dir + run: | + imageroot=`find ${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }} -name release -type f` + echo "imageroot=`dirname ${imageroot}`" >> $GITHUB_ENV + + - name: Run tests + run: > + JDK_IMAGE_DIR=${{ env.imageroot }} + TEST_IMAGE_DIR=${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }} + BOOT_JDK=${HOME}/bootjdk/${BOOT_JDK_VERSION} + JT_HOME=${HOME}/jtreg + make test-prebuilt + CONF_NAME=run-test-prebuilt + LOG_CMDLINES=true + JTREG_VERBOSE=fail,error,time + TEST="${{ matrix.suites }}" + TEST_OPTS_JAVA_OPTIONS= + JTREG_KEYWORDS="!headful" + JTREG="JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash" + + - name: Check that all tests executed successfully + if: always() + run: > + if ! grep --include=test-summary.txt -lqr build/*/test-results -e "TEST SUCCESS" ; then + cat build/*/test-results/*/text/newfailures.txt ; + exit 1 ; + fi + + - name: Create suitable test log artifact name + if: always() + run: echo "logsuffix=`echo ${{ matrix.test }} | sed -e 's!/!_!'g -e 's! !_!'g`" >> $GITHUB_ENV + + - name: Persist test logs + if: always() + uses: actions/upload-artifact@v2 + with: + name: linux-x64${{ matrix.artifact }}_testlogs_${{ env.logsuffix }} + path: build/*/test-results + continue-on-error: true + + windows_x64_build: + name: Windows x64 + runs-on: "windows-latest" + needs: prerequisites + if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_windows_x64 != 'false' + + strategy: + fail-fast: false + matrix: + flavor: + - build release + - build debug + include: + - flavor: build debug + flags: --enable-debug + artifact: -debug + + env: + JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" + BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_FILENAME }}" + BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_URL }}" + BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_SHA256 }}" + + steps: + - name: Restore cygwin packages from cache + id: cygwin + uses: actions/cache@v2 + with: + path: ~/cygwin/packages + key: cygwin-packages-${{ runner.os }}-v1 + + - name: Install cygwin + run: | + New-Item -Force -ItemType directory -Path "$HOME\cygwin" + & curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe" + Start-Process -FilePath "$HOME\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages autoconf,make,zip,unzip --root $HOME\cygwin\cygwin64 --local-package-dir $HOME\cygwin\packages --site http://mirrors.kernel.org/sourceware/cygwin --no-desktop --no-shortcuts --no-startmenu --no-admin" -Wait -NoNewWindow + + - name: Checkout the source + uses: actions/checkout@v2 + with: + path: jdk + + - name: Restore boot JDK from cache + id: bootjdk + uses: actions/cache@v2 + with: + path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }} + key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1 + + - name: Download boot JDK + run: | + mkdir -p "$HOME\bootjdk\$env:BOOT_JDK_VERSION" + & curl -L "$env:BOOT_JDK_URL" -o "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" + $FileHash = Get-FileHash -Algorithm SHA256 "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" + $FileHash.Hash -eq $env:BOOT_JDK_SHA256 + & tar -xf "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -C "$HOME/bootjdk/$env:BOOT_JDK_VERSION" + Get-ChildItem "$HOME\bootjdk\$env:BOOT_JDK_VERSION\*\*" | Move-Item -Destination "$HOME\bootjdk\$env:BOOT_JDK_VERSION" + if: steps.bootjdk.outputs.cache-hit != 'true' + + - name: Checkout gtest sources + uses: actions/checkout@v2 + with: + repository: "google/googletest" + ref: "release-${{ fromJson(needs.prerequisites.outputs.dependencies).GTEST_VERSION }}" + path: gtest + + - name: Restore jtreg artifact + id: jtreg_restore + uses: actions/download-artifact@v2 + with: + name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jtreg/ + continue-on-error: true + + - name: Restore jtreg artifact (retry) + uses: actions/download-artifact@v2 + with: + name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jtreg/ + if: steps.jtreg_restore.outcome == 'failure' + + - name: Configure + run: > + $env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ; + $env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ; + & bash configure + --with-conf-name=windows-x64 + ${{ matrix.flags }} + --with-version-opt="$env:GITHUB_ACTOR-$env:GITHUB_SHA" + --with-version-build=0 + --with-boot-jdk="$HOME/bootjdk/$env:BOOT_JDK_VERSION" + --with-jtreg="$HOME/jtreg" + --with-gtest="$env:GITHUB_WORKSPACE/gtest" + --with-default-make-target="product-bundles test-bundles" + --enable-jtreg-failure-handler + working-directory: jdk + + - name: Build + run: | + $env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ; + $env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ; + & make CONF_NAME=windows-x64 ${{ matrix.build-target }} + working-directory: jdk + + - name: Persist test bundles + uses: actions/upload-artifact@v2 + with: + name: transient_jdk-windows-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} + path: | + jdk/build/windows-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}.zip + jdk/build/windows-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}.tar.gz + jdk/build/windows-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}-symbols.tar.gz + if: matrix.build-target == false + + windows_x64_test: + name: Windows x64 + runs-on: "windows-latest" + needs: + - prerequisites + - windows_x64_build + + strategy: + fail-fast: false + matrix: + test: + - jdk/tier1 part 1 + - jdk/tier1 part 2 + - jdk/tier1 part 3 + - langtools/tier1 + - hs/tier1 common + - hs/tier1 compiler + - hs/tier1 gc + - hs/tier1 runtime + - hs/tier1 serviceability + include: + - test: jdk/tier1 part 1 + suites: test/jdk/:tier1_part1 + - test: jdk/tier1 part 2 + suites: test/jdk/:tier1_part2 + - test: jdk/tier1 part 3 + suites: test/jdk/:tier1_part3 + - test: langtools/tier1 + suites: test/langtools/:tier1 + - test: hs/tier1 common + suites: test/hotspot/jtreg/:tier1_common + artifact: -debug + - test: hs/tier1 compiler + suites: test/hotspot/jtreg/:tier1_compiler + artifact: -debug + - test: hs/tier1 gc + suites: test/hotspot/jtreg/:tier1_gc + artifact: -debug + - test: hs/tier1 runtime + suites: test/hotspot/jtreg/:tier1_runtime + artifact: -debug + - test: hs/tier1 serviceability + suites: test/hotspot/jtreg/:tier1_serviceability + artifact: -debug + + env: + JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" + BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_FILENAME }}" + BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_URL }}" + BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_SHA256 }}" + + steps: + - name: Checkout the source + uses: actions/checkout@v2 + + - name: Restore boot JDK from cache + id: bootjdk + uses: actions/cache@v2 + with: + path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }} + key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1 + + - name: Download boot JDK + run: | + mkdir -p "$HOME\bootjdk\$env:BOOT_JDK_VERSION" + & curl -L "$env:BOOT_JDK_URL" -o "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" + $FileHash = Get-FileHash -Algorithm SHA256 "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" + $FileHash.Hash -eq $env:BOOT_JDK_SHA256 + & tar -xf "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -C "$HOME/bootjdk/$env:BOOT_JDK_VERSION" + Get-ChildItem "$HOME\bootjdk\$env:BOOT_JDK_VERSION\*\*" | Move-Item -Destination "$HOME\bootjdk\$env:BOOT_JDK_VERSION" + if: steps.bootjdk.outputs.cache-hit != 'true' + + - name: Restore cygwin packages from cache + id: cygwin + uses: actions/cache@v2 + with: + path: ~/cygwin/packages + key: cygwin-packages-${{ runner.os }}-v1 + + - name: Install cygwin + run: | + New-Item -Force -ItemType directory -Path "$HOME\cygwin" + & curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe" + Start-Process -FilePath "$HOME\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages autoconf,make,zip,unzip --root $HOME\cygwin\cygwin64 --local-package-dir $HOME\cygwin\packages --site http://mirrors.kernel.org/sourceware/cygwin --no-desktop --no-shortcuts --no-startmenu --no-admin" -Wait -NoNewWindow + + - name: Restore jtreg artifact + id: jtreg_restore + uses: actions/download-artifact@v2 + with: + name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jtreg/ + continue-on-error: true + + - name: Restore jtreg artifact (retry) + uses: actions/download-artifact@v2 + with: + name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jtreg/ + if: steps.jtreg_restore.outcome == 'failure' + + - name: Restore build artifacts + id: build_restore + uses: actions/download-artifact@v2 + with: + name: transient_jdk-windows-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jdk-windows-x64${{ matrix.artifact }} + continue-on-error: true + + - name: Restore build artifacts (retry) + uses: actions/download-artifact@v2 + with: + name: transient_jdk-windows-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jdk-windows-x64${{ matrix.artifact }} + if: steps.build_restore.outcome == 'failure' + + - name: Unpack jdk + run: | + mkdir -p "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}" + tar -xf "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}.zip" -C "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}" + + - name: Unpack symbols + run: | + mkdir -p "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}-symbols" + tar -xf "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}-symbols.tar.gz" -C "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}-symbols" + + - name: Unpack tests + run: | + mkdir -p "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}" + tar -xf "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}" + + - name: Find root of jdk image dir + run: echo ("imageroot=" + (Get-ChildItem -Path $HOME/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }} -Filter release -Recurse -ErrorAction SilentlyContinue -Force).DirectoryName) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 + + - name: Run tests + run: > + $env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ; + $env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ; + $env:JDK_IMAGE_DIR = cygpath "${{ env.imageroot }}" ; + $env:SYMBOLS_IMAGE_DIR = cygpath "${{ env.imageroot }}" ; + $env:TEST_IMAGE_DIR = cygpath "$HOME/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}" ; + $env:BOOT_JDK = cygpath "$HOME/bootjdk/$env:BOOT_JDK_VERSION" ; + $env:JT_HOME = cygpath "$HOME/jtreg" ; + & make test-prebuilt + CONF_NAME=run-test-prebuilt + LOG_CMDLINES=true + JTREG_VERBOSE=fail,error,time + TEST=${{ matrix.suites }} + TEST_OPTS_JAVA_OPTIONS= + JTREG_KEYWORDS="!headful" + JTREG="JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash" + + - name: Check that all tests executed successfully + if: always() + run: > + if ((Get-ChildItem -Path build\*\test-results\test-summary.txt -Recurse | Select-String -Pattern "TEST SUCCESS" ).Count -eq 0) { + Get-Content -Path build\*\test-results\*\*\newfailures.txt ; + exit 1 + } + + - name: Create suitable test log artifact name + if: always() + run: echo ("logsuffix=" + ("${{ matrix.test }}" -replace "/", "_" -replace " ", "_")) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 + + - name: Persist test logs + if: always() + uses: actions/upload-artifact@v2 + with: + name: windows-x64${{ matrix.artifact }}_testlogs_${{ env.logsuffix }} + path: build/*/test-results + continue-on-error: true + + macos_x64_build: + name: macOS x64 + runs-on: "macos-latest" + needs: prerequisites + if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_macos_x64 != 'false' + + strategy: + fail-fast: false + matrix: + flavor: + - build release + - build debug + include: + - flavor: build release + - flavor: build debug + flags: --enable-debug + artifact: -debug + + env: + JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" + BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_FILENAME }}" + BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_URL }}" + BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_SHA256 }}" + + steps: + - name: Checkout the source + uses: actions/checkout@v2 + with: + path: jdk + + - name: Restore boot JDK from cache + id: bootjdk + uses: actions/cache@v2 + with: + path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }} + key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1 + + - name: Download boot JDK + run: | + mkdir -p ${HOME}/bootjdk/${BOOT_JDK_VERSION} || true + wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}" + echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | shasum -a 256 -c >/dev/null - + tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}" + mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/" + if: steps.bootjdk.outputs.cache-hit != 'true' + + - name: Restore jtreg artifact + id: jtreg_restore + uses: actions/download-artifact@v2 + with: + name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jtreg/ + continue-on-error: true + + - name: Restore jtreg artifact (retry) + uses: actions/download-artifact@v2 + with: + name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jtreg/ + if: steps.jtreg_restore.outcome == 'failure' + + - name: Checkout gtest sources + uses: actions/checkout@v2 + with: + repository: "google/googletest" + ref: "release-${{ fromJson(needs.prerequisites.outputs.dependencies).GTEST_VERSION }}" + path: gtest + + - name: Install dependencies + run: brew install make + + - name: Configure + run: > + bash configure + --with-conf-name=macos-x64 + ${{ matrix.flags }} + --with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA} + --with-version-build=0 + --with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}/Contents/Home + --with-jtreg=${HOME}/jtreg + --with-gtest=${GITHUB_WORKSPACE}/gtest + --with-default-make-target="product-bundles test-bundles" + --with-zlib=system + --enable-jtreg-failure-handler + working-directory: jdk + + - name: Build + run: make CONF_NAME=macos-x64 ${{ matrix.build-target }} + working-directory: jdk + + - name: Persist test bundles + uses: actions/upload-artifact@v2 + with: + name: transient_jdk-macos-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} + path: | + jdk/build/macos-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }}.tar.gz + jdk/build/macos-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin-tests${{ matrix.artifact }}.tar.gz + if: matrix.build-target == false + + macos_x64_test: + name: macOS x64 + runs-on: "macos-latest" + needs: + - prerequisites + - macos_x64_build + + strategy: + fail-fast: false + matrix: + test: + - jdk/tier1 part 1 + - jdk/tier1 part 2 + - jdk/tier1 part 3 + - langtools/tier1 + - hs/tier1 common + - hs/tier1 compiler + - hs/tier1 gc + - hs/tier1 runtime + - hs/tier1 serviceability + include: + - test: jdk/tier1 part 1 + suites: test/jdk/:tier1_part1 + - test: jdk/tier1 part 2 + suites: test/jdk/:tier1_part2 + - test: jdk/tier1 part 3 + suites: test/jdk/:tier1_part3 + - test: langtools/tier1 + suites: test/langtools/:tier1 + - test: hs/tier1 common + suites: test/hotspot/jtreg/:tier1_common + artifact: -debug + - test: hs/tier1 compiler + suites: test/hotspot/jtreg/:tier1_compiler + artifact: -debug + - test: hs/tier1 gc + suites: test/hotspot/jtreg/:tier1_gc + artifact: -debug + - test: hs/tier1 runtime + suites: test/hotspot/jtreg/:tier1_runtime + artifact: -debug + - test: hs/tier1 serviceability + suites: test/hotspot/jtreg/:tier1_serviceability + artifact: -debug + + env: + JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}" + BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}" + BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_FILENAME }}" + BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_URL }}" + BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).MACOS_X64_BOOT_JDK_SHA256 }}" + + steps: + - name: Checkout the source + uses: actions/checkout@v2 + + - name: Restore boot JDK from cache + id: bootjdk + uses: actions/cache@v2 + with: + path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }} + key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1 + + - name: Download boot JDK + run: | + mkdir -p ${HOME}/bootjdk/${BOOT_JDK_VERSION} || true + wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}" + echo "${BOOT_JDK_SHA256} ${HOME}/bootjdk/${BOOT_JDK_FILENAME}" | shasum -a 256 -c >/dev/null - + tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk/${BOOT_JDK_VERSION}" + mv "${HOME}/bootjdk/${BOOT_JDK_VERSION}/"*/* "${HOME}/bootjdk/${BOOT_JDK_VERSION}/" + if: steps.bootjdk.outputs.cache-hit != 'true' + + - name: Restore jtreg artifact + id: jtreg_restore + uses: actions/download-artifact@v2 + with: + name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jtreg/ + continue-on-error: true + + - name: Restore jtreg artifact (retry) + uses: actions/download-artifact@v2 + with: + name: transient_jtreg_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jtreg/ + if: steps.jtreg_restore.outcome == 'failure' + + - name: Restore build artifacts + id: build_restore + uses: actions/download-artifact@v2 + with: + name: transient_jdk-macos-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jdk-macos-x64${{ matrix.artifact }} + continue-on-error: true + + - name: Restore build artifacts (retry) + uses: actions/download-artifact@v2 + with: + name: transient_jdk-macos-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }} + path: ~/jdk-macos-x64${{ matrix.artifact }} + if: steps.build_restore.outcome == 'failure' + + - name: Unpack jdk + run: | + mkdir -p "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }}" + tar -xf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }}" + + - name: Unpack tests + run: | + mkdir -p "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin-tests${{ matrix.artifact }}" + tar -xf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin-tests${{ matrix.artifact }}" + + - name: Install dependencies + run: brew install make + + - name: Find root of jdk image dir + run: | + imageroot=`find ${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }} -name release -type f` + echo "imageroot=`dirname ${imageroot}`" >> $GITHUB_ENV + + - name: Run tests + run: > + JDK_IMAGE_DIR=${{ env.imageroot }} + TEST_IMAGE_DIR=${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin-tests${{ matrix.artifact }} + BOOT_JDK=${HOME}/bootjdk/${BOOT_JDK_VERSION}/Contents/Home + JT_HOME=${HOME}/jtreg + gmake test-prebuilt + CONF_NAME=run-test-prebuilt + LOG_CMDLINES=true + JTREG_VERBOSE=fail,error,time + TEST=${{ matrix.suites }} + TEST_OPTS_JAVA_OPTIONS= + JTREG_KEYWORDS="!headful" + JTREG="JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash" + + - name: Check that all tests executed successfully + if: always() + run: > + if ! grep --include=test-summary.txt -lqr build/*/test-results -e "TEST SUCCESS" ; then + cat build/*/test-results/*/text/newfailures.txt ; + exit 1 ; + fi + + - name: Create suitable test log artifact name + if: always() + run: echo "logsuffix=`echo ${{ matrix.test }} | sed -e 's!/!_!'g -e 's! !_!'g`" >> $GITHUB_ENV + + - name: Persist test logs + if: always() + uses: actions/upload-artifact@v2 + with: + name: macos-x64${{ matrix.artifact }}_testlogs_${{ env.logsuffix }} + path: build/*/test-results + continue-on-error: true + + artifacts: + name: Post-process artifacts + runs-on: "ubuntu-latest" + if: always() + continue-on-error: true + needs: + - linux_x64_test + - windows_x64_test + - macos_x64_test + + steps: + - name: Determine current artifacts endpoint + id: actions_runtime + uses: actions/github-script@v3 + with: + script: "return { url: process.env['ACTIONS_RUNTIME_URL'], token: process.env['ACTIONS_RUNTIME_TOKEN'] }" + + - name: Display current artifacts + run: > + curl -s -H 'Accept: application/json;api-version=6.0-preview' + -H 'Authorization: Bearer ${{ fromJson(steps.actions_runtime.outputs.result).token }}' + '${{ fromJson(steps.actions_runtime.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview' + + - name: Delete transient artifacts + run: > + for url in ` + curl -s -H 'Accept: application/json;api-version=6.0-preview' + -H 'Authorization: Bearer ${{ fromJson(steps.actions_runtime.outputs.result).token }}' + '${{ fromJson(steps.actions_runtime.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview' | + jq -r -c '.value | map(select(.name|startswith("transient_"))) | .[].url'`; do + curl -s -H 'Accept: application/json;api-version=6.0-preview' + -H 'Authorization: Bearer ${{ fromJson(steps.actions_runtime.outputs.result).token }}' + -X DELETE "${url}"; + done + + - name: Fetch remaining artifacts (test results) + uses: actions/download-artifact@v2 + with: + path: test-results + + - name: Delete remaining artifacts + run: > + for url in ` + curl -s -H 'Accept: application/json;api-version=6.0-preview' + -H 'Authorization: Bearer ${{ fromJson(steps.actions_runtime.outputs.result).token }}' + '${{ fromJson(steps.actions_runtime.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview' | + jq -r -c '.value | .[].url'`; do + curl -s -H 'Accept: application/json;api-version=6.0-preview' + -H 'Authorization: Bearer ${{ fromJson(steps.actions_runtime.outputs.result).token }}' + -X DELETE "${url}"; + done + + - name: Upload a combined test results artifact + uses: actions/upload-artifact@v2 + with: + name: test-results_${{ needs.prerequisites.outputs.bundle_id }} + path: test-results diff --git a/doc/building.html b/doc/building.html index fee88e27489..5f615f9d4ef 100644 --- a/doc/building.html +++ b/doc/building.html @@ -265,7 +265,7 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requ <tbody> <tr class="odd"> <td style="text-align: left;">Linux</td> -<td style="text-align: left;">gcc 9.2.0</td> +<td style="text-align: left;">gcc 10.2.0</td> </tr> <tr class="even"> <td style="text-align: left;">macOS</td> @@ -273,14 +273,14 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requ </tr> <tr class="odd"> <td style="text-align: left;">Windows</td> -<td style="text-align: left;">Microsoft Visual Studio 2019 update 16.5.3</td> +<td style="text-align: left;">Microsoft Visual Studio 2019 update 16.7.2</td> </tr> </tbody> </table> <p>All compilers are expected to be able to compile to the C99 language standard, as some C99 features are used in the source code. Microsoft Visual Studio doesn't fully support C99 so in practice shared code is limited to using C99 features that it does support.</p> <h3 id="gcc">gcc</h3> <p>The minimum accepted version of gcc is 5.0. Older versions will generate a warning by <code>configure</code> and are unlikely to work.</p> -<p>The JDK is currently known to be able to compile with at least version 9.2 of gcc.</p> +<p>The JDK is currently known to be able to compile with at least version 10.2 of gcc.</p> <p>In general, any version between these two should be usable.</p> <h3 id="clang">clang</h3> <p>The minimum accepted version of clang is 3.5. Older versions will not be accepted by <code>configure</code>.</p> diff --git a/doc/building.md b/doc/building.md index 53960203640..47fa445998d 100644 --- a/doc/building.md +++ b/doc/building.md @@ -302,9 +302,9 @@ issues. Operating system Toolchain version ------------------ ------------------------------------------------------- - Linux gcc 9.2.0 + Linux gcc 10.2.0 macOS Apple Xcode 10.1 (using clang 10.0.0) - Windows Microsoft Visual Studio 2019 update 16.5.3 + Windows Microsoft Visual Studio 2019 update 16.7.2 All compilers are expected to be able to compile to the C99 language standard, as some C99 features are used in the source code. Microsoft Visual Studio @@ -316,7 +316,7 @@ features that it does support. The minimum accepted version of gcc is 5.0. Older versions will generate a warning by `configure` and are unlikely to work. -The JDK is currently known to be able to compile with at least version 9.2 of +The JDK is currently known to be able to compile with at least version 10.2 of gcc. In general, any version between these two should be usable. diff --git a/make/CompileInterimLangtools.gmk b/make/CompileInterimLangtools.gmk index 88578e3e060..7c67a5a6d09 100644 --- a/make/CompileInterimLangtools.gmk +++ b/make/CompileInterimLangtools.gmk @@ -74,7 +74,7 @@ define SetupInterimModule EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \ Standard.java, \ EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \ - COPY := .gif .png .xml .css .js javax.tools.JavaCompilerTool, \ + COPY := .gif .png .xml .css .js .txt javax.tools.JavaCompilerTool, \ BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \ DISABLED_WARNINGS := module options, \ JAVAC_FLAGS := \ diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk index cebbf1e31fe..c4d25c90122 100644 --- a/make/CompileJavaModules.gmk +++ b/make/CompileJavaModules.gmk @@ -348,7 +348,7 @@ jdk.dynalink_CLEAN += .properties ################################################################################ -jdk.javadoc_COPY += .xml .css .js .png +jdk.javadoc_COPY += .xml .css .js .png .txt ################################################################################ diff --git a/make/Main.gmk b/make/Main.gmk index 1071ccab181..493b795d35a 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -112,7 +112,6 @@ $(eval $(call SetupTarget, generate-exported-symbols, \ $(eval $(call DeclareRecipesForPhase, GENSRC, \ TARGET_SUFFIX := gensrc-src, \ FILE_PREFIX := Gensrc, \ - MAKE_SUBDIR := gensrc, \ CHECK_MODULES := $(ALL_MODULES), \ )) @@ -150,7 +149,6 @@ ALL_TARGETS += $(GENSRC_TARGETS) $(eval $(call DeclareRecipesForPhase, GENDATA, \ TARGET_SUFFIX := gendata, \ FILE_PREFIX := Gendata, \ - MAKE_SUBDIR := gendata, \ CHECK_MODULES := $(ALL_MODULES), \ )) @@ -161,7 +159,6 @@ ALL_TARGETS += $(GENDATA_TARGETS) $(eval $(call DeclareRecipesForPhase, COPY, \ TARGET_SUFFIX := copy, \ FILE_PREFIX := Copy, \ - MAKE_SUBDIR := copy, \ CHECK_MODULES := $(ALL_MODULES), \ )) @@ -203,7 +200,6 @@ ALL_TARGETS += $(JAVA_TARGETS) $(eval $(call DeclareRecipesForPhase, LIBS, \ TARGET_SUFFIX := libs, \ FILE_PREFIX := Lib, \ - MAKE_SUBDIR := lib, \ CHECK_MODULES := $(ALL_MODULES), \ )) @@ -216,7 +212,6 @@ ALL_TARGETS += $(LIBS_TARGETS) $(eval $(call DeclareRecipesForPhase, STATIC_LIBS, \ TARGET_SUFFIX := static-libs, \ FILE_PREFIX := Lib, \ - MAKE_SUBDIR := lib, \ CHECK_MODULES := $(ALL_MODULES), \ EXTRA_ARGS := STATIC_LIBS=true, \ )) @@ -228,7 +223,6 @@ ALL_TARGETS += $(STATIC_LIBS_TARGETS) $(eval $(call DeclareRecipesForPhase, LAUNCHER, \ TARGET_SUFFIX := launchers, \ FILE_PREFIX := Launcher, \ - MAKE_SUBDIR := launcher, \ CHECK_MODULES := $(ALL_MODULES), \ )) diff --git a/make/MainSupport.gmk b/make/MainSupport.gmk index 7b3f40abe92..44296b86bbc 100644 --- a/make/MainSupport.gmk +++ b/make/MainSupport.gmk @@ -185,7 +185,6 @@ endef # Param 1: Name of list to add targets to # Named params: # TARGET_SUFFIX : Suffix of target to create for recipe -# MAKE_SUBDIR : Subdir for this build phase # FILE_PREFIX : File prefix for this build phase # CHECK_MODULES : List of modules to try # MULTIPLE_MAKEFILES : Set to true to handle makefiles for the same module and diff --git a/make/ModuleWrapper.gmk b/make/ModuleWrapper.gmk index c9f1de23995..e4a8db24aa3 100644 --- a/make/ModuleWrapper.gmk +++ b/make/ModuleWrapper.gmk @@ -39,7 +39,7 @@ include MakeBase.gmk TARGETS := # Include the file being wrapped. -include modules/$(MODULE)/$(MAKEFILE_PREFIX).gmk +include $(MAKEFILE_PREFIX).gmk # Setup copy rules from the modules directories to the jdk image directory. ifeq ($(call isTargetOs, windows), true) diff --git a/make/RunTests.gmk b/make/RunTests.gmk index b978f9cf5af..97fd016b361 100644 --- a/make/RunTests.gmk +++ b/make/RunTests.gmk @@ -609,6 +609,7 @@ define SetupRunGtestTestBody $$(call LogWarn, Running test '$$($1_TEST)') $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, ( \ + $$(CD) $$($1_TEST_SUPPORT_DIR) && \ $$(FIXPATH) $$(TEST_IMAGE_DIR)/hotspot/gtest/$$($1_VARIANT)/gtestLauncher \ -jdk $(JDK_UNDER_TEST) $$($1_GTEST_FILTER) \ --gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \ diff --git a/make/autoconf/basic.m4 b/make/autoconf/basic.m4 index d55cbe4d4ba..fb06fa5426a 100644 --- a/make/autoconf/basic.m4 +++ b/make/autoconf/basic.m4 @@ -117,6 +117,16 @@ AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE], fi ]) +############################################################################### +# Evaluates platform specific overrides for build devkit variables. +# $1: Name of variable +AC_DEFUN([BASIC_EVAL_BUILD_DEVKIT_VARIABLE], +[ + if test "x[$]$1" = x; then + eval $1="\${$1_${OPENJDK_BUILD_CPU}}" + fi +]) + ############################################################################### AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT], [ diff --git a/make/autoconf/configure.ac b/make/autoconf/configure.ac index 16e4bcfebaa..449f8868983 100644 --- a/make/autoconf/configure.ac +++ b/make/autoconf/configure.ac @@ -242,7 +242,6 @@ HOTSPOT_SETUP_MISC # ############################################################################### -JDKOPT_DETECT_INTREE_EC JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST JDKOPT_EXCLUDE_TRANSLATIONS diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index 64f9883d52e..588df7f0011 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -134,6 +134,10 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS], WARNINGS_ENABLE_ALL="-W3" DISABLED_WARNINGS="4800" + if test "x$TOOLCHAIN_VERSION" = x2017; then + # VS2017 incorrectly triggers this warning for constexpr + DISABLED_WARNINGS+=" 4307" + fi ;; gcc) @@ -662,7 +666,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], # toolchain dependend, per-cpu if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then - if test "x$FLAGS_CPU" = xx86_64; then + if test "x$FLAGS_CPU" = xaarch64; then + $1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_ARM64_ -Darm64" + elif test "x$FLAGS_CPU" = xx86_64; then $1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_AMD64_ -Damd64" else $1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_X86_ -Dx86" diff --git a/make/autoconf/flags-ldflags.m4 b/make/autoconf/flags-ldflags.m4 index 2b1e22c7c4f..c2e77905663 100644 --- a/make/autoconf/flags-ldflags.m4 +++ b/make/autoconf/flags-ldflags.m4 @@ -165,15 +165,14 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP], fi elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then - if test "x${OPENJDK_$1_CPU}" = "xx86"; then - $1_CPU_LDFLAGS="-safeseh" - # NOTE: Old build added -machine. Probably not needed. - $1_CPU_LDFLAGS_JVM_ONLY="-machine:I386" + if test "x${OPENJDK_$1_CPU_BITS}" = "x32"; then $1_CPU_EXECUTABLE_LDFLAGS="-stack:327680" - else - $1_CPU_LDFLAGS_JVM_ONLY="-machine:AMD64" + elif test "x${OPENJDK_$1_CPU_BITS}" = "x64"; then $1_CPU_EXECUTABLE_LDFLAGS="-stack:1048576" fi + if test "x${OPENJDK_$1_CPU}" = "xx86"; then + $1_CPU_LDFLAGS="-safeseh" + fi fi # JVM_VARIANT_PATH depends on if this is build or target... diff --git a/make/autoconf/jdk-options.m4 b/make/autoconf/jdk-options.m4 index 7ebda1de525..8f58db17d4a 100644 --- a/make/autoconf/jdk-options.m4 +++ b/make/autoconf/jdk-options.m4 @@ -228,23 +228,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS], ]) ############################################################################### -# -# Enable or disable the elliptic curve crypto implementation -# -AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC], -[ - AC_MSG_CHECKING([if elliptic curve crypto implementation is present]) - - if test -d "${TOPDIR}/src/jdk.crypto.ec/share/native/libsunec/impl"; then - ENABLE_INTREE_EC=true - AC_MSG_RESULT([yes]) - else - ENABLE_INTREE_EC=false - AC_MSG_RESULT([no]) - fi - - AC_SUBST(ENABLE_INTREE_EC) -]) AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS], [ diff --git a/make/autoconf/jvm-features.m4 b/make/autoconf/jvm-features.m4 index 8ec76f669f7..04ca7b4e909 100644 --- a/make/autoconf/jvm-features.m4 +++ b/make/autoconf/jvm-features.m4 @@ -237,8 +237,9 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_AOT], JVM_FEATURES_CHECK_AVAILABILITY(aot, [ AC_MSG_CHECKING([if platform is supported by AOT]) # AOT is only available where JVMCI is available since it requires JVMCI. - if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \ - test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then + if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then + AC_MSG_RESULT([yes]) + elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-aarch64"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU]) @@ -303,8 +304,9 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_GRAAL], JVM_FEATURES_CHECK_AVAILABILITY(graal, [ AC_MSG_CHECKING([if platform is supported by Graal]) # Graal is only available where JVMCI is available since it requires JVMCI. - if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \ - test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then + if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then + AC_MSG_RESULT([yes]) + elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-aarch64"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU]) @@ -336,8 +338,9 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI], [ JVM_FEATURES_CHECK_AVAILABILITY(jvmci, [ AC_MSG_CHECKING([if platform is supported by JVMCI]) - if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \ - test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then + if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then + AC_MSG_RESULT([yes]) + elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-aarch64"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU]) @@ -395,8 +398,14 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_ZGC], AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU]) AVAILABLE=false fi - elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-aarch64"; then - AC_MSG_RESULT([yes]) + elif test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then + if test "x$OPENJDK_TARGET_OS" = "xlinux" || \ + test "x$OPENJDK_TARGET_OS" = "xwindows"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU]) + AVAILABLE=false + fi else AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU]) AVAILABLE=false diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4 index 25b89ecce36..6687cb6cd37 100644 --- a/make/autoconf/toolchain.m4 +++ b/make/autoconf/toolchain.m4 @@ -872,14 +872,18 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS], . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info # This potentially sets the following: # A descriptive name of the devkit - BASIC_EVAL_DEVKIT_VARIABLE([BUILD_DEVKIT_NAME]) + BASIC_EVAL_BUILD_DEVKIT_VARIABLE([BUILD_DEVKIT_NAME]) # Corresponds to --with-extra-path - BASIC_EVAL_DEVKIT_VARIABLE([BUILD_DEVKIT_EXTRA_PATH]) + BASIC_EVAL_BUILD_DEVKIT_VARIABLE([BUILD_DEVKIT_EXTRA_PATH]) # Corresponds to --with-toolchain-path - BASIC_EVAL_DEVKIT_VARIABLE([BUILD_DEVKIT_TOOLCHAIN_PATH]) + BASIC_EVAL_BUILD_DEVKIT_VARIABLE([BUILD_DEVKIT_TOOLCHAIN_PATH]) # Corresponds to --with-sysroot - BASIC_EVAL_DEVKIT_VARIABLE([BUILD_DEVKIT_SYSROOT]) - # Skip the Window specific parts + BASIC_EVAL_BUILD_DEVKIT_VARIABLE([BUILD_DEVKIT_SYSROOT]) + + if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + BASIC_EVAL_BUILD_DEVKIT_VARIABLE([BUILD_DEVKIT_VS_INCLUDE]) + BASIC_EVAL_BUILD_DEVKIT_VARIABLE([BUILD_DEVKIT_VS_LIB]) + fi fi AC_MSG_CHECKING([for build platform devkit]) @@ -889,13 +893,20 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS], AC_MSG_RESULT([$BUILD_DEVKIT_ROOT]) fi - BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT" - - # Fallback default of just /bin if DEVKIT_PATH is not defined + # Fallback default of just /bin if DEVKIT_PATH is not defined if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin" fi PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH" + + BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT" + + if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + BUILD_VS_INCLUDE="$BUILD_DEVKIT_VS_INCLUDE" + BUILD_VS_LIB="$BUILD_DEVKIT_VS_LIB" + + TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS([BUILD_]) + fi fi fi @@ -921,9 +932,37 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS], UTIL_FIXUP_EXECUTABLE(BUILD_STRIP) # Assume the C compiler is the assembler BUILD_AS="$BUILD_CC -c" - # Just like for the target compiler, use the compiler as linker - BUILD_LD="$BUILD_CC" - BUILD_LDCXX="$BUILD_CXX" + if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + # In the Microsoft toolchain we have a separate LD command "link". + # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is + # a cygwin program for something completely different. + AC_CHECK_PROG([BUILD_LD], [link$EXE_SUFFIX],[link$EXE_SUFFIX],,, [$CYGWIN_LINK]) + UTIL_FIXUP_EXECUTABLE(BUILD_LD) + # Verify that we indeed succeeded with this trick. + AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker]) + + # Reset PATH since it can contain a mix of WSL/linux paths and Windows paths from VS, + # which, in combination with WSLENV, will make the WSL layer complain + old_path="$PATH" + PATH= + + "$BUILD_LD" --version > /dev/null + + if test $? -eq 0 ; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([This is the Cygwin link tool. Please check your PATH and rerun configure.]) + else + AC_MSG_RESULT([yes]) + fi + + PATH="$old_path" + + BUILD_LDCXX="$BUILD_LD" + else + # Just like for the target compiler, use the compiler as linker + BUILD_LD="$BUILD_CC" + BUILD_LDCXX="$BUILD_CXX" + fi PATH="$OLDPATH" @@ -974,6 +1013,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS], if test "x$COMPILER_CPU_TEST" != "xx64"; then AC_MSG_ERROR([Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for "$COMPILER_CPU_TEST"; expected "x64".]) fi + elif test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then + if test "x$COMPILER_CPU_TEST" != "xARM64"; then + AC_MSG_ERROR([Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for "$COMPILER_CPU_TEST"; expected "arm64".]) + fi fi fi diff --git a/make/autoconf/toolchain_windows.m4 b/make/autoconf/toolchain_windows.m4 index ed99f4508fc..4644c0a9d7c 100644 --- a/make/autoconf/toolchain_windows.m4 +++ b/make/autoconf/toolchain_windows.m4 @@ -79,11 +79,15 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT], if test -d "$VS_BASE"; then AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD]) - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + if test "x$OPENJDK_TARGET_CPU" = xx86; then VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat" - else + elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \ VC/Auxiliary/Build/vcvarsx86_amd64.bat VC/Auxiliary/Build/vcvars64.bat" + elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then + # for host x86-64, target aarch64 + VCVARSFILES="vc/auxiliary/build/vcvarsamd64_arm64.bat \ + vc/auxiliary/build/vcvarsx86_arm64.bat" fi for VCVARSFILE in $VCVARSFILES; do @@ -123,10 +127,12 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT], elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD]) VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd" - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + if test "x$OPENJDK_TARGET_CPU" = xx86; then VS_ENV_ARGS="/x86" - else + elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then VS_ENV_ARGS="/x64" + elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then + VS_ENV_ARGS="/arm64" fi # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK @@ -520,41 +526,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV], AC_SUBST(VS_INCLUDE) AC_SUBST(VS_LIB) - # Convert VS_INCLUDE into SYSROOT_CFLAGS - OLDIFS="$IFS" - IFS=";" - for i in $VS_INCLUDE; do - ipath=$i - # Only process non-empty elements - if test "x$ipath" != x; then - IFS="$OLDIFS" - # Check that directory exists before calling fixup_path - testpath=$ipath - UTIL_REWRITE_AS_UNIX_PATH([testpath]) - if test -d "$testpath"; then - UTIL_FIXUP_PATH([ipath]) - SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath" - fi - IFS=";" - fi - done - # Convert VS_LIB into SYSROOT_LDFLAGS - for i in $VS_LIB; do - libpath=$i - # Only process non-empty elements - if test "x$libpath" != x; then - IFS="$OLDIFS" - # Check that directory exists before calling fixup_path - testpath=$libpath - UTIL_REWRITE_AS_UNIX_PATH([testpath]) - if test -d "$testpath"; then - UTIL_FIXUP_PATH([libpath]) - SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath" - fi - IFS=";" - fi - done - IFS="$OLDIFS" + TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS AC_SUBST(VS_PATH_WINDOWS) fi @@ -593,10 +565,15 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL], CORRECT_MSVCR_ARCH="PE32+ executable" fi else - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + if test "x$OPENJDK_TARGET_CPU" = xx86; then CORRECT_MSVCR_ARCH=386 - else + elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then CORRECT_MSVCR_ARCH=x86-64 + elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then + # The cygwin 'file' command only returns "PE32+ executable (DLL) (console), for MS Windows", + # without specifying which architecture it is for specifically. This has been fixed upstream. + # https://github.com/file/file/commit/b849b1af098ddd530094bf779b58431395db2e10#diff-ff2eced09e6860de75057dd731d092aeR142 + CORRECT_MSVCR_ARCH="PE32+ executable" fi fi if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then @@ -616,26 +593,26 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL], DLL_NAME="$1" MSVC_DLL= + if test "x$OPENJDK_TARGET_CPU" = xx86; then + vs_target_cpu=x86 + elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then + vs_target_cpu=x64 + elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then + vs_target_cpu=arm64 + fi + if test "x$MSVC_DLL" = x; then if test "x$VCINSTALLDIR" != x; then CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR" UTIL_FIXUP_PATH(CYGWIN_VC_INSTALL_DIR) if test "$VS_VERSION" -lt 2017; then # Probe: Using well-known location from Visual Studio 12.0 and older - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then - POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME" - else - POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME" - fi + POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/$vs_target_cpu/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME" else CYGWIN_VC_TOOLS_REDIST_DIR="$VCToolsRedistDir" UTIL_FIXUP_PATH(CYGWIN_VC_TOOLS_REDIST_DIR) # Probe: Using well-known location from VS 2017 and VS 2019 - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then - POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_TOOLS_REDIST_DIR/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`" - else - POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_TOOLS_REDIST_DIR/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`" - fi + POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_TOOLS_REDIST_DIR/$vs_target_cpu/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`" fi # In case any of the above finds more than one file, loop over them. for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do @@ -667,13 +644,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL], if test "x$VS100COMNTOOLS" != x; then CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.." UTIL_REWRITE_AS_UNIX_PATH(CYGWIN_VS_TOOLS_DIR) - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then - POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \ - | $GREP -i /x64/ | $HEAD --lines 1` - else - POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \ - | $GREP -i /x86/ | $HEAD --lines 1` - fi + POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \ + | $GREP -i /$vs_target_cpu/ | $HEAD --lines 1` TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL], [search of VS100COMNTOOLS]) fi @@ -683,17 +655,17 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL], # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now. # (This was the original behaviour; kept since it might turn something up) if test "x$CYGWIN_VC_INSTALL_DIR" != x; then - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then + if test "x$OPENJDK_TARGET_CPU" = xx86; then POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \ - | $GREP x64 | $HEAD --lines 1` - else - POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \ - | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1` + | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $GREP -v arm64 | $HEAD --lines 1` if test "x$POSSIBLE_MSVC_DLL" = x; then # We're grasping at straws now... POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \ | $HEAD --lines 1` fi + else + POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \ + | $GREP $vs_target_cpu | $HEAD --lines 1` fi TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL], @@ -757,9 +729,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS], fi AC_ARG_WITH(vcruntime-1-dll, [AS_HELP_STRING([--with-vcruntime-1-dll], - [path to microsoft C++ runtime dll (vcruntime*_1.dll) (Windows only) @<:@probed@:>@])]) + [path to microsoft C++ runtime dll (vcruntime*_1.dll) (Windows 64-bits only) @<:@probed@:>@])]) - if test "x$VCRUNTIME_1_NAME" != "x"; then + if test "x$VCRUNTIME_1_NAME" != "x" -a "x$OPENJDK_TARGET_CPU_BITS" = x64; then if test "x$with_vcruntime_1_dll" != x; then # If given explicitly by user, do not probe. If not present, fail directly. TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($VCRUNTIME_1_NAME, [$with_vcruntime_1_dll], @@ -801,9 +773,12 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS], else CYGWIN_WINDOWSSDKDIR="${WINDOWSSDKDIR}" UTIL_FIXUP_PATH([CYGWIN_WINDOWSSDKDIR]) - dll_subdir=$OPENJDK_TARGET_CPU - if test "x$dll_subdir" = "xx86_64"; then + if test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then + dll_subdir="arm64" + elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then dll_subdir="x64" + elif test "x$OPENJDK_TARGET_CPU" = "xx86"; then + dll_subdir="x86" fi UCRT_DLL_DIR="$CYGWIN_WINDOWSSDKDIR/Redist/ucrt/DLLs/$dll_subdir" if test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then @@ -826,3 +801,49 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS], fi AC_SUBST(UCRT_DLL_DIR) ]) + +# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so +# that configure can use them while detecting compilers. +# TOOLCHAIN_TYPE is available here. +# Param 1 - Optional prefix to all variables. (e.g BUILD_) +AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS], +[ + OLDIFS="$IFS" + IFS=";" + # Convert $1VS_INCLUDE into $1SYSROOT_CFLAGS + for i in [$]$1VS_INCLUDE; do + ipath=$i + # Only process non-empty elements + if test "x$ipath" != x; then + IFS="$OLDIFS" + # Check that directory exists before calling fixup_path + testpath=$ipath + UTIL_REWRITE_AS_UNIX_PATH([testpath]) + if test -d "$testpath"; then + UTIL_FIXUP_PATH([ipath]) + $1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -I$ipath" + fi + IFS=";" + fi + done + # Convert $1VS_LIB into $1SYSROOT_LDFLAGS + for i in [$]$1VS_LIB; do + libpath=$i + # Only process non-empty elements + if test "x$libpath" != x; then + IFS="$OLDIFS" + # Check that directory exists before calling fixup_path + testpath=$libpath + UTIL_REWRITE_AS_UNIX_PATH([testpath]) + if test -d "$testpath"; then + UTIL_FIXUP_PATH([libpath]) + $1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -libpath:$libpath" + fi + IFS=";" + fi + done + IFS="$OLDIFS" + + AC_SUBST($1SYSROOT_CFLAGS) + AC_SUBST($1SYSROOT_LDFLAGS) +]) diff --git a/make/autoconf/version-numbers b/make/autoconf/version-numbers index 71bf25363b3..ccdb48adf15 100644 --- a/make/autoconf/version-numbers +++ b/make/autoconf/version-numbers @@ -36,7 +36,7 @@ DEFAULT_VERSION_EXTRA3=0 DEFAULT_VERSION_DATE=2021-03-16 DEFAULT_VERSION_CLASSFILE_MAJOR=60 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" DEFAULT_VERSION_CLASSFILE_MINOR=0 -DEFAULT_ACCEPTABLE_BOOT_VERSIONS="14 15 16" +DEFAULT_ACCEPTABLE_BOOT_VERSIONS="15 16" DEFAULT_JDK_SOURCE_TARGET_VERSION=16 DEFAULT_PROMOTED_VERSION_PRE=lworld3ea diff --git a/make/conf/jib-profiles.js b/make/conf/jib-profiles.js index baf57d2b6d4..352a4448dd8 100644 --- a/make/conf/jib-profiles.js +++ b/make/conf/jib-profiles.js @@ -381,7 +381,7 @@ var getJibProfilesCommon = function (input, data) { }; }; - common.boot_jdk_version = "14"; + common.boot_jdk_version = "15"; common.boot_jdk_build_number = "36"; common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-" + common.boot_jdk_version @@ -959,10 +959,10 @@ var getJibProfilesProfiles = function (input, common, data) { var getJibProfilesDependencies = function (input, common) { var devkit_platform_revisions = { - linux_x64: "gcc9.2.0-OL6.4+1.0", + linux_x64: "gcc10.2.0-OL6.4+1.0", macosx_x64: "Xcode11.3.1-MacOSX10.15+1.0", - windows_x64: "VS2019-16.5.3+1.0", - linux_aarch64: "gcc9.2.0-OL7.6+1.0", + windows_x64: "VS2019-16.7.2+1.0", + linux_aarch64: "gcc10.2.0-OL7.6+1.0", linux_arm: "gcc8.2.0-Fedora27+1.0", linux_ppc64le: "gcc8.2.0-Fedora27+1.0", linux_s390x: "gcc8.2.0-Fedora27+1.0" @@ -994,17 +994,8 @@ var getJibProfilesDependencies = function (input, common) { ? input.get("gnumake", "install_path") + "/cygwin/bin" : input.get("gnumake", "install_path") + "/bin"); - if (input.build_cpu == 'aarch64') { - boot_jdk = { - organization: common.organization, - ext: "tar.gz", - module: "jdk-linux_aarch64", - revision: "14+1.0", - configure_args: "--with-boot-jdk=" + common.boot_jdk_home, - environment_path: common.boot_jdk_home + "/bin" - } - } else { - boot_jdk = { + var dependencies = { + boot_jdk: { server: "jpg", product: "jdk", version: common.boot_jdk_version, @@ -1013,11 +1004,7 @@ var getJibProfilesDependencies = function (input, common) { + boot_jdk_platform + "_bin" + boot_jdk_ext, configure_args: "--with-boot-jdk=" + common.boot_jdk_home, environment_path: common.boot_jdk_home + "/bin" - } - } - - var dependencies = { - boot_jdk: boot_jdk, + }, devkit: { organization: common.organization, diff --git a/make/conf/test-dependencies b/make/conf/test-dependencies new file mode 100644 index 00000000000..4cc4610daed --- /dev/null +++ b/make/conf/test-dependencies @@ -0,0 +1,43 @@ +# +# Copyright (c) 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 +# 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. +# + +# Versions and download locations for dependencies used by pre-submit testing. + +BOOT_JDK_VERSION=15 +JTREG_VERSION=5.1 +JTREG_BUILD=b01 +GTEST_VERSION=1.8.1 + +LINUX_X64_BOOT_JDK_FILENAME=openjdk-15_linux-x64_bin.tar.gz +LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk15/779bf45e88a44cbd9ea6621d33e33db1/36/GPL/openjdk-15_linux-x64_bin.tar.gz +LINUX_X64_BOOT_JDK_SHA256=bb67cadee687d7b486583d03c9850342afea4593be4f436044d785fba9508fb7 + +WINDOWS_X64_BOOT_JDK_FILENAME=openjdk-15_windows-x64_bin.zip +WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk15/779bf45e88a44cbd9ea6621d33e33db1/36/GPL/openjdk-15_windows-x64_bin.zip +WINDOWS_X64_BOOT_JDK_SHA256=764e39a71252a9791118a31ae56a4247c049463bda5eb72497122ec50b1d07f8 + +MACOS_X64_BOOT_JDK_FILENAME=openjdk-115_osx-x64_bin.tar.gz +MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk15/779bf45e88a44cbd9ea6621d33e33db1/36/GPL/openjdk-15_osx-x64_bin.tar.gz +MACOS_X64_BOOT_JDK_SHA256=ab842c8c0953b816be308c098c1a021177a4776bef24da85b6bafbbd657c7e1a diff --git a/make/data/characterdata/CharacterDataLatin1.java.template b/make/data/characterdata/CharacterDataLatin1.java.template index 2d4f2ecdf2e..70559bdc346 100644 --- a/make/data/characterdata/CharacterDataLatin1.java.template +++ b/make/data/characterdata/CharacterDataLatin1.java.template @@ -25,7 +25,7 @@ package java.lang; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** The CharacterData class encapsulates the large tables found in Java.lang.Character. */ @@ -80,18 +80,18 @@ class CharacterDataLatin1 extends CharacterData { return props; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate boolean isDigit(int ch) { return '0' <= ch && ch <= '9'; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate boolean isLowerCase(int ch) { int props = getProperties(ch); return (props & $$maskType) == Character.LOWERCASE_LETTER; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate boolean isUpperCase(int ch) { int props = getProperties(ch); return (props & $$maskType) == Character.UPPERCASE_LETTER; @@ -232,7 +232,7 @@ class CharacterDataLatin1 extends CharacterData { return retval; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate boolean isWhitespace(int ch) { int props = getProperties(ch); return ((props & $$maskIdentifierInfo) == $$valueJavaWhitespace); diff --git a/make/devkit/Tools.gmk b/make/devkit/Tools.gmk index a92bb91cc38..d5ef8eac849 100644 --- a/make/devkit/Tools.gmk +++ b/make/devkit/Tools.gmk @@ -87,11 +87,20 @@ endif # Define external dependencies # Latest that could be made to work. -GCC_VER := 9.2.0 -ifeq ($(GCC_VER), 9.2.0) +GCC_VER := 10.2.0 +ifeq ($(GCC_VER), 10.2.0) + gcc_ver := gcc-10.2.0 + binutils_ver := binutils-2.35 + ccache_ver := ccache-3.7.11 + mpfr_ver := mpfr-4.1.0 + gmp_ver := gmp-6.2.0 + mpc_ver := mpc-1.1.0 + gdb_ver := gdb-9.2 + REQUIRED_MIN_MAKE_MAJOR_VERSION := 4 +else ifeq ($(GCC_VER), 9.2.0) gcc_ver := gcc-9.2.0 binutils_ver := binutils-2.34 - ccache_ver := 3.7.3 + ccache_ver := ccache-3.7.3 mpfr_ver := mpfr-3.1.5 gmp_ver := gmp-6.1.2 mpc_ver := mpc-1.0.3 @@ -99,7 +108,7 @@ ifeq ($(GCC_VER), 9.2.0) else ifeq ($(GCC_VER), 8.3.0) gcc_ver := gcc-8.3.0 binutils_ver := binutils-2.32 - ccache_ver := 3.7.3 + ccache_ver := ccache-3.7.3 mpfr_ver := mpfr-3.1.5 gmp_ver := gmp-6.1.2 mpc_ver := mpc-1.0.3 @@ -107,7 +116,7 @@ else ifeq ($(GCC_VER), 8.3.0) else ifeq ($(GCC_VER), 7.3.0) gcc_ver := gcc-7.3.0 binutils_ver := binutils-2.30 - ccache_ver := 3.3.6 + ccache_ver := ccache-3.3.6 mpfr_ver := mpfr-3.1.5 gmp_ver := gmp-6.1.2 mpc_ver := mpc-1.0.3 @@ -115,7 +124,7 @@ else ifeq ($(GCC_VER), 7.3.0) else ifeq ($(GCC_VER), 4.9.2) gcc_ver := gcc-4.9.2 binutils_ver := binutils-2.25 - ccache_ver := 3.2.1 + ccache_ver := ccache-3.2.1 mpfr_ver := mpfr-3.0.1 gmp_ver := gmp-4.3.2 mpc_ver := mpc-1.0.1 @@ -124,9 +133,20 @@ else $(error Unsupported GCC version) endif +ifneq ($(REQUIRED_MIN_MAKE_MAJOR_VERSION),) + MAKE_MAJOR_VERSION := $(word 1,$(subst ., ,$(MAKE_VERSION))) + SUPPORTED_MAKE_VERSION := $(shell [ $(MAKE_MAJOR_VERSION) -ge $(REQUIRED_MIN_MAKE_MAJOR_VERSION) ] && echo true) + ifneq ($(SUPPORTED_MAKE_VERSION),true) + $(error "Make v$(MAKE_VERSION) is too old, must use v$(REQUIRED_MIN_MAKE_MAJOR_VERSION) or above") + endif +endif + +ccache_ver_only := $(patsubst ccache-%,%,$(ccache_ver)) + + GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.xz -BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.xz -CCACHE := https://github.com/ccache/ccache/releases/download/v$(ccache_ver)/ccache-$(ccache_ver).tar.xz +BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.gz +CCACHE := https://github.com/ccache/ccache/releases/download/v$(ccache_ver_only)/$(ccache_ver).tar.xz MPFR := https://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2 GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2 MPC := http://ftp.gnu.org/pub/gnu/mpc/${mpc_ver}.tar.gz diff --git a/make/devkit/createWindowsDevkit2017.sh b/make/devkit/createWindowsDevkit2017.sh index a802b18a557..91227259bdf 100644 --- a/make/devkit/createWindowsDevkit2017.sh +++ b/make/devkit/createWindowsDevkit2017.sh @@ -113,19 +113,23 @@ REDIST_SUBDIR="VC/Redist/MSVC/$REDIST_VERSION" echo "Copying VC..." rm -rf $DEVKIT_ROOT/VC mkdir -p $DEVKIT_ROOT/VC/bin +cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/arm64" $DEVKIT_ROOT/VC/bin/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/x64" $DEVKIT_ROOT/VC/bin/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx86/x86" $DEVKIT_ROOT/VC/bin/ mkdir -p $DEVKIT_ROOT/VC/lib +cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/arm64" $DEVKIT_ROOT/VC/lib/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x64" $DEVKIT_ROOT/VC/lib/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x86" $DEVKIT_ROOT/VC/lib/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/include" $DEVKIT_ROOT/VC/ mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib +cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/arm64" $DEVKIT_ROOT/VC/atlmfc/lib/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x64" $DEVKIT_ROOT/VC/atlmfc/lib/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x86" $DEVKIT_ROOT/VC/atlmfc/lib/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/ mkdir -p $DEVKIT_ROOT/VC/Auxiliary cp -r "$VS_INSTALL_DIR/VC/Auxiliary/Build" $DEVKIT_ROOT/VC/Auxiliary/ mkdir -p $DEVKIT_ROOT/VC/redist +cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/arm64" $DEVKIT_ROOT/VC/redist/ cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x64" $DEVKIT_ROOT/VC/redist/ cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x86" $DEVKIT_ROOT/VC/redist/ @@ -134,7 +138,9 @@ cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x86" $DEVKIT_ROOT/VC/redist/ cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x86 cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x86 cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x64 -cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x64 +cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x64 +cp $DEVKIT_ROOT/VC/redist/arm64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/arm64 +cp $DEVKIT_ROOT/VC/redist/arm64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/arm64 ################################################################################ # Copy SDK files @@ -152,8 +158,10 @@ mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/ cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/ mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib +cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/arm64" $DEVKIT_ROOT/$SDK_VERSION/lib/ cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/ cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/ +cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/arm64" $DEVKIT_ROOT/$SDK_VERSION/lib/ cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/ cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/ mkdir -p $DEVKIT_ROOT/$SDK_VERSION/Redist @@ -188,6 +196,13 @@ echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\"" echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\"" echo-info "DEVKIT_UCRT_DLL_DIR_x86_64=\"\$DEVKIT_ROOT/10/Redist/ucrt/DLLs/x64\"" echo-info "" +echo-info "DEVKIT_TOOLCHAIN_PATH_aarch64=\"\$DEVKIT_ROOT/VC/bin/arm64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\"" +echo-info "DEVKIT_VS_INCLUDE_aarch64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\"" +echo-info "DEVKIT_VS_LIB_aarch64=\"\$DEVKIT_ROOT/VC/lib/arm64;\$DEVKIT_ROOT/VC/atlmfc/lib/arm64;\$DEVKIT_ROOT/$SDK_VERSION/lib/arm64\"" +echo-info "DEVKIT_MSVCR_DLL_aarch64=\"\$DEVKIT_ROOT/VC/redist/arm64/$MSVCR_DLL\"" +echo-info "DEVKIT_MSVCP_DLL_aarch64=\"\$DEVKIT_ROOT/VC/redist/arm64/$MSVCP_DLL\"" +echo-info "DEVKIT_UCRT_DLL_DIR_aarch64=\"\$DEVKIT_ROOT/10/Redist/ucrt/DLLs/arm64\"" +echo-info "" echo-info "DEVKIT_TOOLS_VERSION=\"$TOOLS_VERSION\"" echo-info "DEVKIT_REDIST_VERSION=\"$REDIST_VERSION\"" echo-info "DEVKIT_SDK_VERSION=\"$SDK_FULL_VERSION\"" diff --git a/make/devkit/createWindowsDevkit2019.sh b/make/devkit/createWindowsDevkit2019.sh index 8a97f0c2a3b..a5c89f09faa 100644 --- a/make/devkit/createWindowsDevkit2019.sh +++ b/make/devkit/createWindowsDevkit2019.sh @@ -117,19 +117,23 @@ REDIST_SUBDIR="VC/Redist/MSVC/$REDIST_VERSION" echo "Copying VC..." rm -rf $DEVKIT_ROOT/VC mkdir -p $DEVKIT_ROOT/VC/bin +cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/arm64" $DEVKIT_ROOT/VC/bin/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/x64" $DEVKIT_ROOT/VC/bin/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx86/x86" $DEVKIT_ROOT/VC/bin/ mkdir -p $DEVKIT_ROOT/VC/lib +cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/arm64" $DEVKIT_ROOT/VC/lib/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x64" $DEVKIT_ROOT/VC/lib/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x86" $DEVKIT_ROOT/VC/lib/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/include" $DEVKIT_ROOT/VC/ mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib +cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/arm64" $DEVKIT_ROOT/VC/atlmfc/lib/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x64" $DEVKIT_ROOT/VC/atlmfc/lib/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x86" $DEVKIT_ROOT/VC/atlmfc/lib/ cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/ mkdir -p $DEVKIT_ROOT/VC/Auxiliary cp -r "$VS_INSTALL_DIR/VC/Auxiliary/Build" $DEVKIT_ROOT/VC/Auxiliary/ mkdir -p $DEVKIT_ROOT/VC/redist +cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/arm64" $DEVKIT_ROOT/VC/redist/ cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x64" $DEVKIT_ROOT/VC/redist/ cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x86" $DEVKIT_ROOT/VC/redist/ @@ -139,6 +143,8 @@ cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x86 cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x86 cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x64 cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x64 +cp $DEVKIT_ROOT/VC/redist/arm64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/arm64 +cp $DEVKIT_ROOT/VC/redist/arm64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/arm64 ################################################################################ # Copy SDK files @@ -156,8 +162,10 @@ mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/ cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/ mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib +cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/arm64" $DEVKIT_ROOT/$SDK_VERSION/lib/ cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/ cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/ +cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/arm64" $DEVKIT_ROOT/$SDK_VERSION/lib/ cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/ cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/ mkdir -p $DEVKIT_ROOT/$SDK_VERSION/Redist @@ -193,6 +201,14 @@ echo-info "DEVKIT_VCRUNTIME_1_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$VCRUNTIM echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\"" echo-info "DEVKIT_UCRT_DLL_DIR_x86_64=\"\$DEVKIT_ROOT/10/Redist/ucrt/DLLs/x64\"" echo-info "" +echo-info "DEVKIT_TOOLCHAIN_PATH_aarch64=\"\$DEVKIT_ROOT/VC/bin/arm64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\"" +echo-info "DEVKIT_VS_INCLUDE_aarch64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\"" +echo-info "DEVKIT_VS_LIB_aarch64=\"\$DEVKIT_ROOT/VC/lib/arm64;\$DEVKIT_ROOT/VC/atlmfc/lib/arm64;\$DEVKIT_ROOT/$SDK_VERSION/lib/arm64\"" +echo-info "DEVKIT_MSVCR_DLL_aarch64=\"\$DEVKIT_ROOT/VC/redist/arm64/$MSVCR_DLL\"" +echo-info "DEVKIT_VCRUNTIME_1_DLL_aarch64=\"\$DEVKIT_ROOT/VC/redist/arm64/$VCRUNTIME_1_DLL\"" +echo-info "DEVKIT_MSVCP_DLL_aarch64=\"\$DEVKIT_ROOT/VC/redist/arm64/$MSVCP_DLL\"" +echo-info "DEVKIT_UCRT_DLL_DIR_aarch64=\"\$DEVKIT_ROOT/10/Redist/ucrt/DLLs/arm64\"" +echo-info "" echo-info "DEVKIT_TOOLS_VERSION=\"$TOOLS_VERSION\"" echo-info "DEVKIT_REDIST_VERSION=\"$REDIST_VERSION\"" echo-info "DEVKIT_SDK_VERSION=\"$SDK_FULL_VERSION\"" diff --git a/make/hotspot/gensrc/GensrcAdlc.gmk b/make/hotspot/gensrc/GensrcAdlc.gmk index dea8c855803..733658d5d8b 100644 --- a/make/hotspot/gensrc/GensrcAdlc.gmk +++ b/make/hotspot/gensrc/GensrcAdlc.gmk @@ -88,6 +88,13 @@ ifeq ($(call check-jvm-feature, compiler2), true) ADLCFLAGS += -DAIX=1 else ifeq ($(call isTargetOs, macosx), true) ADLCFLAGS += -D_ALLBSD_SOURCE=1 -D_GNU_SOURCE=1 + else ifeq ($(call isTargetOs, windows), true) + ifeq ($(call isTargetCpuBits, 64), true) + ADLCFLAGS += -D_WIN64=1 + endif + ifeq ($(HOTSPOT_TARGET_CPU_ARCH), aarch64) + ADLCFLAGS += -DR18_RESERVED + endif endif ifeq ($(call isTargetOs, windows), false) diff --git a/make/hotspot/symbols/symbols-unix b/make/hotspot/symbols/symbols-unix index de444eae41c..97aa40b970b 100644 --- a/make/hotspot/symbols/symbols-unix +++ b/make/hotspot/symbols/symbols-unix @@ -123,7 +123,7 @@ JVM_GetPermittedSubclasses JVM_GetPrimitiveArrayElement JVM_GetProperties JVM_GetProtectionDomain -JVM_GetRandomSeedForCDSDump +JVM_GetRandomSeedForDumping JVM_GetRecordComponents JVM_GetSimpleBinaryName JVM_GetStackAccessControlContext @@ -143,8 +143,8 @@ JVM_InternString JVM_Interrupt JVM_InvokeMethod JVM_IsArrayClass -JVM_IsCDSDumpingEnabled -JVM_IsCDSSharingEnabled +JVM_IsDynamicDumpingEnabled +JVM_IsSharingEnabled JVM_IsConstructorIx JVM_IsHiddenClass JVM_IsInterface diff --git a/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java b/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java index 2ac123d87c8..42cad61852d 100644 --- a/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java +++ b/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java @@ -143,6 +143,7 @@ import com.sun.tools.javac.util.Assert; import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.Pair; +import java.util.Optional; /** * A tool for processing the .sym.txt files. @@ -3820,6 +3821,47 @@ private static AnnotationDescription parseAnnotation(String value, int[] valuePo } //</editor-fold> + /**Create sig files for ct.sym reading the classes description from the directory that contains + * {@code ctDescriptionFile}, using the file as a recipe to create the sigfiles. + */ + @SuppressWarnings("unchecked") + public void createJavadocData(String ctDescriptionFileExtra, String ctDescriptionFile, + String targetDir, int startVersion) throws IOException { + LoadDescriptions data = load(ctDescriptionFileExtra != null ? Paths.get(ctDescriptionFileExtra) + : null, + Paths.get(ctDescriptionFile)); + + Path target = Paths.get(targetDir); + + for (PlatformInput version : data.versions) { + int versionNumber = Integer.parseInt(version.version, Character.MAX_RADIX); + if (versionNumber < startVersion) { + continue; + } + Path outputFile = target.resolve("element-list-" + versionNumber + ".txt"); + Files.createDirectories(outputFile.getParent()); + try (Writer w = Files.newBufferedWriter(outputFile, StandardCharsets.UTF_8)) { + Set<ModuleDescription> modules = new TreeSet<>((m1, m2) -> m1.name.compareTo(m2.name)); + modules.addAll(data.modules.values()); + for (ModuleDescription module : modules) { + if ("jdk.unsupported".equals(module.name)) { + continue; + } + Optional<ModuleHeaderDescription> header = module.header.stream().filter(h -> h.versions.contains(version.version)).findAny(); + if (header.isEmpty()) { + continue; + } + w.write("module:" + module.name); + w.write("\n"); + for (String pack : header.get().exports) { + w.write(pack.replace('/', '.')); + w.write("\n"); + } + } + } + } + } + private static void help() { System.err.println("Help..."); } @@ -3900,7 +3942,7 @@ public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOExce new CreateSymbols().createIncrementalBaseLine(args[1], args[2], args); break; } - case "build-ctsym": + case "build-ctsym": { String ctDescriptionFileExtra; String ctDescriptionFile; String ctSymLocation; @@ -3939,6 +3981,39 @@ public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOExce currentVersion, systemModules); break; + } + case "build-javadoc-data": { + String ctDescriptionFileExtra; + String ctDescriptionFile; + String targetDir; + int startVersion; + + if (args.length == 4) { + ctDescriptionFileExtra = null; + ctDescriptionFile = args[1]; + targetDir = args[2]; + startVersion = Integer.parseInt(args[3]); + } else if (args.length == 5) { + ctDescriptionFileExtra = args[1]; + ctDescriptionFile = args[2]; + targetDir = args[3]; + startVersion = Integer.parseInt(args[4]); + } else { + help(); + return ; + } + + if (startVersion < 9) { + System.err.println("The start version must be at least 9!"); + return ; + } + + new CreateSymbols().createJavadocData(ctDescriptionFileExtra, + ctDescriptionFile, + targetDir, + startVersion); + break; + } } } diff --git a/make/langtools/src/classes/build/tools/symbolgenerator/JavadocElementList.java b/make/langtools/src/classes/build/tools/symbolgenerator/JavadocElementList.java new file mode 100644 index 00000000000..dd2e20b6df2 --- /dev/null +++ b/make/langtools/src/classes/build/tools/symbolgenerator/JavadocElementList.java @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package build.tools.symbolgenerator; + +import java.io.IOException; +import java.io.PrintWriter; +import java.io.Writer; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayDeque; +import java.util.Arrays; +import java.util.Deque; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import javax.lang.model.element.ModuleElement.ExportsDirective; +import javax.lang.model.util.Elements; +import javax.tools.JavaCompiler; + +import com.sun.tools.javac.api.JavacTaskImpl; +import com.sun.tools.javac.api.JavacTool; +import com.sun.tools.javac.code.Source; +import com.sun.tools.javac.code.Symbol.ModuleSymbol; +import com.sun.tools.javac.jvm.Target; +import java.util.Map; +import java.util.Map.Entry; +import java.util.TreeMap; +import java.util.TreeSet; +import javax.lang.model.element.ModuleElement; + +/** + * Generate list of modules and packages in the current release. + * Used by the javadoc tool. + */ +public class JavadocElementList { + + private static void help() { + System.err.println("java JavadocElementList <target-file> <module-source-path> <root-modules>"); + } + + public static void main(String... args) throws IOException { + if (args.length < 2) { + help(); + return ; + } + + JavaCompiler compiler = JavacTool.create(); + List<String> options = List.of("-source", Source.DEFAULT.name, + "-target", Target.DEFAULT.name, + "-proc:only", + "--system", "none", + "--module-source-path", args[1], + "--add-modules", Arrays.stream(args) + .skip(2) + .collect(Collectors.joining(","))); + List<String> jlObjectList = List.of("java.lang.Object"); + JavacTaskImpl task = (JavacTaskImpl) compiler.getTask(null, null, null, options, jlObjectList, null); + task.enter(); + Elements elements = task.getElements(); + Deque<String> todo = new ArrayDeque<>(); + Arrays.stream(args).skip(2).forEach(todo::add); + + todo.add("java.base"); + + Map<String, Set<String>> modulesAndExports = new TreeMap<>(); + + while (!todo.isEmpty()) { + String current = todo.removeFirst(); + + if (modulesAndExports.containsKey(current)) + continue; + + ModuleSymbol mod = (ModuleSymbol) elements.getModuleElement(current); + + if (mod == null) { + throw new IllegalStateException("Missing: " + current); + } + + //use the internal structure to avoid unnecesarily completing the symbol using the UsesProvidesVisitor: + modulesAndExports.put(mod.getQualifiedName().toString(), + mod.exports + .stream() + .filter((ExportsDirective ed) -> ed.getTargetModules() == null) + .map((ExportsDirective ed) -> ed.getPackage().getQualifiedName().toString()) + .collect(Collectors.toCollection(() -> new TreeSet<>())) + ); + for (ModuleElement.RequiresDirective rd : mod.requires) { + if (rd.isTransitive()) { + todo.offerLast(rd.getDependency().getQualifiedName().toString()); + } + } + } + + Path targetFile = Paths.get(args[0]); + + Files.createDirectories(targetFile.getParent()); + + try (Writer w = Files.newBufferedWriter(targetFile); + PrintWriter out = new PrintWriter(w)) { + for (Entry<String, Set<String>> moduleAndExports : modulesAndExports.entrySet()) { + out.write("module:" + moduleAndExports.getKey()); + out.write("\n"); + for (String pack : moduleAndExports.getValue()) { + out.write(pack); + out.write("\n"); + } + } + } + } + +} diff --git a/make/modules/java.base/gensrc/GensrcMisc.gmk b/make/modules/java.base/gensrc/GensrcMisc.gmk index cd12f2ab318..31d816d1e34 100644 --- a/make/modules/java.base/gensrc/GensrcMisc.gmk +++ b/make/modules/java.base/gensrc/GensrcMisc.gmk @@ -60,6 +60,12 @@ ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), ) CPP_FLAGS += -x c else ifeq ($(TOOLCHAIN_TYPE), microsoft) CPP_FLAGS += -nologo + + ifeq ($(OPENJDK_TARGET_CPU),aarch64) + # cl.exe does only recognize few file extensions as valid (ex: .c, .h, .cpp), so + # make sure *.java.template files are recognized as valid input files + CPP_FILEPREFIX = -Tc + endif endif # Generate a java source file from a template through the C preprocessor for the @@ -73,7 +79,7 @@ define generate-preproc-src $(call MakeDir, $(@D)) $(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_$(@F), \ ( $(NAWK) '/@@END_COPYRIGHT@@/{exit}1' $< && \ - $(CPP) $(CPP_FLAGS) $(SYSROOT_CFLAGS) $(CFLAGS_JDKLIB) $< \ + $(CPP) $(CPP_FLAGS) $(SYSROOT_CFLAGS) $(CFLAGS_JDKLIB) $(CPP_FILEPREFIX) $< \ 2> >($(GREP) -v '^$(<F)$$' >&2) \ | $(NAWK) '/@@START_HERE@@/,0' \ | $(SED) -e 's/@@START_HERE@@/\/\/ AUTOMATICALLY GENERATED FILE - DO NOT EDIT/' \ diff --git a/make/modules/jdk.javadoc/Gendata.gmk b/make/modules/jdk.javadoc/Gendata.gmk new file mode 100644 index 00000000000..5b4485808c7 --- /dev/null +++ b/make/modules/jdk.javadoc/Gendata.gmk @@ -0,0 +1,97 @@ +# +# Copyright (c) 2015, 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 +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +include JavaCompilation.gmk +include Modules.gmk + +################################################################################ + +# Hook to include the corresponding custom file, if present. +$(eval $(call IncludeCustomExtension, modules/jdk.javadoc/Gendata.gmk)) + +# This is needed to properly setup DOCS_MODULES. +$(eval $(call ReadImportMetaData)) + +JAVADOC_MODULES := $(DOCS_MODULES) + +# Get the complete module source path: +JAVADOC_MODULESOURCEPATH := $(call GetModuleSrcPath) + +CT_DATA_DESCRIPTION += $(TOPDIR)/make/data/symbols/symbols + +COMPILECREATESYMBOLS_ADD_EXPORTS := \ + --add-exports java.base/jdk.internal=java.compiler.interim,jdk.compiler.interim \ + --add-exports jdk.compiler.interim/com.sun.tools.javac.api=ALL-UNNAMED \ + --add-exports jdk.compiler.interim/com.sun.tools.javac.code=ALL-UNNAMED \ + --add-exports jdk.compiler.interim/com.sun.tools.javac.util=ALL-UNNAMED \ + --add-exports jdk.compiler.interim/com.sun.tools.javac.jvm=ALL-UNNAMED \ + # + +$(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \ + TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \ + SRC := $(TOPDIR)/make/langtools/src/classes \ + $(TOPDIR)/src/jdk.jdeps/share/classes, \ + INCLUDES := build/tools/symbolgenerator com/sun/tools/classfile, \ + BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols, \ + DISABLED_WARNINGS := options, \ + JAVAC_FLAGS := \ + $(INTERIM_LANGTOOLS_ARGS) \ + --patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \ + $(COMPILECREATESYMBOLS_ADD_EXPORTS), \ +)) + +$(SUPPORT_OUTPUTDIR)/javadoc-symbols/symbols: \ + $(COMPILE_CREATE_SYMBOLS) \ + $(wildcard $(TOPDIR)/make/data/symbols/*) \ + $(MODULE_INFOS) + $(RM) -r $(@D) + $(MKDIR) -p $(@D) + $(ECHO) Creating javadoc element list + $(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \ + $(COMPILECREATESYMBOLS_ADD_EXPORTS) \ + -classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols \ + build.tools.symbolgenerator.CreateSymbols \ + build-javadoc-data \ + $(CT_DATA_DESCRIPTION) \ + $(JDK_OUTPUTDIR)/modules/jdk.javadoc/jdk/javadoc/internal/doclets/toolkit/resources/releases \ + 11 + $(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \ + $(COMPILECREATESYMBOLS_ADD_EXPORTS) \ + -classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols \ + build.tools.symbolgenerator.JavadocElementList \ + $(JDK_OUTPUTDIR)/modules/jdk.javadoc/jdk/javadoc/internal/doclets/toolkit/resources/releases/element-list-$(JDK_SOURCE_TARGET_VERSION).txt \ + $(JAVADOC_MODULESOURCEPATH) \ + $(JAVADOC_MODULES) + $(TOUCH) $@ + +# Copy ct.sym to the modules libs dir +$(eval $(call SetupCopyFiles, COPY_TO_LIBS, \ + FILES := $(SUPPORT_OUTPUTDIR)/javadoc-symbols/*.txt, \ + DEST := $(JDK_OUTPUTDIR)/modules/jdk.javadoc/jdk/javadoc/internal/doclets/toolkit/resources/releases, \ +)) + +TARGETS += $(SUPPORT_OUTPUTDIR)/javadoc-symbols/symbols + +################################################################################ diff --git a/src/hotspot/cpu/aarch64/aarch64-asmtest.py b/src/hotspot/cpu/aarch64/aarch64-asmtest.py index f5a5c6b5aee..104104b09a9 100644 --- a/src/hotspot/cpu/aarch64/aarch64-asmtest.py +++ b/src/hotspot/cpu/aarch64/aarch64-asmtest.py @@ -13,6 +13,8 @@ class Register(Operand): def generate(self): self.number = random.randint(0, 30) + if self.number == 18: + self.number = 17 return self def astr(self, prefix): @@ -37,6 +39,8 @@ class GeneralRegisterOrZr(Register): def generate(self): self.number = random.randint(0, 31) + if self.number == 18: + self.number = 16 return self def astr(self, prefix = ""): @@ -54,6 +58,8 @@ def __str__(self): class GeneralRegisterOrSp(Register): def generate(self): self.number = random.randint(0, 31) + if self.number == 18: + self.number = 15 return self def astr(self, prefix = ""): @@ -1331,7 +1337,7 @@ def generate(kind, names): ["st1w", "__ sve_st1w(z0, __ S, p1, Address(r0, 7));", "st1w\t{z0.s}, p1, [x0, #7, MUL VL]"], ["st1b", "__ sve_st1b(z0, __ B, p2, Address(sp, r1));", "st1b\t{z0.b}, p2, [sp, x1]"], ["st1h", "__ sve_st1h(z0, __ H, p3, Address(sp, r8));", "st1h\t{z0.h}, p3, [sp, x8, LSL #1]"], - ["st1d", "__ sve_st1d(z0, __ D, p4, Address(r0, r18));", "st1d\t{z0.d}, p4, [x0, x18, LSL #3]"], + ["st1d", "__ sve_st1d(z0, __ D, p4, Address(r0, r17));", "st1d\t{z0.d}, p4, [x0, x17, LSL #3]"], ["ldr", "__ sve_ldr(z0, Address(sp));", "ldr\tz0, [sp]"], ["ldr", "__ sve_ldr(z31, Address(sp, -256));", "ldr\tz31, [sp, #-256, MUL VL]"], ["str", "__ sve_str(z8, Address(r8, 255));", "str\tz8, [x8, #255, MUL VL]"], diff --git a/src/hotspot/cpu/aarch64/aarch64.ad b/src/hotspot/cpu/aarch64/aarch64.ad index 6ae3490b312..9731cafc9ba 100644 --- a/src/hotspot/cpu/aarch64/aarch64.ad +++ b/src/hotspot/cpu/aarch64/aarch64.ad @@ -114,8 +114,8 @@ reg_def R16 ( SOC, SOC, Op_RegI, 16, r16->as_VMReg() ); reg_def R16_H ( SOC, SOC, Op_RegI, 16, r16->as_VMReg()->next()); reg_def R17 ( SOC, SOC, Op_RegI, 17, r17->as_VMReg() ); reg_def R17_H ( SOC, SOC, Op_RegI, 17, r17->as_VMReg()->next()); -reg_def R18 ( SOC, SOC, Op_RegI, 18, r18->as_VMReg() ); -reg_def R18_H ( SOC, SOC, Op_RegI, 18, r18->as_VMReg()->next()); +reg_def R18 ( SOC, SOC, Op_RegI, 18, r18_tls->as_VMReg() ); +reg_def R18_H ( SOC, SOC, Op_RegI, 18, r18_tls->as_VMReg()->next()); reg_def R19 ( SOC, SOE, Op_RegI, 19, r19->as_VMReg() ); reg_def R19_H ( SOC, SOE, Op_RegI, 19, r19->as_VMReg()->next()); reg_def R20 ( SOC, SOE, Op_RegI, 20, r20->as_VMReg() ); // caller esp @@ -247,8 +247,8 @@ reg_def R31_H ( NS, NS, Op_RegI, 31, r31_sp->as_VMReg()->next()); reg_def V7_N ( SOC, SOC, Op_RegF, 7, v7->as_VMReg()->next(6) ); reg_def V7_O ( SOC, SOC, Op_RegF, 7, v7->as_VMReg()->next(7) ); - reg_def V8 ( SOC, SOC, Op_RegF, 8, v8->as_VMReg() ); - reg_def V8_H ( SOC, SOC, Op_RegF, 8, v8->as_VMReg()->next() ); + reg_def V8 ( SOC, SOE, Op_RegF, 8, v8->as_VMReg() ); + reg_def V8_H ( SOC, SOE, Op_RegF, 8, v8->as_VMReg()->next() ); reg_def V8_J ( SOC, SOC, Op_RegF, 8, v8->as_VMReg()->next(2) ); reg_def V8_K ( SOC, SOC, Op_RegF, 8, v8->as_VMReg()->next(3) ); reg_def V8_L ( SOC, SOC, Op_RegF, 8, v8->as_VMReg()->next(4) ); @@ -256,8 +256,8 @@ reg_def R31_H ( NS, NS, Op_RegI, 31, r31_sp->as_VMReg()->next()); reg_def V8_N ( SOC, SOC, Op_RegF, 8, v8->as_VMReg()->next(6) ); reg_def V8_O ( SOC, SOC, Op_RegF, 8, v8->as_VMReg()->next(7) ); - reg_def V9 ( SOC, SOC, Op_RegF, 9, v9->as_VMReg() ); - reg_def V9_H ( SOC, SOC, Op_RegF, 9, v9->as_VMReg()->next() ); + reg_def V9 ( SOC, SOE, Op_RegF, 9, v9->as_VMReg() ); + reg_def V9_H ( SOC, SOE, Op_RegF, 9, v9->as_VMReg()->next() ); reg_def V9_J ( SOC, SOC, Op_RegF, 9, v9->as_VMReg()->next(2) ); reg_def V9_K ( SOC, SOC, Op_RegF, 9, v9->as_VMReg()->next(3) ); reg_def V9_L ( SOC, SOC, Op_RegF, 9, v9->as_VMReg()->next(4) ); @@ -265,8 +265,8 @@ reg_def R31_H ( NS, NS, Op_RegI, 31, r31_sp->as_VMReg()->next()); reg_def V9_N ( SOC, SOC, Op_RegF, 9, v9->as_VMReg()->next(6) ); reg_def V9_O ( SOC, SOC, Op_RegF, 9, v9->as_VMReg()->next(7) ); - reg_def V10 ( SOC, SOC, Op_RegF, 10, v10->as_VMReg() ); - reg_def V10_H ( SOC, SOC, Op_RegF, 10, v10->as_VMReg()->next() ); + reg_def V10 ( SOC, SOE, Op_RegF, 10, v10->as_VMReg() ); + reg_def V10_H ( SOC, SOE, Op_RegF, 10, v10->as_VMReg()->next() ); reg_def V10_J ( SOC, SOC, Op_RegF, 10, v10->as_VMReg()->next(2) ); reg_def V10_K ( SOC, SOC, Op_RegF, 10, v10->as_VMReg()->next(3) ); reg_def V10_L ( SOC, SOC, Op_RegF, 10, v10->as_VMReg()->next(4) ); @@ -274,8 +274,8 @@ reg_def R31_H ( NS, NS, Op_RegI, 31, r31_sp->as_VMReg()->next()); reg_def V10_N ( SOC, SOC, Op_RegF, 10, v10->as_VMReg()->next(6) ); reg_def V10_O ( SOC, SOC, Op_RegF, 10, v10->as_VMReg()->next(7) ); - reg_def V11 ( SOC, SOC, Op_RegF, 11, v11->as_VMReg() ); - reg_def V11_H ( SOC, SOC, Op_RegF, 11, v11->as_VMReg()->next() ); + reg_def V11 ( SOC, SOE, Op_RegF, 11, v11->as_VMReg() ); + reg_def V11_H ( SOC, SOE, Op_RegF, 11, v11->as_VMReg()->next() ); reg_def V11_J ( SOC, SOC, Op_RegF, 11, v11->as_VMReg()->next(2) ); reg_def V11_K ( SOC, SOC, Op_RegF, 11, v11->as_VMReg()->next(3) ); reg_def V11_L ( SOC, SOC, Op_RegF, 11, v11->as_VMReg()->next(4) ); @@ -283,8 +283,8 @@ reg_def R31_H ( NS, NS, Op_RegI, 31, r31_sp->as_VMReg()->next()); reg_def V11_N ( SOC, SOC, Op_RegF, 11, v11->as_VMReg()->next(6) ); reg_def V11_O ( SOC, SOC, Op_RegF, 11, v11->as_VMReg()->next(7) ); - reg_def V12 ( SOC, SOC, Op_RegF, 12, v12->as_VMReg() ); - reg_def V12_H ( SOC, SOC, Op_RegF, 12, v12->as_VMReg()->next() ); + reg_def V12 ( SOC, SOE, Op_RegF, 12, v12->as_VMReg() ); + reg_def V12_H ( SOC, SOE, Op_RegF, 12, v12->as_VMReg()->next() ); reg_def V12_J ( SOC, SOC, Op_RegF, 12, v12->as_VMReg()->next(2) ); reg_def V12_K ( SOC, SOC, Op_RegF, 12, v12->as_VMReg()->next(3) ); reg_def V12_L ( SOC, SOC, Op_RegF, 12, v12->as_VMReg()->next(4) ); @@ -292,8 +292,8 @@ reg_def R31_H ( NS, NS, Op_RegI, 31, r31_sp->as_VMReg()->next()); reg_def V12_N ( SOC, SOC, Op_RegF, 12, v12->as_VMReg()->next(6) ); reg_def V12_O ( SOC, SOC, Op_RegF, 12, v12->as_VMReg()->next(7) ); - reg_def V13 ( SOC, SOC, Op_RegF, 13, v13->as_VMReg() ); - reg_def V13_H ( SOC, SOC, Op_RegF, 13, v13->as_VMReg()->next() ); + reg_def V13 ( SOC, SOE, Op_RegF, 13, v13->as_VMReg() ); + reg_def V13_H ( SOC, SOE, Op_RegF, 13, v13->as_VMReg()->next() ); reg_def V13_J ( SOC, SOC, Op_RegF, 13, v13->as_VMReg()->next(2) ); reg_def V13_K ( SOC, SOC, Op_RegF, 13, v13->as_VMReg()->next(3) ); reg_def V13_L ( SOC, SOC, Op_RegF, 13, v13->as_VMReg()->next(4) ); @@ -301,8 +301,8 @@ reg_def R31_H ( NS, NS, Op_RegI, 31, r31_sp->as_VMReg()->next()); reg_def V13_N ( SOC, SOC, Op_RegF, 13, v13->as_VMReg()->next(6) ); reg_def V13_O ( SOC, SOC, Op_RegF, 13, v13->as_VMReg()->next(7) ); - reg_def V14 ( SOC, SOC, Op_RegF, 14, v14->as_VMReg() ); - reg_def V14_H ( SOC, SOC, Op_RegF, 14, v14->as_VMReg()->next() ); + reg_def V14 ( SOC, SOE, Op_RegF, 14, v14->as_VMReg() ); + reg_def V14_H ( SOC, SOE, Op_RegF, 14, v14->as_VMReg()->next() ); reg_def V14_J ( SOC, SOC, Op_RegF, 14, v14->as_VMReg()->next(2) ); reg_def V14_K ( SOC, SOC, Op_RegF, 14, v14->as_VMReg()->next(3) ); reg_def V14_L ( SOC, SOC, Op_RegF, 14, v14->as_VMReg()->next(4) ); @@ -310,8 +310,8 @@ reg_def R31_H ( NS, NS, Op_RegI, 31, r31_sp->as_VMReg()->next()); reg_def V14_N ( SOC, SOC, Op_RegF, 14, v14->as_VMReg()->next(6) ); reg_def V14_O ( SOC, SOC, Op_RegF, 14, v14->as_VMReg()->next(7) ); - reg_def V15 ( SOC, SOC, Op_RegF, 15, v15->as_VMReg() ); - reg_def V15_H ( SOC, SOC, Op_RegF, 15, v15->as_VMReg()->next() ); + reg_def V15 ( SOC, SOE, Op_RegF, 15, v15->as_VMReg() ); + reg_def V15_H ( SOC, SOE, Op_RegF, 15, v15->as_VMReg()->next() ); reg_def V15_J ( SOC, SOC, Op_RegF, 15, v15->as_VMReg()->next(2) ); reg_def V15_K ( SOC, SOC, Op_RegF, 15, v15->as_VMReg()->next(3) ); reg_def V15_L ( SOC, SOC, Op_RegF, 15, v15->as_VMReg()->next(4) ); @@ -716,6 +716,10 @@ reg_class any_reg %{ // Class for non-allocatable 32 bit registers reg_class non_allocatable_reg32( +#ifdef R18_RESERVED + // See comment in register_aarch64.hpp + R18, // tls on Windows +#endif R28, // thread R30, // lr R31 // sp @@ -723,6 +727,10 @@ reg_class non_allocatable_reg32( // Class for non-allocatable 64 bit registers reg_class non_allocatable_reg( +#ifdef R18_RESERVED + // See comment in register_aarch64.hpp + R18, R18_H, // tls on Windows, platform register on macOS +#endif R28, R28_H, // thread R30, R30_H, // lr R31, R31_H // sp @@ -6327,7 +6335,7 @@ pipeline %{ attributes %{ // ARM instructions are of fixed length fixed_size_instructions; // Fixed size instructions TODO does - max_instructions_per_bundle = 2; // A53 = 2, A57 = 4 + max_instructions_per_bundle = 4; // A53 = 2, A57 = 4 // ARM instructions come in 32-bit word units instruction_unit_size = 4; // An instruction is 4 bytes long instruction_fetch_unit_size = 64; // The processor fetches one line diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp index ccd9d46d626..29f63ba69a4 100644 --- a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp @@ -101,7 +101,7 @@ void entry(CodeBuffer *cb) { __ adds(r28, r15, r8, Assembler::ASR, 39); // adds x28, x15, x8, ASR #39 __ subs(r7, r28, r30, Assembler::ASR, 57); // subs x7, x28, x30, ASR #57 __ addw(r9, r22, r27, Assembler::ASR, 15); // add w9, w22, w27, ASR #15 - __ subw(r3, r13, r18, Assembler::ASR, 30); // sub w3, w13, w18, ASR #30 + __ subw(r3, r13, r17, Assembler::ASR, 30); // sub w3, w13, w17, ASR #30 __ addsw(r14, r26, r8, Assembler::ASR, 17); // adds w14, w26, w8, ASR #17 __ subsw(r0, r22, r12, Assembler::ASR, 21); // subs w0, w22, w12, ASR #21 __ andr(r0, r15, r26, Assembler::LSL, 20); // and x0, x15, x26, LSL #20 @@ -109,8 +109,8 @@ void entry(CodeBuffer *cb) { __ eor(r24, r13, r2, Assembler::LSL, 32); // eor x24, x13, x2, LSL #32 __ ands(r28, r3, r17, Assembler::ASR, 35); // ands x28, x3, x17, ASR #35 __ andw(r25, r16, r29, Assembler::LSR, 18); // and w25, w16, w29, LSR #18 - __ orrw(r13, r18, r11, Assembler::LSR, 9); // orr w13, w18, w11, LSR #9 - __ eorw(r5, r5, r18, Assembler::LSR, 15); // eor w5, w5, w18, LSR #15 + __ orrw(r13, r17, r11, Assembler::LSR, 9); // orr w13, w17, w11, LSR #9 + __ eorw(r5, r5, r17, Assembler::LSR, 15); // eor w5, w5, w17, LSR #15 __ andsw(r2, r23, r27, Assembler::ASR, 26); // ands w2, w23, w27, ASR #26 __ bic(r27, r28, r16, Assembler::LSR, 45); // bic x27, x28, x16, LSR #45 __ orn(r8, r25, r26, Assembler::ASR, 37); // orn x8, x25, x26, ASR #37 @@ -135,7 +135,7 @@ void entry(CodeBuffer *cb) { __ andw(r6, r11, 4294049777ull); // and w6, w11, #0xfff1fff1 __ orrw(r28, r5, 4294966791ull); // orr w28, w5, #0xfffffe07 __ eorw(r1, r20, 134217216ull); // eor w1, w20, #0x7fffe00 - __ andsw(r7, r18, 1048576ull); // ands w7, w18, #0x100000 + __ andsw(r7, r17, 1048576ull); // ands w7, w17, #0x100000 __ andr(r14, r12, 9223372036854775808ull); // and x14, x12, #0x8000000000000000 __ orr(r9, r11, 562675075514368ull); // orr x9, x11, #0x1ffc000000000 __ eor(r17, r0, 18014398509481728ull); // eor x17, x0, #0x3fffffffffff00 @@ -283,7 +283,7 @@ void entry(CodeBuffer *cb) { // LoadStoreExclusiveOp __ stxrw(r22, r27, r19); // stxr w22, w27, [x19] __ stlxrw(r11, r16, r6); // stlxr w11, w16, [x6] - __ ldxrw(r18, r0); // ldxr w18, [x0] + __ ldxrw(r17, r0); // ldxr w17, [x0] __ ldaxrw(r4, r10); // ldaxr w4, [x10] __ stlrw(r24, r22); // stlr w24, [x22] __ ldarw(r10, r19); // ldar w10, [x19] @@ -311,7 +311,7 @@ void entry(CodeBuffer *cb) { __ stlxp(r12, r16, r13, r15); // stlxp w12, x16, x13, [x15] // LoadStoreExclusiveOp - __ ldxpw(r18, r21, r13); // ldxp w18, w21, [x13] + __ ldxpw(r17, r21, r13); // ldxp w17, w21, [x13] __ ldaxpw(r11, r30, r8); // ldaxp w11, w30, [x8] __ stxpw(r24, r13, r11, r1); // stxp w24, w13, w11, [x1] __ stlxpw(r26, r21, r27, r13); // stlxp w26, w21, w27, [x13] @@ -324,7 +324,7 @@ void entry(CodeBuffer *cb) { __ strh(r2, Address(r25, -50)); // strh w2, [x25, -50] __ ldr(r4, Address(r2, -241)); // ldr x4, [x2, -241] __ ldrw(r30, Address(r20, -31)); // ldr w30, [x20, -31] - __ ldrb(r18, Address(r23, -23)); // ldrb w18, [x23, -23] + __ ldrb(r17, Address(r23, -23)); // ldrb w17, [x23, -23] __ ldrh(r29, Address(r26, -1)); // ldrh w29, [x26, -1] __ ldrsb(r1, Address(r9, 6)); // ldrsb x1, [x9, 6] __ ldrsh(r11, Address(r12, 19)); // ldrsh x11, [x12, 19] @@ -375,14 +375,14 @@ void entry(CodeBuffer *cb) { // base_plus_reg // LoadStoreOp - __ str(r10, Address(r18, r21, Address::sxtw(3))); // str x10, [x18, w21, sxtw #3] + __ str(r10, Address(r17, r21, Address::sxtw(3))); // str x10, [x17, w21, sxtw #3] __ strw(r4, Address(r13, r22, Address::sxtw(2))); // str w4, [x13, w22, sxtw #2] __ strb(r13, Address(r0, r19, Address::uxtw(0))); // strb w13, [x0, w19, uxtw #0] __ strh(r12, Address(r27, r6, Address::sxtw(0))); // strh w12, [x27, w6, sxtw #0] __ ldr(r0, Address(r8, r16, Address::lsl(0))); // ldr x0, [x8, x16, lsl #0] __ ldrw(r0, Address(r4, r26, Address::sxtx(0))); // ldr w0, [x4, x26, sxtx #0] __ ldrb(r14, Address(r25, r5, Address::sxtw(0))); // ldrb w14, [x25, w5, sxtw #0] - __ ldrh(r9, Address(r4, r18, Address::uxtw(0))); // ldrh w9, [x4, w18, uxtw #0] + __ ldrh(r9, Address(r4, r17, Address::uxtw(0))); // ldrh w9, [x4, w17, uxtw #0] __ ldrsb(r27, Address(r4, r7, Address::lsl(0))); // ldrsb x27, [x4, x7, lsl #0] __ ldrsh(r15, Address(r17, r30, Address::sxtw(0))); // ldrsh x15, [x17, w30, sxtw #0] __ ldrshw(r16, Address(r0, r22, Address::sxtw(0))); // ldrsh w16, [x0, w22, sxtw #0] @@ -439,7 +439,7 @@ void entry(CodeBuffer *cb) { __ sbcs(r1, r24, r3); // sbcs x1, x24, x3 // AddSubExtendedOp - __ addw(r18, r24, r20, ext::uxtb, 2); // add w18, w24, w20, uxtb #2 + __ addw(r17, r24, r20, ext::uxtb, 2); // add w17, w24, w20, uxtb #2 __ addsw(r13, r28, r10, ext::uxth, 1); // adds w13, w28, w10, uxth #1 __ sub(r15, r16, r2, ext::sxth, 2); // sub x15, x16, x2, sxth #2 __ subsw(r29, r13, r13, ext::uxth, 2); // subs w29, w13, w13, uxth #2 @@ -450,8 +450,8 @@ void entry(CodeBuffer *cb) { // ConditionalCompareOp __ ccmnw(r0, r13, 14u, Assembler::MI); // ccmn w0, w13, #14, MI - __ ccmpw(r22, r18, 6u, Assembler::CC); // ccmp w22, w18, #6, CC - __ ccmn(r18, r30, 14u, Assembler::VS); // ccmn x18, x30, #14, VS + __ ccmpw(r22, r17, 6u, Assembler::CC); // ccmp w22, w17, #6, CC + __ ccmn(r17, r30, 14u, Assembler::VS); // ccmn x17, x30, #14, VS __ ccmp(r10, r19, 12u, Assembler::HI); // ccmp x10, x19, #12, HI // ConditionalCompareImmedOp @@ -476,7 +476,7 @@ void entry(CodeBuffer *cb) { __ revw(r29, r30); // rev w29, w30 __ clzw(r25, r21); // clz w25, w21 __ clsw(r4, r0); // cls w4, w0 - __ rbit(r18, r21); // rbit x18, x21 + __ rbit(r17, r21); // rbit x17, x21 __ rev16(r29, r16); // rev16 x29, x16 __ rev32(r21, r20); // rev32 x21, x20 __ rev(r6, r19); // rev x6, x19 @@ -486,16 +486,16 @@ void entry(CodeBuffer *cb) { // ThreeRegOp __ udivw(r11, r24, r0); // udiv w11, w24, w0 __ sdivw(r27, r25, r14); // sdiv w27, w25, w14 - __ lslvw(r3, r14, r18); // lslv w3, w14, w18 + __ lslvw(r3, r14, r17); // lslv w3, w14, w17 __ lsrvw(r7, r15, r24); // lsrv w7, w15, w24 __ asrvw(r28, r17, r25); // asrv w28, w17, w25 __ rorvw(r2, r26, r28); // rorv w2, w26, w28 __ udiv(r5, r25, r26); // udiv x5, x25, x26 - __ sdiv(r27, r16, r18); // sdiv x27, x16, x18 + __ sdiv(r27, r16, r17); // sdiv x27, x16, x17 __ lslv(r6, r21, r12); // lslv x6, x21, x12 __ lsrv(r0, r4, r12); // lsrv x0, x4, x12 __ asrv(r27, r17, r28); // asrv x27, x17, x28 - __ rorv(r28, r2, r18); // rorv x28, x2, x18 + __ rorv(r28, r2, r17); // rorv x28, x2, x17 __ umulh(r10, r15, r14); // umulh x10, x15, x14 __ smulh(r14, r3, r25); // smulh x14, x3, x25 @@ -540,7 +540,7 @@ void entry(CodeBuffer *cb) { __ fmovd(v24, v11); // fmov d24, d11 __ fabsd(v7, v1); // fabs d7, d1 __ fnegd(v11, v0); // fneg d11, d0 - __ fsqrtd(v3, v18); // fsqrt d3, d18 + __ fsqrtd(v3, v17); // fsqrt d3, d17 __ fcvtd(v28, v6); // fcvt s28, d6 // FloatConvertOp @@ -552,9 +552,9 @@ void entry(CodeBuffer *cb) { __ scvtfs(v25, r13); // scvtf s25, x13 __ scvtfwd(v11, r23); // scvtf d11, w23 __ scvtfd(v19, r8); // scvtf d19, x8 - __ fmovs(r18, v21); // fmov w18, s21 + __ fmovs(r17, v21); // fmov w17, s21 __ fmovd(r25, v20); // fmov x25, d20 - __ fmovs(v19, r18); // fmov s19, w18 + __ fmovs(v19, r17); // fmov s19, w17 __ fmovd(v2, r29); // fmov d2, x29 // TwoRegFloatOp @@ -598,11 +598,11 @@ void entry(CodeBuffer *cb) { __ ld1r(v29, __ T8B, Address(r17)); // ld1r {v29.8B}, [x17] __ ld1r(v24, __ T4S, Address(__ post(r23, 4))); // ld1r {v24.4S}, [x23], 4 __ ld1r(v10, __ T1D, Address(__ post(r5, r25))); // ld1r {v10.1D}, [x5], x25 - __ ld2(v18, v19, __ T2D, Address(r10)); // ld2 {v18.2D, v19.2D}, [x10] + __ ld2(v17, v18, __ T2D, Address(r10)); // ld2 {v17.2D, v18.2D}, [x10] __ ld2(v12, v13, __ T4H, Address(__ post(r15, 16))); // ld2 {v12.4H, v13.4H}, [x15], 16 - __ ld2r(v25, v26, __ T16B, Address(r18)); // ld2r {v25.16B, v26.16B}, [x18] + __ ld2r(v25, v26, __ T16B, Address(r17)); // ld2r {v25.16B, v26.16B}, [x17] __ ld2r(v1, v2, __ T2S, Address(__ post(r30, 8))); // ld2r {v1.2S, v2.2S}, [x30], 8 - __ ld2r(v16, v17, __ T2D, Address(__ post(r18, r9))); // ld2r {v16.2D, v17.2D}, [x18], x9 + __ ld2r(v16, v17, __ T2D, Address(__ post(r17, r9))); // ld2r {v16.2D, v17.2D}, [x17], x9 __ ld3(v25, v26, v27, __ T4S, Address(__ post(r12, r2))); // ld3 {v25.4S, v26.4S, v27.4S}, [x12], x2 __ ld3(v26, v27, v28, __ T2S, Address(r19)); // ld3 {v26.2S, v27.2S, v28.2S}, [x19] __ ld3r(v15, v16, v17, __ T8H, Address(r21)); // ld3r {v15.8H, v16.8H, v17.8H}, [x21] @@ -610,7 +610,7 @@ void entry(CodeBuffer *cb) { __ ld3r(v14, v15, v16, __ T1D, Address(__ post(r28, r29))); // ld3r {v14.1D, v15.1D, v16.1D}, [x28], x29 __ ld4(v17, v18, v19, v20, __ T8H, Address(__ post(r29, 64))); // ld4 {v17.8H, v18.8H, v19.8H, v20.8H}, [x29], 64 __ ld4(v27, v28, v29, v30, __ T8B, Address(__ post(r7, r0))); // ld4 {v27.8B, v28.8B, v29.8B, v30.8B}, [x7], x0 - __ ld4r(v24, v25, v26, v27, __ T8B, Address(r18)); // ld4r {v24.8B, v25.8B, v26.8B, v27.8B}, [x18] + __ ld4r(v24, v25, v26, v27, __ T8B, Address(r17)); // ld4r {v24.8B, v25.8B, v26.8B, v27.8B}, [x17] __ ld4r(v0, v1, v2, v3, __ T4H, Address(__ post(r26, 8))); // ld4r {v0.4H, v1.4H, v2.4H, v3.4H}, [x26], 8 __ ld4r(v12, v13, v14, v15, __ T2S, Address(__ post(r25, r2))); // ld4r {v12.2S, v13.2S, v14.2S, v15.2S}, [x25], x2 @@ -665,7 +665,7 @@ void entry(CodeBuffer *cb) { __ sve_st1w(z0, __ S, p1, Address(r0, 7)); // st1w {z0.s}, p1, [x0, #7, MUL VL] __ sve_st1b(z0, __ B, p2, Address(sp, r1)); // st1b {z0.b}, p2, [sp, x1] __ sve_st1h(z0, __ H, p3, Address(sp, r8)); // st1h {z0.h}, p3, [sp, x8, LSL #1] - __ sve_st1d(z0, __ D, p4, Address(r0, r18)); // st1d {z0.d}, p4, [x0, x18, LSL #3] + __ sve_st1d(z0, __ D, p4, Address(r0, r17)); // st1d {z0.d}, p4, [x0, x17, LSL #3] __ sve_ldr(z0, Address(sp)); // ldr z0, [sp] __ sve_ldr(z31, Address(sp, -256)); // ldr z31, [sp, #-256, MUL VL] __ sve_str(z8, Address(r8, 255)); // str z8, [x8, #255, MUL VL] @@ -716,7 +716,7 @@ void entry(CodeBuffer *cb) { __ ldumax(Assembler::xword, r11, r20, r12); // ldumax x11, x20, [x12] // LSEOp - __ swpa(Assembler::xword, r18, r22, r16); // swpa x18, x22, [x16] + __ swpa(Assembler::xword, r16, r22, r16); // swpa x16, x22, [x16] __ ldadda(Assembler::xword, r21, r24, r26); // ldadda x21, x24, [x26] __ ldbica(Assembler::xword, r6, r6, r16); // ldclra x6, x6, [x16] __ ldeora(Assembler::xword, r16, r25, r16); // ldeora x16, x25, [x16] @@ -734,14 +734,14 @@ void entry(CodeBuffer *cb) { __ ldorral(Assembler::xword, zr, r0, r19); // ldsetal xzr, x0, [x19] __ ldsminal(Assembler::xword, r29, r26, r9); // ldsminal x29, x26, [x9] __ ldsmaxal(Assembler::xword, r26, r12, r15); // ldsmaxal x26, x12, [x15] - __ lduminal(Assembler::xword, r11, r11, r18); // lduminal x11, x11, [x18] + __ lduminal(Assembler::xword, r11, r11, r15); // lduminal x11, x11, [x15] __ ldumaxal(Assembler::xword, r25, r22, r24); // ldumaxal x25, x22, [x24] // LSEOp __ swpl(Assembler::xword, r0, r17, r11); // swpl x0, x17, [x11] __ ldaddl(Assembler::xword, r6, r29, r6); // ldaddl x6, x29, [x6] __ ldbicl(Assembler::xword, r5, r5, r21); // ldclrl x5, x5, [x21] - __ ldeorl(Assembler::xword, r19, r16, r18); // ldeorl x19, x16, [x18] + __ ldeorl(Assembler::xword, r19, r16, r15); // ldeorl x19, x16, [x15] __ ldorrl(Assembler::xword, r30, r27, r28); // ldsetl x30, x27, [x28] __ ldsminl(Assembler::xword, r1, r28, r1); // ldsminl x1, x28, [x1] __ ldsmaxl(Assembler::xword, r20, r29, r16); // ldsmaxl x20, x29, [x16] @@ -767,7 +767,7 @@ void entry(CodeBuffer *cb) { __ ldorra(Assembler::word, r24, r4, r3); // ldseta w24, w4, [x3] __ ldsmina(Assembler::word, r12, zr, r28); // ldsmina w12, wzr, [x28] __ ldsmaxa(Assembler::word, r10, r26, r2); // ldsmaxa w10, w26, [x2] - __ ldumina(Assembler::word, r12, r18, sp); // ldumina w12, w18, [sp] + __ ldumina(Assembler::word, r12, r16, sp); // ldumina w12, w16, [sp] __ ldumaxa(Assembler::word, r1, r13, r29); // ldumaxa w1, w13, [x29] // LSEOp @@ -777,7 +777,7 @@ void entry(CodeBuffer *cb) { __ ldeoral(Assembler::word, r1, r26, r28); // ldeoral w1, w26, [x28] __ ldorral(Assembler::word, r4, r30, r4); // ldsetal w4, w30, [x4] __ ldsminal(Assembler::word, r6, r30, r26); // ldsminal w6, w30, [x26] - __ ldsmaxal(Assembler::word, r18, r9, r8); // ldsmaxal w18, w9, [x8] + __ ldsmaxal(Assembler::word, r16, r9, r8); // ldsmaxal w16, w9, [x8] __ lduminal(Assembler::word, r12, r0, r20); // lduminal w12, w0, [x20] __ ldumaxal(Assembler::word, r1, r24, r2); // ldumaxal w1, w24, [x2] @@ -785,7 +785,7 @@ void entry(CodeBuffer *cb) { __ swpl(Assembler::word, r0, r9, r24); // swpl w0, w9, [x24] __ ldaddl(Assembler::word, r26, r16, r30); // ldaddl w26, w16, [x30] __ ldbicl(Assembler::word, r3, r10, r23); // ldclrl w3, w10, [x23] - __ ldeorl(Assembler::word, r10, r4, r18); // ldeorl w10, w4, [x18] + __ ldeorl(Assembler::word, r10, r4, r15); // ldeorl w10, w4, [x15] __ ldorrl(Assembler::word, r2, r11, r8); // ldsetl w2, w11, [x8] __ ldsminl(Assembler::word, r10, r15, r17); // ldsminl w10, w15, [x17] __ ldsmaxl(Assembler::word, r2, r10, r12); // ldsmaxl w2, w10, [x12] @@ -817,19 +817,19 @@ void entry(CodeBuffer *cb) { __ sve_fmin(z19, __ D, p2, z4); // fmin z19.d, p2/m, z19.d, z4.d __ sve_fmul(z17, __ S, p4, z22); // fmul z17.s, p4/m, z17.s, z22.s __ sve_fneg(z28, __ D, p3, z21); // fneg z28.d, p3/m, z21.d - __ sve_frintm(z18, __ S, p5, z2); // frintm z18.s, p5/m, z2.s + __ sve_frintm(z17, __ S, p5, z2); // frintm z17.s, p5/m, z2.s __ sve_frintn(z6, __ S, p3, z15); // frintn z6.s, p3/m, z15.s __ sve_frintp(z12, __ D, p5, z1); // frintp z12.d, p5/m, z1.d - __ sve_fsqrt(z18, __ S, p1, z17); // fsqrt z18.s, p1/m, z17.s + __ sve_fsqrt(z17, __ S, p1, z17); // fsqrt z17.s, p1/m, z17.s __ sve_fsub(z15, __ S, p5, z13); // fsub z15.s, p5/m, z15.s, z13.s __ sve_fmla(z20, __ D, p7, z27, z11); // fmla z20.d, p7/m, z27.d, z11.d __ sve_fmls(z3, __ D, p0, z30, z23); // fmls z3.d, p0/m, z30.d, z23.d __ sve_fnmla(z17, __ S, p2, z27, z26); // fnmla z17.s, p2/m, z27.s, z26.s __ sve_fnmls(z6, __ D, p5, z22, z30); // fnmls z6.d, p5/m, z22.d, z30.d - __ sve_mla(z2, __ H, p7, z26, z18); // mla z2.h, p7/m, z26.h, z18.h + __ sve_mla(z2, __ H, p7, z26, z17); // mla z2.h, p7/m, z26.h, z17.h __ sve_mls(z22, __ B, p4, z2, z17); // mls z22.b, p4/m, z2.b, z17.b __ sve_and(z24, z25, z22); // and z24.d, z25.d, z22.d - __ sve_eor(z18, z12, z3); // eor z18.d, z12.d, z3.d + __ sve_eor(z17, z12, z3); // eor z17.d, z12.d, z3.d __ sve_orr(z29, z28, z16); // orr z29.d, z28.d, z16.d // SVEReductionOp @@ -857,7 +857,7 @@ Disassembly of section .text: 8: ab889dfc adds x28, x15, x8, asr #39 c: eb9ee787 subs x7, x28, x30, asr #57 10: 0b9b3ec9 add w9, w22, w27, asr #15 - 14: 4b9279a3 sub w3, w13, w18, asr #30 + 14: 4b9179a3 sub w3, w13, w17, asr #30 18: 2b88474e adds w14, w26, w8, asr #17 1c: 6b8c56c0 subs w0, w22, w12, asr #21 20: 8a1a51e0 and x0, x15, x26, lsl #20 @@ -865,8 +865,8 @@ Disassembly of section .text: 28: ca0281b8 eor x24, x13, x2, lsl #32 2c: ea918c7c ands x28, x3, x17, asr #35 30: 0a5d4a19 and w25, w16, w29, lsr #18 - 34: 2a4b264d orr w13, w18, w11, lsr #9 - 38: 4a523ca5 eor w5, w5, w18, lsr #15 + 34: 2a4b262d orr w13, w17, w11, lsr #9 + 38: 4a513ca5 eor w5, w5, w17, lsr #15 3c: 6a9b6ae2 ands w2, w23, w27, asr #26 40: 8a70b79b bic x27, x28, x16, lsr #45 44: aaba9728 orn x8, x25, x26, asr #37 @@ -887,7 +887,7 @@ Disassembly of section .text: 80: 120cb166 and w6, w11, #0xfff1fff1 84: 321764bc orr w28, w5, #0xfffffe07 88: 52174681 eor w1, w20, #0x7fffe00 - 8c: 720c0247 ands w7, w18, #0x100000 + 8c: 720c0227 ands w7, w17, #0x100000 90: 9241018e and x14, x12, #0x8000000000000000 94: b25a2969 orr x9, x11, #0x1ffc000000000 98: d278b411 eor x17, x0, #0x3fffffffffff00 @@ -1009,7 +1009,7 @@ Disassembly of section .text: 268: c8dffe95 ldar x21, [x20] 26c: 88167e7b stxr w22, w27, [x19] 270: 880bfcd0 stlxr w11, w16, [x6] - 274: 885f7c12 ldxr w18, [x0] + 274: 885f7c11 ldxr w17, [x0] 278: 885ffd44 ldaxr w4, [x10] 27c: 889ffed8 stlr w24, [x22] 280: 88dffe6a ldar w10, [x19] @@ -1029,7 +1029,7 @@ Disassembly of section .text: 2b8: c87fcc5e ldaxp x30, x19, [x2] 2bc: c8220417 stxp w2, x23, x1, [x0] 2c0: c82cb5f0 stlxp w12, x16, x13, [x15] - 2c4: 887f55b2 ldxp w18, w21, [x13] + 2c4: 887f55b1 ldxp w17, w21, [x13] 2c8: 887ff90b ldaxp w11, w30, [x8] 2cc: 88382c2d stxp w24, w13, w11, [x1] 2d0: 883aedb5 stlxp w26, w21, w27, [x13] @@ -1039,7 +1039,7 @@ Disassembly of section .text: 2e0: 781ce322 sturh w2, [x25, #-50] 2e4: f850f044 ldur x4, [x2, #-241] 2e8: b85e129e ldur w30, [x20, #-31] - 2ec: 385e92f2 ldurb w18, [x23, #-23] + 2ec: 385e92f1 ldurb w17, [x23, #-23] 2f0: 785ff35d ldurh w29, [x26, #-1] 2f4: 39801921 ldrsb x1, [x9, #6] 2f8: 7881318b ldursh x11, [x12, #19] @@ -1081,14 +1081,14 @@ Disassembly of section .text: 388: bc4155f9 ldr s25, [x15], #21 38c: fc05a6ee str d14, [x23], #90 390: bc1df408 str s8, [x0], #-33 - 394: f835da4a str x10, [x18, w21, sxtw #3] + 394: f835da2a str x10, [x17, w21, sxtw #3] 398: b836d9a4 str w4, [x13, w22, sxtw #2] 39c: 3833580d strb w13, [x0, w19, uxtw #0] 3a0: 7826cb6c strh w12, [x27, w6, sxtw] 3a4: f8706900 ldr x0, [x8, x16] 3a8: b87ae880 ldr w0, [x4, x26, sxtx] 3ac: 3865db2e ldrb w14, [x25, w5, sxtw #0] - 3b0: 78724889 ldrh w9, [x4, w18, uxtw] + 3b0: 78714889 ldrh w9, [x4, w17, uxtw] 3b4: 38a7789b ldrsb x27, [x4, x7, lsl #0] 3b8: 78beca2f ldrsh x15, [x17, w30, sxtw] 3bc: 78f6c810 ldrsh w16, [x0, w22, sxtw] @@ -1127,7 +1127,7 @@ Disassembly of section .text: 440: ba1e030c adcs x12, x24, x30 444: da0f0320 sbc x0, x25, x15 448: fa030301 sbcs x1, x24, x3 - 44c: 0b340b12 add w18, w24, w20, uxtb #2 + 44c: 0b340b11 add w17, w24, w20, uxtb #2 450: 2b2a278d adds w13, w28, w10, uxth #1 454: cb22aa0f sub x15, x16, w2, sxth #2 458: 6b2d29bd subs w29, w13, w13, uxth #2 @@ -1136,8 +1136,8 @@ Disassembly of section .text: 464: cb21c8ee sub x14, x7, w1, sxtw #2 468: eb3ba47d subs x29, x3, w27, sxth #1 46c: 3a4d400e ccmn w0, w13, #0xe, mi // mi = first - 470: 7a5232c6 ccmp w22, w18, #0x6, cc // cc = lo, ul, last - 474: ba5e624e ccmn x18, x30, #0xe, vs + 470: 7a5132c6 ccmp w22, w17, #0x6, cc // cc = lo, ul, last + 474: ba5e622e ccmn x17, x30, #0xe, vs 478: fa53814c ccmp x10, x19, #0xc, hi // hi = pmore 47c: 3a52d8c2 ccmn w6, #0x12, #0x2, le 480: 7a4d8924 ccmp w9, #0xd, #0x4, hi // hi = pmore @@ -1156,7 +1156,7 @@ Disassembly of section .text: 4b4: 5ac00bdd rev w29, w30 4b8: 5ac012b9 clz w25, w21 4bc: 5ac01404 cls w4, w0 - 4c0: dac002b2 rbit x18, x21 + 4c0: dac002b1 rbit x17, x21 4c4: dac0061d rev16 x29, x16 4c8: dac00a95 rev32 x21, x20 4cc: dac00e66 rev x6, x19 @@ -1164,16 +1164,16 @@ Disassembly of section .text: 4d4: dac01675 cls x21, x19 4d8: 1ac00b0b udiv w11, w24, w0 4dc: 1ace0f3b sdiv w27, w25, w14 - 4e0: 1ad221c3 lsl w3, w14, w18 + 4e0: 1ad121c3 lsl w3, w14, w17 4e4: 1ad825e7 lsr w7, w15, w24 4e8: 1ad92a3c asr w28, w17, w25 4ec: 1adc2f42 ror w2, w26, w28 4f0: 9ada0b25 udiv x5, x25, x26 - 4f4: 9ad20e1b sdiv x27, x16, x18 + 4f4: 9ad10e1b sdiv x27, x16, x17 4f8: 9acc22a6 lsl x6, x21, x12 4fc: 9acc2480 lsr x0, x4, x12 500: 9adc2a3b asr x27, x17, x28 - 504: 9ad22c5c ror x28, x2, x18 + 504: 9ad12c5c ror x28, x2, x17 508: 9bce7dea umulh x10, x15, x14 50c: 9b597c6e smulh x14, x3, x25 510: 1b0e166f madd w15, w19, w14, w5 @@ -1210,7 +1210,7 @@ Disassembly of section .text: 58c: 1e604178 fmov d24, d11 590: 1e60c027 fabs d7, d1 594: 1e61400b fneg d11, d0 - 598: 1e61c243 fsqrt d3, d18 + 598: 1e61c223 fsqrt d3, d17 59c: 1e6240dc fcvt s28, d6 5a0: 1e3800d6 fcvtzs w22, s6 5a4: 9e380360 fcvtzs x0, s27 @@ -1220,9 +1220,9 @@ Disassembly of section .text: 5b4: 9e2201b9 scvtf s25, x13 5b8: 1e6202eb scvtf d11, w23 5bc: 9e620113 scvtf d19, x8 - 5c0: 1e2602b2 fmov w18, s21 + 5c0: 1e2602b1 fmov w17, s21 5c4: 9e660299 fmov x25, d20 - 5c8: 1e270253 fmov s19, w18 + 5c8: 1e270233 fmov s19, w17 5cc: 9e6703a2 fmov d2, x29 5d0: 1e2822c0 fcmp s22, s8 5d4: 1e7322a0 fcmp d21, d19 @@ -1254,11 +1254,11 @@ Disassembly of section .text: 63c: 0d40c23d ld1r {v29.8b}, [x17] 640: 4ddfcaf8 ld1r {v24.4s}, [x23], #4 644: 0dd9ccaa ld1r {v10.1d}, [x5], x25 - 648: 4c408d52 ld2 {v18.2d, v19.2d}, [x10] + 648: 4c408d51 ld2 {v17.2d, v18.2d}, [x10] 64c: 0cdf85ec ld2 {v12.4h, v13.4h}, [x15], #16 - 650: 4d60c259 ld2r {v25.16b, v26.16b}, [x18] + 650: 4d60c239 ld2r {v25.16b, v26.16b}, [x17] 654: 0dffcbc1 ld2r {v1.2s, v2.2s}, [x30], #8 - 658: 4de9ce50 ld2r {v16.2d, v17.2d}, [x18], x9 + 658: 4de9ce30 ld2r {v16.2d, v17.2d}, [x17], x9 65c: 4cc24999 ld3 {v25.4s-v27.4s}, [x12], x2 660: 0c404a7a ld3 {v26.2s-v28.2s}, [x19] 664: 4d40e6af ld3r {v15.8h-v17.8h}, [x21] @@ -1266,7 +1266,7 @@ Disassembly of section .text: 66c: 0dddef8e ld3r {v14.1d-v16.1d}, [x28], x29 670: 4cdf07b1 ld4 {v17.8h-v20.8h}, [x29], #64 674: 0cc000fb ld4 {v27.8b-v30.8b}, [x7], x0 - 678: 0d60e258 ld4r {v24.8b-v27.8b}, [x18] + 678: 0d60e238 ld4r {v24.8b-v27.8b}, [x17] 67c: 0dffe740 ld4r {v0.4h-v3.4h}, [x26], #8 680: 0de2eb2c ld4r {v12.2s-v15.2s}, [x25], x2 684: ce648376 sha512h q22, q27, v4.2d @@ -1317,7 +1317,7 @@ Disassembly of section .text: 738: e547e400 st1w {z0.s}, p1, [x0, #7, mul vl] 73c: e4014be0 st1b {z0.b}, p2, [sp, x1] 740: e4a84fe0 st1h {z0.h}, p3, [sp, x8, lsl #1] - 744: e5f25000 st1d {z0.d}, p4, [x0, x18, lsl #3] + 744: e5f15000 st1d {z0.d}, p4, [x0, x17, lsl #3] 748: 858043e0 ldr z0, [sp] 74c: 85a043ff ldr z31, [sp, #-256, mul vl] 750: e59f5d08 str z8, [x8, #255, mul vl] @@ -1362,7 +1362,7 @@ Disassembly of section .text: 7ec: f82f41ee ldsmax x15, x14, [x15] 7f0: f82973b9 ldumin x9, x25, [x29] 7f4: f82b6194 ldumax x11, x20, [x12] - 7f8: f8b28216 swpa x18, x22, [x16] + 7f8: f8b08216 swpa x16, x22, [x16] 7fc: f8b50358 ldadda x21, x24, [x26] 800: f8a61206 ldclra x6, x6, [x16] 804: f8b02219 ldeora x16, x25, [x16] @@ -1378,12 +1378,12 @@ Disassembly of section .text: 82c: f8ff3260 ldsetal xzr, x0, [x19] 830: f8fd513a ldsminal x29, x26, [x9] 834: f8fa41ec ldsmaxal x26, x12, [x15] - 838: f8eb724b lduminal x11, x11, [x18] + 838: f8eb71eb lduminal x11, x11, [x15] 83c: f8f96316 ldumaxal x25, x22, [x24] 840: f8608171 swpl x0, x17, [x11] 844: f86600dd ldaddl x6, x29, [x6] 848: f86512a5 ldclrl x5, x5, [x21] - 84c: f8732250 ldeorl x19, x16, [x18] + 84c: f87321f0 ldeorl x19, x16, [x15] 850: f87e339b ldsetl x30, x27, [x28] 854: f861503c ldsminl x1, x28, [x1] 858: f874421d ldsmaxl x20, x29, [x16] @@ -1405,7 +1405,7 @@ Disassembly of section .text: 898: b8b83064 ldseta w24, w4, [x3] 89c: b8ac539f ldsmina w12, wzr, [x28] 8a0: b8aa405a ldsmaxa w10, w26, [x2] - 8a4: b8ac73f2 ldumina w12, w18, [sp] + 8a4: b8ac73f0 ldumina w12, w16, [sp] 8a8: b8a163ad ldumaxa w1, w13, [x29] 8ac: b8e08193 swpal w0, w19, [x12] 8b0: b8f101b6 ldaddal w17, w22, [x13] @@ -1413,13 +1413,13 @@ Disassembly of section .text: 8b8: b8e1239a ldeoral w1, w26, [x28] 8bc: b8e4309e ldsetal w4, w30, [x4] 8c0: b8e6535e ldsminal w6, w30, [x26] - 8c4: b8f24109 ldsmaxal w18, w9, [x8] + 8c4: b8f04109 ldsmaxal w16, w9, [x8] 8c8: b8ec7280 lduminal w12, w0, [x20] 8cc: b8e16058 ldumaxal w1, w24, [x2] 8d0: b8608309 swpl w0, w9, [x24] 8d4: b87a03d0 ldaddl w26, w16, [x30] 8d8: b86312ea ldclrl w3, w10, [x23] - 8dc: b86a2244 ldeorl w10, w4, [x18] + 8dc: b86a21e4 ldeorl w10, w4, [x15] 8e0: b862310b ldsetl w2, w11, [x8] 8e4: b86a522f ldsminl w10, w15, [x17] 8e8: b862418a ldsmaxl w2, w10, [x12] @@ -1449,19 +1449,19 @@ Disassembly of section .text: 948: 65c78893 fmin z19.d, p2/m, z19.d, z4.d 94c: 658292d1 fmul z17.s, p4/m, z17.s, z22.s 950: 04ddaebc fneg z28.d, p3/m, z21.d - 954: 6582b452 frintm z18.s, p5/m, z2.s + 954: 6582b451 frintm z17.s, p5/m, z2.s 958: 6580ade6 frintn z6.s, p3/m, z15.s 95c: 65c1b42c frintp z12.d, p5/m, z1.d - 960: 658da632 fsqrt z18.s, p1/m, z17.s + 960: 658da631 fsqrt z17.s, p1/m, z17.s 964: 658195af fsub z15.s, p5/m, z15.s, z13.s 968: 65eb1f74 fmla z20.d, p7/m, z27.d, z11.d 96c: 65f723c3 fmls z3.d, p0/m, z30.d, z23.d 970: 65ba4b71 fnmla z17.s, p2/m, z27.s, z26.s 974: 65fe76c6 fnmls z6.d, p5/m, z22.d, z30.d - 978: 04525f42 mla z2.h, p7/m, z26.h, z18.h + 978: 04515f42 mla z2.h, p7/m, z26.h, z17.h 97c: 04117056 mls z22.b, p4/m, z2.b, z17.b 980: 04363338 and z24.d, z25.d, z22.d - 984: 04a33192 eor z18.d, z12.d, z3.d + 984: 04a33191 eor z17.d, z12.d, z3.d 988: 0470339d orr z29.d, z28.d, z16.d 98c: 049a2b86 andv s6, p2, z28.s 990: 045824e7 orv h7, p1, z7.h @@ -1477,14 +1477,14 @@ Disassembly of section .text: static const unsigned int insns[] = { 0x8b0d82fa, 0xcb49970c, 0xab889dfc, 0xeb9ee787, - 0x0b9b3ec9, 0x4b9279a3, 0x2b88474e, 0x6b8c56c0, + 0x0b9b3ec9, 0x4b9179a3, 0x2b88474e, 0x6b8c56c0, 0x8a1a51e0, 0xaa11f4ba, 0xca0281b8, 0xea918c7c, - 0x0a5d4a19, 0x2a4b264d, 0x4a523ca5, 0x6a9b6ae2, + 0x0a5d4a19, 0x2a4b262d, 0x4a513ca5, 0x6a9b6ae2, 0x8a70b79b, 0xaaba9728, 0xca6dfe3d, 0xea627f1c, 0x0aa70f53, 0x2aaa0f06, 0x4a6176a4, 0x6a604eb0, 0x1105ed91, 0x3100583e, 0x5101f8bd, 0x710f0306, 0x9101a1a0, 0xb10a5cc8, 0xd10810aa, 0xf10fd061, - 0x120cb166, 0x321764bc, 0x52174681, 0x720c0247, + 0x120cb166, 0x321764bc, 0x52174681, 0x720c0227, 0x9241018e, 0xb25a2969, 0xd278b411, 0xf26aad01, 0x14000000, 0x17ffffd7, 0x14000242, 0x94000000, 0x97ffffd4, 0x9400023f, 0x3400000a, 0x34fffa2a, @@ -1515,14 +1515,14 @@ Disassembly of section .text: 0xd5033fdf, 0xd5033e9f, 0xd50332bf, 0xd61f0200, 0xd63f0280, 0xc80a7d1b, 0xc800fea1, 0xc85f7fb1, 0xc85fff9d, 0xc89ffee1, 0xc8dffe95, 0x88167e7b, - 0x880bfcd0, 0x885f7c12, 0x885ffd44, 0x889ffed8, + 0x880bfcd0, 0x885f7c11, 0x885ffd44, 0x889ffed8, 0x88dffe6a, 0x48017fc5, 0x4808fe2c, 0x485f7dc9, 0x485ffc27, 0x489ffe05, 0x48dffd82, 0x080a7c6c, 0x081cff4e, 0x085f7d5e, 0x085ffeae, 0x089ffd2d, 0x08dfff76, 0xc87f4d7c, 0xc87fcc5e, 0xc8220417, - 0xc82cb5f0, 0x887f55b2, 0x887ff90b, 0x88382c2d, + 0xc82cb5f0, 0x887f55b1, 0x887ff90b, 0x88382c2d, 0x883aedb5, 0xf819928b, 0xb803e21c, 0x381f713b, - 0x781ce322, 0xf850f044, 0xb85e129e, 0x385e92f2, + 0x781ce322, 0xf850f044, 0xb85e129e, 0x385e92f1, 0x785ff35d, 0x39801921, 0x7881318b, 0x78dce02b, 0xb8829313, 0xfc45f318, 0xbc5d50af, 0xfc001375, 0xbc1951b7, 0xf8008c0b, 0xb801dc03, 0x38009dcb, @@ -1533,9 +1533,9 @@ Disassembly of section .text: 0x7801b506, 0xf853654e, 0xb85d74b0, 0x384095c2, 0x785ec5bc, 0x389e15a9, 0x789dc703, 0x78c06474, 0xb89ff667, 0xfc57e51e, 0xbc4155f9, 0xfc05a6ee, - 0xbc1df408, 0xf835da4a, 0xb836d9a4, 0x3833580d, + 0xbc1df408, 0xf835da2a, 0xb836d9a4, 0x3833580d, 0x7826cb6c, 0xf8706900, 0xb87ae880, 0x3865db2e, - 0x78724889, 0x38a7789b, 0x78beca2f, 0x78f6c810, + 0x78714889, 0x38a7789b, 0x78beca2f, 0x78f6c810, 0xb8bef956, 0xfc6afabd, 0xbc734963, 0xfc3d5b8d, 0xbc25fbb7, 0xf9189d05, 0xb91ecb1d, 0x39187a33, 0x791f226d, 0xf95aa2f3, 0xb9587bb7, 0x395f7176, @@ -1544,19 +1544,19 @@ Disassembly of section .text: 0xbd1b1869, 0x58002cfb, 0x1800000b, 0xf8945060, 0xd8000000, 0xf8ae6ba0, 0xf99a0080, 0x1a070035, 0x3a0700a8, 0x5a0e0367, 0x7a11009b, 0x9a000380, - 0xba1e030c, 0xda0f0320, 0xfa030301, 0x0b340b12, + 0xba1e030c, 0xda0f0320, 0xfa030301, 0x0b340b11, 0x2b2a278d, 0xcb22aa0f, 0x6b2d29bd, 0x8b2cce8c, 0xab2b877e, 0xcb21c8ee, 0xeb3ba47d, 0x3a4d400e, - 0x7a5232c6, 0xba5e624e, 0xfa53814c, 0x3a52d8c2, + 0x7a5132c6, 0xba5e622e, 0xfa53814c, 0x3a52d8c2, 0x7a4d8924, 0xba4b3aab, 0xfa4d7882, 0x1a96804c, 0x1a912618, 0x5a90b0e6, 0x5a96976b, 0x9a9db06a, 0x9a9b374c, 0xda95c14f, 0xda89c6fe, 0x5ac0015e, 0x5ac005fd, 0x5ac00bdd, 0x5ac012b9, 0x5ac01404, - 0xdac002b2, 0xdac0061d, 0xdac00a95, 0xdac00e66, + 0xdac002b1, 0xdac0061d, 0xdac00a95, 0xdac00e66, 0xdac0107e, 0xdac01675, 0x1ac00b0b, 0x1ace0f3b, - 0x1ad221c3, 0x1ad825e7, 0x1ad92a3c, 0x1adc2f42, - 0x9ada0b25, 0x9ad20e1b, 0x9acc22a6, 0x9acc2480, - 0x9adc2a3b, 0x9ad22c5c, 0x9bce7dea, 0x9b597c6e, + 0x1ad121c3, 0x1ad825e7, 0x1ad92a3c, 0x1adc2f42, + 0x9ada0b25, 0x9ad10e1b, 0x9acc22a6, 0x9acc2480, + 0x9adc2a3b, 0x9ad12c5c, 0x9bce7dea, 0x9b597c6e, 0x1b0e166f, 0x1b1ae490, 0x9b023044, 0x9b089e3d, 0x9b391083, 0x9b24c73a, 0x9bb15f40, 0x9bbcc6af, 0x1e23095b, 0x1e3918e0, 0x1e2f28c9, 0x1e2a39fd, @@ -1565,10 +1565,10 @@ Disassembly of section .text: 0x1f2935da, 0x1f2574ea, 0x1f4b306f, 0x1f5ec7cf, 0x1f6f3e93, 0x1f6226a9, 0x1e2040fb, 0x1e20c3dd, 0x1e214031, 0x1e21c0c2, 0x1e22c06a, 0x1e604178, - 0x1e60c027, 0x1e61400b, 0x1e61c243, 0x1e6240dc, + 0x1e60c027, 0x1e61400b, 0x1e61c223, 0x1e6240dc, 0x1e3800d6, 0x9e380360, 0x1e78005a, 0x9e7800e5, 0x1e22017c, 0x9e2201b9, 0x1e6202eb, 0x9e620113, - 0x1e2602b2, 0x9e660299, 0x1e270253, 0x9e6703a2, + 0x1e2602b1, 0x9e660299, 0x1e270233, 0x9e6703a2, 0x1e2822c0, 0x1e7322a0, 0x1e202288, 0x1e602168, 0x293c19f4, 0x2966387b, 0x69762971, 0xa9041dc7, 0xa9475c0c, 0x29b61ccd, 0x29ee405e, 0x69ee0744, @@ -1576,10 +1576,10 @@ Disassembly of section .text: 0x68f61831, 0xa8b352ad, 0xa8c56d5e, 0x28024565, 0x2874134e, 0xa8027597, 0xa87b1aa0, 0x0c40734f, 0x4cdfa177, 0x0cc76ee8, 0x4cdf2733, 0x0d40c23d, - 0x4ddfcaf8, 0x0dd9ccaa, 0x4c408d52, 0x0cdf85ec, - 0x4d60c259, 0x0dffcbc1, 0x4de9ce50, 0x4cc24999, + 0x4ddfcaf8, 0x0dd9ccaa, 0x4c408d51, 0x0cdf85ec, + 0x4d60c239, 0x0dffcbc1, 0x4de9ce30, 0x4cc24999, 0x0c404a7a, 0x4d40e6af, 0x4ddfe9b9, 0x0dddef8e, - 0x4cdf07b1, 0x0cc000fb, 0x0d60e258, 0x0dffe740, + 0x4cdf07b1, 0x0cc000fb, 0x0d60e238, 0x0dffe740, 0x0de2eb2c, 0xce648376, 0xce6184c7, 0xcec081fa, 0xce6d89a2, 0xba5fd3e3, 0x3a5f03e5, 0xfa411be4, 0x7a42cbe2, 0x93df03ff, 0xc820ffff, 0x8822fc7f, @@ -1592,7 +1592,7 @@ Disassembly of section .text: 0x25b8efe2, 0x25f8f007, 0xa400a3e0, 0xa4a8a7ea, 0xa547a814, 0xa4084ffe, 0xa55c53e0, 0xa5e1540b, 0xe400fbf6, 0xe408ffff, 0xe547e400, 0xe4014be0, - 0xe4a84fe0, 0xe5f25000, 0x858043e0, 0x85a043ff, + 0xe4a84fe0, 0xe5f15000, 0x858043e0, 0x85a043ff, 0xe59f5d08, 0x1e601000, 0x1e603000, 0x1e621000, 0x1e623000, 0x1e641000, 0x1e643000, 0x1e661000, 0x1e663000, 0x1e681000, 0x1e683000, 0x1e6a1000, @@ -1603,21 +1603,21 @@ Disassembly of section .text: 0x1e7a3000, 0x1e7c1000, 0x1e7c3000, 0x1e7e1000, 0x1e7e3000, 0xf8388098, 0xf8340010, 0xf8241175, 0xf83e22d0, 0xf82432ef, 0xf83a5186, 0xf82f41ee, - 0xf82973b9, 0xf82b6194, 0xf8b28216, 0xf8b50358, + 0xf82973b9, 0xf82b6194, 0xf8b08216, 0xf8b50358, 0xf8a61206, 0xf8b02219, 0xf8bc3218, 0xf8ba514f, 0xf8ad428e, 0xf8a173d7, 0xf8ae60c2, 0xf8e38328, 0xf8e003db, 0xf8e513c5, 0xf8eb2019, 0xf8ff3260, - 0xf8fd513a, 0xf8fa41ec, 0xf8eb724b, 0xf8f96316, - 0xf8608171, 0xf86600dd, 0xf86512a5, 0xf8732250, + 0xf8fd513a, 0xf8fa41ec, 0xf8eb71eb, 0xf8f96316, + 0xf8608171, 0xf86600dd, 0xf86512a5, 0xf87321f0, 0xf87e339b, 0xf861503c, 0xf874421d, 0xf86d73aa, 0xf87d62d3, 0xb82a83e4, 0xb83503e8, 0xb833138a, 0xb82220b9, 0xb82332c8, 0xb83350ad, 0xb83d42b8, 0xb83a7078, 0xb83862fa, 0xb8af8075, 0xb8b80328, 0xb8b41230, 0xb8a22001, 0xb8b83064, 0xb8ac539f, - 0xb8aa405a, 0xb8ac73f2, 0xb8a163ad, 0xb8e08193, + 0xb8aa405a, 0xb8ac73f0, 0xb8a163ad, 0xb8e08193, 0xb8f101b6, 0xb8fc13fe, 0xb8e1239a, 0xb8e4309e, - 0xb8e6535e, 0xb8f24109, 0xb8ec7280, 0xb8e16058, - 0xb8608309, 0xb87a03d0, 0xb86312ea, 0xb86a2244, + 0xb8e6535e, 0xb8f04109, 0xb8ec7280, 0xb8e16058, + 0xb8608309, 0xb87a03d0, 0xb86312ea, 0xb86a21e4, 0xb862310b, 0xb86a522f, 0xb862418a, 0xb86c71af, 0xb8626287, 0x042401f9, 0x04b10564, 0x65ca0230, 0x65d90996, 0x65ca05dc, 0x0456afc1, 0x0400044f, @@ -1625,10 +1625,10 @@ Disassembly of section .text: 0x04901774, 0x0417b89a, 0x041eb3d6, 0x04480b6b, 0x048a17dc, 0x048105be, 0x04dcb35e, 0x65808d6f, 0x65cd9e06, 0x65869cfb, 0x65c78893, 0x658292d1, - 0x04ddaebc, 0x6582b452, 0x6580ade6, 0x65c1b42c, - 0x658da632, 0x658195af, 0x65eb1f74, 0x65f723c3, - 0x65ba4b71, 0x65fe76c6, 0x04525f42, 0x04117056, - 0x04363338, 0x04a33192, 0x0470339d, 0x049a2b86, + 0x04ddaebc, 0x6582b451, 0x6580ade6, 0x65c1b42c, + 0x658da631, 0x658195af, 0x65eb1f74, 0x65f723c3, + 0x65ba4b71, 0x65fe76c6, 0x04515f42, 0x04117056, + 0x04363338, 0x04a33191, 0x0470339d, 0x049a2b86, 0x045824e7, 0x04193509, 0x040837db, 0x044a221a, 0x65c73903, 0x65c63b55, 0x65982096, 0x04412071, @@ -1979,3 +1979,7 @@ static float unpack(unsigned value) { ival = fp_immediate_for_encoding(value, 0); return val; } + +address Assembler::locate_next_instruction(address inst) { + return inst + Assembler::instruction_size; +} diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp index 19a3ced1435..711d9db07e5 100644 --- a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp @@ -28,6 +28,19 @@ #include "asm/register.hpp" +#ifdef __GNUC__ + +// __nop needs volatile so that compiler doesn't optimize it away +#define NOP() asm volatile ("nop"); + +#elif defined(_MSC_VER) + +// Use MSVC instrinsic: https://docs.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsics?view=vs-2019#I +#define NOP() __nop(); + +#endif + + // definitions of various symbolic names for machine registers // First intercalls between C and Java which use 8 general registers @@ -401,10 +414,8 @@ class Address { : _base(r), _index(noreg), _offset(o), _mode(base_plus_offset), _target(0) { } Address(Register r, unsigned long long o) : _base(r), _index(noreg), _offset(o), _mode(base_plus_offset), _target(0) { } -#ifdef ASSERT Address(Register r, ByteSize disp) - : _base(r), _index(noreg), _offset(in_bytes(disp)), _mode(base_plus_offset), _target(0) { } -#endif + : Address(r, in_bytes(disp)) { } Address(Register r, Register r1, extend ext = lsl()) : _base(r), _index(r1), _offset(0), _mode(base_plus_offset_reg), _ext(ext), _target(0) { } @@ -642,7 +653,7 @@ class Assembler : public AbstractAssembler { void emit_long(jint x) { if ((uintptr_t)pc() == asm_bp) - asm volatile ("nop"); + NOP(); AbstractAssembler::emit_int32(x); } #else @@ -682,6 +693,8 @@ class Assembler : public AbstractAssembler { return Address(Post(base, idx)); } + static address locate_next_instruction(address inst); + Instruction_aarch64* current; void set_current(Instruction_aarch64* i) { current = i; } @@ -1557,6 +1570,11 @@ class Assembler : public AbstractAssembler { #undef INSN +#ifdef _WIN64 +// In MSVC, `mvn` is defined as a macro and it affects compilation +#undef mvn +#endif + // Aliases for short forms of orn void mvn(Register Rd, Register Rm, enum shift_kind kind = LSL, unsigned shift = 0) { diff --git a/src/hotspot/cpu/aarch64/c1_Defs_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_Defs_aarch64.hpp index fae09ac1a8d..4df27e7fde4 100644 --- a/src/hotspot/cpu/aarch64/c1_Defs_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c1_Defs_aarch64.hpp @@ -44,13 +44,13 @@ enum { pd_nof_cpu_regs_frame_map = RegisterImpl::number_of_registers, // number of registers used during code emission pd_nof_fpu_regs_frame_map = FloatRegisterImpl::number_of_registers, // number of registers used during code emission - pd_nof_caller_save_cpu_regs_frame_map = 19 - 2, // number of registers killed by calls + pd_nof_caller_save_cpu_regs_frame_map = 19 - 2 /* rscratch1 and rscratch2 */ R18_RESERVED_ONLY(- 1), // number of registers killed by calls pd_nof_caller_save_fpu_regs_frame_map = 32, // number of registers killed by calls - pd_first_callee_saved_reg = 19 - 2, - pd_last_callee_saved_reg = 26 - 2, + pd_first_callee_saved_reg = 19 - 2 /* rscratch1 and rscratch2 */ R18_RESERVED_ONLY(- 1), + pd_last_callee_saved_reg = 26 - 2 /* rscratch1 and rscratch2 */ R18_RESERVED_ONLY(- 1), - pd_last_allocatable_cpu_reg = 16, + pd_last_allocatable_cpu_reg = 16 R18_RESERVED_ONLY(- 1), pd_nof_cpu_regs_reg_alloc = pd_last_allocatable_cpu_reg + 1, // number of registers that are visible to register allocator @@ -60,9 +60,9 @@ enum { pd_nof_fpu_regs_linearscan = pd_nof_fpu_regs_frame_map, // number of registers visible to linear scan pd_nof_xmm_regs_linearscan = 0, // don't have vector registers pd_first_cpu_reg = 0, - pd_last_cpu_reg = 16, + pd_last_cpu_reg = 16 R18_RESERVED_ONLY(- 1), pd_first_byte_reg = 0, - pd_last_byte_reg = 16, + pd_last_byte_reg = 16 R18_RESERVED_ONLY(- 1), pd_first_fpu_reg = pd_nof_cpu_regs_frame_map, pd_last_fpu_reg = pd_first_fpu_reg + 31, diff --git a/src/hotspot/cpu/aarch64/c1_FpuStackSim_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_FpuStackSim_aarch64.cpp index 3e213003947..c50da1c8beb 100644 --- a/src/hotspot/cpu/aarch64/c1_FpuStackSim_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/c1_FpuStackSim_aarch64.cpp @@ -28,3 +28,4 @@ //-------------------------------------------------------- // No FPU stack on AARCH64 +#include "precompiled.hpp" diff --git a/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.cpp index 4257e3445ea..42ff62a986c 100644 --- a/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/c1_FrameMap_aarch64.cpp @@ -181,7 +181,10 @@ void FrameMap::initialize() { map_register(i, r15); r15_opr = LIR_OprFact::single_cpu(i); i++; map_register(i, r16); r16_opr = LIR_OprFact::single_cpu(i); i++; map_register(i, r17); r17_opr = LIR_OprFact::single_cpu(i); i++; - map_register(i, r18); r18_opr = LIR_OprFact::single_cpu(i); i++; +#ifndef R18_RESERVED + // See comment in register_aarch64.hpp + map_register(i, r18_tls); r18_opr = LIR_OprFact::single_cpu(i); i++; +#endif map_register(i, r19); r19_opr = LIR_OprFact::single_cpu(i); i++; map_register(i, r20); r20_opr = LIR_OprFact::single_cpu(i); i++; map_register(i, r21); r21_opr = LIR_OprFact::single_cpu(i); i++; @@ -199,6 +202,11 @@ void FrameMap::initialize() { map_register(i, r8); r8_opr = LIR_OprFact::single_cpu(i); i++; // rscratch1 map_register(i, r9); r9_opr = LIR_OprFact::single_cpu(i); i++; // rscratch2 +#ifdef R18_RESERVED + // See comment in register_aarch64.hpp + map_register(i, r18_tls); r18_opr = LIR_OprFact::single_cpu(i); i++; +#endif + rscratch1_opr = r8_opr; rscratch2_opr = r9_opr; rscratch1_long_opr = LIR_OprFact::double_cpu(r8_opr->cpu_regnr(), r8_opr->cpu_regnr()); @@ -227,7 +235,10 @@ void FrameMap::initialize() { _caller_save_cpu_regs[13] = r15_opr; _caller_save_cpu_regs[14] = r16_opr; _caller_save_cpu_regs[15] = r17_opr; +#ifndef R18_RESERVED + // See comment in register_aarch64.hpp _caller_save_cpu_regs[16] = r18_opr; +#endif for (int i = 0; i < 8; i++) { _caller_save_fpu_regs[i] = LIR_OprFact::single_fpu(i); @@ -253,7 +264,7 @@ void FrameMap::initialize() { r15_oop_opr = as_oop_opr(r15); r16_oop_opr = as_oop_opr(r16); r17_oop_opr = as_oop_opr(r17); - r18_oop_opr = as_oop_opr(r18); + r18_oop_opr = as_oop_opr(r18_tls); r19_oop_opr = as_oop_opr(r19); r20_oop_opr = as_oop_opr(r20); r21_oop_opr = as_oop_opr(r21); diff --git a/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp index e37c1ebceae..3665a61d2fa 100644 --- a/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp @@ -553,84 +553,39 @@ OopMapSet* Runtime1::generate_patching(StubAssembler* sasm, address target) { __ bind(L); } #endif - __ reset_last_Java_frame(true); - __ maybe_isb(); - - // check for pending exceptions - { Label L; - __ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset())); - __ cbz(rscratch1, L); - // exception pending => remove activation and forward to exception handler - - { Label L1; - __ cbnz(r0, L1); // have we deoptimized? - __ far_jump(RuntimeAddress(Runtime1::entry_for(Runtime1::forward_exception_id))); - __ bind(L1); - } - - // the deopt blob expects exceptions in the special fields of - // JavaThread, so copy and clear pending exception. - - // load and clear pending exception - __ ldr(r0, Address(rthread, Thread::pending_exception_offset())); - __ str(zr, Address(rthread, Thread::pending_exception_offset())); - - // check that there is really a valid exception - __ verify_not_null_oop(r0); - // load throwing pc: this is the return address of the stub - __ mov(r3, lr); + __ reset_last_Java_frame(true); #ifdef ASSERT - // check that fields in JavaThread for exception oop and issuing pc are empty - Label oop_empty; - __ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset())); - __ cbz(rscratch1, oop_empty); - __ stop("exception oop must be empty"); - __ bind(oop_empty); - - Label pc_empty; - __ ldr(rscratch1, Address(rthread, JavaThread::exception_pc_offset())); - __ cbz(rscratch1, pc_empty); - __ stop("exception pc must be empty"); - __ bind(pc_empty); -#endif - - // store exception oop and throwing pc to JavaThread - __ str(r0, Address(rthread, JavaThread::exception_oop_offset())); - __ str(r3, Address(rthread, JavaThread::exception_pc_offset())); - - restore_live_registers(sasm); - - __ leave(); - - // Forward the exception directly to deopt blob. We can blow no - // registers and must leave throwing pc on the stack. A patch may - // have values live in registers so the entry point with the - // exception in tls. - __ far_jump(RuntimeAddress(deopt_blob->unpack_with_exception_in_tls())); - - __ bind(L); - } - - - // Runtime will return true if the nmethod has been deoptimized during - // the patching process. In that case we must do a deopt reexecute instead. + // check that fields in JavaThread for exception oop and issuing pc are empty + Label oop_empty; + __ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset())); + __ cbz(rscratch1, oop_empty); + __ stop("exception oop must be empty"); + __ bind(oop_empty); - Label cont; + Label pc_empty; + __ ldr(rscratch1, Address(rthread, JavaThread::exception_pc_offset())); + __ cbz(rscratch1, pc_empty); + __ stop("exception pc must be empty"); + __ bind(pc_empty); +#endif - __ cbz(r0, cont); // have we deoptimized? + // Runtime will return true if the nmethod has been deoptimized, this is the + // expected scenario and anything else is an error. Note that we maintain a + // check on the result purely as a defensive measure. + Label no_deopt; + __ cbz(r0, no_deopt); // Have we deoptimized? - // Will reexecute. Proper return address is already on the stack we just restore - // registers, pop all of our frame but the return address and jump to the deopt blob + // Perform a re-execute. The proper return address is already on the stack, + // we just need to restore registers, pop all of our frame but the return + // address and jump to the deopt blob. restore_live_registers(sasm); __ leave(); __ far_jump(RuntimeAddress(deopt_blob->unpack_with_reexecution())); - __ bind(cont); - restore_live_registers(sasm); - __ leave(); - __ ret(lr); + __ bind(no_deopt); + __ stop("deopt not performed"); return oop_maps; } diff --git a/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp index 5b3bc55035c..24b32187b7c 100644 --- a/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp @@ -543,7 +543,7 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2, Register cnt1, Register cnt2, Register result, Register tmp1, Register tmp2, FloatRegister vtmp1, FloatRegister vtmp2, FloatRegister vtmp3, int ae) { Label DONE, SHORT_LOOP, SHORT_STRING, SHORT_LAST, TAIL, STUB, - DIFFERENCE, NEXT_WORD, SHORT_LOOP_TAIL, SHORT_LAST2, SHORT_LAST_INIT, + DIFF, NEXT_WORD, SHORT_LOOP_TAIL, SHORT_LAST2, SHORT_LAST_INIT, SHORT_LOOP_START, TAIL_CHECK; bool isLL = ae == StrIntrinsicNode::LL; @@ -634,7 +634,7 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2, adds(cnt2, cnt2, isUL ? 4 : 8); br(GE, TAIL); eor(rscratch2, tmp1, tmp2); - cbnz(rscratch2, DIFFERENCE); + cbnz(rscratch2, DIFF); // main loop bind(NEXT_WORD); if (str1_isL == str2_isL) { @@ -660,10 +660,10 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2, eor(rscratch2, tmp1, tmp2); cbz(rscratch2, NEXT_WORD); - b(DIFFERENCE); + b(DIFF); bind(TAIL); eor(rscratch2, tmp1, tmp2); - cbnz(rscratch2, DIFFERENCE); + cbnz(rscratch2, DIFF); // Last longword. In the case where length == 4 we compare the // same longword twice, but that's still faster than another // conditional branch. @@ -687,7 +687,7 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2, // Find the first different characters in the longwords and // compute their difference. - bind(DIFFERENCE); + bind(DIFF); rev(rscratch2, rscratch2); clz(rscratch2, rscratch2); andr(rscratch2, rscratch2, isLL ? -8 : -16); diff --git a/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp index 44d73a46f43..b3530509b03 100644 --- a/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved. + * Copyright (c) 2018, 2020, 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 @@ -48,7 +48,16 @@ void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) { newval = tmp2; } - ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), addr, cmpval, newval, /*acquire*/ false, /*release*/ true, /*is_cae*/ false, result); + ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), addr, cmpval, newval, /*acquire*/ true, /*release*/ true, /*is_cae*/ false, result); + + if (is_c1_or_interpreter_only()) { + // The membar here is necessary to prevent reordering between the + // release store in the CAS above and a subsequent volatile load. + // However for tiered compilation C1 inserts a full barrier before + // volatile loads which means we don't need an additional barrier + // here (see LIRGenerator::volatile_field_load()). + __ membar(__ AnyAny); + } } #undef __ diff --git a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp index dd54bf8d6ed..c2d53df4f67 100644 --- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp @@ -459,39 +459,10 @@ void ShenandoahBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler // from-space, or it refers to the to-space version of an object that // is being evacuated out of from-space. // -// By default, this operation implements sequential consistency and the -// value held in the result register following execution of the -// generated code sequence is 0 to indicate failure of CAS, non-zero -// to indicate success. Arguments support variations on this theme: -// -// acquire: Allow relaxation of the memory ordering on CAS from -// sequential consistency. This can be useful when -// sequential consistency is not required, such as when -// another sequentially consistent operation is already -// present in the execution stream. If acquire, successful -// execution has the side effect of assuring that memory -// values updated by other threads and "released" will be -// visible to any read operations perfomed by this thread -// which follow this operation in program order. This is a -// special optimization that should not be enabled by default. -// release: Allow relaxation of the memory ordering on CAS from -// sequential consistency. This can be useful when -// sequential consistency is not required, such as when -// another sequentially consistent operation is already -// present in the execution stream. If release, successful -// completion of this operation has the side effect of -// assuring that all writes to memory performed by this -// thread that precede this operation in program order are -// visible to all other threads that subsequently "acquire" -// before reading the respective memory values. This is a -// special optimization that should not be enabled by default. -// is_cae: This turns CAS (compare and swap) into CAE (compare and -// exchange). This HotSpot convention is that CAE makes -// available to the caller the "failure witness", which is -// the value that was stored in memory which did not match -// the expected value. If is_cae, the result is the value -// most recently fetched from addr rather than a boolean -// success indicator. +// By default the value held in the result register following execution +// of the generated code sequence is 0 to indicate failure of CAS, +// non-zero to indicate success. If is_cae, the result is the value most +// recently fetched from addr rather than a boolean success indicator. // // Clobbers rscratch1, rscratch2 void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm, @@ -526,11 +497,10 @@ void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm, __ bind (step4); // Step 4. CAS has failed because the value most recently fetched - // from addr (which is now held in tmp1) is no longer the from-space - // pointer held in tmp2. If a different thread replaced the - // in-memory value with its equivalent to-space pointer, then CAS - // may still be able to succeed. The value held in the expected - // register has not changed. + // from addr is no longer the from-space pointer held in tmp2. If a + // different thread replaced the in-memory value with its equivalent + // to-space pointer, then CAS may still be able to succeed. The + // value held in the expected register has not changed. // // It is extremely rare we reach this point. For this reason, the // implementation opts for smaller rather than potentially faster @@ -603,8 +573,8 @@ void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm, // Note that macro implementation of __cmpxchg cannot use same register // tmp2 for result and expected since it overwrites result before it // compares result with expected. - __ cmpxchg(addr, tmp2, new_val, size, acquire, release, false, tmp1); - // EQ flag set iff success. tmp2 holds value fetched. + __ cmpxchg(addr, tmp2, new_val, size, acquire, release, false, noreg); + // EQ flag set iff success. tmp2 holds value fetched, tmp1 (rscratch1) clobbered. // If fetched value did not equal the new expected, this could // still be a false negative because some other thread may have diff --git a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoah_aarch64.ad b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoah_aarch64.ad index 091bf091d10..0572e7d8d11 100644 --- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoah_aarch64.ad +++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoah_aarch64.ad @@ -23,6 +23,7 @@ // source_hpp %{ +#include "gc/shenandoah/shenandoahBarrierSet.hpp" #include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp" %} diff --git a/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp b/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp index 114140cca26..523dbf1e602 100644 --- a/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp @@ -58,4 +58,13 @@ const bool CCallingConventionRequiresIntsAsLongs = false; #define COMPRESSED_CLASS_POINTERS_DEPENDS_ON_COMPRESSED_OOPS false +#if defined(_WIN64) +#define R18_RESERVED +#define R18_RESERVED_ONLY(code) code +#define NOT_R18_RESERVED(code) +#else +#define R18_RESERVED_ONLY(code) +#define NOT_R18_RESERVED(code) code +#endif + #endif // CPU_AARCH64_GLOBALDEFINITIONS_AARCH64_HPP diff --git a/src/hotspot/cpu/aarch64/icache_aarch64.hpp b/src/hotspot/cpu/aarch64/icache_aarch64.hpp index 5e689fb988e..9fd0e8575cb 100644 --- a/src/hotspot/cpu/aarch64/icache_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/icache_aarch64.hpp @@ -26,19 +26,6 @@ #ifndef CPU_AARCH64_ICACHE_AARCH64_HPP #define CPU_AARCH64_ICACHE_AARCH64_HPP -// Interface for updating the instruction cache. Whenever the VM -// modifies code, part of the processor instruction cache potentially -// has to be flushed. - -class ICache : public AbstractICache { - public: - static void initialize(); - static void invalidate_word(address addr) { - __builtin___clear_cache((char *)addr, (char *)(addr + 3)); - } - static void invalidate_range(address start, int nbytes) { - __builtin___clear_cache((char *)start, (char *)(start + nbytes)); - } -}; +#include OS_CPU_HEADER(icache) #endif // CPU_AARCH64_ICACHE_AARCH64_HPP diff --git a/src/hotspot/cpu/aarch64/immediate_aarch64.cpp b/src/hotspot/cpu/aarch64/immediate_aarch64.cpp index 7a67d9531a3..3e38b7cca04 100644 --- a/src/hotspot/cpu/aarch64/immediate_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/immediate_aarch64.cpp @@ -24,6 +24,9 @@ #include <stdlib.h> #include <stdint.h> + +#include "precompiled.hpp" +#include "utilities/globalDefinitions.hpp" #include "immediate_aarch64.hpp" // there are at most 2^13 possible logical immediate encodings @@ -244,7 +247,10 @@ int expandLogicalImmediate(uint32_t immN, uint32_t immr, // constructor to initialise the lookup tables -static void initLITables() __attribute__ ((constructor)); +static void initLITables(); +// Use an empty struct with a construtor as MSVC doesn't support `__attribute__ ((constructor))` +// See https://stackoverflow.com/questions/1113409/attribute-constructor-equivalent-in-vc +static struct initLITables_t { initLITables_t(void) { initLITables(); } } _initLITables; static void initLITables() { li_table_entry_count = 0; diff --git a/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp b/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp index ff6d473f2f5..dac52b2284e 100644 --- a/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp @@ -846,9 +846,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg) assert(lock_reg == c_rarg1, "The argument is only for looks. It must be rarg1"); if (UseHeavyMonitors) { - call_VM(noreg, - CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), - lock_reg); + call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), lock_reg); } else { Label done; @@ -884,9 +882,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg) // Call the runtime routine for slow case. str(obj_reg, Address(lock_reg, BasicObjectLock::obj_offset_in_bytes())); // restore obj - call_VM(noreg, - CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), - lock_reg); + call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), lock_reg); bind(done); diff --git a/src/hotspot/cpu/aarch64/javaFrameAnchor_aarch64.hpp b/src/hotspot/cpu/aarch64/javaFrameAnchor_aarch64.hpp index 9a2e96a6a6b..6ff3c037407 100644 --- a/src/hotspot/cpu/aarch64/javaFrameAnchor_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/javaFrameAnchor_aarch64.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2020, 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. * @@ -80,8 +80,6 @@ void set_last_Java_sp(intptr_t* sp) { _last_Java_sp = sp; OrderAccess::release(); } - intptr_t* last_Java_fp(void) { return _last_Java_fp; } - // Assert (last_Java_sp == NULL || fp == NULL) - void set_last_Java_fp(intptr_t* fp) { OrderAccess::release(); _last_Java_fp = fp; } + intptr_t* last_Java_fp(void) { return _last_Java_fp; } #endif // CPU_AARCH64_JAVAFRAMEANCHOR_AARCH64_HPP diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp index 1474394d879..f388712825b 100644 --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp @@ -176,7 +176,7 @@ int MacroAssembler::patch_oop(address insn_addr, address o) { // instruction. if (Instruction_aarch64::extract(insn, 31, 21) == 0b11010010101) { // Move narrow OOP - narrowOop n = CompressedOops::encode((oop)o); + uint32_t n = CompressedOops::narrow_oop_value((oop)o); Instruction_aarch64::patch(insn_addr, 20, 5, n >> 16); Instruction_aarch64::patch(insn_addr+4, 20, 5, n & 0xffff); instructions = 2; @@ -1005,27 +1005,22 @@ void MacroAssembler::lookup_interface_method(Register recv_klass, // } Label search, found_method; - for (int peel = 1; peel >= 0; peel--) { - ldr(method_result, Address(scan_temp, itableOffsetEntry::interface_offset_in_bytes())); - cmp(intf_klass, method_result); - - if (peel) { - br(Assembler::EQ, found_method); - } else { - br(Assembler::NE, search); - // (invert the test to fall through to found_method...) - } - - if (!peel) break; - - bind(search); - - // Check that the previous entry is non-null. A null entry means that - // the receiver class doesn't implement the interface, and wasn't the - // same as when the caller was compiled. - cbz(method_result, L_no_such_interface); + ldr(method_result, Address(scan_temp, itableOffsetEntry::interface_offset_in_bytes())); + cmp(intf_klass, method_result); + br(Assembler::EQ, found_method); + bind(search); + // Check that the previous entry is non-null. A null entry means that + // the receiver class doesn't implement the interface, and wasn't the + // same as when the caller was compiled. + cbz(method_result, L_no_such_interface); + if (itableOffsetEntry::interface_offset_in_bytes() != 0) { add(scan_temp, scan_temp, scan_step); + ldr(method_result, Address(scan_temp, itableOffsetEntry::interface_offset_in_bytes())); + } else { + ldr(method_result, Address(pre(scan_temp, scan_step))); } + cmp(intf_klass, method_result); + br(Assembler::NE, search); bind(found_method); @@ -2702,9 +2697,17 @@ void MacroAssembler::debug64(char* msg, int64_t pc, int64_t regs[]) fatal("DEBUG MESSAGE: %s", msg); } +RegSet MacroAssembler::call_clobbered_registers() { + RegSet regs = RegSet::range(r0, r17) - RegSet::of(rscratch1, rscratch2); +#ifndef R18_RESERVED + regs += r18_tls; +#endif + return regs; +} + void MacroAssembler::push_call_clobbered_registers_except(RegSet exclude) { int step = 4 * wordSize; - push(RegSet::range(r0, r18) - RegSet::of(rscratch1, rscratch2) - exclude, sp); + push(call_clobbered_registers() - exclude, sp); sub(sp, sp, step); mov(rscratch1, -step); // Push v0-v7, v16-v31. @@ -2724,7 +2727,7 @@ void MacroAssembler::pop_call_clobbered_registers_except(RegSet exclude) { as_FloatRegister(i+3), T1D, Address(post(sp, 4 * wordSize))); } - pop(RegSet::range(r0, r18) - RegSet::of(rscratch1, rscratch2) - exclude, sp); + pop(call_clobbered_registers() - exclude, sp); } void MacroAssembler::push_CPU_state(bool save_vectors, bool use_sve, @@ -5725,7 +5728,7 @@ void MacroAssembler::cache_wb(Address line) { assert(line.offset() == 0, "offset should be 0"); // would like to assert this // assert(line._ext.shift == 0, "shift should be zero"); - if (VM_Version::supports_dcpop()) { + if (VM_Version::features() & VM_Version::CPU_DCPOP) { // writeback using clear virtual address to point of persistence dc(Assembler::CVAP, line.base()); } else { diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp index 49eab06f50e..96da3975ef7 100644 --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp @@ -193,7 +193,15 @@ class MacroAssembler: public Assembler { mov(rscratch2, call_site); } +// Microsoft's MSVC team thinks that the __FUNCSIG__ is approximately (sympathy for calling conventions) equivalent to __PRETTY_FUNCTION__ +// Also, from Clang patch: "It is very similar to GCC's PRETTY_FUNCTION, except it prints the calling convention." +// https://reviews.llvm.org/D3311 + +#ifdef _WIN64 +#define call_Unimplemented() _call_Unimplemented((address)__FUNCSIG__) +#else #define call_Unimplemented() _call_Unimplemented((address)__PRETTY_FUNCTION__) +#endif // aliases defined in AARCH64 spec @@ -201,7 +209,7 @@ class MacroAssembler: public Assembler { inline void cmpw(Register Rd, T imm) { subsw(zr, Rd, imm); } inline void cmp(Register Rd, unsigned char imm8) { subs(zr, Rd, imm8); } - inline void cmp(Register Rd, unsigned imm) __attribute__ ((deprecated)); + inline void cmp(Register Rd, unsigned imm) = delete; inline void cmnw(Register Rd, unsigned imm) { addsw(zr, Rd, imm); } inline void cmn(Register Rd, unsigned imm) { adds(zr, Rd, imm); } @@ -475,6 +483,8 @@ class MacroAssembler: public Assembler { void push_fp(RegSet regs, Register stack) { if (regs.bits()) push_fp(regs.bits(), stack); } void pop_fp(RegSet regs, Register stack) { if (regs.bits()) pop_fp(regs.bits(), stack); } + static RegSet call_clobbered_registers(); + // Push and pop everything that might be clobbered by a native // runtime call except rscratch1 and rscratch2. (They are always // scratch, so we don't have to protect them.) Only save the lower @@ -527,10 +537,10 @@ class MacroAssembler: public Assembler { // Generalized Test Bit And Branch, including a "far" variety which // spans more than 32KiB. - void tbr(Condition cond, Register Rt, int bitpos, Label &dest, bool far = false) { + void tbr(Condition cond, Register Rt, int bitpos, Label &dest, bool isfar = false) { assert(cond == EQ || cond == NE, "must be"); - if (far) + if (isfar) cond = ~cond; void (Assembler::* branch)(Register Rt, int bitpos, Label &L); @@ -539,7 +549,7 @@ class MacroAssembler: public Assembler { else branch = &Assembler::tbnz; - if (far) { + if (isfar) { Label L; (this->*branch)(Rt, bitpos, L); b(dest); diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64_trig.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64_trig.cpp index 46473ac39d9..160be0d077d 100644 --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64_trig.cpp +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64_trig.cpp @@ -360,7 +360,7 @@ void MacroAssembler::generate__ieee754_rem_pio2(address npio2_hw, lsr(rscratch1, ix, 20); // ix >> 20 movz(tmp5, 0x4170, 48); subw(rscratch1, rscratch1, 1046); // e0 - fmovd(v10, tmp5); // init two24A value + fmovd(v24, tmp5); // init two24A value subw(jv, ix, rscratch1, LSL, 20); // ix - (e0<<20) lsl(jv, jv, 32); subw(rscratch2, rscratch1, 3); @@ -374,7 +374,7 @@ void MacroAssembler::generate__ieee754_rem_pio2(address npio2_hw, sdivw(jv, rscratch2, i); // jv = (e0 - 3)/24 fsubd(v26, v26, v6); sub(sp, sp, 560); - fmuld(v26, v26, v10); + fmuld(v26, v26, v24); frintzd(v7, v26); // v7 = (double)((int)v26) movw(jx, 2); // calculate jx as nx - 1, which is initially 2. Not a part of unrolled loop fsubd(v26, v26, v7); @@ -383,7 +383,7 @@ void MacroAssembler::generate__ieee754_rem_pio2(address npio2_hw, block_comment("nx calculation with unrolled while(tx[nx-1]==zeroA) nx--;"); { fcmpd(v26, 0.0); // if NE then jx == 2. else it's 1 or 0 add(iqBase, sp, 480); // base of iq[] - fmuld(v3, v26, v10); + fmuld(v3, v26, v24); br(NE, NX_SET); fcmpd(v7, 0.0); // v7 == 0 => jx = 0. Else jx = 1 csetw(jx, NE); @@ -689,7 +689,7 @@ void MacroAssembler::generate__kernel_rem_pio2(address two_over_pi, address pio2 RECOMP_FOR1_CHECK; Register tmp2 = r1, n = r2, jv = r4, tmp5 = r5, jx = r6, tmp3 = r7, iqBase = r10, ih = r11, tmp4 = r12, tmp1 = r13, - jz = r14, j = r15, twoOverPiBase = r16, i = r17, qBase = r18; + jz = r14, j = r15, twoOverPiBase = r16, i = r17, qBase = r19; // jp = jk == init_jk[prec] = init_jk[2] == {2,3,4,6}[2] == 4 // jx = nx - 1 lea(twoOverPiBase, ExternalAddress(two_over_pi)); @@ -839,7 +839,7 @@ void MacroAssembler::generate__kernel_rem_pio2(address two_over_pi, address pio2 ldrd(v27, post(tmp2, -8)); fmuld(v29, v17, v18); // twon24*z frintzd(v29, v29); // (double)(int) - fmsubd(v28, v10, v29, v18); // v28 = z-two24A*fw + fmsubd(v28, v24, v29, v18); // v28 = z-two24A*fw fcvtzdw(tmp1, v28); // (int)(z-two24A*fw) strw(tmp1, Address(iqBase, i, Address::lsl(2))); faddd(v18, v27, v29); @@ -1000,11 +1000,11 @@ void MacroAssembler::generate__kernel_rem_pio2(address two_over_pi, address pio2 block_comment("else block of if(z==0.0) {"); { bind(RECOMP_CHECK_DONE_NOT_ZERO); fmuld(v18, v18, v22); - fcmpd(v18, v10); // v10 is stil two24A + fcmpd(v18, v24); // v24 is stil two24A br(LT, Z_IS_LESS_THAN_TWO24B); fmuld(v1, v18, v17); // twon24*z frintzd(v1, v1); // v1 = (double)(int)(v1) - fmsubd(v2, v10, v1, v18); + fmsubd(v2, v24, v1, v18); fcvtzdw(tmp3, v1); // (int)fw fcvtzdw(tmp2, v2); // double to int strw(tmp2, Address(iqBase, jz, Address::lsl(2))); @@ -1421,6 +1421,12 @@ void MacroAssembler::generate_dsin_dcos(bool isCos, address npio2_hw, Label DONE, ARG_REDUCTION, TINY_X, RETURN_SIN, EARLY_CASE; Register X = r0, absX = r1, n = r2, ix = r3; FloatRegister y0 = v4, y1 = v5; + + enter(); + // r19 is used in TemplateInterpreterGenerator::generate_math_entry + RegSet saved_regs = RegSet::of(r19); + push (saved_regs, sp); + block_comment("check |x| ~< pi/4, NaN, Inf and |x| < 2**-27 cases"); { fmovd(X, v0); mov(rscratch2, 0x3e400000); @@ -1438,14 +1444,14 @@ void MacroAssembler::generate_dsin_dcos(bool isCos, address npio2_hw, // Set last bit unconditionally to make it NaN orr(r10, r10, 1); fmovd(v0, r10); - ret(lr); + b(DONE); } block_comment("kernel_sin/kernel_cos: if(ix<0x3e400000) {<fast return>}"); { bind(TINY_X); if (isCos) { fmovd(v0, 1.0); } - ret(lr); + b(DONE); } bind(ARG_REDUCTION); /* argument reduction needed */ block_comment("n = __ieee754_rem_pio2(x,y);"); { @@ -1465,7 +1471,7 @@ void MacroAssembler::generate_dsin_dcos(bool isCos, address npio2_hw, tbz(n, 1, DONE); } fnegd(v0, v0); - ret(lr); + b(DONE); bind(RETURN_SIN); generate_kernel_sin(y0, true, dsin_coef); if (isCos) { @@ -1474,7 +1480,7 @@ void MacroAssembler::generate_dsin_dcos(bool isCos, address npio2_hw, tbz(n, 1, DONE); } fnegd(v0, v0); - ret(lr); + b(DONE); } bind(EARLY_CASE); eor(y1, T8B, y1, y1); @@ -1484,5 +1490,7 @@ void MacroAssembler::generate_dsin_dcos(bool isCos, address npio2_hw, generate_kernel_sin(v0, false, dsin_coef); } bind(DONE); + pop(saved_regs, sp); + leave(); ret(lr); } diff --git a/src/hotspot/cpu/aarch64/register_aarch64.cpp b/src/hotspot/cpu/aarch64/register_aarch64.cpp index d9ef055efce..24c3f32c2b6 100644 --- a/src/hotspot/cpu/aarch64/register_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/register_aarch64.cpp @@ -41,7 +41,7 @@ const char* RegisterImpl::name() const { "c_rarg0", "c_rarg1", "c_rarg2", "c_rarg3", "c_rarg4", "c_rarg5", "c_rarg6", "c_rarg7", "rscratch1", "rscratch2", "r10", "r11", "r12", "r13", "r14", "r15", "r16", - "r17", "r18", "r19", + "r17", "r18_tls", "r19", "resp", "rdispatch", "rbcp", "r23", "rlocals", "rmonitors", "rcpool", "rheapbase", "rthread", "rfp", "lr", "sp" }; diff --git a/src/hotspot/cpu/aarch64/register_aarch64.hpp b/src/hotspot/cpu/aarch64/register_aarch64.hpp index 11ebe91df0e..c567791e593 100644 --- a/src/hotspot/cpu/aarch64/register_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/register_aarch64.hpp @@ -27,6 +27,7 @@ #define CPU_AARCH64_REGISTER_AARCH64_HPP #include "asm/register.hpp" +#include "utilities/powerOfTwo.hpp" class VMRegImpl; typedef VMRegImpl* VMReg; @@ -91,7 +92,18 @@ CONSTANT_REGISTER_DECLARATION(Register, r14, (14)); CONSTANT_REGISTER_DECLARATION(Register, r15, (15)); CONSTANT_REGISTER_DECLARATION(Register, r16, (16)); CONSTANT_REGISTER_DECLARATION(Register, r17, (17)); -CONSTANT_REGISTER_DECLARATION(Register, r18, (18)); + +// In the ABI for Windows+AArch64 the register r18 is used to store the pointer +// to the current thread's TEB (where TLS variables are stored). We could +// carefully save and restore r18 at key places, however Win32 Structured +// Exception Handling (SEH) is using TLS to unwind the stack. If r18 is used +// for any other purpose at the time of an exception happening, SEH would not +// be able to unwind the stack properly and most likely crash. +// +// It's easier to avoid allocating r18 altogether. +// +// See https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=vs-2019#integer-registers +CONSTANT_REGISTER_DECLARATION(Register, r18_tls, (18)); CONSTANT_REGISTER_DECLARATION(Register, r19, (19)); CONSTANT_REGISTER_DECLARATION(Register, r20, (20)); CONSTANT_REGISTER_DECLARATION(Register, r21, (21)); @@ -292,6 +304,8 @@ class ConcreteRegisterImpl : public AbstractRegisterImpl { static const int max_pr; }; +class RegSetIterator; + // A set of registers class RegSet { uint32_t _bitset; @@ -350,6 +364,49 @@ class RegSet { } uint32_t bits() const { return _bitset; } + +private: + + Register first() { + uint32_t first = _bitset & -_bitset; + return first ? as_Register(exact_log2(first)) : noreg; + } + +public: + + friend class RegSetIterator; + + RegSetIterator begin(); }; +class RegSetIterator { + RegSet _regs; + +public: + RegSetIterator(RegSet x): _regs(x) {} + RegSetIterator(const RegSetIterator& mit) : _regs(mit._regs) {} + + RegSetIterator& operator++() { + Register r = _regs.first(); + if (r != noreg) + _regs -= r; + return *this; + } + + bool operator==(const RegSetIterator& rhs) const { + return _regs.bits() == rhs._regs.bits(); + } + bool operator!=(const RegSetIterator& rhs) const { + return ! (rhs == *this); + } + + Register operator*() { + return _regs.first(); + } +}; + +inline RegSetIterator RegSet::begin() { + return RegSetIterator(*this); +} + #endif // CPU_AARCH64_REGISTER_AARCH64_HPP diff --git a/src/hotspot/cpu/aarch64/register_definitions_aarch64.cpp b/src/hotspot/cpu/aarch64/register_definitions_aarch64.cpp index 63d7146b4a4..f48c70d09e6 100644 --- a/src/hotspot/cpu/aarch64/register_definitions_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/register_definitions_aarch64.cpp @@ -50,7 +50,7 @@ REGISTER_DEFINITION(Register, r14); REGISTER_DEFINITION(Register, r15); REGISTER_DEFINITION(Register, r16); REGISTER_DEFINITION(Register, r17); -REGISTER_DEFINITION(Register, r18); +REGISTER_DEFINITION(Register, r18_tls); // see comment in register_aarch64.hpp REGISTER_DEFINITION(Register, r19); REGISTER_DEFINITION(Register, r20); REGISTER_DEFINITION(Register, r21); diff --git a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp index e3fd5ae5443..382f986d306 100644 --- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp @@ -1107,7 +1107,7 @@ class StubGenerator: public StubCodeGenerator { Label copy4, copy8, copy16, copy32, copy80, copy_big, finish; const Register t2 = r5, t3 = r6, t4 = r7, t5 = r8; const Register t6 = r9, t7 = r10, t8 = r11, t9 = r12; - const Register send = r17, dend = r18; + const Register send = r17, dend = r16; if (PrefetchCopyIntervalInBytes > 0) __ prfm(Address(s, 0), PLDL1KEEP); @@ -1297,11 +1297,15 @@ class StubGenerator: public StubCodeGenerator { void clobber_registers() { #ifdef ASSERT + RegSet clobbered + = MacroAssembler::call_clobbered_registers() - rscratch1; __ mov(rscratch1, (uint64_t)0xdeadbeef); __ orr(rscratch1, rscratch1, rscratch1, Assembler::LSL, 32); - for (Register r = r3; r <= r18; r++) - if (r != rscratch1) __ mov(r, rscratch1); + for (RegSetIterator it = clobbered.begin(); *it != noreg; ++it) { + __ mov(*it, rscratch1); + } #endif + } // Scan over array at a for count oops, verifying each one. @@ -1734,10 +1738,10 @@ class StubGenerator: public StubCodeGenerator { RegSet wb_pre_saved_regs = RegSet::range(c_rarg0, c_rarg4); RegSet wb_post_saved_regs = RegSet::of(count); - // Registers used as temps (r18, r19, r20 are save-on-entry) + // Registers used as temps (r19, r20, r21, r22 are save-on-entry) + const Register copied_oop = r22; // actual oop copied const Register count_save = r21; // orig elementscount const Register start_to = r20; // destination array start address - const Register copied_oop = r18; // actual oop copied const Register r19_klass = r19; // oop._klass //--------------------------------------------------------------- @@ -1774,8 +1778,7 @@ class StubGenerator: public StubCodeGenerator { // Empty array: Nothing to do. __ cbz(count, L_done); - - __ push(RegSet::of(r18, r19, r20, r21), sp); + __ push(RegSet::of(r19, r20, r21, r22), sp); #ifdef ASSERT BLOCK_COMMENT("assert consistent ckoff/ckval"); @@ -1844,7 +1847,7 @@ class StubGenerator: public StubCodeGenerator { bs->arraycopy_epilogue(_masm, decorators, is_oop, start_to, count_save, rscratch1, wb_post_saved_regs); __ bind(L_done_pop); - __ pop(RegSet::of(r18, r19, r20, r21), sp); + __ pop(RegSet::of(r19, r20, r21, r22), sp); inc_counter_np(SharedRuntime::_checkcast_array_copy_ctr); __ bind(L_done); @@ -2021,7 +2024,7 @@ class StubGenerator: public StubCodeGenerator { // registers used as temp const Register scratch_length = r16; // elements count to copy const Register scratch_src_klass = r17; // array klass - const Register lh = r18; // layout helper + const Register lh = r15; // layout helper // if (length < 0) return -1; __ movw(scratch_length, length); // length (elements count, 32-bits value) @@ -2092,7 +2095,7 @@ class StubGenerator: public StubCodeGenerator { // const Register rscratch1_offset = rscratch1; // array offset - const Register r18_elsize = lh; // element size + const Register r15_elsize = lh; // element size __ ubfx(rscratch1_offset, lh, Klass::_lh_header_size_shift, exact_log2(Klass::_lh_header_size_mask+1)); // array_offset @@ -2113,8 +2116,8 @@ class StubGenerator: public StubCodeGenerator { // The possible values of elsize are 0-3, i.e. exact_log2(element // size in bytes). We do a simple bitwise binary search. __ BIND(L_copy_bytes); - __ tbnz(r18_elsize, 1, L_copy_ints); - __ tbnz(r18_elsize, 0, L_copy_shorts); + __ tbnz(r15_elsize, 1, L_copy_ints); + __ tbnz(r15_elsize, 0, L_copy_shorts); __ lea(from, Address(src, src_pos));// src_addr __ lea(to, Address(dst, dst_pos));// dst_addr __ movw(count, scratch_length); // length @@ -2127,7 +2130,7 @@ class StubGenerator: public StubCodeGenerator { __ b(RuntimeAddress(short_copy_entry)); __ BIND(L_copy_ints); - __ tbnz(r18_elsize, 0, L_copy_longs); + __ tbnz(r15_elsize, 0, L_copy_longs); __ lea(from, Address(src, src_pos, Address::lsl(2)));// src_addr __ lea(to, Address(dst, dst_pos, Address::lsl(2)));// dst_addr __ movw(count, scratch_length); // length @@ -2138,8 +2141,8 @@ class StubGenerator: public StubCodeGenerator { { BLOCK_COMMENT("assert long copy {"); Label L; - __ andw(lh, lh, Klass::_lh_log2_element_size_mask); // lh -> r18_elsize - __ cmpw(r18_elsize, LogBytesPerLong); + __ andw(lh, lh, Klass::_lh_log2_element_size_mask); // lh -> r15_elsize + __ cmpw(r15_elsize, LogBytesPerLong); __ br(Assembler::EQ, L); __ stop("must be long copy, but elsize is wrong"); __ bind(L); @@ -2157,8 +2160,8 @@ class StubGenerator: public StubCodeGenerator { Label L_plain_copy, L_checkcast_copy; // test array classes for subtyping - __ load_klass(r18, dst); - __ cmp(scratch_src_klass, r18); // usual case is exact equality + __ load_klass(r15, dst); + __ cmp(scratch_src_klass, r15); // usual case is exact equality __ br(Assembler::NE, L_checkcast_copy); // Identically typed arrays can be copied without element-wise checks. @@ -2174,17 +2177,17 @@ class StubGenerator: public StubCodeGenerator { __ b(RuntimeAddress(oop_copy_entry)); __ BIND(L_checkcast_copy); - // live at this point: scratch_src_klass, scratch_length, r18 (dst_klass) + // live at this point: scratch_src_klass, scratch_length, r15 (dst_klass) { // Before looking at dst.length, make sure dst is also an objArray. - __ ldrw(rscratch1, Address(r18, lh_offset)); + __ ldrw(rscratch1, Address(r15, lh_offset)); __ movw(rscratch2, objArray_lh); __ eorw(rscratch1, rscratch1, rscratch2); __ cbnzw(rscratch1, L_failed); // It is safe to examine both src.length and dst.length. arraycopy_range_checks(src, src_pos, dst, dst_pos, scratch_length, - r18, L_failed); + r15, L_failed); __ load_klass(dst_klass, dst); // reload @@ -5081,42 +5084,42 @@ class StubGenerator: public StubCodeGenerator { // Register allocation - Register reg = c_rarg0; - Pa_base = reg; // Argument registers + RegSetIterator regs = (RegSet::range(r0, r26) - r18_tls).begin(); + Pa_base = *regs; // Argument registers if (squaring) Pb_base = Pa_base; else - Pb_base = ++reg; - Pn_base = ++reg; - Rlen= ++reg; - inv = ++reg; - Pm_base = ++reg; + Pb_base = *++regs; + Pn_base = *++regs; + Rlen= *++regs; + inv = *++regs; + Pm_base = *++regs; // Working registers: - Ra = ++reg; // The current digit of a, b, n, and m. - Rb = ++reg; - Rm = ++reg; - Rn = ++reg; + Ra = *++regs; // The current digit of a, b, n, and m. + Rb = *++regs; + Rm = *++regs; + Rn = *++regs; - Pa = ++reg; // Pointers to the current/next digit of a, b, n, and m. - Pb = ++reg; - Pm = ++reg; - Pn = ++reg; + Pa = *++regs; // Pointers to the current/next digit of a, b, n, and m. + Pb = *++regs; + Pm = *++regs; + Pn = *++regs; - t0 = ++reg; // Three registers which form a - t1 = ++reg; // triple-precision accumuator. - t2 = ++reg; + t0 = *++regs; // Three registers which form a + t1 = *++regs; // triple-precision accumuator. + t2 = *++regs; - Ri = ++reg; // Inner and outer loop indexes. - Rj = ++reg; + Ri = *++regs; // Inner and outer loop indexes. + Rj = *++regs; - Rhi_ab = ++reg; // Product registers: low and high parts - Rlo_ab = ++reg; // of a*b and m*n. - Rhi_mn = ++reg; - Rlo_mn = ++reg; + Rhi_ab = *++regs; // Product registers: low and high parts + Rlo_ab = *++regs; // of a*b and m*n. + Rhi_mn = *++regs; + Rlo_mn = *++regs; // r19 and up are callee-saved. - _toSave = RegSet::range(r19, reg) + Pm_base; + _toSave = RegSet::range(r19, *regs) + Pm_base; } private: diff --git a/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp b/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp index 3940ed14aef..f452aed2ca0 100644 --- a/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp @@ -44,12 +44,6 @@ #define __ _masm-> -// Platform-dependent initialization - -void TemplateTable::pd_initialize() { - // No aarch64 specific initialization -} - // Address computation: local variables static inline Address iaddress(int n) { diff --git a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp index 3cbf025b0c7..343a2bbd50f 100644 --- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp @@ -24,123 +24,36 @@ */ #include "precompiled.hpp" -#include "asm/macroAssembler.hpp" -#include "asm/macroAssembler.inline.hpp" -#include "memory/resourceArea.hpp" #include "runtime/arguments.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/java.hpp" #include "runtime/os.hpp" -#include "runtime/stubCodeGenerator.hpp" #include "runtime/vm_version.hpp" #include "utilities/formatBuffer.hpp" #include "utilities/macros.hpp" #include OS_HEADER_INLINE(os) -#include <asm/hwcap.h> -#include <sys/auxv.h> -#include <sys/prctl.h> - -#ifndef HWCAP_AES -#define HWCAP_AES (1<<3) -#endif - -#ifndef HWCAP_PMULL -#define HWCAP_PMULL (1<<4) -#endif - -#ifndef HWCAP_SHA1 -#define HWCAP_SHA1 (1<<5) -#endif - -#ifndef HWCAP_SHA2 -#define HWCAP_SHA2 (1<<6) -#endif - -#ifndef HWCAP_CRC32 -#define HWCAP_CRC32 (1<<7) -#endif - -#ifndef HWCAP_ATOMICS -#define HWCAP_ATOMICS (1<<8) -#endif - -#ifndef HWCAP_SHA512 -#define HWCAP_SHA512 (1 << 21) -#endif - -#ifndef HWCAP_SVE -#define HWCAP_SVE (1 << 22) -#endif - -#ifndef HWCAP2_SVE2 -#define HWCAP2_SVE2 (1 << 1) -#endif - -#ifndef PR_SVE_GET_VL -// For old toolchains which do not have SVE related macros defined. -#define PR_SVE_SET_VL 50 -#define PR_SVE_GET_VL 51 -#endif - int VM_Version::_cpu; int VM_Version::_model; int VM_Version::_model2; int VM_Version::_variant; int VM_Version::_revision; int VM_Version::_stepping; -bool VM_Version::_dcpop; -int VM_Version::_initial_sve_vector_length; -VM_Version::PsrInfo VM_Version::_psr_info = { 0, }; - -static BufferBlob* stub_blob; -static const int stub_size = 550; - -extern "C" { - typedef void (*getPsrInfo_stub_t)(void*); -} -static getPsrInfo_stub_t getPsrInfo_stub = NULL; - - -class VM_Version_StubGenerator: public StubCodeGenerator { - public: - VM_Version_StubGenerator(CodeBuffer *c) : StubCodeGenerator(c) {} - - address generate_getPsrInfo() { - StubCodeMark mark(this, "VM_Version", "getPsrInfo_stub"); -# define __ _masm-> - address start = __ pc(); - - // void getPsrInfo(VM_Version::PsrInfo* psr_info); - - address entry = __ pc(); - - __ enter(); - - __ get_dczid_el0(rscratch1); - __ strw(rscratch1, Address(c_rarg0, in_bytes(VM_Version::dczid_el0_offset()))); - - __ get_ctr_el0(rscratch1); - __ strw(rscratch1, Address(c_rarg0, in_bytes(VM_Version::ctr_el0_offset()))); - - __ leave(); - __ ret(lr); - -# undef __ - - return start; - } -}; +int VM_Version::_zva_length; +int VM_Version::_dcache_line_size; +int VM_Version::_icache_line_size; +int VM_Version::_initial_sve_vector_length; -void VM_Version::get_processor_features() { +void VM_Version::initialize() { _supports_cx8 = true; _supports_atomic_getset4 = true; _supports_atomic_getadd4 = true; _supports_atomic_getset8 = true; _supports_atomic_getadd8 = true; - getPsrInfo_stub(&_psr_info); + get_os_cpu_info(); int dcache_line = VM_Version::dcache_line_size(); @@ -182,45 +95,12 @@ void VM_Version::get_processor_features() { SoftwarePrefetchHintDistance &= ~7; } - uint64_t auxv = getauxval(AT_HWCAP); - uint64_t auxv2 = getauxval(AT_HWCAP2); - - char buf[512]; - - _features = auxv; - - int cpu_lines = 0; - if (FILE *f = fopen("/proc/cpuinfo", "r")) { - // need a large buffer as the flags line may include lots of text - char buf[1024], *p; - while (fgets(buf, sizeof (buf), f) != NULL) { - if ((p = strchr(buf, ':')) != NULL) { - long v = strtol(p+1, NULL, 0); - if (strncmp(buf, "CPU implementer", sizeof "CPU implementer" - 1) == 0) { - _cpu = v; - cpu_lines++; - } else if (strncmp(buf, "CPU variant", sizeof "CPU variant" - 1) == 0) { - _variant = v; - } else if (strncmp(buf, "CPU part", sizeof "CPU part" - 1) == 0) { - if (_model != v) _model2 = _model; - _model = v; - } else if (strncmp(buf, "CPU revision", sizeof "CPU revision" - 1) == 0) { - _revision = v; - } else if (strncmp(buf, "flags", sizeof("flags") - 1) == 0) { - if (strstr(p+1, "dcpop")) { - _dcpop = true; - } - } - } - } - fclose(f); - } if (os::supports_map_sync()) { // if dcpop is available publish data cache line flush size via // generic field, otherwise let if default to zero thereby // disabling writeback - if (_dcpop) { + if (_features & CPU_DCPOP) { _data_cache_line_flush_size = dcache_line; } } @@ -301,30 +181,31 @@ void VM_Version::get_processor_features() { } if (_cpu == CPU_ARM && (_model == 0xd07 || _model2 == 0xd07)) _features |= CPU_STXR_PREFETCH; - // If an olde style /proc/cpuinfo (cpu_lines == 1) then if _model is an A57 (0xd07) + // If an olde style /proc/cpuinfo (cores == 1) then if _model is an A57 (0xd07) // we assume the worst and assume we could be on a big little system and have // undisclosed A53 cores which we could be swapped to at any stage - if (_cpu == CPU_ARM && cpu_lines == 1 && _model == 0xd07) _features |= CPU_A53MAC; + if (_cpu == CPU_ARM && os::processor_count() == 1 && _model == 0xd07) _features |= CPU_A53MAC; + char buf[512]; sprintf(buf, "0x%02x:0x%x:0x%03x:%d", _cpu, _variant, _model, _revision); if (_model2) sprintf(buf+strlen(buf), "(0x%03x)", _model2); - if (auxv & HWCAP_ASIMD) strcat(buf, ", simd"); - if (auxv & HWCAP_CRC32) strcat(buf, ", crc"); - if (auxv & HWCAP_AES) strcat(buf, ", aes"); - if (auxv & HWCAP_SHA1) strcat(buf, ", sha1"); - if (auxv & HWCAP_SHA2) strcat(buf, ", sha256"); - if (auxv & HWCAP_SHA512) strcat(buf, ", sha512"); - if (auxv & HWCAP_ATOMICS) strcat(buf, ", lse"); - if (auxv & HWCAP_SVE) strcat(buf, ", sve"); - if (auxv2 & HWCAP2_SVE2) strcat(buf, ", sve2"); + if (_features & CPU_ASIMD) strcat(buf, ", simd"); + if (_features & CPU_CRC32) strcat(buf, ", crc"); + if (_features & CPU_AES) strcat(buf, ", aes"); + if (_features & CPU_SHA1) strcat(buf, ", sha1"); + if (_features & CPU_SHA2) strcat(buf, ", sha256"); + if (_features & CPU_SHA512) strcat(buf, ", sha512"); + if (_features & CPU_LSE) strcat(buf, ", lse"); + if (_features & CPU_SVE) strcat(buf, ", sve"); + if (_features & CPU_SVE2) strcat(buf, ", sve2"); _features_string = os::strdup(buf); if (FLAG_IS_DEFAULT(UseCRC32)) { - UseCRC32 = (auxv & HWCAP_CRC32) != 0; + UseCRC32 = (_features & CPU_CRC32) != 0; } - if (UseCRC32 && (auxv & HWCAP_CRC32) == 0) { + if (UseCRC32 && (_features & CPU_CRC32) == 0) { warning("UseCRC32 specified, but not supported on this CPU"); FLAG_SET_DEFAULT(UseCRC32, false); } @@ -338,7 +219,7 @@ void VM_Version::get_processor_features() { FLAG_SET_DEFAULT(UseVectorizedMismatchIntrinsic, false); } - if (auxv & HWCAP_ATOMICS) { + if (_features & CPU_LSE) { if (FLAG_IS_DEFAULT(UseLSE)) FLAG_SET_DEFAULT(UseLSE, true); } else { @@ -348,7 +229,7 @@ void VM_Version::get_processor_features() { } } - if (auxv & HWCAP_AES) { + if (_features & CPU_AES) { UseAES = UseAES || FLAG_IS_DEFAULT(UseAES); UseAESIntrinsics = UseAESIntrinsics || (UseAES && FLAG_IS_DEFAULT(UseAESIntrinsics)); @@ -376,7 +257,7 @@ void VM_Version::get_processor_features() { UseCRC32Intrinsics = true; } - if (auxv & HWCAP_CRC32) { + if (_features & CPU_CRC32) { if (FLAG_IS_DEFAULT(UseCRC32CIntrinsics)) { FLAG_SET_DEFAULT(UseCRC32CIntrinsics, true); } @@ -394,7 +275,7 @@ void VM_Version::get_processor_features() { FLAG_SET_DEFAULT(UseMD5Intrinsics, false); } - if (auxv & (HWCAP_SHA1 | HWCAP_SHA2)) { + if (_features & (CPU_SHA1 | CPU_SHA2)) { if (FLAG_IS_DEFAULT(UseSHA)) { FLAG_SET_DEFAULT(UseSHA, true); } @@ -403,7 +284,7 @@ void VM_Version::get_processor_features() { FLAG_SET_DEFAULT(UseSHA, false); } - if (UseSHA && (auxv & HWCAP_SHA1)) { + if (UseSHA && (_features & CPU_SHA1)) { if (FLAG_IS_DEFAULT(UseSHA1Intrinsics)) { FLAG_SET_DEFAULT(UseSHA1Intrinsics, true); } @@ -412,7 +293,7 @@ void VM_Version::get_processor_features() { FLAG_SET_DEFAULT(UseSHA1Intrinsics, false); } - if (UseSHA && (auxv & HWCAP_SHA2)) { + if (UseSHA && (_features & CPU_SHA2)) { if (FLAG_IS_DEFAULT(UseSHA256Intrinsics)) { FLAG_SET_DEFAULT(UseSHA256Intrinsics, true); } @@ -421,7 +302,7 @@ void VM_Version::get_processor_features() { FLAG_SET_DEFAULT(UseSHA256Intrinsics, false); } - if (UseSHA && (auxv & HWCAP_SHA512)) { + if (UseSHA && (_features & CPU_SHA512)) { // Do not auto-enable UseSHA512Intrinsics until it has been fully tested on hardware // if (FLAG_IS_DEFAULT(UseSHA512Intrinsics)) { // FLAG_SET_DEFAULT(UseSHA512Intrinsics, true); @@ -435,7 +316,7 @@ void VM_Version::get_processor_features() { FLAG_SET_DEFAULT(UseSHA, false); } - if (auxv & HWCAP_PMULL) { + if (_features & CPU_PMULL) { if (FLAG_IS_DEFAULT(UseGHASHIntrinsics)) { FLAG_SET_DEFAULT(UseGHASHIntrinsics, true); } @@ -456,12 +337,12 @@ void VM_Version::get_processor_features() { FLAG_SET_DEFAULT(UseBlockZeroing, false); } - if (auxv & HWCAP_SVE) { + if (_features & CPU_SVE) { if (FLAG_IS_DEFAULT(UseSVE)) { - FLAG_SET_DEFAULT(UseSVE, (auxv2 & HWCAP2_SVE2) ? 2 : 1); + FLAG_SET_DEFAULT(UseSVE, (_features & CPU_SVE2) ? 2 : 1); } if (UseSVE > 0) { - _initial_sve_vector_length = prctl(PR_SVE_GET_VL); + _initial_sve_vector_length = get_current_sve_vector_length(); } } else if (UseSVE > 0) { warning("UseSVE specified, but not supported on current CPU. Disabling SVE."); @@ -509,11 +390,9 @@ void VM_Version::get_processor_features() { warning("SVE does not support vector length less than 16 bytes. Disabling SVE."); UseSVE = 0; } else if ((MaxVectorSize % 16) == 0 && is_power_of_2(MaxVectorSize)) { - int new_vl = prctl(PR_SVE_SET_VL, MaxVectorSize); + int new_vl = set_and_get_current_sve_vector_lenght(MaxVectorSize); _initial_sve_vector_length = new_vl; - // If MaxVectorSize is larger than system largest supported SVE vector length, above prctl() - // call will set task vector length to the system largest supported value. So, we also update - // MaxVectorSize to that largest supported value. + // Update MaxVectorSize to the largest supported value. if (new_vl < 0) { vm_exit_during_initialization( err_msg("Current system does not support SVE vector length for MaxVectorSize: %d", @@ -554,22 +433,6 @@ void VM_Version::get_processor_features() { AlignVector = AvoidUnalignedAccesses; } #endif -} - -void VM_Version::initialize() { - ResourceMark rm; - - stub_blob = BufferBlob::create("getPsrInfo_stub", stub_size); - if (stub_blob == NULL) { - vm_exit_during_initialization("Unable to allocate getPsrInfo_stub"); - } - - CodeBuffer c(stub_blob); - VM_Version_StubGenerator g(&c); - getPsrInfo_stub = CAST_TO_FN_PTR(getPsrInfo_stub_t, - g.generate_getPsrInfo()); - - get_processor_features(); UNSUPPORTED_OPTION(CriticalJNINatives); } diff --git a/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp b/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp index 9870b24ecb5..292550529b4 100644 --- a/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp @@ -27,7 +27,6 @@ #define CPU_AARCH64_VM_VERSION_AARCH64_HPP #include "runtime/abstract_vm_version.hpp" -#include "runtime/globals_extension.hpp" #include "utilities/sizes.hpp" class VM_Version : public Abstract_VM_Version { @@ -40,15 +39,20 @@ class VM_Version : public Abstract_VM_Version { static int _variant; static int _revision; static int _stepping; - static bool _dcpop; + + static int _zva_length; + static int _dcache_line_size; + static int _icache_line_size; static int _initial_sve_vector_length; - struct PsrInfo { - uint32_t dczid_el0; - uint32_t ctr_el0; - }; - static PsrInfo _psr_info; - static void get_processor_features(); + // Read additional info using OS-specific interfaces + static void get_os_cpu_info(); + + // Sets the SVE length and returns a new actual value or negative on error. + // If the len is larger than the system largest supported SVE vector length, + // the function sets the largest supported value. + static int set_and_get_current_sve_vector_lenght(int len); + static int get_current_sve_vector_length(); public: // Initialization @@ -98,8 +102,13 @@ class VM_Version : public Abstract_VM_Version { CPU_SHA2 = (1<<6), CPU_CRC32 = (1<<7), CPU_LSE = (1<<8), - CPU_STXR_PREFETCH= (1 << 29), - CPU_A53MAC = (1 << 30), + CPU_DCPOP = (1<<16), + CPU_SHA512 = (1<<21), + CPU_SVE = (1<<22), + // flags above must follow Linux HWCAP + CPU_SVE2 = (1<<28), + CPU_STXR_PREFETCH= (1<<29), + CPU_A53MAC = (1<<30), }; static int cpu_family() { return _cpu; } @@ -107,26 +116,17 @@ class VM_Version : public Abstract_VM_Version { static int cpu_model2() { return _model2; } static int cpu_variant() { return _variant; } static int cpu_revision() { return _revision; } - static bool supports_dcpop() { return _dcpop; } - static int get_initial_sve_vector_length() { return _initial_sve_vector_length; }; - static ByteSize dczid_el0_offset() { return byte_offset_of(PsrInfo, dczid_el0); } - static ByteSize ctr_el0_offset() { return byte_offset_of(PsrInfo, ctr_el0); } - static bool is_zva_enabled() { - // Check the DZP bit (bit 4) of dczid_el0 is zero - // and block size (bit 0~3) is not zero. - return ((_psr_info.dczid_el0 & 0x10) == 0 && - (_psr_info.dczid_el0 & 0xf) != 0); - } + + static bool is_zva_enabled() { return 0 <= _zva_length; } static int zva_length() { assert(is_zva_enabled(), "ZVA not available"); - return 4 << (_psr_info.dczid_el0 & 0xf); - } - static int icache_line_size() { - return (1 << (_psr_info.ctr_el0 & 0x0f)) * 4; - } - static int dcache_line_size() { - return (1 << ((_psr_info.ctr_el0 >> 16) & 0x0f)) * 4; + return _zva_length; } + + static int icache_line_size() { return _icache_line_size; } + static int dcache_line_size() { return _dcache_line_size; } + static int get_initial_sve_vector_length() { return _initial_sve_vector_length; }; + static bool supports_fast_class_init_checks() { return true; } }; diff --git a/src/hotspot/cpu/aarch64/vm_version_ext_aarch64.cpp b/src/hotspot/cpu/aarch64/vm_version_ext_aarch64.cpp index ebabc3723c2..8db351a6c1e 100644 --- a/src/hotspot/cpu/aarch64/vm_version_ext_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/vm_version_ext_aarch64.cpp @@ -22,6 +22,7 @@ * */ +#include "precompiled.hpp" #include "memory/allocation.hpp" #include "memory/allocation.inline.hpp" #include "runtime/os.inline.hpp" diff --git a/src/hotspot/cpu/arm/assembler_arm.hpp b/src/hotspot/cpu/arm/assembler_arm.hpp index 8beaa284a79..1de4b0da774 100644 --- a/src/hotspot/cpu/arm/assembler_arm.hpp +++ b/src/hotspot/cpu/arm/assembler_arm.hpp @@ -89,17 +89,8 @@ class Address { _offset_op = add_offset; } -#ifdef ASSERT - Address(Register rn, ByteSize offset, AsmOffset mode = basic_offset) { - _base = rn; - _index = noreg; - _disp = in_bytes(offset); - _mode = mode; - _shift_imm = 0; - _shift = lsl; - _offset_op = add_offset; - } -#endif + Address(Register rn, ByteSize offset, AsmOffset mode = basic_offset) : + Address(rn, in_bytes(offset), mode) {} Address(Register rn, Register rm, AsmShift shift = lsl, int shift_imm = 0, AsmOffset mode = basic_offset, diff --git a/src/hotspot/cpu/arm/assembler_arm_32.hpp b/src/hotspot/cpu/arm/assembler_arm_32.hpp index 44997ddcbce..dd04ad1ab3a 100644 --- a/src/hotspot/cpu/arm/assembler_arm_32.hpp +++ b/src/hotspot/cpu/arm/assembler_arm_32.hpp @@ -55,12 +55,8 @@ class AsmOperand { encode(imm_8); } -#ifdef ASSERT - AsmOperand(ByteSize bytesize_8) { - const int imm_8 = in_bytes(bytesize_8); - encode(imm_8); - } -#endif // ASSERT + AsmOperand(ByteSize bytesize_8) : + AsmOperand(in_bytes(bytesize_8)) {} AsmOperand(Register rm, AsmShift shift, int shift_imm) { encode(rm,shift,shift_imm); diff --git a/src/hotspot/cpu/arm/globalDefinitions_arm.hpp b/src/hotspot/cpu/arm/globalDefinitions_arm.hpp index 4aff72af758..0a400d00864 100644 --- a/src/hotspot/cpu/arm/globalDefinitions_arm.hpp +++ b/src/hotspot/cpu/arm/globalDefinitions_arm.hpp @@ -55,11 +55,4 @@ const bool HaveVFP = true; #define AD_MD_HPP "adfiles/ad_arm_32.hpp" #define C1_LIRGENERATOR_MD_HPP "c1_LIRGenerator_arm.hpp" -#ifdef TARGET_COMPILER_gcc -#ifdef ARM32 -#undef BREAKPOINT -#define BREAKPOINT __asm__ volatile ("bkpt") -#endif -#endif - #endif // CPU_ARM_GLOBALDEFINITIONS_ARM_HPP diff --git a/src/hotspot/cpu/arm/interp_masm_arm.cpp b/src/hotspot/cpu/arm/interp_masm_arm.cpp index 9b0605744d0..78f7a7fb77c 100644 --- a/src/hotspot/cpu/arm/interp_masm_arm.cpp +++ b/src/hotspot/cpu/arm/interp_masm_arm.cpp @@ -990,7 +990,7 @@ void InterpreterMacroAssembler::unlock_object(Register Rlock) { assert(Rlock == R1, "the second argument"); if (UseHeavyMonitors) { - call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), Rlock); + call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), Rlock); } else { Label done, slow_case; @@ -1031,7 +1031,7 @@ void InterpreterMacroAssembler::unlock_object(Register Rlock) { // Call the runtime routine for slow case. str(Robj, Address(Rlock, obj_offset)); // restore obj - call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), Rlock); + call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), Rlock); bind(done); } diff --git a/src/hotspot/cpu/arm/javaFrameAnchor_arm.hpp b/src/hotspot/cpu/arm/javaFrameAnchor_arm.hpp index 73e375343ca..85585543f49 100644 --- a/src/hotspot/cpu/arm/javaFrameAnchor_arm.hpp +++ b/src/hotspot/cpu/arm/javaFrameAnchor_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -79,8 +79,6 @@ void set_last_Java_sp(intptr_t* sp) { _last_Java_sp = sp; } - intptr_t* last_Java_fp(void) { return _last_Java_fp; } - // Assert (last_Java_sp == NULL || fp == NULL) - void set_last_Java_fp(intptr_t* fp) { _last_Java_fp = fp; } + intptr_t* last_Java_fp(void) { return _last_Java_fp; } #endif // CPU_ARM_JAVAFRAMEANCHOR_ARM_HPP diff --git a/src/hotspot/cpu/arm/templateTable_arm.cpp b/src/hotspot/cpu/arm/templateTable_arm.cpp index 2240e01c831..ab3229bf8a4 100644 --- a/src/hotspot/cpu/arm/templateTable_arm.cpp +++ b/src/hotspot/cpu/arm/templateTable_arm.cpp @@ -43,13 +43,6 @@ #define __ _masm-> -//---------------------------------------------------------------------------------------------------- -// Platform-dependent initialization - -void TemplateTable::pd_initialize() { - // No arm specific initialization -} - //---------------------------------------------------------------------------------------------------- // Address computation diff --git a/src/hotspot/cpu/arm/vm_version_arm_32.cpp b/src/hotspot/cpu/arm/vm_version_arm_32.cpp index 6837187d2d5..5331a20f2fe 100644 --- a/src/hotspot/cpu/arm/vm_version_arm_32.cpp +++ b/src/hotspot/cpu/arm/vm_version_arm_32.cpp @@ -27,6 +27,7 @@ #include "asm/macroAssembler.inline.hpp" #include "memory/resourceArea.hpp" #include "runtime/arguments.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/java.hpp" #include "runtime/os.inline.hpp" #include "runtime/stubCodeGenerator.hpp" diff --git a/src/hotspot/cpu/ppc/assembler_ppc.hpp b/src/hotspot/cpu/ppc/assembler_ppc.hpp index 37a46a26b5a..05ab385fb4f 100644 --- a/src/hotspot/cpu/ppc/assembler_ppc.hpp +++ b/src/hotspot/cpu/ppc/assembler_ppc.hpp @@ -1639,7 +1639,7 @@ class Assembler : public AbstractAssembler { // For convenience. Load pointer into d from b+s1. inline void ld_ptr(Register d, int b, Register s1); - DEBUG_ONLY(inline void ld_ptr(Register d, ByteSize b, Register s1);) + inline void ld_ptr(Register d, ByteSize b, Register s1); // PPC 1, section 3.3.3 Fixed-Point Store Instructions inline void stwx( Register d, Register s1, Register s2); @@ -1663,7 +1663,7 @@ class Assembler : public AbstractAssembler { inline void stdbrx( Register d, Register s1, Register s2); inline void st_ptr(Register d, int si16, Register s1); - DEBUG_ONLY(inline void st_ptr(Register d, ByteSize b, Register s1);) + inline void st_ptr(Register d, ByteSize b, Register s1); // PPC 1, section 3.3.13 Move To/From System Register Instructions inline void mtlr( Register s1); diff --git a/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp b/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp index 4f50b570f68..a351674b5ba 100644 --- a/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp +++ b/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp @@ -342,7 +342,7 @@ inline void Assembler::ldu( Register d, int si16, Register s1) { assert(d != inline void Assembler::ldbrx( Register d, Register s1, Register s2) { emit_int32(LDBRX_OPCODE | rt(d) | ra0mem(s1) | rb(s2));} inline void Assembler::ld_ptr(Register d, int b, Register s1) { ld(d, b, s1); } -DEBUG_ONLY(inline void Assembler::ld_ptr(Register d, ByteSize b, Register s1) { ld(d, in_bytes(b), s1); }) +inline void Assembler::ld_ptr(Register d, ByteSize b, Register s1) { ld(d, in_bytes(b), s1); } // PPC 1, section 3.3.3 Fixed-Point Store Instructions inline void Assembler::stwx( Register d, Register s1, Register s2) { emit_int32(STWX_OPCODE | rs(d) | ra0mem(s1) | rb(s2));} @@ -366,7 +366,7 @@ inline void Assembler::stdux(Register s, Register a, Register b) { emit_int32( inline void Assembler::stdbrx( Register d, Register s1, Register s2) { emit_int32(STDBRX_OPCODE | rs(d) | ra0mem(s1) | rb(s2));} inline void Assembler::st_ptr(Register d, int b, Register s1) { std(d, b, s1); } -DEBUG_ONLY(inline void Assembler::st_ptr(Register d, ByteSize b, Register s1) { std(d, in_bytes(b), s1); }) +inline void Assembler::st_ptr(Register d, ByteSize b, Register s1) { std(d, in_bytes(b), s1); } // PPC 1, section 3.3.13 Move To/From System Register Instructions inline void Assembler::mtlr( Register s1) { emit_int32(MTLR_OPCODE | rs(s1)); } diff --git a/src/hotspot/cpu/ppc/c2_init_ppc.cpp b/src/hotspot/cpu/ppc/c2_init_ppc.cpp index e8668a4bfaf..34b330fee2b 100644 --- a/src/hotspot/cpu/ppc/c2_init_ppc.cpp +++ b/src/hotspot/cpu/ppc/c2_init_ppc.cpp @@ -27,6 +27,7 @@ #include "opto/compile.hpp" #include "opto/node.hpp" #include "runtime/globals.hpp" +#include "runtime/globals_extension.hpp" #include "utilities/debug.hpp" // Processor dependent initialization of C2 compiler for ppc. diff --git a/src/hotspot/cpu/ppc/globals_ppc.hpp b/src/hotspot/cpu/ppc/globals_ppc.hpp index f4f3d9a2ebc..4099aeb606a 100644 --- a/src/hotspot/cpu/ppc/globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/globals_ppc.hpp @@ -84,59 +84,59 @@ define_pd_global(intx, InitArrayShortSize, 9*BytesPerLong); range, \ constraint) \ \ - product(uintx, PowerArchitecturePPC64, 0, \ + product(uintx, PowerArchitecturePPC64, 0, DIAGNOSTIC, \ "Specify the PowerPC family version in use. If not provided, " \ "HotSpot will determine it automatically. Host family version " \ "is the maximum value allowed (instructions are not emulated).") \ \ - product(bool, SuperwordUseVSX, false, \ - "Use Power8 VSX instructions for superword optimization.") \ - \ /* Reoptimize code-sequences of calls at runtime, e.g. replace an */ \ /* indirect call by a direct call. */ \ - product(bool, ReoptimizeCallSequences, true, \ + product(bool, ReoptimizeCallSequences, true, DIAGNOSTIC, \ "Reoptimize code-sequences of calls at runtime.") \ \ /* Power 8: Configure Data Stream Control Register. */ \ - product(uint64_t,DSCR_PPC64, (uintx)-1, \ + product(uint64_t, DSCR_PPC64, (uint64_t)-1, \ "Power8 or later: Specify encoded value for Data Stream Control " \ "Register") \ - product(uint64_t,DSCR_DPFD_PPC64, 8, \ + product(uint64_t, DSCR_DPFD_PPC64, 8, \ "Power8 or later: DPFD (default prefetch depth) value of the " \ "Data Stream Control Register." \ " 0: hardware default, 1: none, 2-7: min-max, 8: don't touch") \ - product(uint64_t,DSCR_URG_PPC64, 8, \ + product(uint64_t, DSCR_URG_PPC64, 8, \ "Power8 or later: URG (depth attainment urgency) value of the " \ "Data Stream Control Register." \ " 0: hardware default, 1: none, 2-7: min-max, 8: don't touch") \ \ - product(bool, UseLoadInstructionsForStackBangingPPC64, false, \ + product(bool, UseLoadInstructionsForStackBangingPPC64, false, DIAGNOSTIC, \ "Use load instructions for stack banging.") \ \ + product(bool, UseStaticBranchPredictionInCompareAndSwapPPC64, true, DIAGNOSTIC,\ + "Use static branch prediction hints in CAS operations.") \ + product(bool, UseStaticBranchPredictionForUncommonPathsPPC64, false, DIAGNOSTIC,\ + "Use static branch prediction hints for uncommon paths.") \ + \ /* special instructions */ \ - product(bool, UseByteReverseInstructions, false, \ + product(bool, SuperwordUseVSX, false, \ + "Use Power8 VSX instructions for superword optimization.") \ + \ + product(bool, UseByteReverseInstructions, false, DIAGNOSTIC, \ "Use byte reverse instructions.") \ \ - product(bool, UseVectorByteReverseInstructionsPPC64, false, \ + product(bool, UseVectorByteReverseInstructionsPPC64, false, DIAGNOSTIC, \ "Use Power9 xxbr* vector byte reverse instructions.") \ \ - product(bool, UseCountLeadingZerosInstructionsPPC64, true, \ + product(bool, UseCountLeadingZerosInstructionsPPC64, true, DIAGNOSTIC, \ "Use count leading zeros instructions.") \ \ - product(bool, UseCountTrailingZerosInstructionsPPC64, false, \ + product(bool, UseCountTrailingZerosInstructionsPPC64, false, DIAGNOSTIC, \ "Use count trailing zeros instructions.") \ \ - product(bool, UseExtendedLoadAndReserveInstructionsPPC64, false, \ + product(bool, UseExtendedLoadAndReserveInstructionsPPC64, false, DIAGNOSTIC,\ "Use extended versions of load-and-reserve instructions.") \ \ - product(bool, UseRotateAndMaskInstructionsPPC64, true, \ + product(bool, UseRotateAndMaskInstructionsPPC64, true, DIAGNOSTIC, \ "Use rotate and mask instructions.") \ \ - product(bool, UseStaticBranchPredictionInCompareAndSwapPPC64, true, \ - "Use static branch prediction hints in CAS operations.") \ - product(bool, UseStaticBranchPredictionForUncommonPathsPPC64, false, \ - "Use static branch prediction hints for uncommon paths.") \ - \ /* Trap based checks. */ \ /* Trap based checks use the ppc trap instructions to check certain */ \ /* conditions. This instruction raises a SIGTRAP caught by the */ \ @@ -144,13 +144,14 @@ define_pd_global(intx, InitArrayShortSize, 9*BytesPerLong); product(bool, UseSIGTRAP, true, \ "Allow trap instructions that make use of SIGTRAP. Use this to " \ "switch off all optimizations requiring SIGTRAP.") \ - product(bool, TrapBasedICMissChecks, true, \ + product(bool, TrapBasedICMissChecks, true, DIAGNOSTIC, \ "Raise and handle SIGTRAP if inline cache miss detected.") \ - product(bool, TraceTraps, false, "Trace all traps the signal handler" \ - "handles.") \ \ - product(bool, ZapMemory, false, "Write 0x0101... to empty memory." \ - " Use this to ease debugging.") \ + product(bool, TraceTraps, false, DIAGNOSTIC, \ + "Trace all traps the signal handler handles.") \ + \ + develop(bool, ZapMemory, false, \ + "Write 0x0101... to empty memory. Use this to ease debugging.") \ \ /* Use Restricted Transactional Memory for lock elision */ \ product(bool, UseRTMLocking, false, \ diff --git a/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp b/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp index af201a681b8..889c2c8d2cc 100644 --- a/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp +++ b/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp @@ -997,8 +997,7 @@ void InterpreterMacroAssembler::lock_object(Register monitor, Register object) { // Throw IllegalMonitorException if object is not locked by current thread. void InterpreterMacroAssembler::unlock_object(Register monitor, bool check_for_exceptions) { if (UseHeavyMonitors) { - call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), - monitor, check_for_exceptions); + call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), monitor); } else { // template code: @@ -1011,7 +1010,7 @@ void InterpreterMacroAssembler::unlock_object(Register monitor, bool check_for_e // monitor->set_obj(NULL); // } else { // // Slow path. - // InterpreterRuntime::monitorexit(THREAD, monitor); + // InterpreterRuntime::monitorexit(monitor); // } const Register object = R7_ARG5; @@ -1065,13 +1064,12 @@ void InterpreterMacroAssembler::unlock_object(Register monitor, bool check_for_e // } else { // // Slow path. - // InterpreterRuntime::monitorexit(THREAD, monitor); + // InterpreterRuntime::monitorexit(monitor); // The lock has been converted into a heavy lock and hence // we need to get into the slow case. bind(slow_case); - call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), - monitor, check_for_exceptions); + call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), monitor); // } Label done; diff --git a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp index c3f39861dc7..3d3c39cf5d5 100644 --- a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp +++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp @@ -220,8 +220,9 @@ address MacroAssembler::patch_set_narrow_oop(address a, address bound, narrowOop } assert(inst1_found, "inst is not lis"); - int xc = (data >> 16) & 0xffff; - int xd = (data >> 0) & 0xffff; + uint32_t data_value = CompressedOops::narrow_oop_value(data); + int xc = (data_value >> 16) & 0xffff; + int xd = (data_value >> 0) & 0xffff; set_imm((int *)inst1_addr, (short)(xc)); // see enc_load_con_narrow_hi/_lo set_imm((int *)inst2_addr, (xd)); // unsigned int @@ -254,7 +255,7 @@ narrowOop MacroAssembler::get_narrow_oop(address a, address bound) { uint xl = ((unsigned int) (get_imm(inst2_addr, 0) & 0xffff)); uint xh = (((get_imm(inst1_addr, 0)) & 0xffff) << 16); - return (int) (xl | xh); + return CompressedOops::narrow_oop_cast(xl | xh); } #endif // _LP64 diff --git a/src/hotspot/cpu/ppc/nativeInst_ppc.cpp b/src/hotspot/cpu/ppc/nativeInst_ppc.cpp index 23e8ccac6e6..fbe956322a6 100644 --- a/src/hotspot/cpu/ppc/nativeInst_ppc.cpp +++ b/src/hotspot/cpu/ppc/nativeInst_ppc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -196,7 +196,7 @@ intptr_t NativeMovConstReg::data() const { CodeBlob* cb = CodeCache::find_blob_unsafe(addr); if (MacroAssembler::is_set_narrow_oop(addr, cb->content_begin())) { - narrowOop no = (narrowOop)MacroAssembler::get_narrow_oop(addr, cb->content_begin()); + narrowOop no = MacroAssembler::get_narrow_oop(addr, cb->content_begin()); return cast_from_oop<intptr_t>(CompressedOops::decode(no)); } else { assert(MacroAssembler::is_load_const_from_method_toc_at(addr), "must be load_const_from_pool"); @@ -293,10 +293,11 @@ void NativeMovConstReg::set_data(intptr_t data) { void NativeMovConstReg::set_narrow_oop(narrowOop data, CodeBlob *code /* = NULL */) { address inst2_addr = addr_at(0); CodeBlob* cb = (code) ? code : CodeCache::find_blob(instruction_address()); - if (MacroAssembler::get_narrow_oop(inst2_addr, cb->content_begin()) == (long)data) + if (MacroAssembler::get_narrow_oop(inst2_addr, cb->content_begin()) == data) { return; + } const address inst1_addr = - MacroAssembler::patch_set_narrow_oop(inst2_addr, cb->content_begin(), (long)data); + MacroAssembler::patch_set_narrow_oop(inst2_addr, cb->content_begin(), data); assert(inst1_addr != NULL && inst1_addr < inst2_addr, "first instruction must be found"); const int range = inst2_addr - inst1_addr + BytesPerInstWord; ICache::ppc64_flush_icache_bytes(inst1_addr, range); diff --git a/src/hotspot/cpu/ppc/relocInfo_ppc.cpp b/src/hotspot/cpu/ppc/relocInfo_ppc.cpp index 6fed8163863..f940a7e0fb8 100644 --- a/src/hotspot/cpu/ppc/relocInfo_ppc.cpp +++ b/src/hotspot/cpu/ppc/relocInfo_ppc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2015 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -58,7 +58,9 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) { assert(type() == relocInfo::oop_type || type() == relocInfo::metadata_type, "how to encode else?"); narrowOop no = (type() == relocInfo::oop_type) ? - CompressedOops::encode((oop)x) : CompressedKlassPointers::encode((Klass*)x); + CompressedOops::encode((oop)x) : + // Type punning compressed klass pointer as narrowOop. + CompressedOops::narrow_oop_cast(CompressedKlassPointers::encode((Klass*)x)); nativeMovConstReg_at(addr())->set_narrow_oop(no, code()); } } else { diff --git a/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp b/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp index a4660e9ee0b..e9ccfc7c481 100644 --- a/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp +++ b/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp @@ -80,13 +80,6 @@ static void do_oop_load(InterpreterMacroAssembler* _masm, __ load_heap_oop(dst, offset, base, tmp1, tmp2, false, decorators); } -// ============================================================================ -// Platform-dependent initialization - -void TemplateTable::pd_initialize() { - // No ppc64 specific initialization. -} - Address TemplateTable::at_bcp(int offset) { // Not used on ppc. ShouldNotReachHere(); diff --git a/src/hotspot/cpu/ppc/vm_version_ppc.cpp b/src/hotspot/cpu/ppc/vm_version_ppc.cpp index 58bc1bc9caa..fd62cb5813a 100644 --- a/src/hotspot/cpu/ppc/vm_version_ppc.cpp +++ b/src/hotspot/cpu/ppc/vm_version_ppc.cpp @@ -29,6 +29,7 @@ #include "asm/macroAssembler.inline.hpp" #include "compiler/disassembler.hpp" #include "memory/resourceArea.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/java.hpp" #include "runtime/os.hpp" #include "runtime/stubCodeGenerator.hpp" @@ -372,9 +373,7 @@ void VM_Version::initialize() { if (!has_tm()) { vm_exit_during_initialization("RTM is not supported on this OS version."); } - } - if (UseRTMLocking) { #if INCLUDE_RTM_OPT if (!FLAG_IS_CMDLINE(UseRTMLocking)) { // RTM locking should be used only for applications with diff --git a/src/hotspot/cpu/s390/assembler_s390.hpp b/src/hotspot/cpu/s390/assembler_s390.hpp index cd1e7e2c5f2..96e494d52e7 100644 --- a/src/hotspot/cpu/s390/assembler_s390.hpp +++ b/src/hotspot/cpu/s390/assembler_s390.hpp @@ -206,18 +206,11 @@ class Address { if (roc.is_constant()) _disp += roc.as_constant(); else _index = roc.as_register(); } -#ifdef ASSERT - // ByteSize is only a class when ASSERT is defined, otherwise it's an int. Address(Register base, ByteSize disp) : - _base(base), - _index(noreg), - _disp(in_bytes(disp)) {} + Address(base, in_bytes(disp)) {} Address(Register base, Register index, ByteSize disp) : - _base(base), - _index(index), - _disp(in_bytes(disp)) {} -#endif + Address(base, index, in_bytes(disp)) {} // Aborts if disp is a register and base and index are set already. Address plus_disp(RegisterOrConstant disp) const { diff --git a/src/hotspot/cpu/s390/globals_s390.hpp b/src/hotspot/cpu/s390/globals_s390.hpp index d8f97b9c93b..80e7baca71d 100644 --- a/src/hotspot/cpu/s390/globals_s390.hpp +++ b/src/hotspot/cpu/s390/globals_s390.hpp @@ -83,37 +83,37 @@ define_pd_global(intx, InitArrayShortSize, 1*BytesPerLong); \ /* Reoptimize code-sequences of calls at runtime, e.g. replace an */ \ /* indirect call by a direct call. */ \ - product(bool, ReoptimizeCallSequences, true, \ + product(bool, ReoptimizeCallSequences, true, DIAGNOSTIC, \ "Reoptimize code-sequences of calls at runtime.") \ \ - product(bool, UseByteReverseInstruction, true, \ + product(bool, UseByteReverseInstruction, true, DIAGNOSTIC, \ "Use byte reverse instruction.") \ \ - product(bool, ExpandLoadingBaseDecode, true, "Expand the assembler " \ - "instruction required to load the base from DecodeN nodes during " \ - "matching.") \ - product(bool, ExpandLoadingBaseDecode_NN, true, "Expand the assembler " \ - "instruction required to load the base from DecodeN_NN nodes " \ - "during matching.") \ - product(bool, ExpandLoadingBaseEncode, true, "Expand the assembler " \ - "instruction required to load the base from EncodeP nodes during " \ - "matching.") \ - product(bool, ExpandLoadingBaseEncode_NN, true, "Expand the assembler " \ - "instruction required to load the base from EncodeP_NN nodes " \ - "during matching.") \ + product(bool, ExpandLoadingBaseDecode, true, DIAGNOSTIC, \ + "Expand the assembler instruction required to load the base from " \ + "DecodeN nodes during matching.") \ + product(bool, ExpandLoadingBaseDecode_NN, true, DIAGNOSTIC, \ + "Expand the assembler instruction required to load the base from " \ + "DecodeN_NN nodes during matching.") \ + product(bool, ExpandLoadingBaseEncode, true, DIAGNOSTIC, \ + "Expand the assembler instruction required to load the base from " \ + "EncodeP nodes during matching.") \ + product(bool, ExpandLoadingBaseEncode_NN, true, DIAGNOSTIC, \ + "Expand the assembler instruction required to load the base from " \ + "EncodeP_NN nodes during matching.") \ \ /* Seems to pay off with 2 pages already. */ \ - product(size_t, MVCLEThreshold, +2*(4*K), \ + product(size_t, MVCLEThreshold, +2*(4*K), DIAGNOSTIC, \ "Threshold above which page-aligned MVCLE copy/init is used.") \ \ - product(bool, PreferLAoverADD, false, \ + product(bool, PreferLAoverADD, false, DIAGNOSTIC, \ "Use LA/LAY instructions over ADD instructions (z/Architecture).") \ \ develop(bool, ZapEmptyStackFields, false, "Write 0x0101... to empty stack" \ " fields. Use this to ease stack debugging.") \ \ - product(bool, TraceTraps, false, "Trace all traps the signal handler" \ - "handles.") + product(bool, TraceTraps, false, DIAGNOSTIC, \ + "Trace all traps the signal handler handles.") // end of ARCH_FLAGS diff --git a/src/hotspot/cpu/s390/interp_masm_s390.cpp b/src/hotspot/cpu/s390/interp_masm_s390.cpp index 55b6f4c4677..3cf3a637fdf 100644 --- a/src/hotspot/cpu/s390/interp_masm_s390.cpp +++ b/src/hotspot/cpu/s390/interp_masm_s390.cpp @@ -1080,7 +1080,7 @@ void InterpreterMacroAssembler::lock_object(Register monitor, Register object) { void InterpreterMacroAssembler::unlock_object(Register monitor, Register object) { if (UseHeavyMonitors) { - call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), monitor); + call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), monitor); return; } @@ -1095,7 +1095,7 @@ void InterpreterMacroAssembler::unlock_object(Register monitor, Register object) // monitor->set_obj(NULL); // } else { // // Slow path. - // InterpreterRuntime::monitorexit(THREAD, monitor); + // InterpreterRuntime::monitorexit(monitor); // } const Register displaced_header = Z_ARG4; @@ -1149,12 +1149,12 @@ void InterpreterMacroAssembler::unlock_object(Register monitor, Register object) // } else { // // Slow path. - // InterpreterRuntime::monitorexit(THREAD, monitor); + // InterpreterRuntime::monitorexit(monitor); // The lock has been converted into a heavy lock and hence // we need to get into the slow case. z_stg(object, obj_entry); // Restore object entry, has been cleared above. - call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), monitor); + call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), monitor); // } diff --git a/src/hotspot/cpu/s390/macroAssembler_s390.cpp b/src/hotspot/cpu/s390/macroAssembler_s390.cpp index d68aa281f86..c71a15daa7c 100644 --- a/src/hotspot/cpu/s390/macroAssembler_s390.cpp +++ b/src/hotspot/cpu/s390/macroAssembler_s390.cpp @@ -1163,7 +1163,7 @@ void MacroAssembler::load_const_32to64(Register t, int64_t x, bool sign_extend) // Load narrow oop constant, no decompression. void MacroAssembler::load_narrow_oop(Register t, narrowOop a) { assert(UseCompressedOops, "must be on to call this method"); - load_const_32to64(t, a, false /*sign_extend*/); + load_const_32to64(t, CompressedOops::narrow_oop_value(a), false /*sign_extend*/); } // Load narrow klass constant, compression required. @@ -1181,7 +1181,7 @@ void MacroAssembler::load_narrow_klass(Register t, Klass* k) { void MacroAssembler::compare_immediate_narrow_oop(Register oop1, narrowOop oop2) { assert(UseCompressedOops, "must be on to call this method"); - Assembler::z_clfi(oop1, oop2); + Assembler::z_clfi(oop1, CompressedOops::narrow_oop_value(oop2)); } // Compare narrow oop in reg with narrow oop constant, no decompression. @@ -1273,9 +1273,7 @@ int MacroAssembler::patch_compare_immediate_32(address pos, int64_t np) { // The passed ptr must NOT be in compressed format! int MacroAssembler::patch_load_narrow_oop(address pos, oop o) { assert(UseCompressedOops, "Can only patch compressed oops"); - - narrowOop no = CompressedOops::encode(o); - return patch_load_const_32to64(pos, no); + return patch_load_const_32to64(pos, CompressedOops::narrow_oop_value(o)); } // Patching the immediate value of CPU version dependent load_narrow_klass sequence. @@ -1291,9 +1289,7 @@ int MacroAssembler::patch_load_narrow_klass(address pos, Klass* k) { // The passed ptr must NOT be in compressed format! int MacroAssembler::patch_compare_immediate_narrow_oop(address pos, oop o) { assert(UseCompressedOops, "Can only patch compressed oops"); - - narrowOop no = CompressedOops::encode(o); - return patch_compare_immediate_32(pos, no); + return patch_compare_immediate_32(pos, CompressedOops::narrow_oop_value(o)); } // Patching the immediate value of CPU version dependent compare_immediate_narrow_klass sequence. diff --git a/src/hotspot/cpu/s390/templateTable_s390.cpp b/src/hotspot/cpu/s390/templateTable_s390.cpp index 643d1807bf0..9c372db9e78 100644 --- a/src/hotspot/cpu/s390/templateTable_s390.cpp +++ b/src/hotspot/cpu/s390/templateTable_s390.cpp @@ -110,12 +110,6 @@ } #endif // ASSERT -// Platform-dependent initialization. - -void TemplateTable::pd_initialize() { - // No specific initialization. -} - // Address computation: local variables static inline Address iaddress(int n) { diff --git a/src/hotspot/cpu/s390/vm_version_s390.cpp b/src/hotspot/cpu/s390/vm_version_s390.cpp index 663b8d1dc44..3460a767fac 100644 --- a/src/hotspot/cpu/s390/vm_version_s390.cpp +++ b/src/hotspot/cpu/s390/vm_version_s390.cpp @@ -29,6 +29,7 @@ #include "compiler/disassembler.hpp" #include "code/compiledIC.hpp" #include "memory/resourceArea.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/java.hpp" #include "runtime/stubCodeGenerator.hpp" #include "runtime/vm_version.hpp" diff --git a/src/hotspot/cpu/x86/assembler_x86.hpp b/src/hotspot/cpu/x86/assembler_x86.hpp index bbcfb7ec64e..283285dc347 100644 --- a/src/hotspot/cpu/x86/assembler_x86.hpp +++ b/src/hotspot/cpu/x86/assembler_x86.hpp @@ -256,6 +256,19 @@ class Address { "inconsistent address"); } + // The following overloads are used in connection with the + // ByteSize type (see sizes.hpp). They simplify the use of + // ByteSize'd arguments in assembly code. + + Address(Register base, ByteSize disp) + : Address(base, in_bytes(disp)) {} + + Address(Register base, Register index, ScaleFactor scale, ByteSize disp) + : Address(base, index, scale, in_bytes(disp)) {} + + Address(Register base, RegisterOrConstant index, ScaleFactor scale, ByteSize disp) + : Address(base, index, scale, in_bytes(disp)) {} + Address plus_disp(int disp) const { Address a = (*this); a._disp += disp; @@ -276,51 +289,6 @@ class Address { return _base == a._base && _disp == a._disp && _index == a._index && _scale == a._scale; } - // The following two overloads are used in connection with the - // ByteSize type (see sizes.hpp). They simplify the use of - // ByteSize'd arguments in assembly code. Note that their equivalent - // for the optimized build are the member functions with int disp - // argument since ByteSize is mapped to an int type in that case. - // - // Note: DO NOT introduce similar overloaded functions for WordSize - // arguments as in the optimized mode, both ByteSize and WordSize - // are mapped to the same type and thus the compiler cannot make a - // distinction anymore (=> compiler errors). - -#ifdef ASSERT - Address(Register base, ByteSize disp) - : _base(base), - _index(noreg), - _xmmindex(xnoreg), - _scale(no_scale), - _disp(in_bytes(disp)), - _isxmmindex(false){ - } - - Address(Register base, Register index, ScaleFactor scale, ByteSize disp) - : _base(base), - _index(index), - _xmmindex(xnoreg), - _scale(scale), - _disp(in_bytes(disp)), - _isxmmindex(false){ - assert(!index->is_valid() == (scale == Address::no_scale), - "inconsistent address"); - } - Address(Register base, RegisterOrConstant index, ScaleFactor scale, ByteSize disp) - : _base (base), - _index(index.register_or_noreg()), - _xmmindex(xnoreg), - _scale(scale), - _disp (in_bytes(disp) + (index.constant_or_zero() * scale_size(scale))), - _isxmmindex(false) { - if (!index.is_register()) scale = Address::no_scale; - assert(!_index->is_valid() == (scale == Address::no_scale), - "inconsistent address"); - } - -#endif // ASSERT - // accessors bool uses(Register reg) const { return _base == reg || _index == reg; } Register base() const { return _base; } diff --git a/src/hotspot/cpu/x86/c1_CodeStubs_x86.cpp b/src/hotspot/cpu/x86/c1_CodeStubs_x86.cpp index 6b3ee2bdd9b..7d9fd365e18 100644 --- a/src/hotspot/cpu/x86/c1_CodeStubs_x86.cpp +++ b/src/hotspot/cpu/x86/c1_CodeStubs_x86.cpp @@ -238,6 +238,7 @@ NewInstanceStub::NewInstanceStub(LIR_Opr klass_reg, LIR_Opr result, ciInstanceKl _klass_reg = klass_reg; _info = new CodeEmitInfo(info); assert(stub_id == Runtime1::new_instance_id || + stub_id == Runtime1::new_instance_no_inline_id || stub_id == Runtime1::fast_new_instance_id || stub_id == Runtime1::fast_new_instance_init_check_id, "need new_instance id"); diff --git a/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp b/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp index 4dab43332c4..6c1ac1bfbf2 100644 --- a/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp +++ b/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp @@ -1288,11 +1288,12 @@ void LIRGenerator::do_NewInstance(NewInstance* x) { CodeEmitInfo* info = state_for(x, x->state()); LIR_Opr reg = result_register_for(x->type()); new_instance(reg, x->klass(), x->is_unresolved(), - FrameMap::rcx_oop_opr, - FrameMap::rdi_oop_opr, - FrameMap::rsi_oop_opr, - LIR_OprFact::illegalOpr, - FrameMap::rdx_metadata_opr, info); + /* allow_inline */ false, + FrameMap::rcx_oop_opr, + FrameMap::rdi_oop_opr, + FrameMap::rsi_oop_opr, + LIR_OprFact::illegalOpr, + FrameMap::rdx_metadata_opr, info); LIR_Opr result = rlock_result(x); __ move(reg, result); } @@ -1302,15 +1303,15 @@ void LIRGenerator::do_NewInlineTypeInstance(NewInlineTypeInstance* x) { CodeEmitInfo* info = state_for(x, x->state_before()); x->set_to_object_type(); LIR_Opr reg = result_register_for(x->type()); - new_instance(reg, x->klass(), x->is_unresolved(), - FrameMap::rcx_oop_opr, - FrameMap::rdi_oop_opr, - FrameMap::rsi_oop_opr, - LIR_OprFact::illegalOpr, - FrameMap::rdx_metadata_opr, info); + new_instance(reg, x->klass(), false, + /* allow_inline */ true, + FrameMap::rcx_oop_opr, + FrameMap::rdi_oop_opr, + FrameMap::rsi_oop_opr, + LIR_OprFact::illegalOpr, + FrameMap::rdx_metadata_opr, info); LIR_Opr result = rlock_result(x); __ move(reg, result); - } void LIRGenerator::do_NewTypeArray(NewTypeArray* x) { diff --git a/src/hotspot/cpu/x86/c1_Runtime1_x86.cpp b/src/hotspot/cpu/x86/c1_Runtime1_x86.cpp index 185710c85a6..97d81a36eed 100644 --- a/src/hotspot/cpu/x86/c1_Runtime1_x86.cpp +++ b/src/hotspot/cpu/x86/c1_Runtime1_x86.cpp @@ -1016,6 +1016,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) { break; case new_instance_id: + case new_instance_no_inline_id: case fast_new_instance_id: case fast_new_instance_init_check_id: { @@ -1024,6 +1025,8 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) { if (id == new_instance_id) { __ set_info("new_instance", dont_gc_arguments); + } else if (id == new_instance_no_inline_id) { + __ set_info("new_instance_no_inline", dont_gc_arguments); } else if (id == fast_new_instance_id) { __ set_info("fast new_instance", dont_gc_arguments); } else { @@ -1088,7 +1091,12 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) { __ enter(); OopMap* map = save_live_registers(sasm, 2); - int call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_instance), klass); + int call_offset; + if (id == new_instance_no_inline_id) { + call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_instance_no_inline), klass); + } else { + call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_instance), klass); + } oop_maps = new OopMapSet(); oop_maps->add_gc_map(call_offset, map); restore_live_registers_except_rax(sasm); diff --git a/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp b/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp index b6bb0cfd79b..b0d31fb6982 100644 --- a/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp @@ -2262,7 +2262,7 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2, // Search for Non-ASCII character (Negative byte value) in a byte array, // return true if it has any and false otherwise. // ..\jdk\src\java.base\share\classes\java\lang\StringCoding.java -// @HotSpotIntrinsicCandidate +// @IntrinsicCandidate // private static boolean hasNegatives(byte[] ba, int off, int len) { // for (int i = off; i < off + len; i++) { // if (ba[i] < 0) { diff --git a/src/hotspot/cpu/x86/globals_x86.hpp b/src/hotspot/cpu/x86/globals_x86.hpp index 2d57b06400b..bb6b93dd5a6 100644 --- a/src/hotspot/cpu/x86/globals_x86.hpp +++ b/src/hotspot/cpu/x86/globals_x86.hpp @@ -216,6 +216,7 @@ define_pd_global(bool, InlineTypeReturnedAsFields, LP64_ONLY(true) NOT_LP64(fals "for copy, inflate and fill. When this value is set as zero" \ "compare operations can also use AVX512 intrinsics.") \ range(0, max_jint) \ + constraint(AVX3ThresholdConstraintFunc,AfterErgo) \ \ product(bool, IntelJccErratumMitigation, true, DIAGNOSTIC, \ "Turn off JVM mitigations related to Intel micro code " \ diff --git a/src/hotspot/cpu/x86/interp_masm_x86.cpp b/src/hotspot/cpu/x86/interp_masm_x86.cpp index 3122090c519..7d7a77f25c8 100644 --- a/src/hotspot/cpu/x86/interp_masm_x86.cpp +++ b/src/hotspot/cpu/x86/interp_masm_x86.cpp @@ -1429,9 +1429,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg) { "The argument is only for looks. It must be c_rarg1"); if (UseHeavyMonitors) { - call_VM(noreg, - CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), - lock_reg); + call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), lock_reg); } else { Label done; @@ -1472,12 +1470,10 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg) { // zero for simple unlock of a stack-lock case jcc(Assembler::zero, done); + // Call the runtime routine for slow case. - movptr(Address(lock_reg, BasicObjectLock::obj_offset_in_bytes()), - obj_reg); // restore obj - call_VM(noreg, - CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), - lock_reg); + movptr(Address(lock_reg, BasicObjectLock::obj_offset_in_bytes()), obj_reg); // restore obj + call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorexit), lock_reg); bind(done); diff --git a/src/hotspot/cpu/x86/javaFrameAnchor_x86.hpp b/src/hotspot/cpu/x86/javaFrameAnchor_x86.hpp index 785856e38f2..bb39c8e513e 100644 --- a/src/hotspot/cpu/x86/javaFrameAnchor_x86.hpp +++ b/src/hotspot/cpu/x86/javaFrameAnchor_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -78,8 +78,6 @@ void set_last_Java_sp(intptr_t* sp) { _last_Java_sp = sp; } - intptr_t* last_Java_fp(void) { return _last_Java_fp; } - // Assert (last_Java_sp == NULL || fp == NULL) - void set_last_Java_fp(intptr_t* fp) { _last_Java_fp = fp; } + intptr_t* last_Java_fp(void) { return _last_Java_fp; } #endif // CPU_X86_JAVAFRAMEANCHOR_X86_HPP diff --git a/src/hotspot/cpu/x86/macroAssembler_x86.cpp b/src/hotspot/cpu/x86/macroAssembler_x86.cpp index 700e2ea5e7b..427d081bf89 100644 --- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp @@ -1161,7 +1161,7 @@ void MacroAssembler::biased_locking_enter(Register lock_reg, // the prototype header is no longer biased and we have to revoke // the bias on this object. testptr(header_reg, markWord::biased_lock_mask_in_place); - jccb(Assembler::notZero, try_revoke_bias); + jcc(Assembler::notZero, try_revoke_bias); // Biasing is still enabled for this data type. See whether the // epoch of the current bias is still valid, meaning that the epoch @@ -5341,7 +5341,7 @@ bool MacroAssembler::move_helper(VMReg from, VMReg to, BasicType bt, RegState re } // Read all fields from an inline type oop and store the values in registers/stack slots -bool MacroAssembler::unpack_inline_helper(const GrowableArray<SigEntry>* sig, int& sig_index, VMReg from, VMRegPair* regs_to, +bool MacroAssembler::unpack_inline_helper(const GrowableArray<SigEntry>* sig, int& sig_index, VMReg from, int& from_index, VMRegPair* regs_to, int& to_index, RegState reg_state[], int ret_off, int extra_stack_offset) { Register fromReg = from->is_reg() ? from->as_Register() : noreg; assert(sig->at(sig_index)._bt == T_VOID, "should be at end delimiter"); @@ -5419,6 +5419,7 @@ bool MacroAssembler::unpack_inline_helper(const GrowableArray<SigEntry>* sig, in // This is okay because no one else will write to that slot reg_state[from->value()] = reg_writable; } + from_index--; return done; } @@ -5831,7 +5832,7 @@ void MacroAssembler::generate_fill(BasicType t, bool aligned, } // encode char[] to byte[] in ISO_8859_1 - //@HotSpotIntrinsicCandidate + //@IntrinsicCandidate //private static int implEncodeISOArray(byte[] sa, int sp, //byte[] da, int dp, int len) { // int i = 0; @@ -8208,7 +8209,7 @@ void MacroAssembler::crc32c_ipl_alg2_alt2(Register in_out, Register in1, Registe // Compress char[] array to byte[]. // ..\jdk\src\java.base\share\classes\java\lang\StringUTF16.java -// @HotSpotIntrinsicCandidate +// @IntrinsicCandidate // private static int compress(char[] src, int srcOff, byte[] dst, int dstOff, int len) { // for (int i = 0; i < len; i++) { // int c = src[srcOff++]; @@ -8424,7 +8425,7 @@ void MacroAssembler::char_array_compress(Register src, Register dst, Register le // Inflate byte[] array to char[]. // ..\jdk\src\java.base\share\classes\java\lang\StringLatin1.java -// @HotSpotIntrinsicCandidate +// @IntrinsicCandidate // private static void inflate(byte[] src, int srcOff, char[] dst, int dstOff, int len) { // for (int i = 0; i < len; i++) { // dst[dstOff++] = (char)(src[srcOff++] & 0xff); diff --git a/src/hotspot/cpu/x86/macroAssembler_x86.hpp b/src/hotspot/cpu/x86/macroAssembler_x86.hpp index 501d5a29ee6..5537f1aed54 100644 --- a/src/hotspot/cpu/x86/macroAssembler_x86.hpp +++ b/src/hotspot/cpu/x86/macroAssembler_x86.hpp @@ -1659,7 +1659,7 @@ class MacroAssembler: public Assembler { // Unpack all inline type arguments passed as oops void unpack_inline_args(Compile* C, bool receiver_only); bool move_helper(VMReg from, VMReg to, BasicType bt, RegState reg_state[], int ret_off, int extra_stack_offset); - bool unpack_inline_helper(const GrowableArray<SigEntry>* sig, int& sig_index, VMReg from, VMRegPair* regs_to, int& to_index, + bool unpack_inline_helper(const GrowableArray<SigEntry>* sig, int& sig_index, VMReg from, int& from_index, VMRegPair* regs_to, int& to_index, RegState reg_state[], int ret_off, int extra_stack_offset); bool pack_inline_helper(const GrowableArray<SigEntry>* sig, int& sig_index, int vtarg_index, VMReg to, VMRegPair* regs_from, int regs_from_count, int& from_index, RegState reg_state[], diff --git a/src/hotspot/cpu/x86/rdtsc_x86.cpp b/src/hotspot/cpu/x86/rdtsc_x86.cpp index 1fafbe1c68c..a4e743cc2df 100644 --- a/src/hotspot/cpu/x86/rdtsc_x86.cpp +++ b/src/hotspot/cpu/x86/rdtsc_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "rdtsc_x86.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/orderAccess.hpp" #include "runtime/thread.inline.hpp" #include "vm_version_ext_x86.hpp" diff --git a/src/hotspot/cpu/x86/relocInfo_x86.cpp b/src/hotspot/cpu/x86/relocInfo_x86.cpp index 6bdb0a2ee06..794bfb7bf3e 100644 --- a/src/hotspot/cpu/x86/relocInfo_x86.cpp +++ b/src/hotspot/cpu/x86/relocInfo_x86.cpp @@ -52,12 +52,13 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) { address disp = Assembler::locate_operand(addr(), which); // both compressed oops and compressed classes look the same if (CompressedOops::is_in((void*)x)) { - if (verify_only) { - guarantee(*(uint32_t*) disp == CompressedOops::encode((oop)x), "instructions must match"); + uint32_t encoded = CompressedOops::narrow_oop_value((oop)x); + if (verify_only) { + guarantee(*(uint32_t*) disp == encoded, "instructions must match"); + } else { + *(int32_t*) disp = encoded; + } } else { - *(int32_t*) disp = CompressedOops::encode((oop)x); - } - } else { if (verify_only) { guarantee(*(uint32_t*) disp == CompressedKlassPointers::encode((Klass*)x), "instructions must match"); } else { diff --git a/src/hotspot/cpu/x86/templateTable_x86.cpp b/src/hotspot/cpu/x86/templateTable_x86.cpp index d72578aba9e..0c3ea82c568 100644 --- a/src/hotspot/cpu/x86/templateTable_x86.cpp +++ b/src/hotspot/cpu/x86/templateTable_x86.cpp @@ -48,11 +48,6 @@ static const Register rbcp = LP64_ONLY(r13) NOT_LP64(rsi); static const Register rlocals = LP64_ONLY(r14) NOT_LP64(rdi); -// Platform-dependent initialization -void TemplateTable::pd_initialize() { - // No x86 specific initialization -} - // Address Computation: local variables static inline Address iaddress(int n) { return Address(rlocals, Interpreter::local_offset_in_bytes(n)); diff --git a/src/hotspot/cpu/x86/vmStructs_x86.hpp b/src/hotspot/cpu/x86/vmStructs_x86.hpp index d16e4947fff..8b84e4ee649 100644 --- a/src/hotspot/cpu/x86/vmStructs_x86.hpp +++ b/src/hotspot/cpu/x86/vmStructs_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -37,7 +37,9 @@ #define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \ LP64_ONLY(declare_constant(frame::arg_reg_save_area_bytes)) \ declare_constant(frame::interpreter_frame_sender_sp_offset) \ - declare_constant(frame::interpreter_frame_last_sp_offset) \ + declare_constant(frame::interpreter_frame_last_sp_offset) + +#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \ declare_constant(VM_Version::CPU_CX8) \ declare_constant(VM_Version::CPU_CMOV) \ declare_constant(VM_Version::CPU_FXSR) \ @@ -68,22 +70,21 @@ declare_constant(VM_Version::CPU_AVX512DQ) \ declare_constant(VM_Version::CPU_AVX512PF) \ declare_constant(VM_Version::CPU_AVX512ER) \ - declare_constant(VM_Version::CPU_AVX512CD) - -#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512BW", CPU_AVX512BW) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512VL", CPU_AVX512VL) \ - declare_preprocessor_constant("VM_Version::CPU_SHA", CPU_SHA) \ - declare_preprocessor_constant("VM_Version::CPU_FMA", CPU_FMA) \ - declare_preprocessor_constant("VM_Version::CPU_VZEROUPPER", CPU_VZEROUPPER) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512_VPOPCNTDQ", CPU_AVX512_VPOPCNTDQ) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512_VPCLMULQDQ", CPU_AVX512_VPCLMULQDQ) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512_VAES", CPU_AVX512_VAES) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512_VNNI", CPU_AVX512_VNNI) \ - declare_preprocessor_constant("VM_Version::CPU_FLUSH", CPU_FLUSH) \ - declare_preprocessor_constant("VM_Version::CPU_FLUSHOPT", CPU_FLUSHOPT) \ - declare_preprocessor_constant("VM_Version::CPU_CLWB", CPU_CLWB) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512_VBMI2", CPU_AVX512_VBMI2) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512_VBMI", CPU_AVX512_VBMI) + declare_constant(VM_Version::CPU_AVX512CD) \ + declare_constant(VM_Version::CPU_AVX512BW) \ + declare_constant(VM_Version::CPU_AVX512VL) \ + declare_constant(VM_Version::CPU_SHA) \ + declare_constant(VM_Version::CPU_FMA) \ + declare_constant(VM_Version::CPU_VZEROUPPER) \ + declare_constant(VM_Version::CPU_AVX512_VPOPCNTDQ) \ + declare_constant(VM_Version::CPU_AVX512_VPCLMULQDQ) \ + declare_constant(VM_Version::CPU_AVX512_VAES) \ + declare_constant(VM_Version::CPU_AVX512_VNNI) \ + declare_constant(VM_Version::CPU_FLUSH) \ + declare_constant(VM_Version::CPU_FLUSHOPT) \ + declare_constant(VM_Version::CPU_CLWB) \ + declare_constant(VM_Version::CPU_AVX512_VBMI2) \ + declare_constant(VM_Version::CPU_AVX512_VBMI) \ + declare_constant(VM_Version::CPU_HV) #endif // CPU_X86_VMSTRUCTS_X86_HPP diff --git a/src/hotspot/cpu/x86/vm_version_x86.cpp b/src/hotspot/cpu/x86/vm_version_x86.cpp index f2a14b35f91..bc7017f4739 100644 --- a/src/hotspot/cpu/x86/vm_version_x86.cpp +++ b/src/hotspot/cpu/x86/vm_version_x86.cpp @@ -29,6 +29,7 @@ #include "logging/log.hpp" #include "logging/logStream.hpp" #include "memory/resourceArea.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/java.hpp" #include "runtime/os.hpp" #include "runtime/stubCodeGenerator.hpp" @@ -43,6 +44,7 @@ int VM_Version::_model; int VM_Version::_stepping; bool VM_Version::_has_intel_jcc_erratum; VM_Version::CpuidInfo VM_Version::_cpuid_info = { 0, }; +const char* VM_Version::_features_names[] = { FEATURES_NAMES }; // Address of instruction which causes SEGV address VM_Version::_cpuinfo_segv_addr = 0; @@ -771,65 +773,14 @@ void VM_Version::get_processor_features() { } char buf[512]; - int res = jio_snprintf(buf, sizeof(buf), - "(%u cores per cpu, %u threads per core) family %d model %d stepping %d microcode 0x%x" - "%s%s%s%s%s%s%s%s%s%s" "%s%s%s%s%s%s%s%s%s%s" "%s%s%s%s%s%s%s%s%s%s" "%s%s%s%s%s%s%s%s%s%s" "%s%s%s%s%s%s", - - cores_per_cpu(), threads_per_core(), - cpu_family(), _model, _stepping, os::cpu_microcode_revision(), - - (supports_cmov() ? ", cmov" : ""), - (supports_cmpxchg8() ? ", cx8" : ""), - (supports_fxsr() ? ", fxsr" : ""), - (supports_mmx() ? ", mmx" : ""), - (supports_sse() ? ", sse" : ""), - (supports_sse2() ? ", sse2" : ""), - (supports_sse3() ? ", sse3" : ""), - (supports_ssse3()? ", ssse3": ""), - (supports_sse4_1() ? ", sse4.1" : ""), - (supports_sse4_2() ? ", sse4.2" : ""), - - (supports_popcnt() ? ", popcnt" : ""), - (supports_vzeroupper() ? ", vzeroupper" : ""), - (supports_avx() ? ", avx" : ""), - (supports_avx2() ? ", avx2" : ""), - (supports_aes() ? ", aes" : ""), - (supports_clmul() ? ", clmul" : ""), - (supports_erms() ? ", erms" : ""), - (supports_rtm() ? ", rtm" : ""), - (supports_3dnow_prefetch() ? ", 3dnowpref" : ""), - (supports_lzcnt() ? ", lzcnt": ""), - - (supports_sse4a() ? ", sse4a": ""), - (supports_ht() ? ", ht": ""), - (supports_tsc() ? ", tsc": ""), - (supports_tscinv_bit() ? ", tscinvbit": ""), - (supports_tscinv() ? ", tscinv": ""), - (supports_bmi1() ? ", bmi1" : ""), - (supports_bmi2() ? ", bmi2" : ""), - (supports_adx() ? ", adx" : ""), - (supports_evex() ? ", avx512f" : ""), - (supports_avx512dq() ? ", avx512dq" : ""), - - (supports_avx512pf() ? ", avx512pf" : ""), - (supports_avx512er() ? ", avx512er" : ""), - (supports_avx512cd() ? ", avx512cd" : ""), - (supports_avx512bw() ? ", avx512bw" : ""), - (supports_avx512vl() ? ", avx512vl" : ""), - (supports_avx512_vpopcntdq() ? ", avx512_vpopcntdq" : ""), - (supports_avx512_vpclmulqdq() ? ", avx512_vpclmulqdq" : ""), - (supports_avx512_vbmi() ? ", avx512_vbmi" : ""), - (supports_avx512_vbmi2() ? ", avx512_vbmi2" : ""), - (supports_avx512_vaes() ? ", avx512_vaes" : ""), - - (supports_avx512_vnni() ? ", avx512_vnni" : ""), - (supports_sha() ? ", sha" : ""), - (supports_fma() ? ", fma" : ""), - (supports_clflush() ? ", clflush" : ""), - (supports_clflushopt() ? ", clflushopt" : ""), - (supports_clwb() ? ", clwb" : "")); - - assert(res > 0, "not enough temporary space allocated"); // increase 'buf' size + int res = jio_snprintf( + buf, sizeof(buf), + "(%u cores per cpu, %u threads per core) family %d model %d stepping %d microcode 0x%x", + cores_per_cpu(), threads_per_core(), + cpu_family(), _model, _stepping, os::cpu_microcode_revision()); + assert(res > 0, "not enough temporary space allocated"); + assert(exact_log2_long(CPU_MAX_FEATURE) + 1 == sizeof(_features_names) / sizeof(char*), "wrong size features_names"); + insert_features_names(buf + res, sizeof(buf) - res, _features_names); _features_string = os::strdup(buf); @@ -1161,13 +1112,6 @@ void VM_Version::get_processor_features() { } #endif // COMPILER2 && ASSERT - if (!FLAG_IS_DEFAULT(AVX3Threshold)) { - if (!is_power_of_2(AVX3Threshold)) { - warning("AVX3Threshold must be a power of 2"); - FLAG_SET_DEFAULT(AVX3Threshold, 4096); - } - } - #ifdef _LP64 if (FLAG_IS_DEFAULT(UseMultiplyToLenIntrinsic)) { UseMultiplyToLenIntrinsic = true; diff --git a/src/hotspot/cpu/x86/vm_version_x86.hpp b/src/hotspot/cpu/x86/vm_version_x86.hpp index 2fce29a52e4..e2cf0e08489 100644 --- a/src/hotspot/cpu/x86/vm_version_x86.hpp +++ b/src/hotspot/cpu/x86/vm_version_x86.hpp @@ -27,7 +27,6 @@ #include "memory/universe.hpp" #include "runtime/abstract_vm_version.hpp" -#include "runtime/globals_extension.hpp" class VM_Version : public Abstract_VM_Version { friend class VMStructs; @@ -299,59 +298,87 @@ class VM_Version : public Abstract_VM_Version { static address _cpuinfo_segv_addr; // address of instruction which causes SEGV static address _cpuinfo_cont_addr; // address of instruction after the one which causes SEGV - enum Feature_Flag { - CPU_CX8 = (1 << 0), // next bits are from cpuid 1 (EDX) - CPU_CMOV = (1 << 1), - CPU_FXSR = (1 << 2), - CPU_HT = (1 << 3), - CPU_MMX = (1 << 4), - CPU_3DNOW_PREFETCH = (1 << 5), // Processor supports 3dnow prefetch and prefetchw instructions - // may not necessarily support other 3dnow instructions - CPU_SSE = (1 << 6), - CPU_SSE2 = (1 << 7), - CPU_SSE3 = (1 << 8), // SSE3 comes from cpuid 1 (ECX) - CPU_SSSE3 = (1 << 9), - CPU_SSE4A = (1 << 10), - CPU_SSE4_1 = (1 << 11), - CPU_SSE4_2 = (1 << 12), - CPU_POPCNT = (1 << 13), - CPU_LZCNT = (1 << 14), - CPU_TSC = (1 << 15), - CPU_TSCINV = (1 << 16), - CPU_AVX = (1 << 17), - CPU_AVX2 = (1 << 18), - CPU_AES = (1 << 19), - CPU_ERMS = (1 << 20), // enhanced 'rep movsb/stosb' instructions - CPU_CLMUL = (1 << 21), // carryless multiply for CRC - CPU_BMI1 = (1 << 22), - CPU_BMI2 = (1 << 23), - CPU_RTM = (1 << 24), // Restricted Transactional Memory instructions - CPU_ADX = (1 << 25), - CPU_AVX512F = (1 << 26), // AVX 512bit foundation instructions - CPU_AVX512DQ = (1 << 27), - CPU_AVX512PF = (1 << 28), - CPU_AVX512ER = (1 << 29), - CPU_AVX512CD = (1 << 30) - // Keeping sign bit 31 unassigned. + enum Feature_Flag : uint64_t { + CPU_CX8 = (1ULL << 0), // next bits are from cpuid 1 (EDX) + CPU_CMOV = (1ULL << 1), + CPU_FXSR = (1ULL << 2), + CPU_HT = (1ULL << 3), + + CPU_MMX = (1ULL << 4), + CPU_3DNOW_PREFETCH = (1ULL << 5), // Processor supports 3dnow prefetch and prefetchw instructions + // may not necessarily support other 3dnow instructions + CPU_SSE = (1ULL << 6), + CPU_SSE2 = (1ULL << 7), + + CPU_SSE3 = (1ULL << 8), // SSE3 comes from cpuid 1 (ECX) + CPU_SSSE3 = (1ULL << 9), + CPU_SSE4A = (1ULL << 10), + CPU_SSE4_1 = (1ULL << 11), + + CPU_SSE4_2 = (1ULL << 12), + CPU_POPCNT = (1ULL << 13), + CPU_LZCNT = (1ULL << 14), + CPU_TSC = (1ULL << 15), + + CPU_TSCINV_BIT = (1ULL << 16), + CPU_TSCINV = (1ULL << 17), + CPU_AVX = (1ULL << 18), + CPU_AVX2 = (1ULL << 19), + + CPU_AES = (1ULL << 20), + CPU_ERMS = (1ULL << 21), // enhanced 'rep movsb/stosb' instructions + CPU_CLMUL = (1ULL << 22), // carryless multiply for CRC + CPU_BMI1 = (1ULL << 23), + + CPU_BMI2 = (1ULL << 24), + CPU_RTM = (1ULL << 25), // Restricted Transactional Memory instructions + CPU_ADX = (1ULL << 26), + CPU_AVX512F = (1ULL << 27), // AVX 512bit foundation instructions + + CPU_AVX512DQ = (1ULL << 28), + CPU_AVX512PF = (1ULL << 29), + CPU_AVX512ER = (1ULL << 30), + CPU_AVX512CD = (1ULL << 31), + + CPU_AVX512BW = (1ULL << 32), // Byte and word vector instructions + CPU_AVX512VL = (1ULL << 33), // EVEX instructions with smaller vector length + CPU_SHA = (1ULL << 34), // SHA instructions + CPU_FMA = (1ULL << 35), // FMA instructions + + CPU_VZEROUPPER = (1ULL << 36), // Vzeroupper instruction + CPU_AVX512_VPOPCNTDQ = (1ULL << 37), // Vector popcount + CPU_AVX512_VPCLMULQDQ = (1ULL << 38), // Vector carryless multiplication + CPU_AVX512_VAES = (1ULL << 39), // Vector AES instruction + + CPU_AVX512_VNNI = (1ULL << 40), // Vector Neural Network Instructions + CPU_FLUSH = (1ULL << 41), // flush instruction + CPU_FLUSHOPT = (1ULL << 42), // flusopth instruction + CPU_CLWB = (1ULL << 43), // clwb instruction + + CPU_AVX512_VBMI2 = (1ULL << 44), // VBMI2 shift left double instructions + CPU_AVX512_VBMI = (1ULL << 45), // Vector BMI instructions + CPU_HV = (1ULL << 46), // Hypervisor instructions + + CPU_MAX_FEATURE = CPU_HV }; -#define CPU_AVX512BW ((uint64_t)UCONST64( 0x100000000)) // enums are limited to 31 bit -#define CPU_AVX512VL ((uint64_t)UCONST64( 0x200000000)) // EVEX instructions with smaller vector length -#define CPU_SHA ((uint64_t)UCONST64( 0x400000000)) // SHA instructions -#define CPU_FMA ((uint64_t)UCONST64( 0x800000000)) // FMA instructions -#define CPU_VZEROUPPER ((uint64_t)UCONST64( 0x1000000000)) // Vzeroupper instruction -#define CPU_AVX512_VPOPCNTDQ ((uint64_t)UCONST64( 0x2000000000)) // Vector popcount -#define CPU_AVX512_VPCLMULQDQ ((uint64_t)UCONST64( 0x4000000000)) // Vector carryless multiplication -#define CPU_AVX512_VAES ((uint64_t)UCONST64( 0x8000000000)) // Vector AES instructions -#define CPU_AVX512_VNNI ((uint64_t)UCONST64( 0x10000000000)) // Vector Neural Network Instructions -#define CPU_FLUSH ((uint64_t)UCONST64( 0x20000000000)) // flush instruction -#define CPU_FLUSHOPT ((uint64_t)UCONST64( 0x40000000000)) // flushopt instruction -#define CPU_CLWB ((uint64_t)UCONST64( 0x80000000000)) // clwb instruction -#define CPU_AVX512_VBMI2 ((uint64_t)UCONST64(0x100000000000)) // VBMI2 shift left double instructions -#define CPU_AVX512_VBMI ((uint64_t)UCONST64(0x200000000000)) // Vector BMI instructions -#define CPU_HV_PRESENT ((uint64_t)UCONST64(0x400000000000)) // for hypervisor detection - -// NB! When adding new CPU feature detection consider updating vmStructs_x86.hpp, vmStructs_jvmci.hpp, and VM_Version::get_processor_features(). +#define FEATURES_NAMES \ + "cx8", "cmov", "fxsr", "ht", \ + "mmx", "3dnowpref", "sse", "sse2", \ + "sse3", "ssse3", "sse4a", "sse4.1", \ + "sse4.2", "popcnt", "lzcnt", "tsc", \ + "tscinvbit", "tscinv", "avx", "avx2", \ + "aes", "erms", "clmul", "bmi1", \ + "bmi2", "rtm", "adx", "avx512f", \ + "avx512dq", "avx512pf", "avx512er", "avx512cd", \ + "avx512bw", "avx512vl", "sha", "fma", \ + "vzeroupper", "avx512_vpopcntdq", "avx512_vpclmulqdq", "avx512_vaes", \ + "avx512_vnni", "clflush", "clflushopt", "clwb", \ + "avx512_vmbi2", "avx512_vmbi", "hv" + + static const char* _features_names[]; + + // NB! When adding new CPU feature detection consider updating vmStructs_x86.hpp, vmStructs_jvmci.hpp, and VM_Version::get_processor_features(). enum Extended_Family { // AMD @@ -583,13 +610,13 @@ enum Extended_Family { } } if (_cpuid_info.std_cpuid1_ecx.bits.hv != 0) - result |= CPU_HV_PRESENT; + result |= CPU_HV; if (_cpuid_info.sef_cpuid7_ebx.bits.bmi1 != 0) result |= CPU_BMI1; if (_cpuid_info.std_cpuid1_edx.bits.tsc != 0) result |= CPU_TSC; if (_cpuid_info.ext_cpuid7_edx.bits.tsc_invariance != 0) - result |= CPU_TSCINV; + result |= CPU_TSCINV_BIT; if (_cpuid_info.std_cpuid1_ecx.bits.aes != 0) result |= CPU_AES; if (_cpuid_info.sef_cpuid7_ebx.bits.erms != 0) @@ -619,6 +646,7 @@ enum Extended_Family { if (_cpuid_info.ext_cpuid1_ecx.bits.sse4a != 0) result |= CPU_SSE4A; } + // Intel features. if (is_intel()) { if (_cpuid_info.ext_cpuid1_ecx.bits.lzcnt_intel != 0) @@ -642,6 +670,13 @@ enum Extended_Family { } } + // Composite features. + if (supports_tscinv_bit() && + ((is_amd_family() && !is_amd_Barcelona()) || + is_intel_tsc_synched_at_init())) { + result |= CPU_TSCINV; + } + return result; } @@ -828,54 +863,54 @@ enum Extended_Family { // // Feature identification // - static bool supports_cpuid() { return _features != 0; } - static bool supports_cmpxchg8() { return (_features & CPU_CX8) != 0; } - static bool supports_cmov() { return (_features & CPU_CMOV) != 0; } - static bool supports_fxsr() { return (_features & CPU_FXSR) != 0; } - static bool supports_ht() { return (_features & CPU_HT) != 0; } - static bool supports_mmx() { return (_features & CPU_MMX) != 0; } - static bool supports_sse() { return (_features & CPU_SSE) != 0; } - static bool supports_sse2() { return (_features & CPU_SSE2) != 0; } - static bool supports_sse3() { return (_features & CPU_SSE3) != 0; } - static bool supports_ssse3() { return (_features & CPU_SSSE3)!= 0; } - static bool supports_sse4_1() { return (_features & CPU_SSE4_1) != 0; } - static bool supports_sse4_2() { return (_features & CPU_SSE4_2) != 0; } - static bool supports_popcnt() { return (_features & CPU_POPCNT) != 0; } - static bool supports_avx() { return (_features & CPU_AVX) != 0; } - static bool supports_avx2() { return (_features & CPU_AVX2) != 0; } - static bool supports_tsc() { return (_features & CPU_TSC) != 0; } - static bool supports_aes() { return (_features & CPU_AES) != 0; } - static bool supports_erms() { return (_features & CPU_ERMS) != 0; } - static bool supports_clmul() { return (_features & CPU_CLMUL) != 0; } - static bool supports_rtm() { return (_features & CPU_RTM) != 0; } - static bool supports_bmi1() { return (_features & CPU_BMI1) != 0; } - static bool supports_bmi2() { return (_features & CPU_BMI2) != 0; } - static bool supports_adx() { return (_features & CPU_ADX) != 0; } - static bool supports_evex() { return (_features & CPU_AVX512F) != 0; } - static bool supports_avx512dq() { return (_features & CPU_AVX512DQ) != 0; } - static bool supports_avx512pf() { return (_features & CPU_AVX512PF) != 0; } - static bool supports_avx512er() { return (_features & CPU_AVX512ER) != 0; } - static bool supports_avx512cd() { return (_features & CPU_AVX512CD) != 0; } - static bool supports_avx512bw() { return (_features & CPU_AVX512BW) != 0; } - static bool supports_avx512vl() { return (_features & CPU_AVX512VL) != 0; } - static bool supports_avx512vlbw() { return (supports_evex() && supports_avx512bw() && supports_avx512vl()); } - static bool supports_avx512vldq() { return (supports_evex() && supports_avx512dq() && supports_avx512vl()); } + static bool supports_cpuid() { return _features != 0; } + static bool supports_cmpxchg8() { return (_features & CPU_CX8) != 0; } + static bool supports_cmov() { return (_features & CPU_CMOV) != 0; } + static bool supports_fxsr() { return (_features & CPU_FXSR) != 0; } + static bool supports_ht() { return (_features & CPU_HT) != 0; } + static bool supports_mmx() { return (_features & CPU_MMX) != 0; } + static bool supports_sse() { return (_features & CPU_SSE) != 0; } + static bool supports_sse2() { return (_features & CPU_SSE2) != 0; } + static bool supports_sse3() { return (_features & CPU_SSE3) != 0; } + static bool supports_ssse3() { return (_features & CPU_SSSE3)!= 0; } + static bool supports_sse4_1() { return (_features & CPU_SSE4_1) != 0; } + static bool supports_sse4_2() { return (_features & CPU_SSE4_2) != 0; } + static bool supports_popcnt() { return (_features & CPU_POPCNT) != 0; } + static bool supports_avx() { return (_features & CPU_AVX) != 0; } + static bool supports_avx2() { return (_features & CPU_AVX2) != 0; } + static bool supports_tsc() { return (_features & CPU_TSC) != 0; } + static bool supports_aes() { return (_features & CPU_AES) != 0; } + static bool supports_erms() { return (_features & CPU_ERMS) != 0; } + static bool supports_clmul() { return (_features & CPU_CLMUL) != 0; } + static bool supports_rtm() { return (_features & CPU_RTM) != 0; } + static bool supports_bmi1() { return (_features & CPU_BMI1) != 0; } + static bool supports_bmi2() { return (_features & CPU_BMI2) != 0; } + static bool supports_adx() { return (_features & CPU_ADX) != 0; } + static bool supports_evex() { return (_features & CPU_AVX512F) != 0; } + static bool supports_avx512dq() { return (_features & CPU_AVX512DQ) != 0; } + static bool supports_avx512pf() { return (_features & CPU_AVX512PF) != 0; } + static bool supports_avx512er() { return (_features & CPU_AVX512ER) != 0; } + static bool supports_avx512cd() { return (_features & CPU_AVX512CD) != 0; } + static bool supports_avx512bw() { return (_features & CPU_AVX512BW) != 0; } + static bool supports_avx512vl() { return (_features & CPU_AVX512VL) != 0; } + static bool supports_avx512vlbw() { return (supports_evex() && supports_avx512bw() && supports_avx512vl()); } + static bool supports_avx512vldq() { return (supports_evex() && supports_avx512dq() && supports_avx512vl()); } static bool supports_avx512vlbwdq() { return (supports_evex() && supports_avx512vl() && supports_avx512bw() && supports_avx512dq()); } - static bool supports_avx512novl() { return (supports_evex() && !supports_avx512vl()); } - static bool supports_avx512nobw() { return (supports_evex() && !supports_avx512bw()); } - static bool supports_avx256only() { return (supports_avx2() && !supports_evex()); } - static bool supports_avxonly() { return ((supports_avx2() || supports_avx()) && !supports_evex()); } - static bool supports_sha() { return (_features & CPU_SHA) != 0; } - static bool supports_fma() { return (_features & CPU_FMA) != 0 && supports_avx(); } - static bool supports_vzeroupper() { return (_features & CPU_VZEROUPPER) != 0; } + static bool supports_avx512novl() { return (supports_evex() && !supports_avx512vl()); } + static bool supports_avx512nobw() { return (supports_evex() && !supports_avx512bw()); } + static bool supports_avx256only() { return (supports_avx2() && !supports_evex()); } + static bool supports_avxonly() { return ((supports_avx2() || supports_avx()) && !supports_evex()); } + static bool supports_sha() { return (_features & CPU_SHA) != 0; } + static bool supports_fma() { return (_features & CPU_FMA) != 0 && supports_avx(); } + static bool supports_vzeroupper() { return (_features & CPU_VZEROUPPER) != 0; } static bool supports_avx512_vpopcntdq() { return (_features & CPU_AVX512_VPOPCNTDQ) != 0; } static bool supports_avx512_vpclmulqdq() { return (_features & CPU_AVX512_VPCLMULQDQ) != 0; } - static bool supports_avx512_vaes() { return (_features & CPU_AVX512_VAES) != 0; } - static bool supports_avx512_vnni() { return (_features & CPU_AVX512_VNNI) != 0; } - static bool supports_avx512_vbmi() { return (_features & CPU_AVX512_VBMI) != 0; } - static bool supports_avx512_vbmi2() { return (_features & CPU_AVX512_VBMI2) != 0; } - static bool supports_hv() { return (_features & CPU_HV_PRESENT) != 0; } + static bool supports_avx512_vaes() { return (_features & CPU_AVX512_VAES) != 0; } + static bool supports_avx512_vnni() { return (_features & CPU_AVX512_VNNI) != 0; } + static bool supports_avx512_vbmi() { return (_features & CPU_AVX512_VBMI) != 0; } + static bool supports_avx512_vbmi2() { return (_features & CPU_AVX512_VBMI2) != 0; } + static bool supports_hv() { return (_features & CPU_HV) != 0; } // Intel features static bool is_intel_family_core() { return is_intel() && @@ -918,12 +953,10 @@ enum Extended_Family { // Intel and AMD newer cores support fast timestamps well static bool supports_tscinv_bit() { - return (_features & CPU_TSCINV) != 0; + return (_features & CPU_TSCINV_BIT) != 0; } static bool supports_tscinv() { - return supports_tscinv_bit() && - ((is_amd_family() && !is_amd_Barcelona()) || - is_intel_tsc_synched_at_init()); + return (_features & CPU_TSCINV) != 0; } // Intel Core and newer cpus have fast IDIV instruction (excluding Atom). @@ -999,10 +1032,10 @@ enum Extended_Family { // not synchronize with other memory ops. it needs a preceding // and trailing StoreStore fence // - // clwb is an optional, intel-specific instruction optional which + // clwb is an optional intel-specific instruction which // writes back without evicting the line. it also does not - // synchronize with other memory ops. so, it also needs a preceding - // and trailing StoreStore fence. + // synchronize with other memory ops. so, it needs preceding + // and trailing StoreStore fences. #ifdef _LP64 static bool supports_clflush() { @@ -1018,13 +1051,12 @@ enum Extended_Family { assert ((!Universe::is_fully_initialized() || (_features & CPU_FLUSH) != 0), "clflush should be available"); return true; } - static bool supports_clflushopt() { return ((_features & CPU_FLUSHOPT) != 0); } - static bool supports_clwb() { return ((_features & CPU_CLWB) != 0); } #else static bool supports_clflush() { return ((_features & CPU_FLUSH) != 0); } - static bool supports_clflushopt() { return false; } - static bool supports_clwb() { return false; } #endif // _LP64 + // Note: CPU_FLUSHOPT and CPU_CLWB bits should always be zero for 32-bit + static bool supports_clflushopt() { return ((_features & CPU_FLUSHOPT) != 0); } + static bool supports_clwb() { return ((_features & CPU_CLWB) != 0); } // support functions for virtualization detection private: diff --git a/src/hotspot/cpu/x86/x86_64.ad b/src/hotspot/cpu/x86/x86_64.ad index 2ae523e536a..18dee6852f9 100644 --- a/src/hotspot/cpu/x86/x86_64.ad +++ b/src/hotspot/cpu/x86/x86_64.ad @@ -4258,16 +4258,6 @@ pipe_class ialu_reg_fat(rRegI dst) ALU : S3; // any alu %} -// Long ALU reg operation using big decoder -pipe_class ialu_reg_long_fat(rRegL dst) -%{ - instruction_count(2); - dst : S4(write); - dst : S3(read); - D0 : S0(2); // big decoder only; twice - ALU : S3(2); // any 2 alus -%} - // Integer ALU reg-reg operation pipe_class ialu_reg_reg(rRegI dst, rRegI src) %{ @@ -4278,16 +4268,6 @@ pipe_class ialu_reg_reg(rRegI dst, rRegI src) ALU : S3; // any alu %} -// Long ALU reg-reg operation -pipe_class ialu_reg_reg_long(rRegL dst, rRegL src) -%{ - instruction_count(2); - dst : S4(write); - src : S3(read); - DECODE : S0(2); // any 2 decoders - ALU : S3(2); // both alus -%} - // Integer ALU reg-reg operation pipe_class ialu_reg_reg_fat(rRegI dst, memory src) %{ @@ -4298,16 +4278,6 @@ pipe_class ialu_reg_reg_fat(rRegI dst, memory src) ALU : S3; // any alu %} -// Long ALU reg-reg operation -pipe_class ialu_reg_reg_long_fat(rRegL dst, rRegL src) -%{ - instruction_count(2); - dst : S4(write); - src : S3(read); - D0 : S0(2); // big decoder only; twice - ALU : S3(2); // both alus -%} - // Integer ALU reg-mem operation pipe_class ialu_reg_mem(rRegI dst, memory mem) %{ diff --git a/src/hotspot/cpu/zero/vm_version_zero.cpp b/src/hotspot/cpu/zero/vm_version_zero.cpp index 6f8519aba53..bc38c7d81cf 100644 --- a/src/hotspot/cpu/zero/vm_version_zero.cpp +++ b/src/hotspot/cpu/zero/vm_version_zero.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright 2009 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -26,6 +26,7 @@ #include "precompiled.hpp" #include "assembler_zero.inline.hpp" #include "memory/resourceArea.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/java.hpp" #include "runtime/stubCodeGenerator.hpp" #include "runtime/vm_version.hpp" diff --git a/src/hotspot/cpu/zero/zeroInterpreter_zero.cpp b/src/hotspot/cpu/zero/zeroInterpreter_zero.cpp index 9aae3e751e5..1fcc8ef0f22 100644 --- a/src/hotspot/cpu/zero/zeroInterpreter_zero.cpp +++ b/src/hotspot/cpu/zero/zeroInterpreter_zero.cpp @@ -459,10 +459,8 @@ int ZeroInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) { if (header.to_pointer() != NULL) { markWord old_header = markWord::encode(lock); if (rcvr->cas_set_mark(header, old_header) != old_header) { - monitor->set_obj(rcvr); { - HandleMark hm(thread); - CALL_VM_NOCHECK(InterpreterRuntime::monitorexit(thread, monitor)); - } + monitor->set_obj(rcvr); + InterpreterRuntime::monitorexit(monitor); } } } diff --git a/src/hotspot/os/aix/os_aix.cpp b/src/hotspot/os/aix/os_aix.cpp index 64face5268a..552c345563a 100644 --- a/src/hotspot/os/aix/os_aix.cpp +++ b/src/hotspot/os/aix/os_aix.cpp @@ -54,6 +54,7 @@ #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" #include "runtime/globals.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" @@ -71,6 +72,7 @@ #include "runtime/vm_version.hpp" #include "services/attachListener.hpp" #include "services/runtimeService.hpp" +#include "signals_posix.hpp" #include "utilities/align.hpp" #include "utilities/decoder.hpp" #include "utilities/defaultStream.hpp" @@ -185,10 +187,6 @@ int os::Aix::_extshm = -1; static volatile jlong max_real_time = 0; static jlong initial_time_count = 0; static int clock_tics_per_sec = 100; -static sigset_t check_signal_done; // For diagnostics to print a message once (see run_periodic_checks) -static bool check_signals = true; -static int SR_signum = SIGUSR2; // Signal used to suspend/resume a thread (must be > SIGSEGV, see 4355769) -static sigset_t SR_sigset; // Process break recorded at startup. static address g_brk_at_startup = NULL; @@ -615,90 +613,6 @@ extern "C" void breakpoint() { // use debugger to set breakpoint here } -//////////////////////////////////////////////////////////////////////////////// -// signal support - -debug_only(static bool signal_sets_initialized = false); -static sigset_t unblocked_sigs, vm_sigs; - -void os::Aix::signal_sets_init() { - // Should also have an assertion stating we are still single-threaded. - assert(!signal_sets_initialized, "Already initialized"); - // Fill in signals that are necessarily unblocked for all threads in - // the VM. Currently, we unblock the following signals: - // SHUTDOWN{1,2,3}_SIGNAL: for shutdown hooks support (unless over-ridden - // by -Xrs (=ReduceSignalUsage)); - // BREAK_SIGNAL which is unblocked only by the VM thread and blocked by all - // other threads. The "ReduceSignalUsage" boolean tells us not to alter - // the dispositions or masks wrt these signals. - // Programs embedding the VM that want to use the above signals for their - // own purposes must, at this time, use the "-Xrs" option to prevent - // interference with shutdown hooks and BREAK_SIGNAL thread dumping. - // (See bug 4345157, and other related bugs). - // In reality, though, unblocking these signals is really a nop, since - // these signals are not blocked by default. - sigemptyset(&unblocked_sigs); - sigaddset(&unblocked_sigs, SIGILL); - sigaddset(&unblocked_sigs, SIGSEGV); - sigaddset(&unblocked_sigs, SIGBUS); - sigaddset(&unblocked_sigs, SIGFPE); - sigaddset(&unblocked_sigs, SIGTRAP); - sigaddset(&unblocked_sigs, SR_signum); - - if (!ReduceSignalUsage) { - if (!os::Posix::is_sig_ignored(SHUTDOWN1_SIGNAL)) { - sigaddset(&unblocked_sigs, SHUTDOWN1_SIGNAL); - } - if (!os::Posix::is_sig_ignored(SHUTDOWN2_SIGNAL)) { - sigaddset(&unblocked_sigs, SHUTDOWN2_SIGNAL); - } - if (!os::Posix::is_sig_ignored(SHUTDOWN3_SIGNAL)) { - sigaddset(&unblocked_sigs, SHUTDOWN3_SIGNAL); - } - } - // Fill in signals that are blocked by all but the VM thread. - sigemptyset(&vm_sigs); - if (!ReduceSignalUsage) - sigaddset(&vm_sigs, BREAK_SIGNAL); - debug_only(signal_sets_initialized = true); -} - -// These are signals that are unblocked while a thread is running Java. -// (For some reason, they get blocked by default.) -sigset_t* os::Aix::unblocked_signals() { - assert(signal_sets_initialized, "Not initialized"); - return &unblocked_sigs; -} - -// These are the signals that are blocked while a (non-VM) thread is -// running Java. Only the VM thread handles these signals. -sigset_t* os::Aix::vm_signals() { - assert(signal_sets_initialized, "Not initialized"); - return &vm_sigs; -} - -void os::Aix::hotspot_sigmask(Thread* thread) { - - //Save caller's signal mask before setting VM signal mask - sigset_t caller_sigmask; - pthread_sigmask(SIG_BLOCK, NULL, &caller_sigmask); - - OSThread* osthread = thread->osthread(); - osthread->set_caller_sigmask(caller_sigmask); - - pthread_sigmask(SIG_UNBLOCK, os::Aix::unblocked_signals(), NULL); - - if (!ReduceSignalUsage) { - if (thread->is_VM_thread()) { - // Only the VM thread handles BREAK_SIGNAL ... - pthread_sigmask(SIG_UNBLOCK, vm_signals(), NULL); - } else { - // ... all other threads block BREAK_SIGNAL - pthread_sigmask(SIG_BLOCK, vm_signals(), NULL); - } - } -} - // retrieve memory information. // Returns false if something went wrong; // content of pmi undefined in this case. @@ -818,7 +732,7 @@ static void *thread_native_entry(Thread *thread) { osthread->set_kernel_thread_id(kernel_thread_id); // Initialize signal mask for this thread. - os::Aix::hotspot_sigmask(thread); + PosixSignals::hotspot_sigmask(thread); // Initialize floating point control register. os::Aix::init_thread_fpu_state(); @@ -985,7 +899,7 @@ bool os::create_attached_thread(JavaThread* thread) { // initialize signal mask for this thread // and save the caller's signal mask - os::Aix::hotspot_sigmask(thread); + PosixSignals::hotspot_sigmask(thread); log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ", kernel thread id: " UINTX_FORMAT ").", os::current_thread_id(), (uintx) kernel_thread_id); @@ -1525,26 +1439,23 @@ void os::pd_print_cpu_info(outputStream* st, char* buf, size_t buflen) { // Nothing to do beyond of what os::print_cpu_info() does. } -static void print_signal_handler(outputStream* st, int sig, - char* buf, size_t buflen); - void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) { st->print_cr("Signal Handlers:"); - print_signal_handler(st, SIGSEGV, buf, buflen); - print_signal_handler(st, SIGBUS , buf, buflen); - print_signal_handler(st, SIGFPE , buf, buflen); - print_signal_handler(st, SIGPIPE, buf, buflen); - print_signal_handler(st, SIGXFSZ, buf, buflen); - print_signal_handler(st, SIGILL , buf, buflen); - print_signal_handler(st, SR_signum, buf, buflen); - print_signal_handler(st, SHUTDOWN1_SIGNAL, buf, buflen); - print_signal_handler(st, SHUTDOWN2_SIGNAL , buf, buflen); - print_signal_handler(st, SHUTDOWN3_SIGNAL , buf, buflen); - print_signal_handler(st, BREAK_SIGNAL, buf, buflen); - print_signal_handler(st, SIGTRAP, buf, buflen); + PosixSignals::print_signal_handler(st, SIGSEGV, buf, buflen); + PosixSignals::print_signal_handler(st, SIGBUS , buf, buflen); + PosixSignals::print_signal_handler(st, SIGFPE , buf, buflen); + PosixSignals::print_signal_handler(st, SIGPIPE, buf, buflen); + PosixSignals::print_signal_handler(st, SIGXFSZ, buf, buflen); + PosixSignals::print_signal_handler(st, SIGILL , buf, buflen); + PosixSignals::print_signal_handler(st, SR_signum, buf, buflen); + PosixSignals::print_signal_handler(st, SHUTDOWN1_SIGNAL, buf, buflen); + PosixSignals::print_signal_handler(st, SHUTDOWN2_SIGNAL , buf, buflen); + PosixSignals::print_signal_handler(st, SHUTDOWN3_SIGNAL , buf, buflen); + PosixSignals::print_signal_handler(st, BREAK_SIGNAL, buf, buflen); + PosixSignals::print_signal_handler(st, SIGTRAP, buf, buflen); // We also want to know if someone else adds a SIGDANGER handler because // that will interfere with OOM killling. - print_signal_handler(st, SIGDANGER, buf, buflen); + PosixSignals::print_signal_handler(st, SIGDANGER, buf, buflen); } static char saved_jvm_path[MAXPATHLEN] = {0}; @@ -1639,189 +1550,6 @@ void os::print_jni_name_suffix_on(outputStream* st, int args_size) { // no suffix required } -//////////////////////////////////////////////////////////////////////////////// -// sun.misc.Signal support - -static void -UserHandler(int sig, void *siginfo, void *context) { - // Ctrl-C is pressed during error reporting, likely because the error - // handler fails to abort. Let VM die immediately. - if (sig == SIGINT && VMError::is_error_reported()) { - os::die(); - } - - os::signal_notify(sig); -} - -void* os::user_handler() { - return CAST_FROM_FN_PTR(void*, UserHandler); -} - -extern "C" { - typedef void (*sa_handler_t)(int); - typedef void (*sa_sigaction_t)(int, siginfo_t *, void *); -} - -void* os::signal(int signal_number, void* handler) { - struct sigaction sigAct, oldSigAct; - - sigfillset(&(sigAct.sa_mask)); - - // Do not block out synchronous signals in the signal handler. - // Blocking synchronous signals only makes sense if you can really - // be sure that those signals won't happen during signal handling, - // when the blocking applies. Normal signal handlers are lean and - // do not cause signals. But our signal handlers tend to be "risky" - // - secondary SIGSEGV, SIGILL, SIGBUS' may and do happen. - // On AIX, PASE there was a case where a SIGSEGV happened, followed - // by a SIGILL, which was blocked due to the signal mask. The process - // just hung forever. Better to crash from a secondary signal than to hang. - sigdelset(&(sigAct.sa_mask), SIGSEGV); - sigdelset(&(sigAct.sa_mask), SIGBUS); - sigdelset(&(sigAct.sa_mask), SIGILL); - sigdelset(&(sigAct.sa_mask), SIGFPE); - sigdelset(&(sigAct.sa_mask), SIGTRAP); - - sigAct.sa_flags = SA_RESTART|SA_SIGINFO; - - sigAct.sa_handler = CAST_TO_FN_PTR(sa_handler_t, handler); - - if (sigaction(signal_number, &sigAct, &oldSigAct)) { - // -1 means registration failed - return (void *)-1; - } - - return CAST_FROM_FN_PTR(void*, oldSigAct.sa_handler); -} - -void os::signal_raise(int signal_number) { - ::raise(signal_number); -} - -// -// The following code is moved from os.cpp for making this -// code platform specific, which it is by its very nature. -// - -// Will be modified when max signal is changed to be dynamic -int os::sigexitnum_pd() { - return NSIG; -} - -// a counter for each possible signal value -static volatile jint pending_signals[NSIG+1] = { 0 }; - -// Wrapper functions for: sem_init(), sem_post(), sem_wait() -// On AIX, we use sem_init(), sem_post(), sem_wait() -// On Pase, we need to use msem_lock() and msem_unlock(), because Posix Semaphores -// do not seem to work at all on PASE (unimplemented, will cause SIGILL). -// Note that just using msem_.. APIs for both PASE and AIX is not an option either, as -// on AIX, msem_..() calls are suspected of causing problems. -static sem_t sig_sem; -static msemaphore* p_sig_msem = 0; - -static void local_sem_init() { - if (os::Aix::on_aix()) { - int rc = ::sem_init(&sig_sem, 0, 0); - guarantee(rc != -1, "sem_init failed"); - } else { - // Memory semaphores must live in shared mem. - guarantee0(p_sig_msem == NULL); - p_sig_msem = (msemaphore*)os::reserve_memory(sizeof(msemaphore), NULL); - guarantee(p_sig_msem, "Cannot allocate memory for memory semaphore"); - guarantee(::msem_init(p_sig_msem, 0) == p_sig_msem, "msem_init failed"); - } -} - -static void local_sem_post() { - static bool warn_only_once = false; - if (os::Aix::on_aix()) { - int rc = ::sem_post(&sig_sem); - if (rc == -1 && !warn_only_once) { - trcVerbose("sem_post failed (errno = %d, %s)", errno, os::errno_name(errno)); - warn_only_once = true; - } - } else { - guarantee0(p_sig_msem != NULL); - int rc = ::msem_unlock(p_sig_msem, 0); - if (rc == -1 && !warn_only_once) { - trcVerbose("msem_unlock failed (errno = %d, %s)", errno, os::errno_name(errno)); - warn_only_once = true; - } - } -} - -static void local_sem_wait() { - static bool warn_only_once = false; - if (os::Aix::on_aix()) { - int rc = ::sem_wait(&sig_sem); - if (rc == -1 && !warn_only_once) { - trcVerbose("sem_wait failed (errno = %d, %s)", errno, os::errno_name(errno)); - warn_only_once = true; - } - } else { - guarantee0(p_sig_msem != NULL); // must init before use - int rc = ::msem_lock(p_sig_msem, 0); - if (rc == -1 && !warn_only_once) { - trcVerbose("msem_lock failed (errno = %d, %s)", errno, os::errno_name(errno)); - warn_only_once = true; - } - } -} - -static void jdk_misc_signal_init() { - // Initialize signal structures - ::memset((void*)pending_signals, 0, sizeof(pending_signals)); - - // Initialize signal semaphore - local_sem_init(); -} - -void os::signal_notify(int sig) { - Atomic::inc(&pending_signals[sig]); - local_sem_post(); -} - -static int check_pending_signals() { - for (;;) { - for (int i = 0; i < NSIG + 1; i++) { - jint n = pending_signals[i]; - if (n > 0 && n == Atomic::cmpxchg(&pending_signals[i], n, n - 1)) { - return i; - } - } - JavaThread *thread = JavaThread::current(); - ThreadBlockInVM tbivm(thread); - - bool threadIsSuspended; - do { - thread->set_suspend_equivalent(); - // cleared by handle_special_suspend_equivalent_condition() or java_suspend_self() - - local_sem_wait(); - - // were we externally suspended while we were waiting? - threadIsSuspended = thread->handle_special_suspend_equivalent_condition(); - if (threadIsSuspended) { - // - // The semaphore has been incremented, but while we were waiting - // another thread suspended us. We don't want to continue running - // while suspended because that would surprise the thread that - // suspended us. - // - - local_sem_post(); - - thread->java_suspend_self(); - } - } while (threadIsSuspended); - } -} - -int os::signal_wait() { - return check_pending_signals(); -} - //////////////////////////////////////////////////////////////////////////////// // Virtual Memory @@ -1924,21 +1652,10 @@ static void vmembk_print_on(outputStream* os) { // If <requested_addr> is not NULL, function will attempt to attach the memory at the given // address. Failing that, it will attach the memory anywhere. // If <requested_addr> is NULL, function will attach the memory anywhere. -// -// <alignment_hint> is being ignored by this function. It is very probable however that the -// alignment requirements are met anyway, because shmat() attaches at 256M boundaries. -// Should this be not enogh, we can put more work into it. -static char* reserve_shmated_memory ( - size_t bytes, - char* requested_addr, - size_t alignment_hint) { +static char* reserve_shmated_memory (size_t bytes, char* requested_addr) { trcVerbose("reserve_shmated_memory " UINTX_FORMAT " bytes, wishaddress " - PTR_FORMAT ", alignment_hint " UINTX_FORMAT "...", - bytes, p2i(requested_addr), alignment_hint); - - // Either give me wish address or wish alignment but not both. - assert0(!(requested_addr != NULL && alignment_hint != 0)); + PTR_FORMAT "...", bytes, p2i(requested_addr)); // We must prevent anyone from attaching too close to the // BRK because that may cause malloc OOM. @@ -2060,15 +1777,10 @@ static bool uncommit_shmated_memory(char* addr, size_t size) { // Reserve memory via mmap. // If <requested_addr> is given, an attempt is made to attach at the given address. // Failing that, memory is allocated at any address. -// If <alignment_hint> is given and <requested_addr> is NULL, an attempt is made to -// allocate at an address aligned with the given alignment. Failing that, memory -// is aligned anywhere. -static char* reserve_mmaped_memory(size_t bytes, char* requested_addr, size_t alignment_hint) { - trcVerbose("reserve_mmaped_memory " UINTX_FORMAT " bytes, wishaddress " PTR_FORMAT ", " - "alignment_hint " UINTX_FORMAT "...", - bytes, p2i(requested_addr), alignment_hint); - - // If a wish address is given, but not aligned to 4K page boundary, mmap will fail. +static char* reserve_mmaped_memory(size_t bytes, char* requested_addr) { + trcVerbose("reserve_mmaped_memory " UINTX_FORMAT " bytes, wishaddress " PTR_FORMAT "...", + bytes, p2i(requested_addr)); + if (requested_addr && !is_aligned_to(requested_addr, os::vm_page_size()) != 0) { trcVerbose("Wish address " PTR_FORMAT " not aligned to page boundary.", p2i(requested_addr)); return NULL; @@ -2083,26 +1795,21 @@ static char* reserve_mmaped_memory(size_t bytes, char* requested_addr, size_t al requested_addr = NULL; } - // Specify one or the other but not both. - assert0(!(requested_addr != NULL && alignment_hint > 0)); - - // In 64K mode, we claim the global page size (os::vm_page_size()) - // is 64K. This is one of the few points where that illusion may - // break, because mmap() will always return memory aligned to 4K. So - // we must ensure we only ever return memory aligned to 64k. - if (alignment_hint) { - alignment_hint = lcm(alignment_hint, os::vm_page_size()); - } else { - alignment_hint = os::vm_page_size(); - } + // In 64K mode, we lie and claim the global page size (os::vm_page_size()) is 64K + // (complicated story). This mostly works just fine since 64K is a multiple of the + // actual 4K lowest page size. Only at a few seams light shines thru, e.g. when + // calling mmap. mmap will return memory aligned to the lowest pages size - 4K - + // so we must make sure - transparently - that the caller only ever sees 64K + // aligned mapping start addresses. + const size_t alignment = os::vm_page_size(); // Size shall always be a multiple of os::vm_page_size (esp. in 64K mode). const size_t size = align_up(bytes, os::vm_page_size()); // alignment: Allocate memory large enough to include an aligned range of the right size and // cut off the leading and trailing waste pages. - assert0(alignment_hint != 0 && is_aligned_to(alignment_hint, os::vm_page_size())); // see above - const size_t extra_size = size + alignment_hint; + assert0(alignment != 0 && is_aligned_to(alignment, os::vm_page_size())); // see above + const size_t extra_size = size + alignment; // Note: MAP_SHARED (instead of MAP_PRIVATE) needed to be able to // later use msync(MS_INVALIDATE) (see os::uncommit_memory). @@ -2130,7 +1837,7 @@ static char* reserve_mmaped_memory(size_t bytes, char* requested_addr, size_t al } // Handle alignment. - char* const addr_aligned = align_up(addr, alignment_hint); + char* const addr_aligned = align_up(addr, alignment); const size_t waste_pre = addr_aligned - addr; char* const addr_aligned_end = addr_aligned + size; const size_t waste_post = extra_size - waste_pre - size; @@ -2346,33 +2053,19 @@ char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info } // Reserves and attaches a shared memory segment. -// Will assert if a wish address is given and could not be obtained. -char* os::pd_reserve_memory(size_t bytes, char* requested_addr, size_t alignment_hint) { - - // All other Unices do a mmap(MAP_FIXED) if the addr is given, - // thereby clobbering old mappings at that place. That is probably - // not intended, never used and almost certainly an error were it - // ever be used this way (to try attaching at a specified address - // without clobbering old mappings an alternate API exists, - // os::attempt_reserve_memory_at()). - // Instead of mimicking the dangerous coding of the other platforms, here I - // just ignore the request address (release) or assert(debug). - assert0(requested_addr == NULL); - +char* os::pd_reserve_memory(size_t bytes) { // Always round to os::vm_page_size(), which may be larger than 4K. bytes = align_up(bytes, os::vm_page_size()); - const size_t alignment_hint0 = - alignment_hint ? align_up(alignment_hint, os::vm_page_size()) : 0; // In 4K mode always use mmap. // In 64K mode allocate small sizes with mmap, large ones with 64K shmatted. if (os::vm_page_size() == 4*K) { - return reserve_mmaped_memory(bytes, requested_addr, alignment_hint); + return reserve_mmaped_memory(bytes, NULL /* requested_addr */); } else { if (bytes >= Use64KPagesThreshold) { - return reserve_shmated_memory(bytes, requested_addr, alignment_hint); + return reserve_shmated_memory(bytes, NULL /* requested_addr */); } else { - return reserve_mmaped_memory(bytes, requested_addr, alignment_hint); + return reserve_mmaped_memory(bytes, NULL /* requested_addr */); } } } @@ -2543,13 +2236,13 @@ bool os::can_execute_large_page_memory() { return false; } -char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr, int file_desc) { +char* os::pd_attempt_reserve_memory_at(char* requested_addr, size_t bytes, int file_desc) { assert(file_desc >= 0, "file_desc is not valid"); char* result = NULL; // Always round to os::vm_page_size(), which may be larger than 4K. bytes = align_up(bytes, os::vm_page_size()); - result = reserve_mmaped_memory(bytes, requested_addr, 0); + result = reserve_mmaped_memory(bytes, requested_addr); if (result != NULL) { if (replace_existing_mapping_with_file_mapping(result, bytes, file_desc) == NULL) { @@ -2561,7 +2254,7 @@ char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr, int f // Reserve memory at an arbitrary address, only if that area is // available (and not reserved for something else). -char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr) { +char* os::pd_attempt_reserve_memory_at(char* requested_addr, size_t bytes) { char* addr = NULL; // Always round to os::vm_page_size(), which may be larger than 4K. @@ -2570,12 +2263,12 @@ char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr) { // In 4K mode always use mmap. // In 64K mode allocate small sizes with mmap, large ones with 64K shmatted. if (os::vm_page_size() == 4*K) { - return reserve_mmaped_memory(bytes, requested_addr, 0); + return reserve_mmaped_memory(bytes, requested_addr); } else { if (bytes >= Use64KPagesThreshold) { - return reserve_shmated_memory(bytes, requested_addr, 0); + return reserve_shmated_memory(bytes, requested_addr); } else { - return reserve_mmaped_memory(bytes, requested_addr, 0); + return reserve_mmaped_memory(bytes, requested_addr); } } @@ -2678,704 +2371,6 @@ OSReturn os::get_native_priority(const Thread* const thread, int *priority_ptr) return (ret == 0) ? OS_OK : OS_ERR; } -//////////////////////////////////////////////////////////////////////////////// -// suspend/resume support - -// The low-level signal-based suspend/resume support is a remnant from the -// old VM-suspension that used to be for java-suspension, safepoints etc, -// within hotspot. Currently used by JFR's OSThreadSampler -// -// The remaining code is greatly simplified from the more general suspension -// code that used to be used. -// -// The protocol is quite simple: -// - suspend: -// - sends a signal to the target thread -// - polls the suspend state of the osthread using a yield loop -// - target thread signal handler (SR_handler) sets suspend state -// and blocks in sigsuspend until continued -// - resume: -// - sets target osthread state to continue -// - sends signal to end the sigsuspend loop in the SR_handler -// -// Note that the SR_lock plays no role in this suspend/resume protocol, -// but is checked for NULL in SR_handler as a thread termination indicator. -// The SR_lock is, however, used by JavaThread::java_suspend()/java_resume() APIs. -// -// Note that resume_clear_context() and suspend_save_context() are needed -// by SR_handler(), so that fetch_frame_from_context() works, -// which in part is used by: -// - Forte Analyzer: AsyncGetCallTrace() -// - StackBanging: get_frame_at_stack_banging_point() - -static void resume_clear_context(OSThread *osthread) { - osthread->set_ucontext(NULL); - osthread->set_siginfo(NULL); -} - -static void suspend_save_context(OSThread *osthread, siginfo_t* siginfo, ucontext_t* context) { - osthread->set_ucontext(context); - osthread->set_siginfo(siginfo); -} - -// -// Handler function invoked when a thread's execution is suspended or -// resumed. We have to be careful that only async-safe functions are -// called here (Note: most pthread functions are not async safe and -// should be avoided.) -// -// Note: sigwait() is a more natural fit than sigsuspend() from an -// interface point of view, but sigwait() prevents the signal hander -// from being run. libpthread would get very confused by not having -// its signal handlers run and prevents sigwait()'s use with the -// mutex granting granting signal. -// -// Currently only ever called on the VMThread and JavaThreads (PC sampling). -// -static void SR_handler(int sig, siginfo_t* siginfo, ucontext_t* context) { - // Save and restore errno to avoid confusing native code with EINTR - // after sigsuspend. - int old_errno = errno; - - Thread* thread = Thread::current_or_null_safe(); - assert(thread != NULL, "Missing current thread in SR_handler"); - - // On some systems we have seen signal delivery get "stuck" until the signal - // mask is changed as part of thread termination. Check that the current thread - // has not already terminated (via SR_lock()) - else the following assertion - // will fail because the thread is no longer a JavaThread as the ~JavaThread - // destructor has completed. - - if (thread->SR_lock() == NULL) { - return; - } - - assert(thread->is_VM_thread() || thread->is_Java_thread(), "Must be VMThread or JavaThread"); - - OSThread* osthread = thread->osthread(); - - os::SuspendResume::State current = osthread->sr.state(); - if (current == os::SuspendResume::SR_SUSPEND_REQUEST) { - suspend_save_context(osthread, siginfo, context); - - // attempt to switch the state, we assume we had a SUSPEND_REQUEST - os::SuspendResume::State state = osthread->sr.suspended(); - if (state == os::SuspendResume::SR_SUSPENDED) { - sigset_t suspend_set; // signals for sigsuspend() - sigemptyset(&suspend_set); - // get current set of blocked signals and unblock resume signal - pthread_sigmask(SIG_BLOCK, NULL, &suspend_set); - sigdelset(&suspend_set, SR_signum); - - // wait here until we are resumed - while (1) { - sigsuspend(&suspend_set); - - os::SuspendResume::State result = osthread->sr.running(); - if (result == os::SuspendResume::SR_RUNNING) { - break; - } - } - - } else if (state == os::SuspendResume::SR_RUNNING) { - // request was cancelled, continue - } else { - ShouldNotReachHere(); - } - - resume_clear_context(osthread); - } else if (current == os::SuspendResume::SR_RUNNING) { - // request was cancelled, continue - } else if (current == os::SuspendResume::SR_WAKEUP_REQUEST) { - // ignore - } else { - ShouldNotReachHere(); - } - - errno = old_errno; -} - -static int SR_initialize() { - struct sigaction act; - char *s; - // Get signal number to use for suspend/resume - if ((s = ::getenv("_JAVA_SR_SIGNUM")) != 0) { - int sig = ::strtol(s, 0, 10); - if (sig > MAX2(SIGSEGV, SIGBUS) && // See 4355769. - sig < NSIG) { // Must be legal signal and fit into sigflags[]. - SR_signum = sig; - } else { - warning("You set _JAVA_SR_SIGNUM=%d. It must be in range [%d, %d]. Using %d instead.", - sig, MAX2(SIGSEGV, SIGBUS)+1, NSIG-1, SR_signum); - } - } - - assert(SR_signum > SIGSEGV && SR_signum > SIGBUS, - "SR_signum must be greater than max(SIGSEGV, SIGBUS), see 4355769"); - - sigemptyset(&SR_sigset); - sigaddset(&SR_sigset, SR_signum); - - // Set up signal handler for suspend/resume. - act.sa_flags = SA_RESTART|SA_SIGINFO; - act.sa_handler = (void (*)(int)) SR_handler; - - // SR_signum is blocked by default. - pthread_sigmask(SIG_BLOCK, NULL, &act.sa_mask); - - if (sigaction(SR_signum, &act, 0) == -1) { - return -1; - } - - // Save signal flag - os::Aix::set_our_sigflags(SR_signum, act.sa_flags); - return 0; -} - -static int SR_finalize() { - return 0; -} - -static int sr_notify(OSThread* osthread) { - int status = pthread_kill(osthread->pthread_id(), SR_signum); - assert_status(status == 0, status, "pthread_kill"); - return status; -} - -// "Randomly" selected value for how long we want to spin -// before bailing out on suspending a thread, also how often -// we send a signal to a thread we want to resume -static const int RANDOMLY_LARGE_INTEGER = 1000000; -static const int RANDOMLY_LARGE_INTEGER2 = 100; - -// returns true on success and false on error - really an error is fatal -// but this seems the normal response to library errors -static bool do_suspend(OSThread* osthread) { - assert(osthread->sr.is_running(), "thread should be running"); - // mark as suspended and send signal - - if (osthread->sr.request_suspend() != os::SuspendResume::SR_SUSPEND_REQUEST) { - // failed to switch, state wasn't running? - ShouldNotReachHere(); - return false; - } - - if (sr_notify(osthread) != 0) { - // try to cancel, switch to running - - os::SuspendResume::State result = osthread->sr.cancel_suspend(); - if (result == os::SuspendResume::SR_RUNNING) { - // cancelled - return false; - } else if (result == os::SuspendResume::SR_SUSPENDED) { - // somehow managed to suspend - return true; - } else { - ShouldNotReachHere(); - return false; - } - } - - // managed to send the signal and switch to SUSPEND_REQUEST, now wait for SUSPENDED - - for (int n = 0; !osthread->sr.is_suspended(); n++) { - for (int i = 0; i < RANDOMLY_LARGE_INTEGER2 && !osthread->sr.is_suspended(); i++) { - os::naked_yield(); - } - - // timeout, try to cancel the request - if (n >= RANDOMLY_LARGE_INTEGER) { - os::SuspendResume::State cancelled = osthread->sr.cancel_suspend(); - if (cancelled == os::SuspendResume::SR_RUNNING) { - return false; - } else if (cancelled == os::SuspendResume::SR_SUSPENDED) { - return true; - } else { - ShouldNotReachHere(); - return false; - } - } - } - - guarantee(osthread->sr.is_suspended(), "Must be suspended"); - return true; -} - -static void do_resume(OSThread* osthread) { - //assert(osthread->sr.is_suspended(), "thread should be suspended"); - - if (osthread->sr.request_wakeup() != os::SuspendResume::SR_WAKEUP_REQUEST) { - // failed to switch to WAKEUP_REQUEST - ShouldNotReachHere(); - return; - } - - while (!osthread->sr.is_running()) { - if (sr_notify(osthread) == 0) { - for (int n = 0; n < RANDOMLY_LARGE_INTEGER && !osthread->sr.is_running(); n++) { - for (int i = 0; i < 100 && !osthread->sr.is_running(); i++) { - os::naked_yield(); - } - } - } else { - ShouldNotReachHere(); - } - } - - guarantee(osthread->sr.is_running(), "Must be running!"); -} - -/////////////////////////////////////////////////////////////////////////////////// -// signal handling (except suspend/resume) - -// This routine may be used by user applications as a "hook" to catch signals. -// The user-defined signal handler must pass unrecognized signals to this -// routine, and if it returns true (non-zero), then the signal handler must -// return immediately. If the flag "abort_if_unrecognized" is true, then this -// routine will never retun false (zero), but instead will execute a VM panic -// routine kill the process. -// -// If this routine returns false, it is OK to call it again. This allows -// the user-defined signal handler to perform checks either before or after -// the VM performs its own checks. Naturally, the user code would be making -// a serious error if it tried to handle an exception (such as a null check -// or breakpoint) that the VM was generating for its own correct operation. -// -// This routine may recognize any of the following kinds of signals: -// SIGBUS, SIGSEGV, SIGILL, SIGFPE, SIGQUIT, SIGPIPE, SIGXFSZ, SIGUSR1. -// It should be consulted by handlers for any of those signals. -// -// The caller of this routine must pass in the three arguments supplied -// to the function referred to in the "sa_sigaction" (not the "sa_handler") -// field of the structure passed to sigaction(). This routine assumes that -// the sa_flags field passed to sigaction() includes SA_SIGINFO and SA_RESTART. -// -// Note that the VM will print warnings if it detects conflicting signal -// handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers". -// -extern "C" JNIEXPORT int -JVM_handle_aix_signal(int signo, siginfo_t* siginfo, void* ucontext, int abort_if_unrecognized); - -// Set thread signal mask (for some reason on AIX sigthreadmask() seems -// to be the thing to call; documentation is not terribly clear about whether -// pthread_sigmask also works, and if it does, whether it does the same. -bool set_thread_signal_mask(int how, const sigset_t* set, sigset_t* oset) { - const int rc = ::pthread_sigmask(how, set, oset); - // return value semantics differ slightly for error case: - // pthread_sigmask returns error number, sigthreadmask -1 and sets global errno - // (so, pthread_sigmask is more theadsafe for error handling) - // But success is always 0. - return rc == 0 ? true : false; -} - -// Function to unblock all signals which are, according -// to POSIX, typical program error signals. If they happen while being blocked, -// they typically will bring down the process immediately. -bool unblock_program_error_signals() { - sigset_t set; - ::sigemptyset(&set); - ::sigaddset(&set, SIGILL); - ::sigaddset(&set, SIGBUS); - ::sigaddset(&set, SIGFPE); - ::sigaddset(&set, SIGSEGV); - return set_thread_signal_mask(SIG_UNBLOCK, &set, NULL); -} - -// Renamed from 'signalHandler' to avoid collision with other shared libs. -static void javaSignalHandler(int sig, siginfo_t* info, void* uc) { - assert(info != NULL && uc != NULL, "it must be old kernel"); - - // Never leave program error signals blocked; - // on all our platforms they would bring down the process immediately when - // getting raised while being blocked. - unblock_program_error_signals(); - - int orig_errno = errno; // Preserve errno value over signal handler. - JVM_handle_aix_signal(sig, info, uc, true); - errno = orig_errno; -} - -// This boolean allows users to forward their own non-matching signals -// to JVM_handle_aix_signal, harmlessly. -bool os::Aix::signal_handlers_are_installed = false; - -// For signal-chaining -bool os::Aix::libjsig_is_loaded = false; -typedef struct sigaction *(*get_signal_t)(int); -get_signal_t os::Aix::get_signal_action = NULL; - -struct sigaction* os::Aix::get_chained_signal_action(int sig) { - struct sigaction *actp = NULL; - - if (libjsig_is_loaded) { - // Retrieve the old signal handler from libjsig - actp = (*get_signal_action)(sig); - } - if (actp == NULL) { - // Retrieve the preinstalled signal handler from jvm - actp = os::Posix::get_preinstalled_handler(sig); - } - - return actp; -} - -static bool call_chained_handler(struct sigaction *actp, int sig, - siginfo_t *siginfo, void *context) { - // Call the old signal handler - if (actp->sa_handler == SIG_DFL) { - // It's more reasonable to let jvm treat it as an unexpected exception - // instead of taking the default action. - return false; - } else if (actp->sa_handler != SIG_IGN) { - if ((actp->sa_flags & SA_NODEFER) == 0) { - // automaticlly block the signal - sigaddset(&(actp->sa_mask), sig); - } - - sa_handler_t hand = NULL; - sa_sigaction_t sa = NULL; - bool siginfo_flag_set = (actp->sa_flags & SA_SIGINFO) != 0; - // retrieve the chained handler - if (siginfo_flag_set) { - sa = actp->sa_sigaction; - } else { - hand = actp->sa_handler; - } - - if ((actp->sa_flags & SA_RESETHAND) != 0) { - actp->sa_handler = SIG_DFL; - } - - // try to honor the signal mask - sigset_t oset; - sigemptyset(&oset); - pthread_sigmask(SIG_SETMASK, &(actp->sa_mask), &oset); - - // call into the chained handler - if (siginfo_flag_set) { - (*sa)(sig, siginfo, context); - } else { - (*hand)(sig); - } - - // restore the signal mask - pthread_sigmask(SIG_SETMASK, &oset, NULL); - } - // Tell jvm's signal handler the signal is taken care of. - return true; -} - -bool os::Aix::chained_handler(int sig, siginfo_t* siginfo, void* context) { - bool chained = false; - // signal-chaining - if (UseSignalChaining) { - struct sigaction *actp = get_chained_signal_action(sig); - if (actp != NULL) { - chained = call_chained_handler(actp, sig, siginfo, context); - } - } - return chained; -} - -// for diagnostic -int sigflags[NSIG]; - -int os::Aix::get_our_sigflags(int sig) { - assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); - return sigflags[sig]; -} - -void os::Aix::set_our_sigflags(int sig, int flags) { - assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); - if (sig > 0 && sig < NSIG) { - sigflags[sig] = flags; - } -} - -void os::Aix::set_signal_handler(int sig, bool set_installed) { - // Check for overwrite. - struct sigaction oldAct; - sigaction(sig, (struct sigaction*)NULL, &oldAct); - - void* oldhand = oldAct.sa_sigaction - ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction) - : CAST_FROM_FN_PTR(void*, oldAct.sa_handler); - if (oldhand != CAST_FROM_FN_PTR(void*, SIG_DFL) && - oldhand != CAST_FROM_FN_PTR(void*, SIG_IGN) && - oldhand != CAST_FROM_FN_PTR(void*, (sa_sigaction_t)javaSignalHandler)) { - if (AllowUserSignalHandlers || !set_installed) { - // Do not overwrite; user takes responsibility to forward to us. - return; - } else if (UseSignalChaining) { - // save the old handler in jvm - os::Posix::save_preinstalled_handler(sig, oldAct); - // libjsig also interposes the sigaction() call below and saves the - // old sigaction on it own. - } else { - fatal("Encountered unexpected pre-existing sigaction handler " - "%#lx for signal %d.", (long)oldhand, sig); - } - } - - struct sigaction sigAct; - sigfillset(&(sigAct.sa_mask)); - if (!set_installed) { - sigAct.sa_handler = SIG_DFL; - sigAct.sa_flags = SA_RESTART; - } else { - sigAct.sa_sigaction = javaSignalHandler; - sigAct.sa_flags = SA_SIGINFO|SA_RESTART; - } - // Save flags, which are set by ours - assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); - sigflags[sig] = sigAct.sa_flags; - - int ret = sigaction(sig, &sigAct, &oldAct); - assert(ret == 0, "check"); - - void* oldhand2 = oldAct.sa_sigaction - ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction) - : CAST_FROM_FN_PTR(void*, oldAct.sa_handler); - assert(oldhand2 == oldhand, "no concurrent signal handler installation"); -} - -// install signal handlers for signals that HotSpot needs to -// handle in order to support Java-level exception handling. -void os::Aix::install_signal_handlers() { - if (!signal_handlers_are_installed) { - signal_handlers_are_installed = true; - - // signal-chaining - typedef void (*signal_setting_t)(); - signal_setting_t begin_signal_setting = NULL; - signal_setting_t end_signal_setting = NULL; - begin_signal_setting = CAST_TO_FN_PTR(signal_setting_t, - dlsym(RTLD_DEFAULT, "JVM_begin_signal_setting")); - if (begin_signal_setting != NULL) { - end_signal_setting = CAST_TO_FN_PTR(signal_setting_t, - dlsym(RTLD_DEFAULT, "JVM_end_signal_setting")); - get_signal_action = CAST_TO_FN_PTR(get_signal_t, - dlsym(RTLD_DEFAULT, "JVM_get_signal_action")); - libjsig_is_loaded = true; - assert(UseSignalChaining, "should enable signal-chaining"); - } - if (libjsig_is_loaded) { - // Tell libjsig jvm is setting signal handlers. - (*begin_signal_setting)(); - } - - set_signal_handler(SIGSEGV, true); - set_signal_handler(SIGPIPE, true); - set_signal_handler(SIGBUS, true); - set_signal_handler(SIGILL, true); - set_signal_handler(SIGFPE, true); - set_signal_handler(SIGTRAP, true); - set_signal_handler(SIGXFSZ, true); - - if (libjsig_is_loaded) { - // Tell libjsig jvm finishes setting signal handlers. - (*end_signal_setting)(); - } - - // We don't activate signal checker if libjsig is in place, we trust ourselves - // and if UserSignalHandler is installed all bets are off. - // Log that signal checking is off only if -verbose:jni is specified. - if (CheckJNICalls) { - if (libjsig_is_loaded) { - tty->print_cr("Info: libjsig is activated, all active signal checking is disabled"); - check_signals = false; - } - if (AllowUserSignalHandlers) { - tty->print_cr("Info: AllowUserSignalHandlers is activated, all active signal checking is disabled"); - check_signals = false; - } - // Need to initialize check_signal_done. - ::sigemptyset(&check_signal_done); - } - } -} - -static const char* get_signal_handler_name(address handler, - char* buf, int buflen) { - int offset; - bool found = os::dll_address_to_library_name(handler, buf, buflen, &offset); - if (found) { - // skip directory names - const char *p1, *p2; - p1 = buf; - size_t len = strlen(os::file_separator()); - while ((p2 = strstr(p1, os::file_separator())) != NULL) p1 = p2 + len; - // The way os::dll_address_to_library_name is implemented on Aix - // right now, it always returns -1 for the offset which is not - // terribly informative. - // Will fix that. For now, omit the offset. - jio_snprintf(buf, buflen, "%s", p1); - } else { - jio_snprintf(buf, buflen, PTR_FORMAT, handler); - } - return buf; -} - -static void print_signal_handler(outputStream* st, int sig, - char* buf, size_t buflen) { - struct sigaction sa; - sigaction(sig, NULL, &sa); - - st->print("%s: ", os::exception_name(sig, buf, buflen)); - - address handler = (sa.sa_flags & SA_SIGINFO) - ? CAST_FROM_FN_PTR(address, sa.sa_sigaction) - : CAST_FROM_FN_PTR(address, sa.sa_handler); - - if (handler == CAST_FROM_FN_PTR(address, SIG_DFL)) { - st->print("SIG_DFL"); - } else if (handler == CAST_FROM_FN_PTR(address, SIG_IGN)) { - st->print("SIG_IGN"); - } else { - st->print("[%s]", get_signal_handler_name(handler, buf, buflen)); - } - - // Print readable mask. - st->print(", sa_mask[0]="); - os::Posix::print_signal_set_short(st, &sa.sa_mask); - - address rh = VMError::get_resetted_sighandler(sig); - // May be, handler was resetted by VMError? - if (rh != NULL) { - handler = rh; - sa.sa_flags = VMError::get_resetted_sigflags(sig); - } - - // Print textual representation of sa_flags. - st->print(", sa_flags="); - os::Posix::print_sa_flags(st, sa.sa_flags); - - // Check: is it our handler? - if (handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)javaSignalHandler) || - handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)SR_handler)) { - // It is our signal handler. - // Check for flags, reset system-used one! - if ((int)sa.sa_flags != os::Aix::get_our_sigflags(sig)) { - st->print(", flags was changed from " PTR32_FORMAT ", consider using jsig library", - os::Aix::get_our_sigflags(sig)); - } - } - st->cr(); -} - -#define DO_SIGNAL_CHECK(sig) \ - if (!sigismember(&check_signal_done, sig)) \ - os::Aix::check_signal_handler(sig) - -// This method is a periodic task to check for misbehaving JNI applications -// under CheckJNI, we can add any periodic checks here - -void os::run_periodic_checks() { - - if (check_signals == false) return; - - // SEGV and BUS if overridden could potentially prevent - // generation of hs*.log in the event of a crash, debugging - // such a case can be very challenging, so we absolutely - // check the following for a good measure: - DO_SIGNAL_CHECK(SIGSEGV); - DO_SIGNAL_CHECK(SIGILL); - DO_SIGNAL_CHECK(SIGFPE); - DO_SIGNAL_CHECK(SIGBUS); - DO_SIGNAL_CHECK(SIGPIPE); - DO_SIGNAL_CHECK(SIGXFSZ); - if (UseSIGTRAP) { - DO_SIGNAL_CHECK(SIGTRAP); - } - - // ReduceSignalUsage allows the user to override these handlers - // see comments at the very top and jvm_md.h - if (!ReduceSignalUsage) { - DO_SIGNAL_CHECK(SHUTDOWN1_SIGNAL); - DO_SIGNAL_CHECK(SHUTDOWN2_SIGNAL); - DO_SIGNAL_CHECK(SHUTDOWN3_SIGNAL); - DO_SIGNAL_CHECK(BREAK_SIGNAL); - } - - DO_SIGNAL_CHECK(SR_signum); -} - -typedef int (*os_sigaction_t)(int, const struct sigaction *, struct sigaction *); - -static os_sigaction_t os_sigaction = NULL; - -void os::Aix::check_signal_handler(int sig) { - char buf[O_BUFLEN]; - address jvmHandler = NULL; - - struct sigaction act; - if (os_sigaction == NULL) { - // only trust the default sigaction, in case it has been interposed - os_sigaction = CAST_TO_FN_PTR(os_sigaction_t, dlsym(RTLD_DEFAULT, "sigaction")); - if (os_sigaction == NULL) return; - } - - os_sigaction(sig, (struct sigaction*)NULL, &act); - - address thisHandler = (act.sa_flags & SA_SIGINFO) - ? CAST_FROM_FN_PTR(address, act.sa_sigaction) - : CAST_FROM_FN_PTR(address, act.sa_handler); - - switch(sig) { - case SIGSEGV: - case SIGBUS: - case SIGFPE: - case SIGPIPE: - case SIGILL: - case SIGXFSZ: - jvmHandler = CAST_FROM_FN_PTR(address, (sa_sigaction_t)javaSignalHandler); - break; - - case SHUTDOWN1_SIGNAL: - case SHUTDOWN2_SIGNAL: - case SHUTDOWN3_SIGNAL: - case BREAK_SIGNAL: - jvmHandler = (address)user_handler(); - break; - - default: - if (sig == SR_signum) { - jvmHandler = CAST_FROM_FN_PTR(address, (sa_sigaction_t)SR_handler); - } else { - return; - } - break; - } - - if (thisHandler != jvmHandler) { - tty->print("Warning: %s handler ", exception_name(sig, buf, O_BUFLEN)); - tty->print("expected:%s", get_signal_handler_name(jvmHandler, buf, O_BUFLEN)); - tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN)); - // No need to check this sig any longer - sigaddset(&check_signal_done, sig); - // Running under non-interactive shell, SHUTDOWN2_SIGNAL will be reassigned SIG_IGN - if (sig == SHUTDOWN2_SIGNAL && !isatty(fileno(stdin))) { - tty->print_cr("Running in non-interactive shell, %s handler is replaced by shell", - exception_name(sig, buf, O_BUFLEN)); - } - } else if (os::Aix::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Aix::get_our_sigflags(sig)) { - tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN)); - tty->print("expected:"); - os::Posix::print_sa_flags(tty, os::Aix::get_our_sigflags(sig)); - tty->cr(); - tty->print(" found:"); - os::Posix::print_sa_flags(tty, act.sa_flags); - tty->cr(); - // No need to check this sig any longer - sigaddset(&check_signal_done, sig); - } - - // Dump all the signal - if (sigismember(&check_signal_done, sig)) { - print_signal_handlers(tty, buf, O_BUFLEN); - } -} - // To install functions for atexit system call extern "C" { static void perfMemory_exit_helper() { @@ -3523,16 +2518,16 @@ jint os::init_2(void) { } // initialize suspend/resume support - must do this before signal_sets_init() - if (SR_initialize() != 0) { + if (PosixSignals::SR_initialize() != 0) { perror("SR_initialize failed"); return JNI_ERR; } - Aix::signal_sets_init(); - Aix::install_signal_handlers(); + PosixSignals::signal_sets_init(); + PosixSignals::install_signal_handlers(); // Initialize data for jdk.internal.misc.Signal if (!ReduceSignalUsage) { - jdk_misc_signal_init(); + PosixSignals::jdk_misc_signal_init(); } // Check and sets minimum stack sizes against command line options @@ -3605,10 +2600,10 @@ bool os::bind_to_processor(uint processor_id) { } void os::SuspendedThreadTask::internal_do_task() { - if (do_suspend(_thread->osthread())) { + if (PosixSignals::do_suspend(_thread->osthread())) { SuspendedThreadTaskContext context(_thread, _thread->osthread()->ucontext()); do_task(context); - do_resume(_thread->osthread()); + PosixSignals::do_resume(_thread->osthread()); } } diff --git a/src/hotspot/os/aix/os_aix.hpp b/src/hotspot/os/aix/os_aix.hpp index 44a99072f1f..09e97fa1c84 100644 --- a/src/hotspot/os/aix/os_aix.hpp +++ b/src/hotspot/os/aix/os_aix.hpp @@ -34,12 +34,6 @@ static bool zero_page_read_protected() { return false; } class Aix { friend class os; - static bool libjsig_is_loaded; // libjsig that interposes sigaction(), - // __sigaction(), signal() is loaded - static struct sigaction *(*get_signal_action)(int); - - static void check_signal_handler(int sig); - private: static julong _physical_memory; @@ -89,7 +83,6 @@ class Aix { public: static void init_thread_fpu_state(); static pthread_t main_thread(void) { return _main_thread; } - static void hotspot_sigmask(Thread* thread); // Given an address, returns the size of the page backing that address static size_t query_pagesize(void* p); @@ -107,23 +100,6 @@ class Aix { static bool get_frame_at_stack_banging_point(JavaThread* thread, ucontext_t* uc, frame* fr); - // This boolean allows users to forward their own non-matching signals - // to JVM_handle_aix_signal, harmlessly. - static bool signal_handlers_are_installed; - - static int get_our_sigflags(int); - static void set_our_sigflags(int, int); - static void signal_sets_init(); - static void install_signal_handlers(); - static void set_signal_handler(int, bool); - - static sigset_t* unblocked_signals(); - static sigset_t* vm_signals(); - - // For signal-chaining - static struct sigaction *get_chained_signal_action(int sig); - static bool chained_handler(int sig, siginfo_t* siginfo, void* context); - // libpthread version string static void libpthread_init(); @@ -204,7 +180,6 @@ class Aix { // (on AIX, using libperfstat, on PASE with libo4.so). // Returns true if ok, false if error. static bool get_meminfo(meminfo_t* pmi); - }; #endif // OS_AIX_OS_AIX_HPP diff --git a/src/hotspot/os/bsd/gc/z/zLargePages_bsd.cpp b/src/hotspot/os/bsd/gc/z/zLargePages_bsd.cpp index e75cf824e12..6e26741a507 100644 --- a/src/hotspot/os/bsd/gc/z/zLargePages_bsd.cpp +++ b/src/hotspot/os/bsd/gc/z/zLargePages_bsd.cpp @@ -25,7 +25,7 @@ #include "gc/z/zLargePages.hpp" #include "runtime/globals.hpp" -void ZLargePages::initialize_platform() { +void ZLargePages::pd_initialize() { if (UseLargePages) { _state = Explicit; } else { diff --git a/src/hotspot/os/bsd/gc/z/zNUMA_bsd.cpp b/src/hotspot/os/bsd/gc/z/zNUMA_bsd.cpp index 966ef9b997f..a0fe34c6504 100644 --- a/src/hotspot/os/bsd/gc/z/zNUMA_bsd.cpp +++ b/src/hotspot/os/bsd/gc/z/zNUMA_bsd.cpp @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "gc/z/zNUMA.hpp" -void ZNUMA::initialize_platform() { +void ZNUMA::pd_initialize() { _enabled = false; } diff --git a/src/hotspot/os/bsd/os_bsd.cpp b/src/hotspot/os/bsd/os_bsd.cpp index 943133e27e5..68196755732 100644 --- a/src/hotspot/os/bsd/os_bsd.cpp +++ b/src/hotspot/os/bsd/os_bsd.cpp @@ -45,6 +45,7 @@ #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" #include "runtime/globals.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" @@ -62,6 +63,7 @@ #include "services/attachListener.hpp" #include "services/memTracker.hpp" #include "services/runtimeService.hpp" +#include "signals_posix.hpp" #include "utilities/align.hpp" #include "utilities/decoder.hpp" #include "utilities/defaultStream.hpp" @@ -130,16 +132,6 @@ static jlong initial_time_count=0; static int clock_tics_per_sec = 100; -// For diagnostics to print a message once. see run_periodic_checks -static sigset_t check_signal_done; -static bool check_signals = true; - -// Signal number used to suspend/resume a thread - -// do not use any signal number less than SIGSEGV, see 4355769 -static int SR_signum = SIGUSR2; -sigset_t SR_sigset; - #ifdef __APPLE__ static const int processor_id_unassigned = -1; static const int processor_id_assigning = -2; @@ -151,8 +143,6 @@ static volatile int processor_id_next = 0; //////////////////////////////////////////////////////////////////////////////// // utility functions -static int SR_initialize(); - julong os::available_memory() { return Bsd::available_memory(); } @@ -541,93 +531,6 @@ extern "C" void breakpoint() { // use debugger to set breakpoint here } -//////////////////////////////////////////////////////////////////////////////// -// signal support - -debug_only(static bool signal_sets_initialized = false); -static sigset_t unblocked_sigs, vm_sigs; - -void os::Bsd::signal_sets_init() { - // Should also have an assertion stating we are still single-threaded. - assert(!signal_sets_initialized, "Already initialized"); - // Fill in signals that are necessarily unblocked for all threads in - // the VM. Currently, we unblock the following signals: - // SHUTDOWN{1,2,3}_SIGNAL: for shutdown hooks support (unless over-ridden - // by -Xrs (=ReduceSignalUsage)); - // BREAK_SIGNAL which is unblocked only by the VM thread and blocked by all - // other threads. The "ReduceSignalUsage" boolean tells us not to alter - // the dispositions or masks wrt these signals. - // Programs embedding the VM that want to use the above signals for their - // own purposes must, at this time, use the "-Xrs" option to prevent - // interference with shutdown hooks and BREAK_SIGNAL thread dumping. - // (See bug 4345157, and other related bugs). - // In reality, though, unblocking these signals is really a nop, since - // these signals are not blocked by default. - sigemptyset(&unblocked_sigs); - sigaddset(&unblocked_sigs, SIGILL); - sigaddset(&unblocked_sigs, SIGSEGV); - sigaddset(&unblocked_sigs, SIGBUS); - sigaddset(&unblocked_sigs, SIGFPE); - sigaddset(&unblocked_sigs, SR_signum); - - if (!ReduceSignalUsage) { - if (!os::Posix::is_sig_ignored(SHUTDOWN1_SIGNAL)) { - sigaddset(&unblocked_sigs, SHUTDOWN1_SIGNAL); - - } - if (!os::Posix::is_sig_ignored(SHUTDOWN2_SIGNAL)) { - sigaddset(&unblocked_sigs, SHUTDOWN2_SIGNAL); - } - if (!os::Posix::is_sig_ignored(SHUTDOWN3_SIGNAL)) { - sigaddset(&unblocked_sigs, SHUTDOWN3_SIGNAL); - } - } - // Fill in signals that are blocked by all but the VM thread. - sigemptyset(&vm_sigs); - if (!ReduceSignalUsage) { - sigaddset(&vm_sigs, BREAK_SIGNAL); - } - debug_only(signal_sets_initialized = true); - -} - -// These are signals that are unblocked while a thread is running Java. -// (For some reason, they get blocked by default.) -sigset_t* os::Bsd::unblocked_signals() { - assert(signal_sets_initialized, "Not initialized"); - return &unblocked_sigs; -} - -// These are the signals that are blocked while a (non-VM) thread is -// running Java. Only the VM thread handles these signals. -sigset_t* os::Bsd::vm_signals() { - assert(signal_sets_initialized, "Not initialized"); - return &vm_sigs; -} - -void os::Bsd::hotspot_sigmask(Thread* thread) { - - //Save caller's signal mask before setting VM signal mask - sigset_t caller_sigmask; - pthread_sigmask(SIG_BLOCK, NULL, &caller_sigmask); - - OSThread* osthread = thread->osthread(); - osthread->set_caller_sigmask(caller_sigmask); - - pthread_sigmask(SIG_UNBLOCK, os::Bsd::unblocked_signals(), NULL); - - if (!ReduceSignalUsage) { - if (thread->is_VM_thread()) { - // Only the VM thread handles BREAK_SIGNAL ... - pthread_sigmask(SIG_UNBLOCK, vm_signals(), NULL); - } else { - // ... all other threads block BREAK_SIGNAL - pthread_sigmask(SIG_BLOCK, vm_signals(), NULL); - } - } -} - - ////////////////////////////////////////////////////////////////////////////// // create new thread @@ -671,7 +574,7 @@ static void *thread_native_entry(Thread *thread) { #endif // initialize signal mask for this thread - os::Bsd::hotspot_sigmask(thread); + PosixSignals::hotspot_sigmask(thread); // initialize floating point control register os::Bsd::init_thread_fpu_state(); @@ -781,13 +684,6 @@ bool os::create_thread(Thread* thread, ThreadType thr_type, } - // Aborted due to thread limit being reached - if (state == ZOMBIE) { - thread->set_osthread(NULL); - delete osthread; - return false; - } - // The thread is returned suspended (in state INITIALIZED), // and is started higher up in the call chain assert(state == INITIALIZED, "race condition"); @@ -835,7 +731,7 @@ bool os::create_attached_thread(JavaThread* thread) { // initialize signal mask for this thread // and save the caller's signal mask - os::Bsd::hotspot_sigmask(thread); + PosixSignals::hotspot_sigmask(thread); log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT ").", os::current_thread_id(), (uintx) pthread_self()); @@ -1643,22 +1539,19 @@ void os::print_memory_info(outputStream* st) { st->cr(); } -static void print_signal_handler(outputStream* st, int sig, - char* buf, size_t buflen); - void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) { st->print_cr("Signal Handlers:"); - print_signal_handler(st, SIGSEGV, buf, buflen); - print_signal_handler(st, SIGBUS , buf, buflen); - print_signal_handler(st, SIGFPE , buf, buflen); - print_signal_handler(st, SIGPIPE, buf, buflen); - print_signal_handler(st, SIGXFSZ, buf, buflen); - print_signal_handler(st, SIGILL , buf, buflen); - print_signal_handler(st, SR_signum, buf, buflen); - print_signal_handler(st, SHUTDOWN1_SIGNAL, buf, buflen); - print_signal_handler(st, SHUTDOWN2_SIGNAL , buf, buflen); - print_signal_handler(st, SHUTDOWN3_SIGNAL , buf, buflen); - print_signal_handler(st, BREAK_SIGNAL, buf, buflen); + PosixSignals::print_signal_handler(st, SIGSEGV, buf, buflen); + PosixSignals::print_signal_handler(st, SIGBUS , buf, buflen); + PosixSignals::print_signal_handler(st, SIGFPE , buf, buflen); + PosixSignals::print_signal_handler(st, SIGPIPE, buf, buflen); + PosixSignals::print_signal_handler(st, SIGXFSZ, buf, buflen); + PosixSignals::print_signal_handler(st, SIGILL , buf, buflen); + PosixSignals::print_signal_handler(st, SR_signum, buf, buflen); + PosixSignals::print_signal_handler(st, SHUTDOWN1_SIGNAL, buf, buflen); + PosixSignals::print_signal_handler(st, SHUTDOWN2_SIGNAL , buf, buflen); + PosixSignals::print_signal_handler(st, SHUTDOWN3_SIGNAL , buf, buflen); + PosixSignals::print_signal_handler(st, BREAK_SIGNAL, buf, buflen); } static char saved_jvm_path[MAXPATHLEN] = {0}; @@ -1771,114 +1664,6 @@ void os::print_jni_name_suffix_on(outputStream* st, int args_size) { // no suffix required } -//////////////////////////////////////////////////////////////////////////////// -// sun.misc.Signal support - -static void UserHandler(int sig, void *siginfo, void *context) { - // Ctrl-C is pressed during error reporting, likely because the error - // handler fails to abort. Let VM die immediately. - if (sig == SIGINT && VMError::is_error_reported()) { - os::die(); - } - - os::signal_notify(sig); -} - -void* os::user_handler() { - return CAST_FROM_FN_PTR(void*, UserHandler); -} - -extern "C" { - typedef void (*sa_handler_t)(int); - typedef void (*sa_sigaction_t)(int, siginfo_t *, void *); -} - -void* os::signal(int signal_number, void* handler) { - struct sigaction sigAct, oldSigAct; - - sigfillset(&(sigAct.sa_mask)); - sigAct.sa_flags = SA_RESTART|SA_SIGINFO; - sigAct.sa_handler = CAST_TO_FN_PTR(sa_handler_t, handler); - - if (sigaction(signal_number, &sigAct, &oldSigAct)) { - // -1 means registration failed - return (void *)-1; - } - - return CAST_FROM_FN_PTR(void*, oldSigAct.sa_handler); -} - -void os::signal_raise(int signal_number) { - ::raise(signal_number); -} - -// The following code is moved from os.cpp for making this -// code platform specific, which it is by its very nature. - -// Will be modified when max signal is changed to be dynamic -int os::sigexitnum_pd() { - return NSIG; -} - -// a counter for each possible signal value -static volatile jint pending_signals[NSIG+1] = { 0 }; -static Semaphore* sig_sem = NULL; - -static void jdk_misc_signal_init() { - // Initialize signal structures - ::memset((void*)pending_signals, 0, sizeof(pending_signals)); - - // Initialize signal semaphore - sig_sem = new Semaphore(); -} - -void os::signal_notify(int sig) { - if (sig_sem != NULL) { - Atomic::inc(&pending_signals[sig]); - sig_sem->signal(); - } else { - // Signal thread is not created with ReduceSignalUsage and jdk_misc_signal_init - // initialization isn't called. - assert(ReduceSignalUsage, "signal semaphore should be created"); - } -} - -static int check_pending_signals() { - for (;;) { - for (int i = 0; i < NSIG + 1; i++) { - jint n = pending_signals[i]; - if (n > 0 && n == Atomic::cmpxchg(&pending_signals[i], n, n - 1)) { - return i; - } - } - JavaThread *thread = JavaThread::current(); - ThreadBlockInVM tbivm(thread); - - bool threadIsSuspended; - do { - thread->set_suspend_equivalent(); - // cleared by handle_special_suspend_equivalent_condition() or java_suspend_self() - sig_sem->wait(); - - // were we externally suspended while we were waiting? - threadIsSuspended = thread->handle_special_suspend_equivalent_condition(); - if (threadIsSuspended) { - // The semaphore has been incremented, but while we were waiting - // another thread suspended us. We don't want to continue running - // while suspended because that would surprise the thread that - // suspended us. - sig_sem->signal(); - - thread->java_suspend_self(); - } - } while (threadIsSuspended); - } -} - -int os::signal_wait() { - return check_pending_signals(); -} - //////////////////////////////////////////////////////////////////////////////// // Virtual Memory @@ -2017,27 +1802,17 @@ bool os::remove_stack_guard_pages(char* addr, size_t size) { return os::uncommit_memory(addr, size); } -// If 'fixed' is true, anon_mmap() will attempt to reserve anonymous memory -// at 'requested_addr'. If there are existing memory mappings at the same -// location, however, they will be overwritten. If 'fixed' is false, // 'requested_addr' is only treated as a hint, the return value may or // may not start from the requested address. Unlike Bsd mmap(), this // function returns NULL to indicate failure. -static char* anon_mmap(char* requested_addr, size_t bytes, bool fixed) { - char * addr; - int flags; - - flags = MAP_PRIVATE | MAP_NORESERVE | MAP_ANONYMOUS; - if (fixed) { - assert((uintptr_t)requested_addr % os::Bsd::page_size() == 0, "unaligned address"); - flags |= MAP_FIXED; - } +static char* anon_mmap(char* requested_addr, size_t bytes) { + // MAP_FIXED is intentionally left out, to leave existing mappings intact. + const int flags = MAP_PRIVATE | MAP_NORESERVE | MAP_ANONYMOUS; // Map reserved/uncommitted pages PROT_NONE so we fail early if we // touch an uncommitted page. Otherwise, the read/write might // succeed if we have enough swap space to back the physical page. - addr = (char*)::mmap(requested_addr, bytes, PROT_NONE, - flags, -1, 0); + char* addr = (char*)::mmap(requested_addr, bytes, PROT_NONE, flags, -1, 0); return addr == MAP_FAILED ? NULL : addr; } @@ -2046,9 +1821,8 @@ static int anon_munmap(char * addr, size_t size) { return ::munmap(addr, size) == 0; } -char* os::pd_reserve_memory(size_t bytes, char* requested_addr, - size_t alignment_hint) { - return anon_mmap(requested_addr, bytes, (requested_addr != NULL)); +char* os::pd_reserve_memory(size_t bytes) { + return anon_mmap(NULL /* addr */, bytes); } bool os::pd_release_memory(char* addr, size_t size) { @@ -2131,9 +1905,9 @@ bool os::can_execute_large_page_memory() { return false; } -char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr, int file_desc) { +char* os::pd_attempt_reserve_memory_at(char* requested_addr, size_t bytes, int file_desc) { assert(file_desc >= 0, "file_desc is not valid"); - char* result = pd_attempt_reserve_memory_at(bytes, requested_addr); + char* result = pd_attempt_reserve_memory_at(requested_addr, bytes); if (result != NULL) { if (replace_existing_mapping_with_file_mapping(result, bytes, file_desc) == NULL) { vm_exit_during_initialization(err_msg("Error in mapping Java heap at the given filesystem directory")); @@ -2145,7 +1919,7 @@ char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr, int f // Reserve memory at an arbitrary address, only if that area is // available (and not reserved for something else). -char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr) { +char* os::pd_attempt_reserve_memory_at(char* requested_addr, size_t bytes) { // Assert only that the size is a multiple of the page size, since // that's all that mmap requires, and since that's all we really know // about at this low abstraction level. If we need higher alignment, @@ -2158,7 +1932,7 @@ char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr) { // Bsd mmap allows caller to pass an address as hint; give it a try first, // if kernel honors the hint then we can return immediately. - char * addr = anon_mmap(requested_addr, bytes, false); + char * addr = anon_mmap(requested_addr, bytes); if (addr == requested_addr) { return requested_addr; } @@ -2320,722 +2094,6 @@ OSReturn os::get_native_priority(const Thread* const thread, int *priority_ptr) return (*priority_ptr != -1 || errno == 0 ? OS_OK : OS_ERR); } -//////////////////////////////////////////////////////////////////////////////// -// suspend/resume support - -// The low-level signal-based suspend/resume support is a remnant from the -// old VM-suspension that used to be for java-suspension, safepoints etc, -// within hotspot. Currently used by JFR's OSThreadSampler -// -// The remaining code is greatly simplified from the more general suspension -// code that used to be used. -// -// The protocol is quite simple: -// - suspend: -// - sends a signal to the target thread -// - polls the suspend state of the osthread using a yield loop -// - target thread signal handler (SR_handler) sets suspend state -// and blocks in sigsuspend until continued -// - resume: -// - sets target osthread state to continue -// - sends signal to end the sigsuspend loop in the SR_handler -// -// Note that the SR_lock plays no role in this suspend/resume protocol, -// but is checked for NULL in SR_handler as a thread termination indicator. -// The SR_lock is, however, used by JavaThread::java_suspend()/java_resume() APIs. -// -// Note that resume_clear_context() and suspend_save_context() are needed -// by SR_handler(), so that fetch_frame_from_context() works, -// which in part is used by: -// - Forte Analyzer: AsyncGetCallTrace() -// - StackBanging: get_frame_at_stack_banging_point() - -static void resume_clear_context(OSThread *osthread) { - osthread->set_ucontext(NULL); - osthread->set_siginfo(NULL); -} - -static void suspend_save_context(OSThread *osthread, siginfo_t* siginfo, ucontext_t* context) { - osthread->set_ucontext(context); - osthread->set_siginfo(siginfo); -} - -// Handler function invoked when a thread's execution is suspended or -// resumed. We have to be careful that only async-safe functions are -// called here (Note: most pthread functions are not async safe and -// should be avoided.) -// -// Note: sigwait() is a more natural fit than sigsuspend() from an -// interface point of view, but sigwait() prevents the signal hander -// from being run. libpthread would get very confused by not having -// its signal handlers run and prevents sigwait()'s use with the -// mutex granting granting signal. -// -// Currently only ever called on the VMThread or JavaThread -// -#ifdef __APPLE__ -static OSXSemaphore sr_semaphore; -#else -static PosixSemaphore sr_semaphore; -#endif - -static void SR_handler(int sig, siginfo_t* siginfo, ucontext_t* context) { - // Save and restore errno to avoid confusing native code with EINTR - // after sigsuspend. - int old_errno = errno; - - Thread* thread = Thread::current_or_null_safe(); - assert(thread != NULL, "Missing current thread in SR_handler"); - - // On some systems we have seen signal delivery get "stuck" until the signal - // mask is changed as part of thread termination. Check that the current thread - // has not already terminated (via SR_lock()) - else the following assertion - // will fail because the thread is no longer a JavaThread as the ~JavaThread - // destructor has completed. - - if (thread->SR_lock() == NULL) { - return; - } - - assert(thread->is_VM_thread() || thread->is_Java_thread(), "Must be VMThread or JavaThread"); - - OSThread* osthread = thread->osthread(); - - os::SuspendResume::State current = osthread->sr.state(); - if (current == os::SuspendResume::SR_SUSPEND_REQUEST) { - suspend_save_context(osthread, siginfo, context); - - // attempt to switch the state, we assume we had a SUSPEND_REQUEST - os::SuspendResume::State state = osthread->sr.suspended(); - if (state == os::SuspendResume::SR_SUSPENDED) { - sigset_t suspend_set; // signals for sigsuspend() - - // get current set of blocked signals and unblock resume signal - pthread_sigmask(SIG_BLOCK, NULL, &suspend_set); - sigdelset(&suspend_set, SR_signum); - - sr_semaphore.signal(); - // wait here until we are resumed - while (1) { - sigsuspend(&suspend_set); - - os::SuspendResume::State result = osthread->sr.running(); - if (result == os::SuspendResume::SR_RUNNING) { - sr_semaphore.signal(); - break; - } else if (result != os::SuspendResume::SR_SUSPENDED) { - ShouldNotReachHere(); - } - } - - } else if (state == os::SuspendResume::SR_RUNNING) { - // request was cancelled, continue - } else { - ShouldNotReachHere(); - } - - resume_clear_context(osthread); - } else if (current == os::SuspendResume::SR_RUNNING) { - // request was cancelled, continue - } else if (current == os::SuspendResume::SR_WAKEUP_REQUEST) { - // ignore - } else { - // ignore - } - - errno = old_errno; -} - - -static int SR_initialize() { - struct sigaction act; - char *s; - // Get signal number to use for suspend/resume - if ((s = ::getenv("_JAVA_SR_SIGNUM")) != 0) { - int sig = ::strtol(s, 0, 10); - if (sig > MAX2(SIGSEGV, SIGBUS) && // See 4355769. - sig < NSIG) { // Must be legal signal and fit into sigflags[]. - SR_signum = sig; - } else { - warning("You set _JAVA_SR_SIGNUM=%d. It must be in range [%d, %d]. Using %d instead.", - sig, MAX2(SIGSEGV, SIGBUS)+1, NSIG-1, SR_signum); - } - } - - assert(SR_signum > SIGSEGV && SR_signum > SIGBUS, - "SR_signum must be greater than max(SIGSEGV, SIGBUS), see 4355769"); - - sigemptyset(&SR_sigset); - sigaddset(&SR_sigset, SR_signum); - - // Set up signal handler for suspend/resume - act.sa_flags = SA_RESTART|SA_SIGINFO; - act.sa_handler = (void (*)(int)) SR_handler; - - // SR_signum is blocked by default. - // 4528190 - We also need to block pthread restart signal (32 on all - // supported Bsd platforms). Note that BsdThreads need to block - // this signal for all threads to work properly. So we don't have - // to use hard-coded signal number when setting up the mask. - pthread_sigmask(SIG_BLOCK, NULL, &act.sa_mask); - - if (sigaction(SR_signum, &act, 0) == -1) { - return -1; - } - - // Save signal flag - os::Bsd::set_our_sigflags(SR_signum, act.sa_flags); - return 0; -} - -static int sr_notify(OSThread* osthread) { - int status = pthread_kill(osthread->pthread_id(), SR_signum); - assert_status(status == 0, status, "pthread_kill"); - return status; -} - -// "Randomly" selected value for how long we want to spin -// before bailing out on suspending a thread, also how often -// we send a signal to a thread we want to resume -static const int RANDOMLY_LARGE_INTEGER = 1000000; -static const int RANDOMLY_LARGE_INTEGER2 = 100; - -// returns true on success and false on error - really an error is fatal -// but this seems the normal response to library errors -static bool do_suspend(OSThread* osthread) { - assert(osthread->sr.is_running(), "thread should be running"); - assert(!sr_semaphore.trywait(), "semaphore has invalid state"); - - // mark as suspended and send signal - if (osthread->sr.request_suspend() != os::SuspendResume::SR_SUSPEND_REQUEST) { - // failed to switch, state wasn't running? - ShouldNotReachHere(); - return false; - } - - if (sr_notify(osthread) != 0) { - ShouldNotReachHere(); - } - - // managed to send the signal and switch to SUSPEND_REQUEST, now wait for SUSPENDED - while (true) { - if (sr_semaphore.timedwait(2)) { - break; - } else { - // timeout - os::SuspendResume::State cancelled = osthread->sr.cancel_suspend(); - if (cancelled == os::SuspendResume::SR_RUNNING) { - return false; - } else if (cancelled == os::SuspendResume::SR_SUSPENDED) { - // make sure that we consume the signal on the semaphore as well - sr_semaphore.wait(); - break; - } else { - ShouldNotReachHere(); - return false; - } - } - } - - guarantee(osthread->sr.is_suspended(), "Must be suspended"); - return true; -} - -static void do_resume(OSThread* osthread) { - assert(osthread->sr.is_suspended(), "thread should be suspended"); - assert(!sr_semaphore.trywait(), "invalid semaphore state"); - - if (osthread->sr.request_wakeup() != os::SuspendResume::SR_WAKEUP_REQUEST) { - // failed to switch to WAKEUP_REQUEST - ShouldNotReachHere(); - return; - } - - while (true) { - if (sr_notify(osthread) == 0) { - if (sr_semaphore.timedwait(2)) { - if (osthread->sr.is_running()) { - return; - } - } - } else { - ShouldNotReachHere(); - } - } - - guarantee(osthread->sr.is_running(), "Must be running!"); -} - -/////////////////////////////////////////////////////////////////////////////////// -// signal handling (except suspend/resume) - -// This routine may be used by user applications as a "hook" to catch signals. -// The user-defined signal handler must pass unrecognized signals to this -// routine, and if it returns true (non-zero), then the signal handler must -// return immediately. If the flag "abort_if_unrecognized" is true, then this -// routine will never retun false (zero), but instead will execute a VM panic -// routine kill the process. -// -// If this routine returns false, it is OK to call it again. This allows -// the user-defined signal handler to perform checks either before or after -// the VM performs its own checks. Naturally, the user code would be making -// a serious error if it tried to handle an exception (such as a null check -// or breakpoint) that the VM was generating for its own correct operation. -// -// This routine may recognize any of the following kinds of signals: -// SIGBUS, SIGSEGV, SIGILL, SIGFPE, SIGQUIT, SIGPIPE, SIGXFSZ, SIGUSR1. -// It should be consulted by handlers for any of those signals. -// -// The caller of this routine must pass in the three arguments supplied -// to the function referred to in the "sa_sigaction" (not the "sa_handler") -// field of the structure passed to sigaction(). This routine assumes that -// the sa_flags field passed to sigaction() includes SA_SIGINFO and SA_RESTART. -// -// Note that the VM will print warnings if it detects conflicting signal -// handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers". -// -extern "C" JNIEXPORT int JVM_handle_bsd_signal(int signo, siginfo_t* siginfo, - void* ucontext, - int abort_if_unrecognized); - -static void signalHandler(int sig, siginfo_t* info, void* uc) { - assert(info != NULL && uc != NULL, "it must be old kernel"); - int orig_errno = errno; // Preserve errno value over signal handler. - JVM_handle_bsd_signal(sig, info, uc, true); - errno = orig_errno; -} - - -// This boolean allows users to forward their own non-matching signals -// to JVM_handle_bsd_signal, harmlessly. -bool os::Bsd::signal_handlers_are_installed = false; - -// For signal-chaining -bool os::Bsd::libjsig_is_loaded = false; -typedef struct sigaction *(*get_signal_t)(int); -get_signal_t os::Bsd::get_signal_action = NULL; - -struct sigaction* os::Bsd::get_chained_signal_action(int sig) { - struct sigaction *actp = NULL; - - if (libjsig_is_loaded) { - // Retrieve the old signal handler from libjsig - actp = (*get_signal_action)(sig); - } - if (actp == NULL) { - // Retrieve the preinstalled signal handler from jvm - actp = os::Posix::get_preinstalled_handler(sig); - } - - return actp; -} - -static bool call_chained_handler(struct sigaction *actp, int sig, - siginfo_t *siginfo, void *context) { - // Call the old signal handler - if (actp->sa_handler == SIG_DFL) { - // It's more reasonable to let jvm treat it as an unexpected exception - // instead of taking the default action. - return false; - } else if (actp->sa_handler != SIG_IGN) { - if ((actp->sa_flags & SA_NODEFER) == 0) { - // automaticlly block the signal - sigaddset(&(actp->sa_mask), sig); - } - - sa_handler_t hand; - sa_sigaction_t sa; - bool siginfo_flag_set = (actp->sa_flags & SA_SIGINFO) != 0; - // retrieve the chained handler - if (siginfo_flag_set) { - sa = actp->sa_sigaction; - } else { - hand = actp->sa_handler; - } - - if ((actp->sa_flags & SA_RESETHAND) != 0) { - actp->sa_handler = SIG_DFL; - } - - // try to honor the signal mask - sigset_t oset; - pthread_sigmask(SIG_SETMASK, &(actp->sa_mask), &oset); - - // call into the chained handler - if (siginfo_flag_set) { - (*sa)(sig, siginfo, context); - } else { - (*hand)(sig); - } - - // restore the signal mask - pthread_sigmask(SIG_SETMASK, &oset, 0); - } - // Tell jvm's signal handler the signal is taken care of. - return true; -} - -bool os::Bsd::chained_handler(int sig, siginfo_t* siginfo, void* context) { - bool chained = false; - // signal-chaining - if (UseSignalChaining) { - struct sigaction *actp = get_chained_signal_action(sig); - if (actp != NULL) { - chained = call_chained_handler(actp, sig, siginfo, context); - } - } - return chained; -} - -// for diagnostic -int sigflags[NSIG]; - -int os::Bsd::get_our_sigflags(int sig) { - assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); - return sigflags[sig]; -} - -void os::Bsd::set_our_sigflags(int sig, int flags) { - assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); - if (sig > 0 && sig < NSIG) { - sigflags[sig] = flags; - } -} - -void os::Bsd::set_signal_handler(int sig, bool set_installed) { - // Check for overwrite. - struct sigaction oldAct; - sigaction(sig, (struct sigaction*)NULL, &oldAct); - - void* oldhand = oldAct.sa_sigaction - ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction) - : CAST_FROM_FN_PTR(void*, oldAct.sa_handler); - if (oldhand != CAST_FROM_FN_PTR(void*, SIG_DFL) && - oldhand != CAST_FROM_FN_PTR(void*, SIG_IGN) && - oldhand != CAST_FROM_FN_PTR(void*, (sa_sigaction_t)signalHandler)) { - if (AllowUserSignalHandlers || !set_installed) { - // Do not overwrite; user takes responsibility to forward to us. - return; - } else if (UseSignalChaining) { - // save the old handler in jvm - os::Posix::save_preinstalled_handler(sig, oldAct); - // libjsig also interposes the sigaction() call below and saves the - // old sigaction on it own. - } else { - fatal("Encountered unexpected pre-existing sigaction handler " - "%#lx for signal %d.", (long)oldhand, sig); - } - } - - struct sigaction sigAct; - sigfillset(&(sigAct.sa_mask)); - sigAct.sa_handler = SIG_DFL; - if (!set_installed) { - sigAct.sa_flags = SA_SIGINFO|SA_RESTART; - } else { - sigAct.sa_sigaction = signalHandler; - sigAct.sa_flags = SA_SIGINFO|SA_RESTART; - } -#ifdef __APPLE__ - // Needed for main thread as XNU (Mac OS X kernel) will only deliver SIGSEGV - // (which starts as SIGBUS) on main thread with faulting address inside "stack+guard pages" - // if the signal handler declares it will handle it on alternate stack. - // Notice we only declare we will handle it on alt stack, but we are not - // actually going to use real alt stack - this is just a workaround. - // Please see ux_exception.c, method catch_mach_exception_raise for details - // link http://www.opensource.apple.com/source/xnu/xnu-2050.18.24/bsd/uxkern/ux_exception.c - if (sig == SIGSEGV) { - sigAct.sa_flags |= SA_ONSTACK; - } -#endif - - // Save flags, which are set by ours - assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); - sigflags[sig] = sigAct.sa_flags; - - int ret = sigaction(sig, &sigAct, &oldAct); - assert(ret == 0, "check"); - - void* oldhand2 = oldAct.sa_sigaction - ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction) - : CAST_FROM_FN_PTR(void*, oldAct.sa_handler); - assert(oldhand2 == oldhand, "no concurrent signal handler installation"); -} - -// install signal handlers for signals that HotSpot needs to -// handle in order to support Java-level exception handling. - -void os::Bsd::install_signal_handlers() { - if (!signal_handlers_are_installed) { - signal_handlers_are_installed = true; - - // signal-chaining - typedef void (*signal_setting_t)(); - signal_setting_t begin_signal_setting = NULL; - signal_setting_t end_signal_setting = NULL; - begin_signal_setting = CAST_TO_FN_PTR(signal_setting_t, - dlsym(RTLD_DEFAULT, "JVM_begin_signal_setting")); - if (begin_signal_setting != NULL) { - end_signal_setting = CAST_TO_FN_PTR(signal_setting_t, - dlsym(RTLD_DEFAULT, "JVM_end_signal_setting")); - get_signal_action = CAST_TO_FN_PTR(get_signal_t, - dlsym(RTLD_DEFAULT, "JVM_get_signal_action")); - libjsig_is_loaded = true; - assert(UseSignalChaining, "should enable signal-chaining"); - } - if (libjsig_is_loaded) { - // Tell libjsig jvm is setting signal handlers - (*begin_signal_setting)(); - } - - set_signal_handler(SIGSEGV, true); - set_signal_handler(SIGPIPE, true); - set_signal_handler(SIGBUS, true); - set_signal_handler(SIGILL, true); - set_signal_handler(SIGFPE, true); - set_signal_handler(SIGXFSZ, true); - -#if defined(__APPLE__) - // In Mac OS X 10.4, CrashReporter will write a crash log for all 'fatal' signals, including - // signals caught and handled by the JVM. To work around this, we reset the mach task - // signal handler that's placed on our process by CrashReporter. This disables - // CrashReporter-based reporting. - // - // This work-around is not necessary for 10.5+, as CrashReporter no longer intercedes - // on caught fatal signals. - // - // Additionally, gdb installs both standard BSD signal handlers, and mach exception - // handlers. By replacing the existing task exception handler, we disable gdb's mach - // exception handling, while leaving the standard BSD signal handlers functional. - kern_return_t kr; - kr = task_set_exception_ports(mach_task_self(), - EXC_MASK_BAD_ACCESS | EXC_MASK_ARITHMETIC, - MACH_PORT_NULL, - EXCEPTION_STATE_IDENTITY, - MACHINE_THREAD_STATE); - - assert(kr == KERN_SUCCESS, "could not set mach task signal handler"); -#endif - - if (libjsig_is_loaded) { - // Tell libjsig jvm finishes setting signal handlers - (*end_signal_setting)(); - } - - // We don't activate signal checker if libjsig is in place, we trust ourselves - // and if UserSignalHandler is installed all bets are off - if (CheckJNICalls) { - if (libjsig_is_loaded) { - log_debug(jni, resolve)("Info: libjsig is activated, all active signal checking is disabled"); - check_signals = false; - } - if (AllowUserSignalHandlers) { - log_debug(jni, resolve)("Info: AllowUserSignalHandlers is activated, all active signal checking is disabled"); - check_signals = false; - } - } - } -} - - -///// -// glibc on Bsd platform uses non-documented flag -// to indicate, that some special sort of signal -// trampoline is used. -// We will never set this flag, and we should -// ignore this flag in our diagnostic -#ifdef SIGNIFICANT_SIGNAL_MASK - #undef SIGNIFICANT_SIGNAL_MASK -#endif -#define SIGNIFICANT_SIGNAL_MASK (~0x04000000) - -static const char* get_signal_handler_name(address handler, - char* buf, int buflen) { - int offset; - bool found = os::dll_address_to_library_name(handler, buf, buflen, &offset); - if (found) { - // skip directory names - const char *p1, *p2; - p1 = buf; - size_t len = strlen(os::file_separator()); - while ((p2 = strstr(p1, os::file_separator())) != NULL) p1 = p2 + len; - jio_snprintf(buf, buflen, "%s+0x%x", p1, offset); - } else { - jio_snprintf(buf, buflen, PTR_FORMAT, handler); - } - return buf; -} - -static void print_signal_handler(outputStream* st, int sig, - char* buf, size_t buflen) { - struct sigaction sa; - - sigaction(sig, NULL, &sa); - - // See comment for SIGNIFICANT_SIGNAL_MASK define - sa.sa_flags &= SIGNIFICANT_SIGNAL_MASK; - - st->print("%s: ", os::exception_name(sig, buf, buflen)); - - address handler = (sa.sa_flags & SA_SIGINFO) - ? CAST_FROM_FN_PTR(address, sa.sa_sigaction) - : CAST_FROM_FN_PTR(address, sa.sa_handler); - - if (handler == CAST_FROM_FN_PTR(address, SIG_DFL)) { - st->print("SIG_DFL"); - } else if (handler == CAST_FROM_FN_PTR(address, SIG_IGN)) { - st->print("SIG_IGN"); - } else { - st->print("[%s]", get_signal_handler_name(handler, buf, buflen)); - } - - st->print(", sa_mask[0]="); - os::Posix::print_signal_set_short(st, &sa.sa_mask); - - address rh = VMError::get_resetted_sighandler(sig); - // May be, handler was resetted by VMError? - if (rh != NULL) { - handler = rh; - sa.sa_flags = VMError::get_resetted_sigflags(sig) & SIGNIFICANT_SIGNAL_MASK; - } - - st->print(", sa_flags="); - os::Posix::print_sa_flags(st, sa.sa_flags); - - // Check: is it our handler? - if (handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)signalHandler) || - handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)SR_handler)) { - // It is our signal handler - // check for flags, reset system-used one! - if ((int)sa.sa_flags != os::Bsd::get_our_sigflags(sig)) { - st->print( - ", flags was changed from " PTR32_FORMAT ", consider using jsig library", - os::Bsd::get_our_sigflags(sig)); - } - } - st->cr(); -} - - -#define DO_SIGNAL_CHECK(sig) \ - do { \ - if (!sigismember(&check_signal_done, sig)) { \ - os::Bsd::check_signal_handler(sig); \ - } \ - } while (0) - -// This method is a periodic task to check for misbehaving JNI applications -// under CheckJNI, we can add any periodic checks here - -void os::run_periodic_checks() { - - if (check_signals == false) return; - - // SEGV and BUS if overridden could potentially prevent - // generation of hs*.log in the event of a crash, debugging - // such a case can be very challenging, so we absolutely - // check the following for a good measure: - DO_SIGNAL_CHECK(SIGSEGV); - DO_SIGNAL_CHECK(SIGILL); - DO_SIGNAL_CHECK(SIGFPE); - DO_SIGNAL_CHECK(SIGBUS); - DO_SIGNAL_CHECK(SIGPIPE); - DO_SIGNAL_CHECK(SIGXFSZ); - - - // ReduceSignalUsage allows the user to override these handlers - // see comments at the very top and jvm_md.h - if (!ReduceSignalUsage) { - DO_SIGNAL_CHECK(SHUTDOWN1_SIGNAL); - DO_SIGNAL_CHECK(SHUTDOWN2_SIGNAL); - DO_SIGNAL_CHECK(SHUTDOWN3_SIGNAL); - DO_SIGNAL_CHECK(BREAK_SIGNAL); - } - - DO_SIGNAL_CHECK(SR_signum); -} - -typedef int (*os_sigaction_t)(int, const struct sigaction *, struct sigaction *); - -static os_sigaction_t os_sigaction = NULL; - -void os::Bsd::check_signal_handler(int sig) { - char buf[O_BUFLEN]; - address jvmHandler = NULL; - - - struct sigaction act; - if (os_sigaction == NULL) { - // only trust the default sigaction, in case it has been interposed - os_sigaction = (os_sigaction_t)dlsym(RTLD_DEFAULT, "sigaction"); - if (os_sigaction == NULL) return; - } - - os_sigaction(sig, (struct sigaction*)NULL, &act); - - - act.sa_flags &= SIGNIFICANT_SIGNAL_MASK; - - address thisHandler = (act.sa_flags & SA_SIGINFO) - ? CAST_FROM_FN_PTR(address, act.sa_sigaction) - : CAST_FROM_FN_PTR(address, act.sa_handler); - - - switch (sig) { - case SIGSEGV: - case SIGBUS: - case SIGFPE: - case SIGPIPE: - case SIGILL: - case SIGXFSZ: - jvmHandler = CAST_FROM_FN_PTR(address, (sa_sigaction_t)signalHandler); - break; - - case SHUTDOWN1_SIGNAL: - case SHUTDOWN2_SIGNAL: - case SHUTDOWN3_SIGNAL: - case BREAK_SIGNAL: - jvmHandler = (address)user_handler(); - break; - - default: - if (sig == SR_signum) { - jvmHandler = CAST_FROM_FN_PTR(address, (sa_sigaction_t)SR_handler); - } else { - return; - } - break; - } - - if (thisHandler != jvmHandler) { - tty->print("Warning: %s handler ", exception_name(sig, buf, O_BUFLEN)); - tty->print("expected:%s", get_signal_handler_name(jvmHandler, buf, O_BUFLEN)); - tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN)); - // No need to check this sig any longer - sigaddset(&check_signal_done, sig); - // Running under non-interactive shell, SHUTDOWN2_SIGNAL will be reassigned SIG_IGN - if (sig == SHUTDOWN2_SIGNAL && !isatty(fileno(stdin))) { - tty->print_cr("Running in non-interactive shell, %s handler is replaced by shell", - exception_name(sig, buf, O_BUFLEN)); - } - } else if(os::Bsd::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Bsd::get_our_sigflags(sig)) { - tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN)); - tty->print("expected:"); - os::Posix::print_sa_flags(tty, os::Bsd::get_our_sigflags(sig)); - tty->cr(); - tty->print(" found:"); - os::Posix::print_sa_flags(tty, act.sa_flags); - tty->cr(); - // No need to check this sig any longer - sigaddset(&check_signal_done, sig); - } - - // Dump all the signal - if (sigismember(&check_signal_done, sig)) { - print_signal_handlers(tty, buf, O_BUFLEN); - } -} - extern void report_error(char* file_name, int line_no, char* title, char* format, ...); @@ -3081,16 +2139,16 @@ jint os::init_2(void) { os::Posix::init_2(); // initialize suspend/resume support - must do this before signal_sets_init() - if (SR_initialize() != 0) { + if (PosixSignals::SR_initialize() != 0) { perror("SR_initialize failed"); return JNI_ERR; } - Bsd::signal_sets_init(); - Bsd::install_signal_handlers(); + PosixSignals::signal_sets_init(); + PosixSignals::install_signal_handlers(); // Initialize data for jdk.internal.misc.Signal if (!ReduceSignalUsage) { - jdk_misc_signal_init(); + PosixSignals::jdk_misc_signal_init(); } // Check and sets minimum stack sizes against command line options @@ -3224,10 +2282,10 @@ bool os::bind_to_processor(uint processor_id) { } void os::SuspendedThreadTask::internal_do_task() { - if (do_suspend(_thread->osthread())) { + if (PosixSignals::do_suspend(_thread->osthread())) { SuspendedThreadTaskContext context(_thread, _thread->osthread()->ucontext()); do_task(context); - do_resume(_thread->osthread()); + PosixSignals::do_resume(_thread->osthread()); } } diff --git a/src/hotspot/os/bsd/os_bsd.hpp b/src/hotspot/os/bsd/os_bsd.hpp index f894dd2fb9e..32ec6318c09 100644 --- a/src/hotspot/os/bsd/os_bsd.hpp +++ b/src/hotspot/os/bsd/os_bsd.hpp @@ -33,13 +33,6 @@ static bool zero_page_read_protected() { return true; } class Bsd { friend class os; - // For signal-chaining - static bool libjsig_is_loaded; // libjsig that interposes sigaction(), - // __sigaction(), signal() is loaded - static struct sigaction *(*get_signal_action)(int); - - static void check_signal_handler(int sig); - #ifdef __APPLE__ // mach_absolute_time static mach_timebase_info_data_t _timebase_info; @@ -70,8 +63,6 @@ class Bsd { static void init_thread_fpu_state(); static pthread_t main_thread(void) { return _main_thread; } - static void hotspot_sigmask(Thread* thread); - static pid_t gettid(); static int page_size(void) { return _page_size; } @@ -84,23 +75,6 @@ class Bsd { static bool get_frame_at_stack_banging_point(JavaThread* thread, ucontext_t* uc, frame* fr); - // This boolean allows users to forward their own non-matching signals - // to JVM_handle_bsd_signal, harmlessly. - static bool signal_handlers_are_installed; - - static int get_our_sigflags(int); - static void set_our_sigflags(int, int); - static void signal_sets_init(); - static void install_signal_handlers(); - static void set_signal_handler(int, bool); - - static sigset_t* unblocked_signals(); - static sigset_t* vm_signals(); - - // For signal-chaining - static struct sigaction *get_chained_signal_action(int sig); - static bool chained_handler(int sig, siginfo_t* siginfo, void* context); - // Real-time clock functions static void clock_init(void); diff --git a/src/hotspot/os/linux/cgroupSubsystem_linux.cpp b/src/hotspot/os/linux/cgroupSubsystem_linux.cpp index d6396a52946..fada2a732bf 100644 --- a/src/hotspot/os/linux/cgroupSubsystem_linux.cpp +++ b/src/hotspot/os/linux/cgroupSubsystem_linux.cpp @@ -302,8 +302,22 @@ bool CgroupSubsystemFactory::determine_type(CgroupInfo* cg_infos, cg_infos[MEMORY_IDX]._root_mount_path = os::strdup(tmproot); cg_infos[MEMORY_IDX]._data_complete = true; } else if (strcmp(token, "cpuset") == 0) { - assert(cg_infos[CPUSET_IDX]._mount_path == NULL, "stomping of _mount_path"); - cg_infos[CPUSET_IDX]._mount_path = os::strdup(tmpmount); + if (cg_infos[CPUSET_IDX]._mount_path != NULL) { + // On some systems duplicate cpuset controllers get mounted in addition to + // the main cgroup controllers most likely under /sys/fs/cgroup. In that + // case pick the one under /sys/fs/cgroup and discard others. + if (strstr(cg_infos[CPUSET_IDX]._mount_path, "/sys/fs/cgroup") != cg_infos[CPUSET_IDX]._mount_path) { + log_warning(os, container)("Duplicate cpuset controllers detected. Picking %s, skipping %s.", + tmpmount, cg_infos[CPUSET_IDX]._mount_path); + os::free(cg_infos[CPUSET_IDX]._mount_path); + cg_infos[CPUSET_IDX]._mount_path = os::strdup(tmpmount); + } else { + log_warning(os, container)("Duplicate cpuset controllers detected. Picking %s, skipping %s.", + cg_infos[CPUSET_IDX]._mount_path, tmpmount); + } + } else { + cg_infos[CPUSET_IDX]._mount_path = os::strdup(tmpmount); + } cg_infos[CPUSET_IDX]._root_mount_path = os::strdup(tmproot); cg_infos[CPUSET_IDX]._data_complete = true; } else if (strcmp(token, "cpu") == 0) { diff --git a/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp b/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp index c51ef9d6dc3..66192f1d271 100644 --- a/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp +++ b/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp @@ -149,7 +149,7 @@ jlong CgroupV2Subsystem::memory_max_usage_in_bytes() { } char* CgroupV2Subsystem::mem_soft_limit_val() { - GET_CONTAINER_INFO_CPTR(cptr, _unified, "/memory.high", + GET_CONTAINER_INFO_CPTR(cptr, _unified, "/memory.low", "Memory Soft Limit is: %s", "%s", mem_soft_limit_str, 1024); if (mem_soft_limit_str == NULL) { return NULL; @@ -157,9 +157,20 @@ char* CgroupV2Subsystem::mem_soft_limit_val() { return os::strdup(mem_soft_limit_str); } +// Note that for cgroups v2 the actual limits set for swap and +// memory live in two different files, memory.swap.max and memory.max +// respectively. In order to properly report a cgroup v1 like +// compound value we need to sum the two values. Setting a swap limit +// without also setting a memory limit is not allowed. jlong CgroupV2Subsystem::memory_and_swap_limit_in_bytes() { char* mem_swp_limit_str = mem_swp_limit_val(); - return limit_from_str(mem_swp_limit_str); + jlong swap_limit = limit_from_str(mem_swp_limit_str); + if (swap_limit >= 0) { + jlong memory_limit = read_memory_limit_in_bytes(); + assert(memory_limit >= 0, "swap limit without memory limit?"); + return memory_limit + swap_limit; + } + return swap_limit; } char* CgroupV2Subsystem::mem_swp_limit_val() { diff --git a/src/hotspot/os/linux/gc/z/zLargePages_linux.cpp b/src/hotspot/os/linux/gc/z/zLargePages_linux.cpp index c79195cd118..caf70224599 100644 --- a/src/hotspot/os/linux/gc/z/zLargePages_linux.cpp +++ b/src/hotspot/os/linux/gc/z/zLargePages_linux.cpp @@ -25,7 +25,7 @@ #include "gc/z/zLargePages.hpp" #include "runtime/globals.hpp" -void ZLargePages::initialize_platform() { +void ZLargePages::pd_initialize() { if (UseLargePages) { if (UseTransparentHugePages) { _state = Transparent; diff --git a/src/hotspot/os/linux/gc/z/zNUMA_linux.cpp b/src/hotspot/os/linux/gc/z/zNUMA_linux.cpp index 7503c1ce46a..cfe25549ffc 100644 --- a/src/hotspot/os/linux/gc/z/zNUMA_linux.cpp +++ b/src/hotspot/os/linux/gc/z/zNUMA_linux.cpp @@ -29,7 +29,7 @@ #include "runtime/os.hpp" #include "utilities/debug.hpp" -void ZNUMA::initialize_platform() { +void ZNUMA::pd_initialize() { _enabled = UseNUMA; } diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp index be6dfef313a..81d56ca1e4b 100644 --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp @@ -46,6 +46,7 @@ #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" #include "runtime/globals.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/interfaceSupport.inline.hpp" #include "runtime/init.hpp" #include "runtime/java.hpp" @@ -62,6 +63,7 @@ #include "runtime/threadSMR.hpp" #include "runtime/timer.hpp" #include "runtime/vm_version.hpp" +#include "signals_posix.hpp" #include "semaphore_posix.hpp" #include "services/attachListener.hpp" #include "services/memTracker.hpp" @@ -169,20 +171,8 @@ static int clock_tics_per_sec = 100; // avoid this static bool suppress_primordial_thread_resolution = false; -// For diagnostics to print a message once. see run_periodic_checks -static sigset_t check_signal_done; -static bool check_signals = true; - -// Signal number used to suspend/resume a thread - -// do not use any signal number less than SIGSEGV, see 4355769 -static int SR_signum = SIGUSR2; -sigset_t SR_sigset; - // utility functions -static int SR_initialize(); - julong os::available_memory() { return Linux::available_memory(); } @@ -510,94 +500,6 @@ extern "C" void breakpoint() { // use debugger to set breakpoint here } -//////////////////////////////////////////////////////////////////////////////// -// signal support - -debug_only(static bool signal_sets_initialized = false); -static sigset_t unblocked_sigs, vm_sigs; - -void os::Linux::signal_sets_init() { - // Should also have an assertion stating we are still single-threaded. - assert(!signal_sets_initialized, "Already initialized"); - // Fill in signals that are necessarily unblocked for all threads in - // the VM. Currently, we unblock the following signals: - // SHUTDOWN{1,2,3}_SIGNAL: for shutdown hooks support (unless over-ridden - // by -Xrs (=ReduceSignalUsage)); - // BREAK_SIGNAL which is unblocked only by the VM thread and blocked by all - // other threads. The "ReduceSignalUsage" boolean tells us not to alter - // the dispositions or masks wrt these signals. - // Programs embedding the VM that want to use the above signals for their - // own purposes must, at this time, use the "-Xrs" option to prevent - // interference with shutdown hooks and BREAK_SIGNAL thread dumping. - // (See bug 4345157, and other related bugs). - // In reality, though, unblocking these signals is really a nop, since - // these signals are not blocked by default. - sigemptyset(&unblocked_sigs); - sigaddset(&unblocked_sigs, SIGILL); - sigaddset(&unblocked_sigs, SIGSEGV); - sigaddset(&unblocked_sigs, SIGBUS); - sigaddset(&unblocked_sigs, SIGFPE); -#if defined(PPC64) - sigaddset(&unblocked_sigs, SIGTRAP); -#endif - sigaddset(&unblocked_sigs, SR_signum); - - if (!ReduceSignalUsage) { - if (!os::Posix::is_sig_ignored(SHUTDOWN1_SIGNAL)) { - sigaddset(&unblocked_sigs, SHUTDOWN1_SIGNAL); - } - if (!os::Posix::is_sig_ignored(SHUTDOWN2_SIGNAL)) { - sigaddset(&unblocked_sigs, SHUTDOWN2_SIGNAL); - } - if (!os::Posix::is_sig_ignored(SHUTDOWN3_SIGNAL)) { - sigaddset(&unblocked_sigs, SHUTDOWN3_SIGNAL); - } - } - // Fill in signals that are blocked by all but the VM thread. - sigemptyset(&vm_sigs); - if (!ReduceSignalUsage) { - sigaddset(&vm_sigs, BREAK_SIGNAL); - } - debug_only(signal_sets_initialized = true); - -} - -// These are signals that are unblocked while a thread is running Java. -// (For some reason, they get blocked by default.) -sigset_t* os::Linux::unblocked_signals() { - assert(signal_sets_initialized, "Not initialized"); - return &unblocked_sigs; -} - -// These are the signals that are blocked while a (non-VM) thread is -// running Java. Only the VM thread handles these signals. -sigset_t* os::Linux::vm_signals() { - assert(signal_sets_initialized, "Not initialized"); - return &vm_sigs; -} - -void os::Linux::hotspot_sigmask(Thread* thread) { - - //Save caller's signal mask before setting VM signal mask - sigset_t caller_sigmask; - pthread_sigmask(SIG_BLOCK, NULL, &caller_sigmask); - - OSThread* osthread = thread->osthread(); - osthread->set_caller_sigmask(caller_sigmask); - - pthread_sigmask(SIG_UNBLOCK, os::Linux::unblocked_signals(), NULL); - - if (!ReduceSignalUsage) { - if (thread->is_VM_thread()) { - // Only the VM thread handles BREAK_SIGNAL ... - pthread_sigmask(SIG_UNBLOCK, vm_signals(), NULL); - } else { - // ... all other threads block BREAK_SIGNAL - pthread_sigmask(SIG_BLOCK, vm_signals(), NULL); - } - } -} - ////////////////////////////////////////////////////////////////////////////// // detecting pthread library @@ -768,7 +670,7 @@ static void *thread_native_entry(Thread *thread) { } } // initialize signal mask for this thread - os::Linux::hotspot_sigmask(thread); + PosixSignals::hotspot_sigmask(thread); // initialize floating point control register os::Linux::init_thread_fpu_state(); @@ -977,13 +879,6 @@ bool os::create_thread(Thread* thread, ThreadType thr_type, } } - // Aborted due to thread limit being reached - if (state == ZOMBIE) { - thread->set_osthread(NULL); - delete osthread; - return false; - } - // The thread is returned suspended (in state INITIALIZED), // and is started higher up in the call chain assert(state == INITIALIZED, "race condition"); @@ -1051,7 +946,7 @@ bool os::create_attached_thread(JavaThread* thread) { // initialize signal mask for this thread // and save the caller's signal mask - os::Linux::hotspot_sigmask(thread); + PosixSignals::hotspot_sigmask(thread); log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT ").", os::current_thread_id(), (uintx) pthread_self()); @@ -2705,24 +2600,21 @@ void os::get_summary_cpu_info(char* cpuinfo, size_t length) { #endif } -static void print_signal_handler(outputStream* st, int sig, - char* buf, size_t buflen); - void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) { st->print_cr("Signal Handlers:"); - print_signal_handler(st, SIGSEGV, buf, buflen); - print_signal_handler(st, SIGBUS , buf, buflen); - print_signal_handler(st, SIGFPE , buf, buflen); - print_signal_handler(st, SIGPIPE, buf, buflen); - print_signal_handler(st, SIGXFSZ, buf, buflen); - print_signal_handler(st, SIGILL , buf, buflen); - print_signal_handler(st, SR_signum, buf, buflen); - print_signal_handler(st, SHUTDOWN1_SIGNAL, buf, buflen); - print_signal_handler(st, SHUTDOWN2_SIGNAL , buf, buflen); - print_signal_handler(st, SHUTDOWN3_SIGNAL , buf, buflen); - print_signal_handler(st, BREAK_SIGNAL, buf, buflen); + PosixSignals::print_signal_handler(st, SIGSEGV, buf, buflen); + PosixSignals::print_signal_handler(st, SIGBUS , buf, buflen); + PosixSignals::print_signal_handler(st, SIGFPE , buf, buflen); + PosixSignals::print_signal_handler(st, SIGPIPE, buf, buflen); + PosixSignals::print_signal_handler(st, SIGXFSZ, buf, buflen); + PosixSignals::print_signal_handler(st, SIGILL , buf, buflen); + PosixSignals::print_signal_handler(st, SR_signum, buf, buflen); + PosixSignals::print_signal_handler(st, SHUTDOWN1_SIGNAL, buf, buflen); + PosixSignals::print_signal_handler(st, SHUTDOWN2_SIGNAL , buf, buflen); + PosixSignals::print_signal_handler(st, SHUTDOWN3_SIGNAL , buf, buflen); + PosixSignals::print_signal_handler(st, BREAK_SIGNAL, buf, buflen); #if defined(PPC64) - print_signal_handler(st, SIGTRAP, buf, buflen); + PosixSignals::print_signal_handler(st, SIGTRAP, buf, buflen); #endif } @@ -2825,117 +2717,6 @@ void os::print_jni_name_suffix_on(outputStream* st, int args_size) { // no suffix required } -//////////////////////////////////////////////////////////////////////////////// -// sun.misc.Signal support - -static void UserHandler(int sig, void *siginfo, void *context) { - // Ctrl-C is pressed during error reporting, likely because the error - // handler fails to abort. Let VM die immediately. - if (sig == SIGINT && VMError::is_error_reported()) { - os::die(); - } - - os::signal_notify(sig); -} - -void* os::user_handler() { - return CAST_FROM_FN_PTR(void*, UserHandler); -} - -extern "C" { - typedef void (*sa_handler_t)(int); - typedef void (*sa_sigaction_t)(int, siginfo_t *, void *); -} - -void* os::signal(int signal_number, void* handler) { - struct sigaction sigAct, oldSigAct; - - sigfillset(&(sigAct.sa_mask)); - sigAct.sa_flags = SA_RESTART|SA_SIGINFO; - sigAct.sa_handler = CAST_TO_FN_PTR(sa_handler_t, handler); - - if (sigaction(signal_number, &sigAct, &oldSigAct)) { - // -1 means registration failed - return (void *)-1; - } - - return CAST_FROM_FN_PTR(void*, oldSigAct.sa_handler); -} - -void os::signal_raise(int signal_number) { - ::raise(signal_number); -} - -// The following code is moved from os.cpp for making this -// code platform specific, which it is by its very nature. - -// Will be modified when max signal is changed to be dynamic -int os::sigexitnum_pd() { - return NSIG; -} - -// a counter for each possible signal value -static volatile jint pending_signals[NSIG+1] = { 0 }; - -// Linux(POSIX) specific hand shaking semaphore. -static Semaphore* sig_sem = NULL; -static PosixSemaphore sr_semaphore; - -static void jdk_misc_signal_init() { - // Initialize signal structures - ::memset((void*)pending_signals, 0, sizeof(pending_signals)); - - // Initialize signal semaphore - sig_sem = new Semaphore(); -} - -void os::signal_notify(int sig) { - if (sig_sem != NULL) { - Atomic::inc(&pending_signals[sig]); - sig_sem->signal(); - } else { - // Signal thread is not created with ReduceSignalUsage and jdk_misc_signal_init - // initialization isn't called. - assert(ReduceSignalUsage, "signal semaphore should be created"); - } -} - -static int check_pending_signals() { - for (;;) { - for (int i = 0; i < NSIG + 1; i++) { - jint n = pending_signals[i]; - if (n > 0 && n == Atomic::cmpxchg(&pending_signals[i], n, n - 1)) { - return i; - } - } - JavaThread *thread = JavaThread::current(); - ThreadBlockInVM tbivm(thread); - - bool threadIsSuspended; - do { - thread->set_suspend_equivalent(); - // cleared by handle_special_suspend_equivalent_condition() or java_suspend_self() - sig_sem->wait(); - - // were we externally suspended while we were waiting? - threadIsSuspended = thread->handle_special_suspend_equivalent_condition(); - if (threadIsSuspended) { - // The semaphore has been incremented, but while we were waiting - // another thread suspended us. We don't want to continue running - // while suspended because that would surprise the thread that - // suspended us. - sig_sem->signal(); - - thread->java_suspend_self(); - } - } while (threadIsSuspended); - } -} - -int os::signal_wait() { - return check_pending_signals(); -} - //////////////////////////////////////////////////////////////////////////////// // Virtual Memory @@ -3644,27 +3425,17 @@ bool os::remove_stack_guard_pages(char* addr, size_t size) { return os::uncommit_memory(addr, size); } -// If 'fixed' is true, anon_mmap() will attempt to reserve anonymous memory -// at 'requested_addr'. If there are existing memory mappings at the same -// location, however, they will be overwritten. If 'fixed' is false, // 'requested_addr' is only treated as a hint, the return value may or // may not start from the requested address. Unlike Linux mmap(), this // function returns NULL to indicate failure. -static char* anon_mmap(char* requested_addr, size_t bytes, bool fixed) { - char * addr; - int flags; - - flags = MAP_PRIVATE | MAP_NORESERVE | MAP_ANONYMOUS; - if (fixed) { - assert((uintptr_t)requested_addr % os::Linux::page_size() == 0, "unaligned address"); - flags |= MAP_FIXED; - } +static char* anon_mmap(char* requested_addr, size_t bytes) { + // MAP_FIXED is intentionally left out, to leave existing mappings intact. + const int flags = MAP_PRIVATE | MAP_NORESERVE | MAP_ANONYMOUS; // Map reserved/uncommitted pages PROT_NONE so we fail early if we // touch an uncommitted page. Otherwise, the read/write might // succeed if we have enough swap space to back the physical page. - addr = (char*)::mmap(requested_addr, bytes, PROT_NONE, - flags, -1, 0); + char* addr = (char*)::mmap(requested_addr, bytes, PROT_NONE, flags, -1, 0); return addr == MAP_FAILED ? NULL : addr; } @@ -3677,19 +3448,14 @@ static char* anon_mmap(char* requested_addr, size_t bytes, bool fixed) { // It must be a multiple of allocation granularity. // Returns address of memory or NULL. If req_addr was not NULL, will only return // req_addr or NULL. -static char* anon_mmap_aligned(size_t bytes, size_t alignment, char* req_addr) { - +static char* anon_mmap_aligned(char* req_addr, size_t bytes, size_t alignment) { size_t extra_size = bytes; if (req_addr == NULL && alignment > 0) { extra_size += alignment; } - char* start = (char*) ::mmap(req_addr, extra_size, PROT_NONE, - MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, - -1, 0); - if (start == MAP_FAILED) { - start = NULL; - } else { + char* start = anon_mmap(req_addr, extra_size); + if (start != NULL) { if (req_addr != NULL) { if (start != req_addr) { ::munmap(start, extra_size); @@ -3715,9 +3481,8 @@ static int anon_munmap(char * addr, size_t size) { return ::munmap(addr, size) == 0; } -char* os::pd_reserve_memory(size_t bytes, char* requested_addr, - size_t alignment_hint) { - return anon_mmap(requested_addr, bytes, (requested_addr != NULL)); +char* os::pd_reserve_memory(size_t bytes) { + return anon_mmap(NULL, bytes); } bool os::pd_release_memory(char* addr, size_t size) { @@ -4075,7 +3840,7 @@ static char* shmat_with_alignment(int shmid, size_t bytes, size_t alignment) { // To ensure that we get 'alignment' aligned memory from shmat, // we pre-reserve aligned virtual memory and then attach to that. - char* pre_reserved_addr = anon_mmap_aligned(bytes, alignment, NULL); + char* pre_reserved_addr = anon_mmap_aligned(NULL /* req_addr */, bytes, alignment); if (pre_reserved_addr == NULL) { // Couldn't pre-reserve aligned memory. shm_warning("Failed to pre-reserve aligned memory for shmat."); @@ -4244,7 +4009,7 @@ char* os::Linux::reserve_memory_special_huge_tlbfs_mixed(size_t bytes, assert(is_aligned(bytes, alignment), "Must be"); // First reserve - but not commit - the address range in small pages. - char* const start = anon_mmap_aligned(bytes, alignment, req_addr); + char* const start = anon_mmap_aligned(req_addr, bytes, alignment); if (start == NULL) { return NULL; @@ -4397,9 +4162,9 @@ bool os::can_execute_large_page_memory() { return UseTransparentHugePages || UseHugeTLBFS; } -char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr, int file_desc) { +char* os::pd_attempt_reserve_memory_at(char* requested_addr, size_t bytes, int file_desc) { assert(file_desc >= 0, "file_desc is not valid"); - char* result = pd_attempt_reserve_memory_at(bytes, requested_addr); + char* result = pd_attempt_reserve_memory_at(requested_addr, bytes); if (result != NULL) { if (replace_existing_mapping_with_file_mapping(result, bytes, file_desc) == NULL) { vm_exit_during_initialization(err_msg("Error in mapping Java heap at the given filesystem directory")); @@ -4411,7 +4176,7 @@ char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr, int f // Reserve memory at an arbitrary address, only if that area is // available (and not reserved for something else). -char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr) { +char* os::pd_attempt_reserve_memory_at(char* requested_addr, size_t bytes) { // Assert only that the size is a multiple of the page size, since // that's all that mmap requires, and since that's all we really know // about at this low abstraction level. If we need higher alignment, @@ -4424,7 +4189,7 @@ char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr) { // Linux mmap allows caller to pass an address as hint; give it a try first, // if kernel honors the hint then we can return immediately. - char * addr = anon_mmap(requested_addr, bytes, false); + char * addr = anon_mmap(requested_addr, bytes); if (addr == requested_addr) { return requested_addr; } @@ -4536,487 +4301,6 @@ OSReturn os::get_native_priority(const Thread* const thread, return (*priority_ptr != -1 || errno == 0 ? OS_OK : OS_ERR); } -//////////////////////////////////////////////////////////////////////////////// -// suspend/resume support - -// The low-level signal-based suspend/resume support is a remnant from the -// old VM-suspension that used to be for java-suspension, safepoints etc, -// within hotspot. Currently used by JFR's OSThreadSampler -// -// The remaining code is greatly simplified from the more general suspension -// code that used to be used. -// -// The protocol is quite simple: -// - suspend: -// - sends a signal to the target thread -// - polls the suspend state of the osthread using a yield loop -// - target thread signal handler (SR_handler) sets suspend state -// and blocks in sigsuspend until continued -// - resume: -// - sets target osthread state to continue -// - sends signal to end the sigsuspend loop in the SR_handler -// -// Note that the SR_lock plays no role in this suspend/resume protocol, -// but is checked for NULL in SR_handler as a thread termination indicator. -// The SR_lock is, however, used by JavaThread::java_suspend()/java_resume() APIs. -// -// Note that resume_clear_context() and suspend_save_context() are needed -// by SR_handler(), so that fetch_frame_from_context() works, -// which in part is used by: -// - Forte Analyzer: AsyncGetCallTrace() -// - StackBanging: get_frame_at_stack_banging_point() - -static void resume_clear_context(OSThread *osthread) { - osthread->set_ucontext(NULL); - osthread->set_siginfo(NULL); -} - -static void suspend_save_context(OSThread *osthread, siginfo_t* siginfo, - ucontext_t* context) { - osthread->set_ucontext(context); - osthread->set_siginfo(siginfo); -} - -// Handler function invoked when a thread's execution is suspended or -// resumed. We have to be careful that only async-safe functions are -// called here (Note: most pthread functions are not async safe and -// should be avoided.) -// -// Note: sigwait() is a more natural fit than sigsuspend() from an -// interface point of view, but sigwait() prevents the signal hander -// from being run. libpthread would get very confused by not having -// its signal handlers run and prevents sigwait()'s use with the -// mutex granting granting signal. -// -// Currently only ever called on the VMThread and JavaThreads (PC sampling) -// -static void SR_handler(int sig, siginfo_t* siginfo, ucontext_t* context) { - // Save and restore errno to avoid confusing native code with EINTR - // after sigsuspend. - int old_errno = errno; - - Thread* thread = Thread::current_or_null_safe(); - assert(thread != NULL, "Missing current thread in SR_handler"); - - // On some systems we have seen signal delivery get "stuck" until the signal - // mask is changed as part of thread termination. Check that the current thread - // has not already terminated (via SR_lock()) - else the following assertion - // will fail because the thread is no longer a JavaThread as the ~JavaThread - // destructor has completed. - - if (thread->SR_lock() == NULL) { - return; - } - - assert(thread->is_VM_thread() || thread->is_Java_thread(), "Must be VMThread or JavaThread"); - - OSThread* osthread = thread->osthread(); - - os::SuspendResume::State current = osthread->sr.state(); - if (current == os::SuspendResume::SR_SUSPEND_REQUEST) { - suspend_save_context(osthread, siginfo, context); - - // attempt to switch the state, we assume we had a SUSPEND_REQUEST - os::SuspendResume::State state = osthread->sr.suspended(); - if (state == os::SuspendResume::SR_SUSPENDED) { - sigset_t suspend_set; // signals for sigsuspend() - sigemptyset(&suspend_set); - // get current set of blocked signals and unblock resume signal - pthread_sigmask(SIG_BLOCK, NULL, &suspend_set); - sigdelset(&suspend_set, SR_signum); - - sr_semaphore.signal(); - // wait here until we are resumed - while (1) { - sigsuspend(&suspend_set); - - os::SuspendResume::State result = osthread->sr.running(); - if (result == os::SuspendResume::SR_RUNNING) { - sr_semaphore.signal(); - break; - } - } - - } else if (state == os::SuspendResume::SR_RUNNING) { - // request was cancelled, continue - } else { - ShouldNotReachHere(); - } - - resume_clear_context(osthread); - } else if (current == os::SuspendResume::SR_RUNNING) { - // request was cancelled, continue - } else if (current == os::SuspendResume::SR_WAKEUP_REQUEST) { - // ignore - } else { - // ignore - } - - errno = old_errno; -} - -static int SR_initialize() { - struct sigaction act; - char *s; - - // Get signal number to use for suspend/resume - if ((s = ::getenv("_JAVA_SR_SIGNUM")) != 0) { - int sig = ::strtol(s, 0, 10); - if (sig > MAX2(SIGSEGV, SIGBUS) && // See 4355769. - sig < NSIG) { // Must be legal signal and fit into sigflags[]. - SR_signum = sig; - } else { - warning("You set _JAVA_SR_SIGNUM=%d. It must be in range [%d, %d]. Using %d instead.", - sig, MAX2(SIGSEGV, SIGBUS)+1, NSIG-1, SR_signum); - } - } - - assert(SR_signum > SIGSEGV && SR_signum > SIGBUS, - "SR_signum must be greater than max(SIGSEGV, SIGBUS), see 4355769"); - - sigemptyset(&SR_sigset); - sigaddset(&SR_sigset, SR_signum); - - // Set up signal handler for suspend/resume - act.sa_flags = SA_RESTART|SA_SIGINFO; - act.sa_handler = (void (*)(int)) SR_handler; - - // SR_signum is blocked by default. - // 4528190 - We also need to block pthread restart signal (32 on all - // supported Linux platforms). Note that LinuxThreads need to block - // this signal for all threads to work properly. So we don't have - // to use hard-coded signal number when setting up the mask. - pthread_sigmask(SIG_BLOCK, NULL, &act.sa_mask); - - if (sigaction(SR_signum, &act, 0) == -1) { - return -1; - } - - // Save signal flag - os::Linux::set_our_sigflags(SR_signum, act.sa_flags); - return 0; -} - -static int sr_notify(OSThread* osthread) { - int status = pthread_kill(osthread->pthread_id(), SR_signum); - assert_status(status == 0, status, "pthread_kill"); - return status; -} - -// "Randomly" selected value for how long we want to spin -// before bailing out on suspending a thread, also how often -// we send a signal to a thread we want to resume -static const int RANDOMLY_LARGE_INTEGER = 1000000; -static const int RANDOMLY_LARGE_INTEGER2 = 100; - -// returns true on success and false on error - really an error is fatal -// but this seems the normal response to library errors -static bool do_suspend(OSThread* osthread) { - assert(osthread->sr.is_running(), "thread should be running"); - assert(!sr_semaphore.trywait(), "semaphore has invalid state"); - - // mark as suspended and send signal - if (osthread->sr.request_suspend() != os::SuspendResume::SR_SUSPEND_REQUEST) { - // failed to switch, state wasn't running? - ShouldNotReachHere(); - return false; - } - - if (sr_notify(osthread) != 0) { - ShouldNotReachHere(); - } - - // managed to send the signal and switch to SUSPEND_REQUEST, now wait for SUSPENDED - while (true) { - if (sr_semaphore.timedwait(2)) { - break; - } else { - // timeout - os::SuspendResume::State cancelled = osthread->sr.cancel_suspend(); - if (cancelled == os::SuspendResume::SR_RUNNING) { - return false; - } else if (cancelled == os::SuspendResume::SR_SUSPENDED) { - // make sure that we consume the signal on the semaphore as well - sr_semaphore.wait(); - break; - } else { - ShouldNotReachHere(); - return false; - } - } - } - - guarantee(osthread->sr.is_suspended(), "Must be suspended"); - return true; -} - -static void do_resume(OSThread* osthread) { - assert(osthread->sr.is_suspended(), "thread should be suspended"); - assert(!sr_semaphore.trywait(), "invalid semaphore state"); - - if (osthread->sr.request_wakeup() != os::SuspendResume::SR_WAKEUP_REQUEST) { - // failed to switch to WAKEUP_REQUEST - ShouldNotReachHere(); - return; - } - - while (true) { - if (sr_notify(osthread) == 0) { - if (sr_semaphore.timedwait(2)) { - if (osthread->sr.is_running()) { - return; - } - } - } else { - ShouldNotReachHere(); - } - } - - guarantee(osthread->sr.is_running(), "Must be running!"); -} - -/////////////////////////////////////////////////////////////////////////////////// -// signal handling (except suspend/resume) - -// This routine may be used by user applications as a "hook" to catch signals. -// The user-defined signal handler must pass unrecognized signals to this -// routine, and if it returns true (non-zero), then the signal handler must -// return immediately. If the flag "abort_if_unrecognized" is true, then this -// routine will never retun false (zero), but instead will execute a VM panic -// routine kill the process. -// -// If this routine returns false, it is OK to call it again. This allows -// the user-defined signal handler to perform checks either before or after -// the VM performs its own checks. Naturally, the user code would be making -// a serious error if it tried to handle an exception (such as a null check -// or breakpoint) that the VM was generating for its own correct operation. -// -// This routine may recognize any of the following kinds of signals: -// SIGBUS, SIGSEGV, SIGILL, SIGFPE, SIGQUIT, SIGPIPE, SIGXFSZ, SIGUSR1. -// It should be consulted by handlers for any of those signals. -// -// The caller of this routine must pass in the three arguments supplied -// to the function referred to in the "sa_sigaction" (not the "sa_handler") -// field of the structure passed to sigaction(). This routine assumes that -// the sa_flags field passed to sigaction() includes SA_SIGINFO and SA_RESTART. -// -// Note that the VM will print warnings if it detects conflicting signal -// handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers". -// -extern "C" JNIEXPORT int JVM_handle_linux_signal(int signo, - siginfo_t* siginfo, - void* ucontext, - int abort_if_unrecognized); - -static void signalHandler(int sig, siginfo_t* info, void* uc) { - assert(info != NULL && uc != NULL, "it must be old kernel"); - int orig_errno = errno; // Preserve errno value over signal handler. - JVM_handle_linux_signal(sig, info, uc, true); - errno = orig_errno; -} - - -// This boolean allows users to forward their own non-matching signals -// to JVM_handle_linux_signal, harmlessly. -bool os::Linux::signal_handlers_are_installed = false; - -// For signal-chaining -bool os::Linux::libjsig_is_loaded = false; -typedef struct sigaction *(*get_signal_t)(int); -get_signal_t os::Linux::get_signal_action = NULL; - -struct sigaction* os::Linux::get_chained_signal_action(int sig) { - struct sigaction *actp = NULL; - - if (libjsig_is_loaded) { - // Retrieve the old signal handler from libjsig - actp = (*get_signal_action)(sig); - } - if (actp == NULL) { - // Retrieve the preinstalled signal handler from jvm - actp = os::Posix::get_preinstalled_handler(sig); - } - - return actp; -} - -static bool call_chained_handler(struct sigaction *actp, int sig, - siginfo_t *siginfo, void *context) { - // Call the old signal handler - if (actp->sa_handler == SIG_DFL) { - // It's more reasonable to let jvm treat it as an unexpected exception - // instead of taking the default action. - return false; - } else if (actp->sa_handler != SIG_IGN) { - if ((actp->sa_flags & SA_NODEFER) == 0) { - // automaticlly block the signal - sigaddset(&(actp->sa_mask), sig); - } - - sa_handler_t hand = NULL; - sa_sigaction_t sa = NULL; - bool siginfo_flag_set = (actp->sa_flags & SA_SIGINFO) != 0; - // retrieve the chained handler - if (siginfo_flag_set) { - sa = actp->sa_sigaction; - } else { - hand = actp->sa_handler; - } - - if ((actp->sa_flags & SA_RESETHAND) != 0) { - actp->sa_handler = SIG_DFL; - } - - // try to honor the signal mask - sigset_t oset; - sigemptyset(&oset); - pthread_sigmask(SIG_SETMASK, &(actp->sa_mask), &oset); - - // call into the chained handler - if (siginfo_flag_set) { - (*sa)(sig, siginfo, context); - } else { - (*hand)(sig); - } - - // restore the signal mask - pthread_sigmask(SIG_SETMASK, &oset, NULL); - } - // Tell jvm's signal handler the signal is taken care of. - return true; -} - -bool os::Linux::chained_handler(int sig, siginfo_t* siginfo, void* context) { - bool chained = false; - // signal-chaining - if (UseSignalChaining) { - struct sigaction *actp = get_chained_signal_action(sig); - if (actp != NULL) { - chained = call_chained_handler(actp, sig, siginfo, context); - } - } - return chained; -} - -// for diagnostic -int sigflags[NSIG]; - -int os::Linux::get_our_sigflags(int sig) { - assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); - return sigflags[sig]; -} - -void os::Linux::set_our_sigflags(int sig, int flags) { - assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); - if (sig > 0 && sig < NSIG) { - sigflags[sig] = flags; - } -} - -void os::Linux::set_signal_handler(int sig, bool set_installed) { - // Check for overwrite. - struct sigaction oldAct; - sigaction(sig, (struct sigaction*)NULL, &oldAct); - - void* oldhand = oldAct.sa_sigaction - ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction) - : CAST_FROM_FN_PTR(void*, oldAct.sa_handler); - if (oldhand != CAST_FROM_FN_PTR(void*, SIG_DFL) && - oldhand != CAST_FROM_FN_PTR(void*, SIG_IGN) && - oldhand != CAST_FROM_FN_PTR(void*, (sa_sigaction_t)signalHandler)) { - if (AllowUserSignalHandlers || !set_installed) { - // Do not overwrite; user takes responsibility to forward to us. - return; - } else if (UseSignalChaining) { - // save the old handler in jvm - os::Posix::save_preinstalled_handler(sig, oldAct); - // libjsig also interposes the sigaction() call below and saves the - // old sigaction on it own. - } else { - fatal("Encountered unexpected pre-existing sigaction handler " - "%#lx for signal %d.", (long)oldhand, sig); - } - } - - struct sigaction sigAct; - sigfillset(&(sigAct.sa_mask)); - sigAct.sa_handler = SIG_DFL; - if (!set_installed) { - sigAct.sa_flags = SA_SIGINFO|SA_RESTART; - } else { - sigAct.sa_sigaction = signalHandler; - sigAct.sa_flags = SA_SIGINFO|SA_RESTART; - } - // Save flags, which are set by ours - assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); - sigflags[sig] = sigAct.sa_flags; - - int ret = sigaction(sig, &sigAct, &oldAct); - assert(ret == 0, "check"); - - void* oldhand2 = oldAct.sa_sigaction - ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction) - : CAST_FROM_FN_PTR(void*, oldAct.sa_handler); - assert(oldhand2 == oldhand, "no concurrent signal handler installation"); -} - -// install signal handlers for signals that HotSpot needs to -// handle in order to support Java-level exception handling. - -void os::Linux::install_signal_handlers() { - if (!signal_handlers_are_installed) { - signal_handlers_are_installed = true; - - // signal-chaining - typedef void (*signal_setting_t)(); - signal_setting_t begin_signal_setting = NULL; - signal_setting_t end_signal_setting = NULL; - begin_signal_setting = CAST_TO_FN_PTR(signal_setting_t, - dlsym(RTLD_DEFAULT, "JVM_begin_signal_setting")); - if (begin_signal_setting != NULL) { - end_signal_setting = CAST_TO_FN_PTR(signal_setting_t, - dlsym(RTLD_DEFAULT, "JVM_end_signal_setting")); - get_signal_action = CAST_TO_FN_PTR(get_signal_t, - dlsym(RTLD_DEFAULT, "JVM_get_signal_action")); - libjsig_is_loaded = true; - assert(UseSignalChaining, "should enable signal-chaining"); - } - if (libjsig_is_loaded) { - // Tell libjsig jvm is setting signal handlers - (*begin_signal_setting)(); - } - - set_signal_handler(SIGSEGV, true); - set_signal_handler(SIGPIPE, true); - set_signal_handler(SIGBUS, true); - set_signal_handler(SIGILL, true); - set_signal_handler(SIGFPE, true); -#if defined(PPC64) - set_signal_handler(SIGTRAP, true); -#endif - set_signal_handler(SIGXFSZ, true); - - if (libjsig_is_loaded) { - // Tell libjsig jvm finishes setting signal handlers - (*end_signal_setting)(); - } - - // We don't activate signal checker if libjsig is in place, we trust ourselves - // and if UserSignalHandler is installed all bets are off. - // Log that signal checking is off only if -verbose:jni is specified. - if (CheckJNICalls) { - if (libjsig_is_loaded) { - log_debug(jni, resolve)("Info: libjsig is activated, all active signal checking is disabled"); - check_signals = false; - } - if (AllowUserSignalHandlers) { - log_debug(jni, resolve)("Info: AllowUserSignalHandlers is activated, all active signal checking is disabled"); - check_signals = false; - } - } - } -} - // This is the fastest way to get thread cpu time on Linux. // Returns cpu time (user+sys) for any thread, not only for current. // POSIX compliant clocks are implemented in the kernels 2.6.16+. @@ -5032,205 +4316,6 @@ jlong os::Linux::fast_thread_cpu_time(clockid_t clockid) { return (tp.tv_sec * NANOSECS_PER_SEC) + tp.tv_nsec; } -///// -// glibc on Linux platform uses non-documented flag -// to indicate, that some special sort of signal -// trampoline is used. -// We will never set this flag, and we should -// ignore this flag in our diagnostic -#ifdef SIGNIFICANT_SIGNAL_MASK - #undef SIGNIFICANT_SIGNAL_MASK -#endif -#define SIGNIFICANT_SIGNAL_MASK (~0x04000000) - -static const char* get_signal_handler_name(address handler, - char* buf, int buflen) { - int offset = 0; - bool found = os::dll_address_to_library_name(handler, buf, buflen, &offset); - if (found) { - // skip directory names - const char *p1, *p2; - p1 = buf; - size_t len = strlen(os::file_separator()); - while ((p2 = strstr(p1, os::file_separator())) != NULL) p1 = p2 + len; - jio_snprintf(buf, buflen, "%s+0x%x", p1, offset); - } else { - jio_snprintf(buf, buflen, PTR_FORMAT, handler); - } - return buf; -} - -static void print_signal_handler(outputStream* st, int sig, - char* buf, size_t buflen) { - struct sigaction sa; - - sigaction(sig, NULL, &sa); - - // See comment for SIGNIFICANT_SIGNAL_MASK define - sa.sa_flags &= SIGNIFICANT_SIGNAL_MASK; - - st->print("%s: ", os::exception_name(sig, buf, buflen)); - - address handler = (sa.sa_flags & SA_SIGINFO) - ? CAST_FROM_FN_PTR(address, sa.sa_sigaction) - : CAST_FROM_FN_PTR(address, sa.sa_handler); - - if (handler == CAST_FROM_FN_PTR(address, SIG_DFL)) { - st->print("SIG_DFL"); - } else if (handler == CAST_FROM_FN_PTR(address, SIG_IGN)) { - st->print("SIG_IGN"); - } else { - st->print("[%s]", get_signal_handler_name(handler, buf, buflen)); - } - - st->print(", sa_mask[0]="); - os::Posix::print_signal_set_short(st, &sa.sa_mask); - - address rh = VMError::get_resetted_sighandler(sig); - // May be, handler was resetted by VMError? - if (rh != NULL) { - handler = rh; - sa.sa_flags = VMError::get_resetted_sigflags(sig) & SIGNIFICANT_SIGNAL_MASK; - } - - st->print(", sa_flags="); - os::Posix::print_sa_flags(st, sa.sa_flags); - - // Check: is it our handler? - if (handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)signalHandler) || - handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)SR_handler)) { - // It is our signal handler - // check for flags, reset system-used one! - if ((int)sa.sa_flags != os::Linux::get_our_sigflags(sig)) { - st->print( - ", flags was changed from " PTR32_FORMAT ", consider using jsig library", - os::Linux::get_our_sigflags(sig)); - } - } - st->cr(); -} - - -#define DO_SIGNAL_CHECK(sig) \ - do { \ - if (!sigismember(&check_signal_done, sig)) { \ - os::Linux::check_signal_handler(sig); \ - } \ - } while (0) - -// This method is a periodic task to check for misbehaving JNI applications -// under CheckJNI, we can add any periodic checks here - -void os::run_periodic_checks() { - if (check_signals == false) return; - - // SEGV and BUS if overridden could potentially prevent - // generation of hs*.log in the event of a crash, debugging - // such a case can be very challenging, so we absolutely - // check the following for a good measure: - DO_SIGNAL_CHECK(SIGSEGV); - DO_SIGNAL_CHECK(SIGILL); - DO_SIGNAL_CHECK(SIGFPE); - DO_SIGNAL_CHECK(SIGBUS); - DO_SIGNAL_CHECK(SIGPIPE); - DO_SIGNAL_CHECK(SIGXFSZ); -#if defined(PPC64) - DO_SIGNAL_CHECK(SIGTRAP); -#endif - - // ReduceSignalUsage allows the user to override these handlers - // see comments at the very top and jvm_md.h - if (!ReduceSignalUsage) { - DO_SIGNAL_CHECK(SHUTDOWN1_SIGNAL); - DO_SIGNAL_CHECK(SHUTDOWN2_SIGNAL); - DO_SIGNAL_CHECK(SHUTDOWN3_SIGNAL); - DO_SIGNAL_CHECK(BREAK_SIGNAL); - } - - DO_SIGNAL_CHECK(SR_signum); -} - -typedef int (*os_sigaction_t)(int, const struct sigaction *, struct sigaction *); - -static os_sigaction_t os_sigaction = NULL; - -void os::Linux::check_signal_handler(int sig) { - char buf[O_BUFLEN]; - address jvmHandler = NULL; - - - struct sigaction act; - if (os_sigaction == NULL) { - // only trust the default sigaction, in case it has been interposed - os_sigaction = (os_sigaction_t)dlsym(RTLD_DEFAULT, "sigaction"); - if (os_sigaction == NULL) return; - } - - os_sigaction(sig, (struct sigaction*)NULL, &act); - - - act.sa_flags &= SIGNIFICANT_SIGNAL_MASK; - - address thisHandler = (act.sa_flags & SA_SIGINFO) - ? CAST_FROM_FN_PTR(address, act.sa_sigaction) - : CAST_FROM_FN_PTR(address, act.sa_handler); - - - switch (sig) { - case SIGSEGV: - case SIGBUS: - case SIGFPE: - case SIGPIPE: - case SIGILL: - case SIGXFSZ: - jvmHandler = CAST_FROM_FN_PTR(address, (sa_sigaction_t)signalHandler); - break; - - case SHUTDOWN1_SIGNAL: - case SHUTDOWN2_SIGNAL: - case SHUTDOWN3_SIGNAL: - case BREAK_SIGNAL: - jvmHandler = (address)user_handler(); - break; - - default: - if (sig == SR_signum) { - jvmHandler = CAST_FROM_FN_PTR(address, (sa_sigaction_t)SR_handler); - } else { - return; - } - break; - } - - if (thisHandler != jvmHandler) { - tty->print("Warning: %s handler ", exception_name(sig, buf, O_BUFLEN)); - tty->print("expected:%s", get_signal_handler_name(jvmHandler, buf, O_BUFLEN)); - tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN)); - // No need to check this sig any longer - sigaddset(&check_signal_done, sig); - // Running under non-interactive shell, SHUTDOWN2_SIGNAL will be reassigned SIG_IGN - if (sig == SHUTDOWN2_SIGNAL && !isatty(fileno(stdin))) { - tty->print_cr("Running in non-interactive shell, %s handler is replaced by shell", - exception_name(sig, buf, O_BUFLEN)); - } - } else if(os::Linux::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Linux::get_our_sigflags(sig)) { - tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN)); - tty->print("expected:"); - os::Posix::print_sa_flags(tty, os::Linux::get_our_sigflags(sig)); - tty->cr(); - tty->print(" found:"); - os::Posix::print_sa_flags(tty, act.sa_flags); - tty->cr(); - // No need to check this sig any longer - sigaddset(&check_signal_done, sig); - } - - // Dump all the signal - if (sigismember(&check_signal_done, sig)) { - print_signal_handlers(tty, buf, O_BUFLEN); - } -} - extern void report_error(char* file_name, int line_no, char* title, char* format, ...); @@ -5370,16 +4455,16 @@ jint os::init_2(void) { Linux::fast_thread_clock_init(); // initialize suspend/resume support - must do this before signal_sets_init() - if (SR_initialize() != 0) { + if (PosixSignals::SR_initialize() != 0) { perror("SR_initialize failed"); return JNI_ERR; } - Linux::signal_sets_init(); - Linux::install_signal_handlers(); + PosixSignals::signal_sets_init(); + PosixSignals::install_signal_handlers(); // Initialize data for jdk.internal.misc.Signal if (!ReduceSignalUsage) { - jdk_misc_signal_init(); + PosixSignals::jdk_misc_signal_init(); } if (AdjustStackSizeForTLS) { @@ -5622,10 +4707,10 @@ bool os::bind_to_processor(uint processor_id) { /// void os::SuspendedThreadTask::internal_do_task() { - if (do_suspend(_thread->osthread())) { + if (PosixSignals::do_suspend(_thread->osthread())) { SuspendedThreadTaskContext context(_thread, _thread->osthread()->ucontext()); do_task(context); - do_resume(_thread->osthread()); + PosixSignals::do_resume(_thread->osthread()); } } diff --git a/src/hotspot/os/linux/os_linux.hpp b/src/hotspot/os/linux/os_linux.hpp index c242872945c..45d3bbc9d74 100644 --- a/src/hotspot/os/linux/os_linux.hpp +++ b/src/hotspot/os/linux/os_linux.hpp @@ -36,12 +36,6 @@ class Linux { friend class OSContainer; friend class TestReserveMemorySpecial; - static bool libjsig_is_loaded; // libjsig that interposes sigaction(), - // __sigaction(), signal() is loaded - static struct sigaction *(*get_signal_action)(int); - - static void check_signal_handler(int sig); - static int (*_pthread_getcpuclockid)(pthread_t, clockid_t *); static int (*_pthread_setname_np)(pthread_t, const char*); @@ -133,7 +127,6 @@ class Linux { // returns kernel thread id (similar to LWP id on Solaris), which can be // used to access /proc static pid_t gettid(); - static void hotspot_sigmask(Thread* thread); static address initial_thread_stack_bottom(void) { return _initial_thread_stack_bottom; } static uintptr_t initial_thread_stack_size(void) { return _initial_thread_stack_size; } @@ -148,23 +141,6 @@ class Linux { static bool get_frame_at_stack_banging_point(JavaThread* thread, ucontext_t* uc, frame* fr); - // This boolean allows users to forward their own non-matching signals - // to JVM_handle_linux_signal, harmlessly. - static bool signal_handlers_are_installed; - - static int get_our_sigflags(int); - static void set_our_sigflags(int, int); - static void signal_sets_init(); - static void install_signal_handlers(); - static void set_signal_handler(int, bool); - - static sigset_t* unblocked_signals(); - static sigset_t* vm_signals(); - - // For signal-chaining - static struct sigaction *get_chained_signal_action(int sig); - static bool chained_handler(int sig, siginfo_t* siginfo, void* context); - // GNU libc and libpthread version strings static const char *glibc_version() { return _glibc_version; } static const char *libpthread_version() { return _libpthread_version; } diff --git a/src/hotspot/os/posix/gc/z/zInitialize_posix.cpp b/src/hotspot/os/posix/gc/z/zInitialize_posix.cpp index 6b47b1e4c6c..ad4af504d8d 100644 --- a/src/hotspot/os/posix/gc/z/zInitialize_posix.cpp +++ b/src/hotspot/os/posix/gc/z/zInitialize_posix.cpp @@ -24,6 +24,6 @@ #include "precompiled.hpp" #include "gc/z/zInitialize.hpp" -void ZInitialize::initialize_os() { +void ZInitialize::pd_initialize() { // Does nothing } diff --git a/src/hotspot/os/posix/gc/z/zVirtualMemory_posix.cpp b/src/hotspot/os/posix/gc/z/zVirtualMemory_posix.cpp index 29609524ed7..2c42af68dc1 100644 --- a/src/hotspot/os/posix/gc/z/zVirtualMemory_posix.cpp +++ b/src/hotspot/os/posix/gc/z/zVirtualMemory_posix.cpp @@ -29,25 +29,20 @@ #include <sys/mman.h> #include <sys/types.h> -void ZVirtualMemoryManager::initialize_os() { +void ZVirtualMemoryManager::pd_initialize() { // Does nothing } -static void unmap(uintptr_t start, size_t size) { - const int res = munmap((void*)start, size); - assert(res == 0, "Failed to unmap memory"); -} - -static bool map(uintptr_t start, size_t size) { - const void* const res = mmap((void*)start, size, PROT_NONE, MAP_ANONYMOUS|MAP_PRIVATE|MAP_NORESERVE, -1, 0); - if (res == MAP_FAILED) { +bool ZVirtualMemoryManager::pd_reserve(uintptr_t addr, size_t size) { + const uintptr_t res = (uintptr_t)mmap((void*)addr, size, PROT_NONE, MAP_ANONYMOUS|MAP_PRIVATE|MAP_NORESERVE, -1, 0); + if (res == (uintptr_t)MAP_FAILED) { // Failed to reserve memory return false; } - if ((uintptr_t)res != start) { + if (res != addr) { // Failed to reserve memory at the requested address - unmap((uintptr_t)res, size); + munmap((void*)res, size); return false; } @@ -55,31 +50,7 @@ static bool map(uintptr_t start, size_t size) { return true; } -bool ZVirtualMemoryManager::reserve_contiguous_platform(uintptr_t start, size_t size) { - // Reserve address views - const uintptr_t marked0 = ZAddress::marked0(start); - const uintptr_t marked1 = ZAddress::marked1(start); - const uintptr_t remapped = ZAddress::remapped(start); - - if (!map(marked0, size)) { - return false; - } - - if (!map(marked1, size)) { - unmap(marked0, size); - return false; - } - - if (!map(remapped, size)) { - unmap(marked0, size); - unmap(marked1, size); - return false; - } - - // Register address views with native memory tracker - nmt_reserve(marked0, size); - nmt_reserve(marked1, size); - nmt_reserve(remapped, size); - - return true; +void ZVirtualMemoryManager::pd_unreserve(uintptr_t addr, size_t size) { + const int res = munmap((void*)addr, size); + assert(res == 0, "Failed to unmap memory"); } diff --git a/src/hotspot/os/posix/jvm_posix.cpp b/src/hotspot/os/posix/jvm_posix.cpp index bf3e697635d..8c35376028b 100644 --- a/src/hotspot/os/posix/jvm_posix.cpp +++ b/src/hotspot/os/posix/jvm_posix.cpp @@ -26,6 +26,7 @@ #include "jvm.h" #include "runtime/interfaceSupport.inline.hpp" #include "runtime/osThread.hpp" +#include "signals_posix.hpp" #include <signal.h> @@ -78,7 +79,7 @@ JVM_ENTRY_NO_ENV(void*, JVM_RegisterSignal(jint sig, void* handler)) case SHUTDOWN2_SIGNAL: case SHUTDOWN3_SIGNAL: if (ReduceSignalUsage) return (void*)-1; - if (os::Posix::is_sig_ignored(sig)) return (void*)1; + if (PosixSignals::is_sig_ignored(sig)) return (void*)1; } void* oldHandler = os::signal(sig, newHandler); @@ -102,7 +103,7 @@ JVM_ENTRY_NO_ENV(jboolean, JVM_RaiseSignal(jint sig)) } } else if ((sig == SHUTDOWN1_SIGNAL || sig == SHUTDOWN2_SIGNAL || - sig == SHUTDOWN3_SIGNAL) && os::Posix::is_sig_ignored(sig)) { + sig == SHUTDOWN3_SIGNAL) && PosixSignals::is_sig_ignored(sig)) { // do not allow SHUTDOWN1_SIGNAL to be raised when SHUTDOWN1_SIGNAL // is ignored, since no handler for them is actually registered in JVM // or via JVM_RegisterSignal. diff --git a/src/hotspot/os/posix/os_posix.cpp b/src/hotspot/os/posix/os_posix.cpp index 55ebe8fe929..ebe85d3d705 100644 --- a/src/hotspot/os/posix/os_posix.cpp +++ b/src/hotspot/os/posix/os_posix.cpp @@ -26,6 +26,7 @@ #include "logging/log.hpp" #include "memory/allocation.inline.hpp" #include "os_posix.inline.hpp" +#include "runtime/globals_extension.hpp" #include "utilities/globalDefinitions.hpp" #include "runtime/frame.inline.hpp" #include "runtime/interfaceSupport.inline.hpp" @@ -52,13 +53,6 @@ #include <unistd.h> #include <utmpx.h> -// Todo: provide a os::get_max_process_id() or similar. Number of processes -// may have been configured, can be read more accurately from proc fs etc. -#ifndef MAX_PID -#define MAX_PID INT_MAX -#endif -#define IS_VALID_PID(p) (p > 0 && p < MAX_PID) - #define ROOT_UID 0 #ifndef MAP_ANONYMOUS @@ -315,17 +309,18 @@ char* os::reserve_memory_aligned(size_t size, size_t alignment, int file_desc) { char* extra_base; if (file_desc != -1) { - // For file mapping, we do not call os:reserve_memory(extra_size, NULL, alignment, file_desc) because - // we need to deal with shrinking of the file space later when we release extra memory after alignment. - // We also cannot called os:reserve_memory() with file_desc set to -1 because on aix we might get SHM memory. - // So here to call a helper function while reserve memory for us. After we have a aligned base, - // we will replace anonymous mapping with file mapping. + // For file mapping, we do not call os:reserve_memory_with_fd since: + // - we later chop away parts of the mapping using os::release_memory and that could fail if the + // original mmap call had been tied to an fd. + // - The memory API os::reserve_memory uses is an implementation detail. It may (and usually is) + // mmap but it also may System V shared memory which cannot be uncommitted as a whole, so + // chopping off and unmapping excess bits back and front (see below) would not work. extra_base = reserve_mmapped_memory(extra_size, NULL); if (extra_base != NULL) { MemTracker::record_virtual_memory_reserve((address)extra_base, extra_size, CALLER_PC); } } else { - extra_base = os::reserve_memory(extra_size, NULL, alignment); + extra_base = os::reserve_memory(extra_size); } if (extra_base == NULL) { @@ -703,603 +698,6 @@ void os::naked_short_sleep(jlong ms) { return; } -static const struct { - int sig; const char* name; -} - g_signal_info[] = - { - { SIGABRT, "SIGABRT" }, -#ifdef SIGAIO - { SIGAIO, "SIGAIO" }, -#endif - { SIGALRM, "SIGALRM" }, -#ifdef SIGALRM1 - { SIGALRM1, "SIGALRM1" }, -#endif - { SIGBUS, "SIGBUS" }, -#ifdef SIGCANCEL - { SIGCANCEL, "SIGCANCEL" }, -#endif - { SIGCHLD, "SIGCHLD" }, -#ifdef SIGCLD - { SIGCLD, "SIGCLD" }, -#endif - { SIGCONT, "SIGCONT" }, -#ifdef SIGCPUFAIL - { SIGCPUFAIL, "SIGCPUFAIL" }, -#endif -#ifdef SIGDANGER - { SIGDANGER, "SIGDANGER" }, -#endif -#ifdef SIGDIL - { SIGDIL, "SIGDIL" }, -#endif -#ifdef SIGEMT - { SIGEMT, "SIGEMT" }, -#endif - { SIGFPE, "SIGFPE" }, -#ifdef SIGFREEZE - { SIGFREEZE, "SIGFREEZE" }, -#endif -#ifdef SIGGFAULT - { SIGGFAULT, "SIGGFAULT" }, -#endif -#ifdef SIGGRANT - { SIGGRANT, "SIGGRANT" }, -#endif - { SIGHUP, "SIGHUP" }, - { SIGILL, "SIGILL" }, -#ifdef SIGINFO - { SIGINFO, "SIGINFO" }, -#endif - { SIGINT, "SIGINT" }, -#ifdef SIGIO - { SIGIO, "SIGIO" }, -#endif -#ifdef SIGIOINT - { SIGIOINT, "SIGIOINT" }, -#endif -#ifdef SIGIOT -// SIGIOT is there for BSD compatibility, but on most Unices just a -// synonym for SIGABRT. The result should be "SIGABRT", not -// "SIGIOT". -#if (SIGIOT != SIGABRT ) - { SIGIOT, "SIGIOT" }, -#endif -#endif -#ifdef SIGKAP - { SIGKAP, "SIGKAP" }, -#endif - { SIGKILL, "SIGKILL" }, -#ifdef SIGLOST - { SIGLOST, "SIGLOST" }, -#endif -#ifdef SIGLWP - { SIGLWP, "SIGLWP" }, -#endif -#ifdef SIGLWPTIMER - { SIGLWPTIMER, "SIGLWPTIMER" }, -#endif -#ifdef SIGMIGRATE - { SIGMIGRATE, "SIGMIGRATE" }, -#endif -#ifdef SIGMSG - { SIGMSG, "SIGMSG" }, -#endif - { SIGPIPE, "SIGPIPE" }, -#ifdef SIGPOLL - { SIGPOLL, "SIGPOLL" }, -#endif -#ifdef SIGPRE - { SIGPRE, "SIGPRE" }, -#endif - { SIGPROF, "SIGPROF" }, -#ifdef SIGPTY - { SIGPTY, "SIGPTY" }, -#endif -#ifdef SIGPWR - { SIGPWR, "SIGPWR" }, -#endif - { SIGQUIT, "SIGQUIT" }, -#ifdef SIGRECONFIG - { SIGRECONFIG, "SIGRECONFIG" }, -#endif -#ifdef SIGRECOVERY - { SIGRECOVERY, "SIGRECOVERY" }, -#endif -#ifdef SIGRESERVE - { SIGRESERVE, "SIGRESERVE" }, -#endif -#ifdef SIGRETRACT - { SIGRETRACT, "SIGRETRACT" }, -#endif -#ifdef SIGSAK - { SIGSAK, "SIGSAK" }, -#endif - { SIGSEGV, "SIGSEGV" }, -#ifdef SIGSOUND - { SIGSOUND, "SIGSOUND" }, -#endif -#ifdef SIGSTKFLT - { SIGSTKFLT, "SIGSTKFLT" }, -#endif - { SIGSTOP, "SIGSTOP" }, - { SIGSYS, "SIGSYS" }, -#ifdef SIGSYSERROR - { SIGSYSERROR, "SIGSYSERROR" }, -#endif -#ifdef SIGTALRM - { SIGTALRM, "SIGTALRM" }, -#endif - { SIGTERM, "SIGTERM" }, -#ifdef SIGTHAW - { SIGTHAW, "SIGTHAW" }, -#endif - { SIGTRAP, "SIGTRAP" }, -#ifdef SIGTSTP - { SIGTSTP, "SIGTSTP" }, -#endif - { SIGTTIN, "SIGTTIN" }, - { SIGTTOU, "SIGTTOU" }, -#ifdef SIGURG - { SIGURG, "SIGURG" }, -#endif - { SIGUSR1, "SIGUSR1" }, - { SIGUSR2, "SIGUSR2" }, -#ifdef SIGVIRT - { SIGVIRT, "SIGVIRT" }, -#endif - { SIGVTALRM, "SIGVTALRM" }, -#ifdef SIGWAITING - { SIGWAITING, "SIGWAITING" }, -#endif -#ifdef SIGWINCH - { SIGWINCH, "SIGWINCH" }, -#endif -#ifdef SIGWINDOW - { SIGWINDOW, "SIGWINDOW" }, -#endif - { SIGXCPU, "SIGXCPU" }, - { SIGXFSZ, "SIGXFSZ" }, -#ifdef SIGXRES - { SIGXRES, "SIGXRES" }, -#endif - { -1, NULL } -}; - -// Returned string is a constant. For unknown signals "UNKNOWN" is returned. -const char* os::Posix::get_signal_name(int sig, char* out, size_t outlen) { - - const char* ret = NULL; - -#ifdef SIGRTMIN - if (sig >= SIGRTMIN && sig <= SIGRTMAX) { - if (sig == SIGRTMIN) { - ret = "SIGRTMIN"; - } else if (sig == SIGRTMAX) { - ret = "SIGRTMAX"; - } else { - jio_snprintf(out, outlen, "SIGRTMIN+%d", sig - SIGRTMIN); - return out; - } - } -#endif - - if (sig > 0) { - for (int idx = 0; g_signal_info[idx].sig != -1; idx ++) { - if (g_signal_info[idx].sig == sig) { - ret = g_signal_info[idx].name; - break; - } - } - } - - if (!ret) { - if (!is_valid_signal(sig)) { - ret = "INVALID"; - } else { - ret = "UNKNOWN"; - } - } - - if (out && outlen > 0) { - strncpy(out, ret, outlen); - out[outlen - 1] = '\0'; - } - return out; -} - -int os::Posix::get_signal_number(const char* signal_name) { - char tmp[30]; - const char* s = signal_name; - if (s[0] != 'S' || s[1] != 'I' || s[2] != 'G') { - jio_snprintf(tmp, sizeof(tmp), "SIG%s", signal_name); - s = tmp; - } - for (int idx = 0; g_signal_info[idx].sig != -1; idx ++) { - if (strcmp(g_signal_info[idx].name, s) == 0) { - return g_signal_info[idx].sig; - } - } - return -1; -} - -int os::get_signal_number(const char* signal_name) { - return os::Posix::get_signal_number(signal_name); -} - -// Returns true if signal number is valid. -bool os::Posix::is_valid_signal(int sig) { - // MacOS not really POSIX compliant: sigaddset does not return - // an error for invalid signal numbers. However, MacOS does not - // support real time signals and simply seems to have just 33 - // signals with no holes in the signal range. -#ifdef __APPLE__ - return sig >= 1 && sig < NSIG; -#else - // Use sigaddset to check for signal validity. - sigset_t set; - sigemptyset(&set); - if (sigaddset(&set, sig) == -1 && errno == EINVAL) { - return false; - } - return true; -#endif -} - -bool os::Posix::is_sig_ignored(int sig) { - struct sigaction oact; - sigaction(sig, (struct sigaction*)NULL, &oact); - void* ohlr = oact.sa_sigaction ? CAST_FROM_FN_PTR(void*, oact.sa_sigaction) - : CAST_FROM_FN_PTR(void*, oact.sa_handler); - if (ohlr == CAST_FROM_FN_PTR(void*, SIG_IGN)) { - return true; - } else { - return false; - } -} - -// Returns: -// NULL for an invalid signal number -// "SIG<num>" for a valid but unknown signal number -// signal name otherwise. -const char* os::exception_name(int sig, char* buf, size_t size) { - if (!os::Posix::is_valid_signal(sig)) { - return NULL; - } - const char* const name = os::Posix::get_signal_name(sig, buf, size); - if (strcmp(name, "UNKNOWN") == 0) { - jio_snprintf(buf, size, "SIG%d", sig); - } - return buf; -} - -#define NUM_IMPORTANT_SIGS 32 -// Returns one-line short description of a signal set in a user provided buffer. -const char* os::Posix::describe_signal_set_short(const sigset_t* set, char* buffer, size_t buf_size) { - assert(buf_size == (NUM_IMPORTANT_SIGS + 1), "wrong buffer size"); - // Note: for shortness, just print out the first 32. That should - // cover most of the useful ones, apart from realtime signals. - for (int sig = 1; sig <= NUM_IMPORTANT_SIGS; sig++) { - const int rc = sigismember(set, sig); - if (rc == -1 && errno == EINVAL) { - buffer[sig-1] = '?'; - } else { - buffer[sig-1] = rc == 0 ? '0' : '1'; - } - } - buffer[NUM_IMPORTANT_SIGS] = 0; - return buffer; -} - -// Prints one-line description of a signal set. -void os::Posix::print_signal_set_short(outputStream* st, const sigset_t* set) { - char buf[NUM_IMPORTANT_SIGS + 1]; - os::Posix::describe_signal_set_short(set, buf, sizeof(buf)); - st->print("%s", buf); -} - -// Writes one-line description of a combination of sigaction.sa_flags into a user -// provided buffer. Returns that buffer. -const char* os::Posix::describe_sa_flags(int flags, char* buffer, size_t size) { - char* p = buffer; - size_t remaining = size; - bool first = true; - int idx = 0; - - assert(buffer, "invalid argument"); - - if (size == 0) { - return buffer; - } - - strncpy(buffer, "none", size); - - const struct { - // NB: i is an unsigned int here because SA_RESETHAND is on some - // systems 0x80000000, which is implicitly unsigned. Assignining - // it to an int field would be an overflow in unsigned-to-signed - // conversion. - unsigned int i; - const char* s; - } flaginfo [] = { - { SA_NOCLDSTOP, "SA_NOCLDSTOP" }, - { SA_ONSTACK, "SA_ONSTACK" }, - { SA_RESETHAND, "SA_RESETHAND" }, - { SA_RESTART, "SA_RESTART" }, - { SA_SIGINFO, "SA_SIGINFO" }, - { SA_NOCLDWAIT, "SA_NOCLDWAIT" }, - { SA_NODEFER, "SA_NODEFER" }, -#ifdef AIX - { SA_ONSTACK, "SA_ONSTACK" }, - { SA_OLDSTYLE, "SA_OLDSTYLE" }, -#endif - { 0, NULL } - }; - - for (idx = 0; flaginfo[idx].s && remaining > 1; idx++) { - if (flags & flaginfo[idx].i) { - if (first) { - jio_snprintf(p, remaining, "%s", flaginfo[idx].s); - first = false; - } else { - jio_snprintf(p, remaining, "|%s", flaginfo[idx].s); - } - const size_t len = strlen(p); - p += len; - remaining -= len; - } - } - - buffer[size - 1] = '\0'; - - return buffer; -} - -// Prints one-line description of a combination of sigaction.sa_flags. -void os::Posix::print_sa_flags(outputStream* st, int flags) { - char buffer[0x100]; - os::Posix::describe_sa_flags(flags, buffer, sizeof(buffer)); - st->print("%s", buffer); -} - -// Helper function for os::Posix::print_siginfo_...(): -// return a textual description for signal code. -struct enum_sigcode_desc_t { - const char* s_name; - const char* s_desc; -}; - -static bool get_signal_code_description(const siginfo_t* si, enum_sigcode_desc_t* out) { - - const struct { - int sig; int code; const char* s_code; const char* s_desc; - } t1 [] = { - { SIGILL, ILL_ILLOPC, "ILL_ILLOPC", "Illegal opcode." }, - { SIGILL, ILL_ILLOPN, "ILL_ILLOPN", "Illegal operand." }, - { SIGILL, ILL_ILLADR, "ILL_ILLADR", "Illegal addressing mode." }, - { SIGILL, ILL_ILLTRP, "ILL_ILLTRP", "Illegal trap." }, - { SIGILL, ILL_PRVOPC, "ILL_PRVOPC", "Privileged opcode." }, - { SIGILL, ILL_PRVREG, "ILL_PRVREG", "Privileged register." }, - { SIGILL, ILL_COPROC, "ILL_COPROC", "Coprocessor error." }, - { SIGILL, ILL_BADSTK, "ILL_BADSTK", "Internal stack error." }, -#if defined(IA64) && defined(LINUX) - { SIGILL, ILL_BADIADDR, "ILL_BADIADDR", "Unimplemented instruction address" }, - { SIGILL, ILL_BREAK, "ILL_BREAK", "Application Break instruction" }, -#endif - { SIGFPE, FPE_INTDIV, "FPE_INTDIV", "Integer divide by zero." }, - { SIGFPE, FPE_INTOVF, "FPE_INTOVF", "Integer overflow." }, - { SIGFPE, FPE_FLTDIV, "FPE_FLTDIV", "Floating-point divide by zero." }, - { SIGFPE, FPE_FLTOVF, "FPE_FLTOVF", "Floating-point overflow." }, - { SIGFPE, FPE_FLTUND, "FPE_FLTUND", "Floating-point underflow." }, - { SIGFPE, FPE_FLTRES, "FPE_FLTRES", "Floating-point inexact result." }, - { SIGFPE, FPE_FLTINV, "FPE_FLTINV", "Invalid floating-point operation." }, - { SIGFPE, FPE_FLTSUB, "FPE_FLTSUB", "Subscript out of range." }, - { SIGSEGV, SEGV_MAPERR, "SEGV_MAPERR", "Address not mapped to object." }, - { SIGSEGV, SEGV_ACCERR, "SEGV_ACCERR", "Invalid permissions for mapped object." }, -#ifdef AIX - // no explanation found what keyerr would be - { SIGSEGV, SEGV_KEYERR, "SEGV_KEYERR", "key error" }, -#endif -#if defined(IA64) && !defined(AIX) - { SIGSEGV, SEGV_PSTKOVF, "SEGV_PSTKOVF", "Paragraph stack overflow" }, -#endif - { SIGBUS, BUS_ADRALN, "BUS_ADRALN", "Invalid address alignment." }, - { SIGBUS, BUS_ADRERR, "BUS_ADRERR", "Nonexistent physical address." }, - { SIGBUS, BUS_OBJERR, "BUS_OBJERR", "Object-specific hardware error." }, - { SIGTRAP, TRAP_BRKPT, "TRAP_BRKPT", "Process breakpoint." }, - { SIGTRAP, TRAP_TRACE, "TRAP_TRACE", "Process trace trap." }, - { SIGCHLD, CLD_EXITED, "CLD_EXITED", "Child has exited." }, - { SIGCHLD, CLD_KILLED, "CLD_KILLED", "Child has terminated abnormally and did not create a core file." }, - { SIGCHLD, CLD_DUMPED, "CLD_DUMPED", "Child has terminated abnormally and created a core file." }, - { SIGCHLD, CLD_TRAPPED, "CLD_TRAPPED", "Traced child has trapped." }, - { SIGCHLD, CLD_STOPPED, "CLD_STOPPED", "Child has stopped." }, - { SIGCHLD, CLD_CONTINUED,"CLD_CONTINUED","Stopped child has continued." }, -#ifdef SIGPOLL - { SIGPOLL, POLL_OUT, "POLL_OUT", "Output buffers available." }, - { SIGPOLL, POLL_MSG, "POLL_MSG", "Input message available." }, - { SIGPOLL, POLL_ERR, "POLL_ERR", "I/O error." }, - { SIGPOLL, POLL_PRI, "POLL_PRI", "High priority input available." }, - { SIGPOLL, POLL_HUP, "POLL_HUP", "Device disconnected. [Option End]" }, -#endif - { -1, -1, NULL, NULL } - }; - - // Codes valid in any signal context. - const struct { - int code; const char* s_code; const char* s_desc; - } t2 [] = { - { SI_USER, "SI_USER", "Signal sent by kill()." }, - { SI_QUEUE, "SI_QUEUE", "Signal sent by the sigqueue()." }, - { SI_TIMER, "SI_TIMER", "Signal generated by expiration of a timer set by timer_settime()." }, - { SI_ASYNCIO, "SI_ASYNCIO", "Signal generated by completion of an asynchronous I/O request." }, - { SI_MESGQ, "SI_MESGQ", "Signal generated by arrival of a message on an empty message queue." }, - // Linux specific -#ifdef SI_TKILL - { SI_TKILL, "SI_TKILL", "Signal sent by tkill (pthread_kill)" }, -#endif -#ifdef SI_DETHREAD - { SI_DETHREAD, "SI_DETHREAD", "Signal sent by execve() killing subsidiary threads" }, -#endif -#ifdef SI_KERNEL - { SI_KERNEL, "SI_KERNEL", "Signal sent by kernel." }, -#endif -#ifdef SI_SIGIO - { SI_SIGIO, "SI_SIGIO", "Signal sent by queued SIGIO" }, -#endif - -#ifdef AIX - { SI_UNDEFINED, "SI_UNDEFINED","siginfo contains partial information" }, - { SI_EMPTY, "SI_EMPTY", "siginfo contains no useful information" }, -#endif - -#ifdef __sun - { SI_NOINFO, "SI_NOINFO", "No signal information" }, - { SI_RCTL, "SI_RCTL", "kernel generated signal via rctl action" }, - { SI_LWP, "SI_LWP", "Signal sent via lwp_kill" }, -#endif - - { -1, NULL, NULL } - }; - - const char* s_code = NULL; - const char* s_desc = NULL; - - for (int i = 0; t1[i].sig != -1; i ++) { - if (t1[i].sig == si->si_signo && t1[i].code == si->si_code) { - s_code = t1[i].s_code; - s_desc = t1[i].s_desc; - break; - } - } - - if (s_code == NULL) { - for (int i = 0; t2[i].s_code != NULL; i ++) { - if (t2[i].code == si->si_code) { - s_code = t2[i].s_code; - s_desc = t2[i].s_desc; - } - } - } - - if (s_code == NULL) { - out->s_name = "unknown"; - out->s_desc = "unknown"; - return false; - } - - out->s_name = s_code; - out->s_desc = s_desc; - - return true; -} - -bool os::signal_sent_by_kill(const void* siginfo) { - const siginfo_t* const si = (const siginfo_t*)siginfo; - return si->si_code == SI_USER || si->si_code == SI_QUEUE -#ifdef SI_TKILL - || si->si_code == SI_TKILL -#endif - ; -} - -void os::print_siginfo(outputStream* os, const void* si0) { - - const siginfo_t* const si = (const siginfo_t*) si0; - - char buf[20]; - os->print("siginfo:"); - - if (!si) { - os->print(" <null>"); - return; - } - - const int sig = si->si_signo; - - os->print(" si_signo: %d (%s)", sig, os::Posix::get_signal_name(sig, buf, sizeof(buf))); - - enum_sigcode_desc_t ed; - get_signal_code_description(si, &ed); - os->print(", si_code: %d (%s)", si->si_code, ed.s_name); - - if (si->si_errno) { - os->print(", si_errno: %d", si->si_errno); - } - - // Output additional information depending on the signal code. - - // Note: Many implementations lump si_addr, si_pid, si_uid etc. together as unions, - // so it depends on the context which member to use. For synchronous error signals, - // we print si_addr, unless the signal was sent by another process or thread, in - // which case we print out pid or tid of the sender. - if (signal_sent_by_kill(si)) { - const pid_t pid = si->si_pid; - os->print(", si_pid: %ld", (long) pid); - if (IS_VALID_PID(pid)) { - const pid_t me = getpid(); - if (me == pid) { - os->print(" (current process)"); - } - } else { - os->print(" (invalid)"); - } - os->print(", si_uid: %ld", (long) si->si_uid); - if (sig == SIGCHLD) { - os->print(", si_status: %d", si->si_status); - } - } else if (sig == SIGSEGV || sig == SIGBUS || sig == SIGILL || - sig == SIGTRAP || sig == SIGFPE) { - os->print(", si_addr: " PTR_FORMAT, p2i(si->si_addr)); -#ifdef SIGPOLL - } else if (sig == SIGPOLL) { - os->print(", si_band: %ld", si->si_band); -#endif - } - -} - -bool os::signal_thread(Thread* thread, int sig, const char* reason) { - OSThread* osthread = thread->osthread(); - if (osthread) { - int status = pthread_kill(osthread->pthread_id(), sig); - if (status == 0) { - Events::log(Thread::current(), "sent signal %d to Thread " INTPTR_FORMAT " because %s.", - sig, p2i(thread), reason); - return true; - } - } - return false; -} - -int os::Posix::unblock_thread_signal_mask(const sigset_t *set) { - return pthread_sigmask(SIG_UNBLOCK, set, NULL); -} - -address os::Posix::ucontext_get_pc(const ucontext_t* ctx) { -#if defined(AIX) - return Aix::ucontext_get_pc(ctx); -#elif defined(BSD) - return Bsd::ucontext_get_pc(ctx); -#elif defined(LINUX) - return Linux::ucontext_get_pc(ctx); -#else - VMError::report_and_die("unimplemented ucontext_get_pc"); -#endif -} - -void os::Posix::ucontext_set_pc(ucontext_t* ctx, address pc) { -#if defined(AIX) - Aix::ucontext_set_pc(ctx, pc); -#elif defined(BSD) - Bsd::ucontext_set_pc(ctx, pc); -#elif defined(LINUX) - Linux::ucontext_set_pc(ctx, pc); -#else - VMError::report_and_die("unimplemented ucontext_get_pc"); -#endif -} - char* os::Posix::describe_pthread_attr(char* buf, size_t buflen, const pthread_attr_t* attr) { size_t stack_size = 0; size_t guard_size = 0; @@ -1523,9 +921,10 @@ bool os::Posix::matches_effective_uid_and_gid_or_root(uid_t uid, gid_t gid) { Thread* os::ThreadCrashProtection::_protected_thread = NULL; os::ThreadCrashProtection* os::ThreadCrashProtection::_crash_protection = NULL; -volatile intptr_t os::ThreadCrashProtection::_crash_mux = 0; os::ThreadCrashProtection::ThreadCrashProtection() { + _protected_thread = Thread::current(); + assert(_protected_thread->is_JfrSampler_thread(), "should be JFRSampler"); } /* @@ -1537,11 +936,6 @@ os::ThreadCrashProtection::ThreadCrashProtection() { bool os::ThreadCrashProtection::call(os::CrashProtectionCallback& cb) { sigset_t saved_sig_mask; - Thread::muxAcquire(&_crash_mux, "CrashProtection"); - - _protected_thread = Thread::current_or_null(); - assert(_protected_thread != NULL, "Cannot crash protect a NULL thread"); - // we cannot rely on sigsetjmp/siglongjmp to save/restore the signal mask // since on at least some systems (OS X) siglongjmp will restore the mask // for the process, not the thread @@ -1554,14 +948,12 @@ bool os::ThreadCrashProtection::call(os::CrashProtectionCallback& cb) { // and clear the crash protection _crash_protection = NULL; _protected_thread = NULL; - Thread::muxRelease(&_crash_mux); return true; } // this happens when we siglongjmp() back pthread_sigmask(SIG_SETMASK, &saved_sig_mask, NULL); _crash_protection = NULL; _protected_thread = NULL; - Thread::muxRelease(&_crash_mux); return false; } @@ -1612,22 +1004,6 @@ static void pthread_init_common(void) { os::PlatformMutex::init(); } -sigset_t sigs; -struct sigaction sigact[NSIG]; - -struct sigaction* os::Posix::get_preinstalled_handler(int sig) { - if (sigismember(&sigs, sig)) { - return &sigact[sig]; - } - return NULL; -} - -void os::Posix::save_preinstalled_handler(int sig, struct sigaction& oldAct) { - assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); - sigact[sig] = oldAct; - sigaddset(&sigs, sig); -} - // Not all POSIX types and API's are available on all notionally "posix" // platforms. If we have build-time support then we will check for actual // runtime support via dlopen/dlsym lookup. This allows for running on an @@ -1730,7 +1106,6 @@ void os::Posix::init_2(void) { (_pthread_condattr_setclock != NULL ? "" : " not")); log_info(os)("Relative timed-wait using pthread_cond_timedwait is associated with %s", _use_clock_monotonic_condattr ? "CLOCK_MONOTONIC" : "the default clock"); - sigemptyset(&sigs); } #else // !SUPPORTS_CLOCK_MONOTONIC @@ -1743,7 +1118,6 @@ void os::Posix::init_2(void) { log_info(os)("Use of CLOCK_MONOTONIC is not supported"); log_info(os)("Use of pthread_condattr_setclock is not supported"); log_info(os)("Relative timed-wait using pthread_cond_timedwait is associated with the default clock"); - sigemptyset(&sigs); } #endif // SUPPORTS_CLOCK_MONOTONIC diff --git a/src/hotspot/os/posix/os_posix.hpp b/src/hotspot/os/posix/os_posix.hpp index ca4adc0de04..514932f57d3 100644 --- a/src/hotspot/os/posix/os_posix.hpp +++ b/src/hotspot/os/posix/os_posix.hpp @@ -63,40 +63,6 @@ class Posix { static jint set_minimum_stack_sizes(); static size_t get_initial_stack_size(ThreadType thr_type, size_t req_stack_size); - // Returns true if signal is valid. - static bool is_valid_signal(int sig); - static bool is_sig_ignored(int sig); - - // Helper function, returns a string (e.g. "SIGILL") for a signal. - // Returned string is a constant. For unknown signals "UNKNOWN" is returned. - static const char* get_signal_name(int sig, char* out, size_t outlen); - - // Helper function, returns a signal number for a given signal name, e.g. 11 - // for "SIGSEGV". Name can be given with or without "SIG" prefix, so both - // "SEGV" or "SIGSEGV" work. Name must be uppercase. - // Returns -1 for an unknown signal name. - static int get_signal_number(const char* signal_name); - - // Returns one-line short description of a signal set in a user provided buffer. - static const char* describe_signal_set_short(const sigset_t* set, char* buffer, size_t size); - - // Prints a short one-line description of a signal set. - static void print_signal_set_short(outputStream* st, const sigset_t* set); - - // unblocks the signal masks for current thread - static int unblock_thread_signal_mask(const sigset_t *set); - - // Writes a one-line description of a combination of sigaction.sa_flags - // into a user provided buffer. Returns that buffer. - static const char* describe_sa_flags(int flags, char* buffer, size_t size); - - // Prints a one-line description of a combination of sigaction.sa_flags. - static void print_sa_flags(outputStream* st, int flags); - - static address ucontext_get_pc(const ucontext_t* ctx); - // Set PC into context. Needed for continuation after signal. - static void ucontext_set_pc(ucontext_t* ctx, address pc); - // Helper function; describes pthread attributes as short string. String is written // to buf with len buflen; buf is returned. static char* describe_pthread_attr(char* buf, size_t buflen, const pthread_attr_t* attr); @@ -118,9 +84,6 @@ class Posix { // effective gid, or if given uid is root. static bool matches_effective_uid_and_gid_or_root(uid_t uid, gid_t gid); - static struct sigaction *get_preinstalled_handler(int); - static void save_preinstalled_handler(int, struct sigaction&); - static void print_umask(outputStream* st, mode_t umsk); static void print_user_info(outputStream* st); @@ -146,7 +109,7 @@ class Posix { }; /* - * Crash protection for the watcher thread. Wrap the callback + * Crash protection for the JfrSampler thread. Wrap the callback * with a sigsetjmp and in case of a SIGSEGV/SIGBUS we siglongjmp * back. * To be able to use this - don't take locks, don't rely on destructors, @@ -167,7 +130,6 @@ class ThreadCrashProtection : public StackObj { private: static Thread* _protected_thread; static ThreadCrashProtection* _crash_protection; - static volatile intptr_t _crash_mux; void restore(); sigjmp_buf _jmpbuf; }; diff --git a/src/hotspot/os/posix/signals_posix.cpp b/src/hotspot/os/posix/signals_posix.cpp new file mode 100644 index 00000000000..4eea0664566 --- /dev/null +++ b/src/hotspot/os/posix/signals_posix.cpp @@ -0,0 +1,1650 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled/precompiled.hpp" + +#include "jvm.h" +#include "logging/log.hpp" +#include "runtime/globals.hpp" +#include "runtime/interfaceSupport.inline.hpp" +#include "runtime/os.hpp" +#include "runtime/osThread.hpp" +#include "runtime/thread.hpp" +#include "signals_posix.hpp" +#include "utilities/events.hpp" +#include "utilities/ostream.hpp" +#include "utilities/vmError.hpp" + +// Various signal related mechanism are laid out in the following order: +// +// sun.misc.Signal +// signal chaining +// signal handling (except suspend/resume) +// suspend/resume + +// glibc on Bsd platform uses non-documented flag +// to indicate, that some special sort of signal +// trampoline is used. +// We will never set this flag, and we should +// ignore this flag in our diagnostic +#ifdef SIGNIFICANT_SIGNAL_MASK + #undef SIGNIFICANT_SIGNAL_MASK +#endif +#define SIGNIFICANT_SIGNAL_MASK (~0x04000000) + +// Todo: provide a os::get_max_process_id() or similar. Number of processes +// may have been configured, can be read more accurately from proc fs etc. +#ifndef MAX_PID + #define MAX_PID INT_MAX +#endif +#define IS_VALID_PID(p) (p > 0 && p < MAX_PID) + +#define NUM_IMPORTANT_SIGS 32 + +extern "C" { + typedef void (*sa_handler_t)(int); + typedef void (*sa_sigaction_t)(int, siginfo_t *, void *); +} + +// For diagnostics to print a message once. see run_periodic_checks +static sigset_t check_signal_done; +static bool check_signals = true; + +// This boolean allows users to forward their own non-matching signals +// to JVM_handle_bsd_signal/JVM_handle_linux_signal, harmlessly. +static bool signal_handlers_are_installed = false; + +debug_only(static bool signal_sets_initialized = false); +static sigset_t unblocked_sigs, vm_sigs, preinstalled_sigs; +struct sigaction sigact[NSIG]; + +// For signal-chaining +static bool libjsig_is_loaded = false; +typedef struct sigaction *(*get_signal_t)(int); +static get_signal_t get_signal_action = NULL; + +// For diagnostic +int sigflags[NSIG]; + +// suspend/resume support +#if defined(__APPLE__) + static OSXSemaphore sr_semaphore; +#else + static PosixSemaphore sr_semaphore; +#endif + +// sun.misc.Signal support +static Semaphore* sig_semaphore = NULL; +// a counter for each possible signal value +static volatile jint pending_signals[NSIG+1] = { 0 }; + +static const struct { + int sig; const char* name; +} g_signal_info[] = { + { SIGABRT, "SIGABRT" }, +#ifdef SIGAIO + { SIGAIO, "SIGAIO" }, +#endif + { SIGALRM, "SIGALRM" }, +#ifdef SIGALRM1 + { SIGALRM1, "SIGALRM1" }, +#endif + { SIGBUS, "SIGBUS" }, +#ifdef SIGCANCEL + { SIGCANCEL, "SIGCANCEL" }, +#endif + { SIGCHLD, "SIGCHLD" }, +#ifdef SIGCLD + { SIGCLD, "SIGCLD" }, +#endif + { SIGCONT, "SIGCONT" }, +#ifdef SIGCPUFAIL + { SIGCPUFAIL, "SIGCPUFAIL" }, +#endif +#ifdef SIGDANGER + { SIGDANGER, "SIGDANGER" }, +#endif +#ifdef SIGDIL + { SIGDIL, "SIGDIL" }, +#endif +#ifdef SIGEMT + { SIGEMT, "SIGEMT" }, +#endif + { SIGFPE, "SIGFPE" }, +#ifdef SIGFREEZE + { SIGFREEZE, "SIGFREEZE" }, +#endif +#ifdef SIGGFAULT + { SIGGFAULT, "SIGGFAULT" }, +#endif +#ifdef SIGGRANT + { SIGGRANT, "SIGGRANT" }, +#endif + { SIGHUP, "SIGHUP" }, + { SIGILL, "SIGILL" }, +#ifdef SIGINFO + { SIGINFO, "SIGINFO" }, +#endif + { SIGINT, "SIGINT" }, +#ifdef SIGIO + { SIGIO, "SIGIO" }, +#endif +#ifdef SIGIOINT + { SIGIOINT, "SIGIOINT" }, +#endif +#ifdef SIGIOT +// SIGIOT is there for BSD compatibility, but on most Unices just a +// synonym for SIGABRT. The result should be "SIGABRT", not +// "SIGIOT". +#if (SIGIOT != SIGABRT ) + { SIGIOT, "SIGIOT" }, +#endif +#endif +#ifdef SIGKAP + { SIGKAP, "SIGKAP" }, +#endif + { SIGKILL, "SIGKILL" }, +#ifdef SIGLOST + { SIGLOST, "SIGLOST" }, +#endif +#ifdef SIGLWP + { SIGLWP, "SIGLWP" }, +#endif +#ifdef SIGLWPTIMER + { SIGLWPTIMER, "SIGLWPTIMER" }, +#endif +#ifdef SIGMIGRATE + { SIGMIGRATE, "SIGMIGRATE" }, +#endif +#ifdef SIGMSG + { SIGMSG, "SIGMSG" }, +#endif + { SIGPIPE, "SIGPIPE" }, +#ifdef SIGPOLL + { SIGPOLL, "SIGPOLL" }, +#endif +#ifdef SIGPRE + { SIGPRE, "SIGPRE" }, +#endif + { SIGPROF, "SIGPROF" }, +#ifdef SIGPTY + { SIGPTY, "SIGPTY" }, +#endif +#ifdef SIGPWR + { SIGPWR, "SIGPWR" }, +#endif + { SIGQUIT, "SIGQUIT" }, +#ifdef SIGRECONFIG + { SIGRECONFIG, "SIGRECONFIG" }, +#endif +#ifdef SIGRECOVERY + { SIGRECOVERY, "SIGRECOVERY" }, +#endif +#ifdef SIGRESERVE + { SIGRESERVE, "SIGRESERVE" }, +#endif +#ifdef SIGRETRACT + { SIGRETRACT, "SIGRETRACT" }, +#endif +#ifdef SIGSAK + { SIGSAK, "SIGSAK" }, +#endif + { SIGSEGV, "SIGSEGV" }, +#ifdef SIGSOUND + { SIGSOUND, "SIGSOUND" }, +#endif +#ifdef SIGSTKFLT + { SIGSTKFLT, "SIGSTKFLT" }, +#endif + { SIGSTOP, "SIGSTOP" }, + { SIGSYS, "SIGSYS" }, +#ifdef SIGSYSERROR + { SIGSYSERROR, "SIGSYSERROR" }, +#endif +#ifdef SIGTALRM + { SIGTALRM, "SIGTALRM" }, +#endif + { SIGTERM, "SIGTERM" }, +#ifdef SIGTHAW + { SIGTHAW, "SIGTHAW" }, +#endif + { SIGTRAP, "SIGTRAP" }, +#ifdef SIGTSTP + { SIGTSTP, "SIGTSTP" }, +#endif + { SIGTTIN, "SIGTTIN" }, + { SIGTTOU, "SIGTTOU" }, +#ifdef SIGURG + { SIGURG, "SIGURG" }, +#endif + { SIGUSR1, "SIGUSR1" }, + { SIGUSR2, "SIGUSR2" }, +#ifdef SIGVIRT + { SIGVIRT, "SIGVIRT" }, +#endif + { SIGVTALRM, "SIGVTALRM" }, +#ifdef SIGWAITING + { SIGWAITING, "SIGWAITING" }, +#endif +#ifdef SIGWINCH + { SIGWINCH, "SIGWINCH" }, +#endif +#ifdef SIGWINDOW + { SIGWINDOW, "SIGWINDOW" }, +#endif + { SIGXCPU, "SIGXCPU" }, + { SIGXFSZ, "SIGXFSZ" }, +#ifdef SIGXRES + { SIGXRES, "SIGXRES" }, +#endif + { -1, NULL } +}; + +//////////////////////////////////////////////////////////////////////////////// +// sun.misc.Signal support + +void PosixSignals::jdk_misc_signal_init() { + // Initialize signal structures + ::memset((void*)pending_signals, 0, sizeof(pending_signals)); + + // Initialize signal semaphore + sig_semaphore = new Semaphore(); +} + +void os::signal_notify(int sig) { + if (sig_semaphore != NULL) { + Atomic::inc(&pending_signals[sig]); + sig_semaphore->signal(); + } else { + // Signal thread is not created with ReduceSignalUsage and jdk_misc_signal_init + // initialization isn't called. + assert(ReduceSignalUsage, "signal semaphore should be created"); + } +} + +static int check_pending_signals() { + for (;;) { + for (int i = 0; i < NSIG + 1; i++) { + jint n = pending_signals[i]; + if (n > 0 && n == Atomic::cmpxchg(&pending_signals[i], n, n - 1)) { + return i; + } + } + JavaThread *thread = JavaThread::current(); + ThreadBlockInVM tbivm(thread); + + bool threadIsSuspended; + do { + thread->set_suspend_equivalent(); + // cleared by handle_special_suspend_equivalent_condition() or java_suspend_self() + sig_semaphore->wait(); + + // were we externally suspended while we were waiting? + threadIsSuspended = thread->handle_special_suspend_equivalent_condition(); + if (threadIsSuspended) { + // The semaphore has been incremented, but while we were waiting + // another thread suspended us. We don't want to continue running + // while suspended because that would surprise the thread that + // suspended us. + sig_semaphore->signal(); + + thread->java_suspend_self(); + } + } while (threadIsSuspended); + } +} + +int os::signal_wait() { + return check_pending_signals(); +} + +//////////////////////////////////////////////////////////////////////////////// +// signal chaining support + +static struct sigaction* get_preinstalled_handler(int sig) { + if (sigismember(&preinstalled_sigs, sig)) { + return &sigact[sig]; + } + return NULL; +} + +static void save_preinstalled_handler(int sig, struct sigaction& oldAct) { + assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); + sigact[sig] = oldAct; + sigaddset(&preinstalled_sigs, sig); +} + +struct sigaction* get_chained_signal_action(int sig) { + struct sigaction *actp = NULL; + + if (libjsig_is_loaded) { + // Retrieve the old signal handler from libjsig + actp = (*get_signal_action)(sig); + } + if (actp == NULL) { + // Retrieve the preinstalled signal handler from jvm + actp = get_preinstalled_handler(sig); + } + + return actp; +} + +static bool call_chained_handler(struct sigaction *actp, int sig, + siginfo_t *siginfo, void *context) { + // Call the old signal handler + if (actp->sa_handler == SIG_DFL) { + // It's more reasonable to let jvm treat it as an unexpected exception + // instead of taking the default action. + return false; + } else if (actp->sa_handler != SIG_IGN) { + if ((actp->sa_flags & SA_NODEFER) == 0) { + // automaticlly block the signal + sigaddset(&(actp->sa_mask), sig); + } + + sa_handler_t hand = NULL; + sa_sigaction_t sa = NULL; + bool siginfo_flag_set = (actp->sa_flags & SA_SIGINFO) != 0; + // retrieve the chained handler + if (siginfo_flag_set) { + sa = actp->sa_sigaction; + } else { + hand = actp->sa_handler; + } + + if ((actp->sa_flags & SA_RESETHAND) != 0) { + actp->sa_handler = SIG_DFL; + } + + // try to honor the signal mask + sigset_t oset; + sigemptyset(&oset); + pthread_sigmask(SIG_SETMASK, &(actp->sa_mask), &oset); + + // call into the chained handler + if (siginfo_flag_set) { + (*sa)(sig, siginfo, context); + } else { + (*hand)(sig); + } + + // restore the signal mask + pthread_sigmask(SIG_SETMASK, &oset, NULL); + } + // Tell jvm's signal handler the signal is taken care of. + return true; +} + +bool PosixSignals::chained_handler(int sig, siginfo_t* siginfo, void* context) { + bool chained = false; + // signal-chaining + if (UseSignalChaining) { + struct sigaction *actp = get_chained_signal_action(sig); + if (actp != NULL) { + chained = call_chained_handler(actp, sig, siginfo, context); + } + } + return chained; +} + +//////////////////////////////////////////////////////////////////////////////// +// signal handling (except suspend/resume) + +// This routine may be used by user applications as a "hook" to catch signals. +// The user-defined signal handler must pass unrecognized signals to this +// routine, and if it returns true (non-zero), then the signal handler must +// return immediately. If the flag "abort_if_unrecognized" is true, then this +// routine will never retun false (zero), but instead will execute a VM panic +// routine kill the process. +// +// If this routine returns false, it is OK to call it again. This allows +// the user-defined signal handler to perform checks either before or after +// the VM performs its own checks. Naturally, the user code would be making +// a serious error if it tried to handle an exception (such as a null check +// or breakpoint) that the VM was generating for its own correct operation. +// +// This routine may recognize any of the following kinds of signals: +// SIGBUS, SIGSEGV, SIGILL, SIGFPE, SIGQUIT, SIGPIPE, SIGXFSZ, SIGUSR1. +// It should be consulted by handlers for any of those signals. +// +// The caller of this routine must pass in the three arguments supplied +// to the function referred to in the "sa_sigaction" (not the "sa_handler") +// field of the structure passed to sigaction(). This routine assumes that +// the sa_flags field passed to sigaction() includes SA_SIGINFO and SA_RESTART. +// +// Note that the VM will print warnings if it detects conflicting signal +// handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers". +// + +#if defined(BSD) +extern "C" JNIEXPORT int JVM_handle_bsd_signal(int signo, siginfo_t* siginfo, + void* ucontext, + int abort_if_unrecognized); +#elif defined(AIX) +extern "C" JNIEXPORT int JVM_handle_aix_signal(int signo, siginfo_t* siginfo, + void* ucontext, + int abort_if_unrecognized); +#else +extern "C" JNIEXPORT int JVM_handle_linux_signal(int signo, siginfo_t* siginfo, + void* ucontext, + int abort_if_unrecognized); +#endif + +#if defined(AIX) + +// Set thread signal mask (for some reason on AIX sigthreadmask() seems +// to be the thing to call; documentation is not terribly clear about whether +// pthread_sigmask also works, and if it does, whether it does the same. +bool set_thread_signal_mask(int how, const sigset_t* set, sigset_t* oset) { + const int rc = ::pthread_sigmask(how, set, oset); + // return value semantics differ slightly for error case: + // pthread_sigmask returns error number, sigthreadmask -1 and sets global errno + // (so, pthread_sigmask is more theadsafe for error handling) + // But success is always 0. + return rc == 0 ? true : false; +} + +// Function to unblock all signals which are, according +// to POSIX, typical program error signals. If they happen while being blocked, +// they typically will bring down the process immediately. +bool unblock_program_error_signals() { + sigset_t set; + sigemptyset(&set); + sigaddset(&set, SIGILL); + sigaddset(&set, SIGBUS); + sigaddset(&set, SIGFPE); + sigaddset(&set, SIGSEGV); + return set_thread_signal_mask(SIG_UNBLOCK, &set, NULL); +} + +#endif + +// Renamed from 'signalHandler' to avoid collision with other shared libs. +static void javaSignalHandler(int sig, siginfo_t* info, void* uc) { + assert(info != NULL && uc != NULL, "it must be old kernel"); + +// TODO: reconcile the differences between Linux/BSD vs AIX here! +#if defined(AIX) + // Never leave program error signals blocked; + // on all our platforms they would bring down the process immediately when + // getting raised while being blocked. + unblock_program_error_signals(); +#endif + + int orig_errno = errno; // Preserve errno value over signal handler. +#if defined(BSD) + JVM_handle_bsd_signal(sig, info, uc, true); +#elif defined(AIX) + JVM_handle_aix_signal(sig, info, uc, true); +#else + JVM_handle_linux_signal(sig, info, uc, true); +#endif + errno = orig_errno; +} + +static void UserHandler(int sig, void *siginfo, void *context) { + // Ctrl-C is pressed during error reporting, likely because the error + // handler fails to abort. Let VM die immediately. + if (sig == SIGINT && VMError::is_error_reported()) { + os::die(); + } + + os::signal_notify(sig); +} + +static const char* get_signal_handler_name(address handler, + char* buf, int buflen) { + int offset = 0; + bool found = os::dll_address_to_library_name(handler, buf, buflen, &offset); + if (found) { + // skip directory names + const char *p1, *p2; + p1 = buf; + size_t len = strlen(os::file_separator()); + while ((p2 = strstr(p1, os::file_separator())) != NULL) p1 = p2 + len; +#if !defined(AIX) + jio_snprintf(buf, buflen, "%s+0x%x", p1, offset); +#else + // The way os::dll_address_to_library_name is implemented on Aix + // right now, it always returns -1 for the offset which is not + // terribly informative. + // Will fix that. For now, omit the offset. + jio_snprintf(buf, buflen, "%s", p1); +#endif + } else { + jio_snprintf(buf, buflen, PTR_FORMAT, handler); + } + return buf; +} + +// Writes one-line description of a combination of sigaction.sa_flags into a user +// provided buffer. Returns that buffer. +static const char* describe_sa_flags(int flags, char* buffer, size_t size) { + char* p = buffer; + size_t remaining = size; + bool first = true; + int idx = 0; + + assert(buffer, "invalid argument"); + + if (size == 0) { + return buffer; + } + + strncpy(buffer, "none", size); + + const struct { + // NB: i is an unsigned int here because SA_RESETHAND is on some + // systems 0x80000000, which is implicitly unsigned. Assignining + // it to an int field would be an overflow in unsigned-to-signed + // conversion. + unsigned int i; + const char* s; + } flaginfo [] = { + { SA_NOCLDSTOP, "SA_NOCLDSTOP" }, + { SA_ONSTACK, "SA_ONSTACK" }, + { SA_RESETHAND, "SA_RESETHAND" }, + { SA_RESTART, "SA_RESTART" }, + { SA_SIGINFO, "SA_SIGINFO" }, + { SA_NOCLDWAIT, "SA_NOCLDWAIT" }, + { SA_NODEFER, "SA_NODEFER" }, +#if defined(AIX) + { SA_OLDSTYLE, "SA_OLDSTYLE" }, +#endif + { 0, NULL } + }; + + for (idx = 0; flaginfo[idx].s && remaining > 1; idx++) { + if (flags & flaginfo[idx].i) { + if (first) { + jio_snprintf(p, remaining, "%s", flaginfo[idx].s); + first = false; + } else { + jio_snprintf(p, remaining, "|%s", flaginfo[idx].s); + } + const size_t len = strlen(p); + p += len; + remaining -= len; + } + } + + buffer[size - 1] = '\0'; + + return buffer; +} + +// Prints one-line description of a combination of sigaction.sa_flags. +static void print_sa_flags(outputStream* st, int flags) { + char buffer[0x100]; + describe_sa_flags(flags, buffer, sizeof(buffer)); + st->print("%s", buffer); +} + +static int get_our_sigflags(int sig) { + assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); + return sigflags[sig]; +} + +static void set_our_sigflags(int sig, int flags) { + assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); + if (sig > 0 && sig < NSIG) { + sigflags[sig] = flags; + } +} + +typedef int (*os_sigaction_t)(int, const struct sigaction *, struct sigaction *); + +static void SR_handler(int sig, siginfo_t* siginfo, ucontext_t* context); + +static void check_signal_handler(int sig) { + char buf[O_BUFLEN]; + address jvmHandler = NULL; + + struct sigaction act; + static os_sigaction_t os_sigaction = NULL; + if (os_sigaction == NULL) { + // only trust the default sigaction, in case it has been interposed + os_sigaction = (os_sigaction_t)dlsym(RTLD_DEFAULT, "sigaction"); + if (os_sigaction == NULL) return; + } + + os_sigaction(sig, (struct sigaction*)NULL, &act); + + + act.sa_flags &= SIGNIFICANT_SIGNAL_MASK; + + address thisHandler = (act.sa_flags & SA_SIGINFO) + ? CAST_FROM_FN_PTR(address, act.sa_sigaction) + : CAST_FROM_FN_PTR(address, act.sa_handler); + + + switch (sig) { + case SIGSEGV: + case SIGBUS: + case SIGFPE: + case SIGPIPE: + case SIGILL: + case SIGXFSZ: + jvmHandler = CAST_FROM_FN_PTR(address, (sa_sigaction_t)javaSignalHandler); + break; + + case SHUTDOWN1_SIGNAL: + case SHUTDOWN2_SIGNAL: + case SHUTDOWN3_SIGNAL: + case BREAK_SIGNAL: + jvmHandler = (address)os::user_handler(); + break; + + default: + if (sig == SR_signum) { + jvmHandler = CAST_FROM_FN_PTR(address, (sa_sigaction_t)SR_handler); + } else { + return; + } + break; + } + + if (thisHandler != jvmHandler) { + tty->print("Warning: %s handler ", os::exception_name(sig, buf, O_BUFLEN)); + tty->print("expected:%s", get_signal_handler_name(jvmHandler, buf, O_BUFLEN)); + tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN)); + // No need to check this sig any longer + sigaddset(&check_signal_done, sig); + // Running under non-interactive shell, SHUTDOWN2_SIGNAL will be reassigned SIG_IGN + if (sig == SHUTDOWN2_SIGNAL && !isatty(fileno(stdin))) { + tty->print_cr("Running in non-interactive shell, %s handler is replaced by shell", + os::exception_name(sig, buf, O_BUFLEN)); + } + } else if (get_our_sigflags(sig) != 0 && (int)act.sa_flags != get_our_sigflags(sig)) { + tty->print("Warning: %s handler flags ", os::exception_name(sig, buf, O_BUFLEN)); + tty->print("expected:"); + print_sa_flags(tty, get_our_sigflags(sig)); + tty->cr(); + tty->print(" found:"); + print_sa_flags(tty, act.sa_flags); + tty->cr(); + // No need to check this sig any longer + sigaddset(&check_signal_done, sig); + } + + // Dump all the signal + if (sigismember(&check_signal_done, sig)) { + os::print_signal_handlers(tty, buf, O_BUFLEN); + } +} + +void* os::user_handler() { + return CAST_FROM_FN_PTR(void*, UserHandler); +} + +void* os::signal(int signal_number, void* handler) { + struct sigaction sigAct, oldSigAct; + + sigfillset(&(sigAct.sa_mask)); + +#if defined(AIX) + // Do not block out synchronous signals in the signal handler. + // Blocking synchronous signals only makes sense if you can really + // be sure that those signals won't happen during signal handling, + // when the blocking applies. Normal signal handlers are lean and + // do not cause signals. But our signal handlers tend to be "risky" + // - secondary SIGSEGV, SIGILL, SIGBUS' may and do happen. + // On AIX, PASE there was a case where a SIGSEGV happened, followed + // by a SIGILL, which was blocked due to the signal mask. The process + // just hung forever. Better to crash from a secondary signal than to hang. + sigdelset(&(sigAct.sa_mask), SIGSEGV); + sigdelset(&(sigAct.sa_mask), SIGBUS); + sigdelset(&(sigAct.sa_mask), SIGILL); + sigdelset(&(sigAct.sa_mask), SIGFPE); + sigdelset(&(sigAct.sa_mask), SIGTRAP); +#endif + + sigAct.sa_flags = SA_RESTART|SA_SIGINFO; + sigAct.sa_handler = CAST_TO_FN_PTR(sa_handler_t, handler); + + if (sigaction(signal_number, &sigAct, &oldSigAct)) { + // -1 means registration failed + return (void *)-1; + } + + return CAST_FROM_FN_PTR(void*, oldSigAct.sa_handler); +} + +void os::signal_raise(int signal_number) { + ::raise(signal_number); +} + +// Will be modified when max signal is changed to be dynamic +int os::sigexitnum_pd() { + return NSIG; +} + +static void do_signal_check(int signal) { + if (!sigismember(&check_signal_done, signal)) { + check_signal_handler(signal); + } +} + +// This method is a periodic task to check for misbehaving JNI applications +// under CheckJNI, we can add any periodic checks here + +void os::run_periodic_checks() { + + if (check_signals == false) return; + + // SEGV and BUS if overridden could potentially prevent + // generation of hs*.log in the event of a crash, debugging + // such a case can be very challenging, so we absolutely + // check the following for a good measure: + do_signal_check(SIGSEGV); + do_signal_check(SIGILL); + do_signal_check(SIGFPE); + do_signal_check(SIGBUS); + do_signal_check(SIGPIPE); + do_signal_check(SIGXFSZ); +#if defined(PPC64) + do_signal_check(SIGTRAP); +#endif + + // ReduceSignalUsage allows the user to override these handlers + // see comments at the very top and jvm_md.h + if (!ReduceSignalUsage) { + do_signal_check(SHUTDOWN1_SIGNAL); + do_signal_check(SHUTDOWN2_SIGNAL); + do_signal_check(SHUTDOWN3_SIGNAL); + do_signal_check(BREAK_SIGNAL); + } + + do_signal_check(SR_signum); +} + +// Helper function for PosixSignals::print_siginfo_...(): +// return a textual description for signal code. +struct enum_sigcode_desc_t { + const char* s_name; + const char* s_desc; +}; + +static bool get_signal_code_description(const siginfo_t* si, enum_sigcode_desc_t* out) { + + const struct { + int sig; int code; const char* s_code; const char* s_desc; + } t1 [] = { + { SIGILL, ILL_ILLOPC, "ILL_ILLOPC", "Illegal opcode." }, + { SIGILL, ILL_ILLOPN, "ILL_ILLOPN", "Illegal operand." }, + { SIGILL, ILL_ILLADR, "ILL_ILLADR", "Illegal addressing mode." }, + { SIGILL, ILL_ILLTRP, "ILL_ILLTRP", "Illegal trap." }, + { SIGILL, ILL_PRVOPC, "ILL_PRVOPC", "Privileged opcode." }, + { SIGILL, ILL_PRVREG, "ILL_PRVREG", "Privileged register." }, + { SIGILL, ILL_COPROC, "ILL_COPROC", "Coprocessor error." }, + { SIGILL, ILL_BADSTK, "ILL_BADSTK", "Internal stack error." }, +#if defined(IA64) && defined(LINUX) + { SIGILL, ILL_BADIADDR, "ILL_BADIADDR", "Unimplemented instruction address" }, + { SIGILL, ILL_BREAK, "ILL_BREAK", "Application Break instruction" }, +#endif + { SIGFPE, FPE_INTDIV, "FPE_INTDIV", "Integer divide by zero." }, + { SIGFPE, FPE_INTOVF, "FPE_INTOVF", "Integer overflow." }, + { SIGFPE, FPE_FLTDIV, "FPE_FLTDIV", "Floating-point divide by zero." }, + { SIGFPE, FPE_FLTOVF, "FPE_FLTOVF", "Floating-point overflow." }, + { SIGFPE, FPE_FLTUND, "FPE_FLTUND", "Floating-point underflow." }, + { SIGFPE, FPE_FLTRES, "FPE_FLTRES", "Floating-point inexact result." }, + { SIGFPE, FPE_FLTINV, "FPE_FLTINV", "Invalid floating-point operation." }, + { SIGFPE, FPE_FLTSUB, "FPE_FLTSUB", "Subscript out of range." }, + { SIGSEGV, SEGV_MAPERR, "SEGV_MAPERR", "Address not mapped to object." }, + { SIGSEGV, SEGV_ACCERR, "SEGV_ACCERR", "Invalid permissions for mapped object." }, +#if defined(AIX) + // no explanation found what keyerr would be + { SIGSEGV, SEGV_KEYERR, "SEGV_KEYERR", "key error" }, +#endif +#if defined(IA64) && !defined(AIX) + { SIGSEGV, SEGV_PSTKOVF, "SEGV_PSTKOVF", "Paragraph stack overflow" }, +#endif + { SIGBUS, BUS_ADRALN, "BUS_ADRALN", "Invalid address alignment." }, + { SIGBUS, BUS_ADRERR, "BUS_ADRERR", "Nonexistent physical address." }, + { SIGBUS, BUS_OBJERR, "BUS_OBJERR", "Object-specific hardware error." }, + { SIGTRAP, TRAP_BRKPT, "TRAP_BRKPT", "Process breakpoint." }, + { SIGTRAP, TRAP_TRACE, "TRAP_TRACE", "Process trace trap." }, + { SIGCHLD, CLD_EXITED, "CLD_EXITED", "Child has exited." }, + { SIGCHLD, CLD_KILLED, "CLD_KILLED", "Child has terminated abnormally and did not create a core file." }, + { SIGCHLD, CLD_DUMPED, "CLD_DUMPED", "Child has terminated abnormally and created a core file." }, + { SIGCHLD, CLD_TRAPPED, "CLD_TRAPPED", "Traced child has trapped." }, + { SIGCHLD, CLD_STOPPED, "CLD_STOPPED", "Child has stopped." }, + { SIGCHLD, CLD_CONTINUED,"CLD_CONTINUED","Stopped child has continued." }, +#ifdef SIGPOLL + { SIGPOLL, POLL_OUT, "POLL_OUT", "Output buffers available." }, + { SIGPOLL, POLL_MSG, "POLL_MSG", "Input message available." }, + { SIGPOLL, POLL_ERR, "POLL_ERR", "I/O error." }, + { SIGPOLL, POLL_PRI, "POLL_PRI", "High priority input available." }, + { SIGPOLL, POLL_HUP, "POLL_HUP", "Device disconnected. [Option End]" }, +#endif + { -1, -1, NULL, NULL } + }; + + // Codes valid in any signal context. + const struct { + int code; const char* s_code; const char* s_desc; + } t2 [] = { + { SI_USER, "SI_USER", "Signal sent by kill()." }, + { SI_QUEUE, "SI_QUEUE", "Signal sent by the sigqueue()." }, + { SI_TIMER, "SI_TIMER", "Signal generated by expiration of a timer set by timer_settime()." }, + { SI_ASYNCIO, "SI_ASYNCIO", "Signal generated by completion of an asynchronous I/O request." }, + { SI_MESGQ, "SI_MESGQ", "Signal generated by arrival of a message on an empty message queue." }, + // Linux specific +#ifdef SI_TKILL + { SI_TKILL, "SI_TKILL", "Signal sent by tkill (pthread_kill)" }, +#endif +#ifdef SI_DETHREAD + { SI_DETHREAD, "SI_DETHREAD", "Signal sent by execve() killing subsidiary threads" }, +#endif +#ifdef SI_KERNEL + { SI_KERNEL, "SI_KERNEL", "Signal sent by kernel." }, +#endif +#ifdef SI_SIGIO + { SI_SIGIO, "SI_SIGIO", "Signal sent by queued SIGIO" }, +#endif + +#if defined(AIX) + { SI_UNDEFINED, "SI_UNDEFINED","siginfo contains partial information" }, + { SI_EMPTY, "SI_EMPTY", "siginfo contains no useful information" }, +#endif + + { -1, NULL, NULL } + }; + + const char* s_code = NULL; + const char* s_desc = NULL; + + for (int i = 0; t1[i].sig != -1; i ++) { + if (t1[i].sig == si->si_signo && t1[i].code == si->si_code) { + s_code = t1[i].s_code; + s_desc = t1[i].s_desc; + break; + } + } + + if (s_code == NULL) { + for (int i = 0; t2[i].s_code != NULL; i ++) { + if (t2[i].code == si->si_code) { + s_code = t2[i].s_code; + s_desc = t2[i].s_desc; + } + } + } + + if (s_code == NULL) { + out->s_name = "unknown"; + out->s_desc = "unknown"; + return false; + } + + out->s_name = s_code; + out->s_desc = s_desc; + + return true; +} + +bool os::signal_sent_by_kill(const void* siginfo) { + const siginfo_t* const si = (const siginfo_t*)siginfo; + return si->si_code == SI_USER || si->si_code == SI_QUEUE +#ifdef SI_TKILL + || si->si_code == SI_TKILL +#endif + ; +} + +// Returns true if signal number is valid. +static bool is_valid_signal(int sig) { + // MacOS not really POSIX compliant: sigaddset does not return + // an error for invalid signal numbers. However, MacOS does not + // support real time signals and simply seems to have just 33 + // signals with no holes in the signal range. +#if defined(__APPLE__) + return sig >= 1 && sig < NSIG; +#else + // Use sigaddset to check for signal validity. + sigset_t set; + sigemptyset(&set); + if (sigaddset(&set, sig) == -1 && errno == EINVAL) { + return false; + } + return true; +#endif +} + +// Returned string is a constant. For unknown signals "UNKNOWN" is returned. +static const char* get_signal_name(int sig, char* out, size_t outlen) { + + const char* ret = NULL; + +#ifdef SIGRTMIN + if (sig >= SIGRTMIN && sig <= SIGRTMAX) { + if (sig == SIGRTMIN) { + ret = "SIGRTMIN"; + } else if (sig == SIGRTMAX) { + ret = "SIGRTMAX"; + } else { + jio_snprintf(out, outlen, "SIGRTMIN+%d", sig - SIGRTMIN); + return out; + } + } +#endif + + if (sig > 0) { + for (int idx = 0; g_signal_info[idx].sig != -1; idx ++) { + if (g_signal_info[idx].sig == sig) { + ret = g_signal_info[idx].name; + break; + } + } + } + + if (!ret) { + if (!is_valid_signal(sig)) { + ret = "INVALID"; + } else { + ret = "UNKNOWN"; + } + } + + if (out && outlen > 0) { + strncpy(out, ret, outlen); + out[outlen - 1] = '\0'; + } + return out; +} + +void os::print_siginfo(outputStream* os, const void* si0) { + + const siginfo_t* const si = (const siginfo_t*) si0; + + char buf[20]; + os->print("siginfo:"); + + if (!si) { + os->print(" <null>"); + return; + } + + const int sig = si->si_signo; + + os->print(" si_signo: %d (%s)", sig, get_signal_name(sig, buf, sizeof(buf))); + + enum_sigcode_desc_t ed; + get_signal_code_description(si, &ed); + os->print(", si_code: %d (%s)", si->si_code, ed.s_name); + + if (si->si_errno) { + os->print(", si_errno: %d", si->si_errno); + } + + // Output additional information depending on the signal code. + + // Note: Many implementations lump si_addr, si_pid, si_uid etc. together as unions, + // so it depends on the context which member to use. For synchronous error signals, + // we print si_addr, unless the signal was sent by another process or thread, in + // which case we print out pid or tid of the sender. + if (os::signal_sent_by_kill(si)) { + const pid_t pid = si->si_pid; + os->print(", si_pid: %ld", (long) pid); + if (IS_VALID_PID(pid)) { + const pid_t me = getpid(); + if (me == pid) { + os->print(" (current process)"); + } + } else { + os->print(" (invalid)"); + } + os->print(", si_uid: %ld", (long) si->si_uid); + if (sig == SIGCHLD) { + os->print(", si_status: %d", si->si_status); + } + } else if (sig == SIGSEGV || sig == SIGBUS || sig == SIGILL || + sig == SIGTRAP || sig == SIGFPE) { + os->print(", si_addr: " PTR_FORMAT, p2i(si->si_addr)); +#ifdef SIGPOLL + } else if (sig == SIGPOLL) { + os->print(", si_band: %ld", si->si_band); +#endif + } +} + +bool os::signal_thread(Thread* thread, int sig, const char* reason) { + OSThread* osthread = thread->osthread(); + if (osthread) { + int status = pthread_kill(osthread->pthread_id(), sig); + if (status == 0) { + Events::log(Thread::current(), "sent signal %d to Thread " INTPTR_FORMAT " because %s.", + sig, p2i(thread), reason); + return true; + } + } + return false; +} + +// Returns: +// NULL for an invalid signal number +// "SIG<num>" for a valid but unknown signal number +// signal name otherwise. +const char* os::exception_name(int sig, char* buf, size_t size) { + if (!is_valid_signal(sig)) { + return NULL; + } + const char* const name = get_signal_name(sig, buf, size); + if (strcmp(name, "UNKNOWN") == 0) { + jio_snprintf(buf, size, "SIG%d", sig); + } + return buf; +} + +int os::get_signal_number(const char* signal_name) { + char tmp[30]; + const char* s = signal_name; + if (s[0] != 'S' || s[1] != 'I' || s[2] != 'G') { + jio_snprintf(tmp, sizeof(tmp), "SIG%s", signal_name); + s = tmp; + } + for (int idx = 0; g_signal_info[idx].sig != -1; idx ++) { + if (strcmp(g_signal_info[idx].name, s) == 0) { + return g_signal_info[idx].sig; + } + } + return -1; +} + +void set_signal_handler(int sig, bool set_installed) { + // Check for overwrite. + struct sigaction oldAct; + sigaction(sig, (struct sigaction*)NULL, &oldAct); + + void* oldhand = oldAct.sa_sigaction + ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction) + : CAST_FROM_FN_PTR(void*, oldAct.sa_handler); + if (oldhand != CAST_FROM_FN_PTR(void*, SIG_DFL) && + oldhand != CAST_FROM_FN_PTR(void*, SIG_IGN) && + oldhand != CAST_FROM_FN_PTR(void*, (sa_sigaction_t)javaSignalHandler)) { + if (AllowUserSignalHandlers || !set_installed) { + // Do not overwrite; user takes responsibility to forward to us. + return; + } else if (UseSignalChaining) { + // save the old handler in jvm + save_preinstalled_handler(sig, oldAct); + // libjsig also interposes the sigaction() call below and saves the + // old sigaction on it own. + } else { + fatal("Encountered unexpected pre-existing sigaction handler " + "%#lx for signal %d.", (long)oldhand, sig); + } + } + + struct sigaction sigAct; + sigfillset(&(sigAct.sa_mask)); + sigAct.sa_handler = SIG_DFL; + if (!set_installed) { + sigAct.sa_flags = SA_SIGINFO|SA_RESTART; + } else { + sigAct.sa_sigaction = javaSignalHandler; + sigAct.sa_flags = SA_SIGINFO|SA_RESTART; + } +#if defined(__APPLE__) + // Needed for main thread as XNU (Mac OS X kernel) will only deliver SIGSEGV + // (which starts as SIGBUS) on main thread with faulting address inside "stack+guard pages" + // if the signal handler declares it will handle it on alternate stack. + // Notice we only declare we will handle it on alt stack, but we are not + // actually going to use real alt stack - this is just a workaround. + // Please see ux_exception.c, method catch_mach_exception_raise for details + // link http://www.opensource.apple.com/source/xnu/xnu-2050.18.24/bsd/uxkern/ux_exception.c + if (sig == SIGSEGV) { + sigAct.sa_flags |= SA_ONSTACK; + } +#endif + + // Save flags, which are set by ours + assert(sig > 0 && sig < NSIG, "vm signal out of expected range"); + sigflags[sig] = sigAct.sa_flags; + + int ret = sigaction(sig, &sigAct, &oldAct); + assert(ret == 0, "check"); + + void* oldhand2 = oldAct.sa_sigaction + ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction) + : CAST_FROM_FN_PTR(void*, oldAct.sa_handler); + assert(oldhand2 == oldhand, "no concurrent signal handler installation"); +} + +// install signal handlers for signals that HotSpot needs to +// handle in order to support Java-level exception handling. + +bool PosixSignals::are_signal_handlers_installed() { + return signal_handlers_are_installed; +} + +// install signal handlers for signals that HotSpot needs to +// handle in order to support Java-level exception handling. +void PosixSignals::install_signal_handlers() { + if (!signal_handlers_are_installed) { + signal_handlers_are_installed = true; + + // signal-chaining + typedef void (*signal_setting_t)(); + signal_setting_t begin_signal_setting = NULL; + signal_setting_t end_signal_setting = NULL; + begin_signal_setting = CAST_TO_FN_PTR(signal_setting_t, + dlsym(RTLD_DEFAULT, "JVM_begin_signal_setting")); + if (begin_signal_setting != NULL) { + end_signal_setting = CAST_TO_FN_PTR(signal_setting_t, + dlsym(RTLD_DEFAULT, "JVM_end_signal_setting")); + get_signal_action = CAST_TO_FN_PTR(get_signal_t, + dlsym(RTLD_DEFAULT, "JVM_get_signal_action")); + libjsig_is_loaded = true; + assert(UseSignalChaining, "should enable signal-chaining"); + } + if (libjsig_is_loaded) { + // Tell libjsig jvm is setting signal handlers + (*begin_signal_setting)(); + } + + set_signal_handler(SIGSEGV, true); + set_signal_handler(SIGPIPE, true); + set_signal_handler(SIGBUS, true); + set_signal_handler(SIGILL, true); + set_signal_handler(SIGFPE, true); +#if defined(PPC64) || defined(AIX) + set_signal_handler(SIGTRAP, true); +#endif + set_signal_handler(SIGXFSZ, true); + +#if defined(__APPLE__) + // In Mac OS X 10.4, CrashReporter will write a crash log for all 'fatal' signals, including + // signals caught and handled by the JVM. To work around this, we reset the mach task + // signal handler that's placed on our process by CrashReporter. This disables + // CrashReporter-based reporting. + // + // This work-around is not necessary for 10.5+, as CrashReporter no longer intercedes + // on caught fatal signals. + // + // Additionally, gdb installs both standard BSD signal handlers, and mach exception + // handlers. By replacing the existing task exception handler, we disable gdb's mach + // exception handling, while leaving the standard BSD signal handlers functional. + kern_return_t kr; + kr = task_set_exception_ports(mach_task_self(), + EXC_MASK_BAD_ACCESS | EXC_MASK_ARITHMETIC, + MACH_PORT_NULL, + EXCEPTION_STATE_IDENTITY, + MACHINE_THREAD_STATE); + + assert(kr == KERN_SUCCESS, "could not set mach task signal handler"); +#endif + + if (libjsig_is_loaded) { + // Tell libjsig jvm finishes setting signal handlers + (*end_signal_setting)(); + } + + // We don't activate signal checker if libjsig is in place, we trust ourselves + // and if UserSignalHandler is installed all bets are off. + // Log that signal checking is off only if -verbose:jni is specified. + if (CheckJNICalls) { + if (libjsig_is_loaded) { + log_debug(jni, resolve)("Info: libjsig is activated, all active signal checking is disabled"); + check_signals = false; + } + if (AllowUserSignalHandlers) { + log_debug(jni, resolve)("Info: AllowUserSignalHandlers is activated, all active signal checking is disabled"); + check_signals = false; + } + } + } +} + +// Returns one-line short description of a signal set in a user provided buffer. +static const char* describe_signal_set_short(const sigset_t* set, char* buffer, size_t buf_size) { + assert(buf_size == (NUM_IMPORTANT_SIGS + 1), "wrong buffer size"); + // Note: for shortness, just print out the first 32. That should + // cover most of the useful ones, apart from realtime signals. + for (int sig = 1; sig <= NUM_IMPORTANT_SIGS; sig++) { + const int rc = sigismember(set, sig); + if (rc == -1 && errno == EINVAL) { + buffer[sig-1] = '?'; + } else { + buffer[sig-1] = rc == 0 ? '0' : '1'; + } + } + buffer[NUM_IMPORTANT_SIGS] = 0; + return buffer; +} + +// Prints one-line description of a signal set. +static void print_signal_set_short(outputStream* st, const sigset_t* set) { + char buf[NUM_IMPORTANT_SIGS + 1]; + describe_signal_set_short(set, buf, sizeof(buf)); + st->print("%s", buf); +} + +void PosixSignals::print_signal_handler(outputStream* st, int sig, + char* buf, size_t buflen) { + struct sigaction sa; + sigaction(sig, NULL, &sa); + + // See comment for SIGNIFICANT_SIGNAL_MASK define + sa.sa_flags &= SIGNIFICANT_SIGNAL_MASK; + + st->print("%s: ", os::exception_name(sig, buf, buflen)); + + address handler = (sa.sa_flags & SA_SIGINFO) + ? CAST_FROM_FN_PTR(address, sa.sa_sigaction) + : CAST_FROM_FN_PTR(address, sa.sa_handler); + + if (handler == CAST_FROM_FN_PTR(address, SIG_DFL)) { + st->print("SIG_DFL"); + } else if (handler == CAST_FROM_FN_PTR(address, SIG_IGN)) { + st->print("SIG_IGN"); + } else { + st->print("[%s]", get_signal_handler_name(handler, buf, buflen)); + } + + st->print(", sa_mask[0]="); + print_signal_set_short(st, &sa.sa_mask); + + address rh = VMError::get_resetted_sighandler(sig); + // May be, handler was resetted by VMError? + if (rh != NULL) { + handler = rh; + sa.sa_flags = VMError::get_resetted_sigflags(sig) & SIGNIFICANT_SIGNAL_MASK; + } + + // Print textual representation of sa_flags. + st->print(", sa_flags="); + print_sa_flags(st, sa.sa_flags); + + // Check: is it our handler? + if (handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)javaSignalHandler) || + handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)SR_handler)) { + // It is our signal handler + // check for flags, reset system-used one! + if ((int)sa.sa_flags != get_our_sigflags(sig)) { + st->print( + ", flags was changed from " PTR32_FORMAT ", consider using jsig library", + get_our_sigflags(sig)); + } + } + st->cr(); +} + +bool PosixSignals::is_sig_ignored(int sig) { + struct sigaction oact; + sigaction(sig, (struct sigaction*)NULL, &oact); + void* ohlr = oact.sa_sigaction ? CAST_FROM_FN_PTR(void*, oact.sa_sigaction) + : CAST_FROM_FN_PTR(void*, oact.sa_handler); + if (ohlr == CAST_FROM_FN_PTR(void*, SIG_IGN)) { + return true; + } else { + return false; + } +} + +int PosixSignals::unblock_thread_signal_mask(const sigset_t *set) { + return pthread_sigmask(SIG_UNBLOCK, set, NULL); +} + +address PosixSignals::ucontext_get_pc(const ucontext_t* ctx) { +#if defined(AIX) + return os::Aix::ucontext_get_pc(ctx); +#elif defined(BSD) + return os::Bsd::ucontext_get_pc(ctx); +#elif defined(LINUX) + return os::Linux::ucontext_get_pc(ctx); +#else + VMError::report_and_die("unimplemented ucontext_get_pc"); +#endif +} + +void PosixSignals::ucontext_set_pc(ucontext_t* ctx, address pc) { +#if defined(AIX) + os::Aix::ucontext_set_pc(ctx, pc); +#elif defined(BSD) + os::Bsd::ucontext_set_pc(ctx, pc); +#elif defined(LINUX) + os::Linux::ucontext_set_pc(ctx, pc); +#else + VMError::report_and_die("unimplemented ucontext_set_pc"); +#endif +} + +void PosixSignals::signal_sets_init() { + sigemptyset(&preinstalled_sigs); + + // Should also have an assertion stating we are still single-threaded. + assert(!signal_sets_initialized, "Already initialized"); + // Fill in signals that are necessarily unblocked for all threads in + // the VM. Currently, we unblock the following signals: + // SHUTDOWN{1,2,3}_SIGNAL: for shutdown hooks support (unless over-ridden + // by -Xrs (=ReduceSignalUsage)); + // BREAK_SIGNAL which is unblocked only by the VM thread and blocked by all + // other threads. The "ReduceSignalUsage" boolean tells us not to alter + // the dispositions or masks wrt these signals. + // Programs embedding the VM that want to use the above signals for their + // own purposes must, at this time, use the "-Xrs" option to prevent + // interference with shutdown hooks and BREAK_SIGNAL thread dumping. + // (See bug 4345157, and other related bugs). + // In reality, though, unblocking these signals is really a nop, since + // these signals are not blocked by default. + sigemptyset(&unblocked_sigs); + sigaddset(&unblocked_sigs, SIGILL); + sigaddset(&unblocked_sigs, SIGSEGV); + sigaddset(&unblocked_sigs, SIGBUS); + sigaddset(&unblocked_sigs, SIGFPE); + #if defined(PPC64) || defined(AIX) + sigaddset(&unblocked_sigs, SIGTRAP); + #endif + sigaddset(&unblocked_sigs, SR_signum); + + if (!ReduceSignalUsage) { + if (!PosixSignals::is_sig_ignored(SHUTDOWN1_SIGNAL)) { + sigaddset(&unblocked_sigs, SHUTDOWN1_SIGNAL); + } + if (!PosixSignals::is_sig_ignored(SHUTDOWN2_SIGNAL)) { + sigaddset(&unblocked_sigs, SHUTDOWN2_SIGNAL); + } + if (!PosixSignals::is_sig_ignored(SHUTDOWN3_SIGNAL)) { + sigaddset(&unblocked_sigs, SHUTDOWN3_SIGNAL); + } + } + // Fill in signals that are blocked by all but the VM thread. + sigemptyset(&vm_sigs); + if (!ReduceSignalUsage) { + sigaddset(&vm_sigs, BREAK_SIGNAL); + } + debug_only(signal_sets_initialized = true); +} + +// These are signals that are unblocked while a thread is running Java. +// (For some reason, they get blocked by default.) +static sigset_t* unblocked_signals() { + assert(signal_sets_initialized, "Not initialized"); + return &unblocked_sigs; +} + +// These are the signals that are blocked while a (non-VM) thread is +// running Java. Only the VM thread handles these signals. +static sigset_t* vm_signals() { + assert(signal_sets_initialized, "Not initialized"); + return &vm_sigs; +} + +void PosixSignals::hotspot_sigmask(Thread* thread) { + + //Save caller's signal mask before setting VM signal mask + sigset_t caller_sigmask; + pthread_sigmask(SIG_BLOCK, NULL, &caller_sigmask); + + OSThread* osthread = thread->osthread(); + osthread->set_caller_sigmask(caller_sigmask); + + pthread_sigmask(SIG_UNBLOCK, unblocked_signals(), NULL); + + if (!ReduceSignalUsage) { + if (thread->is_VM_thread()) { + // Only the VM thread handles BREAK_SIGNAL ... + pthread_sigmask(SIG_UNBLOCK, vm_signals(), NULL); + } else { + // ... all other threads block BREAK_SIGNAL + pthread_sigmask(SIG_BLOCK, vm_signals(), NULL); + } + } +} + +//////////////////////////////////////////////////////////////////////////////// +// suspend/resume support + +// The low-level signal-based suspend/resume support is a remnant from the +// old VM-suspension that used to be for java-suspension, safepoints etc, +// within hotspot. Currently used by JFR's OSThreadSampler +// +// The remaining code is greatly simplified from the more general suspension +// code that used to be used. +// +// The protocol is quite simple: +// - suspend: +// - sends a signal to the target thread +// - polls the suspend state of the osthread using a yield loop +// - target thread signal handler (SR_handler) sets suspend state +// and blocks in sigsuspend until continued +// - resume: +// - sets target osthread state to continue +// - sends signal to end the sigsuspend loop in the SR_handler +// +// Note that the SR_lock plays no role in this suspend/resume protocol, +// but is checked for NULL in SR_handler as a thread termination indicator. +// The SR_lock is, however, used by JavaThread::java_suspend()/java_resume() APIs. +// +// Note that resume_clear_context() and suspend_save_context() are needed +// by SR_handler(), so that fetch_frame_from_context() works, +// which in part is used by: +// - Forte Analyzer: AsyncGetCallTrace() +// - StackBanging: get_frame_at_stack_banging_point() + +sigset_t SR_sigset; + +static void resume_clear_context(OSThread *osthread) { + osthread->set_ucontext(NULL); + osthread->set_siginfo(NULL); +} + +static void suspend_save_context(OSThread *osthread, siginfo_t* siginfo, ucontext_t* context) { + osthread->set_ucontext(context); + osthread->set_siginfo(siginfo); +} + +// Handler function invoked when a thread's execution is suspended or +// resumed. We have to be careful that only async-safe functions are +// called here (Note: most pthread functions are not async safe and +// should be avoided.) +// +// Note: sigwait() is a more natural fit than sigsuspend() from an +// interface point of view, but sigwait() prevents the signal handler +// from being run. libpthread would get very confused by not having +// its signal handlers run and prevents sigwait()'s use with the +// mutex granting signal. +// +// Currently only ever called on the VMThread and JavaThreads (PC sampling) +// +static void SR_handler(int sig, siginfo_t* siginfo, ucontext_t* context) { + // Save and restore errno to avoid confusing native code with EINTR + // after sigsuspend. + int old_errno = errno; + + Thread* thread = Thread::current_or_null_safe(); + assert(thread != NULL, "Missing current thread in SR_handler"); + + // On some systems we have seen signal delivery get "stuck" until the signal + // mask is changed as part of thread termination. Check that the current thread + // has not already terminated (via SR_lock()) - else the following assertion + // will fail because the thread is no longer a JavaThread as the ~JavaThread + // destructor has completed. + + if (thread->SR_lock() == NULL) { + return; + } + + assert(thread->is_VM_thread() || thread->is_Java_thread(), "Must be VMThread or JavaThread"); + + OSThread* osthread = thread->osthread(); + + os::SuspendResume::State current = osthread->sr.state(); + + if (current == os::SuspendResume::SR_SUSPEND_REQUEST) { + suspend_save_context(osthread, siginfo, context); + + // attempt to switch the state, we assume we had a SUSPEND_REQUEST + os::SuspendResume::State state = osthread->sr.suspended(); + if (state == os::SuspendResume::SR_SUSPENDED) { + sigset_t suspend_set; // signals for sigsuspend() + sigemptyset(&suspend_set); + + // get current set of blocked signals and unblock resume signal + pthread_sigmask(SIG_BLOCK, NULL, &suspend_set); + sigdelset(&suspend_set, SR_signum); + + sr_semaphore.signal(); + + // wait here until we are resumed + while (1) { + sigsuspend(&suspend_set); + + os::SuspendResume::State result = osthread->sr.running(); + if (result == os::SuspendResume::SR_RUNNING) { + // double check AIX doesn't need this! + sr_semaphore.signal(); + break; + } else if (result != os::SuspendResume::SR_SUSPENDED) { + ShouldNotReachHere(); + } + } + + } else if (state == os::SuspendResume::SR_RUNNING) { + // request was cancelled, continue + } else { + ShouldNotReachHere(); + } + + resume_clear_context(osthread); + } else if (current == os::SuspendResume::SR_RUNNING) { + // request was cancelled, continue + } else if (current == os::SuspendResume::SR_WAKEUP_REQUEST) { + // ignore + } else { + // ignore + } + + errno = old_errno; +} + +int PosixSignals::SR_initialize() { + struct sigaction act; + char *s; + // Get signal number to use for suspend/resume + if ((s = ::getenv("_JAVA_SR_SIGNUM")) != 0) { + int sig = ::strtol(s, 0, 10); + if (sig > MAX2(SIGSEGV, SIGBUS) && // See 4355769. + sig < NSIG) { // Must be legal signal and fit into sigflags[]. + SR_signum = sig; + } else { + warning("You set _JAVA_SR_SIGNUM=%d. It must be in range [%d, %d]. Using %d instead.", + sig, MAX2(SIGSEGV, SIGBUS)+1, NSIG-1, SR_signum); + } + } + + assert(SR_signum > SIGSEGV && SR_signum > SIGBUS, + "SR_signum must be greater than max(SIGSEGV, SIGBUS), see 4355769"); + + sigemptyset(&SR_sigset); + sigaddset(&SR_sigset, SR_signum); + + // Set up signal handler for suspend/resume + act.sa_flags = SA_RESTART|SA_SIGINFO; + act.sa_handler = (void (*)(int)) SR_handler; + + // SR_signum is blocked by default. + pthread_sigmask(SIG_BLOCK, NULL, &act.sa_mask); + + if (sigaction(SR_signum, &act, 0) == -1) { + return -1; + } + + // Save signal flag + set_our_sigflags(SR_signum, act.sa_flags); + return 0; +} + +static int sr_notify(OSThread* osthread) { + int status = pthread_kill(osthread->pthread_id(), SR_signum); + assert_status(status == 0, status, "pthread_kill"); + return status; +} + +// returns true on success and false on error - really an error is fatal +// but this seems the normal response to library errors +bool PosixSignals::do_suspend(OSThread* osthread) { + assert(osthread->sr.is_running(), "thread should be running"); + assert(!sr_semaphore.trywait(), "semaphore has invalid state"); + + // mark as suspended and send signal + if (osthread->sr.request_suspend() != os::SuspendResume::SR_SUSPEND_REQUEST) { + // failed to switch, state wasn't running? + ShouldNotReachHere(); + return false; + } + + if (sr_notify(osthread) != 0) { + ShouldNotReachHere(); + } + + // managed to send the signal and switch to SUSPEND_REQUEST, now wait for SUSPENDED + while (true) { + if (sr_semaphore.timedwait(2)) { + break; + } else { + // timeout + os::SuspendResume::State cancelled = osthread->sr.cancel_suspend(); + if (cancelled == os::SuspendResume::SR_RUNNING) { + return false; + } else if (cancelled == os::SuspendResume::SR_SUSPENDED) { + // make sure that we consume the signal on the semaphore as well + sr_semaphore.wait(); + break; + } else { + ShouldNotReachHere(); + return false; + } + } + } + + guarantee(osthread->sr.is_suspended(), "Must be suspended"); + return true; +} + +void PosixSignals::do_resume(OSThread* osthread) { + assert(osthread->sr.is_suspended(), "thread should be suspended"); + assert(!sr_semaphore.trywait(), "invalid semaphore state"); + + if (osthread->sr.request_wakeup() != os::SuspendResume::SR_WAKEUP_REQUEST) { + // failed to switch to WAKEUP_REQUEST + ShouldNotReachHere(); + return; + } + + while (true) { + if (sr_notify(osthread) == 0) { + if (sr_semaphore.timedwait(2)) { + if (osthread->sr.is_running()) { + return; + } + } + } else { + ShouldNotReachHere(); + } + } + + guarantee(osthread->sr.is_running(), "Must be running!"); +} diff --git a/src/hotspot/os/posix/signals_posix.hpp b/src/hotspot/os/posix/signals_posix.hpp new file mode 100644 index 00000000000..a2f7d955e14 --- /dev/null +++ b/src/hotspot/os/posix/signals_posix.hpp @@ -0,0 +1,69 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_POSIX_SIGNALS_POSIX_HPP +#define OS_POSIX_SIGNALS_POSIX_HPP + +#include "memory/allocation.hpp" +#include "utilities/globalDefinitions.hpp" + +#include <signal.h> + +// Signal number used to suspend/resume a thread +// do not use any signal number less than SIGSEGV, see 4355769 +static int SR_signum = SIGUSR2; + +class PosixSignals : public AllStatic { + +public: + + static bool are_signal_handlers_installed(); + static void install_signal_handlers(); + + static bool is_sig_ignored(int sig); + static void signal_sets_init(); + + // unblocks the signal masks for current thread + static int unblock_thread_signal_mask(const sigset_t *set); + static void hotspot_sigmask(Thread* thread); + + static void print_signal_handler(outputStream* st, int sig, char* buf, size_t buflen); + + static address ucontext_get_pc(const ucontext_t* ctx); + // Set PC into context. Needed for continuation after signal. + static void ucontext_set_pc(ucontext_t* ctx, address pc); + + // Suspend-resume + static int SR_initialize(); + static bool do_suspend(OSThread* osthread); + static void do_resume(OSThread* osthread); + + // For signal-chaining + static bool chained_handler(int sig, siginfo_t* siginfo, void* context); + + // sun.misc.Signal support + static void jdk_misc_signal_init(); +}; + +#endif // OS_POSIX_SIGNALS_POSIX_HPP diff --git a/src/hotspot/os/posix/vmError_posix.cpp b/src/hotspot/os/posix/vmError_posix.cpp index 52f1e424e4d..9c83d263e71 100644 --- a/src/hotspot/os/posix/vmError_posix.cpp +++ b/src/hotspot/os/posix/vmError_posix.cpp @@ -27,12 +27,12 @@ #include "runtime/arguments.hpp" #include "runtime/os.hpp" #include "runtime/thread.hpp" +#include "signals_posix.hpp" #include "utilities/debug.hpp" #include "utilities/vmError.hpp" #include <sys/types.h> #include <sys/wait.h> -#include <signal.h> #ifdef LINUX #include <sys/syscall.h> @@ -109,11 +109,11 @@ static void crash_handler(int sig, siginfo_t* info, void* ucVoid) { for (int i = 0; i < NUM_SIGNALS; i++) { sigaddset(&newset, SIGNALS[i]); } - os::Posix::unblock_thread_signal_mask(&newset); + PosixSignals::unblock_thread_signal_mask(&newset); // support safefetch faults in error handling ucontext_t* const uc = (ucontext_t*) ucVoid; - address pc = (uc != NULL) ? os::Posix::ucontext_get_pc(uc) : NULL; + address pc = (uc != NULL) ? PosixSignals::ucontext_get_pc(uc) : NULL; // Correct pc for SIGILL, SIGFPE (see JDK-8176872) if (sig == SIGILL || sig == SIGFPE) { @@ -122,7 +122,7 @@ static void crash_handler(int sig, siginfo_t* info, void* ucVoid) { // Needed to make it possible to call SafeFetch.. APIs in error handling. if (uc && pc && StubRoutines::is_safefetch_fault(pc)) { - os::Posix::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc)); + PosixSignals::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc)); return; } @@ -148,8 +148,7 @@ void VMError::reset_signal_handlers() { os::signal(SIGNALS[i], CAST_FROM_FN_PTR(void *, crash_handler)); sigaddset(&newset, SIGNALS[i]); } - os::Posix::unblock_thread_signal_mask(&newset); - + PosixSignals::unblock_thread_signal_mask(&newset); } // Write a hint to the stream in case siginfo relates to a segv/bus error @@ -170,4 +169,3 @@ void VMError::check_failing_cds_access(outputStream* st, const void* siginfo) { } #endif } - diff --git a/src/hotspot/os/windows/gc/z/zInitialize_windows.cpp b/src/hotspot/os/windows/gc/z/zInitialize_windows.cpp index c584f79fde4..06b15c7db41 100644 --- a/src/hotspot/os/windows/gc/z/zInitialize_windows.cpp +++ b/src/hotspot/os/windows/gc/z/zInitialize_windows.cpp @@ -25,6 +25,6 @@ #include "gc/z/zInitialize.hpp" #include "gc/z/zSyscall_windows.hpp" -void ZInitialize::initialize_os() { +void ZInitialize::pd_initialize() { ZSyscall::initialize(); } diff --git a/src/hotspot/os/windows/gc/z/zLargePages_windows.cpp b/src/hotspot/os/windows/gc/z/zLargePages_windows.cpp index 231c817952b..c687fab753f 100644 --- a/src/hotspot/os/windows/gc/z/zLargePages_windows.cpp +++ b/src/hotspot/os/windows/gc/z/zLargePages_windows.cpp @@ -24,6 +24,6 @@ #include "precompiled.hpp" #include "gc/z/zLargePages.hpp" -void ZLargePages::initialize_platform() { +void ZLargePages::pd_initialize() { _state = Disabled; } diff --git a/src/hotspot/os/windows/gc/z/zNUMA_windows.cpp b/src/hotspot/os/windows/gc/z/zNUMA_windows.cpp index 966ef9b997f..a0fe34c6504 100644 --- a/src/hotspot/os/windows/gc/z/zNUMA_windows.cpp +++ b/src/hotspot/os/windows/gc/z/zNUMA_windows.cpp @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "gc/z/zNUMA.hpp" -void ZNUMA::initialize_platform() { +void ZNUMA::pd_initialize() { _enabled = false; } diff --git a/src/hotspot/os/windows/gc/z/zVirtualMemory_windows.cpp b/src/hotspot/os/windows/gc/z/zVirtualMemory_windows.cpp index e54c2ce5373..d40e9904a39 100644 --- a/src/hotspot/os/windows/gc/z/zVirtualMemory_windows.cpp +++ b/src/hotspot/os/windows/gc/z/zVirtualMemory_windows.cpp @@ -87,7 +87,7 @@ static void grow_from_back_callback(const ZMemory* area, size_t size) { coalesce_into_one_placeholder(area->start(), area->size() + size); } -void ZVirtualMemoryManager::initialize_os() { +void ZVirtualMemoryManager::pd_initialize() { // Each reserved virtual memory address area registered in _manager is // exactly covered by a single placeholder. Callbacks are installed so // that whenever a memory area changes, the corresponding placeholder @@ -116,34 +116,13 @@ void ZVirtualMemoryManager::initialize_os() { _manager.register_callbacks(callbacks); } -bool ZVirtualMemoryManager::reserve_contiguous_platform(uintptr_t start, size_t size) { - assert(is_aligned(size, ZGranuleSize), "Must be granule aligned"); - - // Reserve address views - const uintptr_t marked0 = ZAddress::marked0(start); - const uintptr_t marked1 = ZAddress::marked1(start); - const uintptr_t remapped = ZAddress::remapped(start); +bool ZVirtualMemoryManager::pd_reserve(uintptr_t addr, size_t size) { + uintptr_t res = ZMapper::reserve(addr, size); - // Reserve address space - if (ZMapper::reserve(marked0, size) != marked0) { - return false; - } - - if (ZMapper::reserve(marked1, size) != marked1) { - ZMapper::unreserve(marked0, size); - return false; - } - - if (ZMapper::reserve(remapped, size) != remapped) { - ZMapper::unreserve(marked0, size); - ZMapper::unreserve(marked1, size); - return false; - } - - // Register address views with native memory tracker - nmt_reserve(marked0, size); - nmt_reserve(marked1, size); - nmt_reserve(remapped, size); + assert(res == addr || res == NULL, "Should not reserve other memory than requested"); + return res == addr; +} - return true; +void ZVirtualMemoryManager::pd_unreserve(uintptr_t addr, size_t size) { + ZMapper::unreserve(addr, size); } diff --git a/src/hotspot/os/windows/os_windows.cpp b/src/hotspot/os/windows/os_windows.cpp index e687521022e..96be67a2a16 100644 --- a/src/hotspot/os/windows/os_windows.cpp +++ b/src/hotspot/os/windows/os_windows.cpp @@ -32,6 +32,7 @@ #include "classfile/vmSymbols.hpp" #include "code/codeCache.hpp" #include "code/icBuffer.hpp" +#include "code/nativeInst.hpp" #include "code/vtableStubs.hpp" #include "compiler/compileBroker.hpp" #include "compiler/disassembler.hpp" @@ -48,6 +49,7 @@ #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" #include "runtime/globals.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/interfaceSupport.inline.hpp" #include "runtime/java.hpp" #include "runtime/javaCalls.hpp" @@ -118,13 +120,18 @@ static FILETIME process_exit_time; static FILETIME process_user_time; static FILETIME process_kernel_time; -#ifdef _M_AMD64 +#if defined(_M_ARM64) + #define __CPU__ aarch64 +#elif defined(_M_AMD64) #define __CPU__ amd64 #else #define __CPU__ i486 #endif -#if INCLUDE_AOT +#if defined(USE_VECTORED_EXCEPTION_HANDLING) +PVOID topLevelVectoredExceptionHandler = NULL; +LPTOP_LEVEL_EXCEPTION_FILTER previousUnhandledExceptionFilter = NULL; +#elif INCLUDE_AOT PVOID topLevelVectoredExceptionHandler = NULL; LONG WINAPI topLevelVectoredExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo); #endif @@ -147,7 +154,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) { if (ForceTimeHighResolution) { timeEndPeriod(1L); } -#if INCLUDE_AOT +#if defined(USE_VECTORED_EXCEPTION_HANDLING) || INCLUDE_AOT if (topLevelVectoredExceptionHandler != NULL) { RemoveVectoredExceptionHandler(topLevelVectoredExceptionHandler); topLevelVectoredExceptionHandler = NULL; @@ -456,6 +463,12 @@ static unsigned __stdcall thread_native_entry(Thread* thread) { log_info(os, thread)("Thread is alive (tid: " UINTX_FORMAT ").", os::current_thread_id()); +#ifdef USE_VECTORED_EXCEPTION_HANDLING + // Any exception is caught by the Vectored Exception Handler, so VM can + // generate error dump when an exception occurred in non-Java thread + // (e.g. VM thread). + thread->call_run(); +#else // Install a win32 structured exception handler around every thread created // by VM, so VM can generate error dump when an exception occurred in non- // Java thread (e.g. VM thread). @@ -465,6 +478,7 @@ static unsigned __stdcall thread_native_entry(Thread* thread) { (_EXCEPTION_POINTERS*)_exception_info())) { // Nothing to do. } +#endif // Note: at this point the thread object may already have deleted itself. // Do not dereference it from here on out. @@ -1427,15 +1441,18 @@ void * os::dll_load(const char *name, char *ebuf, int ebuflen) { static const arch_t arch_array[] = { {IMAGE_FILE_MACHINE_I386, (char*)"IA 32"}, - {IMAGE_FILE_MACHINE_AMD64, (char*)"AMD 64"} + {IMAGE_FILE_MACHINE_AMD64, (char*)"AMD 64"}, + {IMAGE_FILE_MACHINE_ARM64, (char*)"ARM 64"} }; -#if (defined _M_AMD64) +#if (defined _M_ARM64) + static const uint16_t running_arch = IMAGE_FILE_MACHINE_ARM64; +#elif (defined _M_AMD64) static const uint16_t running_arch = IMAGE_FILE_MACHINE_AMD64; #elif (defined _M_IX86) static const uint16_t running_arch = IMAGE_FILE_MACHINE_I386; #else #error Method os::dll_load requires that one of following \ - is defined :_M_AMD64 or _M_IX86 + is defined :_M_AMD64 or _M_IX86 or _M_ARM64 #endif @@ -1730,7 +1747,8 @@ void os::win32::print_windows_version(outputStream* st) { SYSTEM_INFO si; ZeroMemory(&si, sizeof(SYSTEM_INFO)); GetNativeSystemInfo(&si); - if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) { + if ((si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) || + (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_ARM64)) { st->print(" , 64 bit"); } @@ -2138,7 +2156,14 @@ LONG Handle_Exception(struct _EXCEPTION_POINTERS* exceptionInfo, address handler) { Thread* thread = Thread::current_or_null(); // Save pc in thread -#ifdef _M_AMD64 +#if defined(_M_ARM64) + // Do not blow up if no thread info available. + if (thread) { + thread->as_Java_thread()->set_saved_exception_pc((address)(DWORD_PTR)exceptionInfo->ContextRecord->Pc); + } + // Set pc to handler + exceptionInfo->ContextRecord->Pc = (DWORD64)handler; +#elif defined(_M_AMD64) // Do not blow up if no thread info available. if (thread != NULL) { thread->as_Java_thread()->set_saved_exception_pc((address)(DWORD_PTR)exceptionInfo->ContextRecord->Rip); @@ -2236,7 +2261,17 @@ const char* os::exception_name(int exception_code, char *buf, size_t size) { LONG Handle_IDiv_Exception(struct _EXCEPTION_POINTERS* exceptionInfo) { // handle exception caused by idiv; should only happen for -MinInt/-1 // (division by zero is handled explicitly) -#ifdef _M_AMD64 +#if defined(_M_ARM64) + PCONTEXT ctx = exceptionInfo->ContextRecord; + address pc = (address)ctx->Sp; + assert(pc[0] == 0x83, "not an sdiv opcode"); //Fixme did i get the right opcode? + assert(ctx->X4 == min_jint, "unexpected idiv exception"); + // set correct result values and continue after idiv instruction + ctx->Pc = (uint64_t)pc + 4; // idiv reg, reg, reg is 4 bytes + ctx->X4 = (uint64_t)min_jint; // result + ctx->X5 = (uint64_t)0; // remainder + // Continue the execution +#elif defined(_M_AMD64) PCONTEXT ctx = exceptionInfo->ContextRecord; address pc = (address)ctx->Rip; assert(pc[0] >= Assembler::REX && pc[0] <= Assembler::REX_WRXB && pc[1] == 0xF7 || pc[0] == 0xF7, "not an idiv opcode"); @@ -2267,6 +2302,7 @@ LONG Handle_IDiv_Exception(struct _EXCEPTION_POINTERS* exceptionInfo) { return EXCEPTION_CONTINUE_EXECUTION; } +#if defined(_M_AMD64) || defined(_M_IX86) //----------------------------------------------------------------------------- LONG WINAPI Handle_FLT_Exception(struct _EXCEPTION_POINTERS* exceptionInfo) { PCONTEXT ctx = exceptionInfo->ContextRecord; @@ -2312,6 +2348,7 @@ LONG WINAPI Handle_FLT_Exception(struct _EXCEPTION_POINTERS* exceptionInfo) { return EXCEPTION_CONTINUE_SEARCH; } +#endif static inline void report_error(Thread* t, DWORD exception_code, address addr, void* siginfo, void* context) { @@ -2321,66 +2358,14 @@ static inline void report_error(Thread* t, DWORD exception_code, // somewhere where we can find it in the minidump. } -bool os::win32::get_frame_at_stack_banging_point(JavaThread* thread, - struct _EXCEPTION_POINTERS* exceptionInfo, address pc, frame* fr) { - PEXCEPTION_RECORD exceptionRecord = exceptionInfo->ExceptionRecord; - address addr = (address) exceptionRecord->ExceptionInformation[1]; - if (Interpreter::contains(pc)) { - *fr = os::fetch_frame_from_context((void*)exceptionInfo->ContextRecord); - if (!fr->is_first_java_frame()) { - // get_frame_at_stack_banging_point() is only called when we - // have well defined stacks so java_sender() calls do not need - // to assert safe_for_sender() first. - *fr = fr->java_sender(); - } - } else { - // more complex code with compiled code - assert(!Interpreter::contains(pc), "Interpreted methods should have been handled above"); - CodeBlob* cb = CodeCache::find_blob(pc); - if (cb == NULL || !cb->is_nmethod() || cb->is_frame_complete_at(pc)) { - // Not sure where the pc points to, fallback to default - // stack overflow handling - return false; - } else { - *fr = os::fetch_frame_from_context((void*)exceptionInfo->ContextRecord); - // in compiled code, the stack banging is performed just after the return pc - // has been pushed on the stack - *fr = frame(fr->sp() + 1, fr->fp(), (address)*(fr->sp())); - if (!fr->is_java_frame()) { - // See java_sender() comment above. - *fr = fr->java_sender(); - } - } - } - assert(fr->is_java_frame(), "Safety check"); - return true; -} - -#if INCLUDE_AOT -LONG WINAPI topLevelVectoredExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) { - PEXCEPTION_RECORD exceptionRecord = exceptionInfo->ExceptionRecord; - address addr = (address) exceptionRecord->ExceptionInformation[1]; - address pc = (address) exceptionInfo->ContextRecord->Rip; - - // Handle the case where we get an implicit exception in AOT generated - // code. AOT DLL's loaded are not registered for structured exceptions. - // If the exception occurred in the codeCache or AOT code, pass control - // to our normal exception handler. - CodeBlob* cb = CodeCache::find_blob(pc); - if (cb != NULL) { - return topLevelExceptionFilter(exceptionInfo); - } - - return EXCEPTION_CONTINUE_SEARCH; -} -#endif - //----------------------------------------------------------------------------- LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) { if (InterceptOSException) return EXCEPTION_CONTINUE_SEARCH; PEXCEPTION_RECORD exception_record = exceptionInfo->ExceptionRecord; DWORD exception_code = exception_record->ExceptionCode; -#ifdef _M_AMD64 +#if defined(_M_ARM64) + address pc = (address) exceptionInfo->ContextRecord->Pc; +#elif defined(_M_AMD64) address pc = (address) exceptionInfo->ContextRecord->Rip; #else address pc = (address) exceptionInfo->ContextRecord->Eip; @@ -2463,18 +2448,22 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) { // Last unguard failed or not unguarding tty->print_raw_cr("Execution protection violation"); +#if !defined(USE_VECTORED_EXCEPTION_HANDLING) report_error(t, exception_code, addr, exception_record, exceptionInfo->ContextRecord); +#endif return EXCEPTION_CONTINUE_SEARCH; } } #endif // _WIN64 +#if defined(_M_AMD64) || defined(_M_IX86) if ((exception_code == EXCEPTION_ACCESS_VIOLATION) && VM_Version::is_cpuinfo_segv_addr(pc)) { // Verify that OS save/restore AVX registers. return Handle_Exception(exceptionInfo, VM_Version::cpuinfo_cont_addr()); } +#endif if (t != NULL && t->is_Java_thread()) { JavaThread* thread = t->as_Java_thread(); @@ -2505,8 +2494,10 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) { // Fatal red zone violation. thread->disable_stack_red_zone(); tty->print_raw_cr("An unrecoverable stack overflow has occurred."); +#if !defined(USE_VECTORED_EXCEPTION_HANDLING) report_error(t, exception_code, pc, exception_record, exceptionInfo->ContextRecord); +#endif return EXCEPTION_CONTINUE_SEARCH; } } else if (exception_code == EXCEPTION_ACCESS_VIOLATION) { @@ -2562,8 +2553,10 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) { #endif // Stack overflow or null pointer exception in native code. +#if !defined(USE_VECTORED_EXCEPTION_HANDLING) report_error(t, exception_code, pc, exception_record, exceptionInfo->ContextRecord); +#endif return EXCEPTION_CONTINUE_SEARCH; } // /EXCEPTION_ACCESS_VIOLATION // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2586,6 +2579,19 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) { } } +#ifdef _M_ARM64 + if (in_java && + (exception_code == EXCEPTION_ILLEGAL_INSTRUCTION || + exception_code == EXCEPTION_ILLEGAL_INSTRUCTION_2)) { + if (nativeInstruction_at(pc)->is_sigill_zombie_not_entrant()) { + if (TraceTraps) { + tty->print_cr("trap: zombie_not_entrant"); + } + return Handle_Exception(exceptionInfo, SharedRuntime::get_handle_wrong_method_stub()); + } + } +#endif + if (in_java) { switch (exception_code) { case EXCEPTION_INT_DIVIDE_BY_ZERO: @@ -2596,18 +2602,74 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) { } // switch } + +#if defined(_M_AMD64) || defined(_M_IX86) if ((in_java || in_native) && exception_code != EXCEPTION_UNCAUGHT_CXX_EXCEPTION) { LONG result=Handle_FLT_Exception(exceptionInfo); if (result==EXCEPTION_CONTINUE_EXECUTION) return result; } +#endif } +#if !defined(USE_VECTORED_EXCEPTION_HANDLING) if (exception_code != EXCEPTION_BREAKPOINT) { report_error(t, exception_code, pc, exception_record, exceptionInfo->ContextRecord); } +#endif + return EXCEPTION_CONTINUE_SEARCH; +} + +#if defined(USE_VECTORED_EXCEPTION_HANDLING) || INCLUDE_AOT +LONG WINAPI topLevelVectoredExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) { + PEXCEPTION_RECORD exceptionRecord = exceptionInfo->ExceptionRecord; +#if defined(_M_ARM64) + address pc = (address) exceptionInfo->ContextRecord->Pc; +#elif defined(_M_AMD64) + address pc = (address) exceptionInfo->ContextRecord->Rip; +#else + address pc = (address) exceptionInfo->ContextRecord->Eip; +#endif + + // Fast path for code part of the code cache + if (CodeCache::low_bound() <= pc && pc < CodeCache::high_bound()) { + return topLevelExceptionFilter(exceptionInfo); + } + + // Handle the case where we get an implicit exception in AOT generated + // code. AOT DLL's loaded are not registered for structured exceptions. + // If the exception occurred in the codeCache or AOT code, pass control + // to our normal exception handler. + CodeBlob* cb = CodeCache::find_blob(pc); + if (cb != NULL) { + return topLevelExceptionFilter(exceptionInfo); + } + return EXCEPTION_CONTINUE_SEARCH; } +#endif + +#if defined(USE_VECTORED_EXCEPTION_HANDLING) +LONG WINAPI topLevelUnhandledExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) { + if (InterceptOSException) goto exit; + DWORD exception_code = exceptionInfo->ExceptionRecord->ExceptionCode; +#if defined(_M_ARM64) + address pc = (address)exceptionInfo->ContextRecord->Pc; +#elif defined(_M_AMD64) + address pc = (address) exceptionInfo->ContextRecord->Rip; +#else + address pc = (address) exceptionInfo->ContextRecord->Eip; +#endif + Thread* t = Thread::current_or_null_safe(); + + if (exception_code != EXCEPTION_BREAKPOINT) { + report_error(t, exception_code, pc, exceptionInfo->ExceptionRecord, + exceptionInfo->ContextRecord); + } +exit: + return previousUnhandledExceptionFilter ? previousUnhandledExceptionFilter(exceptionInfo) : EXCEPTION_CONTINUE_SEARCH; +} +#endif #ifndef _WIN64 // Special care for fast JNI accessors. @@ -3062,8 +3124,8 @@ void os::split_reserved_memory(char *base, size_t size, size_t split) { assert(is_aligned(split_address, os::vm_allocation_granularity()), "Sanity"); release_memory(base, size); - reserve_memory(split, base); - reserve_memory(size - split, split_address); + attempt_reserve_memory_at(base, split); + attempt_reserve_memory_at(split_address, size - split); // NMT: nothing to do here. Since Windows implements the split by // releasing and re-reserving memory, the parts are already registered @@ -3085,7 +3147,7 @@ char* os::reserve_memory_aligned(size_t size, size_t alignment, int file_desc) { char* aligned_base = NULL; do { - char* extra_base = os::reserve_memory(extra_size, NULL, alignment, file_desc); + char* extra_base = os::reserve_memory_with_fd(extra_size, file_desc); if (extra_base == NULL) { return NULL; } @@ -3098,14 +3160,20 @@ char* os::reserve_memory_aligned(size_t size, size_t alignment, int file_desc) { os::release_memory(extra_base, extra_size); } - aligned_base = os::reserve_memory(size, aligned_base, 0, file_desc); + aligned_base = os::attempt_reserve_memory_at(aligned_base, size, file_desc); } while (aligned_base == NULL); return aligned_base; } -char* os::pd_reserve_memory(size_t bytes, char* addr, size_t alignment_hint) { +char* os::pd_reserve_memory(size_t bytes) { + return pd_attempt_reserve_memory_at(NULL /* addr */, bytes); +} + +// Reserve memory at an arbitrary address, only if that area is +// available (and not reserved for something else). +char* os::pd_attempt_reserve_memory_at(char* addr, size_t bytes) { assert((size_t)addr % os::vm_allocation_granularity() == 0, "reserve alignment"); assert(bytes % os::vm_page_size() == 0, "reserve page size"); @@ -3136,15 +3204,7 @@ char* os::pd_reserve_memory(size_t bytes, char* addr, size_t alignment_hint) { return res; } -// Reserve memory at an arbitrary address, only if that area is -// available (and not reserved for something else). -char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr) { - // Windows os::reserve_memory() fails of the requested address range is - // not avilable. - return reserve_memory(bytes, requested_addr); -} - -char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr, int file_desc) { +char* os::pd_attempt_reserve_memory_at(char* requested_addr, size_t bytes, int file_desc) { assert(file_desc >= 0, "file_desc is not valid"); return map_memory_to_file(requested_addr, bytes, file_desc); } @@ -3456,7 +3516,12 @@ char* os::non_memory_address_word() { // Must never look like an address returned by reserve_memory, // even in its subfields (as defined by the CPU immediate fields, // if the CPU splits constants across multiple instructions). +#ifdef _M_ARM64 + // AArch64 has a maximum addressable space of 48-bits + return (char*)((1ull << 48) - 1); +#else return (char*)-1; +#endif } #define MAX_ERROR_COUNT 100 @@ -3980,7 +4045,10 @@ jint os::init_2(void) { // Setup Windows Exceptions -#if INCLUDE_AOT +#if defined(USE_VECTORED_EXCEPTION_HANDLING) + topLevelVectoredExceptionHandler = AddVectoredExceptionHandler(1, topLevelVectoredExceptionFilter); + previousUnhandledExceptionFilter = SetUnhandledExceptionFilter(topLevelUnhandledExceptionFilter); +#elif INCLUDE_AOT // If AOT is enabled we need to install a vectored exception handler // in order to forward implicit exceptions from code in AOT // generated DLLs. This is necessary since these DLLs are not @@ -4826,15 +4894,25 @@ static int stdinAvailable(int fd, long *pbytes) { char* os::pd_map_memory(int fd, const char* file_name, size_t file_offset, char *addr, size_t bytes, bool read_only, bool allow_exec) { + + errno_t err; + wchar_t* wide_path = wide_abs_unc_path(file_name, err); + + if (wide_path == NULL) { + return NULL; + } + HANDLE hFile; char* base; - hFile = CreateFile(file_name, GENERIC_READ, FILE_SHARE_READ, NULL, + hFile = CreateFileW(wide_path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { - log_info(os)("CreateFile() failed: GetLastError->%ld.", GetLastError()); + log_info(os)("CreateFileW() failed: GetLastError->%ld.", GetLastError()); + os::free(wide_path); return NULL; } + os::free(wide_path); if (allow_exec) { // CreateFileMapping/MapViewOfFileEx can't map executable memory @@ -4988,9 +5066,10 @@ void os::pause() { Thread* os::ThreadCrashProtection::_protected_thread = NULL; os::ThreadCrashProtection* os::ThreadCrashProtection::_crash_protection = NULL; -volatile intptr_t os::ThreadCrashProtection::_crash_mux = 0; os::ThreadCrashProtection::ThreadCrashProtection() { + _protected_thread = Thread::current(); + assert(_protected_thread->is_JfrSampler_thread(), "should be JFRSampler"); } // See the caveats for this class in os_windows.hpp @@ -5000,12 +5079,6 @@ os::ThreadCrashProtection::ThreadCrashProtection() { // The callback is supposed to provide the method that should be protected. // bool os::ThreadCrashProtection::call(os::CrashProtectionCallback& cb) { - - Thread::muxAcquire(&_crash_mux, "CrashProtection"); - - _protected_thread = Thread::current_or_null(); - assert(_protected_thread != NULL, "Cannot crash protect a NULL thread"); - bool success = true; __try { _crash_protection = this; @@ -5016,7 +5089,6 @@ bool os::ThreadCrashProtection::call(os::CrashProtectionCallback& cb) { } _crash_protection = NULL; _protected_thread = NULL; - Thread::muxRelease(&_crash_mux); return success; } @@ -5437,7 +5509,7 @@ int os::raw_send(int fd, char* buf, size_t nBytes, uint flags) { // WINDOWS CONTEXT Flags for THREAD_SAMPLING #if defined(IA32) #define sampling_context_flags (CONTEXT_FULL | CONTEXT_FLOATING_POINT | CONTEXT_EXTENDED_REGISTERS) -#elif defined (AMD64) +#elif defined(AMD64) || defined(_M_ARM64) #define sampling_context_flags (CONTEXT_FULL | CONTEXT_FLOATING_POINT) #endif diff --git a/src/hotspot/os/windows/os_windows.hpp b/src/hotspot/os/windows/os_windows.hpp index e09e2ca2b59..0227ef3123f 100644 --- a/src/hotspot/os/windows/os_windows.hpp +++ b/src/hotspot/os/windows/os_windows.hpp @@ -128,7 +128,7 @@ class win32 { }; /* - * Crash protection for the watcher thread. Wrap the callback + * Crash protection for the JfrSampler thread. Wrap the callback * with a __try { call() } * To be able to use this - don't take locks, don't rely on destructors, * don't make OS library calls, don't allocate memory, don't print, @@ -146,7 +146,6 @@ class ThreadCrashProtection : public StackObj { private: static Thread* _protected_thread; static ThreadCrashProtection* _crash_protection; - static volatile intptr_t _crash_mux; }; class PlatformEvent : public CHeapObj<mtSynchronizer> { diff --git a/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp b/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp index f22a7390d28..ef6560797f6 100644 --- a/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp +++ b/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp @@ -51,6 +51,7 @@ #include "runtime/stubRoutines.hpp" #include "runtime/thread.inline.hpp" #include "runtime/timer.hpp" +#include "signals_posix.hpp" #include "utilities/events.hpp" #include "utilities/vmError.hpp" #ifdef COMPILER1 @@ -215,7 +216,7 @@ JVM_handle_aix_signal(int sig, siginfo_t* info, void* ucVoid, int abort_if_unrec // that do not require siginfo/ucontext first. if (sig == SIGPIPE) { - if (os::Aix::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return 1; } else { // Ignoring SIGPIPE - see bugs 4229104 @@ -225,7 +226,7 @@ JVM_handle_aix_signal(int sig, siginfo_t* info, void* ucVoid, int abort_if_unrec JavaThread* thread = NULL; VMThread* vmthread = NULL; - if (os::Aix::signal_handlers_are_installed) { + if (PosixSignals::are_signal_handlers_installed()) { if (t != NULL) { if(t->is_Java_thread()) { thread = t->as_Java_thread(); @@ -527,7 +528,7 @@ JVM_handle_aix_signal(int sig, siginfo_t* info, void* ucVoid, int abort_if_unrec run_chained_handler: // signal-chaining - if (os::Aix::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return 1; } if (!abort_if_unrecognized) { diff --git a/src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.hpp b/src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.hpp index fe7d64cad50..18056cf5eeb 100644 --- a/src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.hpp +++ b/src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -35,16 +35,6 @@ frame pd_last_frame(); public: - void set_base_of_stack_pointer(intptr_t* base_sp) {} - intptr_t* base_of_stack_pointer() { return NULL; } - void record_base_of_stack_pointer() {} - - // These routines are only used on cpu architectures that - // have separate register stacks (Itanium). - static bool register_stack_overflow() { return false; } - static void enable_register_stack_guard() {} - static void disable_register_stack_guard() {} - bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava); diff --git a/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp b/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp index c2437d56350..6c10470bb5d 100644 --- a/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp +++ b/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp @@ -49,6 +49,7 @@ #include "runtime/stubRoutines.hpp" #include "runtime/thread.inline.hpp" #include "runtime/timer.hpp" +#include "signals_posix.hpp" #include "utilities/align.hpp" #include "utilities/events.hpp" #include "utilities/vmError.hpp" @@ -444,7 +445,7 @@ JVM_handle_bsd_signal(int sig, if (sig == SIGPIPE || sig == SIGXFSZ) { // allow chained handler to go first - if (os::Bsd::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } else { // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219 @@ -454,7 +455,7 @@ JVM_handle_bsd_signal(int sig, JavaThread* thread = NULL; VMThread* vmthread = NULL; - if (os::Bsd::signal_handlers_are_installed) { + if (PosixSignals::are_signal_handlers_installed()) { if (t != NULL ){ if(t->is_Java_thread()) { thread = t->as_Java_thread(); @@ -739,7 +740,7 @@ JVM_handle_bsd_signal(int sig, } // signal-chaining - if (os::Bsd::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } @@ -791,7 +792,7 @@ bool os::is_allocatable(size_t bytes) { return true; } - char* addr = reserve_memory(bytes, NULL); + char* addr = reserve_memory(bytes); if (addr != NULL) { release_memory(addr, bytes); diff --git a/src/hotspot/os_cpu/bsd_x86/thread_bsd_x86.hpp b/src/hotspot/os_cpu/bsd_x86/thread_bsd_x86.hpp index 66db2e79c47..6f4e42e14ff 100644 --- a/src/hotspot/os_cpu/bsd_x86/thread_bsd_x86.hpp +++ b/src/hotspot/os_cpu/bsd_x86/thread_bsd_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -33,23 +33,10 @@ frame pd_last_frame(); public: - // Mutators are highly dangerous.... - intptr_t* last_Java_fp() { return _anchor.last_Java_fp(); } - void set_last_Java_fp(intptr_t* fp) { _anchor.set_last_Java_fp(fp); } - - void set_base_of_stack_pointer(intptr_t* base_sp) { - } - static ByteSize last_Java_fp_offset() { return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset(); } - intptr_t* base_of_stack_pointer() { - return NULL; - } - void record_base_of_stack_pointer() { - } - bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava); @@ -58,12 +45,5 @@ private: bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava); -public: - - // These routines are only used on cpu architectures that - // have separate register stacks (Itanium). - static bool register_stack_overflow() { return false; } - static void enable_register_stack_guard() {} - static void disable_register_stack_guard() {} #endif // OS_CPU_BSD_X86_THREAD_BSD_X86_HPP diff --git a/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp b/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp index 890385e8f17..1c6f2155ef8 100644 --- a/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp +++ b/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp @@ -26,6 +26,7 @@ #ifndef OS_CPU_BSD_ZERO_ATOMIC_BSD_ZERO_HPP #define OS_CPU_BSD_ZERO_ATOMIC_BSD_ZERO_HPP +#include "orderAccess_bsd_zero.hpp" #include "runtime/os.hpp" // Implementation of class atomic @@ -218,8 +219,9 @@ inline T Atomic::PlatformXchg<4>::operator()(T volatile* dest, // All atomic operations are expected to be full memory barriers // (see atomic.hpp). However, __sync_lock_test_and_set is not // a full memory barrier, but an acquire barrier. Hence, this added - // barrier. - __sync_synchronize(); + // barrier. Some platforms (notably ARM) have peculiarities with + // their barrier implementations, delegate it to OrderAccess. + OrderAccess::fence(); return result; #endif // M68K #endif // ARM @@ -232,7 +234,7 @@ inline T Atomic::PlatformXchg<8>::operator()(T volatile* dest, atomic_memory_order order) const { STATIC_ASSERT(8 == sizeof(T)); T result = __sync_lock_test_and_set (dest, exchange_value); - __sync_synchronize(); + OrderAccess::fence(); return result; } diff --git a/src/hotspot/os_cpu/bsd_zero/orderAccess_bsd_zero.hpp b/src/hotspot/os_cpu/bsd_zero/orderAccess_bsd_zero.hpp index 6130c42255a..c168e28b654 100644 --- a/src/hotspot/os_cpu/bsd_zero/orderAccess_bsd_zero.hpp +++ b/src/hotspot/os_cpu/bsd_zero/orderAccess_bsd_zero.hpp @@ -28,7 +28,7 @@ // Included in orderAccess.hpp header file. -#ifdef ARM +#if defined(ARM) // ---------------------------------------------------- /* * ARM Kernel helper for memory barrier. @@ -39,14 +39,10 @@ typedef void (__kernel_dmb_t) (void); #define __kernel_dmb (*(__kernel_dmb_t *) 0xffff0fa0) -#define FULL_MEM_BARRIER __kernel_dmb() #define LIGHT_MEM_BARRIER __kernel_dmb() +#define FULL_MEM_BARRIER __kernel_dmb() -#else // ARM - -#define FULL_MEM_BARRIER __sync_synchronize() - -#ifdef PPC +#elif defined(PPC) // ---------------------------------------------------- #ifdef __NO_LWSYNC__ #define LIGHT_MEM_BARRIER __asm __volatile ("sync":::"memory") @@ -54,13 +50,21 @@ typedef void (__kernel_dmb_t) (void); #define LIGHT_MEM_BARRIER __asm __volatile ("lwsync":::"memory") #endif -#else // PPC +#define FULL_MEM_BARRIER __sync_synchronize() + +#elif defined(X86) // ---------------------------------------------------- #define LIGHT_MEM_BARRIER __asm __volatile ("":::"memory") +#define FULL_MEM_BARRIER __sync_synchronize() + +#else // ---------------------------------------------------- + +// Default to strongest barriers for correctness. -#endif // PPC +#define LIGHT_MEM_BARRIER __sync_synchronize() +#define FULL_MEM_BARRIER __sync_synchronize() -#endif // ARM +#endif // ---------------------------------------------------- // Note: What is meant by LIGHT_MEM_BARRIER is a barrier which is sufficient // to provide TSO semantics, i.e. StoreStore | LoadLoad | LoadStore. diff --git a/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp b/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp index b404c840a6a..0e0dfeca71c 100644 --- a/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp +++ b/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp @@ -53,6 +53,7 @@ #include "runtime/stubRoutines.hpp" #include "runtime/thread.inline.hpp" #include "runtime/timer.hpp" +#include "signals_posix.hpp" #include "utilities/events.hpp" #include "utilities/vmError.hpp" @@ -143,7 +144,7 @@ JVM_handle_bsd_signal(int sig, if (sig == SIGPIPE || sig == SIGXFSZ) { // allow chained handler to go first - if (os::Bsd::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } else { // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219 @@ -153,7 +154,7 @@ JVM_handle_bsd_signal(int sig, JavaThread* thread = NULL; VMThread* vmthread = NULL; - if (os::Bsd::signal_handlers_are_installed) { + if (PosixSignals::are_signal_handlers_installed()) { if (t != NULL ){ if(t->is_Java_thread()) { thread = t->as_Java_thread(); @@ -203,7 +204,7 @@ JVM_handle_bsd_signal(int sig, } // signal-chaining - if (os::Bsd::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } @@ -247,7 +248,7 @@ bool os::is_allocatable(size_t bytes) { return true; } - char* addr = reserve_memory(bytes, NULL); + char* addr = reserve_memory(bytes); if (addr != NULL) { release_memory(addr, bytes); diff --git a/src/hotspot/os_cpu/bsd_zero/thread_bsd_zero.hpp b/src/hotspot/os_cpu/bsd_zero/thread_bsd_zero.hpp index 3a0484b386b..efbd3d05a3d 100644 --- a/src/hotspot/os_cpu/bsd_zero/thread_bsd_zero.hpp +++ b/src/hotspot/os_cpu/bsd_zero/thread_bsd_zero.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -60,15 +60,6 @@ return byte_offset_of(JavaThread, _top_zero_frame); } - public: - void record_base_of_stack_pointer() { - assert(top_zero_frame() == NULL, "junk on stack prior to Java call"); - } - void set_base_of_stack_pointer(intptr_t* base_sp) { - assert(base_sp == NULL, "should be"); - assert(top_zero_frame() == NULL, "junk on stack after Java call"); - } - public: void set_last_Java_frame() { set_last_Java_frame(top_zero_frame(), zero_stack()->sp()); @@ -110,10 +101,4 @@ return false; } - // These routines are only used on cpu architectures that - // have separate register stacks (Itanium). - static bool register_stack_overflow() { return false; } - static void enable_register_stack_guard() {} - static void disable_register_stack_guard() {} - #endif // OS_CPU_BSD_ZERO_THREAD_BSD_ZERO_HPP diff --git a/src/hotspot/os_cpu/linux_aarch64/icache_linux_aarch64.hpp b/src/hotspot/os_cpu/linux_aarch64/icache_linux_aarch64.hpp new file mode 100644 index 00000000000..37221953a77 --- /dev/null +++ b/src/hotspot/os_cpu/linux_aarch64/icache_linux_aarch64.hpp @@ -0,0 +1,44 @@ +/* + * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Red Hat Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_LINUX_AARCH64_ICACHE_AARCH64_HPP +#define OS_CPU_LINUX_AARCH64_ICACHE_AARCH64_HPP + +// Interface for updating the instruction cache. Whenever the VM +// modifies code, part of the processor instruction cache potentially +// has to be flushed. + +class ICache : public AbstractICache { + public: + static void initialize(); + static void invalidate_word(address addr) { + __builtin___clear_cache((char *)addr, (char *)(addr + 4)); + } + static void invalidate_range(address start, int nbytes) { + __builtin___clear_cache((char *)start, (char *)(start + nbytes)); + } +}; + +#endif // OS_CPU_LINUX_AARCH64_ICACHE_AARCH64_HPP \ No newline at end of file diff --git a/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp b/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp index 18651ae81b1..53c66d5e443 100644 --- a/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp +++ b/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp @@ -50,6 +50,7 @@ #include "runtime/stubRoutines.hpp" #include "runtime/thread.inline.hpp" #include "runtime/timer.hpp" +#include "signals_posix.hpp" #include "utilities/debug.hpp" #include "utilities/events.hpp" #include "utilities/vmError.hpp" @@ -216,7 +217,7 @@ JVM_handle_linux_signal(int sig, if (sig == SIGPIPE || sig == SIGXFSZ) { // allow chained handler to go first - if (os::Linux::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } else { // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219 @@ -234,7 +235,7 @@ JVM_handle_linux_signal(int sig, JavaThread* thread = NULL; VMThread* vmthread = NULL; - if (os::Linux::signal_handlers_are_installed) { + if (PosixSignals::are_signal_handlers_installed()) { if (t != NULL ){ if(t->is_Java_thread()) { thread = t->as_Java_thread(); @@ -425,7 +426,7 @@ JVM_handle_linux_signal(int sig, } // signal-chaining - if (os::Linux::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } diff --git a/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp b/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp index 35b64a91113..2a6c3a74689 100644 --- a/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp +++ b/src/hotspot/os_cpu/linux_aarch64/thread_linux_aarch64.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, 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. * @@ -44,23 +44,10 @@ frame pd_last_frame(); public: - // Mutators are highly dangerous.... - intptr_t* last_Java_fp() { return _anchor.last_Java_fp(); } - void set_last_Java_fp(intptr_t* fp) { _anchor.set_last_Java_fp(fp); } - - void set_base_of_stack_pointer(intptr_t* base_sp) { - } - static ByteSize last_Java_fp_offset() { return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset(); } - intptr_t* base_of_stack_pointer() { - return NULL; - } - void record_base_of_stack_pointer() { - } - bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava); @@ -71,10 +58,4 @@ static Thread *aarch64_get_thread_helper(); - // These routines are only used on cpu architectures that - // have separate register stacks (Itanium). - static bool register_stack_overflow() { return false; } - static void enable_register_stack_guard() {} - static void disable_register_stack_guard() {} - #endif // OS_CPU_LINUX_AARCH64_THREAD_LINUX_AARCH64_HPP diff --git a/src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp b/src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp index e4ae30c4cff..d5fb3f4680b 100644 --- a/src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp +++ b/src/hotspot/os_cpu/linux_aarch64/vm_version_linux_aarch64.cpp @@ -27,3 +27,140 @@ #include "runtime/os.hpp" #include "runtime/vm_version.hpp" +#include <asm/hwcap.h> +#include <sys/auxv.h> +#include <sys/prctl.h> + +#ifndef HWCAP_AES +#define HWCAP_AES (1<<3) +#endif + +#ifndef HWCAP_PMULL +#define HWCAP_PMULL (1<<4) +#endif + +#ifndef HWCAP_SHA1 +#define HWCAP_SHA1 (1<<5) +#endif + +#ifndef HWCAP_SHA2 +#define HWCAP_SHA2 (1<<6) +#endif + +#ifndef HWCAP_CRC32 +#define HWCAP_CRC32 (1<<7) +#endif + +#ifndef HWCAP_ATOMICS +#define HWCAP_ATOMICS (1<<8) +#endif + +#ifndef HWCAP_DCPOP +#define HWCAP_DCPOP (1<<16) +#endif + +#ifndef HWCAP_SHA512 +#define HWCAP_SHA512 (1 << 21) +#endif + +#ifndef HWCAP_SVE +#define HWCAP_SVE (1 << 22) +#endif + +#ifndef HWCAP2_SVE2 +#define HWCAP2_SVE2 (1 << 1) +#endif + +#ifndef PR_SVE_GET_VL +// For old toolchains which do not have SVE related macros defined. +#define PR_SVE_SET_VL 50 +#define PR_SVE_GET_VL 51 +#endif + +int VM_Version::get_current_sve_vector_length() { + assert(_features & CPU_SVE, "should not call this"); + return prctl(PR_SVE_GET_VL); +} + +int VM_Version::set_and_get_current_sve_vector_lenght(int length) { + assert(_features & CPU_SVE, "should not call this"); + int new_length = prctl(PR_SVE_SET_VL, length); + return new_length; +} + +void VM_Version::get_os_cpu_info() { + + uint64_t auxv = getauxval(AT_HWCAP); + uint64_t auxv2 = getauxval(AT_HWCAP2); + + static_assert(CPU_FP == HWCAP_FP); + static_assert(CPU_ASIMD == HWCAP_ASIMD); + static_assert(CPU_EVTSTRM == HWCAP_EVTSTRM); + static_assert(CPU_AES == HWCAP_AES); + static_assert(CPU_PMULL == HWCAP_PMULL); + static_assert(CPU_SHA1 == HWCAP_SHA1); + static_assert(CPU_SHA2 == HWCAP_SHA2); + static_assert(CPU_CRC32 == HWCAP_CRC32); + static_assert(CPU_LSE == HWCAP_ATOMICS); + static_assert(CPU_DCPOP == HWCAP_DCPOP); + static_assert(CPU_SHA512 == HWCAP_SHA512); + static_assert(CPU_SVE == HWCAP_SVE); + _features = auxv & ( + HWCAP_FP | + HWCAP_ASIMD | + HWCAP_EVTSTRM | + HWCAP_AES | + HWCAP_PMULL | + HWCAP_SHA1 | + HWCAP_SHA2 | + HWCAP_CRC32 | + HWCAP_ATOMICS | + HWCAP_DCPOP | + HWCAP_SHA512 | + HWCAP_SVE); + + if (auxv2 & HWCAP2_SVE2) _features |= CPU_SVE2; + + uint64_t ctr_el0; + uint64_t dczid_el0; + __asm__ ( + "mrs %0, CTR_EL0\n" + "mrs %1, DCZID_EL0\n" + : "=r"(ctr_el0), "=r"(dczid_el0) + ); + + _icache_line_size = (1 << (ctr_el0 & 0x0f)) * 4; + _dcache_line_size = (1 << ((ctr_el0 >> 16) & 0x0f)) * 4; + + if (!(dczid_el0 & 0x10)) { + _zva_length = 4 << (dczid_el0 & 0xf); + } + + int cpu_lines = 0; + if (FILE *f = fopen("/proc/cpuinfo", "r")) { + // need a large buffer as the flags line may include lots of text + char buf[1024], *p; + while (fgets(buf, sizeof (buf), f) != NULL) { + if ((p = strchr(buf, ':')) != NULL) { + long v = strtol(p+1, NULL, 0); + if (strncmp(buf, "CPU implementer", sizeof "CPU implementer" - 1) == 0) { + _cpu = v; + cpu_lines++; + } else if (strncmp(buf, "CPU variant", sizeof "CPU variant" - 1) == 0) { + _variant = v; + } else if (strncmp(buf, "CPU part", sizeof "CPU part" - 1) == 0) { + if (_model != v) _model2 = _model; + _model = v; + } else if (strncmp(buf, "CPU revision", sizeof "CPU revision" - 1) == 0) { + _revision = v; + } else if (strncmp(buf, "flags", sizeof("flags") - 1) == 0) { + if (strstr(p+1, "dcpop")) { + guarantee(_features & CPU_DCPOP, "dcpop availability should be consistent"); + } + } + } + } + fclose(f); + } + guarantee(cpu_lines == os::processor_count(), "core count should be consistent"); +} diff --git a/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp b/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp index a04f79a4eae..2178953d466 100644 --- a/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp +++ b/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp @@ -47,6 +47,7 @@ #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/timer.hpp" +#include "signals_posix.hpp" #include "utilities/debug.hpp" #include "utilities/events.hpp" #include "utilities/vmError.hpp" @@ -275,7 +276,7 @@ extern "C" int JVM_handle_linux_signal(int sig, siginfo_t* info, if (sig == SIGPIPE || sig == SIGXFSZ) { // allow chained handler to go first - if (os::Linux::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } else { // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219 @@ -293,7 +294,7 @@ extern "C" int JVM_handle_linux_signal(int sig, siginfo_t* info, JavaThread* thread = NULL; VMThread* vmthread = NULL; - if (os::Linux::signal_handlers_are_installed) { + if (PosixSignals::are_signal_handlers_installed()) { if (t != NULL ){ if(t->is_Java_thread()) { thread = t->as_Java_thread(); @@ -440,7 +441,7 @@ extern "C" int JVM_handle_linux_signal(int sig, siginfo_t* info, } // signal-chaining - if (os::Linux::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } diff --git a/src/hotspot/os_cpu/linux_arm/thread_linux_arm.hpp b/src/hotspot/os_cpu/linux_arm/thread_linux_arm.hpp index 2da1e800868..579d752f034 100644 --- a/src/hotspot/os_cpu/linux_arm/thread_linux_arm.hpp +++ b/src/hotspot/os_cpu/linux_arm/thread_linux_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -40,26 +40,10 @@ frame pd_last_frame(); public: - intptr_t* last_Java_fp() { return _anchor.last_Java_fp(); } - void set_last_Java_fp(intptr_t* fp) { _anchor.set_last_Java_fp(fp); } - void set_last_Java_pc(address pc) { _anchor.set_last_Java_pc(pc); } - static ByteSize last_Java_fp_offset() { return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset(); } - void set_base_of_stack_pointer(intptr_t* base_sp) { - // Nothing to do - } - - intptr_t* base_of_stack_pointer() { - return NULL; - } - - void record_base_of_stack_pointer() { - // Nothing to do - } - static ByteSize heap_top_addr_offset() { return byte_offset_of(JavaThread, _heap_top_addr); } static ByteSize card_table_base_offset() { return byte_offset_of(JavaThread, _card_table_base); } @@ -78,10 +62,4 @@ bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava); public: - // These routines are only used on cpu architectures that - // have separate register stacks (Itanium). - static bool register_stack_overflow() { return false; } - static void enable_register_stack_guard() {} - static void disable_register_stack_guard() {} - #endif // OS_CPU_LINUX_ARM_THREAD_LINUX_ARM_HPP diff --git a/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp b/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp index c747ba12d64..b07b803d3db 100644 --- a/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp +++ b/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp @@ -50,6 +50,7 @@ #include "runtime/stubRoutines.hpp" #include "runtime/thread.inline.hpp" #include "runtime/timer.hpp" +#include "signals_posix.hpp" #include "utilities/debug.hpp" #include "utilities/events.hpp" #include "utilities/vmError.hpp" @@ -237,7 +238,7 @@ JVM_handle_linux_signal(int sig, // that do not require siginfo/ucontext first. if (sig == SIGPIPE) { - if (os::Linux::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } else { // Ignoring SIGPIPE - see bugs 4229104 @@ -277,7 +278,7 @@ JVM_handle_linux_signal(int sig, JavaThread* thread = NULL; VMThread* vmthread = NULL; - if (os::Linux::signal_handlers_are_installed) { + if (PosixSignals::are_signal_handlers_installed()) { if (t != NULL) { if(t->is_Java_thread()) { thread = t->as_Java_thread(); @@ -547,7 +548,7 @@ JVM_handle_linux_signal(int sig, } // signal-chaining - if (os::Linux::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } diff --git a/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.hpp b/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.hpp index fec8af87338..c38f90efa8d 100644 --- a/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.hpp +++ b/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -37,16 +37,6 @@ public: - void set_base_of_stack_pointer(intptr_t* base_sp) {} - intptr_t* base_of_stack_pointer() { return NULL; } - void record_base_of_stack_pointer() {} - - // These routines are only used on cpu architectures that - // have separate register stacks (Itanium). - static bool register_stack_overflow() { return false; } - static void enable_register_stack_guard() {} - static void disable_register_stack_guard() {} - bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava); bool pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava); diff --git a/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp b/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp index 0d3a36f94ce..8ced775f22b 100644 --- a/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp +++ b/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp @@ -53,6 +53,7 @@ #include "runtime/stubRoutines.hpp" #include "runtime/thread.inline.hpp" #include "runtime/timer.hpp" +#include "signals_posix.hpp" #include "utilities/events.hpp" #include "utilities/debug.hpp" #include "utilities/vmError.hpp" @@ -257,7 +258,7 @@ JVM_handle_linux_signal(int sig, // that do not require siginfo/ucontext first. if (sig == SIGPIPE) { - if (os::Linux::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } else { if (PrintMiscellaneous && (WizardMode || Verbose)) { @@ -277,7 +278,7 @@ JVM_handle_linux_signal(int sig, JavaThread* thread = NULL; VMThread* vmthread = NULL; - if (os::Linux::signal_handlers_are_installed) { + if (PosixSignals::are_signal_handlers_installed()) { if (t != NULL) { if(t->is_Java_thread()) { thread = t->as_Java_thread(); @@ -499,7 +500,7 @@ JVM_handle_linux_signal(int sig, } // signal-chaining - if (os::Linux::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } diff --git a/src/hotspot/os_cpu/linux_s390/thread_linux_s390.hpp b/src/hotspot/os_cpu/linux_s390/thread_linux_s390.hpp index 526876ed0d5..29606455e77 100644 --- a/src/hotspot/os_cpu/linux_s390/thread_linux_s390.hpp +++ b/src/hotspot/os_cpu/linux_s390/thread_linux_s390.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -36,16 +36,6 @@ frame pd_last_frame(); public: - void set_base_of_stack_pointer(intptr_t* base_sp) {} - intptr_t* base_of_stack_pointer() { return NULL; } - void record_base_of_stack_pointer() {} - - // These routines are only used on cpu architectures that - // have separate register stacks (Itanium). - static bool register_stack_overflow() { return false; } - static void enable_register_stack_guard() {} - static void disable_register_stack_guard() {} - bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava); bool pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava); diff --git a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp index 598383ca9db..19ad03108d8 100644 --- a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp +++ b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp @@ -49,6 +49,7 @@ #include "runtime/stubRoutines.hpp" #include "runtime/thread.inline.hpp" #include "runtime/timer.hpp" +#include "signals_posix.hpp" #include "services/memTracker.hpp" #include "utilities/align.hpp" #include "utilities/debug.hpp" @@ -255,7 +256,7 @@ JVM_handle_linux_signal(int sig, if (sig == SIGPIPE || sig == SIGXFSZ) { // allow chained handler to go first - if (os::Linux::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } else { // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219 @@ -273,7 +274,7 @@ JVM_handle_linux_signal(int sig, JavaThread* thread = NULL; VMThread* vmthread = NULL; - if (os::Linux::signal_handlers_are_installed) { + if (PosixSignals::are_signal_handlers_installed()) { if (t != NULL ){ if(t->is_Java_thread()) { thread = t->as_Java_thread(); @@ -554,7 +555,7 @@ JVM_handle_linux_signal(int sig, } // signal-chaining - if (os::Linux::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } @@ -650,7 +651,7 @@ bool os::is_allocatable(size_t bytes) { return true; } - char* addr = reserve_memory(bytes, NULL); + char* addr = reserve_memory(bytes); if (addr != NULL) { release_memory(addr, bytes); @@ -859,7 +860,7 @@ void os::workaround_expand_exec_shield_cs_limit() { */ char* hint = (char*)(Linux::initial_thread_stack_bottom() - (JavaThread::stack_guard_zone_size() + page_size)); - char* codebuf = os::attempt_reserve_memory_at(page_size, hint); + char* codebuf = os::attempt_reserve_memory_at(hint, page_size); if (codebuf == NULL) { // JDK-8197429: There may be a stack gap of one megabyte between @@ -867,7 +868,7 @@ void os::workaround_expand_exec_shield_cs_limit() { // Linux kernel workaround for CVE-2017-1000364. If we failed to // map our codebuf, try again at an address one megabyte lower. hint -= 1 * M; - codebuf = os::attempt_reserve_memory_at(page_size, hint); + codebuf = os::attempt_reserve_memory_at(hint, page_size); } if ((codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true))) { diff --git a/src/hotspot/os_cpu/linux_x86/thread_linux_x86.hpp b/src/hotspot/os_cpu/linux_x86/thread_linux_x86.hpp index 3ee496cfcbf..574edc79831 100644 --- a/src/hotspot/os_cpu/linux_x86/thread_linux_x86.hpp +++ b/src/hotspot/os_cpu/linux_x86/thread_linux_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -33,23 +33,10 @@ frame pd_last_frame(); public: - // Mutators are highly dangerous.... - intptr_t* last_Java_fp() { return _anchor.last_Java_fp(); } - void set_last_Java_fp(intptr_t* fp) { _anchor.set_last_Java_fp(fp); } - - void set_base_of_stack_pointer(intptr_t* base_sp) { - } - static ByteSize last_Java_fp_offset() { return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset(); } - intptr_t* base_of_stack_pointer() { - return NULL; - } - void record_base_of_stack_pointer() { - } - bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava); @@ -58,10 +45,4 @@ bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava); public: - // These routines are only used on cpu architectures that - // have separate register stacks (Itanium). - static bool register_stack_overflow() { return false; } - static void enable_register_stack_guard() {} - static void disable_register_stack_guard() {} - #endif // OS_CPU_LINUX_X86_THREAD_LINUX_X86_HPP diff --git a/src/hotspot/os_cpu/linux_zero/atomic_linux_zero.hpp b/src/hotspot/os_cpu/linux_zero/atomic_linux_zero.hpp index dbd2fb0c587..fb6e350cf05 100644 --- a/src/hotspot/os_cpu/linux_zero/atomic_linux_zero.hpp +++ b/src/hotspot/os_cpu/linux_zero/atomic_linux_zero.hpp @@ -26,6 +26,7 @@ #ifndef OS_CPU_LINUX_ZERO_ATOMIC_LINUX_ZERO_HPP #define OS_CPU_LINUX_ZERO_ATOMIC_LINUX_ZERO_HPP +#include "orderAccess_linux_zero.hpp" #include "runtime/os.hpp" // Implementation of class atomic @@ -74,8 +75,9 @@ inline T Atomic::PlatformXchg<4>::operator()(T volatile* dest, // All atomic operations are expected to be full memory barriers // (see atomic.hpp). However, __sync_lock_test_and_set is not // a full memory barrier, but an acquire barrier. Hence, this added - // barrier. - __sync_synchronize(); + // barrier. Some platforms (notably ARM) have peculiarities with + // their barrier implementations, delegate it to OrderAccess. + OrderAccess::fence(); return result; } @@ -86,7 +88,7 @@ inline T Atomic::PlatformXchg<8>::operator()(T volatile* dest, atomic_memory_order order) const { STATIC_ASSERT(8 == sizeof(T)); T result = __sync_lock_test_and_set (dest, exchange_value); - __sync_synchronize(); + OrderAccess::fence(); return result; } diff --git a/src/hotspot/os_cpu/linux_zero/orderAccess_linux_zero.hpp b/src/hotspot/os_cpu/linux_zero/orderAccess_linux_zero.hpp index 75476d35152..acd25242f03 100644 --- a/src/hotspot/os_cpu/linux_zero/orderAccess_linux_zero.hpp +++ b/src/hotspot/os_cpu/linux_zero/orderAccess_linux_zero.hpp @@ -28,7 +28,7 @@ // Included in orderAccess.hpp header file. -#ifdef ARM +#if defined(ARM) // ---------------------------------------------------- /* * ARM Kernel helper for memory barrier. @@ -39,14 +39,10 @@ typedef void (__kernel_dmb_t) (void); #define __kernel_dmb (*(__kernel_dmb_t *) 0xffff0fa0) -#define FULL_MEM_BARRIER __kernel_dmb() #define LIGHT_MEM_BARRIER __kernel_dmb() +#define FULL_MEM_BARRIER __kernel_dmb() -#else // ARM - -#define FULL_MEM_BARRIER __sync_synchronize() - -#ifdef PPC +#elif defined(PPC) // ---------------------------------------------------- #ifdef __NO_LWSYNC__ #define LIGHT_MEM_BARRIER __asm __volatile ("sync":::"memory") @@ -54,21 +50,21 @@ typedef void (__kernel_dmb_t) (void); #define LIGHT_MEM_BARRIER __asm __volatile ("lwsync":::"memory") #endif -#else // PPC +#define FULL_MEM_BARRIER __sync_synchronize() -#ifdef ALPHA - -#define LIGHT_MEM_BARRIER __sync_synchronize() - -#else // ALPHA +#elif defined(X86) // ---------------------------------------------------- #define LIGHT_MEM_BARRIER __asm __volatile ("":::"memory") +#define FULL_MEM_BARRIER __sync_synchronize() + +#else // ---------------------------------------------------- -#endif // ALPHA +// Default to strongest barriers for correctness. -#endif // PPC +#define LIGHT_MEM_BARRIER __sync_synchronize() +#define FULL_MEM_BARRIER __sync_synchronize() -#endif // ARM +#endif // ---------------------------------------------------- // Note: What is meant by LIGHT_MEM_BARRIER is a barrier which is sufficient // to provide TSO semantics, i.e. StoreStore | LoadLoad | LoadStore. diff --git a/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp b/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp index e2de18263f0..49b6fc9780e 100644 --- a/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp +++ b/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp @@ -48,6 +48,7 @@ #include "runtime/stubRoutines.hpp" #include "runtime/thread.inline.hpp" #include "runtime/timer.hpp" +#include "signals_posix.hpp" #include "utilities/align.hpp" #include "utilities/events.hpp" #include "utilities/vmError.hpp" @@ -139,7 +140,7 @@ JVM_handle_linux_signal(int sig, if (sig == SIGPIPE || sig == SIGXFSZ) { // allow chained handler to go first - if (os::Linux::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } else { // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219 @@ -149,7 +150,7 @@ JVM_handle_linux_signal(int sig, JavaThread* thread = NULL; VMThread* vmthread = NULL; - if (os::Linux::signal_handlers_are_installed) { + if (PosixSignals::are_signal_handlers_installed()) { if (t != NULL ){ if(t->is_Java_thread()) { thread = t->as_Java_thread(); @@ -217,7 +218,7 @@ JVM_handle_linux_signal(int sig, } // signal-chaining - if (os::Linux::chained_handler(sig, info, ucVoid)) { + if (PosixSignals::chained_handler(sig, info, ucVoid)) { return true; } @@ -273,7 +274,7 @@ bool os::is_allocatable(size_t bytes) { return true; } - char* addr = reserve_memory(bytes, NULL); + char* addr = reserve_memory(bytes); if (addr != NULL) { release_memory(addr, bytes); diff --git a/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp b/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp index 2e7e7ed6d41..9d4e0808551 100644 --- a/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp +++ b/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp @@ -68,15 +68,23 @@ : "=&f"(tmp), "=Q"(*(volatile double*)dst) : "Q"(*(volatile double*)src)); #elif defined(__ARM_ARCH_7A__) - // Note that a ldrexd + clrex combination is only needed for - // correctness on the OS level (context-switches). In this - // case, clrex *may* be beneficial for performance. For now - // don't bother with clrex as this is Zero. - jlong tmp; - asm volatile ("ldrexd %0, [%1]\n" - : "=r"(tmp) - : "r"(src), "m"(src)); - *(jlong *) dst = tmp; + // The only way to perform the atomic 64-bit load/store + // is to use ldrexd/strexd for both reads and writes. + // For store, we need to have the matching (fake) load first. + // Put clrex between exclusive ops on src and dst for clarity. + uint64_t tmp_r, tmp_w; + uint32_t flag_w; + asm volatile ("ldrexd %[tmp_r], [%[src]]\n" + "clrex\n" + "1:\n" + "ldrexd %[tmp_w], [%[dst]]\n" + "strexd %[flag_w], %[tmp_r], [%[dst]]\n" + "cmp %[flag_w], 0\n" + "bne 1b\n" + : [tmp_r] "=&r" (tmp_r), [tmp_w] "=&r" (tmp_w), + [flag_w] "=&r" (flag_w) + : [src] "r" (src), [dst] "r" (dst) + : "cc", "memory"); #else *(jlong *) dst = *(const jlong *) src; #endif diff --git a/src/hotspot/os_cpu/linux_zero/thread_linux_zero.hpp b/src/hotspot/os_cpu/linux_zero/thread_linux_zero.hpp index b3b44530dba..b180611b2f9 100644 --- a/src/hotspot/os_cpu/linux_zero/thread_linux_zero.hpp +++ b/src/hotspot/os_cpu/linux_zero/thread_linux_zero.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -60,15 +60,6 @@ return byte_offset_of(JavaThread, _top_zero_frame); } - public: - void record_base_of_stack_pointer() { - assert(top_zero_frame() == NULL, "junk on stack prior to Java call"); - } - void set_base_of_stack_pointer(intptr_t* base_sp) { - assert(base_sp == NULL, "should be"); - assert(top_zero_frame() == NULL, "junk on stack after Java call"); - } - public: void set_last_Java_frame() { set_last_Java_frame(top_zero_frame(), zero_stack()->sp()); @@ -117,11 +108,4 @@ return false; // silence compile warning } - - // These routines are only used on cpu architectures that - // have separate register stacks (Itanium). - static bool register_stack_overflow() { return false; } - static void enable_register_stack_guard() {} - static void disable_register_stack_guard() {} - #endif // OS_CPU_LINUX_ZERO_THREAD_LINUX_ZERO_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/assembler_windows_aarch64.cpp b/src/hotspot/os_cpu/windows_aarch64/assembler_windows_aarch64.cpp new file mode 100644 index 00000000000..965613fd1e5 --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/assembler_windows_aarch64.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +// nothing required here +#include "precompiled.hpp" diff --git a/src/hotspot/os_cpu/windows_aarch64/atomic_windows_aarch64.hpp b/src/hotspot/os_cpu/windows_aarch64/atomic_windows_aarch64.hpp new file mode 100644 index 00000000000..970b37450ca --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/atomic_windows_aarch64.hpp @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_WINDOWS_AARCH64_ATOMIC_WINDOWS_AARCH64_HPP +#define OS_CPU_WINDOWS_AARCH64_ATOMIC_WINDOWS_AARCH64_HPP + +#include <intrin.h> +#include "runtime/os.hpp" +#include "runtime/vm_version.hpp" + + +// As per atomic.hpp all read-modify-write operations have to provide two-way +// barriers semantics. The memory_order parameter is ignored - we always provide +// the strongest/most-conservative ordering +// +// For AARCH64 we add explicit barriers in the stubs. + +template<size_t byte_size> +struct Atomic::PlatformAdd { + template<typename D, typename I> + D add_and_fetch(D volatile* dest, I add_value, atomic_memory_order order) const; + + template<typename D, typename I> + D fetch_and_add(D volatile* dest, I add_value, atomic_memory_order order) const { + return add_and_fetch(dest, add_value, order) - add_value; + } +}; + +// The Interlocked* APIs only take long and will not accept __int32. That is +// acceptable on Windows, since long is a 32-bits integer type. + +#define DEFINE_INTRINSIC_ADD(IntrinsicName, IntrinsicType) \ + template<> \ + template<typename D, typename I> \ + inline D Atomic::PlatformAdd<sizeof(IntrinsicType)>::add_and_fetch(D volatile* dest, \ + I add_value, \ + atomic_memory_order order) const { \ + STATIC_ASSERT(sizeof(IntrinsicType) == sizeof(D)); \ + return PrimitiveConversions::cast<D>( \ + IntrinsicName(reinterpret_cast<IntrinsicType volatile *>(dest), \ + PrimitiveConversions::cast<IntrinsicType>(add_value))); \ + } + +DEFINE_INTRINSIC_ADD(InterlockedAdd, long) +DEFINE_INTRINSIC_ADD(InterlockedAdd64, __int64) + +#undef DEFINE_INTRINSIC_ADD + +#define DEFINE_INTRINSIC_XCHG(IntrinsicName, IntrinsicType) \ + template<> \ + template<typename T> \ + inline T Atomic::PlatformXchg<sizeof(IntrinsicType)>::operator()(T volatile* dest, \ + T exchange_value, \ + atomic_memory_order order) const { \ + STATIC_ASSERT(sizeof(IntrinsicType) == sizeof(T)); \ + return PrimitiveConversions::cast<T>( \ + IntrinsicName(reinterpret_cast<IntrinsicType volatile *>(dest), \ + PrimitiveConversions::cast<IntrinsicType>(exchange_value))); \ + } + +DEFINE_INTRINSIC_XCHG(InterlockedExchange, long) +DEFINE_INTRINSIC_XCHG(InterlockedExchange64, __int64) + +#undef DEFINE_INTRINSIC_XCHG + +// Note: the order of the parameters is different between +// Atomic::PlatformCmpxchg<*>::operator() and the +// InterlockedCompareExchange* API. + +#define DEFINE_INTRINSIC_CMPXCHG(IntrinsicName, IntrinsicType) \ + template<> \ + template<typename T> \ + inline T Atomic::PlatformCmpxchg<sizeof(IntrinsicType)>::operator()(T volatile* dest, \ + T compare_value, \ + T exchange_value, \ + atomic_memory_order order) const { \ + STATIC_ASSERT(sizeof(IntrinsicType) == sizeof(T)); \ + return PrimitiveConversions::cast<T>( \ + IntrinsicName(reinterpret_cast<IntrinsicType volatile *>(dest), \ + PrimitiveConversions::cast<IntrinsicType>(exchange_value), \ + PrimitiveConversions::cast<IntrinsicType>(compare_value))); \ + } + +DEFINE_INTRINSIC_CMPXCHG(_InterlockedCompareExchange8, char) // Use the intrinsic as InterlockedCompareExchange8 does not exist +DEFINE_INTRINSIC_CMPXCHG(InterlockedCompareExchange, long) +DEFINE_INTRINSIC_CMPXCHG(InterlockedCompareExchange64, __int64) + +#undef DEFINE_INTRINSIC_CMPXCHG + +#endif // OS_CPU_WINDOWS_AARCH64_ATOMIC_WINDOWS_AARCH64_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/bytes_windows_aarch64.inline.hpp b/src/hotspot/os_cpu/windows_aarch64/bytes_windows_aarch64.inline.hpp new file mode 100644 index 00000000000..55048963fa4 --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/bytes_windows_aarch64.inline.hpp @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_WINDOWS_AARCH64_BYTES_WINDOWS_AARCH64_INLINE_HPP +#define OS_CPU_WINDOWS_AARCH64_BYTES_WINDOWS_AARCH64_INLINE_HPP + +#include <stdlib.h> + +// Efficient swapping of data bytes from Java byte +// ordering to native byte ordering and vice versa. +inline u2 Bytes::swap_u2(u2 x) { + return _byteswap_ushort(x); +} + +inline u4 Bytes::swap_u4(u4 x) { + return _byteswap_ulong(x); +} + +inline u8 Bytes::swap_u8(u8 x) { + return _byteswap_uint64(x); +} + +#pragma warning(default: 4035) // Enable warning 4035: no return value + +#endif // OS_CPU_WINDOWS_AARCH64_BYTES_WINDOWS_AARCH64_INLINE_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/copy_windows_aarch64.inline.hpp b/src/hotspot/os_cpu/windows_aarch64/copy_windows_aarch64.inline.hpp new file mode 100644 index 00000000000..76cb66f1817 --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/copy_windows_aarch64.inline.hpp @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_WINDOWS_AARCH64_COPY_WINDOWS_AARCH64_INLINE_HPP +#define OS_CPU_WINDOWS_AARCH64_COPY_WINDOWS_AARCH64_INLINE_HPP + +#include <string.h> + +static void pd_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) { + (void)memmove(to, from, count * HeapWordSize); +} + +static void pd_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) { + switch (count) { + case 8: to[7] = from[7]; + case 7: to[6] = from[6]; + case 6: to[5] = from[5]; + case 5: to[4] = from[4]; + case 4: to[3] = from[3]; + case 3: to[2] = from[2]; + case 2: to[1] = from[1]; + case 1: to[0] = from[0]; + case 0: break; + default: + (void)memcpy(to, from, count * HeapWordSize); + break; + } +} + +static void pd_disjoint_words_atomic(const HeapWord* from, HeapWord* to, size_t count) { + switch (count) { + case 8: to[7] = from[7]; + case 7: to[6] = from[6]; + case 6: to[5] = from[5]; + case 5: to[4] = from[4]; + case 4: to[3] = from[3]; + case 3: to[2] = from[2]; + case 2: to[1] = from[1]; + case 1: to[0] = from[0]; + case 0: break; + default: while (count-- > 0) { + *to++ = *from++; + } + break; + } +} + +static void pd_aligned_conjoint_words(const HeapWord* from, HeapWord* to, size_t count) { + // pd_conjoint_words(from, to, count); + (void)memmove(to, from, count * HeapWordSize); +} + +static void pd_aligned_disjoint_words(const HeapWord* from, HeapWord* to, size_t count) { + pd_disjoint_words(from, to, count); +} + +static void pd_conjoint_bytes(const void* from, void* to, size_t count) { + (void)memmove(to, from, count); +} + +static void pd_conjoint_bytes_atomic(const void* from, void* to, size_t count) { + pd_conjoint_bytes(from, to, count); +} + +static void pd_conjoint_jshorts_atomic(const jshort* from, jshort* to, size_t count) { + if (from > to) { + while (count-- > 0) { + // Copy forwards + *to++ = *from++; + } + } else { + from += count - 1; + to += count - 1; + while (count-- > 0) { + // Copy backwards + *to-- = *from--; + } + } +} + +static void pd_conjoint_jints_atomic(const jint* from, jint* to, size_t count) { + if (from > to) { + while (count-- > 0) { + // Copy forwards + *to++ = *from++; + } + } else { + from += count - 1; + to += count - 1; + while (count-- > 0) { + // Copy backwards + *to-- = *from--; + } + } +} + +static void pd_conjoint_jlongs_atomic(const jlong* from, jlong* to, size_t count) { + pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count); +} + +static void pd_conjoint_oops_atomic(const oop* from, oop* to, size_t count) { + if (from > to) { + while (count-- > 0) { + // Copy forwards + *to++ = *from++; + } + } else { + from += count - 1; + to += count - 1; + while (count-- > 0) { + // Copy backwards + *to-- = *from--; + } + } +} + +static void pd_arrayof_conjoint_bytes(const HeapWord* from, HeapWord* to, size_t count) { + pd_conjoint_bytes_atomic(from, to, count); +} + +static void pd_arrayof_conjoint_jshorts(const HeapWord* from, HeapWord* to, size_t count) { + pd_conjoint_jshorts_atomic((const jshort*)from, (jshort*)to, count); +} + +static void pd_arrayof_conjoint_jints(const HeapWord* from, HeapWord* to, size_t count) { + pd_conjoint_jints_atomic((const jint*)from, (jint*)to, count); +} + +static void pd_arrayof_conjoint_jlongs(const HeapWord* from, HeapWord* to, size_t count) { + pd_conjoint_jlongs_atomic((const jlong*)from, (jlong*)to, count); +} + +static void pd_arrayof_conjoint_oops(const HeapWord* from, HeapWord* to, size_t count) { + pd_conjoint_oops_atomic((const oop*)from, (oop*)to, count); +} + +#endif // OS_CPU_WINDOWS_AARCH64_COPY_WINDOWS_AARCH64_INLINE_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/globals_windows_aarch64.hpp b/src/hotspot/os_cpu/windows_aarch64/globals_windows_aarch64.hpp new file mode 100644 index 00000000000..836fb463206 --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/globals_windows_aarch64.hpp @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_WINDOWS_AARCH64_GLOBALS_WINDOWS_AARCH64_HPP +#define OS_CPU_WINDOWS_AARCH64_GLOBALS_WINDOWS_AARCH64_HPP + +// Sets the default values for platform dependent flags used by the runtime system. +// (see globals.hpp) + +define_pd_global(bool, DontYieldALot, false); + +// Default stack size on Windows is determined by the executable (java.exe +// has a default value of 320K/1MB [32bit/64bit]). Depending on Windows version, changing +// ThreadStackSize to non-zero may have significant impact on memory usage. +// See comments in os_windows.cpp. +define_pd_global(intx, ThreadStackSize, 0); // 0 => use system default +define_pd_global(intx, VMThreadStackSize, 0); + +#ifdef ASSERT +define_pd_global(intx, CompilerThreadStackSize, 1024); +#else +define_pd_global(intx, CompilerThreadStackSize, 0); +#endif + +define_pd_global(uintx,JVMInvokeMethodSlack, 8192); + +// Used on 64 bit platforms for UseCompressedOops base address +define_pd_global(uintx,HeapBaseMinAddress, 2*G); +#endif // OS_CPU_WINDOWS_AARCH64_GLOBALS_WINDOWS_AARCH64_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/icache_windows_aarch64.hpp b/src/hotspot/os_cpu/windows_aarch64/icache_windows_aarch64.hpp new file mode 100644 index 00000000000..bf36b77d98e --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/icache_windows_aarch64.hpp @@ -0,0 +1,44 @@ +/* + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, Red Hat Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_WINDOWS_AARCH64_ICACHE_AARCH64_HPP +#define OS_CPU_WINDOWS_AARCH64_ICACHE_AARCH64_HPP + +// Interface for updating the instruction cache. Whenever the VM +// modifies code, part of the processor instruction cache potentially +// has to be flushed. + +class ICache : public AbstractICache { + public: + static void initialize(); + static void invalidate_word(address addr) { + invalidate_range(addr, 4); + } + static void invalidate_range(address start, int nbytes) { + FlushInstructionCache((HANDLE)GetCurrentProcess(), start, (SIZE_T)(nbytes)); + } +}; + +#endif // OS_CPU_WINDOWS_AARCH64_ICACHE_AARCH64_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/orderAccess_windows_aarch64.hpp b/src/hotspot/os_cpu/windows_aarch64/orderAccess_windows_aarch64.hpp new file mode 100644 index 00000000000..11ec7322a9f --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/orderAccess_windows_aarch64.hpp @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_WINDOWS_AARCH64_ORDERACCESS_WINDOWS_AARCH64_HPP +#define OS_CPU_WINDOWS_AARCH64_ORDERACCESS_WINDOWS_AARCH64_HPP + +// Included in orderAccess.hpp header file. +#include <atomic> +using std::atomic_thread_fence; +#include <intrin.h> +#include "vm_version_aarch64.hpp" +#include "runtime/vm_version.hpp" + +// Implementation of class OrderAccess. + +inline void OrderAccess::loadload() { acquire(); } +inline void OrderAccess::storestore() { release(); } +inline void OrderAccess::loadstore() { acquire(); } +inline void OrderAccess::storeload() { fence(); } + +#define READ_MEM_BARRIER atomic_thread_fence(std::memory_order_acquire); +#define WRITE_MEM_BARRIER atomic_thread_fence(std::memory_order_release); +#define FULL_MEM_BARRIER atomic_thread_fence(std::memory_order_seq_cst); + +inline void OrderAccess::acquire() { + READ_MEM_BARRIER; +} + +inline void OrderAccess::release() { + WRITE_MEM_BARRIER; +} + +inline void OrderAccess::fence() { + FULL_MEM_BARRIER; +} + +inline void OrderAccess::cross_modify_fence() { } + +#endif // OS_CPU_WINDOWS_AARCH64_ORDERACCESS_WINDOWS_AARCH64_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/os_windows_aarch64.cpp b/src/hotspot/os_cpu/windows_aarch64/os_windows_aarch64.cpp new file mode 100644 index 00000000000..0a61ef0e95f --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/os_windows_aarch64.cpp @@ -0,0 +1,311 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "jvm.h" +#include "asm/macroAssembler.hpp" +#include "classfile/classLoader.hpp" +#include "classfile/systemDictionary.hpp" +#include "classfile/vmSymbols.hpp" +#include "code/codeCache.hpp" +#include "code/icBuffer.hpp" +#include "code/vtableStubs.hpp" +#include "code/nativeInst.hpp" +#include "interpreter/interpreter.hpp" +#include "memory/allocation.inline.hpp" +#include "prims/jniFastGetField.hpp" +#include "prims/jvm_misc.hpp" +#include "runtime/arguments.hpp" +#include "runtime/frame.inline.hpp" +#include "runtime/interfaceSupport.inline.hpp" +#include "runtime/java.hpp" +#include "runtime/javaCalls.hpp" +#include "runtime/mutexLocker.hpp" +#include "runtime/osThread.hpp" +#include "runtime/sharedRuntime.hpp" +#include "runtime/stubRoutines.hpp" +#include "runtime/thread.inline.hpp" +#include "runtime/timer.hpp" +#include "unwind_windows_aarch64.hpp" +#include "utilities/debug.hpp" +#include "utilities/events.hpp" +#include "utilities/vmError.hpp" + + +// put OS-includes here +# include <sys/types.h> +# include <signal.h> +# include <errno.h> +# include <stdlib.h> +# include <stdio.h> +# include <intrin.h> + +void os::os_exception_wrapper(java_call_t f, JavaValue* value, const methodHandle& method, JavaCallArguments* args, Thread* thread) { + f(value, method, args, thread); +} + +PRAGMA_DISABLE_MSVC_WARNING(4172) +// Returns an estimate of the current stack pointer. Result must be guaranteed +// to point into the calling threads stack, and be no lower than the current +// stack pointer. +address os::current_stack_pointer() { + int dummy; + address sp = (address)&dummy; + return sp; +} + +address os::fetch_frame_from_context(const void* ucVoid, + intptr_t** ret_sp, intptr_t** ret_fp) { + address epc; + CONTEXT* uc = (CONTEXT*)ucVoid; + + if (uc != NULL) { + epc = (address)uc->Pc; + if (ret_sp) *ret_sp = (intptr_t*)uc->Sp; + if (ret_fp) *ret_fp = (intptr_t*)uc->Fp; + } else { + // construct empty ExtendedPC for return value checking + epc = NULL; + if (ret_sp) *ret_sp = (intptr_t *)NULL; + if (ret_fp) *ret_fp = (intptr_t *)NULL; + } + return epc; +} + +frame os::fetch_frame_from_context(const void* ucVoid) { + intptr_t* sp; + intptr_t* fp; + address epc = fetch_frame_from_context(ucVoid, &sp, &fp); + return frame(sp, fp, epc); +} + +bool os::win32::get_frame_at_stack_banging_point(JavaThread* thread, + struct _EXCEPTION_POINTERS* exceptionInfo, address pc, frame* fr) { + PEXCEPTION_RECORD exceptionRecord = exceptionInfo->ExceptionRecord; + address addr = (address) exceptionRecord->ExceptionInformation[1]; + if (Interpreter::contains(pc)) { + // interpreter performs stack banging after the fixed frame header has + // been generated while the compilers perform it before. To maintain + // semantic consistency between interpreted and compiled frames, the + // method returns the Java sender of the current frame. + *fr = os::fetch_frame_from_context((void*)exceptionInfo->ContextRecord); + if (!fr->is_first_java_frame()) { + assert(fr->safe_for_sender(thread), "Safety check"); + *fr = fr->java_sender(); + } + } else { + // more complex code with compiled code + assert(!Interpreter::contains(pc), "Interpreted methods should have been handled above"); + CodeBlob* cb = CodeCache::find_blob(pc); + if (cb == NULL || !cb->is_nmethod() || cb->is_frame_complete_at(pc)) { + // Not sure where the pc points to, fallback to default + // stack overflow handling + return false; + } else { + // In compiled code, the stack banging is performed before LR + // has been saved in the frame. LR is live, and SP and FP + // belong to the caller. + intptr_t* fp = (intptr_t*)exceptionInfo->ContextRecord->Fp; + intptr_t* sp = (intptr_t*)exceptionInfo->ContextRecord->Sp; + address pc = (address)(exceptionInfo->ContextRecord->Lr + - NativeInstruction::instruction_size); + *fr = frame(sp, fp, pc); + if (!fr->is_java_frame()) { + assert(fr->safe_for_sender(thread), "Safety check"); + assert(!fr->is_first_frame(), "Safety check"); + *fr = fr->java_sender(); + } + } + } + assert(fr->is_java_frame(), "Safety check"); + return true; +} + +// By default, gcc always saves frame pointer rfp on this stack. This +// may get turned off by -fomit-frame-pointer. +frame os::get_sender_for_C_frame(frame* fr) { + return frame(fr->link(), fr->link(), fr->sender_pc()); +} + +frame os::current_frame() { + typedef intptr_t* get_fp_func (); + get_fp_func* func = CAST_TO_FN_PTR(get_fp_func*, + StubRoutines::aarch64::get_previous_fp_entry()); + if (func == NULL) return frame(); + intptr_t* fp = (*func)(); + if (fp == NULL) { + return frame(); + } + + frame myframe((intptr_t*)os::current_stack_pointer(), + (intptr_t*)fp, + CAST_FROM_FN_PTR(address, os::current_frame)); + if (os::is_first_C_frame(&myframe)) { + + // stack is not walkable + return frame(); + } else { + return os::get_sender_for_C_frame(&myframe); + } +} + +//////////////////////////////////////////////////////////////////////////////// +// thread stack + +// Minimum usable stack sizes required to get to user code. Space for +// HotSpot guard pages is added later. + +///////////////////////////////////////////////////////////////////////////// +// helper functions for fatal error handler + +void os::print_context(outputStream *st, const void *context) { + if (context == NULL) return; + + const CONTEXT* uc = (const CONTEXT*)context; + + st->print_cr("Registers:"); + + st->print( "X0 =" INTPTR_FORMAT, uc->X0); + st->print(", X1 =" INTPTR_FORMAT, uc->X1); + st->print(", X2 =" INTPTR_FORMAT, uc->X2); + st->print(", X3 =" INTPTR_FORMAT, uc->X3); + st->cr(); + st->print( "X4 =" INTPTR_FORMAT, uc->X4); + st->print(", X5 =" INTPTR_FORMAT, uc->X5); + st->print(", X6 =" INTPTR_FORMAT, uc->X6); + st->print(", X7 =" INTPTR_FORMAT, uc->X7); + st->cr(); + st->print( "X8 =" INTPTR_FORMAT, uc->X8); + st->print(", X9 =" INTPTR_FORMAT, uc->X9); + st->print(", X10=" INTPTR_FORMAT, uc->X10); + st->print(", X11=" INTPTR_FORMAT, uc->X11); + st->cr(); + st->print( "X12=" INTPTR_FORMAT, uc->X12); + st->print(", X13=" INTPTR_FORMAT, uc->X13); + st->print(", X14=" INTPTR_FORMAT, uc->X14); + st->print(", X15=" INTPTR_FORMAT, uc->X15); + st->cr(); + st->print( "X16=" INTPTR_FORMAT, uc->X16); + st->print(", X17=" INTPTR_FORMAT, uc->X17); + st->print(", X18=" INTPTR_FORMAT, uc->X18); + st->print(", X19=" INTPTR_FORMAT, uc->X19); + st->cr(); + st->print(", X20=" INTPTR_FORMAT, uc->X20); + st->print(", X21=" INTPTR_FORMAT, uc->X21); + st->print(", X22=" INTPTR_FORMAT, uc->X22); + st->print(", X23=" INTPTR_FORMAT, uc->X23); + st->cr(); + st->print(", X24=" INTPTR_FORMAT, uc->X24); + st->print(", X25=" INTPTR_FORMAT, uc->X25); + st->print(", X26=" INTPTR_FORMAT, uc->X26); + st->print(", X27=" INTPTR_FORMAT, uc->X27); + st->print(", X28=" INTPTR_FORMAT, uc->X28); + st->cr(); + st->cr(); + + intptr_t *sp = (intptr_t *)uc->Sp; + st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", sp); + print_hex_dump(st, (address)sp, (address)(sp + 32), sizeof(intptr_t)); + st->cr(); + + // Note: it may be unsafe to inspect memory near pc. For example, pc may + // point to garbage if entry point in an nmethod is corrupted. Leave + // this at the end, and hope for the best. + address pc = (address)uc->Pc; + st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc); + print_hex_dump(st, pc - 32, pc + 32, sizeof(char)); + st->cr(); + +} + +void os::print_register_info(outputStream *st, const void *context) { + if (context == NULL) return; + + const CONTEXT* uc = (const CONTEXT*)context; + + st->print_cr("Register to memory mapping:"); + st->cr(); + // this is only for the "general purpose" registers + st->print(" X0="); print_location(st, uc->X0); + st->print(" X1="); print_location(st, uc->X1); + st->print(" X2="); print_location(st, uc->X2); + st->print(" X3="); print_location(st, uc->X3); + st->cr(); + st->print(" X4="); print_location(st, uc->X4); + st->print(" X5="); print_location(st, uc->X5); + st->print(" X6="); print_location(st, uc->X6); + st->print(" X7="); print_location(st, uc->X7); + st->cr(); + st->print(" X8="); print_location(st, uc->X8); + st->print(" X9="); print_location(st, uc->X9); + st->print("X10="); print_location(st, uc->X10); + st->print("X11="); print_location(st, uc->X11); + st->cr(); + st->print("X12="); print_location(st, uc->X12); + st->print("X13="); print_location(st, uc->X13); + st->print("X14="); print_location(st, uc->X14); + st->print("X15="); print_location(st, uc->X15); + st->cr(); + st->print("X16="); print_location(st, uc->X16); + st->print("X17="); print_location(st, uc->X17); + st->print("X18="); print_location(st, uc->X18); + st->print("X19="); print_location(st, uc->X19); + st->cr(); + st->print("X20="); print_location(st, uc->X20); + st->print("X21="); print_location(st, uc->X21); + st->print("X22="); print_location(st, uc->X22); + st->print("X23="); print_location(st, uc->X23); + st->cr(); + st->print("X24="); print_location(st, uc->X24); + st->print("X25="); print_location(st, uc->X25); + st->print("X26="); print_location(st, uc->X26); + st->print("X27="); print_location(st, uc->X27); + st->print("X28="); print_location(st, uc->X28); + + st->cr(); +} + +void os::setup_fpu() { +} + +bool os::supports_sse() { + return true; +} + +#ifndef PRODUCT +void os::verify_stack_alignment() { + assert(((intptr_t)os::current_stack_pointer() & (StackAlignmentInBytes-1)) == 0, "incorrect stack alignment"); +} +#endif + +int os::extra_bang_size_in_bytes() { + // AArch64 does not require the additional stack bang. + return 0; +} + +extern "C" { + int SpinPause() { + return 0; + } +}; diff --git a/src/hotspot/os_cpu/windows_aarch64/os_windows_aarch64.hpp b/src/hotspot/os_cpu/windows_aarch64/os_windows_aarch64.hpp new file mode 100644 index 00000000000..fedf5848f9e --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/os_windows_aarch64.hpp @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_WINDOWS_AARCH64_OS_WINDOWS_AARCH64_HPP +#define OS_CPU_WINDOWS_AARCH64_OS_WINDOWS_AARCH64_HPP + + static void setup_fpu(); + static bool supports_sse(); + + static bool register_code_area(char *low, char *high) { + // Using Vectored Exception Handling + return true; + } + +#endif // OS_CPU_WINDOWS_AARCH64_OS_WINDOWS_AARCH64_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/os_windows_aarch64.inline.hpp b/src/hotspot/os_cpu/windows_aarch64/os_windows_aarch64.inline.hpp new file mode 100644 index 00000000000..673cd3fa29d --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/os_windows_aarch64.inline.hpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_WINDOWS_AARCH64_OS_WINDOWS_AARCH64_INLINE_HPP +#define OS_CPU_WINDOWS_AARCH64_OS_WINDOWS_AARCH64_INLINE_HPP + +#include "runtime/os.hpp" + +#endif // OS_CPU_WINDOWS_AARCH64_OS_WINDOWS_AARCH64_INLINE_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/prefetch_windows_aarch64.inline.hpp b/src/hotspot/os_cpu/windows_aarch64/prefetch_windows_aarch64.inline.hpp new file mode 100644 index 00000000000..d2bd8f14119 --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/prefetch_windows_aarch64.inline.hpp @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_WINDOWS_AARCH64_PREFETCH_WINDOWS_AARCH64_INLINE_HPP +#define OS_CPU_WINDOWS_AARCH64_PREFETCH_WINDOWS_AARCH64_INLINE_HPP + +#include "runtime/prefetch.hpp" + + +inline void Prefetch::read (void *loc, intx interval) { +} + +inline void Prefetch::write(void *loc, intx interval) { +} + +#endif // OS_CPU_WINDOWS_AARCH64_PREFETCH_WINDOWS_AARCH64_INLINE_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/thread_windows_aarch64.cpp b/src/hotspot/os_cpu/windows_aarch64/thread_windows_aarch64.cpp new file mode 100644 index 00000000000..d235b4850e8 --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/thread_windows_aarch64.cpp @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "memory/metaspaceShared.hpp" +#include "runtime/frame.inline.hpp" +#include "runtime/thread.inline.hpp" + +frame JavaThread::pd_last_frame() { + assert(has_last_Java_frame(), "must have last_Java_sp() when suspended"); + vmassert(_anchor.last_Java_pc() != NULL, "not walkable"); + return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc()); +} + +// For Forte Analyzer AsyncGetCallTrace profiling support - thread is +// currently interrupted by SIGPROF +bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr, + void* ucontext, bool isInJava) { + + assert(Thread::current() == this, "caller must be current thread"); + return pd_get_top_frame(fr_addr, ucontext, isInJava); +} + +bool JavaThread::pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava) { + return pd_get_top_frame(fr_addr, ucontext, isInJava); +} + +bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava) { + + assert(this->is_Java_thread(), "must be JavaThread"); + + JavaThread* jt = (JavaThread *)this; + + // If we have a last_Java_frame, then we should use it even if + // isInJava == true. It should be more reliable than CONTEXT info. + if (jt->has_last_Java_frame() && jt->frame_anchor()->walkable()) { + *fr_addr = jt->pd_last_frame(); + return true; + } + + // At this point, we don't have a last_Java_frame, so + // we try to glean some information out of the CONTEXT + // if we were running Java code when SIGPROF came in. + if (isInJava) { + frame ret_frame = os::fetch_frame_from_context(ucontext); + if (ret_frame.pc() == NULL || ret_frame.sp() == NULL ) { + // CONTEXT wasn't useful + return false; + } + + if (MetaspaceShared::is_in_trampoline_frame(ret_frame.pc())) { + // In the middle of a trampoline call. Bail out for safety. + // This happens rarely so shouldn't affect profiling. + return false; + } + + if (!ret_frame.safe_for_sender(jt)) { +#if COMPILER2_OR_JVMCI + // C2 and JVMCI use ebp as a general register see if NULL fp helps + frame ret_frame2(ret_frame.sp(), NULL, ret_frame.pc()); + if (!ret_frame2.safe_for_sender(jt)) { + // nothing else to try if the frame isn't good + return false; + } + ret_frame = ret_frame2; +#else + // nothing else to try if the frame isn't good + return false; +#endif // COMPILER2_OR_JVMCI + } + *fr_addr = ret_frame; + return true; + } + + // nothing else to try + return false; +} + +void JavaThread::cache_global_variables() { } diff --git a/src/hotspot/os_cpu/windows_aarch64/thread_windows_aarch64.hpp b/src/hotspot/os_cpu/windows_aarch64/thread_windows_aarch64.hpp new file mode 100644 index 00000000000..2b004fd75af --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/thread_windows_aarch64.hpp @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_WINDOWS_AARCH64_THREAD_WINDOWS_AARCH64_HPP +#define OS_CPU_WINDOWS_AARCH64_THREAD_WINDOWS_AARCH64_HPP + + private: + +#ifdef ASSERT + // spill stack holds N callee-save registers at each Java call and + // grows downwards towards limit + // we need limit to check we have space for a spill and base so we + // can identify all live spill frames at GC (eventually) + address _spill_stack; + address _spill_stack_base; + address _spill_stack_limit; +#endif // ASSERT + + void pd_initialize() { + _anchor.clear(); + } + + frame pd_last_frame(); + + public: + static ByteSize last_Java_fp_offset() { + return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset(); + } + + bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, + bool isInJava); + + bool pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava); +private: + bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava); +public: + + static Thread *aarch64_get_thread_helper() { + return Thread::current(); + } + +#endif // OS_CPU_WINDOWS_AARCH64_THREAD_WINDOWS_AARCH64_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/unwind_windows_aarch64.hpp b/src/hotspot/os_cpu/windows_aarch64/unwind_windows_aarch64.hpp new file mode 100644 index 00000000000..477e0b09457 --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/unwind_windows_aarch64.hpp @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_WINDOWS_AARCH64_UNWIND_WINDOWS_AARCH64_HPP +#define OS_CPU_WINDOWS_AARCH64_UNWIND_WINDOWS_AARCH64_HPP + + +typedef unsigned char UBYTE; + +#if _MSC_VER < 1700 + +/* Not needed for VS2012 compiler, comes from winnt.h. */ +#define UNW_FLAG_EHANDLER 0x01 +#define UNW_FLAG_UHANDLER 0x02 +#define UNW_FLAG_CHAININFO 0x04 + +#endif + +// See https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling#xdata-records +typedef struct _UNWIND_INFO_EH_ONLY { + DWORD FunctionLength : 18; + DWORD Version : 2; + DWORD X : 1; // = 1 + DWORD E : 1; // = 1 + DWORD EpilogCount : 5; // = 0 + DWORD CodeWords : 5; // = 1 + DWORD UnwindCode0 : 8; + DWORD UnwindCode1 : 8; + DWORD UnwindCode2 : 8; + DWORD UnwindCode3 : 8; + DWORD ExceptionHandler; +} UNWIND_INFO_EH_ONLY, *PUNWIND_INFO_EH_ONLY; + +/* +typedef struct _RUNTIME_FUNCTION { + DWORD BeginAddress; + union { + DWORD UnwindData; + struct { + DWORD Flag : 2; + DWORD FunctionLength : 11; + DWORD RegF : 3; + DWORD RegI : 4; + DWORD H : 1; + DWORD CR : 2; + DWORD FrameSize : 9; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; +} RUNTIME_FUNCTION, *PRUNTIME_FUNCTION; +*/ + +#if _MSC_VER < 1700 + +/* Not needed for VS2012 compiler, comes from winnt.h. */ +typedef struct _DISPATCHER_CONTEXT { + ULONG64 ControlPc; + ULONG64 ImageBase; + PRUNTIME_FUNCTION FunctionEntry; + ULONG64 EstablisherFrame; + ULONG64 TargetIp; + PCONTEXT ContextRecord; +// PEXCEPTION_ROUTINE LanguageHandler; + char * LanguageHandler; // double dependency problem + PVOID HandlerData; +} DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT; + +#endif + +#if _MSC_VER < 1500 + +/* Not needed for VS2008 compiler, comes from winnt.h. */ +typedef EXCEPTION_DISPOSITION (*PEXCEPTION_ROUTINE) ( + IN PEXCEPTION_RECORD ExceptionRecord, + IN ULONG64 EstablisherFrame, + IN OUT PCONTEXT ContextRecord, + IN OUT PDISPATCHER_CONTEXT DispatcherContext +); + +#endif + +#endif // OS_CPU_WINDOWS_AARCH64_UNWIND_WINDOWS_AARCH64_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/vmStructs_windows_aarch64.hpp b/src/hotspot/os_cpu/windows_aarch64/vmStructs_windows_aarch64.hpp new file mode 100644 index 00000000000..220787823dc --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/vmStructs_windows_aarch64.hpp @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef OS_CPU_WINDOWS_AARCH64_VMSTRUCTS_WINDOWS_AARCH64_HPP +#define OS_CPU_WINDOWS_AARCH64_VMSTRUCTS_WINDOWS_AARCH64_HPP + +// These are the OS and CPU-specific fields, types and integer +// constants required by the Serviceability Agent. This file is +// referenced by vmStructs.cpp. + +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ + \ + /******************************/ \ + /* Threads (NOTE: incomplete) */ \ + /******************************/ \ + \ + nonstatic_field(OSThread, _thread_id, OSThread::thread_id_t) \ + unchecked_nonstatic_field(OSThread, _thread_handle, sizeof(HANDLE)) /* NOTE: no type */ + +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) \ + \ + declare_unsigned_integer_type(OSThread::thread_id_t) + +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) + +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) + +#endif // OS_CPU_WINDOWS_AARCH64_VMSTRUCTS_WINDOWS_AARCH64_HPP diff --git a/src/hotspot/os_cpu/windows_aarch64/vm_version_windows_aarch64.cpp b/src/hotspot/os_cpu/windows_aarch64/vm_version_windows_aarch64.cpp new file mode 100644 index 00000000000..80270aa62e1 --- /dev/null +++ b/src/hotspot/os_cpu/windows_aarch64/vm_version_windows_aarch64.cpp @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "runtime/os.hpp" +#include "runtime/vm_version.hpp" + +int VM_Version::get_current_sve_vector_length() { + assert(_features & CPU_SVE, "should not call this"); + ShouldNotReachHere(); + return 0; +} + +int VM_Version::set_and_get_current_sve_vector_lenght(int length) { + assert(_features & CPU_SVE, "should not call this"); + ShouldNotReachHere(); + return 0; +} + +void VM_Version::get_os_cpu_info() { + + if (IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE)) _features |= CPU_CRC32; + if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE)) _features |= CPU_AES | CPU_SHA1 | CPU_SHA2; + if (IsProcessorFeaturePresent(PF_ARM_VFP_32_REGISTERS_AVAILABLE)) _features |= CPU_ASIMD; + // No check for CPU_PMULL, CPU_SVE, CPU_SVE2 + + __int64 dczid_el0 = _ReadStatusReg(0x5807 /* ARM64_DCZID_EL0 */); + + if (!(dczid_el0 & 0x10)) { + _zva_length = 4 << (dczid_el0 & 0xf); + } + + { + PSYSTEM_LOGICAL_PROCESSOR_INFORMATION buffer = NULL; + DWORD returnLength = 0; + + // See https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getlogicalprocessorinformation + GetLogicalProcessorInformation(NULL, &returnLength); + assert(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Unexpected return from GetLogicalProcessorInformation"); + + buffer = (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION)os::malloc(returnLength, mtInternal); + BOOL rc = GetLogicalProcessorInformation(buffer, &returnLength); + assert(rc, "Unexpected return from GetLogicalProcessorInformation"); + + _icache_line_size = _dcache_line_size = -1; + for (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION ptr = buffer; ptr < buffer + returnLength / sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION); ptr++) { + switch (ptr->Relationship) { + case RelationCache: + // Cache data is in ptr->Cache, one CACHE_DESCRIPTOR structure for each cache. + PCACHE_DESCRIPTOR Cache = &ptr->Cache; + if (Cache->Level == 1) { + _icache_line_size = _dcache_line_size = Cache->LineSize; + } + break; + } + } + os::free(buffer); + } + + { + char* buf = ::getenv("PROCESSOR_IDENTIFIER"); + if (buf && strstr(buf, "Ampere(TM)") != NULL) { + _cpu = CPU_AMCC; + } else if (buf && strstr(buf, "Cavium Inc.") != NULL) { + _cpu = CPU_CAVIUM; + } else { + log_info(os)("VM_Version: unknown CPU model"); + } + + if (_cpu) { + SYSTEM_INFO si; + GetSystemInfo(&si); + _model = si.wProcessorLevel; + _variant = si.wProcessorRevision / 0xFF; + _revision = si.wProcessorRevision & 0xFF; + } + } +} diff --git a/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp b/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp index 3d7f2401c72..0543463b68d 100644 --- a/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp +++ b/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp @@ -354,6 +354,41 @@ address os::current_stack_pointer() { } #endif +bool os::win32::get_frame_at_stack_banging_point(JavaThread* thread, + struct _EXCEPTION_POINTERS* exceptionInfo, address pc, frame* fr) { + PEXCEPTION_RECORD exceptionRecord = exceptionInfo->ExceptionRecord; + address addr = (address) exceptionRecord->ExceptionInformation[1]; + if (Interpreter::contains(pc)) { + *fr = os::fetch_frame_from_context((void*)exceptionInfo->ContextRecord); + if (!fr->is_first_java_frame()) { + // get_frame_at_stack_banging_point() is only called when we + // have well defined stacks so java_sender() calls do not need + // to assert safe_for_sender() first. + *fr = fr->java_sender(); + } + } else { + // more complex code with compiled code + assert(!Interpreter::contains(pc), "Interpreted methods should have been handled above"); + CodeBlob* cb = CodeCache::find_blob(pc); + if (cb == NULL || !cb->is_nmethod() || cb->is_frame_complete_at(pc)) { + // Not sure where the pc points to, fallback to default + // stack overflow handling + return false; + } else { + // in compiled code, the stack banging is performed just after the return pc + // has been pushed on the stack + intptr_t* fp = (intptr_t*)exceptionInfo->ContextRecord->REG_FP; + intptr_t* sp = (intptr_t*)exceptionInfo->ContextRecord->REG_SP; + *fr = frame(sp + 1, fp, (address)*sp); + if (!fr->is_java_frame()) { + // See java_sender() comment above. + *fr = fr->java_sender(); + } + } + } + assert(fr->is_java_frame(), "Safety check"); + return true; +} #ifndef AMD64 intptr_t* _get_previous_fp() { diff --git a/src/hotspot/os_cpu/windows_x86/thread_windows_x86.hpp b/src/hotspot/os_cpu/windows_x86/thread_windows_x86.hpp index f141691ff4e..21577346246 100644 --- a/src/hotspot/os_cpu/windows_x86/thread_windows_x86.hpp +++ b/src/hotspot/os_cpu/windows_x86/thread_windows_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -40,20 +40,10 @@ frame pd_last_frame(); public: - // Mutators are highly dangerous.... - intptr_t* last_Java_fp() { return _anchor.last_Java_fp(); } - void set_last_Java_fp(intptr_t* fp) { _anchor.set_last_Java_fp(fp); } - - void set_base_of_stack_pointer(intptr_t* base_sp) {} - - static ByteSize last_Java_fp_offset() { return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset(); } - intptr_t* base_of_stack_pointer() { return NULL; } - void record_base_of_stack_pointer() {} - bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava); @@ -64,11 +54,4 @@ private: bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava); - public: - // These routines are only used on cpu architectures that - // have separate register stacks (Itanium). - static bool register_stack_overflow() { return false; } - static void enable_register_stack_guard() {} - static void disable_register_stack_guard() {} - #endif // OS_CPU_WINDOWS_X86_THREAD_WINDOWS_X86_HPP diff --git a/src/hotspot/share/aot/aotLoader.cpp b/src/hotspot/share/aot/aotLoader.cpp index 59dd56ab8fc..d1150589b97 100644 --- a/src/hotspot/share/aot/aotLoader.cpp +++ b/src/hotspot/share/aot/aotLoader.cpp @@ -31,6 +31,7 @@ #include "oops/compressedOops.hpp" #include "oops/method.hpp" #include "runtime/arguments.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/handles.inline.hpp" #include "runtime/os.inline.hpp" #include "runtime/timerTrace.hpp" diff --git a/src/hotspot/share/asm/macroAssembler_common.cpp b/src/hotspot/share/asm/macroAssembler_common.cpp index 5f00b922890..c1b5640f783 100644 --- a/src/hotspot/share/asm/macroAssembler_common.cpp +++ b/src/hotspot/share/asm/macroAssembler_common.cpp @@ -189,7 +189,7 @@ void MacroAssembler::shuffle_inline_args_common(bool is_packing, bool receiver_o // Emit code for packing/unpacking inline type arguments // We try multiple times and eventually start spilling to resolve (circular) dependencies - bool done = false; + bool done = (args_passed_to == 0); for (int i = 0; i < 2*args_passed_to && !done; ++i) { done = true; bool spill = (i > args_passed_to); // Start spilling? @@ -209,8 +209,6 @@ void MacroAssembler::shuffle_inline_args_common(bool is_packing, bool receiver_o to_index += step; } } else { - assert(0 <= from_index && from_index < args_passed, "index out of bounds"); - assert(0 <= to_index && to_index < args_passed_to, "index out of bounds"); if (spill) { // This call returns true IFF we should keep trying to spill in this round. spill = shuffle_inline_args_spill(is_packing, sig_cc, sig_index, regs, from_index, args_passed, @@ -221,22 +219,23 @@ void MacroAssembler::shuffle_inline_args_common(bool is_packing, bool receiver_o VMReg from_reg = regs[from_index].first(); done &= move_helper(from_reg, regs_to[to_index].first(), bt, reg_state, ret_off, extra_stack_offset); to_index += step; - } else if (is_packing || !receiver_only || (from_index == 0 && bt == T_VOID)) { - if (is_packing) { - VMReg reg_to = regs_to[to_index].first(); - done &= pack_inline_helper(sig_cc, sig_index, vtarg_index, reg_to, regs, args_passed, from_index, - reg_state, ret_off, extra_stack_offset); - vtarg_index ++; - to_index ++; - continue; // from_index already adjusted - } else { - VMReg from_reg = regs[from_index].first(); - done &= unpack_inline_helper(sig_cc, sig_index, from_reg, regs_to, to_index, reg_state, ret_off, extra_stack_offset); + from_index += step; + } else if (is_packing) { + VMReg reg_to = regs_to[to_index].first(); + done &= pack_inline_helper(sig_cc, sig_index, vtarg_index, reg_to, regs, args_passed, from_index, + reg_state, ret_off, extra_stack_offset); + vtarg_index++; + to_index++; + } else if (!receiver_only || (from_index == 0 && bt == T_VOID)) { + VMReg from_reg = regs[from_index].first(); + done &= unpack_inline_helper(sig_cc, sig_index, from_reg, from_index, regs_to, to_index, reg_state, ret_off, extra_stack_offset); + if (from_index == -1 && sig_index != 0) { + // This can happen when we are confusing an empty inline type argument which is + // not counted in the scalarized signature for the receiver. Just ignore it. + assert(receiver_only, "sanity"); + from_index = 0; } - } else { - continue; } - from_index += step; } } } diff --git a/src/hotspot/share/c1/c1_GraphBuilder.cpp b/src/hotspot/share/c1/c1_GraphBuilder.cpp index bf682d961ee..24fdf6c9066 100644 --- a/src/hotspot/share/c1/c1_GraphBuilder.cpp +++ b/src/hotspot/share/c1/c1_GraphBuilder.cpp @@ -1042,7 +1042,7 @@ void GraphBuilder::load_indexed(BasicType type) { set_pending_load_indexed(dli); return; // Nothing else to do for now } else { - NewInlineTypeInstance* new_instance = new NewInlineTypeInstance(elem_klass, state_before, false); + NewInlineTypeInstance* new_instance = new NewInlineTypeInstance(elem_klass, state_before); _memory->new_instance(new_instance); apush(append_split(new_instance)); load_indexed = new LoadIndexed(array, index, length, type, state_before); @@ -1754,6 +1754,8 @@ Value GraphBuilder::make_constant(ciConstant field_value, ciField* field) { void GraphBuilder::copy_inline_content(ciInlineKlass* vk, Value src, int src_off, Value dest, int dest_off, ValueStack* state_before, bool needs_patching) { + assert(!needs_patching, "Can't patch flattened inline type field access"); + assert(vk->nof_nonstatic_fields() > 0, "Empty inline type access should be removed"); src->set_escaped(); for (int i = 0; i < vk->nof_nonstatic_fields(); i++) { ciField* inner_field = vk->nonstatic_field_at(i); @@ -1776,7 +1778,7 @@ void GraphBuilder::access_field(Bytecodes::Code code) { // call will_link again to determine if the field is valid. const bool needs_patching = !holder->is_loaded() || !field->will_link(method(), code) || - PatchALot; + (!field->is_flattened() && PatchALot); ValueStack* state_before = NULL; if (!holder->is_initialized() || needs_patching) { @@ -1795,11 +1797,11 @@ void GraphBuilder::access_field(Bytecodes::Code code) { } } - if (field->is_final() && (code == Bytecodes::_putfield || code == Bytecodes::_withfield)) { + if (field->is_final() && code == Bytecodes::_putfield) { scope()->set_wrote_final(); } - if (code == Bytecodes::_putfield || code == Bytecodes::_withfield) { + if (code == Bytecodes::_putfield) { scope()->set_wrote_fields(); if (field->is_volatile()) { scope()->set_wrote_volatile(); @@ -1816,6 +1818,9 @@ void GraphBuilder::access_field(Bytecodes::Code code) { assert(!field->is_stable() || !field_value.is_null_or_zero(), "stable static w/ default value shouldn't be a constant"); constant = make_constant(field_value, field); + } else if (field_type == T_INLINE_TYPE && field->type()->as_inline_klass()->is_empty()) { + // Loading from a field of an empty inline type. Just return the default instance. + constant = new Constant(new InstanceConstant(field->type()->as_inline_klass()->default_instance())); } if (constant != NULL) { push(type, append(constant)); @@ -1839,6 +1844,10 @@ void GraphBuilder::access_field(Bytecodes::Code code) { Value mask = append(new Constant(new IntConstant(1))); val = append(new LogicOp(Bytecodes::_iand, val, mask)); } + if (field_type == T_INLINE_TYPE && field->type()->as_inline_klass()->is_empty()) { + // Storing to a field of an empty inline type. Ignore. + break; + } append(new StoreField(append(obj), offset, field, val, true, state_before, needs_patching)); break; } @@ -1853,7 +1862,11 @@ void GraphBuilder::access_field(Bytecodes::Code code) { if (!has_pending_field_access() && !has_pending_load_indexed()) { obj = apop(); ObjectType* obj_type = obj->type()->as_ObjectType(); - if (field->is_constant() && !field->is_flattened() && obj_type->is_constant() && !PatchALot) { + if (field_type == T_INLINE_TYPE && field->type()->as_inline_klass()->is_empty()) { + // Loading from a field of an empty inline type. Just return the default instance. + null_check(obj); + constant = new Constant(new InstanceConstant(field->type()->as_inline_klass()->default_instance())); + } else if (field->is_constant() && !field->is_flattened() && obj_type->is_constant() && !PatchALot) { ciObject* const_oop = obj_type->constant_value(); if (!const_oop->is_null_object() && const_oop->is_loaded()) { ciConstant field_value = field->constant_value_of(const_oop); @@ -1885,11 +1898,13 @@ void GraphBuilder::access_field(Bytecodes::Code code) { if (!field->is_flattened()) { LoadField* load; if (has_pending_field_access()) { + assert(!needs_patching, "Can't patch delayed field access"); load = new LoadField(pending_field_access()->obj(), pending_field_access()->offset() + offset - field->holder()->as_inline_klass()->first_field_offset(), field, false, state_before, needs_patching); set_pending_field_access(NULL); } else if (has_pending_load_indexed()) { + assert(!needs_patching, "Can't patch delayed field access"); pending_load_indexed()->update(field, offset - field->holder()->as_inline_klass()->first_field_offset()); LoadIndexed* li = pending_load_indexed()->load_instr(); li->set_type(type); @@ -1904,17 +1919,16 @@ void GraphBuilder::access_field(Bytecodes::Code code) { assert(replacement->is_linked() || !replacement->can_be_linked(), "should already by linked"); // Writing an (integer) value to a boolean, byte, char or short field includes an implicit narrowing // conversion. Emit an explicit conversion here to get the correct field value after the write. - BasicType bt = field->type()->basic_type(); - switch (bt) { + switch (field_type) { case T_BOOLEAN: case T_BYTE: - replacement = append(new Convert(Bytecodes::_i2b, replacement, as_ValueType(bt))); + replacement = append(new Convert(Bytecodes::_i2b, replacement, type)); break; case T_CHAR: - replacement = append(new Convert(Bytecodes::_i2c, replacement, as_ValueType(bt))); + replacement = append(new Convert(Bytecodes::_i2c, replacement, type)); break; case T_SHORT: - replacement = append(new Convert(Bytecodes::_i2s, replacement, as_ValueType(bt))); + replacement = append(new Convert(Bytecodes::_i2s, replacement, type)); break; default: break; @@ -1924,10 +1938,19 @@ void GraphBuilder::access_field(Bytecodes::Code code) { push(type, append(load)); } } else { + // Look at the next bytecode to check if we can delay the field access + bool can_delay_access = false; ciBytecodeStream s(method()); s.force_bci(bci()); s.next(); if (s.cur_bc() == Bytecodes::_getfield && !needs_patching) { + ciField* next_field = s.get_field(will_link); + bool next_needs_patching = !next_field->holder()->is_loaded() || + !next_field->will_link(method(), code) || + PatchALot; + can_delay_access = !next_needs_patching; + } + if (can_delay_access) { if (has_pending_load_indexed()) { pending_load_indexed()->update(field, offset - field->holder()->as_inline_klass()->first_field_offset()); } else if (has_pending_field_access()) { @@ -1938,22 +1961,27 @@ void GraphBuilder::access_field(Bytecodes::Code code) { set_pending_field_access(dfa); } } else { - assert(field->type()->is_inlinetype(), "Sanity check"); ciInlineKlass* inline_klass = field->type()->as_inline_klass(); - assert(field->type()->is_inlinetype(), "Sanity check"); scope()->set_wrote_final(); scope()->set_wrote_fields(); - if (has_pending_load_indexed()) { + if (inline_klass->is_empty()) { + apush(append(new Constant(new InstanceConstant(inline_klass->default_instance())))); + if (has_pending_field_access()) { + set_pending_field_access(NULL); + } else if (has_pending_load_indexed()) { + set_pending_load_indexed(NULL); + } + } else if (has_pending_load_indexed()) { + assert(!needs_patching, "Can't patch delayed field access"); pending_load_indexed()->update(field, offset - field->holder()->as_inline_klass()->first_field_offset()); - NewInlineTypeInstance* vt = new NewInlineTypeInstance(field->type()->as_inline_klass(), - pending_load_indexed()->state_before(), false); + NewInlineTypeInstance* vt = new NewInlineTypeInstance(inline_klass, pending_load_indexed()->state_before()); _memory->new_instance(vt); pending_load_indexed()->load_instr()->set_vt(vt); apush(append_split(vt)); append(pending_load_indexed()->load_instr()); set_pending_load_indexed(NULL); } else { - NewInlineTypeInstance* new_instance = new NewInlineTypeInstance(inline_klass, state_before, false); + NewInlineTypeInstance* new_instance = new NewInlineTypeInstance(inline_klass, state_before); _memory->new_instance(new_instance); apush(append_split(new_instance)); if (has_pending_field_access()) { @@ -1964,7 +1992,7 @@ void GraphBuilder::access_field(Bytecodes::Code code) { set_pending_field_access(NULL); } else { copy_inline_content(inline_klass, obj, field->offset(), new_instance, inline_klass->first_field_offset(), - state_before, needs_patching); + state_before, needs_patching); } } } @@ -1972,7 +2000,6 @@ void GraphBuilder::access_field(Bytecodes::Code code) { } break; } - case Bytecodes::_withfield: case Bytecodes::_putfield: { Value val = pop(type); val->set_escaped(); @@ -1980,23 +2007,22 @@ void GraphBuilder::access_field(Bytecodes::Code code) { if (state_before == NULL) { state_before = copy_state_for_exception(); } - if (field->type()->basic_type() == T_BOOLEAN) { + if (field_type == T_BOOLEAN) { Value mask = append(new Constant(new IntConstant(1))); val = append(new LogicOp(Bytecodes::_iand, val, mask)); } - - if (!field->is_flattened()) { + if (field_type == T_INLINE_TYPE && field->type()->as_inline_klass()->is_empty()) { + // Storing to a field of an empty inline type. Ignore. + null_check(obj); + } else if (!field->is_flattened()) { StoreField* store = new StoreField(obj, offset, field, val, false, state_before, needs_patching); if (!needs_patching) store = _memory->store(store); if (store != NULL) { append(store); } } else { - assert(field->type()->is_inlinetype(), "Sanity check"); ciInlineKlass* inline_klass = field->type()->as_inline_klass(); - int flattening_offset = field->offset() - inline_klass->first_field_offset(); - copy_inline_content(inline_klass, val, inline_klass->first_field_offset(), obj, field->offset(), - state_before, needs_patching); + copy_inline_content(inline_klass, val, inline_klass->first_field_offset(), obj, offset, state_before, needs_patching); } break; } @@ -2020,22 +2046,20 @@ void GraphBuilder::withfield(int field_index) !field_modify->will_link(method(), Bytecodes::_withfield) || PatchALot; - scope()->set_wrote_final(); scope()->set_wrote_fields(); const int offset = !needs_patching ? field_modify->offset() : -1; + ValueStack* state_before = copy_state_before(); if (!holder->is_loaded() || needs_patching /* FIXME: 8228634 - field_modify->will_link() may incorrectly return false */ ) { - ValueStack* state_before = copy_state_before(); Value val = pop(type); Value obj = apop(); apush(append_split(new WithField(state_before))); return; } - ValueStack* state_before = copy_state_before(); Value val = pop(type); Value obj = apop(); @@ -2048,7 +2072,7 @@ void GraphBuilder::withfield(int field_index) new_instance = obj->as_NewInlineTypeInstance(); apush(append_split(new_instance)); } else { - new_instance = new NewInlineTypeInstance(holder->as_inline_klass(), state_before, false); + new_instance = new NewInlineTypeInstance(holder->as_inline_klass(), state_before); _memory->new_instance(new_instance); apush(append_split(new_instance)); @@ -2058,10 +2082,10 @@ void GraphBuilder::withfield(int field_index) if (field->offset() != offset) { if (field->is_flattened()) { - assert(field->type()->is_inlinetype(), "Sanity check"); - assert(field->type()->is_inlinetype(), "Only inline types can be flattened"); ciInlineKlass* vk = field->type()->as_inline_klass(); - copy_inline_content(vk, obj, off, new_instance, vk->first_field_offset(), state_before, needs_patching); + if (!vk->is_empty()) { + copy_inline_content(vk, obj, off, new_instance, vk->first_field_offset(), state_before, needs_patching); + } } else { // Only load those fields who are not modified LoadField* load = new LoadField(obj, off, field, false, state_before, needs_patching); @@ -2079,9 +2103,10 @@ void GraphBuilder::withfield(int field_index) val = append(new LogicOp(Bytecodes::_iand, val, mask)); } if (field_modify->is_flattened()) { - assert(field_modify->type()->is_inlinetype(), "Only inline types can be flattened"); ciInlineKlass* vk = field_modify->type()->as_inline_klass(); - copy_inline_content(vk, val, vk->first_field_offset(), new_instance, field_modify->offset(), state_before, needs_patching); + if (!vk->is_empty()) { + copy_inline_content(vk, val, vk->first_field_offset(), new_instance, field_modify->offset(), state_before, needs_patching); + } } else { StoreField* store = new StoreField(new_instance, offset, field_modify, val, false, state_before, needs_patching); append(store); @@ -2457,7 +2482,6 @@ void GraphBuilder::new_instance(int klass_index) { bool will_link; ciKlass* klass = stream()->get_klass(will_link); assert(klass->is_instance_klass(), "must be an instance klass"); - assert(!klass->is_inlinetype(), "must not be an inline klass"); NewInstance* new_instance = new NewInstance(klass->as_instance_klass(), state_before, stream()->is_unresolved_klass()); _memory->new_instance(new_instance); apush(append_split(new_instance)); @@ -2465,8 +2489,9 @@ void GraphBuilder::new_instance(int klass_index) { void GraphBuilder::default_value(int klass_index) { bool will_link; - if (!stream()->is_unresolved_klass()) { - ciInlineKlass* vk = stream()->get_klass(will_link)->as_inline_klass(); + ciKlass* klass = stream()->get_klass(will_link); + if (!stream()->is_unresolved_klass() && klass->is_inlinetype()) { + ciInlineKlass* vk = klass->as_inline_klass(); apush(append(new Constant(new InstanceConstant(vk->default_instance())))); } else { ValueStack* state_before = copy_state_before(); diff --git a/src/hotspot/share/c1/c1_Instruction.cpp b/src/hotspot/share/c1/c1_Instruction.cpp index d5991ef8c8c..6fd9a7b5592 100644 --- a/src/hotspot/share/c1/c1_Instruction.cpp +++ b/src/hotspot/share/c1/c1_Instruction.cpp @@ -307,15 +307,6 @@ ciType* NewInstance::declared_type() const { return exact_type(); } -Value NewInlineTypeInstance::depends_on() { - if (_depends_on != this) { - if (_depends_on->as_NewInlineTypeInstance() != NULL) { - return _depends_on->as_NewInlineTypeInstance()->depends_on(); - } - } - return _depends_on; -} - ciType* NewInlineTypeInstance::exact_type() const { return klass(); } diff --git a/src/hotspot/share/c1/c1_Instruction.hpp b/src/hotspot/share/c1/c1_Instruction.hpp index 0e4894e9196..9c5870bc78f 100644 --- a/src/hotspot/share/c1/c1_Instruction.hpp +++ b/src/hotspot/share/c1/c1_Instruction.hpp @@ -1386,39 +1386,25 @@ LEAF(NewInstance, StateSplit) }; LEAF(NewInlineTypeInstance, StateSplit) - bool _is_unresolved; ciInlineKlass* _klass; - Value _depends_on; // Link to instance on with withfield was called on - bool _is_optimizable_for_withfield; bool _in_larval_state; int _first_local_index; int _on_stack_count; public: // Default creation, always allocated for now - NewInlineTypeInstance(ciInlineKlass* klass, ValueStack* state_before, bool is_unresolved, Value depends_on = NULL, bool from_default_value = false) + NewInlineTypeInstance(ciInlineKlass* klass, ValueStack* state_before) : StateSplit(instanceType, state_before) - , _is_unresolved(is_unresolved) , _klass(klass) - , _is_optimizable_for_withfield(from_default_value) , _in_larval_state(true) , _first_local_index(-1) , _on_stack_count(1) { - if (depends_on == NULL) { - _depends_on = this; - } else { - _depends_on = depends_on; - } set_null_free(true); } // accessors - bool is_unresolved() const { return _is_unresolved; } - Value depends_on(); - ciInlineKlass* klass() const { return _klass; } - virtual bool needs_exception_state() const { return false; } // generic @@ -1429,10 +1415,6 @@ LEAF(NewInlineTypeInstance, StateSplit) // Only done in LIR Generator -> map everything to object void set_to_object_type() { set_type(instanceType); } - // withfield optimization - virtual void set_escaped() { - _is_optimizable_for_withfield = false; - } virtual void set_local_index(int index) { if (_first_local_index != index) { if (_first_local_index == -1) { @@ -1459,7 +1441,6 @@ LEAF(NewInlineTypeInstance, StateSplit) decrement_on_stack_count(); } } - }; BASE(NewArray, StateSplit) diff --git a/src/hotspot/share/c1/c1_LIRGenerator.cpp b/src/hotspot/share/c1/c1_LIRGenerator.cpp index 2440a630043..6d5806188fb 100644 --- a/src/hotspot/share/c1/c1_LIRGenerator.cpp +++ b/src/hotspot/share/c1/c1_LIRGenerator.cpp @@ -673,10 +673,15 @@ void LIRGenerator::print_if_not_loaded(const NewInstance* new_instance) { } #endif -void LIRGenerator::new_instance(LIR_Opr dst, ciInstanceKlass* klass, bool is_unresolved, LIR_Opr scratch1, LIR_Opr scratch2, LIR_Opr scratch3, LIR_Opr scratch4, LIR_Opr klass_reg, CodeEmitInfo* info) { - klass2reg_with_patching(klass_reg, klass, info, is_unresolved); - // If klass is not loaded we do not know if the klass has finalizers: - if (UseFastNewInstance && klass->is_loaded() +void LIRGenerator::new_instance(LIR_Opr dst, ciInstanceKlass* klass, bool is_unresolved, bool allow_inline, LIR_Opr scratch1, LIR_Opr scratch2, LIR_Opr scratch3, LIR_Opr scratch4, LIR_Opr klass_reg, CodeEmitInfo* info) { + if (allow_inline) { + assert(!is_unresolved && klass->is_loaded(), "inline type klass should be resolved"); + __ metadata2reg(klass->constant_encoding(), klass_reg); + } else { + klass2reg_with_patching(klass_reg, klass, info, is_unresolved); + } + // If klass is not loaded we do not know if the klass has finalizers or is an unexpected inline klass + if (UseFastNewInstance && klass->is_loaded() && (allow_inline || !klass->is_inlinetype()) && !Klass::layout_helper_needs_slow_path(klass->layout_helper())) { Runtime1::StubID stub_id = klass->is_initialized() ? Runtime1::fast_new_instance_id : Runtime1::fast_new_instance_init_check_id; @@ -690,8 +695,8 @@ void LIRGenerator::new_instance(LIR_Opr dst, ciInstanceKlass* klass, bool is_unr __ allocate_object(dst, scratch1, scratch2, scratch3, scratch4, oopDesc::header_size(), instance_size, klass_reg, !klass->is_initialized(), slow_path); } else { - CodeStub* slow_path = new NewInstanceStub(klass_reg, dst, klass, info, Runtime1::new_instance_id); - __ branch(lir_cond_always, slow_path); + CodeStub* slow_path = new NewInstanceStub(klass_reg, dst, klass, info, allow_inline ? Runtime1::new_instance_id : Runtime1::new_instance_no_inline_id); + __ jump(slow_path); __ branch_destination(slow_path->continuation()); } } @@ -1551,25 +1556,18 @@ void LIRGenerator::do_StoreField(StoreField* x) { } #endif + if (!inline_type_field_access_prolog(x, info)) { + // Field store will always deopt due to unloaded field or holder klass + return; + } + if (x->needs_null_check() && (needs_patching || MacroAssembler::needs_explicit_null_check(x->offset()))) { - if (needs_patching && x->field()->signature()->is_Q_signature()) { - // We are storing a field of type "QT;" into holder class H, but H is not yet - // loaded. (If H had been loaded, then T must also have already been loaded - // due to the "Q" signature, and needs_patching would be false). - assert(!x->field()->holder()->is_loaded(), "must be"); - // We don't know the offset of this field. Let's deopt and recompile. - CodeStub* stub = new DeoptimizeStub(new CodeEmitInfo(info), - Deoptimization::Reason_unloaded, - Deoptimization::Action_make_not_entrant); - __ branch(lir_cond_always, stub); - } else { - // Emit an explicit null check because the offset is too large. - // If the class is not loaded and the object is NULL, we need to deoptimize to throw a - // NoClassDefFoundError in the interpreter instead of an implicit NPE from compiled code. - __ null_check(object.result(), new CodeEmitInfo(info), /* deoptimize */ needs_patching); - } + // Emit an explicit null check because the offset is too large. + // If the class is not loaded and the object is NULL, we need to deoptimize to throw a + // NoClassDefFoundError in the interpreter instead of an implicit NPE from compiled code. + __ null_check(object.result(), new CodeEmitInfo(info), /* deoptimize */ needs_patching); } DecoratorSet decorators = IN_HEAP; @@ -1647,16 +1645,13 @@ void LIRGenerator::access_sub_element(LIRItem& array, LIRItem& index, LIR_Opr& r elm_item, LIR_OprFact::intConst(sub_offset), result, NULL, NULL); - Constant* default_value = NULL; if (field->signature()->is_Q_signature()) { assert(field->type()->as_inline_klass()->is_loaded(), "Must be"); - default_value = new Constant(new InstanceConstant(field->type()->as_inline_klass()->default_instance())); - } - if (default_value != NULL) { LabelObj* L_end = new LabelObj(); __ cmp(lir_cond_notEqual, result, LIR_OprFact::oopConst(NULL)); __ branch(lir_cond_notEqual, L_end->label()); set_in_conditional_code(true); + Constant* default_value = new Constant(new InstanceConstant(field->type()->as_inline_klass()->default_instance())); __ move(load_constant(default_value), result); __ branch_destination(L_end->label()); set_in_conditional_code(false); @@ -1681,20 +1676,22 @@ void LIRGenerator::access_flattened_array(bool is_load, LIRItem& array, LIRItem& assert(!inner_field->is_flattened(), "flattened fields must have been expanded"); int obj_offset = inner_field->offset(); int elm_offset = obj_offset - elem_klass->first_field_offset() + sub_offset; // object header is not stored in array. - BasicType field_type = inner_field->type()->basic_type(); - switch (field_type) { + + // Types which are smaller than int are still passed in an int register. + BasicType reg_type = field_type; + switch (reg_type) { case T_BYTE: case T_BOOLEAN: case T_SHORT: case T_CHAR: - field_type = T_INT; + reg_type = T_INT; break; default: break; } - LIR_Opr temp = new_register(field_type); + LIR_Opr temp = new_register(reg_type); TempResolvedAddress* elm_resolved_addr = new TempResolvedAddress(as_ValueType(field_type), elm_op); LIRItem elm_item(elm_resolved_addr, this); @@ -1944,78 +1941,29 @@ LIR_Opr LIRGenerator::access_resolve(DecoratorSet decorators, LIR_Opr obj) { return _barrier_set->resolve(this, decorators, obj); } -Constant* LIRGenerator::flattened_field_load_prolog(LoadField* x, CodeEmitInfo* info) { +bool LIRGenerator::inline_type_field_access_prolog(AccessField* x, CodeEmitInfo* info) { ciField* field = x->field(); - ciInstanceKlass* holder = field->holder(); - Constant* default_value = NULL; - - // Unloaded "QV;" klasses are represented by a ciInstanceKlass - bool field_type_unloaded = field->type()->is_instance_klass() && !field->type()->as_instance_klass()->is_loaded(); - - // Check for edge cases (1), (2) and (3) for getstatic and getfield - bool deopt = false; - bool need_default = false; - if (field->is_static()) { - // (1) holder is unloaded -- no problem: it will be loaded by patching, and field offset will be determined. - // No check needed here. - - if (field_type_unloaded) { - // (2) field type is unloaded -- problem: we don't know what the default value is. Let's deopt. - // FIXME: consider getting the default value in patching code. - deopt = true; - } else { - need_default = true; - } - - // (3) field is not flattened -- we don't care: static fields are never flattened. - // No check needed here. - } else { - if (!holder->is_loaded()) { - // (1) holder is unloaded -- problem: we needed the field offset back in GraphBuilder::access_field() - // FIXME: consider getting field offset in patching code (but only if the field - // type was loaded at compilation time). - deopt = true; - } else if (field_type_unloaded) { - // (2) field type is unloaded -- problem: we don't know whether it's flattened or not. Let's deopt - deopt = true; - } else if (!field->is_flattened()) { - // (3) field is not flattened -- need default value in cases of uninitialized field - need_default = true; - } - } - - if (deopt) { - assert(!need_default, "deopt and need_default cannot both be true"); - assert(x->needs_patching(), "must be"); - assert(info != NULL, "must be"); + assert(!field->is_flattened(), "Flattened field access should have been expanded"); + if (!field->signature()->is_Q_signature()) { + return true; // Not an inline type field + } + // Deoptimize if the access is non-static and requires patching (holder not loaded + // or not accessible) because then we only have partial field information and the + // field could be flattened (see ciField constructor). + bool could_be_flat = !x->is_static() && x->needs_patching(); + // Deoptimize if we load from a static field with an unloaded type because we need + // the default value if the field is null. + bool could_be_null = x->is_static() && x->as_LoadField() != NULL && !field->type()->is_loaded(); + assert(!could_be_null || !field->holder()->is_loaded(), "inline type field should be loaded"); + if (could_be_flat || could_be_null) { + assert(x->needs_patching(), "no deopt required"); CodeStub* stub = new DeoptimizeStub(new CodeEmitInfo(info), Deoptimization::Reason_unloaded, Deoptimization::Action_make_not_entrant); - __ branch(lir_cond_always, stub); - } else if (need_default) { - assert(!field_type_unloaded, "must be"); - assert(field->type()->is_inlinetype(), "must be"); - ciInlineKlass* inline_klass = field->type()->as_inline_klass(); - assert(inline_klass->is_loaded(), "must be"); - - if (field->is_static() && holder->is_loaded()) { - ciInstance* mirror = field->holder()->java_mirror(); - ciObject* val = mirror->field_value(field).as_object(); - if (val->is_null_object()) { - // This is a non-nullable static field, but it's not initialized. - // We need to do a null check, and replace it with the default value. - } else { - // No need to perform null check on this static field - need_default = false; - } - } - - if (need_default) { - default_value = new Constant(new InstanceConstant(inline_klass->default_instance())); - } + __ jump(stub); + return false; } - - return default_value; + return true; } void LIRGenerator::do_LoadField(LoadField* x) { @@ -2047,9 +1995,11 @@ void LIRGenerator::do_LoadField(LoadField* x) { } #endif - Constant* default_value = NULL; - if (x->field()->signature()->is_Q_signature()) { - default_value = flattened_field_load_prolog(x, info); + if (!inline_type_field_access_prolog(x, info)) { + // Field load will always deopt due to unloaded field or holder klass + LIR_Opr result = rlock_result(x, field_type); + __ move(LIR_OprFact::oopConst(NULL), result); + return; } bool stress_deopt = StressLoopInvariantCodeMotion && info && info->deoptimize_on_exception(); @@ -2081,11 +2031,26 @@ void LIRGenerator::do_LoadField(LoadField* x) { object, LIR_OprFact::intConst(x->offset()), result, info ? new CodeEmitInfo(info) : NULL, info); - if (default_value != NULL) { + ciField* field = x->field(); + if (field->signature()->is_Q_signature()) { + // Load from non-flattened inline type field requires + // a null check to replace null with the default value. + ciInlineKlass* inline_klass = field->type()->as_inline_klass(); + assert(inline_klass->is_loaded(), "field klass must be loaded"); + + ciInstanceKlass* holder = field->holder(); + if (field->is_static() && holder->is_loaded()) { + ciObject* val = holder->java_mirror()->field_value(field).as_object(); + if (!val->is_null_object()) { + // Static field is initialized, we don need to perform a null check. + return; + } + } LabelObj* L_end = new LabelObj(); __ cmp(lir_cond_notEqual, result, LIR_OprFact::oopConst(NULL)); __ branch(lir_cond_notEqual, L_end->label()); set_in_conditional_code(true); + Constant* default_value = new Constant(new InstanceConstant(inline_klass->default_instance())); __ move(load_constant(default_value), result); __ branch_destination(L_end->label()); set_in_conditional_code(false); @@ -2277,7 +2242,7 @@ void LIRGenerator::do_WithField(WithField* x) { CodeStub* stub = new DeoptimizeStub(new CodeEmitInfo(info), Deoptimization::Reason_unloaded, Deoptimization::Action_make_not_entrant); - __ branch(lir_cond_always, stub); + __ jump(stub); LIR_Opr reg = rlock_result(x, T_OBJECT); __ move(LIR_OprFact::oopConst(NULL), reg); } @@ -2288,7 +2253,7 @@ void LIRGenerator::do_DefaultValue(DefaultValue* x) { CodeStub* stub = new DeoptimizeStub(new CodeEmitInfo(info), Deoptimization::Reason_unloaded, Deoptimization::Action_make_not_entrant); - __ branch(lir_cond_always, stub); + __ jump(stub); LIR_Opr reg = rlock_result(x, T_OBJECT); __ move(LIR_OprFact::oopConst(NULL), reg); } diff --git a/src/hotspot/share/c1/c1_LIRGenerator.hpp b/src/hotspot/share/c1/c1_LIRGenerator.hpp index c9ba31943b5..bc74f43fcf4 100644 --- a/src/hotspot/share/c1/c1_LIRGenerator.hpp +++ b/src/hotspot/share/c1/c1_LIRGenerator.hpp @@ -268,7 +268,7 @@ class LIRGenerator: public InstructionVisitor, public BlockClosure { void do_update_CRC32C(Intrinsic* x); void do_vectorizedMismatch(Intrinsic* x); - Constant* flattened_field_load_prolog(LoadField* x, CodeEmitInfo* info); + bool inline_type_field_access_prolog(AccessField* x, CodeEmitInfo* info); void access_flattened_array(bool is_load, LIRItem& array, LIRItem& index, LIRItem& obj_item, ciField* field = NULL, int offset = 0); void access_sub_element(LIRItem& array, LIRItem& index, LIR_Opr& result, ciField* field, int sub_offset); LIR_Opr get_and_load_element_address(LIRItem& array, LIRItem& index); @@ -379,7 +379,7 @@ class LIRGenerator: public InstructionVisitor, public BlockClosure { void monitor_enter (LIR_Opr object, LIR_Opr lock, LIR_Opr hdr, LIR_Opr scratch, int monitor_no, CodeEmitInfo* info_for_exception, CodeEmitInfo* info, CodeStub* throw_imse_stub); void monitor_exit (LIR_Opr object, LIR_Opr lock, LIR_Opr hdr, LIR_Opr scratch, int monitor_no); - void new_instance (LIR_Opr dst, ciInstanceKlass* klass, bool is_unresolved, LIR_Opr scratch1, LIR_Opr scratch2, LIR_Opr scratch3, LIR_Opr scratch4, LIR_Opr klass_reg, CodeEmitInfo* info); + void new_instance(LIR_Opr dst, ciInstanceKlass* klass, bool is_unresolved, bool allow_inline, LIR_Opr scratch1, LIR_Opr scratch2, LIR_Opr scratch3, LIR_Opr scratch4, LIR_Opr klass_reg, CodeEmitInfo* info); // machine dependent void cmp_mem_int(LIR_Condition condition, LIR_Opr base, int disp, int c, CodeEmitInfo* info); diff --git a/src/hotspot/share/c1/c1_Runtime1.cpp b/src/hotspot/share/c1/c1_Runtime1.cpp index ce86d716be0..03f81bc9221 100644 --- a/src/hotspot/share/c1/c1_Runtime1.cpp +++ b/src/hotspot/share/c1/c1_Runtime1.cpp @@ -360,10 +360,7 @@ const char* Runtime1::name_for_address(address entry) { return pd_name_for_address(entry); } - -JRT_ENTRY(void, Runtime1::new_instance(JavaThread* thread, Klass* klass)) - NOT_PRODUCT(_new_instance_slowcase_cnt++;) - +static void allocate_instance(JavaThread* thread, Klass* klass, TRAPS) { assert(klass->is_klass(), "not a class"); Handle holder(THREAD, klass->klass_holder()); // keep the klass alive InstanceKlass* h = InstanceKlass::cast(klass); @@ -373,8 +370,22 @@ JRT_ENTRY(void, Runtime1::new_instance(JavaThread* thread, Klass* klass)) // allocate instance and return via TLS oop obj = h->allocate_instance(CHECK); thread->set_vm_result(obj); +} + +JRT_ENTRY(void, Runtime1::new_instance(JavaThread* thread, Klass* klass)) + NOT_PRODUCT(_new_instance_slowcase_cnt++;) + allocate_instance(thread, klass, CHECK); JRT_END +// Same as new_instance but throws error for inline klasses +JRT_ENTRY(void, Runtime1::new_instance_no_inline(JavaThread* thread, Klass* klass)) + NOT_PRODUCT(_new_instance_slowcase_cnt++;) + if (klass->is_inline_klass()) { + SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_InstantiationError()); + } else { + allocate_instance(thread, klass, CHECK); + } +JRT_END JRT_ENTRY(void, Runtime1::new_type_array(JavaThread* thread, Klass* klass, jint length)) NOT_PRODUCT(_new_type_array_slowcase_cnt++;) @@ -573,9 +584,7 @@ static nmethod* counter_overflow_helper(JavaThread* THREAD, int branch_bci, Meth } bci = branch_bci + offset; } - assert(!HAS_PENDING_EXCEPTION, "Should not have any exceptions pending"); osr_nm = CompilationPolicy::policy()->event(enclosing_method, method, branch_bci, bci, level, nm, THREAD); - assert(!HAS_PENDING_EXCEPTION, "Event handler should not throw any exceptions"); return osr_nm; } @@ -1017,6 +1026,7 @@ JRT_ENTRY(void, Runtime1::patch_code(JavaThread* thread, Runtime1::StubID stub_i constantPoolHandle constants(THREAD, caller_method->constants()); LinkResolver::resolve_field_access(result, constants, field_access.index(), caller_method, Bytecodes::java_code(code), CHECK); patch_field_offset = result.offset(); + assert(!result.is_inlined(), "Can not patch access to flattened field"); // If we're patching a field which is volatile then at compile it // must not have been know to be volatile, so the generated code @@ -1381,32 +1391,32 @@ JRT_END #else // DEOPTIMIZE_WHEN_PATCHING -JRT_ENTRY(void, Runtime1::patch_code(JavaThread* thread, Runtime1::StubID stub_id )) - RegisterMap reg_map(thread, false); +void Runtime1::patch_code(JavaThread* thread, Runtime1::StubID stub_id) { + NOT_PRODUCT(_patch_code_slowcase_cnt++); - NOT_PRODUCT(_patch_code_slowcase_cnt++;) if (TracePatching) { tty->print_cr("Deoptimizing because patch is needed"); } + RegisterMap reg_map(thread, false); + frame runtime_frame = thread->last_frame(); frame caller_frame = runtime_frame.sender(®_map); + assert(caller_frame.is_compiled_frame(), "Wrong frame type"); - // It's possible the nmethod was invalidated in the last - // safepoint, but if it's still alive then make it not_entrant. + // Make sure the nmethod is invalidated, i.e. made not entrant. nmethod* nm = CodeCache::find_nmethod(caller_frame.pc()); if (nm != NULL) { nm->make_not_entrant(); } Deoptimization::deoptimize_frame(thread, caller_frame.id()); - // Return to the now deoptimized frame. -JRT_END + postcond(caller_is_deopted()); +} #endif // DEOPTIMIZE_WHEN_PATCHING -// // Entry point for compiled code. We want to patch a nmethod. // We don't do a normal VM transition here because we want to // know after the patching is complete and any safepoint(s) are taken @@ -1471,7 +1481,7 @@ int Runtime1::move_appendix_patching(JavaThread* thread) { return caller_is_deopted(); } -// + // Entry point for compiled code. We want to patch a nmethod. // We don't do a normal VM transition here because we want to // know after the patching is complete and any safepoint(s) are taken @@ -1480,7 +1490,6 @@ int Runtime1::move_appendix_patching(JavaThread* thread) { // completes we can check for deoptimization. This simplifies the // assembly code in the cpu directories. // - int Runtime1::access_field_patching(JavaThread* thread) { // // NOTE: we are still in Java @@ -1498,7 +1507,7 @@ int Runtime1::access_field_patching(JavaThread* thread) { // Return true if calling code is deoptimized return caller_is_deopted(); -JRT_END +} JRT_LEAF(void, Runtime1::trace_block_entry(jint block_id)) @@ -1540,6 +1549,7 @@ JRT_ENTRY(void, Runtime1::predicate_failed_trap(JavaThread* thread)) // that simply means we won't have an MDO to update. Method::build_interpreter_method_data(m, THREAD); if (HAS_PENDING_EXCEPTION) { + // Only metaspace OOM is expected. No Java code executed. assert((PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())), "we expect only an OOM error here"); CLEAR_PENDING_EXCEPTION; } @@ -1585,7 +1595,7 @@ void Runtime1::print_statistics() { tty->print_cr(" _new_type_array_slowcase_cnt: %d", _new_type_array_slowcase_cnt); tty->print_cr(" _new_object_array_slowcase_cnt: %d", _new_object_array_slowcase_cnt); - tty->print_cr(" _new_flat_array_slowcase_cnt: %d", _new_flat_array_slowcase_cnt); + tty->print_cr(" _new_flat_array_slowcase_cnt: %d", _new_flat_array_slowcase_cnt); tty->print_cr(" _new_instance_slowcase_cnt: %d", _new_instance_slowcase_cnt); tty->print_cr(" _new_multi_array_slowcase_cnt: %d", _new_multi_array_slowcase_cnt); tty->print_cr(" _load_flattened_array_slowcase_cnt: %d", _load_flattened_array_slowcase_cnt); diff --git a/src/hotspot/share/c1/c1_Runtime1.hpp b/src/hotspot/share/c1/c1_Runtime1.hpp index 18433bd6d24..9ca32a3c366 100644 --- a/src/hotspot/share/c1/c1_Runtime1.hpp +++ b/src/hotspot/share/c1/c1_Runtime1.hpp @@ -47,6 +47,7 @@ class StubAssembler; stub(throw_null_pointer_exception) \ stub(register_finalizer) \ stub(new_instance) \ + stub(new_instance_no_inline) \ stub(fast_new_instance) \ stub(fast_new_instance_init_check) \ stub(new_type_array) \ @@ -154,6 +155,7 @@ class Runtime1: public AllStatic { // runtime entry points static void new_instance (JavaThread* thread, Klass* klass); + static void new_instance_no_inline(JavaThread* thread, Klass* klass); static void new_type_array (JavaThread* thread, Klass* klass, jint length); static void new_object_array(JavaThread* thread, Klass* klass, jint length); static void new_flat_array (JavaThread* thread, Klass* klass, jint length); diff --git a/src/hotspot/share/ci/ciInlineKlass.cpp b/src/hotspot/share/ci/ciInlineKlass.cpp index fa1fbbbb8bc..b55054fcf4e 100644 --- a/src/hotspot/share/ci/ciInlineKlass.cpp +++ b/src/hotspot/share/ci/ciInlineKlass.cpp @@ -91,8 +91,10 @@ bool ciInlineKlass::can_be_returned_as_fields() const { GUARDED_VM_ENTRY(return to_InlineKlass()->can_be_returned_as_fields();) } -bool ciInlineKlass::is_empty() const { - GUARDED_VM_ENTRY(return to_InlineKlass()->is_empty_inline_type();) +bool ciInlineKlass::is_empty() { + // Do not use InlineKlass::is_empty_inline_type here because it does + // not recursively account for flattened fields of empty inline types. + return nof_nonstatic_fields() == 0; } // When passing an inline type's fields as arguments, count the number diff --git a/src/hotspot/share/ci/ciInlineKlass.hpp b/src/hotspot/share/ci/ciInlineKlass.hpp index bfb6f39b440..c3f70f00eb1 100644 --- a/src/hotspot/share/ci/ciInlineKlass.hpp +++ b/src/hotspot/share/ci/ciInlineKlass.hpp @@ -81,7 +81,7 @@ class ciInlineKlass : public ciInstanceKlass { bool is_scalarizable() const; bool can_be_passed_as_fields() const; bool can_be_returned_as_fields() const; - bool is_empty() const; + bool is_empty(); int inline_arg_slots(); int default_value_offset() const; ciInstance* default_instance() const; diff --git a/src/hotspot/share/ci/ciReplay.cpp b/src/hotspot/share/ci/ciReplay.cpp index 51e61545bf0..4188b3dac61 100644 --- a/src/hotspot/share/ci/ciReplay.cpp +++ b/src/hotspot/share/ci/ciReplay.cpp @@ -39,6 +39,7 @@ #include "oops/method.inline.hpp" #include "oops/oop.inline.hpp" #include "runtime/fieldDescriptor.inline.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/handles.inline.hpp" #include "runtime/java.hpp" #include "utilities/copy.hpp" diff --git a/src/hotspot/share/ci/ciTypeFlow.cpp b/src/hotspot/share/ci/ciTypeFlow.cpp index 27a4faba2a8..06091b35d8d 100644 --- a/src/hotspot/share/ci/ciTypeFlow.cpp +++ b/src/hotspot/share/ci/ciTypeFlow.cpp @@ -780,7 +780,7 @@ void ciTypeFlow::StateVector::do_multianewarray(ciBytecodeStream* str) { void ciTypeFlow::StateVector::do_new(ciBytecodeStream* str) { bool will_link; ciKlass* klass = str->get_klass(will_link); - if (!will_link || str->is_unresolved_klass()) { + if (!will_link || str->is_unresolved_klass() || klass->is_inlinetype()) { trap(str, klass, str->get_klass_index()); } else { push_object(klass); @@ -792,10 +792,9 @@ void ciTypeFlow::StateVector::do_new(ciBytecodeStream* str) { void ciTypeFlow::StateVector::do_defaultvalue(ciBytecodeStream* str) { bool will_link; ciKlass* klass = str->get_klass(will_link); - if (!will_link) { + if (!will_link || !klass->is_inlinetype()) { trap(str, klass, str->get_klass_index()); } else { - assert(klass->is_inlinetype(), "should be inline type"); push_object(klass); } } diff --git a/src/hotspot/share/classfile/classFileParser.cpp b/src/hotspot/share/classfile/classFileParser.cpp index 3b83539fe67..c660a35773d 100644 --- a/src/hotspot/share/classfile/classFileParser.cpp +++ b/src/hotspot/share/classfile/classFileParser.cpp @@ -1128,7 +1128,7 @@ class AnnotationCollector : public ResourceObj{ _method_InjectedProfile, _method_LambdaForm_Compiled, _method_Hidden, - _method_HotSpotIntrinsicCandidate, + _method_IntrinsicCandidate, _jdk_internal_vm_annotation_Contended, _field_Stable, _jdk_internal_vm_annotation_ReservedStackAccess, @@ -2239,10 +2239,10 @@ AnnotationCollector::annotation_index(const ClassLoaderData* loader_data, if (!privileged) break; // only allow in privileged code return _method_Hidden; } - case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_internal_HotSpotIntrinsicCandidate_signature): { + case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_internal_vm_annotation_IntrinsicCandidate_signature): { if (_location != _in_method) break; // only allow for methods if (!privileged) break; // only allow in privileged code - return _method_HotSpotIntrinsicCandidate; + return _method_IntrinsicCandidate; } case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_internal_vm_annotation_Stable_signature): { if (_location != _in_field) break; // only allow for fields @@ -2296,7 +2296,7 @@ void MethodAnnotationCollector::apply_to(const methodHandle& m) { m->set_intrinsic_id(vmIntrinsics::_compiledLambdaForm); if (has_annotation(_method_Hidden)) m->set_hidden(true); - if (has_annotation(_method_HotSpotIntrinsicCandidate) && !m->is_synthetic()) + if (has_annotation(_method_IntrinsicCandidate) && !m->is_synthetic()) m->set_intrinsic_candidate(true); if (has_annotation(_jdk_internal_vm_annotation_ReservedStackAccess)) m->set_has_reserved_stack_access(true); @@ -5459,22 +5459,22 @@ static void check_methods_for_intrinsics(const InstanceKlass* ik, if (CheckIntrinsics) { // Check if an intrinsic is defined for method 'method', - // but the method is not annotated with @HotSpotIntrinsicCandidate. + // but the method is not annotated with @IntrinsicCandidate. if (method->intrinsic_id() != vmIntrinsics::_none && !method->intrinsic_candidate()) { tty->print("Compiler intrinsic is defined for method [%s], " - "but the method is not annotated with @HotSpotIntrinsicCandidate.%s", + "but the method is not annotated with @IntrinsicCandidate.%s", method->name_and_sig_as_C_string(), NOT_DEBUG(" Method will not be inlined.") DEBUG_ONLY(" Exiting.") ); tty->cr(); DEBUG_ONLY(vm_exit(1)); } - // Check is the method 'method' is annotated with @HotSpotIntrinsicCandidate, + // Check is the method 'method' is annotated with @IntrinsicCandidate, // but there is no intrinsic available for it. if (method->intrinsic_candidate() && method->intrinsic_id() == vmIntrinsics::_none) { - tty->print("Method [%s] is annotated with @HotSpotIntrinsicCandidate, " + tty->print("Method [%s] is annotated with @IntrinsicCandidate, " "but no compiler intrinsic is defined for the method.%s", method->name_and_sig_as_C_string(), NOT_DEBUG("") DEBUG_ONLY(" Exiting.") @@ -6644,7 +6644,14 @@ void ClassFileParser::post_process_parsed_stream(const ClassFileStream* const st Handle(THREAD, _loader_data->class_loader()), _protection_domain, true, CHECK); assert(klass != NULL, "Sanity check"); - assert(klass->access_flags().is_inline_type(), "Inline type expected"); + if (!klass->access_flags().is_inline_type()) { + assert(klass->is_instance_klass(), "Sanity check"); + ResourceMark rm(THREAD); + THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(), + err_msg("Class %s expects class %s to be an inline type, but it is not", + _class_name->as_C_string(), + InstanceKlass::cast(klass)->external_name())); + } } } diff --git a/src/hotspot/share/classfile/javaClasses.cpp b/src/hotspot/share/classfile/javaClasses.cpp index 538418d3b26..105f024fb4a 100644 --- a/src/hotspot/share/classfile/javaClasses.cpp +++ b/src/hotspot/share/classfile/javaClasses.cpp @@ -1187,8 +1187,7 @@ oop java_lang_Class::archive_mirror(Klass* k, TRAPS) { if (!(ik->is_shared_boot_class() || ik->is_shared_platform_class() || ik->is_shared_app_class())) { // Archiving mirror for classes from non-builtin loaders is not - // supported. Clear the _java_mirror within the archived class. - k->clear_java_mirror_handle(); + // supported. return NULL; } } @@ -4885,6 +4884,27 @@ void java_lang_reflect_RecordComponent::set_typeAnnotations(oop element, oop val element->obj_field_put(_typeAnnotations_offset, value); } +// java_lang_InternalError +int java_lang_InternalError::_during_unsafe_access_offset; + +void java_lang_InternalError::set_during_unsafe_access(oop internal_error) { + internal_error->bool_field_put(_during_unsafe_access_offset, true); +} + +jboolean java_lang_InternalError::during_unsafe_access(oop internal_error) { + return internal_error->bool_field(_during_unsafe_access_offset); +} + +void java_lang_InternalError::compute_offsets() { + INTERNALERROR_INJECTED_FIELDS(INJECTED_FIELD_COMPUTE_OFFSET); +} + +#if INCLUDE_CDS +void java_lang_InternalError::serialize_offsets(SerializeClosure* f) { + INTERNALERROR_INJECTED_FIELDS(INJECTED_FIELD_SERIALIZE_OFFSET); +} +#endif + #define DO_COMPUTE_OFFSETS(k) k::compute_offsets(); // Compute field offsets of all the classes in this file diff --git a/src/hotspot/share/classfile/javaClasses.hpp b/src/hotspot/share/classfile/javaClasses.hpp index fe10f9d8b05..b5452bae8c0 100644 --- a/src/hotspot/share/classfile/javaClasses.hpp +++ b/src/hotspot/share/classfile/javaClasses.hpp @@ -47,6 +47,7 @@ class RecordComponent; f(java_lang_Throwable) \ f(java_lang_Thread) \ f(java_lang_ThreadGroup) \ + f(java_lang_InternalError) \ f(java_lang_AssertionStatusDirectives) \ f(java_lang_ref_SoftReference) \ f(java_lang_invoke_MethodHandle) \ @@ -1653,6 +1654,21 @@ class java_lang_Byte_ByteCache : AllStatic { static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN; }; +// Interface to java.lang.InternalError objects + +#define INTERNALERROR_INJECTED_FIELDS(macro) \ + macro(java_lang_InternalError, during_unsafe_access, bool_signature, false) + +class java_lang_InternalError : AllStatic { + private: + static int _during_unsafe_access_offset; + public: + static jboolean during_unsafe_access(oop internal_error); + static void set_during_unsafe_access(oop internal_error); + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN; +}; + class jdk_internal_vm_jni_SubElementSelector : AllStatic { private: static int _arrayElementType_offset; @@ -1677,6 +1693,7 @@ class jdk_internal_vm_jni_SubElementSelector : AllStatic { static void setIsInlineType(oop obj, bool b); }; + // Use to declare fields that need to be injected into Java classes // for the JVM to use. The name_index and signature_index are // declared in vmSymbols. The may_be_java flag is used to declare @@ -1716,7 +1733,9 @@ class InjectedField { MEMBERNAME_INJECTED_FIELDS(macro) \ CALLSITECONTEXT_INJECTED_FIELDS(macro) \ STACKFRAMEINFO_INJECTED_FIELDS(macro) \ - MODULE_INJECTED_FIELDS(macro) + MODULE_INJECTED_FIELDS(macro) \ + INTERNALERROR_INJECTED_FIELDS(macro) + // Interface to hard-coded offset checking diff --git a/src/hotspot/share/classfile/javaClasses.inline.hpp b/src/hotspot/share/classfile/javaClasses.inline.hpp index a654516a377..3e880da8ae5 100644 --- a/src/hotspot/share/classfile/javaClasses.inline.hpp +++ b/src/hotspot/share/classfile/javaClasses.inline.hpp @@ -113,7 +113,7 @@ void java_lang_ref_Reference::set_referent_raw(oop ref, oop value) { } HeapWord* java_lang_ref_Reference::referent_addr_raw(oop ref) { - return ref->obj_field_addr_raw<HeapWord>(_referent_offset); + return ref->obj_field_addr<HeapWord>(_referent_offset); } oop java_lang_ref_Reference::next(oop ref) { @@ -129,7 +129,7 @@ void java_lang_ref_Reference::set_next_raw(oop ref, oop value) { } HeapWord* java_lang_ref_Reference::next_addr_raw(oop ref) { - return ref->obj_field_addr_raw<HeapWord>(_next_offset); + return ref->obj_field_addr<HeapWord>(_next_offset); } oop java_lang_ref_Reference::discovered(oop ref) { @@ -145,7 +145,7 @@ void java_lang_ref_Reference::set_discovered_raw(oop ref, oop value) { } HeapWord* java_lang_ref_Reference::discovered_addr_raw(oop ref) { - return ref->obj_field_addr_raw<HeapWord>(_discovered_offset); + return ref->obj_field_addr<HeapWord>(_discovered_offset); } bool java_lang_ref_Reference::is_final(oop ref) { diff --git a/src/hotspot/share/classfile/moduleEntry.cpp b/src/hotspot/share/classfile/moduleEntry.cpp index e1b45955b4f..1eba21b0b08 100644 --- a/src/hotspot/share/classfile/moduleEntry.cpp +++ b/src/hotspot/share/classfile/moduleEntry.cpp @@ -454,6 +454,7 @@ void ModuleEntry::init_as_archived_entry() { if (_location != NULL) { _location = ArchiveBuilder::get_relocated_symbol(_location); } + JFR_ONLY(set_trace_id(0));// re-init at runtime ArchivePtrMarker::mark_pointer((address*)&_reads); ArchivePtrMarker::mark_pointer((address*)&_version); diff --git a/src/hotspot/share/classfile/packageEntry.cpp b/src/hotspot/share/classfile/packageEntry.cpp index da83bd519aa..ed3a74209a3 100644 --- a/src/hotspot/share/classfile/packageEntry.cpp +++ b/src/hotspot/share/classfile/packageEntry.cpp @@ -238,6 +238,7 @@ void PackageEntry::init_as_archived_entry() { _module = ModuleEntry::get_archived_entry(_module); _qualified_exports = (GrowableArray<ModuleEntry*>*)archived_qualified_exports; _defined_by_cds_in_class_path = 0; + JFR_ONLY(set_trace_id(0)); // re-init at runtime ArchivePtrMarker::mark_pointer((address*)literal_addr()); ArchivePtrMarker::mark_pointer((address*)&_module); diff --git a/src/hotspot/share/classfile/stringTable.cpp b/src/hotspot/share/classfile/stringTable.cpp index ad74c462782..fbfd14c1011 100644 --- a/src/hotspot/share/classfile/stringTable.cpp +++ b/src/hotspot/share/classfile/stringTable.cpp @@ -67,7 +67,7 @@ const double CLEAN_DEAD_HIGH_WATER_MARK = 0.5; #if INCLUDE_CDS_JAVA_HEAP inline oop read_string_from_compact_hashtable(address base_address, u4 offset) { assert(sizeof(narrowOop) == sizeof(offset), "must be"); - narrowOop v = (narrowOop)offset; + narrowOop v = CompressedOops::narrow_oop_cast(offset); return HeapShared::decode_from_archive(v); } @@ -750,7 +750,7 @@ class CopyToArchive : StackObj { } // add to the compact table - _writer->add(hash, CompressedOops::encode(new_s)); + _writer->add(hash, CompressedOops::narrow_oop_value(new_s)); return true; } }; diff --git a/src/hotspot/share/classfile/systemDictionary.hpp b/src/hotspot/share/classfile/systemDictionary.hpp index db494fbb8c9..938e87166d2 100644 --- a/src/hotspot/share/classfile/systemDictionary.hpp +++ b/src/hotspot/share/classfile/systemDictionary.hpp @@ -128,6 +128,7 @@ class TableStatistics; do_klass(ClassCastException_klass, java_lang_ClassCastException ) \ do_klass(ArrayStoreException_klass, java_lang_ArrayStoreException ) \ do_klass(VirtualMachineError_klass, java_lang_VirtualMachineError ) \ + do_klass(InternalError_klass, java_lang_InternalError ) \ do_klass(OutOfMemoryError_klass, java_lang_OutOfMemoryError ) \ do_klass(StackOverflowError_klass, java_lang_StackOverflowError ) \ do_klass(IllegalMonitorStateException_klass, java_lang_IllegalMonitorStateException ) \ diff --git a/src/hotspot/share/classfile/systemDictionaryShared.cpp b/src/hotspot/share/classfile/systemDictionaryShared.cpp index 304afaba3b3..045910a4f1f 100644 --- a/src/hotspot/share/classfile/systemDictionaryShared.cpp +++ b/src/hotspot/share/classfile/systemDictionaryShared.cpp @@ -2053,6 +2053,7 @@ InstanceKlass* SystemDictionaryShared::find_builtin_class(Symbol* name) { const RunTimeSharedClassInfo* record = find_record(&_builtin_dictionary, &_dynamic_builtin_dictionary, name); if (record != NULL) { assert(!record->_klass->is_hidden(), "hidden class cannot be looked up by name"); + assert(check_alignment(record->_klass), "Address not aligned"); return record->_klass; } else { return NULL; diff --git a/src/hotspot/share/classfile/vmIntrinsics.cpp b/src/hotspot/share/classfile/vmIntrinsics.cpp new file mode 100644 index 00000000000..9d0ec7e7989 --- /dev/null +++ b/src/hotspot/share/classfile/vmIntrinsics.cpp @@ -0,0 +1,857 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "classfile/vmIntrinsics.hpp" +#include "classfile/vmSymbols.hpp" +#include "compiler/compilerDirectives.hpp" +#include "utilities/xmlstream.hpp" + +// These are flag-matching functions: +inline bool match_F_R(jshort flags) { + const int req = 0; + const int neg = JVM_ACC_STATIC | JVM_ACC_SYNCHRONIZED; + return (flags & (req | neg)) == req; +} + +inline bool match_F_Y(jshort flags) { + const int req = JVM_ACC_SYNCHRONIZED; + const int neg = JVM_ACC_STATIC; + return (flags & (req | neg)) == req; +} + +inline bool match_F_RN(jshort flags) { + const int req = JVM_ACC_NATIVE; + const int neg = JVM_ACC_STATIC | JVM_ACC_SYNCHRONIZED; + return (flags & (req | neg)) == req; +} + +inline bool match_F_S(jshort flags) { + const int req = JVM_ACC_STATIC; + const int neg = JVM_ACC_SYNCHRONIZED; + return (flags & (req | neg)) == req; +} + +inline bool match_F_SN(jshort flags) { + const int req = JVM_ACC_STATIC | JVM_ACC_NATIVE; + const int neg = JVM_ACC_SYNCHRONIZED; + return (flags & (req | neg)) == req; +} + +inline bool match_F_RNY(jshort flags) { + const int req = JVM_ACC_NATIVE | JVM_ACC_SYNCHRONIZED; + const int neg = JVM_ACC_STATIC; + return (flags & (req | neg)) == req; +} + +static vmIntrinsics::ID wrapper_intrinsic(BasicType type, bool unboxing) { +#define TYPE2(type, unboxing) ((int)(type)*2 + ((unboxing) ? 1 : 0)) + switch (TYPE2(type, unboxing)) { +#define BASIC_TYPE_CASE(type, box, unbox) \ + case TYPE2(type, false): return vmIntrinsics::box; \ + case TYPE2(type, true): return vmIntrinsics::unbox + BASIC_TYPE_CASE(T_BOOLEAN, _Boolean_valueOf, _booleanValue); + BASIC_TYPE_CASE(T_BYTE, _Byte_valueOf, _byteValue); + BASIC_TYPE_CASE(T_CHAR, _Character_valueOf, _charValue); + BASIC_TYPE_CASE(T_SHORT, _Short_valueOf, _shortValue); + BASIC_TYPE_CASE(T_INT, _Integer_valueOf, _intValue); + BASIC_TYPE_CASE(T_LONG, _Long_valueOf, _longValue); + BASIC_TYPE_CASE(T_FLOAT, _Float_valueOf, _floatValue); + BASIC_TYPE_CASE(T_DOUBLE, _Double_valueOf, _doubleValue); +#undef BASIC_TYPE_CASE + } +#undef TYPE2 + return vmIntrinsics::_none; +} + +vmIntrinsics::ID vmIntrinsics::for_boxing(BasicType type) { + return wrapper_intrinsic(type, false); +} +vmIntrinsics::ID vmIntrinsics::for_unboxing(BasicType type) { + return wrapper_intrinsic(type, true); +} + +vmIntrinsics::ID vmIntrinsics::for_raw_conversion(BasicType src, BasicType dest) { +#define SRC_DEST(s,d) (((int)(s) << 4) + (int)(d)) + switch (SRC_DEST(src, dest)) { + case SRC_DEST(T_INT, T_FLOAT): return vmIntrinsics::_intBitsToFloat; + case SRC_DEST(T_FLOAT, T_INT): return vmIntrinsics::_floatToRawIntBits; + + case SRC_DEST(T_LONG, T_DOUBLE): return vmIntrinsics::_longBitsToDouble; + case SRC_DEST(T_DOUBLE, T_LONG): return vmIntrinsics::_doubleToRawLongBits; + } +#undef SRC_DEST + + return vmIntrinsics::_none; +} + +bool vmIntrinsics::preserves_state(vmIntrinsics::ID id) { + assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); + switch(id) { +#ifdef JFR_HAVE_INTRINSICS + case vmIntrinsics::_counterTime: +#endif + case vmIntrinsics::_currentTimeMillis: + case vmIntrinsics::_nanoTime: + case vmIntrinsics::_floatToRawIntBits: + case vmIntrinsics::_intBitsToFloat: + case vmIntrinsics::_doubleToRawLongBits: + case vmIntrinsics::_longBitsToDouble: + case vmIntrinsics::_getClass: + case vmIntrinsics::_isInstance: + case vmIntrinsics::_currentThread: + case vmIntrinsics::_dabs: + case vmIntrinsics::_fabs: + case vmIntrinsics::_iabs: + case vmIntrinsics::_labs: + case vmIntrinsics::_dsqrt: + case vmIntrinsics::_dsin: + case vmIntrinsics::_dcos: + case vmIntrinsics::_dtan: + case vmIntrinsics::_dlog: + case vmIntrinsics::_dlog10: + case vmIntrinsics::_dexp: + case vmIntrinsics::_dpow: + case vmIntrinsics::_checkIndex: + case vmIntrinsics::_Reference_get: + case vmIntrinsics::_updateCRC32: + case vmIntrinsics::_updateBytesCRC32: + case vmIntrinsics::_updateByteBufferCRC32: + case vmIntrinsics::_vectorizedMismatch: + case vmIntrinsics::_fmaD: + case vmIntrinsics::_fmaF: + case vmIntrinsics::_isDigit: + case vmIntrinsics::_isLowerCase: + case vmIntrinsics::_isUpperCase: + case vmIntrinsics::_isWhitespace: + return true; + default: + return false; + } +} + +bool vmIntrinsics::can_trap(vmIntrinsics::ID id) { + assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); + switch(id) { +#ifdef JFR_HAVE_INTRINSICS + case vmIntrinsics::_counterTime: + case vmIntrinsics::_getClassId: +#endif + case vmIntrinsics::_currentTimeMillis: + case vmIntrinsics::_nanoTime: + case vmIntrinsics::_floatToRawIntBits: + case vmIntrinsics::_intBitsToFloat: + case vmIntrinsics::_doubleToRawLongBits: + case vmIntrinsics::_longBitsToDouble: + case vmIntrinsics::_currentThread: + case vmIntrinsics::_dabs: + case vmIntrinsics::_fabs: + case vmIntrinsics::_iabs: + case vmIntrinsics::_labs: + case vmIntrinsics::_dsqrt: + case vmIntrinsics::_dsin: + case vmIntrinsics::_dcos: + case vmIntrinsics::_dtan: + case vmIntrinsics::_dlog: + case vmIntrinsics::_dlog10: + case vmIntrinsics::_dexp: + case vmIntrinsics::_dpow: + case vmIntrinsics::_updateCRC32: + case vmIntrinsics::_updateBytesCRC32: + case vmIntrinsics::_updateByteBufferCRC32: + case vmIntrinsics::_vectorizedMismatch: + case vmIntrinsics::_fmaD: + case vmIntrinsics::_fmaF: + return false; + default: + return true; + } +} + +// Some intrinsics produce different results if they are not pinned +bool vmIntrinsics::should_be_pinned(vmIntrinsics::ID id) { + assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); + switch(id) { +#ifdef JFR_HAVE_INTRINSICS + case vmIntrinsics::_counterTime: +#endif + case vmIntrinsics::_currentTimeMillis: + case vmIntrinsics::_nanoTime: + return true; + default: + return false; + } +} + +bool vmIntrinsics::does_virtual_dispatch(vmIntrinsics::ID id) { + assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); + switch(id) { + case vmIntrinsics::_hashCode: + case vmIntrinsics::_clone: + return true; + break; + default: + return false; + } +} + +int vmIntrinsics::predicates_needed(vmIntrinsics::ID id) { + assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); + switch (id) { + case vmIntrinsics::_cipherBlockChaining_encryptAESCrypt: + case vmIntrinsics::_cipherBlockChaining_decryptAESCrypt: + case vmIntrinsics::_electronicCodeBook_encryptAESCrypt: + case vmIntrinsics::_electronicCodeBook_decryptAESCrypt: + case vmIntrinsics::_counterMode_AESCrypt: + return 1; + case vmIntrinsics::_digestBase_implCompressMB: + return 4; + default: + return 0; + } +} + +bool vmIntrinsics::disabled_by_jvm_flags(vmIntrinsics::ID id) { + assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); + + // -XX:-InlineNatives disables nearly all intrinsics except the ones listed in + // the following switch statement. + if (!InlineNatives) { + switch (id) { + case vmIntrinsics::_indexOfL: + case vmIntrinsics::_indexOfU: + case vmIntrinsics::_indexOfUL: + case vmIntrinsics::_indexOfIL: + case vmIntrinsics::_indexOfIU: + case vmIntrinsics::_indexOfIUL: + case vmIntrinsics::_indexOfU_char: + case vmIntrinsics::_compareToL: + case vmIntrinsics::_compareToU: + case vmIntrinsics::_compareToLU: + case vmIntrinsics::_compareToUL: + case vmIntrinsics::_equalsL: + case vmIntrinsics::_equalsU: + case vmIntrinsics::_equalsC: + case vmIntrinsics::_getCharStringU: + case vmIntrinsics::_putCharStringU: + case vmIntrinsics::_compressStringC: + case vmIntrinsics::_compressStringB: + case vmIntrinsics::_inflateStringC: + case vmIntrinsics::_inflateStringB: + case vmIntrinsics::_getAndAddInt: + case vmIntrinsics::_getAndAddLong: + case vmIntrinsics::_getAndSetInt: + case vmIntrinsics::_getAndSetLong: + case vmIntrinsics::_getAndSetReference: + case vmIntrinsics::_loadFence: + case vmIntrinsics::_storeFence: + case vmIntrinsics::_fullFence: + case vmIntrinsics::_hasNegatives: + case vmIntrinsics::_Reference_get: + break; + default: + return true; + } + } + + switch (id) { + case vmIntrinsics::_isInstance: + case vmIntrinsics::_isAssignableFrom: + case vmIntrinsics::_getModifiers: + case vmIntrinsics::_isInterface: + case vmIntrinsics::_isArray: + case vmIntrinsics::_isPrimitive: + case vmIntrinsics::_isHidden: + case vmIntrinsics::_getSuperclass: + case vmIntrinsics::_Class_cast: + case vmIntrinsics::_getLength: + case vmIntrinsics::_newArray: + case vmIntrinsics::_getClass: + if (!InlineClassNatives) return true; + break; + case vmIntrinsics::_currentThread: + if (!InlineThreadNatives) return true; + break; + case vmIntrinsics::_floatToRawIntBits: + case vmIntrinsics::_intBitsToFloat: + case vmIntrinsics::_doubleToRawLongBits: + case vmIntrinsics::_longBitsToDouble: + case vmIntrinsics::_ceil: + case vmIntrinsics::_floor: + case vmIntrinsics::_rint: + case vmIntrinsics::_dabs: + case vmIntrinsics::_fabs: + case vmIntrinsics::_iabs: + case vmIntrinsics::_labs: + case vmIntrinsics::_dsqrt: + case vmIntrinsics::_dsin: + case vmIntrinsics::_dcos: + case vmIntrinsics::_dtan: + case vmIntrinsics::_dlog: + case vmIntrinsics::_dexp: + case vmIntrinsics::_dpow: + case vmIntrinsics::_dlog10: + case vmIntrinsics::_datan2: + case vmIntrinsics::_min: + case vmIntrinsics::_max: + case vmIntrinsics::_floatToIntBits: + case vmIntrinsics::_doubleToLongBits: + case vmIntrinsics::_maxF: + case vmIntrinsics::_minF: + case vmIntrinsics::_maxD: + case vmIntrinsics::_minD: + if (!InlineMathNatives) return true; + break; + case vmIntrinsics::_fmaD: + case vmIntrinsics::_fmaF: + if (!InlineMathNatives || !UseFMA) return true; + break; + case vmIntrinsics::_arraycopy: + if (!InlineArrayCopy) return true; + break; + case vmIntrinsics::_updateCRC32: + case vmIntrinsics::_updateBytesCRC32: + case vmIntrinsics::_updateByteBufferCRC32: + if (!UseCRC32Intrinsics) return true; + break; + case vmIntrinsics::_makePrivateBuffer: + case vmIntrinsics::_finishPrivateBuffer: + case vmIntrinsics::_getReference: + case vmIntrinsics::_getBoolean: + case vmIntrinsics::_getByte: + case vmIntrinsics::_getShort: + case vmIntrinsics::_getChar: + case vmIntrinsics::_getInt: + case vmIntrinsics::_getLong: + case vmIntrinsics::_getFloat: + case vmIntrinsics::_getDouble: + case vmIntrinsics::_getValue: + case vmIntrinsics::_putReference: + case vmIntrinsics::_putBoolean: + case vmIntrinsics::_putByte: + case vmIntrinsics::_putShort: + case vmIntrinsics::_putChar: + case vmIntrinsics::_putInt: + case vmIntrinsics::_putLong: + case vmIntrinsics::_putFloat: + case vmIntrinsics::_putDouble: + case vmIntrinsics::_putValue: + case vmIntrinsics::_getReferenceVolatile: + case vmIntrinsics::_getBooleanVolatile: + case vmIntrinsics::_getByteVolatile: + case vmIntrinsics::_getShortVolatile: + case vmIntrinsics::_getCharVolatile: + case vmIntrinsics::_getIntVolatile: + case vmIntrinsics::_getLongVolatile: + case vmIntrinsics::_getFloatVolatile: + case vmIntrinsics::_getDoubleVolatile: + case vmIntrinsics::_putReferenceVolatile: + case vmIntrinsics::_putBooleanVolatile: + case vmIntrinsics::_putByteVolatile: + case vmIntrinsics::_putShortVolatile: + case vmIntrinsics::_putCharVolatile: + case vmIntrinsics::_putIntVolatile: + case vmIntrinsics::_putLongVolatile: + case vmIntrinsics::_putFloatVolatile: + case vmIntrinsics::_putDoubleVolatile: + case vmIntrinsics::_getReferenceAcquire: + case vmIntrinsics::_getBooleanAcquire: + case vmIntrinsics::_getByteAcquire: + case vmIntrinsics::_getShortAcquire: + case vmIntrinsics::_getCharAcquire: + case vmIntrinsics::_getIntAcquire: + case vmIntrinsics::_getLongAcquire: + case vmIntrinsics::_getFloatAcquire: + case vmIntrinsics::_getDoubleAcquire: + case vmIntrinsics::_putReferenceRelease: + case vmIntrinsics::_putBooleanRelease: + case vmIntrinsics::_putByteRelease: + case vmIntrinsics::_putShortRelease: + case vmIntrinsics::_putCharRelease: + case vmIntrinsics::_putIntRelease: + case vmIntrinsics::_putLongRelease: + case vmIntrinsics::_putFloatRelease: + case vmIntrinsics::_putDoubleRelease: + case vmIntrinsics::_getReferenceOpaque: + case vmIntrinsics::_getBooleanOpaque: + case vmIntrinsics::_getByteOpaque: + case vmIntrinsics::_getShortOpaque: + case vmIntrinsics::_getCharOpaque: + case vmIntrinsics::_getIntOpaque: + case vmIntrinsics::_getLongOpaque: + case vmIntrinsics::_getFloatOpaque: + case vmIntrinsics::_getDoubleOpaque: + case vmIntrinsics::_putReferenceOpaque: + case vmIntrinsics::_putBooleanOpaque: + case vmIntrinsics::_putByteOpaque: + case vmIntrinsics::_putShortOpaque: + case vmIntrinsics::_putCharOpaque: + case vmIntrinsics::_putIntOpaque: + case vmIntrinsics::_putLongOpaque: + case vmIntrinsics::_putFloatOpaque: + case vmIntrinsics::_putDoubleOpaque: + case vmIntrinsics::_getAndAddInt: + case vmIntrinsics::_getAndAddLong: + case vmIntrinsics::_getAndSetInt: + case vmIntrinsics::_getAndSetLong: + case vmIntrinsics::_getAndSetReference: + case vmIntrinsics::_loadFence: + case vmIntrinsics::_storeFence: + case vmIntrinsics::_fullFence: + case vmIntrinsics::_compareAndSetLong: + case vmIntrinsics::_weakCompareAndSetLong: + case vmIntrinsics::_weakCompareAndSetLongPlain: + case vmIntrinsics::_weakCompareAndSetLongAcquire: + case vmIntrinsics::_weakCompareAndSetLongRelease: + case vmIntrinsics::_compareAndSetInt: + case vmIntrinsics::_weakCompareAndSetInt: + case vmIntrinsics::_weakCompareAndSetIntPlain: + case vmIntrinsics::_weakCompareAndSetIntAcquire: + case vmIntrinsics::_weakCompareAndSetIntRelease: + case vmIntrinsics::_compareAndSetReference: + case vmIntrinsics::_weakCompareAndSetReference: + case vmIntrinsics::_weakCompareAndSetReferencePlain: + case vmIntrinsics::_weakCompareAndSetReferenceAcquire: + case vmIntrinsics::_weakCompareAndSetReferenceRelease: + case vmIntrinsics::_compareAndExchangeInt: + case vmIntrinsics::_compareAndExchangeIntAcquire: + case vmIntrinsics::_compareAndExchangeIntRelease: + case vmIntrinsics::_compareAndExchangeLong: + case vmIntrinsics::_compareAndExchangeLongAcquire: + case vmIntrinsics::_compareAndExchangeLongRelease: + case vmIntrinsics::_compareAndExchangeReference: + case vmIntrinsics::_compareAndExchangeReferenceAcquire: + case vmIntrinsics::_compareAndExchangeReferenceRelease: + if (!InlineUnsafeOps) return true; + break; + case vmIntrinsics::_getShortUnaligned: + case vmIntrinsics::_getCharUnaligned: + case vmIntrinsics::_getIntUnaligned: + case vmIntrinsics::_getLongUnaligned: + case vmIntrinsics::_putShortUnaligned: + case vmIntrinsics::_putCharUnaligned: + case vmIntrinsics::_putIntUnaligned: + case vmIntrinsics::_putLongUnaligned: + case vmIntrinsics::_allocateInstance: + if (!InlineUnsafeOps || !UseUnalignedAccesses) return true; + break; + case vmIntrinsics::_hashCode: + if (!InlineObjectHash) return true; + break; + case vmIntrinsics::_aescrypt_encryptBlock: + case vmIntrinsics::_aescrypt_decryptBlock: + if (!UseAESIntrinsics) return true; + break; + case vmIntrinsics::_cipherBlockChaining_encryptAESCrypt: + case vmIntrinsics::_cipherBlockChaining_decryptAESCrypt: + if (!UseAESIntrinsics) return true; + break; + case vmIntrinsics::_electronicCodeBook_encryptAESCrypt: + case vmIntrinsics::_electronicCodeBook_decryptAESCrypt: + if (!UseAESIntrinsics) return true; + break; + case vmIntrinsics::_counterMode_AESCrypt: + if (!UseAESCTRIntrinsics) return true; + break; + case vmIntrinsics::_md5_implCompress: + if (!UseMD5Intrinsics) return true; + break; + case vmIntrinsics::_sha_implCompress: + if (!UseSHA1Intrinsics) return true; + break; + case vmIntrinsics::_sha2_implCompress: + if (!UseSHA256Intrinsics) return true; + break; + case vmIntrinsics::_sha5_implCompress: + if (!UseSHA512Intrinsics) return true; + break; + case vmIntrinsics::_digestBase_implCompressMB: + if (!(UseMD5Intrinsics || UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA512Intrinsics)) return true; + break; + case vmIntrinsics::_ghash_processBlocks: + if (!UseGHASHIntrinsics) return true; + break; + case vmIntrinsics::_base64_encodeBlock: + if (!UseBASE64Intrinsics) return true; + break; + case vmIntrinsics::_updateBytesCRC32C: + case vmIntrinsics::_updateDirectByteBufferCRC32C: + if (!UseCRC32CIntrinsics) return true; + break; + case vmIntrinsics::_vectorizedMismatch: + if (!UseVectorizedMismatchIntrinsic) return true; + break; + case vmIntrinsics::_updateBytesAdler32: + case vmIntrinsics::_updateByteBufferAdler32: + if (!UseAdler32Intrinsics) return true; + break; + case vmIntrinsics::_copyMemory: + if (!InlineArrayCopy || !InlineUnsafeOps) return true; + break; +#ifdef COMPILER1 + case vmIntrinsics::_checkIndex: + if (!InlineNIOCheckIndex) return true; + break; +#endif // COMPILER1 +#ifdef COMPILER2 + case vmIntrinsics::_clone: + case vmIntrinsics::_copyOf: + case vmIntrinsics::_copyOfRange: + // These intrinsics use both the objectcopy and the arraycopy + // intrinsic mechanism. + if (!InlineObjectCopy || !InlineArrayCopy) return true; + break; + case vmIntrinsics::_compareToL: + case vmIntrinsics::_compareToU: + case vmIntrinsics::_compareToLU: + case vmIntrinsics::_compareToUL: + if (!SpecialStringCompareTo) return true; + break; + case vmIntrinsics::_indexOfL: + case vmIntrinsics::_indexOfU: + case vmIntrinsics::_indexOfUL: + case vmIntrinsics::_indexOfIL: + case vmIntrinsics::_indexOfIU: + case vmIntrinsics::_indexOfIUL: + case vmIntrinsics::_indexOfU_char: + if (!SpecialStringIndexOf) return true; + break; + case vmIntrinsics::_equalsL: + case vmIntrinsics::_equalsU: + if (!SpecialStringEquals) return true; + break; + case vmIntrinsics::_equalsB: + case vmIntrinsics::_equalsC: + if (!SpecialArraysEquals) return true; + break; + case vmIntrinsics::_encodeISOArray: + case vmIntrinsics::_encodeByteISOArray: + if (!SpecialEncodeISOArray) return true; + break; + case vmIntrinsics::_getCallerClass: + if (!InlineReflectionGetCallerClass) return true; + break; + case vmIntrinsics::_multiplyToLen: + if (!UseMultiplyToLenIntrinsic) return true; + break; + case vmIntrinsics::_squareToLen: + if (!UseSquareToLenIntrinsic) return true; + break; + case vmIntrinsics::_mulAdd: + if (!UseMulAddIntrinsic) return true; + break; + case vmIntrinsics::_montgomeryMultiply: + if (!UseMontgomeryMultiplyIntrinsic) return true; + break; + case vmIntrinsics::_montgomerySquare: + if (!UseMontgomerySquareIntrinsic) return true; + break; + case vmIntrinsics::_bigIntegerRightShiftWorker: + case vmIntrinsics::_bigIntegerLeftShiftWorker: + break; + case vmIntrinsics::_addExactI: + case vmIntrinsics::_addExactL: + case vmIntrinsics::_decrementExactI: + case vmIntrinsics::_decrementExactL: + case vmIntrinsics::_incrementExactI: + case vmIntrinsics::_incrementExactL: + case vmIntrinsics::_multiplyExactI: + case vmIntrinsics::_multiplyExactL: + case vmIntrinsics::_negateExactI: + case vmIntrinsics::_negateExactL: + case vmIntrinsics::_subtractExactI: + case vmIntrinsics::_subtractExactL: + if (!UseMathExactIntrinsics || !InlineMathNatives) return true; + break; + case vmIntrinsics::_isDigit: + case vmIntrinsics::_isLowerCase: + case vmIntrinsics::_isUpperCase: + case vmIntrinsics::_isWhitespace: + if (!UseCharacterCompareIntrinsics) return true; + break; + case vmIntrinsics::_dcopySign: + case vmIntrinsics::_fcopySign: + if (!InlineMathNatives || !UseCopySignIntrinsic) return true; + break; + case vmIntrinsics::_dsignum: + case vmIntrinsics::_fsignum: + if (!InlineMathNatives || !UseSignumIntrinsic) return true; + break; +#endif // COMPILER2 + default: + return false; + } + + return false; +} + +#define VM_INTRINSIC_INITIALIZE(id, klass, name, sig, flags) #id "\0" +static const char* vm_intrinsic_name_bodies = + VM_INTRINSICS_DO(VM_INTRINSIC_INITIALIZE, + VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE); + +static const char* vm_intrinsic_name_table[vmIntrinsics::ID_LIMIT]; +static TriBoolArray<vmIntrinsics::ID_LIMIT, int> vm_intrinsic_control_words; + +static void init_vm_intrinsic_name_table() { + const char** nt = &vm_intrinsic_name_table[0]; + char* string = (char*) &vm_intrinsic_name_bodies[0]; + for (int index = vmIntrinsics::FIRST_ID; index < vmIntrinsics::ID_LIMIT; index++) { + nt[index] = string; + string += strlen(string); // skip string body + string += 1; // skip trailing null + } + assert(!strcmp(nt[vmIntrinsics::_hashCode], "_hashCode"), "lined up"); + nt[vmIntrinsics::_none] = "_none"; +} + +const char* vmIntrinsics::name_at(vmIntrinsics::ID id) { + const char** nt = &vm_intrinsic_name_table[0]; + if (nt[_none] == NULL) { + init_vm_intrinsic_name_table(); + } + + if ((uint)id < (uint)ID_LIMIT) + return vm_intrinsic_name_table[(uint)id]; + else + return "(unknown intrinsic)"; +} + +vmIntrinsics::ID vmIntrinsics::find_id(const char* name) { + const char** nt = &vm_intrinsic_name_table[0]; + if (nt[_none] == NULL) { + init_vm_intrinsic_name_table(); + } + + for (int index = FIRST_ID; index < ID_LIMIT; ++index) { + if (0 == strcmp(name, nt[index])) { + return ID_from(index); + } + } + + return _none; +} + +bool vmIntrinsics::is_disabled_by_flags(const methodHandle& method) { + vmIntrinsics::ID id = method->intrinsic_id(); + return is_disabled_by_flags(id); +} + +bool vmIntrinsics::is_disabled_by_flags(vmIntrinsics::ID id) { + assert(id > _none && id < ID_LIMIT, "must be a VM intrinsic"); + + // not initialized yet, process Control/DisableIntrinsic + if (vm_intrinsic_control_words[_none].is_default()) { + for (ControlIntrinsicIter iter(ControlIntrinsic); *iter != NULL; ++iter) { + vmIntrinsics::ID id = vmIntrinsics::find_id(*iter); + + if (id != vmIntrinsics::_none) { + vm_intrinsic_control_words[id] = iter.is_enabled() && !disabled_by_jvm_flags(id); + } + } + + // Order matters, DisableIntrinsic can overwrite ControlIntrinsic + for (ControlIntrinsicIter iter(DisableIntrinsic, true/*disable_all*/); *iter != NULL; ++iter) { + vmIntrinsics::ID id = vmIntrinsics::find_id(*iter); + + if (id != vmIntrinsics::_none) { + vm_intrinsic_control_words[id] = false; + } + } + + vm_intrinsic_control_words[_none] = true; + } + + TriBool b = vm_intrinsic_control_words[id]; + if (b.is_default()) { + // unknown yet, query and cache it + b = vm_intrinsic_control_words[id] = !disabled_by_jvm_flags(id); + } + + return !b; +} + +// These are for forming case labels: +#define ID3(x, y, z) (( jlong)(z) + \ + ((jlong)(y) << vmSymbols::log2_SID_LIMIT) + \ + ((jlong)(x) << (2*vmSymbols::log2_SID_LIMIT)) ) +#define SID_ENUM(n) vmSymbols::VM_SYMBOL_ENUM_NAME(n) + +vmIntrinsics::ID vmIntrinsics::find_id_impl(vmSymbols::SID holder, + vmSymbols::SID name, + vmSymbols::SID sig, + jshort flags) { + assert((int)vmSymbols::SID_LIMIT <= (1<<vmSymbols::log2_SID_LIMIT), "must fit"); + + // Let the C compiler build the decision tree. + +#define VM_INTRINSIC_CASE(id, klass, name, sig, fcode) \ + case ID3(SID_ENUM(klass), SID_ENUM(name), SID_ENUM(sig)): \ + if (!match_##fcode(flags)) break; \ + return id; + + switch (ID3(holder, name, sig)) { + VM_INTRINSICS_DO(VM_INTRINSIC_CASE, + VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE); + } + return vmIntrinsics::_none; + +#undef VM_INTRINSIC_CASE +} + + +const char* vmIntrinsics::short_name_as_C_string(vmIntrinsics::ID id, char* buf, int buflen) { + const char* str = name_at(id); +#ifndef PRODUCT + const char* kname = vmSymbols::name_for(class_for(id)); + const char* mname = vmSymbols::name_for(name_for(id)); + const char* sname = vmSymbols::name_for(signature_for(id)); + const char* fname = ""; + switch (flags_for(id)) { + case F_Y: fname = "synchronized "; break; + case F_RN: fname = "native "; break; + case F_SN: fname = "native static "; break; + case F_S: fname = "static "; break; + case F_RNY:fname = "native synchronized "; break; + default: break; + } + const char* kptr = strrchr(kname, JVM_SIGNATURE_SLASH); + if (kptr != NULL) kname = kptr + 1; + int len = jio_snprintf(buf, buflen, "%s: %s%s.%s%s", + str, fname, kname, mname, sname); + if (len < buflen) + str = buf; +#endif //PRODUCT + return str; +} + + +// These are to get information about intrinsics. + +#define ID4(x, y, z, f) ((ID3(x, y, z) << vmIntrinsics::log2_FLAG_LIMIT) | (jlong) (f)) + +static const jlong intrinsic_info_array[vmIntrinsics::ID_LIMIT+1] = { +#define VM_INTRINSIC_INFO(ignore_id, klass, name, sig, fcode) \ + ID4(SID_ENUM(klass), SID_ENUM(name), SID_ENUM(sig), vmIntrinsics::fcode), + + 0, VM_INTRINSICS_DO(VM_INTRINSIC_INFO, + VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) + 0 +#undef VM_INTRINSIC_INFO +}; + +inline jlong intrinsic_info(vmIntrinsics::ID id) { + return intrinsic_info_array[vmIntrinsics::ID_from((int)id)]; +} + +vmSymbols::SID vmIntrinsics::class_for(vmIntrinsics::ID id) { + jlong info = intrinsic_info(id); + int shift = 2*vmSymbols::log2_SID_LIMIT + log2_FLAG_LIMIT, mask = right_n_bits(vmSymbols::log2_SID_LIMIT); + assert(((ID4(1021,1022,1023,15) >> shift) & mask) == 1021, ""); + return vmSymbols::SID( (info >> shift) & mask ); +} + +vmSymbols::SID vmIntrinsics::name_for(vmIntrinsics::ID id) { + jlong info = intrinsic_info(id); + int shift = vmSymbols::log2_SID_LIMIT + log2_FLAG_LIMIT, mask = right_n_bits(vmSymbols::log2_SID_LIMIT); + assert(((ID4(1021,1022,1023,15) >> shift) & mask) == 1022, ""); + return vmSymbols::SID( (info >> shift) & mask ); +} + +vmSymbols::SID vmIntrinsics::signature_for(vmIntrinsics::ID id) { + jlong info = intrinsic_info(id); + int shift = log2_FLAG_LIMIT, mask = right_n_bits(vmSymbols::log2_SID_LIMIT); + assert(((ID4(1021,1022,1023,15) >> shift) & mask) == 1023, ""); + return vmSymbols::SID( (info >> shift) & mask ); +} + +vmIntrinsics::Flags vmIntrinsics::flags_for(vmIntrinsics::ID id) { + jlong info = intrinsic_info(id); + int shift = 0, mask = right_n_bits(log2_FLAG_LIMIT); + assert(((ID4(1021,1022,1023,15) >> shift) & mask) == 15, ""); + return Flags( (info >> shift) & mask ); +} + + +#ifndef PRODUCT +// verify_method performs an extra check on a matched intrinsic method + +static bool match_method(Method* m, Symbol* n, Symbol* s) { + return (m->name() == n && + m->signature() == s); +} + +static vmIntrinsics::ID match_method_with_klass(Method* m, Symbol* mk) { +#define VM_INTRINSIC_MATCH(id, klassname, namepart, sigpart, flags) \ + { Symbol* k = vmSymbols::klassname(); \ + if (mk == k) { \ + Symbol* n = vmSymbols::namepart(); \ + Symbol* s = vmSymbols::sigpart(); \ + if (match_method(m, n, s)) \ + return vmIntrinsics::id; \ + } } + VM_INTRINSICS_DO(VM_INTRINSIC_MATCH, + VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE); + return vmIntrinsics::_none; +#undef VM_INTRINSIC_MATCH +} + +void vmIntrinsics::verify_method(ID actual_id, Method* m) { + Symbol* mk = m->method_holder()->name(); + ID declared_id = match_method_with_klass(m, mk); + + if (declared_id == actual_id) return; // success + + if (declared_id == _none && actual_id != _none && mk == vmSymbols::java_lang_StrictMath()) { + // Here are a few special cases in StrictMath not declared in vmSymbols.hpp. + switch (actual_id) { + case _min: + case _max: + case _dsqrt: + declared_id = match_method_with_klass(m, vmSymbols::java_lang_Math()); + if (declared_id == actual_id) return; // acceptable alias + break; + default: + break; + } + } + + const char* declared_name = name_at(declared_id); + const char* actual_name = name_at(actual_id); + m = NULL; + ttyLocker ttyl; + if (xtty != NULL) { + xtty->begin_elem("intrinsic_misdeclared actual='%s' declared='%s'", + actual_name, declared_name); + xtty->method(m); + xtty->end_elem("%s", ""); + } + if (PrintMiscellaneous && (WizardMode || Verbose)) { + tty->print_cr("*** misidentified method; %s(%d) should be %s(%d):", + declared_name, declared_id, actual_name, actual_id); + m->print_short_name(tty); + tty->cr(); + } +} +#endif //PRODUCT diff --git a/src/hotspot/share/classfile/vmIntrinsics.hpp b/src/hotspot/share/classfile/vmIntrinsics.hpp new file mode 100644 index 00000000000..69800e6d86e --- /dev/null +++ b/src/hotspot/share/classfile/vmIntrinsics.hpp @@ -0,0 +1,883 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_CLASSFILE_VMINTRINSICS_HPP +#define SHARE_CLASSFILE_VMINTRINSICS_HPP + +// Here are all the intrinsics known to the runtime and the CI. +// Each intrinsic consists of a public enum name (like _hashCode), +// followed by a specification of its klass, name, and signature: +// template(<id>, <klass>, <name>, <sig>, <FCODE>) +// +// If you add an intrinsic here, you must also define its name +// and signature as members of the VM symbols. The VM symbols for +// the intrinsic name and signature may be defined above. +// +// Because the VM_SYMBOLS_DO macro makes reference to VM_INTRINSICS_DO, +// you can also define an intrinsic's name and/or signature locally to the +// intrinsic, if this makes sense. (It often does make sense.) +// +// For example: +// do_intrinsic(_foo, java_lang_Object, foo_name, foo_signature, F_xx) +// do_name( foo_name, "foo") +// do_signature(foo_signature, "()F") +// klass = vmSymbols::java_lang_Object() +// name = vmSymbols::foo_name() +// signature = vmSymbols::foo_signature() +// +// The name and/or signature might be a "well known" symbol +// like "equal" or "()I", in which case there will be no local +// re-definition of the symbol. +// +// The do_class, do_name, and do_signature calls are all used for the +// same purpose: Define yet another VM symbol. They could all be merged +// into a common 'do_symbol' call, but it seems useful to record our +// intentions here about kinds of symbols (class vs. name vs. signature). +// +// The F_xx is one of the Flags enum; see below. +// +// for Emacs: (let ((c-backslash-column 120) (c-backslash-max-column 120)) (c-backslash-region (point) (point-max) nil t)) +// +// +// There are two types of intrinsic methods: (1) Library intrinsics and (2) bytecode intrinsics. +// +// (1) A library intrinsic method may be replaced with hand-crafted assembly code, +// with hand-crafted compiler IR, or with a combination of the two. The semantics +// of the replacement code may differ from the semantics of the replaced code. +// +// (2) Bytecode intrinsic methods are not replaced by special code, but they are +// treated in some other special way by the compiler. For example, the compiler +// may delay inlining for some String-related intrinsic methods (e.g., some methods +// defined in the StringBuilder and StringBuffer classes, see +// Compile::should_delay_string_inlining() for more details). +// +// Due to the difference between the semantics of an intrinsic method as defined +// in the (Java) source code and the semantics of the method as defined +// by the code in the VM, intrinsic methods must be explicitly marked. +// +// Intrinsic methods are marked by the jdk.internal.vm.annotation.IntrinsicCandidate +// annotation. If CheckIntrinsics is enabled, the VM performs the following +// checks when a class C is loaded: (1) all intrinsics defined by the VM for +// class C are present in the loaded class file and are marked; +// (2) an intrinsic is defined by the VM for all marked methods of class C; +// (3) check for orphan methods in class C (i.e., methods for which the VM +// declares an intrinsic but that are not declared for the loaded class C. +// Check (3) is available only in debug builds. +// +// If a mismatch is detected for a method, the VM behaves differently depending +// on the type of build. A fastdebug build exits and reports an error on a mismatch. +// A product build will not replace an unmarked library intrinsic method with +// hand-crafted code, that is, unmarked library intrinsics are treated as ordinary +// methods in a product build. The special treatment of a bytecode intrinsic method +// persists even if the method not marked. +// +// When adding an intrinsic for a method, please make sure to appropriately +// annotate the method in the source code. The list below contains all +// library intrinsics followed by bytecode intrinsics. Please also make sure to +// add the declaration of the intrinsic to the approriate section of the list. +#define VM_INTRINSICS_DO(do_intrinsic, do_class, do_name, do_signature, do_alias) \ + /* (1) Library intrinsics */ \ + do_intrinsic(_hashCode, java_lang_Object, hashCode_name, void_int_signature, F_R) \ + do_name( hashCode_name, "hashCode") \ + do_intrinsic(_getClass, java_lang_Object, getClass_name, void_class_signature, F_R) \ + do_name( getClass_name, "getClass") \ + do_intrinsic(_clone, java_lang_Object, clone_name, void_object_signature, F_R) \ + do_name( clone_name, "clone") \ + do_intrinsic(_notify, java_lang_Object, notify_name, void_method_signature, F_R) \ + do_name( notify_name, "notify") \ + do_intrinsic(_notifyAll, java_lang_Object, notifyAll_name, void_method_signature, F_R) \ + do_name( notifyAll_name, "notifyAll") \ + \ + /* Math & StrictMath intrinsics are defined in terms of just a few signatures: */ \ + do_class(java_lang_Math, "java/lang/Math") \ + do_class(java_lang_StrictMath, "java/lang/StrictMath") \ + do_signature(double2_double_signature, "(DD)D") \ + do_signature(double3_double_signature, "(DDD)D") \ + do_signature(float2_float_signature, "(FF)F") \ + do_signature(float3_float_signature, "(FFF)F") \ + do_signature(int2_int_signature, "(II)I") \ + do_signature(long2_long_signature, "(JJ)J") \ + \ + /* here are the math names, all together: */ \ + do_name(abs_name,"abs") do_name(sin_name,"sin") do_name(cos_name,"cos") \ + do_name(tan_name,"tan") do_name(atan2_name,"atan2") do_name(sqrt_name,"sqrt") \ + do_name(log_name,"log") do_name(log10_name,"log10") do_name(pow_name,"pow") \ + do_name(exp_name,"exp") do_name(min_name,"min") do_name(max_name,"max") \ + do_name(floor_name, "floor") do_name(ceil_name, "ceil") do_name(rint_name, "rint") \ + \ + do_name(addExact_name,"addExact") \ + do_name(decrementExact_name,"decrementExact") \ + do_name(incrementExact_name,"incrementExact") \ + do_name(multiplyExact_name,"multiplyExact") \ + do_name(multiplyHigh_name,"multiplyHigh") \ + do_name(negateExact_name,"negateExact") \ + do_name(subtractExact_name,"subtractExact") \ + do_name(fma_name, "fma") \ + do_name(copySign_name, "copySign") \ + do_name(signum_name,"signum") \ + \ + do_intrinsic(_dabs, java_lang_Math, abs_name, double_double_signature, F_S) \ + do_intrinsic(_fabs, java_lang_Math, abs_name, float_float_signature, F_S) \ + do_intrinsic(_iabs, java_lang_Math, abs_name, int_int_signature, F_S) \ + do_intrinsic(_labs, java_lang_Math, abs_name, long_long_signature, F_S) \ + do_intrinsic(_dsin, java_lang_Math, sin_name, double_double_signature, F_S) \ + do_intrinsic(_floor, java_lang_Math, floor_name, double_double_signature, F_S) \ + do_intrinsic(_ceil, java_lang_Math, ceil_name, double_double_signature, F_S) \ + do_intrinsic(_rint, java_lang_Math, rint_name, double_double_signature, F_S) \ + do_intrinsic(_dcos, java_lang_Math, cos_name, double_double_signature, F_S) \ + do_intrinsic(_dtan, java_lang_Math, tan_name, double_double_signature, F_S) \ + do_intrinsic(_datan2, java_lang_Math, atan2_name, double2_double_signature, F_S) \ + do_intrinsic(_dsqrt, java_lang_Math, sqrt_name, double_double_signature, F_S) \ + do_intrinsic(_dlog, java_lang_Math, log_name, double_double_signature, F_S) \ + do_intrinsic(_dlog10, java_lang_Math, log10_name, double_double_signature, F_S) \ + do_intrinsic(_dpow, java_lang_Math, pow_name, double2_double_signature, F_S) \ + do_intrinsic(_dexp, java_lang_Math, exp_name, double_double_signature, F_S) \ + do_intrinsic(_min, java_lang_Math, min_name, int2_int_signature, F_S) \ + do_intrinsic(_max, java_lang_Math, max_name, int2_int_signature, F_S) \ + do_intrinsic(_addExactI, java_lang_Math, addExact_name, int2_int_signature, F_S) \ + do_intrinsic(_addExactL, java_lang_Math, addExact_name, long2_long_signature, F_S) \ + do_intrinsic(_decrementExactI, java_lang_Math, decrementExact_name, int_int_signature, F_S) \ + do_intrinsic(_decrementExactL, java_lang_Math, decrementExact_name, long_long_signature, F_S) \ + do_intrinsic(_incrementExactI, java_lang_Math, incrementExact_name, int_int_signature, F_S) \ + do_intrinsic(_incrementExactL, java_lang_Math, incrementExact_name, long_long_signature, F_S) \ + do_intrinsic(_multiplyExactI, java_lang_Math, multiplyExact_name, int2_int_signature, F_S) \ + do_intrinsic(_multiplyExactL, java_lang_Math, multiplyExact_name, long2_long_signature, F_S) \ + do_intrinsic(_multiplyHigh, java_lang_Math, multiplyHigh_name, long2_long_signature, F_S) \ + do_intrinsic(_negateExactI, java_lang_Math, negateExact_name, int_int_signature, F_S) \ + do_intrinsic(_negateExactL, java_lang_Math, negateExact_name, long_long_signature, F_S) \ + do_intrinsic(_subtractExactI, java_lang_Math, subtractExact_name, int2_int_signature, F_S) \ + do_intrinsic(_subtractExactL, java_lang_Math, subtractExact_name, long2_long_signature, F_S) \ + do_intrinsic(_fmaD, java_lang_Math, fma_name, double3_double_signature, F_S) \ + do_intrinsic(_fmaF, java_lang_Math, fma_name, float3_float_signature, F_S) \ + do_intrinsic(_maxF, java_lang_Math, max_name, float2_float_signature, F_S) \ + do_intrinsic(_minF, java_lang_Math, min_name, float2_float_signature, F_S) \ + do_intrinsic(_maxD, java_lang_Math, max_name, double2_double_signature, F_S) \ + do_intrinsic(_minD, java_lang_Math, min_name, double2_double_signature, F_S) \ + do_intrinsic(_dcopySign, java_lang_Math, copySign_name, double2_double_signature, F_S) \ + do_intrinsic(_fcopySign, java_lang_Math, copySign_name, float2_float_signature, F_S) \ + do_intrinsic(_dsignum, java_lang_Math, signum_name, double_double_signature, F_S) \ + do_intrinsic(_fsignum, java_lang_Math, signum_name, float_float_signature, F_S) \ + \ + do_intrinsic(_floatToRawIntBits, java_lang_Float, floatToRawIntBits_name, float_int_signature, F_S) \ + do_name( floatToRawIntBits_name, "floatToRawIntBits") \ + do_intrinsic(_floatToIntBits, java_lang_Float, floatToIntBits_name, float_int_signature, F_S) \ + do_name( floatToIntBits_name, "floatToIntBits") \ + do_intrinsic(_intBitsToFloat, java_lang_Float, intBitsToFloat_name, int_float_signature, F_S) \ + do_name( intBitsToFloat_name, "intBitsToFloat") \ + do_intrinsic(_doubleToRawLongBits, java_lang_Double, doubleToRawLongBits_name, double_long_signature, F_S) \ + do_name( doubleToRawLongBits_name, "doubleToRawLongBits") \ + do_intrinsic(_doubleToLongBits, java_lang_Double, doubleToLongBits_name, double_long_signature, F_S) \ + do_name( doubleToLongBits_name, "doubleToLongBits") \ + do_intrinsic(_longBitsToDouble, java_lang_Double, longBitsToDouble_name, long_double_signature, F_S) \ + do_name( longBitsToDouble_name, "longBitsToDouble") \ + \ + do_intrinsic(_numberOfLeadingZeros_i, java_lang_Integer, numberOfLeadingZeros_name,int_int_signature, F_S) \ + do_intrinsic(_numberOfLeadingZeros_l, java_lang_Long, numberOfLeadingZeros_name,long_int_signature, F_S) \ + \ + do_intrinsic(_numberOfTrailingZeros_i, java_lang_Integer, numberOfTrailingZeros_name,int_int_signature, F_S) \ + do_intrinsic(_numberOfTrailingZeros_l, java_lang_Long, numberOfTrailingZeros_name,long_int_signature, F_S) \ + \ + do_intrinsic(_bitCount_i, java_lang_Integer, bitCount_name, int_int_signature, F_S) \ + do_intrinsic(_bitCount_l, java_lang_Long, bitCount_name, long_int_signature, F_S) \ + \ + do_intrinsic(_reverseBytes_i, java_lang_Integer, reverseBytes_name, int_int_signature, F_S) \ + do_name( reverseBytes_name, "reverseBytes") \ + do_intrinsic(_reverseBytes_l, java_lang_Long, reverseBytes_name, long_long_signature, F_S) \ + /* (symbol reverseBytes_name defined above) */ \ + do_intrinsic(_reverseBytes_c, java_lang_Character, reverseBytes_name, char_char_signature, F_S) \ + /* (symbol reverseBytes_name defined above) */ \ + do_intrinsic(_reverseBytes_s, java_lang_Short, reverseBytes_name, short_short_signature, F_S) \ + /* (symbol reverseBytes_name defined above) */ \ + \ + do_intrinsic(_identityHashCode, java_lang_System, identityHashCode_name, object_int_signature, F_S) \ + do_name( identityHashCode_name, "identityHashCode") \ + do_intrinsic(_currentTimeMillis, java_lang_System, currentTimeMillis_name, void_long_signature, F_S) \ + \ + do_name( currentTimeMillis_name, "currentTimeMillis") \ + do_intrinsic(_nanoTime, java_lang_System, nanoTime_name, void_long_signature, F_S) \ + do_name( nanoTime_name, "nanoTime") \ + \ + JFR_INTRINSICS(do_intrinsic, do_class, do_name, do_signature, do_alias) \ + \ + do_intrinsic(_arraycopy, java_lang_System, arraycopy_name, arraycopy_signature, F_S) \ + do_name( arraycopy_name, "arraycopy") \ + do_signature(arraycopy_signature, "(Ljava/lang/Object;ILjava/lang/Object;II)V") \ + do_intrinsic(_currentThread, java_lang_Thread, currentThread_name, currentThread_signature, F_S) \ + do_name( currentThread_name, "currentThread") \ + do_signature(currentThread_signature, "()Ljava/lang/Thread;") \ + \ + /* reflective intrinsics, for java/lang/Class, etc. */ \ + do_intrinsic(_isAssignableFrom, java_lang_Class, isAssignableFrom_name, class_boolean_signature, F_RN) \ + do_name( isAssignableFrom_name, "isAssignableFrom") \ + do_intrinsic(_isInstance, java_lang_Class, isInstance_name, object_boolean_signature, F_RN) \ + do_name( isInstance_name, "isInstance") \ + do_intrinsic(_getModifiers, java_lang_Class, getModifiers_name, void_int_signature, F_RN) \ + do_name( getModifiers_name, "getModifiers") \ + do_intrinsic(_isInterface, java_lang_Class, isInterface_name, void_boolean_signature, F_RN) \ + do_name( isInterface_name, "isInterface") \ + do_intrinsic(_isArray, java_lang_Class, isArray_name, void_boolean_signature, F_RN) \ + do_name( isArray_name, "isArray") \ + do_intrinsic(_isPrimitive, java_lang_Class, isPrimitive_name, void_boolean_signature, F_RN) \ + do_name( isPrimitive_name, "isPrimitive") \ + do_intrinsic(_isHidden, java_lang_Class, isHidden_name, void_boolean_signature, F_RN) \ + do_name( isHidden_name, "isHidden") \ + do_intrinsic(_getSuperclass, java_lang_Class, getSuperclass_name, void_class_signature, F_RN) \ + do_name( getSuperclass_name, "getSuperclass") \ + do_intrinsic(_Class_cast, java_lang_Class, Class_cast_name, object_object_signature, F_R) \ + do_name( Class_cast_name, "cast") \ + \ + do_intrinsic(_getClassAccessFlags, reflect_Reflection, getClassAccessFlags_name, class_int_signature, F_SN) \ + do_name( getClassAccessFlags_name, "getClassAccessFlags") \ + do_intrinsic(_getLength, java_lang_reflect_Array, getLength_name, object_int_signature, F_SN) \ + do_name( getLength_name, "getLength") \ + \ + do_intrinsic(_getCallerClass, reflect_Reflection, getCallerClass_name, void_class_signature, F_SN) \ + do_name( getCallerClass_name, "getCallerClass") \ + \ + do_intrinsic(_newArray, java_lang_reflect_Array, newArray_name, newArray_signature, F_SN) \ + do_name( newArray_name, "newArray") \ + do_signature(newArray_signature, "(Ljava/lang/Class;I)Ljava/lang/Object;") \ + \ + do_intrinsic(_onSpinWait, java_lang_Thread, onSpinWait_name, onSpinWait_signature, F_S) \ + do_name( onSpinWait_name, "onSpinWait") \ + do_alias( onSpinWait_signature, void_method_signature) \ + \ + do_intrinsic(_copyOf, java_util_Arrays, copyOf_name, copyOf_signature, F_S) \ + do_name( copyOf_name, "copyOf") \ + do_signature(copyOf_signature, "([Ljava/lang/Object;ILjava/lang/Class;)[Ljava/lang/Object;") \ + \ + do_intrinsic(_copyOfRange, java_util_Arrays, copyOfRange_name, copyOfRange_signature, F_S) \ + do_name( copyOfRange_name, "copyOfRange") \ + do_signature(copyOfRange_signature, "([Ljava/lang/Object;IILjava/lang/Class;)[Ljava/lang/Object;") \ + \ + do_intrinsic(_equalsC, java_util_Arrays, equals_name, equalsC_signature, F_S) \ + do_signature(equalsC_signature, "([C[C)Z") \ + do_intrinsic(_equalsB, java_util_Arrays, equals_name, equalsB_signature, F_S) \ + do_signature(equalsB_signature, "([B[B)Z") \ + \ + do_intrinsic(_compressStringC, java_lang_StringUTF16, compress_name, encodeISOArray_signature, F_S) \ + do_name( compress_name, "compress") \ + do_intrinsic(_compressStringB, java_lang_StringUTF16, compress_name, indexOfI_signature, F_S) \ + do_intrinsic(_inflateStringC, java_lang_StringLatin1, inflate_name, inflateC_signature, F_S) \ + do_name( inflate_name, "inflate") \ + do_signature(inflateC_signature, "([BI[CII)V") \ + do_intrinsic(_inflateStringB, java_lang_StringLatin1, inflate_name, inflateB_signature, F_S) \ + do_signature(inflateB_signature, "([BI[BII)V") \ + do_intrinsic(_toBytesStringU, java_lang_StringUTF16, toBytes_name, toBytesU_signature, F_S) \ + do_name( toBytes_name, "toBytes") \ + do_signature(toBytesU_signature, "([CII)[B") \ + do_intrinsic(_getCharsStringU, java_lang_StringUTF16, getCharsU_name, getCharsU_signature, F_S) \ + do_name( getCharsU_name, "getChars") \ + do_signature(getCharsU_signature, "([BII[CI)V") \ + do_intrinsic(_getCharStringU, java_lang_StringUTF16, getChar_name, getCharStringU_signature, F_S) \ + do_signature(getCharStringU_signature, "([BI)C") \ + do_intrinsic(_putCharStringU, java_lang_StringUTF16, putChar_name, putCharStringU_signature, F_S) \ + do_signature(putCharStringU_signature, "([BII)V") \ + do_intrinsic(_compareToL, java_lang_StringLatin1,compareTo_name, compareTo_indexOf_signature, F_S) \ + do_intrinsic(_compareToU, java_lang_StringUTF16, compareTo_name, compareTo_indexOf_signature, F_S) \ + do_intrinsic(_compareToLU, java_lang_StringLatin1,compareToLU_name, compareTo_indexOf_signature, F_S) \ + do_intrinsic(_compareToUL, java_lang_StringUTF16, compareToUL_name, compareTo_indexOf_signature, F_S) \ + do_signature(compareTo_indexOf_signature, "([B[B)I") \ + do_name( compareTo_name, "compareTo") \ + do_name( compareToLU_name, "compareToUTF16") \ + do_name( compareToUL_name, "compareToLatin1") \ + do_intrinsic(_indexOfL, java_lang_StringLatin1,indexOf_name, compareTo_indexOf_signature, F_S) \ + do_intrinsic(_indexOfU, java_lang_StringUTF16, indexOf_name, compareTo_indexOf_signature, F_S) \ + do_intrinsic(_indexOfUL, java_lang_StringUTF16, indexOfUL_name, compareTo_indexOf_signature, F_S) \ + do_intrinsic(_indexOfIL, java_lang_StringLatin1,indexOf_name, indexOfI_signature, F_S) \ + do_intrinsic(_indexOfIU, java_lang_StringUTF16, indexOf_name, indexOfI_signature, F_S) \ + do_intrinsic(_indexOfIUL, java_lang_StringUTF16, indexOfUL_name, indexOfI_signature, F_S) \ + do_intrinsic(_indexOfU_char, java_lang_StringUTF16, indexOfChar_name, indexOfChar_signature, F_S) \ + do_name( indexOf_name, "indexOf") \ + do_name( indexOfChar_name, "indexOfChar") \ + do_name( indexOfUL_name, "indexOfLatin1") \ + do_signature(indexOfI_signature, "([BI[BII)I") \ + do_signature(indexOfChar_signature, "([BIII)I") \ + do_intrinsic(_equalsL, java_lang_StringLatin1,equals_name, equalsB_signature, F_S) \ + do_intrinsic(_equalsU, java_lang_StringUTF16, equals_name, equalsB_signature, F_S) \ + \ + do_intrinsic(_isDigit, java_lang_CharacterDataLatin1, isDigit_name, int_bool_signature, F_R) \ + do_name( isDigit_name, "isDigit") \ + do_intrinsic(_isLowerCase, java_lang_CharacterDataLatin1, isLowerCase_name, int_bool_signature, F_R) \ + do_name( isLowerCase_name, "isLowerCase") \ + do_intrinsic(_isUpperCase, java_lang_CharacterDataLatin1, isUpperCase_name, int_bool_signature, F_R) \ + do_name( isUpperCase_name, "isUpperCase") \ + do_intrinsic(_isWhitespace, java_lang_CharacterDataLatin1, isWhitespace_name, int_bool_signature, F_R) \ + do_name( isWhitespace_name, "isWhitespace") \ + \ + do_intrinsic(_Preconditions_checkIndex, jdk_internal_util_Preconditions, checkIndex_name, Preconditions_checkIndex_signature, F_S) \ + do_signature(Preconditions_checkIndex_signature, "(IILjava/util/function/BiFunction;)I") \ + \ + do_class(java_nio_Buffer, "java/nio/Buffer") \ + do_intrinsic(_checkIndex, java_nio_Buffer, checkIndex_name, int_int_signature, F_R) \ + do_name( checkIndex_name, "checkIndex") \ + \ + do_class(java_lang_StringCoding, "java/lang/StringCoding") \ + do_intrinsic(_hasNegatives, java_lang_StringCoding, hasNegatives_name, hasNegatives_signature, F_S) \ + do_name( hasNegatives_name, "hasNegatives") \ + do_signature(hasNegatives_signature, "([BII)Z") \ + \ + do_class(sun_nio_cs_iso8859_1_Encoder, "sun/nio/cs/ISO_8859_1$Encoder") \ + do_intrinsic(_encodeISOArray, sun_nio_cs_iso8859_1_Encoder, encodeISOArray_name, encodeISOArray_signature, F_S) \ + do_name( encodeISOArray_name, "implEncodeISOArray") \ + do_signature(encodeISOArray_signature, "([CI[BII)I") \ + \ + do_intrinsic(_encodeByteISOArray, java_lang_StringCoding, encodeISOArray_name, indexOfI_signature, F_S) \ + \ + do_class(java_math_BigInteger, "java/math/BigInteger") \ + do_intrinsic(_multiplyToLen, java_math_BigInteger, multiplyToLen_name, multiplyToLen_signature, F_S) \ + do_name( multiplyToLen_name, "implMultiplyToLen") \ + do_signature(multiplyToLen_signature, "([II[II[I)[I") \ + \ + do_intrinsic(_squareToLen, java_math_BigInteger, squareToLen_name, squareToLen_signature, F_S) \ + do_name( squareToLen_name, "implSquareToLen") \ + do_signature(squareToLen_signature, "([II[II)[I") \ + \ + do_intrinsic(_mulAdd, java_math_BigInteger, mulAdd_name, mulAdd_signature, F_S) \ + do_name( mulAdd_name, "implMulAdd") \ + do_signature(mulAdd_signature, "([I[IIII)I") \ + \ + do_intrinsic(_montgomeryMultiply, java_math_BigInteger, montgomeryMultiply_name, montgomeryMultiply_signature, F_S) \ + do_name( montgomeryMultiply_name, "implMontgomeryMultiply") \ + do_signature(montgomeryMultiply_signature, "([I[I[IIJ[I)[I") \ + \ + do_intrinsic(_montgomerySquare, java_math_BigInteger, montgomerySquare_name, montgomerySquare_signature, F_S) \ + do_name( montgomerySquare_name, "implMontgomerySquare") \ + do_signature(montgomerySquare_signature, "([I[IIJ[I)[I") \ + \ + do_intrinsic(_bigIntegerRightShiftWorker, java_math_BigInteger, rightShift_name, big_integer_shift_worker_signature, F_S) \ + do_name( rightShift_name, "shiftRightImplWorker") \ + \ + do_intrinsic(_bigIntegerLeftShiftWorker, java_math_BigInteger, leftShift_name, big_integer_shift_worker_signature, F_S) \ + do_name( leftShift_name, "shiftLeftImplWorker") \ + \ + do_class(jdk_internal_util_ArraysSupport, "jdk/internal/util/ArraysSupport") \ + do_intrinsic(_vectorizedMismatch, jdk_internal_util_ArraysSupport, vectorizedMismatch_name, vectorizedMismatch_signature, F_S)\ + do_name(vectorizedMismatch_name, "vectorizedMismatch") \ + do_signature(vectorizedMismatch_signature, "(Ljava/lang/Object;JLjava/lang/Object;JII)I") \ + \ + /* java/lang/ref/Reference */ \ + do_intrinsic(_Reference_get, java_lang_ref_Reference, get_name, void_object_signature, F_R) \ + \ + /* support for com.sun.crypto.provider.AESCrypt and some of its callers */ \ + do_class(com_sun_crypto_provider_aescrypt, "com/sun/crypto/provider/AESCrypt") \ + do_intrinsic(_aescrypt_encryptBlock, com_sun_crypto_provider_aescrypt, encryptBlock_name, byteArray_int_byteArray_int_signature, F_R) \ + do_intrinsic(_aescrypt_decryptBlock, com_sun_crypto_provider_aescrypt, decryptBlock_name, byteArray_int_byteArray_int_signature, F_R) \ + do_name( encryptBlock_name, "implEncryptBlock") \ + do_name( decryptBlock_name, "implDecryptBlock") \ + do_signature(byteArray_int_byteArray_int_signature, "([BI[BI)V") \ + \ + do_class(com_sun_crypto_provider_cipherBlockChaining, "com/sun/crypto/provider/CipherBlockChaining") \ + do_intrinsic(_cipherBlockChaining_encryptAESCrypt, com_sun_crypto_provider_cipherBlockChaining, encrypt_name, byteArray_int_int_byteArray_int_signature, F_R) \ + do_intrinsic(_cipherBlockChaining_decryptAESCrypt, com_sun_crypto_provider_cipherBlockChaining, decrypt_name, byteArray_int_int_byteArray_int_signature, F_R) \ + do_name( encrypt_name, "implEncrypt") \ + do_name( decrypt_name, "implDecrypt") \ + do_signature(byteArray_int_int_byteArray_int_signature, "([BII[BI)I") \ + \ + do_class(com_sun_crypto_provider_electronicCodeBook, "com/sun/crypto/provider/ElectronicCodeBook") \ + do_intrinsic(_electronicCodeBook_encryptAESCrypt, com_sun_crypto_provider_electronicCodeBook, ecb_encrypt_name, byteArray_int_int_byteArray_int_signature, F_R) \ + do_intrinsic(_electronicCodeBook_decryptAESCrypt, com_sun_crypto_provider_electronicCodeBook, ecb_decrypt_name, byteArray_int_int_byteArray_int_signature, F_R) \ + do_name(ecb_encrypt_name, "implECBEncrypt") \ + do_name(ecb_decrypt_name, "implECBDecrypt") \ + \ + do_class(com_sun_crypto_provider_counterMode, "com/sun/crypto/provider/CounterMode") \ + do_intrinsic(_counterMode_AESCrypt, com_sun_crypto_provider_counterMode, crypt_name, byteArray_int_int_byteArray_int_signature, F_R) \ + do_name( crypt_name, "implCrypt") \ + \ + /* support for sun.security.provider.MD5 */ \ + do_class(sun_security_provider_md5, "sun/security/provider/MD5") \ + do_intrinsic(_md5_implCompress, sun_security_provider_md5, implCompress_name, implCompress_signature, F_R) \ + do_name( implCompress_name, "implCompress0") \ + do_signature(implCompress_signature, "([BI)V") \ + \ + /* support for sun.security.provider.SHA */ \ + do_class(sun_security_provider_sha, "sun/security/provider/SHA") \ + do_intrinsic(_sha_implCompress, sun_security_provider_sha, implCompress_name, implCompress_signature, F_R) \ + \ + /* support for sun.security.provider.SHA2 */ \ + do_class(sun_security_provider_sha2, "sun/security/provider/SHA2") \ + do_intrinsic(_sha2_implCompress, sun_security_provider_sha2, implCompress_name, implCompress_signature, F_R) \ + \ + /* support for sun.security.provider.SHA5 */ \ + do_class(sun_security_provider_sha5, "sun/security/provider/SHA5") \ + do_intrinsic(_sha5_implCompress, sun_security_provider_sha5, implCompress_name, implCompress_signature, F_R) \ + \ + /* support for sun.security.provider.DigestBase */ \ + do_class(sun_security_provider_digestbase, "sun/security/provider/DigestBase") \ + do_intrinsic(_digestBase_implCompressMB, sun_security_provider_digestbase, implCompressMB_name, implCompressMB_signature, F_R) \ + do_name( implCompressMB_name, "implCompressMultiBlock0") \ + do_signature(implCompressMB_signature, "([BII)I") \ + \ + /* support for java.util.Base64.Encoder*/ \ + do_class(java_util_Base64_Encoder, "java/util/Base64$Encoder") \ + do_intrinsic(_base64_encodeBlock, java_util_Base64_Encoder, encodeBlock_name, encodeBlock_signature, F_R) \ + do_name(encodeBlock_name, "encodeBlock") \ + do_signature(encodeBlock_signature, "([BII[BIZ)V") \ + \ + /* support for com.sun.crypto.provider.GHASH */ \ + do_class(com_sun_crypto_provider_ghash, "com/sun/crypto/provider/GHASH") \ + do_intrinsic(_ghash_processBlocks, com_sun_crypto_provider_ghash, processBlocks_name, ghash_processBlocks_signature, F_S) \ + do_name(processBlocks_name, "processBlocks") \ + do_signature(ghash_processBlocks_signature, "([BII[J[J)V") \ + \ + /* support for java.util.zip */ \ + do_class(java_util_zip_CRC32, "java/util/zip/CRC32") \ + do_intrinsic(_updateCRC32, java_util_zip_CRC32, update_name, int2_int_signature, F_SN) \ + do_name( update_name, "update") \ + do_intrinsic(_updateBytesCRC32, java_util_zip_CRC32, updateBytes_name, updateBytes_signature, F_SN) \ + do_name( updateBytes_name, "updateBytes0") \ + do_signature(updateBytes_signature, "(I[BII)I") \ + do_intrinsic(_updateByteBufferCRC32, java_util_zip_CRC32, updateByteBuffer_name, updateByteBuffer_signature, F_SN) \ + do_name( updateByteBuffer_name, "updateByteBuffer0") \ + do_signature(updateByteBuffer_signature, "(IJII)I") \ + \ + /* support for java.util.zip.CRC32C */ \ + do_class(java_util_zip_CRC32C, "java/util/zip/CRC32C") \ + do_intrinsic(_updateBytesCRC32C, java_util_zip_CRC32C, updateBytes_C_name, updateBytes_signature, F_S) \ + do_name( updateBytes_C_name, "updateBytes") \ + do_intrinsic(_updateDirectByteBufferCRC32C, java_util_zip_CRC32C, updateDirectByteBuffer_C_name, updateByteBuffer_signature, F_S) \ + do_name( updateDirectByteBuffer_C_name, "updateDirectByteBuffer") \ + \ + /* support for java.util.zip.Adler32 */ \ + do_class(java_util_zip_Adler32, "java/util/zip/Adler32") \ + do_intrinsic(_updateBytesAdler32, java_util_zip_Adler32, updateBytes_C_name, updateBytes_signature, F_SN) \ + do_intrinsic(_updateByteBufferAdler32, java_util_zip_Adler32, updateByteBuffer_A_name, updateByteBuffer_signature, F_SN) \ + do_name( updateByteBuffer_A_name, "updateByteBuffer") \ + \ + /* support for UnsafeConstants */ \ + do_class(jdk_internal_misc_UnsafeConstants, "jdk/internal/misc/UnsafeConstants") \ + \ + /* support for Unsafe */ \ + do_class(jdk_internal_misc_Unsafe, "jdk/internal/misc/Unsafe") \ + do_class(sun_misc_Unsafe, "sun/misc/Unsafe") \ + \ + do_intrinsic(_writeback0, jdk_internal_misc_Unsafe, writeback0_name, long_void_signature , F_RN) \ + do_name( writeback0_name, "writeback0") \ + do_intrinsic(_writebackPreSync0, jdk_internal_misc_Unsafe, writebackPreSync0_name, void_method_signature , F_RN) \ + do_name( writebackPreSync0_name, "writebackPreSync0") \ + do_intrinsic(_writebackPostSync0, jdk_internal_misc_Unsafe, writebackPostSync0_name, void_method_signature , F_RN) \ + do_name( writebackPostSync0_name, "writebackPostSync0") \ + do_intrinsic(_allocateInstance, jdk_internal_misc_Unsafe, allocateInstance_name, allocateInstance_signature, F_RN) \ + do_name( allocateInstance_name, "allocateInstance") \ + do_signature(allocateInstance_signature, "(Ljava/lang/Class;)Ljava/lang/Object;") \ + do_intrinsic(_allocateUninitializedArray, jdk_internal_misc_Unsafe, allocateUninitializedArray_name, newArray_signature, F_R) \ + do_name( allocateUninitializedArray_name, "allocateUninitializedArray0") \ + do_intrinsic(_copyMemory, jdk_internal_misc_Unsafe, copyMemory_name, copyMemory_signature, F_RN) \ + do_name( copyMemory_name, "copyMemory0") \ + do_signature(copyMemory_signature, "(Ljava/lang/Object;JLjava/lang/Object;JJ)V") \ + do_intrinsic(_loadFence, jdk_internal_misc_Unsafe, loadFence_name, loadFence_signature, F_RN) \ + do_name( loadFence_name, "loadFence") \ + do_alias( loadFence_signature, void_method_signature) \ + do_intrinsic(_storeFence, jdk_internal_misc_Unsafe, storeFence_name, storeFence_signature, F_RN) \ + do_name( storeFence_name, "storeFence") \ + do_alias( storeFence_signature, void_method_signature) \ + do_intrinsic(_fullFence, jdk_internal_misc_Unsafe, fullFence_name, fullFence_signature, F_RN) \ + do_name( fullFence_name, "fullFence") \ + do_alias( fullFence_signature, void_method_signature) \ + \ + /* Custom branch frequencies profiling support for JSR292 */ \ + do_class(java_lang_invoke_MethodHandleImpl, "java/lang/invoke/MethodHandleImpl") \ + do_intrinsic(_profileBoolean, java_lang_invoke_MethodHandleImpl, profileBoolean_name, profileBoolean_signature, F_S) \ + do_name( profileBoolean_name, "profileBoolean") \ + do_signature(profileBoolean_signature, "(Z[I)Z") \ + do_intrinsic(_isCompileConstant, java_lang_invoke_MethodHandleImpl, isCompileConstant_name, isCompileConstant_signature, F_S) \ + do_name( isCompileConstant_name, "isCompileConstant") \ + do_alias( isCompileConstant_signature, object_boolean_signature) \ + \ + /* unsafe memory references (there are a lot of them...) */ \ + do_signature(getReference_signature, "(Ljava/lang/Object;J)Ljava/lang/Object;") \ + do_signature(putReference_signature, "(Ljava/lang/Object;JLjava/lang/Object;)V") \ + do_signature(getBoolean_signature, "(Ljava/lang/Object;J)Z") \ + do_signature(putBoolean_signature, "(Ljava/lang/Object;JZ)V") \ + do_signature(getByte_signature, "(Ljava/lang/Object;J)B") \ + do_signature(putByte_signature, "(Ljava/lang/Object;JB)V") \ + do_signature(getShort_signature, "(Ljava/lang/Object;J)S") \ + do_signature(putShort_signature, "(Ljava/lang/Object;JS)V") \ + do_signature(getChar_signature, "(Ljava/lang/Object;J)C") \ + do_signature(putChar_signature, "(Ljava/lang/Object;JC)V") \ + do_signature(getInt_signature, "(Ljava/lang/Object;J)I") \ + do_signature(putInt_signature, "(Ljava/lang/Object;JI)V") \ + do_signature(getLong_signature, "(Ljava/lang/Object;J)J") \ + do_signature(putLong_signature, "(Ljava/lang/Object;JJ)V") \ + do_signature(getFloat_signature, "(Ljava/lang/Object;J)F") \ + do_signature(putFloat_signature, "(Ljava/lang/Object;JF)V") \ + do_signature(getDouble_signature, "(Ljava/lang/Object;J)D") \ + do_signature(putDouble_signature, "(Ljava/lang/Object;JD)V") \ + do_signature(getValue_signature, "(Ljava/lang/Object;JLjava/lang/Class;)Ljava/lang/Object;") \ + do_signature(putValue_signature, "(Ljava/lang/Object;JLjava/lang/Class;Ljava/lang/Object;)V") \ + \ + do_name(getReference_name,"getReference") do_name(putReference_name,"putReference") \ + do_name(getBoolean_name,"getBoolean") do_name(putBoolean_name,"putBoolean") \ + do_name(getByte_name,"getByte") do_name(putByte_name,"putByte") \ + do_name(getShort_name,"getShort") do_name(putShort_name,"putShort") \ + do_name(getChar_name,"getChar") do_name(putChar_name,"putChar") \ + do_name(getInt_name,"getInt") do_name(putInt_name,"putInt") \ + do_name(getLong_name,"getLong") do_name(putLong_name,"putLong") \ + do_name(getFloat_name,"getFloat") do_name(putFloat_name,"putFloat") \ + do_name(getDouble_name,"getDouble") do_name(putDouble_name,"putDouble") \ + do_name(getValue_name,"getValue") do_name(putValue_name,"putValue") \ + do_name(makePrivateBuffer_name,"makePrivateBuffer") \ + do_name(finishPrivateBuffer_name,"finishPrivateBuffer") \ + \ + do_intrinsic(_getReference, jdk_internal_misc_Unsafe, getReference_name, getReference_signature, F_RN) \ + do_intrinsic(_getBoolean, jdk_internal_misc_Unsafe, getBoolean_name, getBoolean_signature, F_RN) \ + do_intrinsic(_getByte, jdk_internal_misc_Unsafe, getByte_name, getByte_signature, F_RN) \ + do_intrinsic(_getShort, jdk_internal_misc_Unsafe, getShort_name, getShort_signature, F_RN) \ + do_intrinsic(_getChar, jdk_internal_misc_Unsafe, getChar_name, getChar_signature, F_RN) \ + do_intrinsic(_getInt, jdk_internal_misc_Unsafe, getInt_name, getInt_signature, F_RN) \ + do_intrinsic(_getLong, jdk_internal_misc_Unsafe, getLong_name, getLong_signature, F_RN) \ + do_intrinsic(_getFloat, jdk_internal_misc_Unsafe, getFloat_name, getFloat_signature, F_RN) \ + do_intrinsic(_getDouble, jdk_internal_misc_Unsafe, getDouble_name, getDouble_signature, F_RN) \ + do_intrinsic(_getValue, jdk_internal_misc_Unsafe, getValue_name, getValue_signature, F_RN) \ + do_intrinsic(_putReference, jdk_internal_misc_Unsafe, putReference_name, putReference_signature, F_RN) \ + do_intrinsic(_putBoolean, jdk_internal_misc_Unsafe, putBoolean_name, putBoolean_signature, F_RN) \ + do_intrinsic(_putByte, jdk_internal_misc_Unsafe, putByte_name, putByte_signature, F_RN) \ + do_intrinsic(_putShort, jdk_internal_misc_Unsafe, putShort_name, putShort_signature, F_RN) \ + do_intrinsic(_putChar, jdk_internal_misc_Unsafe, putChar_name, putChar_signature, F_RN) \ + do_intrinsic(_putInt, jdk_internal_misc_Unsafe, putInt_name, putInt_signature, F_RN) \ + do_intrinsic(_putLong, jdk_internal_misc_Unsafe, putLong_name, putLong_signature, F_RN) \ + do_intrinsic(_putFloat, jdk_internal_misc_Unsafe, putFloat_name, putFloat_signature, F_RN) \ + do_intrinsic(_putDouble, jdk_internal_misc_Unsafe, putDouble_name, putDouble_signature, F_RN) \ + do_intrinsic(_putValue, jdk_internal_misc_Unsafe, putValue_name, putValue_signature, F_RN) \ + \ + do_intrinsic(_makePrivateBuffer, jdk_internal_misc_Unsafe, makePrivateBuffer_name, object_object_signature, F_RN) \ + do_intrinsic(_finishPrivateBuffer, jdk_internal_misc_Unsafe, finishPrivateBuffer_name, object_object_signature, F_RN) \ + \ + do_name(getReferenceVolatile_name,"getReferenceVolatile") do_name(putReferenceVolatile_name,"putReferenceVolatile") \ + do_name(getBooleanVolatile_name,"getBooleanVolatile") do_name(putBooleanVolatile_name,"putBooleanVolatile") \ + do_name(getByteVolatile_name,"getByteVolatile") do_name(putByteVolatile_name,"putByteVolatile") \ + do_name(getShortVolatile_name,"getShortVolatile") do_name(putShortVolatile_name,"putShortVolatile") \ + do_name(getCharVolatile_name,"getCharVolatile") do_name(putCharVolatile_name,"putCharVolatile") \ + do_name(getIntVolatile_name,"getIntVolatile") do_name(putIntVolatile_name,"putIntVolatile") \ + do_name(getLongVolatile_name,"getLongVolatile") do_name(putLongVolatile_name,"putLongVolatile") \ + do_name(getFloatVolatile_name,"getFloatVolatile") do_name(putFloatVolatile_name,"putFloatVolatile") \ + do_name(getDoubleVolatile_name,"getDoubleVolatile") do_name(putDoubleVolatile_name,"putDoubleVolatile") \ + \ + do_intrinsic(_getReferenceVolatile, jdk_internal_misc_Unsafe, getReferenceVolatile_name, getReference_signature, F_RN) \ + do_intrinsic(_getBooleanVolatile, jdk_internal_misc_Unsafe, getBooleanVolatile_name, getBoolean_signature, F_RN) \ + do_intrinsic(_getByteVolatile, jdk_internal_misc_Unsafe, getByteVolatile_name, getByte_signature, F_RN) \ + do_intrinsic(_getShortVolatile, jdk_internal_misc_Unsafe, getShortVolatile_name, getShort_signature, F_RN) \ + do_intrinsic(_getCharVolatile, jdk_internal_misc_Unsafe, getCharVolatile_name, getChar_signature, F_RN) \ + do_intrinsic(_getIntVolatile, jdk_internal_misc_Unsafe, getIntVolatile_name, getInt_signature, F_RN) \ + do_intrinsic(_getLongVolatile, jdk_internal_misc_Unsafe, getLongVolatile_name, getLong_signature, F_RN) \ + do_intrinsic(_getFloatVolatile, jdk_internal_misc_Unsafe, getFloatVolatile_name, getFloat_signature, F_RN) \ + do_intrinsic(_getDoubleVolatile, jdk_internal_misc_Unsafe, getDoubleVolatile_name, getDouble_signature, F_RN) \ + do_intrinsic(_putReferenceVolatile, jdk_internal_misc_Unsafe, putReferenceVolatile_name, putReference_signature, F_RN) \ + do_intrinsic(_putBooleanVolatile, jdk_internal_misc_Unsafe, putBooleanVolatile_name, putBoolean_signature, F_RN) \ + do_intrinsic(_putByteVolatile, jdk_internal_misc_Unsafe, putByteVolatile_name, putByte_signature, F_RN) \ + do_intrinsic(_putShortVolatile, jdk_internal_misc_Unsafe, putShortVolatile_name, putShort_signature, F_RN) \ + do_intrinsic(_putCharVolatile, jdk_internal_misc_Unsafe, putCharVolatile_name, putChar_signature, F_RN) \ + do_intrinsic(_putIntVolatile, jdk_internal_misc_Unsafe, putIntVolatile_name, putInt_signature, F_RN) \ + do_intrinsic(_putLongVolatile, jdk_internal_misc_Unsafe, putLongVolatile_name, putLong_signature, F_RN) \ + do_intrinsic(_putFloatVolatile, jdk_internal_misc_Unsafe, putFloatVolatile_name, putFloat_signature, F_RN) \ + do_intrinsic(_putDoubleVolatile, jdk_internal_misc_Unsafe, putDoubleVolatile_name, putDouble_signature, F_RN) \ + \ + do_name(getReferenceOpaque_name,"getReferenceOpaque") do_name(putReferenceOpaque_name,"putReferenceOpaque") \ + do_name(getBooleanOpaque_name,"getBooleanOpaque") do_name(putBooleanOpaque_name,"putBooleanOpaque") \ + do_name(getByteOpaque_name,"getByteOpaque") do_name(putByteOpaque_name,"putByteOpaque") \ + do_name(getShortOpaque_name,"getShortOpaque") do_name(putShortOpaque_name,"putShortOpaque") \ + do_name(getCharOpaque_name,"getCharOpaque") do_name(putCharOpaque_name,"putCharOpaque") \ + do_name(getIntOpaque_name,"getIntOpaque") do_name(putIntOpaque_name,"putIntOpaque") \ + do_name(getLongOpaque_name,"getLongOpaque") do_name(putLongOpaque_name,"putLongOpaque") \ + do_name(getFloatOpaque_name,"getFloatOpaque") do_name(putFloatOpaque_name,"putFloatOpaque") \ + do_name(getDoubleOpaque_name,"getDoubleOpaque") do_name(putDoubleOpaque_name,"putDoubleOpaque") \ + \ + do_intrinsic(_getReferenceOpaque, jdk_internal_misc_Unsafe, getReferenceOpaque_name, getReference_signature, F_R) \ + do_intrinsic(_getBooleanOpaque, jdk_internal_misc_Unsafe, getBooleanOpaque_name, getBoolean_signature, F_R) \ + do_intrinsic(_getByteOpaque, jdk_internal_misc_Unsafe, getByteOpaque_name, getByte_signature, F_R) \ + do_intrinsic(_getShortOpaque, jdk_internal_misc_Unsafe, getShortOpaque_name, getShort_signature, F_R) \ + do_intrinsic(_getCharOpaque, jdk_internal_misc_Unsafe, getCharOpaque_name, getChar_signature, F_R) \ + do_intrinsic(_getIntOpaque, jdk_internal_misc_Unsafe, getIntOpaque_name, getInt_signature, F_R) \ + do_intrinsic(_getLongOpaque, jdk_internal_misc_Unsafe, getLongOpaque_name, getLong_signature, F_R) \ + do_intrinsic(_getFloatOpaque, jdk_internal_misc_Unsafe, getFloatOpaque_name, getFloat_signature, F_R) \ + do_intrinsic(_getDoubleOpaque, jdk_internal_misc_Unsafe, getDoubleOpaque_name, getDouble_signature, F_R) \ + do_intrinsic(_putReferenceOpaque, jdk_internal_misc_Unsafe, putReferenceOpaque_name, putReference_signature, F_R) \ + do_intrinsic(_putBooleanOpaque, jdk_internal_misc_Unsafe, putBooleanOpaque_name, putBoolean_signature, F_R) \ + do_intrinsic(_putByteOpaque, jdk_internal_misc_Unsafe, putByteOpaque_name, putByte_signature, F_R) \ + do_intrinsic(_putShortOpaque, jdk_internal_misc_Unsafe, putShortOpaque_name, putShort_signature, F_R) \ + do_intrinsic(_putCharOpaque, jdk_internal_misc_Unsafe, putCharOpaque_name, putChar_signature, F_R) \ + do_intrinsic(_putIntOpaque, jdk_internal_misc_Unsafe, putIntOpaque_name, putInt_signature, F_R) \ + do_intrinsic(_putLongOpaque, jdk_internal_misc_Unsafe, putLongOpaque_name, putLong_signature, F_R) \ + do_intrinsic(_putFloatOpaque, jdk_internal_misc_Unsafe, putFloatOpaque_name, putFloat_signature, F_R) \ + do_intrinsic(_putDoubleOpaque, jdk_internal_misc_Unsafe, putDoubleOpaque_name, putDouble_signature, F_R) \ + \ + do_name(getReferenceAcquire_name, "getReferenceAcquire") do_name(putReferenceRelease_name, "putReferenceRelease") \ + do_name(getBooleanAcquire_name, "getBooleanAcquire") do_name(putBooleanRelease_name, "putBooleanRelease") \ + do_name(getByteAcquire_name, "getByteAcquire") do_name(putByteRelease_name, "putByteRelease") \ + do_name(getShortAcquire_name, "getShortAcquire") do_name(putShortRelease_name, "putShortRelease") \ + do_name(getCharAcquire_name, "getCharAcquire") do_name(putCharRelease_name, "putCharRelease") \ + do_name(getIntAcquire_name, "getIntAcquire") do_name(putIntRelease_name, "putIntRelease") \ + do_name(getLongAcquire_name, "getLongAcquire") do_name(putLongRelease_name, "putLongRelease") \ + do_name(getFloatAcquire_name, "getFloatAcquire") do_name(putFloatRelease_name, "putFloatRelease") \ + do_name(getDoubleAcquire_name, "getDoubleAcquire") do_name(putDoubleRelease_name, "putDoubleRelease") \ + \ + do_intrinsic(_getReferenceAcquire, jdk_internal_misc_Unsafe, getReferenceAcquire_name, getReference_signature, F_R) \ + do_intrinsic(_getBooleanAcquire, jdk_internal_misc_Unsafe, getBooleanAcquire_name, getBoolean_signature, F_R) \ + do_intrinsic(_getByteAcquire, jdk_internal_misc_Unsafe, getByteAcquire_name, getByte_signature, F_R) \ + do_intrinsic(_getShortAcquire, jdk_internal_misc_Unsafe, getShortAcquire_name, getShort_signature, F_R) \ + do_intrinsic(_getCharAcquire, jdk_internal_misc_Unsafe, getCharAcquire_name, getChar_signature, F_R) \ + do_intrinsic(_getIntAcquire, jdk_internal_misc_Unsafe, getIntAcquire_name, getInt_signature, F_R) \ + do_intrinsic(_getLongAcquire, jdk_internal_misc_Unsafe, getLongAcquire_name, getLong_signature, F_R) \ + do_intrinsic(_getFloatAcquire, jdk_internal_misc_Unsafe, getFloatAcquire_name, getFloat_signature, F_R) \ + do_intrinsic(_getDoubleAcquire, jdk_internal_misc_Unsafe, getDoubleAcquire_name, getDouble_signature, F_R) \ + do_intrinsic(_putReferenceRelease, jdk_internal_misc_Unsafe, putReferenceRelease_name, putReference_signature, F_R) \ + do_intrinsic(_putBooleanRelease, jdk_internal_misc_Unsafe, putBooleanRelease_name, putBoolean_signature, F_R) \ + do_intrinsic(_putByteRelease, jdk_internal_misc_Unsafe, putByteRelease_name, putByte_signature, F_R) \ + do_intrinsic(_putShortRelease, jdk_internal_misc_Unsafe, putShortRelease_name, putShort_signature, F_R) \ + do_intrinsic(_putCharRelease, jdk_internal_misc_Unsafe, putCharRelease_name, putChar_signature, F_R) \ + do_intrinsic(_putIntRelease, jdk_internal_misc_Unsafe, putIntRelease_name, putInt_signature, F_R) \ + do_intrinsic(_putLongRelease, jdk_internal_misc_Unsafe, putLongRelease_name, putLong_signature, F_R) \ + do_intrinsic(_putFloatRelease, jdk_internal_misc_Unsafe, putFloatRelease_name, putFloat_signature, F_R) \ + do_intrinsic(_putDoubleRelease, jdk_internal_misc_Unsafe, putDoubleRelease_name, putDouble_signature, F_R) \ + \ + do_name(getShortUnaligned_name,"getShortUnaligned") do_name(putShortUnaligned_name,"putShortUnaligned") \ + do_name(getCharUnaligned_name,"getCharUnaligned") do_name(putCharUnaligned_name,"putCharUnaligned") \ + do_name(getIntUnaligned_name,"getIntUnaligned") do_name(putIntUnaligned_name,"putIntUnaligned") \ + do_name(getLongUnaligned_name,"getLongUnaligned") do_name(putLongUnaligned_name,"putLongUnaligned") \ + \ + do_intrinsic(_getShortUnaligned, jdk_internal_misc_Unsafe, getShortUnaligned_name, getShort_signature, F_R) \ + do_intrinsic(_getCharUnaligned, jdk_internal_misc_Unsafe, getCharUnaligned_name, getChar_signature, F_R) \ + do_intrinsic(_getIntUnaligned, jdk_internal_misc_Unsafe, getIntUnaligned_name, getInt_signature, F_R) \ + do_intrinsic(_getLongUnaligned, jdk_internal_misc_Unsafe, getLongUnaligned_name, getLong_signature, F_R) \ + do_intrinsic(_putShortUnaligned, jdk_internal_misc_Unsafe, putShortUnaligned_name, putShort_signature, F_R) \ + do_intrinsic(_putCharUnaligned, jdk_internal_misc_Unsafe, putCharUnaligned_name, putChar_signature, F_R) \ + do_intrinsic(_putIntUnaligned, jdk_internal_misc_Unsafe, putIntUnaligned_name, putInt_signature, F_R) \ + do_intrinsic(_putLongUnaligned, jdk_internal_misc_Unsafe, putLongUnaligned_name, putLong_signature, F_R) \ + \ + do_signature(compareAndSetReference_signature, "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z") \ + do_signature(compareAndExchangeReference_signature, "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \ + do_signature(compareAndSetLong_signature, "(Ljava/lang/Object;JJJ)Z") \ + do_signature(compareAndExchangeLong_signature, "(Ljava/lang/Object;JJJ)J") \ + do_signature(compareAndSetInt_signature, "(Ljava/lang/Object;JII)Z") \ + do_signature(compareAndExchangeInt_signature, "(Ljava/lang/Object;JII)I") \ + do_signature(compareAndSetByte_signature, "(Ljava/lang/Object;JBB)Z") \ + do_signature(compareAndExchangeByte_signature, "(Ljava/lang/Object;JBB)B") \ + do_signature(compareAndSetShort_signature, "(Ljava/lang/Object;JSS)Z") \ + do_signature(compareAndExchangeShort_signature, "(Ljava/lang/Object;JSS)S") \ + \ + do_name(compareAndSetReference_name, "compareAndSetReference") \ + do_name(compareAndExchangeReference_name, "compareAndExchangeReference") \ + do_name(compareAndExchangeReferenceAcquire_name, "compareAndExchangeReferenceAcquire") \ + do_name(compareAndExchangeReferenceRelease_name, "compareAndExchangeReferenceRelease") \ + do_name(compareAndSetLong_name, "compareAndSetLong") \ + do_name(compareAndExchangeLong_name, "compareAndExchangeLong") \ + do_name(compareAndExchangeLongAcquire_name, "compareAndExchangeLongAcquire") \ + do_name(compareAndExchangeLongRelease_name, "compareAndExchangeLongRelease") \ + do_name(compareAndSetInt_name, "compareAndSetInt") \ + do_name(compareAndExchangeInt_name, "compareAndExchangeInt") \ + do_name(compareAndExchangeIntAcquire_name, "compareAndExchangeIntAcquire") \ + do_name(compareAndExchangeIntRelease_name, "compareAndExchangeIntRelease") \ + do_name(compareAndSetByte_name, "compareAndSetByte") \ + do_name(compareAndExchangeByte_name, "compareAndExchangeByte") \ + do_name(compareAndExchangeByteAcquire_name, "compareAndExchangeByteAcquire") \ + do_name(compareAndExchangeByteRelease_name, "compareAndExchangeByteRelease") \ + do_name(compareAndSetShort_name, "compareAndSetShort") \ + do_name(compareAndExchangeShort_name, "compareAndExchangeShort") \ + do_name(compareAndExchangeShortAcquire_name, "compareAndExchangeShortAcquire") \ + do_name(compareAndExchangeShortRelease_name, "compareAndExchangeShortRelease") \ + \ + do_name(weakCompareAndSetReferencePlain_name, "weakCompareAndSetReferencePlain") \ + do_name(weakCompareAndSetReferenceAcquire_name, "weakCompareAndSetReferenceAcquire") \ + do_name(weakCompareAndSetReferenceRelease_name, "weakCompareAndSetReferenceRelease") \ + do_name(weakCompareAndSetReference_name, "weakCompareAndSetReference") \ + do_name(weakCompareAndSetLongPlain_name, "weakCompareAndSetLongPlain") \ + do_name(weakCompareAndSetLongAcquire_name, "weakCompareAndSetLongAcquire") \ + do_name(weakCompareAndSetLongRelease_name, "weakCompareAndSetLongRelease") \ + do_name(weakCompareAndSetLong_name, "weakCompareAndSetLong") \ + do_name(weakCompareAndSetIntPlain_name, "weakCompareAndSetIntPlain") \ + do_name(weakCompareAndSetIntAcquire_name, "weakCompareAndSetIntAcquire") \ + do_name(weakCompareAndSetIntRelease_name, "weakCompareAndSetIntRelease") \ + do_name(weakCompareAndSetInt_name, "weakCompareAndSetInt") \ + do_name(weakCompareAndSetBytePlain_name, "weakCompareAndSetBytePlain") \ + do_name(weakCompareAndSetByteAcquire_name, "weakCompareAndSetByteAcquire") \ + do_name(weakCompareAndSetByteRelease_name, "weakCompareAndSetByteRelease") \ + do_name(weakCompareAndSetByte_name, "weakCompareAndSetByte") \ + do_name(weakCompareAndSetShortPlain_name, "weakCompareAndSetShortPlain") \ + do_name(weakCompareAndSetShortAcquire_name, "weakCompareAndSetShortAcquire") \ + do_name(weakCompareAndSetShortRelease_name, "weakCompareAndSetShortRelease") \ + do_name(weakCompareAndSetShort_name, "weakCompareAndSetShort") \ + \ + do_intrinsic(_compareAndSetReference, jdk_internal_misc_Unsafe, compareAndSetReference_name, compareAndSetReference_signature, F_RN) \ + do_intrinsic(_compareAndExchangeReference, jdk_internal_misc_Unsafe, compareAndExchangeReference_name, compareAndExchangeReference_signature, F_RN) \ + do_intrinsic(_compareAndExchangeReferenceAcquire, jdk_internal_misc_Unsafe, compareAndExchangeReferenceAcquire_name, compareAndExchangeReference_signature, F_R) \ + do_intrinsic(_compareAndExchangeReferenceRelease, jdk_internal_misc_Unsafe, compareAndExchangeReferenceRelease_name, compareAndExchangeReference_signature, F_R) \ + do_intrinsic(_compareAndSetLong, jdk_internal_misc_Unsafe, compareAndSetLong_name, compareAndSetLong_signature, F_RN) \ + do_intrinsic(_compareAndExchangeLong, jdk_internal_misc_Unsafe, compareAndExchangeLong_name, compareAndExchangeLong_signature, F_RN) \ + do_intrinsic(_compareAndExchangeLongAcquire, jdk_internal_misc_Unsafe, compareAndExchangeLongAcquire_name, compareAndExchangeLong_signature, F_R) \ + do_intrinsic(_compareAndExchangeLongRelease, jdk_internal_misc_Unsafe, compareAndExchangeLongRelease_name, compareAndExchangeLong_signature, F_R) \ + do_intrinsic(_compareAndSetInt, jdk_internal_misc_Unsafe, compareAndSetInt_name, compareAndSetInt_signature, F_RN) \ + do_intrinsic(_compareAndExchangeInt, jdk_internal_misc_Unsafe, compareAndExchangeInt_name, compareAndExchangeInt_signature, F_RN) \ + do_intrinsic(_compareAndExchangeIntAcquire, jdk_internal_misc_Unsafe, compareAndExchangeIntAcquire_name, compareAndExchangeInt_signature, F_R) \ + do_intrinsic(_compareAndExchangeIntRelease, jdk_internal_misc_Unsafe, compareAndExchangeIntRelease_name, compareAndExchangeInt_signature, F_R) \ + do_intrinsic(_compareAndSetByte, jdk_internal_misc_Unsafe, compareAndSetByte_name, compareAndSetByte_signature, F_R) \ + do_intrinsic(_compareAndExchangeByte, jdk_internal_misc_Unsafe, compareAndExchangeByte_name, compareAndExchangeByte_signature, F_R) \ + do_intrinsic(_compareAndExchangeByteAcquire, jdk_internal_misc_Unsafe, compareAndExchangeByteAcquire_name, compareAndExchangeByte_signature, F_R) \ + do_intrinsic(_compareAndExchangeByteRelease, jdk_internal_misc_Unsafe, compareAndExchangeByteRelease_name, compareAndExchangeByte_signature, F_R) \ + do_intrinsic(_compareAndSetShort, jdk_internal_misc_Unsafe, compareAndSetShort_name, compareAndSetShort_signature, F_R) \ + do_intrinsic(_compareAndExchangeShort, jdk_internal_misc_Unsafe, compareAndExchangeShort_name, compareAndExchangeShort_signature, F_R) \ + do_intrinsic(_compareAndExchangeShortAcquire, jdk_internal_misc_Unsafe, compareAndExchangeShortAcquire_name, compareAndExchangeShort_signature, F_R) \ + do_intrinsic(_compareAndExchangeShortRelease, jdk_internal_misc_Unsafe, compareAndExchangeShortRelease_name, compareAndExchangeShort_signature, F_R) \ + \ + do_intrinsic(_weakCompareAndSetReferencePlain, jdk_internal_misc_Unsafe, weakCompareAndSetReferencePlain_name, compareAndSetReference_signature, F_R) \ + do_intrinsic(_weakCompareAndSetReferenceAcquire,jdk_internal_misc_Unsafe, weakCompareAndSetReferenceAcquire_name, compareAndSetReference_signature, F_R) \ + do_intrinsic(_weakCompareAndSetReferenceRelease,jdk_internal_misc_Unsafe, weakCompareAndSetReferenceRelease_name, compareAndSetReference_signature, F_R) \ + do_intrinsic(_weakCompareAndSetReference, jdk_internal_misc_Unsafe, weakCompareAndSetReference_name, compareAndSetReference_signature, F_R) \ + do_intrinsic(_weakCompareAndSetLongPlain, jdk_internal_misc_Unsafe, weakCompareAndSetLongPlain_name, compareAndSetLong_signature, F_R) \ + do_intrinsic(_weakCompareAndSetLongAcquire, jdk_internal_misc_Unsafe, weakCompareAndSetLongAcquire_name, compareAndSetLong_signature, F_R) \ + do_intrinsic(_weakCompareAndSetLongRelease, jdk_internal_misc_Unsafe, weakCompareAndSetLongRelease_name, compareAndSetLong_signature, F_R) \ + do_intrinsic(_weakCompareAndSetLong, jdk_internal_misc_Unsafe, weakCompareAndSetLong_name, compareAndSetLong_signature, F_R) \ + do_intrinsic(_weakCompareAndSetIntPlain, jdk_internal_misc_Unsafe, weakCompareAndSetIntPlain_name, compareAndSetInt_signature, F_R) \ + do_intrinsic(_weakCompareAndSetIntAcquire, jdk_internal_misc_Unsafe, weakCompareAndSetIntAcquire_name, compareAndSetInt_signature, F_R) \ + do_intrinsic(_weakCompareAndSetIntRelease, jdk_internal_misc_Unsafe, weakCompareAndSetIntRelease_name, compareAndSetInt_signature, F_R) \ + do_intrinsic(_weakCompareAndSetInt, jdk_internal_misc_Unsafe, weakCompareAndSetInt_name, compareAndSetInt_signature, F_R) \ + do_intrinsic(_weakCompareAndSetBytePlain, jdk_internal_misc_Unsafe, weakCompareAndSetBytePlain_name, compareAndSetByte_signature, F_R) \ + do_intrinsic(_weakCompareAndSetByteAcquire, jdk_internal_misc_Unsafe, weakCompareAndSetByteAcquire_name, compareAndSetByte_signature, F_R) \ + do_intrinsic(_weakCompareAndSetByteRelease, jdk_internal_misc_Unsafe, weakCompareAndSetByteRelease_name, compareAndSetByte_signature, F_R) \ + do_intrinsic(_weakCompareAndSetByte, jdk_internal_misc_Unsafe, weakCompareAndSetByte_name, compareAndSetByte_signature, F_R) \ + do_intrinsic(_weakCompareAndSetShortPlain, jdk_internal_misc_Unsafe, weakCompareAndSetShortPlain_name, compareAndSetShort_signature, F_R) \ + do_intrinsic(_weakCompareAndSetShortAcquire, jdk_internal_misc_Unsafe, weakCompareAndSetShortAcquire_name, compareAndSetShort_signature, F_R) \ + do_intrinsic(_weakCompareAndSetShortRelease, jdk_internal_misc_Unsafe, weakCompareAndSetShortRelease_name, compareAndSetShort_signature, F_R) \ + do_intrinsic(_weakCompareAndSetShort, jdk_internal_misc_Unsafe, weakCompareAndSetShort_name, compareAndSetShort_signature, F_R) \ + \ + do_intrinsic(_getAndAddInt, jdk_internal_misc_Unsafe, getAndAddInt_name, getAndAddInt_signature, F_R) \ + do_name( getAndAddInt_name, "getAndAddInt") \ + do_signature(getAndAddInt_signature, "(Ljava/lang/Object;JI)I" ) \ + do_intrinsic(_getAndAddLong, jdk_internal_misc_Unsafe, getAndAddLong_name, getAndAddLong_signature, F_R) \ + do_name( getAndAddLong_name, "getAndAddLong") \ + do_signature(getAndAddLong_signature, "(Ljava/lang/Object;JJ)J" ) \ + do_intrinsic(_getAndAddByte, jdk_internal_misc_Unsafe, getAndAddByte_name, getAndAddByte_signature, F_R) \ + do_name( getAndAddByte_name, "getAndAddByte") \ + do_signature(getAndAddByte_signature, "(Ljava/lang/Object;JB)B" ) \ + do_intrinsic(_getAndAddShort, jdk_internal_misc_Unsafe, getAndAddShort_name, getAndAddShort_signature, F_R) \ + do_name( getAndAddShort_name, "getAndAddShort") \ + do_signature(getAndAddShort_signature, "(Ljava/lang/Object;JS)S" ) \ + do_intrinsic(_getAndSetInt, jdk_internal_misc_Unsafe, getAndSetInt_name, getAndSetInt_signature, F_R) \ + do_name( getAndSetInt_name, "getAndSetInt") \ + do_alias( getAndSetInt_signature, /*"(Ljava/lang/Object;JI)I"*/ getAndAddInt_signature) \ + do_intrinsic(_getAndSetLong, jdk_internal_misc_Unsafe, getAndSetLong_name, getAndSetLong_signature, F_R) \ + do_name( getAndSetLong_name, "getAndSetLong") \ + do_alias( getAndSetLong_signature, /*"(Ljava/lang/Object;JJ)J"*/ getAndAddLong_signature) \ + do_intrinsic(_getAndSetByte, jdk_internal_misc_Unsafe, getAndSetByte_name, getAndSetByte_signature, F_R) \ + do_name( getAndSetByte_name, "getAndSetByte") \ + do_alias( getAndSetByte_signature, /*"(Ljava/lang/Object;JB)B"*/ getAndAddByte_signature) \ + do_intrinsic(_getAndSetShort, jdk_internal_misc_Unsafe, getAndSetShort_name, getAndSetShort_signature, F_R) \ + do_name( getAndSetShort_name, "getAndSetShort") \ + do_alias( getAndSetShort_signature, /*"(Ljava/lang/Object;JS)S"*/ getAndAddShort_signature) \ + do_intrinsic(_getAndSetReference, jdk_internal_misc_Unsafe, getAndSetReference_name, getAndSetReference_signature, F_R) \ + do_name( getAndSetReference_name, "getAndSetReference") \ + do_signature(getAndSetReference_signature, "(Ljava/lang/Object;JLjava/lang/Object;)Ljava/lang/Object;" ) \ + \ + /* (2) Bytecode intrinsics */ \ + \ + do_intrinsic(_park, jdk_internal_misc_Unsafe, park_name, park_signature, F_R) \ + do_name( park_name, "park") \ + do_signature(park_signature, "(ZJ)V") \ + do_intrinsic(_unpark, jdk_internal_misc_Unsafe, unpark_name, unpark_signature, F_R) \ + do_name( unpark_name, "unpark") \ + do_alias( unpark_signature, /*(LObject;)V*/ object_void_signature) \ + \ + do_intrinsic(_StringBuilder_void, java_lang_StringBuilder, object_initializer_name, void_method_signature, F_R) \ + do_intrinsic(_StringBuilder_int, java_lang_StringBuilder, object_initializer_name, int_void_signature, F_R) \ + do_intrinsic(_StringBuilder_String, java_lang_StringBuilder, object_initializer_name, string_void_signature, F_R) \ + \ + do_intrinsic(_StringBuilder_append_char, java_lang_StringBuilder, append_name, char_StringBuilder_signature, F_R) \ + do_intrinsic(_StringBuilder_append_int, java_lang_StringBuilder, append_name, int_StringBuilder_signature, F_R) \ + do_intrinsic(_StringBuilder_append_String, java_lang_StringBuilder, append_name, String_StringBuilder_signature, F_R) \ + \ + do_intrinsic(_StringBuilder_toString, java_lang_StringBuilder, toString_name, void_string_signature, F_R) \ + \ + do_intrinsic(_StringBuffer_void, java_lang_StringBuffer, object_initializer_name, void_method_signature, F_R) \ + do_intrinsic(_StringBuffer_int, java_lang_StringBuffer, object_initializer_name, int_void_signature, F_R) \ + do_intrinsic(_StringBuffer_String, java_lang_StringBuffer, object_initializer_name, string_void_signature, F_R) \ + \ + do_intrinsic(_StringBuffer_append_char, java_lang_StringBuffer, append_name, char_StringBuffer_signature, F_Y) \ + do_intrinsic(_StringBuffer_append_int, java_lang_StringBuffer, append_name, int_StringBuffer_signature, F_Y) \ + do_intrinsic(_StringBuffer_append_String, java_lang_StringBuffer, append_name, String_StringBuffer_signature, F_Y) \ + \ + do_intrinsic(_StringBuffer_toString, java_lang_StringBuffer, toString_name, void_string_signature, F_Y) \ + \ + do_intrinsic(_Integer_toString, java_lang_Integer, toString_name, int_String_signature, F_S) \ + \ + do_intrinsic(_String_String, java_lang_String, object_initializer_name, string_void_signature, F_R) \ + \ + do_intrinsic(_Object_init, java_lang_Object, object_initializer_name, void_method_signature, F_R) \ + /* (symbol object_initializer_name defined above) */ \ + \ + do_intrinsic(_invoke, java_lang_reflect_Method, invoke_name, object_object_array_object_signature, F_R) \ + /* (symbols invoke_name and invoke_signature defined above) */ \ + /* the polymorphic MH intrinsics must be in compact order, with _invokeGeneric first and _linkToInterface last */ \ + do_intrinsic(_invokeGeneric, java_lang_invoke_MethodHandle, invoke_name, star_name, F_RN) \ + do_intrinsic(_invokeBasic, java_lang_invoke_MethodHandle, invokeBasic_name, star_name, F_RN) \ + do_intrinsic(_linkToVirtual, java_lang_invoke_MethodHandle, linkToVirtual_name, star_name, F_SN) \ + do_intrinsic(_linkToStatic, java_lang_invoke_MethodHandle, linkToStatic_name, star_name, F_SN) \ + do_intrinsic(_linkToSpecial, java_lang_invoke_MethodHandle, linkToSpecial_name, star_name, F_SN) \ + do_intrinsic(_linkToInterface, java_lang_invoke_MethodHandle, linkToInterface_name, star_name, F_SN) \ + /* special marker for bytecode generated for the JVM from a LambdaForm: */ \ + do_intrinsic(_compiledLambdaForm, java_lang_invoke_MethodHandle, compiledLambdaForm_name, star_name, F_RN) \ + \ + /* unboxing methods: */ \ + do_intrinsic(_booleanValue, java_lang_Boolean, booleanValue_name, void_boolean_signature, F_R) \ + do_name( booleanValue_name, "booleanValue") \ + do_intrinsic(_byteValue, java_lang_Byte, byteValue_name, void_byte_signature, F_R) \ + do_name( byteValue_name, "byteValue") \ + do_intrinsic(_charValue, java_lang_Character, charValue_name, void_char_signature, F_R) \ + do_name( charValue_name, "charValue") \ + do_intrinsic(_shortValue, java_lang_Short, shortValue_name, void_short_signature, F_R) \ + do_name( shortValue_name, "shortValue") \ + do_intrinsic(_intValue, java_lang_Integer, intValue_name, void_int_signature, F_R) \ + do_name( intValue_name, "intValue") \ + do_intrinsic(_longValue, java_lang_Long, longValue_name, void_long_signature, F_R) \ + do_name( longValue_name, "longValue") \ + do_intrinsic(_floatValue, java_lang_Float, floatValue_name, void_float_signature, F_R) \ + do_name( floatValue_name, "floatValue") \ + do_intrinsic(_doubleValue, java_lang_Double, doubleValue_name, void_double_signature, F_R) \ + do_name( doubleValue_name, "doubleValue") \ + \ + /* boxing methods: */ \ + do_name( valueOf_name, "valueOf") \ + do_intrinsic(_Boolean_valueOf, java_lang_Boolean, valueOf_name, Boolean_valueOf_signature, F_S) \ + do_name( Boolean_valueOf_signature, "(Z)Ljava/lang/Boolean;") \ + do_intrinsic(_Byte_valueOf, java_lang_Byte, valueOf_name, Byte_valueOf_signature, F_S) \ + do_name( Byte_valueOf_signature, "(B)Ljava/lang/Byte;") \ + do_intrinsic(_Character_valueOf, java_lang_Character, valueOf_name, Character_valueOf_signature, F_S) \ + do_name( Character_valueOf_signature, "(C)Ljava/lang/Character;") \ + do_intrinsic(_Short_valueOf, java_lang_Short, valueOf_name, Short_valueOf_signature, F_S) \ + do_name( Short_valueOf_signature, "(S)Ljava/lang/Short;") \ + do_intrinsic(_Integer_valueOf, java_lang_Integer, valueOf_name, Integer_valueOf_signature, F_S) \ + do_name( Integer_valueOf_signature, "(I)Ljava/lang/Integer;") \ + do_intrinsic(_Long_valueOf, java_lang_Long, valueOf_name, Long_valueOf_signature, F_S) \ + do_name( Long_valueOf_signature, "(J)Ljava/lang/Long;") \ + do_intrinsic(_Float_valueOf, java_lang_Float, valueOf_name, Float_valueOf_signature, F_S) \ + do_name( Float_valueOf_signature, "(F)Ljava/lang/Float;") \ + do_intrinsic(_Double_valueOf, java_lang_Double, valueOf_name, Double_valueOf_signature, F_S) \ + do_name( Double_valueOf_signature, "(D)Ljava/lang/Double;") \ + \ + /* forEachRemaining */ \ + do_intrinsic(_forEachRemaining, java_util_stream_StreamsRangeIntSpliterator, forEachRemaining_name, forEachRemaining_signature, F_R) \ + do_name( forEachRemaining_name, "forEachRemaining") \ + do_name( forEachRemaining_signature, "(Ljava/util/function/IntConsumer;)V") \ + + /*end*/ + +#endif // SHARE_CLASSFILE_VMINTRINSICS_HPP diff --git a/src/hotspot/share/classfile/vmSymbols.cpp b/src/hotspot/share/classfile/vmSymbols.cpp index 52c59cfea2e..cb02bc5be3b 100644 --- a/src/hotspot/share/classfile/vmSymbols.cpp +++ b/src/hotspot/share/classfile/vmSymbols.cpp @@ -293,826 +293,3 @@ vmSymbols::SID vmSymbols::find_sid(const char* symbol_name) { if (symbol == NULL) return NO_SID; return find_sid(symbol); } - -static vmIntrinsics::ID wrapper_intrinsic(BasicType type, bool unboxing) { -#define TYPE2(type, unboxing) ((int)(type)*2 + ((unboxing) ? 1 : 0)) - switch (TYPE2(type, unboxing)) { -#define BASIC_TYPE_CASE(type, box, unbox) \ - case TYPE2(type, false): return vmIntrinsics::box; \ - case TYPE2(type, true): return vmIntrinsics::unbox - BASIC_TYPE_CASE(T_BOOLEAN, _Boolean_valueOf, _booleanValue); - BASIC_TYPE_CASE(T_BYTE, _Byte_valueOf, _byteValue); - BASIC_TYPE_CASE(T_CHAR, _Character_valueOf, _charValue); - BASIC_TYPE_CASE(T_SHORT, _Short_valueOf, _shortValue); - BASIC_TYPE_CASE(T_INT, _Integer_valueOf, _intValue); - BASIC_TYPE_CASE(T_LONG, _Long_valueOf, _longValue); - BASIC_TYPE_CASE(T_FLOAT, _Float_valueOf, _floatValue); - BASIC_TYPE_CASE(T_DOUBLE, _Double_valueOf, _doubleValue); -#undef BASIC_TYPE_CASE - } -#undef TYPE2 - return vmIntrinsics::_none; -} - -vmIntrinsics::ID vmIntrinsics::for_boxing(BasicType type) { - return wrapper_intrinsic(type, false); -} -vmIntrinsics::ID vmIntrinsics::for_unboxing(BasicType type) { - return wrapper_intrinsic(type, true); -} - -vmIntrinsics::ID vmIntrinsics::for_raw_conversion(BasicType src, BasicType dest) { -#define SRC_DEST(s,d) (((int)(s) << 4) + (int)(d)) - switch (SRC_DEST(src, dest)) { - case SRC_DEST(T_INT, T_FLOAT): return vmIntrinsics::_intBitsToFloat; - case SRC_DEST(T_FLOAT, T_INT): return vmIntrinsics::_floatToRawIntBits; - - case SRC_DEST(T_LONG, T_DOUBLE): return vmIntrinsics::_longBitsToDouble; - case SRC_DEST(T_DOUBLE, T_LONG): return vmIntrinsics::_doubleToRawLongBits; - } -#undef SRC_DEST - - return vmIntrinsics::_none; -} - -bool vmIntrinsics::preserves_state(vmIntrinsics::ID id) { - assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); - switch(id) { -#ifdef JFR_HAVE_INTRINSICS - case vmIntrinsics::_counterTime: -#endif - case vmIntrinsics::_currentTimeMillis: - case vmIntrinsics::_nanoTime: - case vmIntrinsics::_floatToRawIntBits: - case vmIntrinsics::_intBitsToFloat: - case vmIntrinsics::_doubleToRawLongBits: - case vmIntrinsics::_longBitsToDouble: - case vmIntrinsics::_getClass: - case vmIntrinsics::_isInstance: - case vmIntrinsics::_currentThread: - case vmIntrinsics::_dabs: - case vmIntrinsics::_fabs: - case vmIntrinsics::_iabs: - case vmIntrinsics::_labs: - case vmIntrinsics::_dsqrt: - case vmIntrinsics::_dsin: - case vmIntrinsics::_dcos: - case vmIntrinsics::_dtan: - case vmIntrinsics::_dlog: - case vmIntrinsics::_dlog10: - case vmIntrinsics::_dexp: - case vmIntrinsics::_dpow: - case vmIntrinsics::_checkIndex: - case vmIntrinsics::_Reference_get: - case vmIntrinsics::_updateCRC32: - case vmIntrinsics::_updateBytesCRC32: - case vmIntrinsics::_updateByteBufferCRC32: - case vmIntrinsics::_vectorizedMismatch: - case vmIntrinsics::_fmaD: - case vmIntrinsics::_fmaF: - case vmIntrinsics::_isDigit: - case vmIntrinsics::_isLowerCase: - case vmIntrinsics::_isUpperCase: - case vmIntrinsics::_isWhitespace: - return true; - default: - return false; - } -} - -bool vmIntrinsics::can_trap(vmIntrinsics::ID id) { - assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); - switch(id) { -#ifdef JFR_HAVE_INTRINSICS - case vmIntrinsics::_counterTime: - case vmIntrinsics::_getClassId: -#endif - case vmIntrinsics::_currentTimeMillis: - case vmIntrinsics::_nanoTime: - case vmIntrinsics::_floatToRawIntBits: - case vmIntrinsics::_intBitsToFloat: - case vmIntrinsics::_doubleToRawLongBits: - case vmIntrinsics::_longBitsToDouble: - case vmIntrinsics::_currentThread: - case vmIntrinsics::_dabs: - case vmIntrinsics::_fabs: - case vmIntrinsics::_iabs: - case vmIntrinsics::_labs: - case vmIntrinsics::_dsqrt: - case vmIntrinsics::_dsin: - case vmIntrinsics::_dcos: - case vmIntrinsics::_dtan: - case vmIntrinsics::_dlog: - case vmIntrinsics::_dlog10: - case vmIntrinsics::_dexp: - case vmIntrinsics::_dpow: - case vmIntrinsics::_updateCRC32: - case vmIntrinsics::_updateBytesCRC32: - case vmIntrinsics::_updateByteBufferCRC32: - case vmIntrinsics::_vectorizedMismatch: - case vmIntrinsics::_fmaD: - case vmIntrinsics::_fmaF: - return false; - default: - return true; - } -} - -// Some intrinsics produce different results if they are not pinned -bool vmIntrinsics::should_be_pinned(vmIntrinsics::ID id) { - assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); - switch(id) { -#ifdef JFR_HAVE_INTRINSICS - case vmIntrinsics::_counterTime: -#endif - case vmIntrinsics::_currentTimeMillis: - case vmIntrinsics::_nanoTime: - return true; - default: - return false; - } -} - -bool vmIntrinsics::does_virtual_dispatch(vmIntrinsics::ID id) { - assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); - switch(id) { - case vmIntrinsics::_hashCode: - case vmIntrinsics::_clone: - return true; - break; - default: - return false; - } -} - -int vmIntrinsics::predicates_needed(vmIntrinsics::ID id) { - assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); - switch (id) { - case vmIntrinsics::_cipherBlockChaining_encryptAESCrypt: - case vmIntrinsics::_cipherBlockChaining_decryptAESCrypt: - case vmIntrinsics::_electronicCodeBook_encryptAESCrypt: - case vmIntrinsics::_electronicCodeBook_decryptAESCrypt: - case vmIntrinsics::_counterMode_AESCrypt: - return 1; - case vmIntrinsics::_digestBase_implCompressMB: - return 4; - default: - return 0; - } -} - -bool vmIntrinsics::disabled_by_jvm_flags(vmIntrinsics::ID id) { - assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); - - // -XX:-InlineNatives disables nearly all intrinsics except the ones listed in - // the following switch statement. - if (!InlineNatives) { - switch (id) { - case vmIntrinsics::_indexOfL: - case vmIntrinsics::_indexOfU: - case vmIntrinsics::_indexOfUL: - case vmIntrinsics::_indexOfIL: - case vmIntrinsics::_indexOfIU: - case vmIntrinsics::_indexOfIUL: - case vmIntrinsics::_indexOfU_char: - case vmIntrinsics::_compareToL: - case vmIntrinsics::_compareToU: - case vmIntrinsics::_compareToLU: - case vmIntrinsics::_compareToUL: - case vmIntrinsics::_equalsL: - case vmIntrinsics::_equalsU: - case vmIntrinsics::_equalsC: - case vmIntrinsics::_getCharStringU: - case vmIntrinsics::_putCharStringU: - case vmIntrinsics::_compressStringC: - case vmIntrinsics::_compressStringB: - case vmIntrinsics::_inflateStringC: - case vmIntrinsics::_inflateStringB: - case vmIntrinsics::_getAndAddInt: - case vmIntrinsics::_getAndAddLong: - case vmIntrinsics::_getAndSetInt: - case vmIntrinsics::_getAndSetLong: - case vmIntrinsics::_getAndSetReference: - case vmIntrinsics::_loadFence: - case vmIntrinsics::_storeFence: - case vmIntrinsics::_fullFence: - case vmIntrinsics::_hasNegatives: - case vmIntrinsics::_Reference_get: - break; - default: - return true; - } - } - - switch (id) { - case vmIntrinsics::_isInstance: - case vmIntrinsics::_isAssignableFrom: - case vmIntrinsics::_getModifiers: - case vmIntrinsics::_isInterface: - case vmIntrinsics::_isArray: - case vmIntrinsics::_isPrimitive: - case vmIntrinsics::_isHidden: - case vmIntrinsics::_getSuperclass: - case vmIntrinsics::_Class_cast: - case vmIntrinsics::_getLength: - case vmIntrinsics::_newArray: - case vmIntrinsics::_getClass: - if (!InlineClassNatives) return true; - break; - case vmIntrinsics::_currentThread: - if (!InlineThreadNatives) return true; - break; - case vmIntrinsics::_floatToRawIntBits: - case vmIntrinsics::_intBitsToFloat: - case vmIntrinsics::_doubleToRawLongBits: - case vmIntrinsics::_longBitsToDouble: - case vmIntrinsics::_ceil: - case vmIntrinsics::_floor: - case vmIntrinsics::_rint: - case vmIntrinsics::_dabs: - case vmIntrinsics::_fabs: - case vmIntrinsics::_iabs: - case vmIntrinsics::_labs: - case vmIntrinsics::_dsqrt: - case vmIntrinsics::_dsin: - case vmIntrinsics::_dcos: - case vmIntrinsics::_dtan: - case vmIntrinsics::_dlog: - case vmIntrinsics::_dexp: - case vmIntrinsics::_dpow: - case vmIntrinsics::_dlog10: - case vmIntrinsics::_datan2: - case vmIntrinsics::_min: - case vmIntrinsics::_max: - case vmIntrinsics::_floatToIntBits: - case vmIntrinsics::_doubleToLongBits: - case vmIntrinsics::_maxF: - case vmIntrinsics::_minF: - case vmIntrinsics::_maxD: - case vmIntrinsics::_minD: - if (!InlineMathNatives) return true; - break; - case vmIntrinsics::_fmaD: - case vmIntrinsics::_fmaF: - if (!InlineMathNatives || !UseFMA) return true; - break; - case vmIntrinsics::_arraycopy: - if (!InlineArrayCopy) return true; - break; - case vmIntrinsics::_updateCRC32: - case vmIntrinsics::_updateBytesCRC32: - case vmIntrinsics::_updateByteBufferCRC32: - if (!UseCRC32Intrinsics) return true; - break; - case vmIntrinsics::_makePrivateBuffer: - case vmIntrinsics::_finishPrivateBuffer: - case vmIntrinsics::_getReference: - case vmIntrinsics::_getBoolean: - case vmIntrinsics::_getByte: - case vmIntrinsics::_getShort: - case vmIntrinsics::_getChar: - case vmIntrinsics::_getInt: - case vmIntrinsics::_getLong: - case vmIntrinsics::_getFloat: - case vmIntrinsics::_getDouble: - case vmIntrinsics::_getValue: - case vmIntrinsics::_putReference: - case vmIntrinsics::_putBoolean: - case vmIntrinsics::_putByte: - case vmIntrinsics::_putShort: - case vmIntrinsics::_putChar: - case vmIntrinsics::_putInt: - case vmIntrinsics::_putLong: - case vmIntrinsics::_putFloat: - case vmIntrinsics::_putDouble: - case vmIntrinsics::_putValue: - case vmIntrinsics::_getReferenceVolatile: - case vmIntrinsics::_getBooleanVolatile: - case vmIntrinsics::_getByteVolatile: - case vmIntrinsics::_getShortVolatile: - case vmIntrinsics::_getCharVolatile: - case vmIntrinsics::_getIntVolatile: - case vmIntrinsics::_getLongVolatile: - case vmIntrinsics::_getFloatVolatile: - case vmIntrinsics::_getDoubleVolatile: - case vmIntrinsics::_putReferenceVolatile: - case vmIntrinsics::_putBooleanVolatile: - case vmIntrinsics::_putByteVolatile: - case vmIntrinsics::_putShortVolatile: - case vmIntrinsics::_putCharVolatile: - case vmIntrinsics::_putIntVolatile: - case vmIntrinsics::_putLongVolatile: - case vmIntrinsics::_putFloatVolatile: - case vmIntrinsics::_putDoubleVolatile: - case vmIntrinsics::_getReferenceAcquire: - case vmIntrinsics::_getBooleanAcquire: - case vmIntrinsics::_getByteAcquire: - case vmIntrinsics::_getShortAcquire: - case vmIntrinsics::_getCharAcquire: - case vmIntrinsics::_getIntAcquire: - case vmIntrinsics::_getLongAcquire: - case vmIntrinsics::_getFloatAcquire: - case vmIntrinsics::_getDoubleAcquire: - case vmIntrinsics::_putReferenceRelease: - case vmIntrinsics::_putBooleanRelease: - case vmIntrinsics::_putByteRelease: - case vmIntrinsics::_putShortRelease: - case vmIntrinsics::_putCharRelease: - case vmIntrinsics::_putIntRelease: - case vmIntrinsics::_putLongRelease: - case vmIntrinsics::_putFloatRelease: - case vmIntrinsics::_putDoubleRelease: - case vmIntrinsics::_getReferenceOpaque: - case vmIntrinsics::_getBooleanOpaque: - case vmIntrinsics::_getByteOpaque: - case vmIntrinsics::_getShortOpaque: - case vmIntrinsics::_getCharOpaque: - case vmIntrinsics::_getIntOpaque: - case vmIntrinsics::_getLongOpaque: - case vmIntrinsics::_getFloatOpaque: - case vmIntrinsics::_getDoubleOpaque: - case vmIntrinsics::_putReferenceOpaque: - case vmIntrinsics::_putBooleanOpaque: - case vmIntrinsics::_putByteOpaque: - case vmIntrinsics::_putShortOpaque: - case vmIntrinsics::_putCharOpaque: - case vmIntrinsics::_putIntOpaque: - case vmIntrinsics::_putLongOpaque: - case vmIntrinsics::_putFloatOpaque: - case vmIntrinsics::_putDoubleOpaque: - case vmIntrinsics::_getAndAddInt: - case vmIntrinsics::_getAndAddLong: - case vmIntrinsics::_getAndSetInt: - case vmIntrinsics::_getAndSetLong: - case vmIntrinsics::_getAndSetReference: - case vmIntrinsics::_loadFence: - case vmIntrinsics::_storeFence: - case vmIntrinsics::_fullFence: - case vmIntrinsics::_compareAndSetLong: - case vmIntrinsics::_weakCompareAndSetLong: - case vmIntrinsics::_weakCompareAndSetLongPlain: - case vmIntrinsics::_weakCompareAndSetLongAcquire: - case vmIntrinsics::_weakCompareAndSetLongRelease: - case vmIntrinsics::_compareAndSetInt: - case vmIntrinsics::_weakCompareAndSetInt: - case vmIntrinsics::_weakCompareAndSetIntPlain: - case vmIntrinsics::_weakCompareAndSetIntAcquire: - case vmIntrinsics::_weakCompareAndSetIntRelease: - case vmIntrinsics::_compareAndSetReference: - case vmIntrinsics::_weakCompareAndSetReference: - case vmIntrinsics::_weakCompareAndSetReferencePlain: - case vmIntrinsics::_weakCompareAndSetReferenceAcquire: - case vmIntrinsics::_weakCompareAndSetReferenceRelease: - case vmIntrinsics::_compareAndExchangeInt: - case vmIntrinsics::_compareAndExchangeIntAcquire: - case vmIntrinsics::_compareAndExchangeIntRelease: - case vmIntrinsics::_compareAndExchangeLong: - case vmIntrinsics::_compareAndExchangeLongAcquire: - case vmIntrinsics::_compareAndExchangeLongRelease: - case vmIntrinsics::_compareAndExchangeReference: - case vmIntrinsics::_compareAndExchangeReferenceAcquire: - case vmIntrinsics::_compareAndExchangeReferenceRelease: - if (!InlineUnsafeOps) return true; - break; - case vmIntrinsics::_getShortUnaligned: - case vmIntrinsics::_getCharUnaligned: - case vmIntrinsics::_getIntUnaligned: - case vmIntrinsics::_getLongUnaligned: - case vmIntrinsics::_putShortUnaligned: - case vmIntrinsics::_putCharUnaligned: - case vmIntrinsics::_putIntUnaligned: - case vmIntrinsics::_putLongUnaligned: - case vmIntrinsics::_allocateInstance: - if (!InlineUnsafeOps || !UseUnalignedAccesses) return true; - break; - case vmIntrinsics::_hashCode: - if (!InlineObjectHash) return true; - break; - case vmIntrinsics::_aescrypt_encryptBlock: - case vmIntrinsics::_aescrypt_decryptBlock: - if (!UseAESIntrinsics) return true; - break; - case vmIntrinsics::_cipherBlockChaining_encryptAESCrypt: - case vmIntrinsics::_cipherBlockChaining_decryptAESCrypt: - if (!UseAESIntrinsics) return true; - break; - case vmIntrinsics::_electronicCodeBook_encryptAESCrypt: - case vmIntrinsics::_electronicCodeBook_decryptAESCrypt: - if (!UseAESIntrinsics) return true; - break; - case vmIntrinsics::_counterMode_AESCrypt: - if (!UseAESCTRIntrinsics) return true; - break; - case vmIntrinsics::_md5_implCompress: - if (!UseMD5Intrinsics) return true; - break; - case vmIntrinsics::_sha_implCompress: - if (!UseSHA1Intrinsics) return true; - break; - case vmIntrinsics::_sha2_implCompress: - if (!UseSHA256Intrinsics) return true; - break; - case vmIntrinsics::_sha5_implCompress: - if (!UseSHA512Intrinsics) return true; - break; - case vmIntrinsics::_digestBase_implCompressMB: - if (!(UseMD5Intrinsics || UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA512Intrinsics)) return true; - break; - case vmIntrinsics::_ghash_processBlocks: - if (!UseGHASHIntrinsics) return true; - break; - case vmIntrinsics::_base64_encodeBlock: - if (!UseBASE64Intrinsics) return true; - break; - case vmIntrinsics::_updateBytesCRC32C: - case vmIntrinsics::_updateDirectByteBufferCRC32C: - if (!UseCRC32CIntrinsics) return true; - break; - case vmIntrinsics::_vectorizedMismatch: - if (!UseVectorizedMismatchIntrinsic) return true; - break; - case vmIntrinsics::_updateBytesAdler32: - case vmIntrinsics::_updateByteBufferAdler32: - if (!UseAdler32Intrinsics) return true; - break; - case vmIntrinsics::_copyMemory: - if (!InlineArrayCopy || !InlineUnsafeOps) return true; - break; -#ifdef COMPILER1 - case vmIntrinsics::_checkIndex: - if (!InlineNIOCheckIndex) return true; - break; -#endif // COMPILER1 -#ifdef COMPILER2 - case vmIntrinsics::_clone: - case vmIntrinsics::_copyOf: - case vmIntrinsics::_copyOfRange: - // These intrinsics use both the objectcopy and the arraycopy - // intrinsic mechanism. - if (!InlineObjectCopy || !InlineArrayCopy) return true; - break; - case vmIntrinsics::_compareToL: - case vmIntrinsics::_compareToU: - case vmIntrinsics::_compareToLU: - case vmIntrinsics::_compareToUL: - if (!SpecialStringCompareTo) return true; - break; - case vmIntrinsics::_indexOfL: - case vmIntrinsics::_indexOfU: - case vmIntrinsics::_indexOfUL: - case vmIntrinsics::_indexOfIL: - case vmIntrinsics::_indexOfIU: - case vmIntrinsics::_indexOfIUL: - case vmIntrinsics::_indexOfU_char: - if (!SpecialStringIndexOf) return true; - break; - case vmIntrinsics::_equalsL: - case vmIntrinsics::_equalsU: - if (!SpecialStringEquals) return true; - break; - case vmIntrinsics::_equalsB: - case vmIntrinsics::_equalsC: - if (!SpecialArraysEquals) return true; - break; - case vmIntrinsics::_encodeISOArray: - case vmIntrinsics::_encodeByteISOArray: - if (!SpecialEncodeISOArray) return true; - break; - case vmIntrinsics::_getCallerClass: - if (!InlineReflectionGetCallerClass) return true; - break; - case vmIntrinsics::_multiplyToLen: - if (!UseMultiplyToLenIntrinsic) return true; - break; - case vmIntrinsics::_squareToLen: - if (!UseSquareToLenIntrinsic) return true; - break; - case vmIntrinsics::_mulAdd: - if (!UseMulAddIntrinsic) return true; - break; - case vmIntrinsics::_montgomeryMultiply: - if (!UseMontgomeryMultiplyIntrinsic) return true; - break; - case vmIntrinsics::_montgomerySquare: - if (!UseMontgomerySquareIntrinsic) return true; - break; - case vmIntrinsics::_bigIntegerRightShiftWorker: - case vmIntrinsics::_bigIntegerLeftShiftWorker: - break; - case vmIntrinsics::_addExactI: - case vmIntrinsics::_addExactL: - case vmIntrinsics::_decrementExactI: - case vmIntrinsics::_decrementExactL: - case vmIntrinsics::_incrementExactI: - case vmIntrinsics::_incrementExactL: - case vmIntrinsics::_multiplyExactI: - case vmIntrinsics::_multiplyExactL: - case vmIntrinsics::_negateExactI: - case vmIntrinsics::_negateExactL: - case vmIntrinsics::_subtractExactI: - case vmIntrinsics::_subtractExactL: - if (!UseMathExactIntrinsics || !InlineMathNatives) return true; - break; - case vmIntrinsics::_isDigit: - case vmIntrinsics::_isLowerCase: - case vmIntrinsics::_isUpperCase: - case vmIntrinsics::_isWhitespace: - if (!UseCharacterCompareIntrinsics) return true; - break; - case vmIntrinsics::_dcopySign: - case vmIntrinsics::_fcopySign: - if (!InlineMathNatives || !UseCopySignIntrinsic) return true; - break; - case vmIntrinsics::_dsignum: - case vmIntrinsics::_fsignum: - if (!InlineMathNatives || !UseSignumIntrinsic) return true; - break; -#endif // COMPILER2 - default: - return false; - } - - return false; -} - -#define VM_INTRINSIC_INITIALIZE(id, klass, name, sig, flags) #id "\0" -static const char* vm_intrinsic_name_bodies = - VM_INTRINSICS_DO(VM_INTRINSIC_INITIALIZE, - VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE); - -static const char* vm_intrinsic_name_table[vmIntrinsics::ID_LIMIT]; -static TriBoolArray<vmIntrinsics::ID_LIMIT, int> vm_intrinsic_control_words; - -static void init_vm_intrinsic_name_table() { - const char** nt = &vm_intrinsic_name_table[0]; - char* string = (char*) &vm_intrinsic_name_bodies[0]; - for (int index = vmIntrinsics::FIRST_ID; index < vmIntrinsics::ID_LIMIT; index++) { - nt[index] = string; - string += strlen(string); // skip string body - string += 1; // skip trailing null - } - assert(!strcmp(nt[vmIntrinsics::_hashCode], "_hashCode"), "lined up"); - nt[vmIntrinsics::_none] = "_none"; -} - -const char* vmIntrinsics::name_at(vmIntrinsics::ID id) { - const char** nt = &vm_intrinsic_name_table[0]; - if (nt[_none] == NULL) { - init_vm_intrinsic_name_table(); - } - - if ((uint)id < (uint)ID_LIMIT) - return vm_intrinsic_name_table[(uint)id]; - else - return "(unknown intrinsic)"; -} - -vmIntrinsics::ID vmIntrinsics::find_id(const char* name) { - const char** nt = &vm_intrinsic_name_table[0]; - if (nt[_none] == NULL) { - init_vm_intrinsic_name_table(); - } - - for (int index = FIRST_ID; index < ID_LIMIT; ++index) { - if (0 == strcmp(name, nt[index])) { - return ID_from(index); - } - } - - return _none; -} - -bool vmIntrinsics::is_disabled_by_flags(const methodHandle& method) { - vmIntrinsics::ID id = method->intrinsic_id(); - return is_disabled_by_flags(id); -} - -bool vmIntrinsics::is_disabled_by_flags(vmIntrinsics::ID id) { - assert(id > _none && id < ID_LIMIT, "must be a VM intrinsic"); - - // not initialized yet, process Control/DisableIntrinsic - if (vm_intrinsic_control_words[_none].is_default()) { - for (ControlIntrinsicIter iter(ControlIntrinsic); *iter != NULL; ++iter) { - vmIntrinsics::ID id = vmIntrinsics::find_id(*iter); - - if (id != vmIntrinsics::_none) { - vm_intrinsic_control_words[id] = iter.is_enabled() && !disabled_by_jvm_flags(id); - } - } - - // Order matters, DisableIntrinsic can overwrite ControlIntrinsic - for (ControlIntrinsicIter iter(DisableIntrinsic, true/*disable_all*/); *iter != NULL; ++iter) { - vmIntrinsics::ID id = vmIntrinsics::find_id(*iter); - - if (id != vmIntrinsics::_none) { - vm_intrinsic_control_words[id] = false; - } - } - - vm_intrinsic_control_words[_none] = true; - } - - TriBool b = vm_intrinsic_control_words[id]; - if (b.is_default()) { - // unknown yet, query and cache it - b = vm_intrinsic_control_words[id] = !disabled_by_jvm_flags(id); - } - - return !b; -} - -// These are flag-matching functions: -inline bool match_F_R(jshort flags) { - const int req = 0; - const int neg = JVM_ACC_STATIC | JVM_ACC_SYNCHRONIZED; - return (flags & (req | neg)) == req; -} -inline bool match_F_Y(jshort flags) { - const int req = JVM_ACC_SYNCHRONIZED; - const int neg = JVM_ACC_STATIC; - return (flags & (req | neg)) == req; -} -inline bool match_F_RN(jshort flags) { - const int req = JVM_ACC_NATIVE; - const int neg = JVM_ACC_STATIC | JVM_ACC_SYNCHRONIZED; - return (flags & (req | neg)) == req; -} -inline bool match_F_S(jshort flags) { - const int req = JVM_ACC_STATIC; - const int neg = JVM_ACC_SYNCHRONIZED; - return (flags & (req | neg)) == req; -} -inline bool match_F_SN(jshort flags) { - const int req = JVM_ACC_STATIC | JVM_ACC_NATIVE; - const int neg = JVM_ACC_SYNCHRONIZED; - return (flags & (req | neg)) == req; -} -inline bool match_F_RNY(jshort flags) { - const int req = JVM_ACC_NATIVE | JVM_ACC_SYNCHRONIZED; - const int neg = JVM_ACC_STATIC; - return (flags & (req | neg)) == req; -} - -// These are for forming case labels: -#define ID3(x, y, z) (( jlong)(z) + \ - ((jlong)(y) << vmSymbols::log2_SID_LIMIT) + \ - ((jlong)(x) << (2*vmSymbols::log2_SID_LIMIT)) ) -#define SID_ENUM(n) vmSymbols::VM_SYMBOL_ENUM_NAME(n) - -vmIntrinsics::ID vmIntrinsics::find_id_impl(vmSymbols::SID holder, - vmSymbols::SID name, - vmSymbols::SID sig, - jshort flags) { - assert((int)vmSymbols::SID_LIMIT <= (1<<vmSymbols::log2_SID_LIMIT), "must fit"); - - // Let the C compiler build the decision tree. - -#define VM_INTRINSIC_CASE(id, klass, name, sig, fcode) \ - case ID3(SID_ENUM(klass), SID_ENUM(name), SID_ENUM(sig)): \ - if (!match_##fcode(flags)) break; \ - return id; - - switch (ID3(holder, name, sig)) { - VM_INTRINSICS_DO(VM_INTRINSIC_CASE, - VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE); - } - return vmIntrinsics::_none; - -#undef VM_INTRINSIC_CASE -} - - -const char* vmIntrinsics::short_name_as_C_string(vmIntrinsics::ID id, char* buf, int buflen) { - const char* str = name_at(id); -#ifndef PRODUCT - const char* kname = vmSymbols::name_for(class_for(id)); - const char* mname = vmSymbols::name_for(name_for(id)); - const char* sname = vmSymbols::name_for(signature_for(id)); - const char* fname = ""; - switch (flags_for(id)) { - case F_Y: fname = "synchronized "; break; - case F_RN: fname = "native "; break; - case F_SN: fname = "native static "; break; - case F_S: fname = "static "; break; - case F_RNY:fname = "native synchronized "; break; - default: break; - } - const char* kptr = strrchr(kname, JVM_SIGNATURE_SLASH); - if (kptr != NULL) kname = kptr + 1; - int len = jio_snprintf(buf, buflen, "%s: %s%s.%s%s", - str, fname, kname, mname, sname); - if (len < buflen) - str = buf; -#endif //PRODUCT - return str; -} - - -// These are to get information about intrinsics. - -#define ID4(x, y, z, f) ((ID3(x, y, z) << vmIntrinsics::log2_FLAG_LIMIT) | (jlong) (f)) - -static const jlong intrinsic_info_array[vmIntrinsics::ID_LIMIT+1] = { -#define VM_INTRINSIC_INFO(ignore_id, klass, name, sig, fcode) \ - ID4(SID_ENUM(klass), SID_ENUM(name), SID_ENUM(sig), vmIntrinsics::fcode), - - 0, VM_INTRINSICS_DO(VM_INTRINSIC_INFO, - VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) - 0 -#undef VM_INTRINSIC_INFO -}; - -inline jlong intrinsic_info(vmIntrinsics::ID id) { - return intrinsic_info_array[vmIntrinsics::ID_from((int)id)]; -} - -vmSymbols::SID vmIntrinsics::class_for(vmIntrinsics::ID id) { - jlong info = intrinsic_info(id); - int shift = 2*vmSymbols::log2_SID_LIMIT + log2_FLAG_LIMIT, mask = right_n_bits(vmSymbols::log2_SID_LIMIT); - assert(((ID4(1021,1022,1023,15) >> shift) & mask) == 1021, ""); - return vmSymbols::SID( (info >> shift) & mask ); -} - -vmSymbols::SID vmIntrinsics::name_for(vmIntrinsics::ID id) { - jlong info = intrinsic_info(id); - int shift = vmSymbols::log2_SID_LIMIT + log2_FLAG_LIMIT, mask = right_n_bits(vmSymbols::log2_SID_LIMIT); - assert(((ID4(1021,1022,1023,15) >> shift) & mask) == 1022, ""); - return vmSymbols::SID( (info >> shift) & mask ); -} - -vmSymbols::SID vmIntrinsics::signature_for(vmIntrinsics::ID id) { - jlong info = intrinsic_info(id); - int shift = log2_FLAG_LIMIT, mask = right_n_bits(vmSymbols::log2_SID_LIMIT); - assert(((ID4(1021,1022,1023,15) >> shift) & mask) == 1023, ""); - return vmSymbols::SID( (info >> shift) & mask ); -} - -vmIntrinsics::Flags vmIntrinsics::flags_for(vmIntrinsics::ID id) { - jlong info = intrinsic_info(id); - int shift = 0, mask = right_n_bits(log2_FLAG_LIMIT); - assert(((ID4(1021,1022,1023,15) >> shift) & mask) == 15, ""); - return Flags( (info >> shift) & mask ); -} - - -#ifndef PRODUCT -// verify_method performs an extra check on a matched intrinsic method - -static bool match_method(Method* m, Symbol* n, Symbol* s) { - return (m->name() == n && - m->signature() == s); -} - -static vmIntrinsics::ID match_method_with_klass(Method* m, Symbol* mk) { -#define VM_INTRINSIC_MATCH(id, klassname, namepart, sigpart, flags) \ - { Symbol* k = vmSymbols::klassname(); \ - if (mk == k) { \ - Symbol* n = vmSymbols::namepart(); \ - Symbol* s = vmSymbols::sigpart(); \ - if (match_method(m, n, s)) \ - return vmIntrinsics::id; \ - } } - VM_INTRINSICS_DO(VM_INTRINSIC_MATCH, - VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE); - return vmIntrinsics::_none; -#undef VM_INTRINSIC_MATCH -} - -void vmIntrinsics::verify_method(ID actual_id, Method* m) { - Symbol* mk = m->method_holder()->name(); - ID declared_id = match_method_with_klass(m, mk); - - if (declared_id == actual_id) return; // success - - if (declared_id == _none && actual_id != _none && mk == vmSymbols::java_lang_StrictMath()) { - // Here are a few special cases in StrictMath not declared in vmSymbols.hpp. - switch (actual_id) { - case _min: - case _max: - case _dsqrt: - declared_id = match_method_with_klass(m, vmSymbols::java_lang_Math()); - if (declared_id == actual_id) return; // acceptable alias - break; - default: - break; - } - } - - const char* declared_name = name_at(declared_id); - const char* actual_name = name_at(actual_id); - m = NULL; - ttyLocker ttyl; - if (xtty != NULL) { - xtty->begin_elem("intrinsic_misdeclared actual='%s' declared='%s'", - actual_name, declared_name); - xtty->method(m); - xtty->end_elem("%s", ""); - } - if (PrintMiscellaneous && (WizardMode || Verbose)) { - tty->print_cr("*** misidentified method; %s(%d) should be %s(%d):", - declared_name, declared_id, actual_name, actual_id); - m->print_short_name(tty); - tty->cr(); - } -} -#endif //PRODUCT diff --git a/src/hotspot/share/classfile/vmSymbols.hpp b/src/hotspot/share/classfile/vmSymbols.hpp index 8c19dfdb284..5db4451e468 100644 --- a/src/hotspot/share/classfile/vmSymbols.hpp +++ b/src/hotspot/share/classfile/vmSymbols.hpp @@ -30,6 +30,7 @@ #include "memory/iterator.hpp" #include "oops/symbol.hpp" #include "utilities/macros.hpp" +#include "vmIntrinsics.hpp" // The class vmSymbols is a name space for fast lookup of @@ -286,10 +287,10 @@ template(type_annotations_name, "typeAnnotations") \ \ /* Intrinsic Annotation (JDK 9 and above) */ \ - template(jdk_internal_HotSpotIntrinsicCandidate_signature, "Ljdk/internal/HotSpotIntrinsicCandidate;") \ template(jdk_internal_vm_annotation_DontInline_signature, "Ljdk/internal/vm/annotation/DontInline;") \ template(jdk_internal_vm_annotation_ForceInline_signature, "Ljdk/internal/vm/annotation/ForceInline;") \ template(jdk_internal_vm_annotation_Hidden_signature, "Ljdk/internal/vm/annotation/Hidden;") \ + template(jdk_internal_vm_annotation_IntrinsicCandidate_signature, "Ljdk/internal/vm/annotation/IntrinsicCandidate;") \ template(jdk_internal_vm_annotation_Stable_signature, "Ljdk/internal/vm/annotation/Stable;") \ \ /* Support for JSR 292 & invokedynamic (JDK 1.7 and above) */ \ @@ -333,9 +334,8 @@ template(DEFAULT_CONTEXT_name, "DEFAULT_CONTEXT") \ NOT_LP64( do_alias(intptr_signature, int_signature) ) \ LP64_ONLY( do_alias(intptr_signature, long_signature) ) \ - \ - \ - /* Support for JVMCI */ \ + \ + /* Support for JVMCI */ \ JVMCI_VM_SYMBOLS_DO(template, do_alias) \ \ template(java_lang_StackWalker, "java/lang/StackWalker") \ @@ -466,6 +466,7 @@ template(big_endian_name, "BIG_ENDIAN") \ template(use_unaligned_access_name, "UNALIGNED_ACCESS") \ template(data_cache_line_flush_size_name, "DATA_CACHE_LINE_FLUSH_SIZE") \ + template(during_unsafe_access_name, "during_unsafe_access") \ \ /* name symbols needed by intrinsics */ \ VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, template, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE) \ @@ -685,862 +686,6 @@ template(jdk_internal_vm_jni_SubElementSelector, "jdk/internal/vm/jni/SubElementSelector") \ /*end*/ -// Here are all the intrinsics known to the runtime and the CI. -// Each intrinsic consists of a public enum name (like _hashCode), -// followed by a specification of its klass, name, and signature: -// template(<id>, <klass>, <name>, <sig>, <FCODE>) -// -// If you add an intrinsic here, you must also define its name -// and signature as members of the VM symbols. The VM symbols for -// the intrinsic name and signature may be defined above. -// -// Because the VM_SYMBOLS_DO macro makes reference to VM_INTRINSICS_DO, -// you can also define an intrinsic's name and/or signature locally to the -// intrinsic, if this makes sense. (It often does make sense.) -// -// For example: -// do_intrinsic(_foo, java_lang_Object, foo_name, foo_signature, F_xx) -// do_name( foo_name, "foo") -// do_signature(foo_signature, "()F") -// klass = vmSymbols::java_lang_Object() -// name = vmSymbols::foo_name() -// signature = vmSymbols::foo_signature() -// -// The name and/or signature might be a "well known" symbol -// like "equal" or "()I", in which case there will be no local -// re-definition of the symbol. -// -// The do_class, do_name, and do_signature calls are all used for the -// same purpose: Define yet another VM symbol. They could all be merged -// into a common 'do_symbol' call, but it seems useful to record our -// intentions here about kinds of symbols (class vs. name vs. signature). -// -// The F_xx is one of the Flags enum; see below. -// -// for Emacs: (let ((c-backslash-column 120) (c-backslash-max-column 120)) (c-backslash-region (point) (point-max) nil t)) -// -// -// There are two types of intrinsic methods: (1) Library intrinsics and (2) bytecode intrinsics. -// -// (1) A library intrinsic method may be replaced with hand-crafted assembly code, -// with hand-crafted compiler IR, or with a combination of the two. The semantics -// of the replacement code may differ from the semantics of the replaced code. -// -// (2) Bytecode intrinsic methods are not replaced by special code, but they are -// treated in some other special way by the compiler. For example, the compiler -// may delay inlining for some String-related intrinsic methods (e.g., some methods -// defined in the StringBuilder and StringBuffer classes, see -// Compile::should_delay_string_inlining() for more details). -// -// Due to the difference between the semantics of an intrinsic method as defined -// in the (Java) source code and the semantics of the method as defined -// by the code in the VM, intrinsic methods must be explicitly marked. -// -// Intrinsic methods are marked by the jdk.internal.HotSpotIntrinsicCandidate -// annotation. If CheckIntrinsics is enabled, the VM performs the following -// checks when a class C is loaded: (1) all intrinsics defined by the VM for -// class C are present in the loaded class file and are marked; -// (2) an intrinsic is defined by the VM for all marked methods of class C; -// (3) check for orphan methods in class C (i.e., methods for which the VM -// declares an intrinsic but that are not declared for the loaded class C. -// Check (3) is available only in debug builds. -// -// If a mismatch is detected for a method, the VM behaves differently depending -// on the type of build. A fastdebug build exits and reports an error on a mismatch. -// A product build will not replace an unmarked library intrinsic method with -// hand-crafted code, that is, unmarked library intrinsics are treated as ordinary -// methods in a product build. The special treatment of a bytecode intrinsic method -// persists even if the method not marked. -// -// When adding an intrinsic for a method, please make sure to appropriately -// annotate the method in the source code. The list below contains all -// library intrinsics followed by bytecode intrinsics. Please also make sure to -// add the declaration of the intrinsic to the approriate section of the list. -#define VM_INTRINSICS_DO(do_intrinsic, do_class, do_name, do_signature, do_alias) \ - /* (1) Library intrinsics */ \ - do_intrinsic(_hashCode, java_lang_Object, hashCode_name, void_int_signature, F_R) \ - do_name( hashCode_name, "hashCode") \ - do_intrinsic(_getClass, java_lang_Object, getClass_name, void_class_signature, F_R) \ - do_name( getClass_name, "getClass") \ - do_intrinsic(_clone, java_lang_Object, clone_name, void_object_signature, F_R) \ - do_name( clone_name, "clone") \ - do_intrinsic(_notify, java_lang_Object, notify_name, void_method_signature, F_R) \ - do_name( notify_name, "notify") \ - do_intrinsic(_notifyAll, java_lang_Object, notifyAll_name, void_method_signature, F_R) \ - do_name( notifyAll_name, "notifyAll") \ - \ - /* Math & StrictMath intrinsics are defined in terms of just a few signatures: */ \ - do_class(java_lang_Math, "java/lang/Math") \ - do_class(java_lang_StrictMath, "java/lang/StrictMath") \ - do_signature(double2_double_signature, "(DD)D") \ - do_signature(double3_double_signature, "(DDD)D") \ - do_signature(float2_float_signature, "(FF)F") \ - do_signature(float3_float_signature, "(FFF)F") \ - do_signature(int2_int_signature, "(II)I") \ - do_signature(long2_long_signature, "(JJ)J") \ - \ - /* here are the math names, all together: */ \ - do_name(abs_name,"abs") do_name(sin_name,"sin") do_name(cos_name,"cos") \ - do_name(tan_name,"tan") do_name(atan2_name,"atan2") do_name(sqrt_name,"sqrt") \ - do_name(log_name,"log") do_name(log10_name,"log10") do_name(pow_name,"pow") \ - do_name(exp_name,"exp") do_name(min_name,"min") do_name(max_name,"max") \ - do_name(floor_name, "floor") do_name(ceil_name, "ceil") do_name(rint_name, "rint") \ - \ - do_name(addExact_name,"addExact") \ - do_name(decrementExact_name,"decrementExact") \ - do_name(incrementExact_name,"incrementExact") \ - do_name(multiplyExact_name,"multiplyExact") \ - do_name(multiplyHigh_name,"multiplyHigh") \ - do_name(negateExact_name,"negateExact") \ - do_name(subtractExact_name,"subtractExact") \ - do_name(fma_name, "fma") \ - do_name(copySign_name, "copySign") \ - do_name(signum_name,"signum") \ - \ - do_intrinsic(_dabs, java_lang_Math, abs_name, double_double_signature, F_S) \ - do_intrinsic(_fabs, java_lang_Math, abs_name, float_float_signature, F_S) \ - do_intrinsic(_iabs, java_lang_Math, abs_name, int_int_signature, F_S) \ - do_intrinsic(_labs, java_lang_Math, abs_name, long_long_signature, F_S) \ - do_intrinsic(_dsin, java_lang_Math, sin_name, double_double_signature, F_S) \ - do_intrinsic(_floor, java_lang_Math, floor_name, double_double_signature, F_S) \ - do_intrinsic(_ceil, java_lang_Math, ceil_name, double_double_signature, F_S) \ - do_intrinsic(_rint, java_lang_Math, rint_name, double_double_signature, F_S) \ - do_intrinsic(_dcos, java_lang_Math, cos_name, double_double_signature, F_S) \ - do_intrinsic(_dtan, java_lang_Math, tan_name, double_double_signature, F_S) \ - do_intrinsic(_datan2, java_lang_Math, atan2_name, double2_double_signature, F_S) \ - do_intrinsic(_dsqrt, java_lang_Math, sqrt_name, double_double_signature, F_S) \ - do_intrinsic(_dlog, java_lang_Math, log_name, double_double_signature, F_S) \ - do_intrinsic(_dlog10, java_lang_Math, log10_name, double_double_signature, F_S) \ - do_intrinsic(_dpow, java_lang_Math, pow_name, double2_double_signature, F_S) \ - do_intrinsic(_dexp, java_lang_Math, exp_name, double_double_signature, F_S) \ - do_intrinsic(_min, java_lang_Math, min_name, int2_int_signature, F_S) \ - do_intrinsic(_max, java_lang_Math, max_name, int2_int_signature, F_S) \ - do_intrinsic(_addExactI, java_lang_Math, addExact_name, int2_int_signature, F_S) \ - do_intrinsic(_addExactL, java_lang_Math, addExact_name, long2_long_signature, F_S) \ - do_intrinsic(_decrementExactI, java_lang_Math, decrementExact_name, int_int_signature, F_S) \ - do_intrinsic(_decrementExactL, java_lang_Math, decrementExact_name, long_long_signature, F_S) \ - do_intrinsic(_incrementExactI, java_lang_Math, incrementExact_name, int_int_signature, F_S) \ - do_intrinsic(_incrementExactL, java_lang_Math, incrementExact_name, long_long_signature, F_S) \ - do_intrinsic(_multiplyExactI, java_lang_Math, multiplyExact_name, int2_int_signature, F_S) \ - do_intrinsic(_multiplyExactL, java_lang_Math, multiplyExact_name, long2_long_signature, F_S) \ - do_intrinsic(_multiplyHigh, java_lang_Math, multiplyHigh_name, long2_long_signature, F_S) \ - do_intrinsic(_negateExactI, java_lang_Math, negateExact_name, int_int_signature, F_S) \ - do_intrinsic(_negateExactL, java_lang_Math, negateExact_name, long_long_signature, F_S) \ - do_intrinsic(_subtractExactI, java_lang_Math, subtractExact_name, int2_int_signature, F_S) \ - do_intrinsic(_subtractExactL, java_lang_Math, subtractExact_name, long2_long_signature, F_S) \ - do_intrinsic(_fmaD, java_lang_Math, fma_name, double3_double_signature, F_S) \ - do_intrinsic(_fmaF, java_lang_Math, fma_name, float3_float_signature, F_S) \ - do_intrinsic(_maxF, java_lang_Math, max_name, float2_float_signature, F_S) \ - do_intrinsic(_minF, java_lang_Math, min_name, float2_float_signature, F_S) \ - do_intrinsic(_maxD, java_lang_Math, max_name, double2_double_signature, F_S) \ - do_intrinsic(_minD, java_lang_Math, min_name, double2_double_signature, F_S) \ - do_intrinsic(_dcopySign, java_lang_Math, copySign_name, double2_double_signature, F_S) \ - do_intrinsic(_fcopySign, java_lang_Math, copySign_name, float2_float_signature, F_S) \ - do_intrinsic(_dsignum, java_lang_Math, signum_name, double_double_signature, F_S) \ - do_intrinsic(_fsignum, java_lang_Math, signum_name, float_float_signature, F_S) \ - \ - do_intrinsic(_floatToRawIntBits, java_lang_Float, floatToRawIntBits_name, float_int_signature, F_S) \ - do_name( floatToRawIntBits_name, "floatToRawIntBits") \ - do_intrinsic(_floatToIntBits, java_lang_Float, floatToIntBits_name, float_int_signature, F_S) \ - do_name( floatToIntBits_name, "floatToIntBits") \ - do_intrinsic(_intBitsToFloat, java_lang_Float, intBitsToFloat_name, int_float_signature, F_S) \ - do_name( intBitsToFloat_name, "intBitsToFloat") \ - do_intrinsic(_doubleToRawLongBits, java_lang_Double, doubleToRawLongBits_name, double_long_signature, F_S) \ - do_name( doubleToRawLongBits_name, "doubleToRawLongBits") \ - do_intrinsic(_doubleToLongBits, java_lang_Double, doubleToLongBits_name, double_long_signature, F_S) \ - do_name( doubleToLongBits_name, "doubleToLongBits") \ - do_intrinsic(_longBitsToDouble, java_lang_Double, longBitsToDouble_name, long_double_signature, F_S) \ - do_name( longBitsToDouble_name, "longBitsToDouble") \ - \ - do_intrinsic(_numberOfLeadingZeros_i, java_lang_Integer, numberOfLeadingZeros_name,int_int_signature, F_S) \ - do_intrinsic(_numberOfLeadingZeros_l, java_lang_Long, numberOfLeadingZeros_name,long_int_signature, F_S) \ - \ - do_intrinsic(_numberOfTrailingZeros_i, java_lang_Integer, numberOfTrailingZeros_name,int_int_signature, F_S) \ - do_intrinsic(_numberOfTrailingZeros_l, java_lang_Long, numberOfTrailingZeros_name,long_int_signature, F_S) \ - \ - do_intrinsic(_bitCount_i, java_lang_Integer, bitCount_name, int_int_signature, F_S) \ - do_intrinsic(_bitCount_l, java_lang_Long, bitCount_name, long_int_signature, F_S) \ - \ - do_intrinsic(_reverseBytes_i, java_lang_Integer, reverseBytes_name, int_int_signature, F_S) \ - do_name( reverseBytes_name, "reverseBytes") \ - do_intrinsic(_reverseBytes_l, java_lang_Long, reverseBytes_name, long_long_signature, F_S) \ - /* (symbol reverseBytes_name defined above) */ \ - do_intrinsic(_reverseBytes_c, java_lang_Character, reverseBytes_name, char_char_signature, F_S) \ - /* (symbol reverseBytes_name defined above) */ \ - do_intrinsic(_reverseBytes_s, java_lang_Short, reverseBytes_name, short_short_signature, F_S) \ - /* (symbol reverseBytes_name defined above) */ \ - \ - do_intrinsic(_identityHashCode, java_lang_System, identityHashCode_name, object_int_signature, F_S) \ - do_name( identityHashCode_name, "identityHashCode") \ - do_intrinsic(_currentTimeMillis, java_lang_System, currentTimeMillis_name, void_long_signature, F_S) \ - \ - do_name( currentTimeMillis_name, "currentTimeMillis") \ - do_intrinsic(_nanoTime, java_lang_System, nanoTime_name, void_long_signature, F_S) \ - do_name( nanoTime_name, "nanoTime") \ - \ - JFR_INTRINSICS(do_intrinsic, do_class, do_name, do_signature, do_alias) \ - \ - do_intrinsic(_arraycopy, java_lang_System, arraycopy_name, arraycopy_signature, F_S) \ - do_name( arraycopy_name, "arraycopy") \ - do_signature(arraycopy_signature, "(Ljava/lang/Object;ILjava/lang/Object;II)V") \ - do_intrinsic(_currentThread, java_lang_Thread, currentThread_name, currentThread_signature, F_S) \ - do_name( currentThread_name, "currentThread") \ - do_signature(currentThread_signature, "()Ljava/lang/Thread;") \ - \ - /* reflective intrinsics, for java/lang/Class, etc. */ \ - do_intrinsic(_isAssignableFrom, java_lang_Class, isAssignableFrom_name, class_boolean_signature, F_RN) \ - do_name( isAssignableFrom_name, "isAssignableFrom") \ - do_intrinsic(_isInstance, java_lang_Class, isInstance_name, object_boolean_signature, F_RN) \ - do_name( isInstance_name, "isInstance") \ - do_intrinsic(_getModifiers, java_lang_Class, getModifiers_name, void_int_signature, F_RN) \ - do_name( getModifiers_name, "getModifiers") \ - do_intrinsic(_isInterface, java_lang_Class, isInterface_name, void_boolean_signature, F_RN) \ - do_name( isInterface_name, "isInterface") \ - do_intrinsic(_isArray, java_lang_Class, isArray_name, void_boolean_signature, F_RN) \ - do_name( isArray_name, "isArray") \ - do_intrinsic(_isPrimitive, java_lang_Class, isPrimitive_name, void_boolean_signature, F_RN) \ - do_name( isPrimitive_name, "isPrimitive") \ - do_intrinsic(_isHidden, java_lang_Class, isHidden_name, void_boolean_signature, F_RN) \ - do_name( isHidden_name, "isHidden") \ - do_intrinsic(_getSuperclass, java_lang_Class, getSuperclass_name, void_class_signature, F_RN) \ - do_name( getSuperclass_name, "getSuperclass") \ - do_intrinsic(_Class_cast, java_lang_Class, Class_cast_name, object_object_signature, F_R) \ - do_name( Class_cast_name, "cast") \ - \ - do_intrinsic(_getClassAccessFlags, reflect_Reflection, getClassAccessFlags_name, class_int_signature, F_SN) \ - do_name( getClassAccessFlags_name, "getClassAccessFlags") \ - do_intrinsic(_getLength, java_lang_reflect_Array, getLength_name, object_int_signature, F_SN) \ - do_name( getLength_name, "getLength") \ - \ - do_intrinsic(_getCallerClass, reflect_Reflection, getCallerClass_name, void_class_signature, F_SN) \ - do_name( getCallerClass_name, "getCallerClass") \ - \ - do_intrinsic(_newArray, java_lang_reflect_Array, newArray_name, newArray_signature, F_SN) \ - do_name( newArray_name, "newArray") \ - do_signature(newArray_signature, "(Ljava/lang/Class;I)Ljava/lang/Object;") \ - \ - do_intrinsic(_onSpinWait, java_lang_Thread, onSpinWait_name, onSpinWait_signature, F_S) \ - do_name( onSpinWait_name, "onSpinWait") \ - do_alias( onSpinWait_signature, void_method_signature) \ - \ - do_intrinsic(_copyOf, java_util_Arrays, copyOf_name, copyOf_signature, F_S) \ - do_name( copyOf_name, "copyOf") \ - do_signature(copyOf_signature, "([Ljava/lang/Object;ILjava/lang/Class;)[Ljava/lang/Object;") \ - \ - do_intrinsic(_copyOfRange, java_util_Arrays, copyOfRange_name, copyOfRange_signature, F_S) \ - do_name( copyOfRange_name, "copyOfRange") \ - do_signature(copyOfRange_signature, "([Ljava/lang/Object;IILjava/lang/Class;)[Ljava/lang/Object;") \ - \ - do_intrinsic(_equalsC, java_util_Arrays, equals_name, equalsC_signature, F_S) \ - do_signature(equalsC_signature, "([C[C)Z") \ - do_intrinsic(_equalsB, java_util_Arrays, equals_name, equalsB_signature, F_S) \ - do_signature(equalsB_signature, "([B[B)Z") \ - \ - do_intrinsic(_compressStringC, java_lang_StringUTF16, compress_name, encodeISOArray_signature, F_S) \ - do_name( compress_name, "compress") \ - do_intrinsic(_compressStringB, java_lang_StringUTF16, compress_name, indexOfI_signature, F_S) \ - do_intrinsic(_inflateStringC, java_lang_StringLatin1, inflate_name, inflateC_signature, F_S) \ - do_name( inflate_name, "inflate") \ - do_signature(inflateC_signature, "([BI[CII)V") \ - do_intrinsic(_inflateStringB, java_lang_StringLatin1, inflate_name, inflateB_signature, F_S) \ - do_signature(inflateB_signature, "([BI[BII)V") \ - do_intrinsic(_toBytesStringU, java_lang_StringUTF16, toBytes_name, toBytesU_signature, F_S) \ - do_name( toBytes_name, "toBytes") \ - do_signature(toBytesU_signature, "([CII)[B") \ - do_intrinsic(_getCharsStringU, java_lang_StringUTF16, getCharsU_name, getCharsU_signature, F_S) \ - do_name( getCharsU_name, "getChars") \ - do_signature(getCharsU_signature, "([BII[CI)V") \ - do_intrinsic(_getCharStringU, java_lang_StringUTF16, getChar_name, getCharStringU_signature, F_S) \ - do_signature(getCharStringU_signature, "([BI)C") \ - do_intrinsic(_putCharStringU, java_lang_StringUTF16, putChar_name, putCharStringU_signature, F_S) \ - do_signature(putCharStringU_signature, "([BII)V") \ - do_intrinsic(_compareToL, java_lang_StringLatin1,compareTo_name, compareTo_indexOf_signature, F_S) \ - do_intrinsic(_compareToU, java_lang_StringUTF16, compareTo_name, compareTo_indexOf_signature, F_S) \ - do_intrinsic(_compareToLU, java_lang_StringLatin1,compareToLU_name, compareTo_indexOf_signature, F_S) \ - do_intrinsic(_compareToUL, java_lang_StringUTF16, compareToUL_name, compareTo_indexOf_signature, F_S) \ - do_signature(compareTo_indexOf_signature, "([B[B)I") \ - do_name( compareTo_name, "compareTo") \ - do_name( compareToLU_name, "compareToUTF16") \ - do_name( compareToUL_name, "compareToLatin1") \ - do_intrinsic(_indexOfL, java_lang_StringLatin1,indexOf_name, compareTo_indexOf_signature, F_S) \ - do_intrinsic(_indexOfU, java_lang_StringUTF16, indexOf_name, compareTo_indexOf_signature, F_S) \ - do_intrinsic(_indexOfUL, java_lang_StringUTF16, indexOfUL_name, compareTo_indexOf_signature, F_S) \ - do_intrinsic(_indexOfIL, java_lang_StringLatin1,indexOf_name, indexOfI_signature, F_S) \ - do_intrinsic(_indexOfIU, java_lang_StringUTF16, indexOf_name, indexOfI_signature, F_S) \ - do_intrinsic(_indexOfIUL, java_lang_StringUTF16, indexOfUL_name, indexOfI_signature, F_S) \ - do_intrinsic(_indexOfU_char, java_lang_StringUTF16, indexOfChar_name, indexOfChar_signature, F_S) \ - do_name( indexOf_name, "indexOf") \ - do_name( indexOfChar_name, "indexOfChar") \ - do_name( indexOfUL_name, "indexOfLatin1") \ - do_signature(indexOfI_signature, "([BI[BII)I") \ - do_signature(indexOfChar_signature, "([BIII)I") \ - do_intrinsic(_equalsL, java_lang_StringLatin1,equals_name, equalsB_signature, F_S) \ - do_intrinsic(_equalsU, java_lang_StringUTF16, equals_name, equalsB_signature, F_S) \ - \ - do_intrinsic(_isDigit, java_lang_CharacterDataLatin1, isDigit_name, int_bool_signature, F_R) \ - do_name( isDigit_name, "isDigit") \ - do_intrinsic(_isLowerCase, java_lang_CharacterDataLatin1, isLowerCase_name, int_bool_signature, F_R) \ - do_name( isLowerCase_name, "isLowerCase") \ - do_intrinsic(_isUpperCase, java_lang_CharacterDataLatin1, isUpperCase_name, int_bool_signature, F_R) \ - do_name( isUpperCase_name, "isUpperCase") \ - do_intrinsic(_isWhitespace, java_lang_CharacterDataLatin1, isWhitespace_name, int_bool_signature, F_R) \ - do_name( isWhitespace_name, "isWhitespace") \ - \ - do_intrinsic(_Preconditions_checkIndex, jdk_internal_util_Preconditions, checkIndex_name, Preconditions_checkIndex_signature, F_S) \ - do_signature(Preconditions_checkIndex_signature, "(IILjava/util/function/BiFunction;)I") \ - \ - do_class(java_nio_Buffer, "java/nio/Buffer") \ - do_intrinsic(_checkIndex, java_nio_Buffer, checkIndex_name, int_int_signature, F_R) \ - do_name( checkIndex_name, "checkIndex") \ - \ - do_class(java_lang_StringCoding, "java/lang/StringCoding") \ - do_intrinsic(_hasNegatives, java_lang_StringCoding, hasNegatives_name, hasNegatives_signature, F_S) \ - do_name( hasNegatives_name, "hasNegatives") \ - do_signature(hasNegatives_signature, "([BII)Z") \ - \ - do_class(sun_nio_cs_iso8859_1_Encoder, "sun/nio/cs/ISO_8859_1$Encoder") \ - do_intrinsic(_encodeISOArray, sun_nio_cs_iso8859_1_Encoder, encodeISOArray_name, encodeISOArray_signature, F_S) \ - do_name( encodeISOArray_name, "implEncodeISOArray") \ - do_signature(encodeISOArray_signature, "([CI[BII)I") \ - \ - do_intrinsic(_encodeByteISOArray, java_lang_StringCoding, encodeISOArray_name, indexOfI_signature, F_S) \ - \ - do_class(java_math_BigInteger, "java/math/BigInteger") \ - do_intrinsic(_multiplyToLen, java_math_BigInteger, multiplyToLen_name, multiplyToLen_signature, F_S) \ - do_name( multiplyToLen_name, "implMultiplyToLen") \ - do_signature(multiplyToLen_signature, "([II[II[I)[I") \ - \ - do_intrinsic(_squareToLen, java_math_BigInteger, squareToLen_name, squareToLen_signature, F_S) \ - do_name( squareToLen_name, "implSquareToLen") \ - do_signature(squareToLen_signature, "([II[II)[I") \ - \ - do_intrinsic(_mulAdd, java_math_BigInteger, mulAdd_name, mulAdd_signature, F_S) \ - do_name( mulAdd_name, "implMulAdd") \ - do_signature(mulAdd_signature, "([I[IIII)I") \ - \ - do_intrinsic(_montgomeryMultiply, java_math_BigInteger, montgomeryMultiply_name, montgomeryMultiply_signature, F_S) \ - do_name( montgomeryMultiply_name, "implMontgomeryMultiply") \ - do_signature(montgomeryMultiply_signature, "([I[I[IIJ[I)[I") \ - \ - do_intrinsic(_montgomerySquare, java_math_BigInteger, montgomerySquare_name, montgomerySquare_signature, F_S) \ - do_name( montgomerySquare_name, "implMontgomerySquare") \ - do_signature(montgomerySquare_signature, "([I[IIJ[I)[I") \ - \ - do_intrinsic(_bigIntegerRightShiftWorker, java_math_BigInteger, rightShift_name, big_integer_shift_worker_signature, F_S) \ - do_name( rightShift_name, "shiftRightImplWorker") \ - \ - do_intrinsic(_bigIntegerLeftShiftWorker, java_math_BigInteger, leftShift_name, big_integer_shift_worker_signature, F_S) \ - do_name( leftShift_name, "shiftLeftImplWorker") \ - \ - do_class(jdk_internal_util_ArraysSupport, "jdk/internal/util/ArraysSupport") \ - do_intrinsic(_vectorizedMismatch, jdk_internal_util_ArraysSupport, vectorizedMismatch_name, vectorizedMismatch_signature, F_S)\ - do_name(vectorizedMismatch_name, "vectorizedMismatch") \ - do_signature(vectorizedMismatch_signature, "(Ljava/lang/Object;JLjava/lang/Object;JII)I") \ - \ - /* java/lang/ref/Reference */ \ - do_intrinsic(_Reference_get, java_lang_ref_Reference, get_name, void_object_signature, F_R) \ - \ - /* support for com.sun.crypto.provider.AESCrypt and some of its callers */ \ - do_class(com_sun_crypto_provider_aescrypt, "com/sun/crypto/provider/AESCrypt") \ - do_intrinsic(_aescrypt_encryptBlock, com_sun_crypto_provider_aescrypt, encryptBlock_name, byteArray_int_byteArray_int_signature, F_R) \ - do_intrinsic(_aescrypt_decryptBlock, com_sun_crypto_provider_aescrypt, decryptBlock_name, byteArray_int_byteArray_int_signature, F_R) \ - do_name( encryptBlock_name, "implEncryptBlock") \ - do_name( decryptBlock_name, "implDecryptBlock") \ - do_signature(byteArray_int_byteArray_int_signature, "([BI[BI)V") \ - \ - do_class(com_sun_crypto_provider_cipherBlockChaining, "com/sun/crypto/provider/CipherBlockChaining") \ - do_intrinsic(_cipherBlockChaining_encryptAESCrypt, com_sun_crypto_provider_cipherBlockChaining, encrypt_name, byteArray_int_int_byteArray_int_signature, F_R) \ - do_intrinsic(_cipherBlockChaining_decryptAESCrypt, com_sun_crypto_provider_cipherBlockChaining, decrypt_name, byteArray_int_int_byteArray_int_signature, F_R) \ - do_name( encrypt_name, "implEncrypt") \ - do_name( decrypt_name, "implDecrypt") \ - do_signature(byteArray_int_int_byteArray_int_signature, "([BII[BI)I") \ - \ - do_class(com_sun_crypto_provider_electronicCodeBook, "com/sun/crypto/provider/ElectronicCodeBook") \ - do_intrinsic(_electronicCodeBook_encryptAESCrypt, com_sun_crypto_provider_electronicCodeBook, ecb_encrypt_name, byteArray_int_int_byteArray_int_signature, F_R) \ - do_intrinsic(_electronicCodeBook_decryptAESCrypt, com_sun_crypto_provider_electronicCodeBook, ecb_decrypt_name, byteArray_int_int_byteArray_int_signature, F_R) \ - do_name(ecb_encrypt_name, "implECBEncrypt") \ - do_name(ecb_decrypt_name, "implECBDecrypt") \ - \ - do_class(com_sun_crypto_provider_counterMode, "com/sun/crypto/provider/CounterMode") \ - do_intrinsic(_counterMode_AESCrypt, com_sun_crypto_provider_counterMode, crypt_name, byteArray_int_int_byteArray_int_signature, F_R) \ - do_name( crypt_name, "implCrypt") \ - \ - /* support for sun.security.provider.MD5 */ \ - do_class(sun_security_provider_md5, "sun/security/provider/MD5") \ - do_intrinsic(_md5_implCompress, sun_security_provider_md5, implCompress_name, implCompress_signature, F_R) \ - do_name( implCompress_name, "implCompress0") \ - do_signature(implCompress_signature, "([BI)V") \ - \ - /* support for sun.security.provider.SHA */ \ - do_class(sun_security_provider_sha, "sun/security/provider/SHA") \ - do_intrinsic(_sha_implCompress, sun_security_provider_sha, implCompress_name, implCompress_signature, F_R) \ - \ - /* support for sun.security.provider.SHA2 */ \ - do_class(sun_security_provider_sha2, "sun/security/provider/SHA2") \ - do_intrinsic(_sha2_implCompress, sun_security_provider_sha2, implCompress_name, implCompress_signature, F_R) \ - \ - /* support for sun.security.provider.SHA5 */ \ - do_class(sun_security_provider_sha5, "sun/security/provider/SHA5") \ - do_intrinsic(_sha5_implCompress, sun_security_provider_sha5, implCompress_name, implCompress_signature, F_R) \ - \ - /* support for sun.security.provider.DigestBase */ \ - do_class(sun_security_provider_digestbase, "sun/security/provider/DigestBase") \ - do_intrinsic(_digestBase_implCompressMB, sun_security_provider_digestbase, implCompressMB_name, implCompressMB_signature, F_R) \ - do_name( implCompressMB_name, "implCompressMultiBlock0") \ - do_signature(implCompressMB_signature, "([BII)I") \ - \ - /* support for java.util.Base64.Encoder*/ \ - do_class(java_util_Base64_Encoder, "java/util/Base64$Encoder") \ - do_intrinsic(_base64_encodeBlock, java_util_Base64_Encoder, encodeBlock_name, encodeBlock_signature, F_R) \ - do_name(encodeBlock_name, "encodeBlock") \ - do_signature(encodeBlock_signature, "([BII[BIZ)V") \ - \ - /* support for com.sun.crypto.provider.GHASH */ \ - do_class(com_sun_crypto_provider_ghash, "com/sun/crypto/provider/GHASH") \ - do_intrinsic(_ghash_processBlocks, com_sun_crypto_provider_ghash, processBlocks_name, ghash_processBlocks_signature, F_S) \ - do_name(processBlocks_name, "processBlocks") \ - do_signature(ghash_processBlocks_signature, "([BII[J[J)V") \ - \ - /* support for java.util.zip */ \ - do_class(java_util_zip_CRC32, "java/util/zip/CRC32") \ - do_intrinsic(_updateCRC32, java_util_zip_CRC32, update_name, int2_int_signature, F_SN) \ - do_name( update_name, "update") \ - do_intrinsic(_updateBytesCRC32, java_util_zip_CRC32, updateBytes_name, updateBytes_signature, F_SN) \ - do_name( updateBytes_name, "updateBytes0") \ - do_signature(updateBytes_signature, "(I[BII)I") \ - do_intrinsic(_updateByteBufferCRC32, java_util_zip_CRC32, updateByteBuffer_name, updateByteBuffer_signature, F_SN) \ - do_name( updateByteBuffer_name, "updateByteBuffer0") \ - do_signature(updateByteBuffer_signature, "(IJII)I") \ - \ - /* support for java.util.zip.CRC32C */ \ - do_class(java_util_zip_CRC32C, "java/util/zip/CRC32C") \ - do_intrinsic(_updateBytesCRC32C, java_util_zip_CRC32C, updateBytes_C_name, updateBytes_signature, F_S) \ - do_name( updateBytes_C_name, "updateBytes") \ - do_intrinsic(_updateDirectByteBufferCRC32C, java_util_zip_CRC32C, updateDirectByteBuffer_C_name, updateByteBuffer_signature, F_S) \ - do_name( updateDirectByteBuffer_C_name, "updateDirectByteBuffer") \ - \ - /* support for java.util.zip.Adler32 */ \ - do_class(java_util_zip_Adler32, "java/util/zip/Adler32") \ - do_intrinsic(_updateBytesAdler32, java_util_zip_Adler32, updateBytes_C_name, updateBytes_signature, F_SN) \ - do_intrinsic(_updateByteBufferAdler32, java_util_zip_Adler32, updateByteBuffer_A_name, updateByteBuffer_signature, F_SN) \ - do_name( updateByteBuffer_A_name, "updateByteBuffer") \ - \ - /* support for UnsafeConstants */ \ - do_class(jdk_internal_misc_UnsafeConstants, "jdk/internal/misc/UnsafeConstants") \ - \ - /* support for Unsafe */ \ - do_class(jdk_internal_misc_Unsafe, "jdk/internal/misc/Unsafe") \ - do_class(sun_misc_Unsafe, "sun/misc/Unsafe") \ - \ - do_intrinsic(_writeback0, jdk_internal_misc_Unsafe, writeback0_name, long_void_signature , F_RN) \ - do_name( writeback0_name, "writeback0") \ - do_intrinsic(_writebackPreSync0, jdk_internal_misc_Unsafe, writebackPreSync0_name, void_method_signature , F_RN) \ - do_name( writebackPreSync0_name, "writebackPreSync0") \ - do_intrinsic(_writebackPostSync0, jdk_internal_misc_Unsafe, writebackPostSync0_name, void_method_signature , F_RN) \ - do_name( writebackPostSync0_name, "writebackPostSync0") \ - do_intrinsic(_allocateInstance, jdk_internal_misc_Unsafe, allocateInstance_name, allocateInstance_signature, F_RN) \ - do_name( allocateInstance_name, "allocateInstance") \ - do_signature(allocateInstance_signature, "(Ljava/lang/Class;)Ljava/lang/Object;") \ - do_intrinsic(_allocateUninitializedArray, jdk_internal_misc_Unsafe, allocateUninitializedArray_name, newArray_signature, F_R) \ - do_name( allocateUninitializedArray_name, "allocateUninitializedArray0") \ - do_intrinsic(_copyMemory, jdk_internal_misc_Unsafe, copyMemory_name, copyMemory_signature, F_RN) \ - do_name( copyMemory_name, "copyMemory0") \ - do_signature(copyMemory_signature, "(Ljava/lang/Object;JLjava/lang/Object;JJ)V") \ - do_intrinsic(_loadFence, jdk_internal_misc_Unsafe, loadFence_name, loadFence_signature, F_RN) \ - do_name( loadFence_name, "loadFence") \ - do_alias( loadFence_signature, void_method_signature) \ - do_intrinsic(_storeFence, jdk_internal_misc_Unsafe, storeFence_name, storeFence_signature, F_RN) \ - do_name( storeFence_name, "storeFence") \ - do_alias( storeFence_signature, void_method_signature) \ - do_intrinsic(_fullFence, jdk_internal_misc_Unsafe, fullFence_name, fullFence_signature, F_RN) \ - do_name( fullFence_name, "fullFence") \ - do_alias( fullFence_signature, void_method_signature) \ - \ - /* Custom branch frequencies profiling support for JSR292 */ \ - do_class(java_lang_invoke_MethodHandleImpl, "java/lang/invoke/MethodHandleImpl") \ - do_intrinsic(_profileBoolean, java_lang_invoke_MethodHandleImpl, profileBoolean_name, profileBoolean_signature, F_S) \ - do_name( profileBoolean_name, "profileBoolean") \ - do_signature(profileBoolean_signature, "(Z[I)Z") \ - do_intrinsic(_isCompileConstant, java_lang_invoke_MethodHandleImpl, isCompileConstant_name, isCompileConstant_signature, F_S) \ - do_name( isCompileConstant_name, "isCompileConstant") \ - do_alias( isCompileConstant_signature, object_boolean_signature) \ - \ - /* unsafe memory references (there are a lot of them...) */ \ - do_signature(getReference_signature, "(Ljava/lang/Object;J)Ljava/lang/Object;") \ - do_signature(putReference_signature, "(Ljava/lang/Object;JLjava/lang/Object;)V") \ - do_signature(getBoolean_signature, "(Ljava/lang/Object;J)Z") \ - do_signature(putBoolean_signature, "(Ljava/lang/Object;JZ)V") \ - do_signature(getByte_signature, "(Ljava/lang/Object;J)B") \ - do_signature(putByte_signature, "(Ljava/lang/Object;JB)V") \ - do_signature(getShort_signature, "(Ljava/lang/Object;J)S") \ - do_signature(putShort_signature, "(Ljava/lang/Object;JS)V") \ - do_signature(getChar_signature, "(Ljava/lang/Object;J)C") \ - do_signature(putChar_signature, "(Ljava/lang/Object;JC)V") \ - do_signature(getInt_signature, "(Ljava/lang/Object;J)I") \ - do_signature(putInt_signature, "(Ljava/lang/Object;JI)V") \ - do_signature(getLong_signature, "(Ljava/lang/Object;J)J") \ - do_signature(putLong_signature, "(Ljava/lang/Object;JJ)V") \ - do_signature(getFloat_signature, "(Ljava/lang/Object;J)F") \ - do_signature(putFloat_signature, "(Ljava/lang/Object;JF)V") \ - do_signature(getDouble_signature, "(Ljava/lang/Object;J)D") \ - do_signature(putDouble_signature, "(Ljava/lang/Object;JD)V") \ - do_signature(getValue_signature, "(Ljava/lang/Object;JLjava/lang/Class;)Ljava/lang/Object;") \ - do_signature(putValue_signature, "(Ljava/lang/Object;JLjava/lang/Class;Ljava/lang/Object;)V") \ - \ - do_name(getReference_name,"getReference") do_name(putReference_name,"putReference") \ - do_name(getBoolean_name,"getBoolean") do_name(putBoolean_name,"putBoolean") \ - do_name(getByte_name,"getByte") do_name(putByte_name,"putByte") \ - do_name(getShort_name,"getShort") do_name(putShort_name,"putShort") \ - do_name(getChar_name,"getChar") do_name(putChar_name,"putChar") \ - do_name(getInt_name,"getInt") do_name(putInt_name,"putInt") \ - do_name(getLong_name,"getLong") do_name(putLong_name,"putLong") \ - do_name(getFloat_name,"getFloat") do_name(putFloat_name,"putFloat") \ - do_name(getDouble_name,"getDouble") do_name(putDouble_name,"putDouble") \ - do_name(getValue_name,"getValue") do_name(putValue_name,"putValue") \ - do_name(makePrivateBuffer_name,"makePrivateBuffer") \ - do_name(finishPrivateBuffer_name,"finishPrivateBuffer") \ - \ - do_intrinsic(_getReference, jdk_internal_misc_Unsafe, getReference_name, getReference_signature, F_RN) \ - do_intrinsic(_getBoolean, jdk_internal_misc_Unsafe, getBoolean_name, getBoolean_signature, F_RN) \ - do_intrinsic(_getByte, jdk_internal_misc_Unsafe, getByte_name, getByte_signature, F_RN) \ - do_intrinsic(_getShort, jdk_internal_misc_Unsafe, getShort_name, getShort_signature, F_RN) \ - do_intrinsic(_getChar, jdk_internal_misc_Unsafe, getChar_name, getChar_signature, F_RN) \ - do_intrinsic(_getInt, jdk_internal_misc_Unsafe, getInt_name, getInt_signature, F_RN) \ - do_intrinsic(_getLong, jdk_internal_misc_Unsafe, getLong_name, getLong_signature, F_RN) \ - do_intrinsic(_getFloat, jdk_internal_misc_Unsafe, getFloat_name, getFloat_signature, F_RN) \ - do_intrinsic(_getDouble, jdk_internal_misc_Unsafe, getDouble_name, getDouble_signature, F_RN) \ - do_intrinsic(_getValue, jdk_internal_misc_Unsafe, getValue_name, getValue_signature, F_RN) \ - do_intrinsic(_putReference, jdk_internal_misc_Unsafe, putReference_name, putReference_signature, F_RN) \ - do_intrinsic(_putBoolean, jdk_internal_misc_Unsafe, putBoolean_name, putBoolean_signature, F_RN) \ - do_intrinsic(_putByte, jdk_internal_misc_Unsafe, putByte_name, putByte_signature, F_RN) \ - do_intrinsic(_putShort, jdk_internal_misc_Unsafe, putShort_name, putShort_signature, F_RN) \ - do_intrinsic(_putChar, jdk_internal_misc_Unsafe, putChar_name, putChar_signature, F_RN) \ - do_intrinsic(_putInt, jdk_internal_misc_Unsafe, putInt_name, putInt_signature, F_RN) \ - do_intrinsic(_putLong, jdk_internal_misc_Unsafe, putLong_name, putLong_signature, F_RN) \ - do_intrinsic(_putFloat, jdk_internal_misc_Unsafe, putFloat_name, putFloat_signature, F_RN) \ - do_intrinsic(_putDouble, jdk_internal_misc_Unsafe, putDouble_name, putDouble_signature, F_RN) \ - do_intrinsic(_putValue, jdk_internal_misc_Unsafe, putValue_name, putValue_signature, F_RN) \ - \ - do_intrinsic(_makePrivateBuffer, jdk_internal_misc_Unsafe, makePrivateBuffer_name, object_object_signature, F_RN) \ - do_intrinsic(_finishPrivateBuffer, jdk_internal_misc_Unsafe, finishPrivateBuffer_name, object_object_signature, F_RN) \ - \ - do_name(getReferenceVolatile_name,"getReferenceVolatile") do_name(putReferenceVolatile_name,"putReferenceVolatile") \ - do_name(getBooleanVolatile_name,"getBooleanVolatile") do_name(putBooleanVolatile_name,"putBooleanVolatile") \ - do_name(getByteVolatile_name,"getByteVolatile") do_name(putByteVolatile_name,"putByteVolatile") \ - do_name(getShortVolatile_name,"getShortVolatile") do_name(putShortVolatile_name,"putShortVolatile") \ - do_name(getCharVolatile_name,"getCharVolatile") do_name(putCharVolatile_name,"putCharVolatile") \ - do_name(getIntVolatile_name,"getIntVolatile") do_name(putIntVolatile_name,"putIntVolatile") \ - do_name(getLongVolatile_name,"getLongVolatile") do_name(putLongVolatile_name,"putLongVolatile") \ - do_name(getFloatVolatile_name,"getFloatVolatile") do_name(putFloatVolatile_name,"putFloatVolatile") \ - do_name(getDoubleVolatile_name,"getDoubleVolatile") do_name(putDoubleVolatile_name,"putDoubleVolatile") \ - \ - do_intrinsic(_getReferenceVolatile, jdk_internal_misc_Unsafe, getReferenceVolatile_name, getReference_signature, F_RN) \ - do_intrinsic(_getBooleanVolatile, jdk_internal_misc_Unsafe, getBooleanVolatile_name, getBoolean_signature, F_RN) \ - do_intrinsic(_getByteVolatile, jdk_internal_misc_Unsafe, getByteVolatile_name, getByte_signature, F_RN) \ - do_intrinsic(_getShortVolatile, jdk_internal_misc_Unsafe, getShortVolatile_name, getShort_signature, F_RN) \ - do_intrinsic(_getCharVolatile, jdk_internal_misc_Unsafe, getCharVolatile_name, getChar_signature, F_RN) \ - do_intrinsic(_getIntVolatile, jdk_internal_misc_Unsafe, getIntVolatile_name, getInt_signature, F_RN) \ - do_intrinsic(_getLongVolatile, jdk_internal_misc_Unsafe, getLongVolatile_name, getLong_signature, F_RN) \ - do_intrinsic(_getFloatVolatile, jdk_internal_misc_Unsafe, getFloatVolatile_name, getFloat_signature, F_RN) \ - do_intrinsic(_getDoubleVolatile, jdk_internal_misc_Unsafe, getDoubleVolatile_name, getDouble_signature, F_RN) \ - do_intrinsic(_putReferenceVolatile, jdk_internal_misc_Unsafe, putReferenceVolatile_name, putReference_signature, F_RN) \ - do_intrinsic(_putBooleanVolatile, jdk_internal_misc_Unsafe, putBooleanVolatile_name, putBoolean_signature, F_RN) \ - do_intrinsic(_putByteVolatile, jdk_internal_misc_Unsafe, putByteVolatile_name, putByte_signature, F_RN) \ - do_intrinsic(_putShortVolatile, jdk_internal_misc_Unsafe, putShortVolatile_name, putShort_signature, F_RN) \ - do_intrinsic(_putCharVolatile, jdk_internal_misc_Unsafe, putCharVolatile_name, putChar_signature, F_RN) \ - do_intrinsic(_putIntVolatile, jdk_internal_misc_Unsafe, putIntVolatile_name, putInt_signature, F_RN) \ - do_intrinsic(_putLongVolatile, jdk_internal_misc_Unsafe, putLongVolatile_name, putLong_signature, F_RN) \ - do_intrinsic(_putFloatVolatile, jdk_internal_misc_Unsafe, putFloatVolatile_name, putFloat_signature, F_RN) \ - do_intrinsic(_putDoubleVolatile, jdk_internal_misc_Unsafe, putDoubleVolatile_name, putDouble_signature, F_RN) \ - \ - do_name(getReferenceOpaque_name,"getReferenceOpaque") do_name(putReferenceOpaque_name,"putReferenceOpaque") \ - do_name(getBooleanOpaque_name,"getBooleanOpaque") do_name(putBooleanOpaque_name,"putBooleanOpaque") \ - do_name(getByteOpaque_name,"getByteOpaque") do_name(putByteOpaque_name,"putByteOpaque") \ - do_name(getShortOpaque_name,"getShortOpaque") do_name(putShortOpaque_name,"putShortOpaque") \ - do_name(getCharOpaque_name,"getCharOpaque") do_name(putCharOpaque_name,"putCharOpaque") \ - do_name(getIntOpaque_name,"getIntOpaque") do_name(putIntOpaque_name,"putIntOpaque") \ - do_name(getLongOpaque_name,"getLongOpaque") do_name(putLongOpaque_name,"putLongOpaque") \ - do_name(getFloatOpaque_name,"getFloatOpaque") do_name(putFloatOpaque_name,"putFloatOpaque") \ - do_name(getDoubleOpaque_name,"getDoubleOpaque") do_name(putDoubleOpaque_name,"putDoubleOpaque") \ - \ - do_intrinsic(_getReferenceOpaque, jdk_internal_misc_Unsafe, getReferenceOpaque_name, getReference_signature, F_R) \ - do_intrinsic(_getBooleanOpaque, jdk_internal_misc_Unsafe, getBooleanOpaque_name, getBoolean_signature, F_R) \ - do_intrinsic(_getByteOpaque, jdk_internal_misc_Unsafe, getByteOpaque_name, getByte_signature, F_R) \ - do_intrinsic(_getShortOpaque, jdk_internal_misc_Unsafe, getShortOpaque_name, getShort_signature, F_R) \ - do_intrinsic(_getCharOpaque, jdk_internal_misc_Unsafe, getCharOpaque_name, getChar_signature, F_R) \ - do_intrinsic(_getIntOpaque, jdk_internal_misc_Unsafe, getIntOpaque_name, getInt_signature, F_R) \ - do_intrinsic(_getLongOpaque, jdk_internal_misc_Unsafe, getLongOpaque_name, getLong_signature, F_R) \ - do_intrinsic(_getFloatOpaque, jdk_internal_misc_Unsafe, getFloatOpaque_name, getFloat_signature, F_R) \ - do_intrinsic(_getDoubleOpaque, jdk_internal_misc_Unsafe, getDoubleOpaque_name, getDouble_signature, F_R) \ - do_intrinsic(_putReferenceOpaque, jdk_internal_misc_Unsafe, putReferenceOpaque_name, putReference_signature, F_R) \ - do_intrinsic(_putBooleanOpaque, jdk_internal_misc_Unsafe, putBooleanOpaque_name, putBoolean_signature, F_R) \ - do_intrinsic(_putByteOpaque, jdk_internal_misc_Unsafe, putByteOpaque_name, putByte_signature, F_R) \ - do_intrinsic(_putShortOpaque, jdk_internal_misc_Unsafe, putShortOpaque_name, putShort_signature, F_R) \ - do_intrinsic(_putCharOpaque, jdk_internal_misc_Unsafe, putCharOpaque_name, putChar_signature, F_R) \ - do_intrinsic(_putIntOpaque, jdk_internal_misc_Unsafe, putIntOpaque_name, putInt_signature, F_R) \ - do_intrinsic(_putLongOpaque, jdk_internal_misc_Unsafe, putLongOpaque_name, putLong_signature, F_R) \ - do_intrinsic(_putFloatOpaque, jdk_internal_misc_Unsafe, putFloatOpaque_name, putFloat_signature, F_R) \ - do_intrinsic(_putDoubleOpaque, jdk_internal_misc_Unsafe, putDoubleOpaque_name, putDouble_signature, F_R) \ - \ - do_name(getReferenceAcquire_name, "getReferenceAcquire") do_name(putReferenceRelease_name, "putReferenceRelease") \ - do_name(getBooleanAcquire_name, "getBooleanAcquire") do_name(putBooleanRelease_name, "putBooleanRelease") \ - do_name(getByteAcquire_name, "getByteAcquire") do_name(putByteRelease_name, "putByteRelease") \ - do_name(getShortAcquire_name, "getShortAcquire") do_name(putShortRelease_name, "putShortRelease") \ - do_name(getCharAcquire_name, "getCharAcquire") do_name(putCharRelease_name, "putCharRelease") \ - do_name(getIntAcquire_name, "getIntAcquire") do_name(putIntRelease_name, "putIntRelease") \ - do_name(getLongAcquire_name, "getLongAcquire") do_name(putLongRelease_name, "putLongRelease") \ - do_name(getFloatAcquire_name, "getFloatAcquire") do_name(putFloatRelease_name, "putFloatRelease") \ - do_name(getDoubleAcquire_name, "getDoubleAcquire") do_name(putDoubleRelease_name, "putDoubleRelease") \ - \ - do_intrinsic(_getReferenceAcquire, jdk_internal_misc_Unsafe, getReferenceAcquire_name, getReference_signature, F_R) \ - do_intrinsic(_getBooleanAcquire, jdk_internal_misc_Unsafe, getBooleanAcquire_name, getBoolean_signature, F_R) \ - do_intrinsic(_getByteAcquire, jdk_internal_misc_Unsafe, getByteAcquire_name, getByte_signature, F_R) \ - do_intrinsic(_getShortAcquire, jdk_internal_misc_Unsafe, getShortAcquire_name, getShort_signature, F_R) \ - do_intrinsic(_getCharAcquire, jdk_internal_misc_Unsafe, getCharAcquire_name, getChar_signature, F_R) \ - do_intrinsic(_getIntAcquire, jdk_internal_misc_Unsafe, getIntAcquire_name, getInt_signature, F_R) \ - do_intrinsic(_getLongAcquire, jdk_internal_misc_Unsafe, getLongAcquire_name, getLong_signature, F_R) \ - do_intrinsic(_getFloatAcquire, jdk_internal_misc_Unsafe, getFloatAcquire_name, getFloat_signature, F_R) \ - do_intrinsic(_getDoubleAcquire, jdk_internal_misc_Unsafe, getDoubleAcquire_name, getDouble_signature, F_R) \ - do_intrinsic(_putReferenceRelease, jdk_internal_misc_Unsafe, putReferenceRelease_name, putReference_signature, F_R) \ - do_intrinsic(_putBooleanRelease, jdk_internal_misc_Unsafe, putBooleanRelease_name, putBoolean_signature, F_R) \ - do_intrinsic(_putByteRelease, jdk_internal_misc_Unsafe, putByteRelease_name, putByte_signature, F_R) \ - do_intrinsic(_putShortRelease, jdk_internal_misc_Unsafe, putShortRelease_name, putShort_signature, F_R) \ - do_intrinsic(_putCharRelease, jdk_internal_misc_Unsafe, putCharRelease_name, putChar_signature, F_R) \ - do_intrinsic(_putIntRelease, jdk_internal_misc_Unsafe, putIntRelease_name, putInt_signature, F_R) \ - do_intrinsic(_putLongRelease, jdk_internal_misc_Unsafe, putLongRelease_name, putLong_signature, F_R) \ - do_intrinsic(_putFloatRelease, jdk_internal_misc_Unsafe, putFloatRelease_name, putFloat_signature, F_R) \ - do_intrinsic(_putDoubleRelease, jdk_internal_misc_Unsafe, putDoubleRelease_name, putDouble_signature, F_R) \ - \ - do_name(getShortUnaligned_name,"getShortUnaligned") do_name(putShortUnaligned_name,"putShortUnaligned") \ - do_name(getCharUnaligned_name,"getCharUnaligned") do_name(putCharUnaligned_name,"putCharUnaligned") \ - do_name(getIntUnaligned_name,"getIntUnaligned") do_name(putIntUnaligned_name,"putIntUnaligned") \ - do_name(getLongUnaligned_name,"getLongUnaligned") do_name(putLongUnaligned_name,"putLongUnaligned") \ - \ - do_intrinsic(_getShortUnaligned, jdk_internal_misc_Unsafe, getShortUnaligned_name, getShort_signature, F_R) \ - do_intrinsic(_getCharUnaligned, jdk_internal_misc_Unsafe, getCharUnaligned_name, getChar_signature, F_R) \ - do_intrinsic(_getIntUnaligned, jdk_internal_misc_Unsafe, getIntUnaligned_name, getInt_signature, F_R) \ - do_intrinsic(_getLongUnaligned, jdk_internal_misc_Unsafe, getLongUnaligned_name, getLong_signature, F_R) \ - do_intrinsic(_putShortUnaligned, jdk_internal_misc_Unsafe, putShortUnaligned_name, putShort_signature, F_R) \ - do_intrinsic(_putCharUnaligned, jdk_internal_misc_Unsafe, putCharUnaligned_name, putChar_signature, F_R) \ - do_intrinsic(_putIntUnaligned, jdk_internal_misc_Unsafe, putIntUnaligned_name, putInt_signature, F_R) \ - do_intrinsic(_putLongUnaligned, jdk_internal_misc_Unsafe, putLongUnaligned_name, putLong_signature, F_R) \ - \ - do_signature(compareAndSetReference_signature, "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z") \ - do_signature(compareAndExchangeReference_signature, "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;") \ - do_signature(compareAndSetLong_signature, "(Ljava/lang/Object;JJJ)Z") \ - do_signature(compareAndExchangeLong_signature, "(Ljava/lang/Object;JJJ)J") \ - do_signature(compareAndSetInt_signature, "(Ljava/lang/Object;JII)Z") \ - do_signature(compareAndExchangeInt_signature, "(Ljava/lang/Object;JII)I") \ - do_signature(compareAndSetByte_signature, "(Ljava/lang/Object;JBB)Z") \ - do_signature(compareAndExchangeByte_signature, "(Ljava/lang/Object;JBB)B") \ - do_signature(compareAndSetShort_signature, "(Ljava/lang/Object;JSS)Z") \ - do_signature(compareAndExchangeShort_signature, "(Ljava/lang/Object;JSS)S") \ - \ - do_name(compareAndSetReference_name, "compareAndSetReference") \ - do_name(compareAndExchangeReference_name, "compareAndExchangeReference") \ - do_name(compareAndExchangeReferenceAcquire_name, "compareAndExchangeReferenceAcquire") \ - do_name(compareAndExchangeReferenceRelease_name, "compareAndExchangeReferenceRelease") \ - do_name(compareAndSetLong_name, "compareAndSetLong") \ - do_name(compareAndExchangeLong_name, "compareAndExchangeLong") \ - do_name(compareAndExchangeLongAcquire_name, "compareAndExchangeLongAcquire") \ - do_name(compareAndExchangeLongRelease_name, "compareAndExchangeLongRelease") \ - do_name(compareAndSetInt_name, "compareAndSetInt") \ - do_name(compareAndExchangeInt_name, "compareAndExchangeInt") \ - do_name(compareAndExchangeIntAcquire_name, "compareAndExchangeIntAcquire") \ - do_name(compareAndExchangeIntRelease_name, "compareAndExchangeIntRelease") \ - do_name(compareAndSetByte_name, "compareAndSetByte") \ - do_name(compareAndExchangeByte_name, "compareAndExchangeByte") \ - do_name(compareAndExchangeByteAcquire_name, "compareAndExchangeByteAcquire") \ - do_name(compareAndExchangeByteRelease_name, "compareAndExchangeByteRelease") \ - do_name(compareAndSetShort_name, "compareAndSetShort") \ - do_name(compareAndExchangeShort_name, "compareAndExchangeShort") \ - do_name(compareAndExchangeShortAcquire_name, "compareAndExchangeShortAcquire") \ - do_name(compareAndExchangeShortRelease_name, "compareAndExchangeShortRelease") \ - \ - do_name(weakCompareAndSetReferencePlain_name, "weakCompareAndSetReferencePlain") \ - do_name(weakCompareAndSetReferenceAcquire_name, "weakCompareAndSetReferenceAcquire") \ - do_name(weakCompareAndSetReferenceRelease_name, "weakCompareAndSetReferenceRelease") \ - do_name(weakCompareAndSetReference_name, "weakCompareAndSetReference") \ - do_name(weakCompareAndSetLongPlain_name, "weakCompareAndSetLongPlain") \ - do_name(weakCompareAndSetLongAcquire_name, "weakCompareAndSetLongAcquire") \ - do_name(weakCompareAndSetLongRelease_name, "weakCompareAndSetLongRelease") \ - do_name(weakCompareAndSetLong_name, "weakCompareAndSetLong") \ - do_name(weakCompareAndSetIntPlain_name, "weakCompareAndSetIntPlain") \ - do_name(weakCompareAndSetIntAcquire_name, "weakCompareAndSetIntAcquire") \ - do_name(weakCompareAndSetIntRelease_name, "weakCompareAndSetIntRelease") \ - do_name(weakCompareAndSetInt_name, "weakCompareAndSetInt") \ - do_name(weakCompareAndSetBytePlain_name, "weakCompareAndSetBytePlain") \ - do_name(weakCompareAndSetByteAcquire_name, "weakCompareAndSetByteAcquire") \ - do_name(weakCompareAndSetByteRelease_name, "weakCompareAndSetByteRelease") \ - do_name(weakCompareAndSetByte_name, "weakCompareAndSetByte") \ - do_name(weakCompareAndSetShortPlain_name, "weakCompareAndSetShortPlain") \ - do_name(weakCompareAndSetShortAcquire_name, "weakCompareAndSetShortAcquire") \ - do_name(weakCompareAndSetShortRelease_name, "weakCompareAndSetShortRelease") \ - do_name(weakCompareAndSetShort_name, "weakCompareAndSetShort") \ - \ - do_intrinsic(_compareAndSetReference, jdk_internal_misc_Unsafe, compareAndSetReference_name, compareAndSetReference_signature, F_RN) \ - do_intrinsic(_compareAndExchangeReference, jdk_internal_misc_Unsafe, compareAndExchangeReference_name, compareAndExchangeReference_signature, F_RN) \ - do_intrinsic(_compareAndExchangeReferenceAcquire, jdk_internal_misc_Unsafe, compareAndExchangeReferenceAcquire_name, compareAndExchangeReference_signature, F_R) \ - do_intrinsic(_compareAndExchangeReferenceRelease, jdk_internal_misc_Unsafe, compareAndExchangeReferenceRelease_name, compareAndExchangeReference_signature, F_R) \ - do_intrinsic(_compareAndSetLong, jdk_internal_misc_Unsafe, compareAndSetLong_name, compareAndSetLong_signature, F_RN) \ - do_intrinsic(_compareAndExchangeLong, jdk_internal_misc_Unsafe, compareAndExchangeLong_name, compareAndExchangeLong_signature, F_RN) \ - do_intrinsic(_compareAndExchangeLongAcquire, jdk_internal_misc_Unsafe, compareAndExchangeLongAcquire_name, compareAndExchangeLong_signature, F_R) \ - do_intrinsic(_compareAndExchangeLongRelease, jdk_internal_misc_Unsafe, compareAndExchangeLongRelease_name, compareAndExchangeLong_signature, F_R) \ - do_intrinsic(_compareAndSetInt, jdk_internal_misc_Unsafe, compareAndSetInt_name, compareAndSetInt_signature, F_RN) \ - do_intrinsic(_compareAndExchangeInt, jdk_internal_misc_Unsafe, compareAndExchangeInt_name, compareAndExchangeInt_signature, F_RN) \ - do_intrinsic(_compareAndExchangeIntAcquire, jdk_internal_misc_Unsafe, compareAndExchangeIntAcquire_name, compareAndExchangeInt_signature, F_R) \ - do_intrinsic(_compareAndExchangeIntRelease, jdk_internal_misc_Unsafe, compareAndExchangeIntRelease_name, compareAndExchangeInt_signature, F_R) \ - do_intrinsic(_compareAndSetByte, jdk_internal_misc_Unsafe, compareAndSetByte_name, compareAndSetByte_signature, F_R) \ - do_intrinsic(_compareAndExchangeByte, jdk_internal_misc_Unsafe, compareAndExchangeByte_name, compareAndExchangeByte_signature, F_R) \ - do_intrinsic(_compareAndExchangeByteAcquire, jdk_internal_misc_Unsafe, compareAndExchangeByteAcquire_name, compareAndExchangeByte_signature, F_R) \ - do_intrinsic(_compareAndExchangeByteRelease, jdk_internal_misc_Unsafe, compareAndExchangeByteRelease_name, compareAndExchangeByte_signature, F_R) \ - do_intrinsic(_compareAndSetShort, jdk_internal_misc_Unsafe, compareAndSetShort_name, compareAndSetShort_signature, F_R) \ - do_intrinsic(_compareAndExchangeShort, jdk_internal_misc_Unsafe, compareAndExchangeShort_name, compareAndExchangeShort_signature, F_R) \ - do_intrinsic(_compareAndExchangeShortAcquire, jdk_internal_misc_Unsafe, compareAndExchangeShortAcquire_name, compareAndExchangeShort_signature, F_R) \ - do_intrinsic(_compareAndExchangeShortRelease, jdk_internal_misc_Unsafe, compareAndExchangeShortRelease_name, compareAndExchangeShort_signature, F_R) \ - \ - do_intrinsic(_weakCompareAndSetReferencePlain, jdk_internal_misc_Unsafe, weakCompareAndSetReferencePlain_name, compareAndSetReference_signature, F_R) \ - do_intrinsic(_weakCompareAndSetReferenceAcquire,jdk_internal_misc_Unsafe, weakCompareAndSetReferenceAcquire_name, compareAndSetReference_signature, F_R) \ - do_intrinsic(_weakCompareAndSetReferenceRelease,jdk_internal_misc_Unsafe, weakCompareAndSetReferenceRelease_name, compareAndSetReference_signature, F_R) \ - do_intrinsic(_weakCompareAndSetReference, jdk_internal_misc_Unsafe, weakCompareAndSetReference_name, compareAndSetReference_signature, F_R) \ - do_intrinsic(_weakCompareAndSetLongPlain, jdk_internal_misc_Unsafe, weakCompareAndSetLongPlain_name, compareAndSetLong_signature, F_R) \ - do_intrinsic(_weakCompareAndSetLongAcquire, jdk_internal_misc_Unsafe, weakCompareAndSetLongAcquire_name, compareAndSetLong_signature, F_R) \ - do_intrinsic(_weakCompareAndSetLongRelease, jdk_internal_misc_Unsafe, weakCompareAndSetLongRelease_name, compareAndSetLong_signature, F_R) \ - do_intrinsic(_weakCompareAndSetLong, jdk_internal_misc_Unsafe, weakCompareAndSetLong_name, compareAndSetLong_signature, F_R) \ - do_intrinsic(_weakCompareAndSetIntPlain, jdk_internal_misc_Unsafe, weakCompareAndSetIntPlain_name, compareAndSetInt_signature, F_R) \ - do_intrinsic(_weakCompareAndSetIntAcquire, jdk_internal_misc_Unsafe, weakCompareAndSetIntAcquire_name, compareAndSetInt_signature, F_R) \ - do_intrinsic(_weakCompareAndSetIntRelease, jdk_internal_misc_Unsafe, weakCompareAndSetIntRelease_name, compareAndSetInt_signature, F_R) \ - do_intrinsic(_weakCompareAndSetInt, jdk_internal_misc_Unsafe, weakCompareAndSetInt_name, compareAndSetInt_signature, F_R) \ - do_intrinsic(_weakCompareAndSetBytePlain, jdk_internal_misc_Unsafe, weakCompareAndSetBytePlain_name, compareAndSetByte_signature, F_R) \ - do_intrinsic(_weakCompareAndSetByteAcquire, jdk_internal_misc_Unsafe, weakCompareAndSetByteAcquire_name, compareAndSetByte_signature, F_R) \ - do_intrinsic(_weakCompareAndSetByteRelease, jdk_internal_misc_Unsafe, weakCompareAndSetByteRelease_name, compareAndSetByte_signature, F_R) \ - do_intrinsic(_weakCompareAndSetByte, jdk_internal_misc_Unsafe, weakCompareAndSetByte_name, compareAndSetByte_signature, F_R) \ - do_intrinsic(_weakCompareAndSetShortPlain, jdk_internal_misc_Unsafe, weakCompareAndSetShortPlain_name, compareAndSetShort_signature, F_R) \ - do_intrinsic(_weakCompareAndSetShortAcquire, jdk_internal_misc_Unsafe, weakCompareAndSetShortAcquire_name, compareAndSetShort_signature, F_R) \ - do_intrinsic(_weakCompareAndSetShortRelease, jdk_internal_misc_Unsafe, weakCompareAndSetShortRelease_name, compareAndSetShort_signature, F_R) \ - do_intrinsic(_weakCompareAndSetShort, jdk_internal_misc_Unsafe, weakCompareAndSetShort_name, compareAndSetShort_signature, F_R) \ - \ - do_intrinsic(_getAndAddInt, jdk_internal_misc_Unsafe, getAndAddInt_name, getAndAddInt_signature, F_R) \ - do_name( getAndAddInt_name, "getAndAddInt") \ - do_signature(getAndAddInt_signature, "(Ljava/lang/Object;JI)I" ) \ - do_intrinsic(_getAndAddLong, jdk_internal_misc_Unsafe, getAndAddLong_name, getAndAddLong_signature, F_R) \ - do_name( getAndAddLong_name, "getAndAddLong") \ - do_signature(getAndAddLong_signature, "(Ljava/lang/Object;JJ)J" ) \ - do_intrinsic(_getAndAddByte, jdk_internal_misc_Unsafe, getAndAddByte_name, getAndAddByte_signature, F_R) \ - do_name( getAndAddByte_name, "getAndAddByte") \ - do_signature(getAndAddByte_signature, "(Ljava/lang/Object;JB)B" ) \ - do_intrinsic(_getAndAddShort, jdk_internal_misc_Unsafe, getAndAddShort_name, getAndAddShort_signature, F_R) \ - do_name( getAndAddShort_name, "getAndAddShort") \ - do_signature(getAndAddShort_signature, "(Ljava/lang/Object;JS)S" ) \ - do_intrinsic(_getAndSetInt, jdk_internal_misc_Unsafe, getAndSetInt_name, getAndSetInt_signature, F_R) \ - do_name( getAndSetInt_name, "getAndSetInt") \ - do_alias( getAndSetInt_signature, /*"(Ljava/lang/Object;JI)I"*/ getAndAddInt_signature) \ - do_intrinsic(_getAndSetLong, jdk_internal_misc_Unsafe, getAndSetLong_name, getAndSetLong_signature, F_R) \ - do_name( getAndSetLong_name, "getAndSetLong") \ - do_alias( getAndSetLong_signature, /*"(Ljava/lang/Object;JJ)J"*/ getAndAddLong_signature) \ - do_intrinsic(_getAndSetByte, jdk_internal_misc_Unsafe, getAndSetByte_name, getAndSetByte_signature, F_R) \ - do_name( getAndSetByte_name, "getAndSetByte") \ - do_alias( getAndSetByte_signature, /*"(Ljava/lang/Object;JB)B"*/ getAndAddByte_signature) \ - do_intrinsic(_getAndSetShort, jdk_internal_misc_Unsafe, getAndSetShort_name, getAndSetShort_signature, F_R) \ - do_name( getAndSetShort_name, "getAndSetShort") \ - do_alias( getAndSetShort_signature, /*"(Ljava/lang/Object;JS)S"*/ getAndAddShort_signature) \ - do_intrinsic(_getAndSetReference, jdk_internal_misc_Unsafe, getAndSetReference_name, getAndSetReference_signature, F_R) \ - do_name( getAndSetReference_name, "getAndSetReference") \ - do_signature(getAndSetReference_signature, "(Ljava/lang/Object;JLjava/lang/Object;)Ljava/lang/Object;" ) \ - \ - /* (2) Bytecode intrinsics */ \ - \ - do_intrinsic(_park, jdk_internal_misc_Unsafe, park_name, park_signature, F_R) \ - do_name( park_name, "park") \ - do_signature(park_signature, "(ZJ)V") \ - do_intrinsic(_unpark, jdk_internal_misc_Unsafe, unpark_name, unpark_signature, F_R) \ - do_name( unpark_name, "unpark") \ - do_alias( unpark_signature, /*(LObject;)V*/ object_void_signature) \ - \ - do_intrinsic(_StringBuilder_void, java_lang_StringBuilder, object_initializer_name, void_method_signature, F_R) \ - do_intrinsic(_StringBuilder_int, java_lang_StringBuilder, object_initializer_name, int_void_signature, F_R) \ - do_intrinsic(_StringBuilder_String, java_lang_StringBuilder, object_initializer_name, string_void_signature, F_R) \ - \ - do_intrinsic(_StringBuilder_append_char, java_lang_StringBuilder, append_name, char_StringBuilder_signature, F_R) \ - do_intrinsic(_StringBuilder_append_int, java_lang_StringBuilder, append_name, int_StringBuilder_signature, F_R) \ - do_intrinsic(_StringBuilder_append_String, java_lang_StringBuilder, append_name, String_StringBuilder_signature, F_R) \ - \ - do_intrinsic(_StringBuilder_toString, java_lang_StringBuilder, toString_name, void_string_signature, F_R) \ - \ - do_intrinsic(_StringBuffer_void, java_lang_StringBuffer, object_initializer_name, void_method_signature, F_R) \ - do_intrinsic(_StringBuffer_int, java_lang_StringBuffer, object_initializer_name, int_void_signature, F_R) \ - do_intrinsic(_StringBuffer_String, java_lang_StringBuffer, object_initializer_name, string_void_signature, F_R) \ - \ - do_intrinsic(_StringBuffer_append_char, java_lang_StringBuffer, append_name, char_StringBuffer_signature, F_Y) \ - do_intrinsic(_StringBuffer_append_int, java_lang_StringBuffer, append_name, int_StringBuffer_signature, F_Y) \ - do_intrinsic(_StringBuffer_append_String, java_lang_StringBuffer, append_name, String_StringBuffer_signature, F_Y) \ - \ - do_intrinsic(_StringBuffer_toString, java_lang_StringBuffer, toString_name, void_string_signature, F_Y) \ - \ - do_intrinsic(_Integer_toString, java_lang_Integer, toString_name, int_String_signature, F_S) \ - \ - do_intrinsic(_String_String, java_lang_String, object_initializer_name, string_void_signature, F_R) \ - \ - do_intrinsic(_Object_init, java_lang_Object, object_initializer_name, void_method_signature, F_R) \ - /* (symbol object_initializer_name defined above) */ \ - \ - do_intrinsic(_invoke, java_lang_reflect_Method, invoke_name, object_object_array_object_signature, F_R) \ - /* (symbols invoke_name and invoke_signature defined above) */ \ - /* the polymorphic MH intrinsics must be in compact order, with _invokeGeneric first and _linkToInterface last */ \ - do_intrinsic(_invokeGeneric, java_lang_invoke_MethodHandle, invoke_name, star_name, F_RN) \ - do_intrinsic(_invokeBasic, java_lang_invoke_MethodHandle, invokeBasic_name, star_name, F_RN) \ - do_intrinsic(_linkToVirtual, java_lang_invoke_MethodHandle, linkToVirtual_name, star_name, F_SN) \ - do_intrinsic(_linkToStatic, java_lang_invoke_MethodHandle, linkToStatic_name, star_name, F_SN) \ - do_intrinsic(_linkToSpecial, java_lang_invoke_MethodHandle, linkToSpecial_name, star_name, F_SN) \ - do_intrinsic(_linkToInterface, java_lang_invoke_MethodHandle, linkToInterface_name, star_name, F_SN) \ - /* special marker for bytecode generated for the JVM from a LambdaForm: */ \ - do_intrinsic(_compiledLambdaForm, java_lang_invoke_MethodHandle, compiledLambdaForm_name, star_name, F_RN) \ - \ - /* unboxing methods: */ \ - do_intrinsic(_booleanValue, java_lang_Boolean, booleanValue_name, void_boolean_signature, F_R) \ - do_name( booleanValue_name, "booleanValue") \ - do_intrinsic(_byteValue, java_lang_Byte, byteValue_name, void_byte_signature, F_R) \ - do_name( byteValue_name, "byteValue") \ - do_intrinsic(_charValue, java_lang_Character, charValue_name, void_char_signature, F_R) \ - do_name( charValue_name, "charValue") \ - do_intrinsic(_shortValue, java_lang_Short, shortValue_name, void_short_signature, F_R) \ - do_name( shortValue_name, "shortValue") \ - do_intrinsic(_intValue, java_lang_Integer, intValue_name, void_int_signature, F_R) \ - do_name( intValue_name, "intValue") \ - do_intrinsic(_longValue, java_lang_Long, longValue_name, void_long_signature, F_R) \ - do_name( longValue_name, "longValue") \ - do_intrinsic(_floatValue, java_lang_Float, floatValue_name, void_float_signature, F_R) \ - do_name( floatValue_name, "floatValue") \ - do_intrinsic(_doubleValue, java_lang_Double, doubleValue_name, void_double_signature, F_R) \ - do_name( doubleValue_name, "doubleValue") \ - \ - /* boxing methods: */ \ - do_name( valueOf_name, "valueOf") \ - do_intrinsic(_Boolean_valueOf, java_lang_Boolean, valueOf_name, Boolean_valueOf_signature, F_S) \ - do_name( Boolean_valueOf_signature, "(Z)Ljava/lang/Boolean;") \ - do_intrinsic(_Byte_valueOf, java_lang_Byte, valueOf_name, Byte_valueOf_signature, F_S) \ - do_name( Byte_valueOf_signature, "(B)Ljava/lang/Byte;") \ - do_intrinsic(_Character_valueOf, java_lang_Character, valueOf_name, Character_valueOf_signature, F_S) \ - do_name( Character_valueOf_signature, "(C)Ljava/lang/Character;") \ - do_intrinsic(_Short_valueOf, java_lang_Short, valueOf_name, Short_valueOf_signature, F_S) \ - do_name( Short_valueOf_signature, "(S)Ljava/lang/Short;") \ - do_intrinsic(_Integer_valueOf, java_lang_Integer, valueOf_name, Integer_valueOf_signature, F_S) \ - do_name( Integer_valueOf_signature, "(I)Ljava/lang/Integer;") \ - do_intrinsic(_Long_valueOf, java_lang_Long, valueOf_name, Long_valueOf_signature, F_S) \ - do_name( Long_valueOf_signature, "(J)Ljava/lang/Long;") \ - do_intrinsic(_Float_valueOf, java_lang_Float, valueOf_name, Float_valueOf_signature, F_S) \ - do_name( Float_valueOf_signature, "(F)Ljava/lang/Float;") \ - do_intrinsic(_Double_valueOf, java_lang_Double, valueOf_name, Double_valueOf_signature, F_S) \ - do_name( Double_valueOf_signature, "(D)Ljava/lang/Double;") \ - \ - /* forEachRemaining */ \ - do_intrinsic(_forEachRemaining, java_util_stream_StreamsRangeIntSpliterator, forEachRemaining_name, forEachRemaining_signature, F_R) \ - do_name( forEachRemaining_name, "forEachRemaining") \ - do_name( forEachRemaining_signature, "(Ljava/util/function/IntConsumer;)V") \ - - /*end*/ - - // Class vmSymbols diff --git a/src/hotspot/share/code/codeBlob.cpp b/src/hotspot/share/code/codeBlob.cpp index 5e29216c36c..5dd113f64c0 100644 --- a/src/hotspot/share/code/codeBlob.cpp +++ b/src/hotspot/share/code/codeBlob.cpp @@ -99,6 +99,7 @@ CodeBlob::CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& la // probably wrong for tiered assert(_frame_size >= -1, "must use frame size or -1 for runtime stubs"); #endif // COMPILER1 + S390_ONLY(_ctable_offset = 0;) // avoid uninitialized fields } CodeBlob::CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments) : @@ -128,6 +129,7 @@ CodeBlob::CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& la // probably wrong for tiered assert(_frame_size >= -1, "must use frame size or -1 for runtime stubs"); #endif // COMPILER1 + S390_ONLY(_ctable_offset = 0;) // avoid uninitialized fields } diff --git a/src/hotspot/share/code/codeBlob.hpp b/src/hotspot/share/code/codeBlob.hpp index a11275811f9..b37cd082145 100644 --- a/src/hotspot/share/code/codeBlob.hpp +++ b/src/hotspot/share/code/codeBlob.hpp @@ -632,10 +632,6 @@ class DeoptimizationBlob: public SingletonBlob { // Typing bool is_deoptimization_stub() const { return true; } - bool exception_address_is_unpack_entry(address pc) const { - address unpack_pc = unpack(); - return (pc == unpack_pc || (pc + frame::pc_return_offset) == unpack_pc); - } // GC for args void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { /* Nothing to do */ } diff --git a/src/hotspot/share/code/codeCache.cpp b/src/hotspot/share/code/codeCache.cpp index b9a63dbd97f..3b589844232 100644 --- a/src/hotspot/share/code/codeCache.cpp +++ b/src/hotspot/share/code/codeCache.cpp @@ -49,6 +49,7 @@ #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" #include "runtime/deoptimization.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/handles.inline.hpp" #include "runtime/icache.hpp" #include "runtime/java.hpp" diff --git a/src/hotspot/share/code/codeHeapState.cpp b/src/hotspot/share/code/codeHeapState.cpp index 19d336a661a..30948e4f718 100644 --- a/src/hotspot/share/code/codeHeapState.cpp +++ b/src/hotspot/share/code/codeHeapState.cpp @@ -26,6 +26,7 @@ #include "precompiled.hpp" #include "code/codeHeapState.hpp" #include "compiler/compileBroker.hpp" +#include "runtime/safepoint.hpp" #include "runtime/sweeper.hpp" #include "utilities/powerOfTwo.hpp" @@ -210,7 +211,7 @@ const char blobTypeChar[] = {' ', 'C', 'N', 'I', 'X', 'Z', 'U', 'R', '?', 'D', 'T', 'E', 'S', 'A', 'M', 'B', 'L' }; const char* blobTypeName[] = {"noType" - , "nMethod (under construction)" + , "nMethod (under construction), cannot be observed" , "nMethod (active)" , "nMethod (inactive)" , "nMethod (deopt)" @@ -231,7 +232,7 @@ const char* compTypeName[] = { "none", "c1", "c2", "jvmci" }; // Be prepared for ten different CodeHeap segments. Should be enough for a few years. const unsigned int nSizeDistElements = 31; // logarithmic range growth, max size: 2**32 -const unsigned int maxTopSizeBlocks = 50; +const unsigned int maxTopSizeBlocks = 100; const unsigned int tsbStopper = 2 * maxTopSizeBlocks; const unsigned int maxHeaps = 10; static unsigned int nHeaps = 0; @@ -248,7 +249,6 @@ static unsigned int nBlocks_t1 = 0; // counting "in_use" nmethods on static unsigned int nBlocks_t2 = 0; // counting "in_use" nmethods only. static unsigned int nBlocks_alive = 0; // counting "not_used" and "not_entrant" nmethods only. static unsigned int nBlocks_dead = 0; // counting "zombie" and "unloaded" methods only. -static unsigned int nBlocks_inconstr = 0; // counting "inconstruction" nmethods only. This is a transient state. static unsigned int nBlocks_unloaded = 0; // counting "unloaded" nmethods only. This is a transient state. static unsigned int nBlocks_stub = 0; @@ -319,7 +319,6 @@ void CodeHeapState::get_HeapStatGlobals(outputStream* out, const char* heapName) nBlocks_t2 = CodeHeapStatArray[ix].nBlocks_t2; nBlocks_alive = CodeHeapStatArray[ix].nBlocks_alive; nBlocks_dead = CodeHeapStatArray[ix].nBlocks_dead; - nBlocks_inconstr = CodeHeapStatArray[ix].nBlocks_inconstr; nBlocks_unloaded = CodeHeapStatArray[ix].nBlocks_unloaded; nBlocks_stub = CodeHeapStatArray[ix].nBlocks_stub; FreeArray = CodeHeapStatArray[ix].FreeArray; @@ -342,7 +341,6 @@ void CodeHeapState::get_HeapStatGlobals(outputStream* out, const char* heapName) nBlocks_t2 = 0; nBlocks_alive = 0; nBlocks_dead = 0; - nBlocks_inconstr = 0; nBlocks_unloaded = 0; nBlocks_stub = 0; FreeArray = NULL; @@ -369,7 +367,6 @@ void CodeHeapState::set_HeapStatGlobals(outputStream* out, const char* heapName) CodeHeapStatArray[ix].nBlocks_t2 = nBlocks_t2; CodeHeapStatArray[ix].nBlocks_alive = nBlocks_alive; CodeHeapStatArray[ix].nBlocks_dead = nBlocks_dead; - CodeHeapStatArray[ix].nBlocks_inconstr = nBlocks_inconstr; CodeHeapStatArray[ix].nBlocks_unloaded = nBlocks_unloaded; CodeHeapStatArray[ix].nBlocks_stub = nBlocks_stub; CodeHeapStatArray[ix].FreeArray = FreeArray; @@ -496,6 +493,11 @@ void CodeHeapState::discard_FreeArray(outputStream* out) { void CodeHeapState::discard_TopSizeArray(outputStream* out) { if (TopSizeArray != NULL) { + for (unsigned int i = 0; i < alloc_topSizeBlocks; i++) { + if (TopSizeArray[i].blob_name != NULL) { + os::free((void*)TopSizeArray[i].blob_name); + } + } delete[] TopSizeArray; TopSizeArray = NULL; alloc_topSizeBlocks = 0; @@ -589,8 +591,8 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular return; } - if (!CodeCache_lock->owned_by_self()) { - printBox(ast, '-', "aggregate function called without holding the CodeCache_lock for ", heapName); + if (!holding_required_locks()) { + printBox(ast, '-', "Must be at safepoint or hold Compile_lock and CodeCache_lock when calling aggregate function for ", heapName); BUFFEREDSTREAM_FLUSH("") return; } @@ -657,7 +659,6 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular nBlocks_t2 = 0; nBlocks_alive = 0; nBlocks_dead = 0; - nBlocks_inconstr = 0; nBlocks_unloaded = 0; nBlocks_stub = 0; @@ -691,7 +692,6 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular size_t disconnSpace = 0; size_t notentrSpace = 0; size_t deadSpace = 0; - size_t inconstrSpace = 0; size_t unloadedSpace = 0; size_t stubSpace = 0; size_t freeSpace = 0; @@ -753,24 +753,38 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular nBlocks_used++; usedSpace += hb_bytelen; CodeBlob* cb = (CodeBlob*)heap->find_start(h); - if (cb != NULL) { - cbType = get_cbType(cb); - if (cb->is_nmethod()) { - compile_id = ((nmethod*)cb)->compile_id(); - comp_lvl = (CompLevel)((nmethod*)cb)->comp_level(); - if (((nmethod*)cb)->is_compiled_by_c1()) { + cbType = get_cbType(cb); // Will check for cb == NULL and other safety things. + if (cbType != noType) { + const char* blob_name = os::strdup(cb->name()); + unsigned int nm_size = 0; + int temperature = 0; + nmethod* nm = cb->as_nmethod_or_null(); + if (nm != NULL) { // no is_readable check required, nm = (nmethod*)cb. + ResourceMark rm; + Method* method = nm->method(); + if (nm->is_in_use()) { + blob_name = os::strdup(method->name_and_sig_as_C_string()); + } + if (nm->is_not_entrant()) { + blob_name = os::strdup(method->name_and_sig_as_C_string()); + } + + nm_size = nm->total_size(); + compile_id = nm->compile_id(); + comp_lvl = (CompLevel)(nm->comp_level()); + if (nm->is_compiled_by_c1()) { cType = c1; } - if (((nmethod*)cb)->is_compiled_by_c2()) { + if (nm->is_compiled_by_c2()) { cType = c2; } - if (((nmethod*)cb)->is_compiled_by_jvmci()) { + if (nm->is_compiled_by_jvmci()) { cType = jvmci; } switch (cbType) { case nMethod_inuse: { // only for executable methods!!! // space for these cbs is accounted for later. - int temperature = ((nmethod*)cb)->hotness_counter(); + temperature = nm->hotness_counter(); hotnessAccumulator += temperature; n_methods++; maxTemp = (temperature > maxTemp) ? temperature : maxTemp; @@ -797,10 +811,6 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular nBlocks_dead++; deadSpace += hb_bytelen; break; - case nMethod_inconstruction: - nBlocks_inconstr++; - inconstrSpace += hb_bytelen; - break; default: break; } @@ -811,29 +821,37 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular //------------------------------------------ if (alloc_topSizeBlocks > 0) { if (used_topSizeBlocks == 0) { - TopSizeArray[0].start = h; - TopSizeArray[0].len = hb_len; - TopSizeArray[0].index = tsbStopper; - TopSizeArray[0].compiler = cType; - TopSizeArray[0].level = comp_lvl; - TopSizeArray[0].type = cbType; + TopSizeArray[0].start = h; + TopSizeArray[0].blob_name = blob_name; + TopSizeArray[0].len = hb_len; + TopSizeArray[0].index = tsbStopper; + TopSizeArray[0].nm_size = nm_size; + TopSizeArray[0].temperature = temperature; + TopSizeArray[0].compiler = cType; + TopSizeArray[0].level = comp_lvl; + TopSizeArray[0].type = cbType; currMax = hb_len; currMin = hb_len; currMin_ix = 0; used_topSizeBlocks++; + blob_name = NULL; // indicate blob_name was consumed // This check roughly cuts 5000 iterations (JVM98, mixed, dbg, termination stats): } else if ((used_topSizeBlocks < alloc_topSizeBlocks) && (hb_len < currMin)) { //---< all blocks in list are larger, but there is room left in array >--- TopSizeArray[currMin_ix].index = used_topSizeBlocks; - TopSizeArray[used_topSizeBlocks].start = h; - TopSizeArray[used_topSizeBlocks].len = hb_len; - TopSizeArray[used_topSizeBlocks].index = tsbStopper; - TopSizeArray[used_topSizeBlocks].compiler = cType; - TopSizeArray[used_topSizeBlocks].level = comp_lvl; - TopSizeArray[used_topSizeBlocks].type = cbType; + TopSizeArray[used_topSizeBlocks].start = h; + TopSizeArray[used_topSizeBlocks].blob_name = blob_name; + TopSizeArray[used_topSizeBlocks].len = hb_len; + TopSizeArray[used_topSizeBlocks].index = tsbStopper; + TopSizeArray[used_topSizeBlocks].nm_size = nm_size; + TopSizeArray[used_topSizeBlocks].temperature = temperature; + TopSizeArray[used_topSizeBlocks].compiler = cType; + TopSizeArray[used_topSizeBlocks].level = comp_lvl; + TopSizeArray[used_topSizeBlocks].type = cbType; currMin = hb_len; currMin_ix = used_topSizeBlocks; used_topSizeBlocks++; + blob_name = NULL; // indicate blob_name was consumed } else { // This check cuts total_iterations by a factor of 6 (JVM98, mixed, dbg, termination stats): // We don't need to search the list if we know beforehand that the current block size is @@ -864,15 +882,25 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular currMin_ix = used_topSizeBlocks; } memcpy((void*)&TopSizeArray[used_topSizeBlocks], (void*)&TopSizeArray[i], sizeof(TopSizeBlk)); - TopSizeArray[i].start = h; - TopSizeArray[i].len = hb_len; - TopSizeArray[i].index = used_topSizeBlocks; - TopSizeArray[i].compiler = cType; - TopSizeArray[i].level = comp_lvl; - TopSizeArray[i].type = cbType; + TopSizeArray[i].start = h; + TopSizeArray[i].blob_name = blob_name; + TopSizeArray[i].len = hb_len; + TopSizeArray[i].index = used_topSizeBlocks; + TopSizeArray[i].nm_size = nm_size; + TopSizeArray[i].temperature = temperature; + TopSizeArray[i].compiler = cType; + TopSizeArray[i].level = comp_lvl; + TopSizeArray[i].type = cbType; used_topSizeBlocks++; + blob_name = NULL; // indicate blob_name was consumed } else { // no room for new entries, current block replaces entry for smallest block //---< Find last entry (entry for smallest remembered block) >--- + // We either want to insert right before the smallest entry, which is when <i> + // indexes the smallest entry. We then just overwrite the smallest entry. + // What's more likely: + // We want to insert somewhere in the list. The smallest entry (@<j>) then falls off the cliff. + // The element at the insert point <i> takes it's slot. The second-smallest entry now becomes smallest. + // Data of the current block is filled in at index <i>. unsigned int j = i; unsigned int prev_j = tsbStopper; unsigned int limit_j = 0; @@ -888,31 +916,41 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular j = TopSizeArray[j].index; } if (!insane) { + if (TopSizeArray[j].blob_name != NULL) { + os::free((void*)TopSizeArray[j].blob_name); + } if (prev_j == tsbStopper) { //---< Above while loop did not iterate, we already are the min entry >--- //---< We have to just replace the smallest entry >--- currMin = hb_len; currMin_ix = j; - TopSizeArray[j].start = h; - TopSizeArray[j].len = hb_len; - TopSizeArray[j].index = tsbStopper; // already set!! - TopSizeArray[j].compiler = cType; - TopSizeArray[j].level = comp_lvl; - TopSizeArray[j].type = cbType; + TopSizeArray[j].start = h; + TopSizeArray[j].blob_name = blob_name; + TopSizeArray[j].len = hb_len; + TopSizeArray[j].index = tsbStopper; // already set!! + TopSizeArray[i].nm_size = nm_size; + TopSizeArray[i].temperature = temperature; + TopSizeArray[j].compiler = cType; + TopSizeArray[j].level = comp_lvl; + TopSizeArray[j].type = cbType; } else { //---< second-smallest entry is now smallest >--- TopSizeArray[prev_j].index = tsbStopper; currMin = TopSizeArray[prev_j].len; currMin_ix = prev_j; - //---< smallest entry gets overwritten >--- + //---< previously smallest entry gets overwritten >--- memcpy((void*)&TopSizeArray[j], (void*)&TopSizeArray[i], sizeof(TopSizeBlk)); - TopSizeArray[i].start = h; - TopSizeArray[i].len = hb_len; - TopSizeArray[i].index = j; - TopSizeArray[i].compiler = cType; - TopSizeArray[i].level = comp_lvl; - TopSizeArray[i].type = cbType; + TopSizeArray[i].start = h; + TopSizeArray[i].blob_name = blob_name; + TopSizeArray[i].len = hb_len; + TopSizeArray[i].index = j; + TopSizeArray[i].nm_size = nm_size; + TopSizeArray[i].temperature = temperature; + TopSizeArray[i].compiler = cType; + TopSizeArray[i].level = comp_lvl; + TopSizeArray[i].type = cbType; } + blob_name = NULL; // indicate blob_name was consumed } // insane } break; @@ -927,6 +965,10 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular } } } + if (blob_name != NULL) { + os::free((void*)blob_name); + blob_name = NULL; + } //---------------------------------------------- //---< END register block in TopSizeArray >--- //---------------------------------------------- @@ -955,7 +997,6 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular StatArray[ix_beg].level = comp_lvl; StatArray[ix_beg].compiler = cType; break; - case nMethod_inconstruction: // let's count "in construction" nmethods here. case nMethod_alive: StatArray[ix_beg].tx_count++; StatArray[ix_beg].tx_space += (unsigned short)hb_len; @@ -1012,7 +1053,6 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular StatArray[ix_end].level = comp_lvl; StatArray[ix_end].compiler = cType; break; - case nMethod_inconstruction: // let's count "in construction" nmethods here. case nMethod_alive: StatArray[ix_beg].tx_count++; StatArray[ix_beg].tx_space += (unsigned short)beg_space; @@ -1060,7 +1100,6 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular StatArray[ix].level = comp_lvl; StatArray[ix].compiler = cType; break; - case nMethod_inconstruction: // let's count "in construction" nmethods here. case nMethod_alive: StatArray[ix].tx_count++; StatArray[ix].tx_space += (unsigned short)(granule_size>>log2_seg_size); @@ -1097,7 +1136,6 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular ast->print_cr(" Alive Space = " SIZE_FORMAT_W(8) "k, nBlocks_alive = %6d, %10.3f%% of capacity, %10.3f%% of max_capacity", aliveSpace/(size_t)K, nBlocks_alive, (100.0*aliveSpace)/size, (100.0*aliveSpace)/res_size); ast->print_cr(" disconnected = " SIZE_FORMAT_W(8) "k, nBlocks_disconn = %6d, %10.3f%% of capacity, %10.3f%% of max_capacity", disconnSpace/(size_t)K, nBlocks_disconn, (100.0*disconnSpace)/size, (100.0*disconnSpace)/res_size); ast->print_cr(" not entrant = " SIZE_FORMAT_W(8) "k, nBlocks_notentr = %6d, %10.3f%% of capacity, %10.3f%% of max_capacity", notentrSpace/(size_t)K, nBlocks_notentr, (100.0*notentrSpace)/size, (100.0*notentrSpace)/res_size); - ast->print_cr(" inconstrSpace = " SIZE_FORMAT_W(8) "k, nBlocks_inconstr = %6d, %10.3f%% of capacity, %10.3f%% of max_capacity", inconstrSpace/(size_t)K, nBlocks_inconstr, (100.0*inconstrSpace)/size, (100.0*inconstrSpace)/res_size); ast->print_cr(" unloadedSpace = " SIZE_FORMAT_W(8) "k, nBlocks_unloaded = %6d, %10.3f%% of capacity, %10.3f%% of max_capacity", unloadedSpace/(size_t)K, nBlocks_unloaded, (100.0*unloadedSpace)/size, (100.0*unloadedSpace)/res_size); ast->print_cr(" deadSpace = " SIZE_FORMAT_W(8) "k, nBlocks_dead = %6d, %10.3f%% of capacity, %10.3f%% of max_capacity", deadSpace/(size_t)K, nBlocks_dead, (100.0*deadSpace)/size, (100.0*deadSpace)/res_size); ast->print_cr(" stubSpace = " SIZE_FORMAT_W(8) "k, nBlocks_stub = %6d, %10.3f%% of capacity, %10.3f%% of max_capacity", stubSpace/(size_t)K, nBlocks_stub, (100.0*stubSpace)/size, (100.0*stubSpace)/res_size); @@ -1275,7 +1313,7 @@ void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granular FreeArray[ix].gap = (unsigned int)((address)FreeArray[ix+1].start - ((address)FreeArray[ix].start + FreeArray[ix].len)); for (HeapBlock *h = heap->next_block(FreeArray[ix].start); (h != NULL) && (h != FreeArray[ix+1].start); h = heap->next_block(h)) { CodeBlob *cb = (CodeBlob*)(heap->find_start(h)); - if ((cb != NULL) && !cb->is_nmethod()) { + if ((cb != NULL) && !cb->is_nmethod()) { // checks equivalent to those in get_cbType() FreeArray[ix].stubs_in_gap = true; } FreeArray[ix].n_gapBlocks++; @@ -1326,8 +1364,7 @@ void CodeHeapState::print_usedSpace(outputStream* out, CodeHeap* heap) { //-- Print Top Used Blocks -- //---------------------------- { - char* low_bound = heap->low_boundary(); - bool have_CodeCache_lock = CodeCache_lock->owned_by_self(); + char* low_bound = heap->low_boundary(); printBox(ast, '-', "Largest Used Blocks in ", heapName); print_blobType_legend(ast); @@ -1346,19 +1383,15 @@ void CodeHeapState::print_usedSpace(outputStream* out, CodeHeap* heap) { unsigned int printed_topSizeBlocks = 0; for (unsigned int i = 0; i != tsbStopper; i = TopSizeArray[i].index) { printed_topSizeBlocks++; - nmethod* nm = NULL; - const char* blob_name = "unnamed blob or blob name unavailable"; + if (TopSizeArray[i].blob_name == NULL) { + TopSizeArray[i].blob_name = os::strdup("unnamed blob or blob name unavailable"); + } // heap->find_start() is safe. Only works on _segmap. // Returns NULL or void*. Returned CodeBlob may be uninitialized. HeapBlock* heapBlock = TopSizeArray[i].start; CodeBlob* this_blob = (CodeBlob*)(heap->find_start(heapBlock)); - bool blob_is_safe = blob_access_is_safe(this_blob, NULL); - if (blob_is_safe) { + if (this_blob != NULL) { //---< access these fields only if we own the CodeCache_lock >--- - if (have_CodeCache_lock) { - blob_name = this_blob->name(); - nm = this_blob->as_nmethod_or_null(); - } //---< blob address >--- ast->print(INTPTR_FORMAT, p2i(this_blob)); ast->fill_to(19); @@ -1375,21 +1408,11 @@ void CodeHeapState::print_usedSpace(outputStream* out, CodeHeap* heap) { } //---< print size, name, and signature (for nMethods) >--- - // access nmethod and Method fields only if we own the CodeCache_lock. - // This fact is implicitly transported via nm != NULL. - if (CompiledMethod::nmethod_access_is_safe(nm)) { - ResourceMark rm; - Method* method = nm->method(); - if (nm->is_in_use()) { - blob_name = method->name_and_sig_as_C_string(); - } - if (nm->is_not_entrant()) { - blob_name = method->name_and_sig_as_C_string(); - } + bool is_nmethod = TopSizeArray[i].nm_size > 0; + if (is_nmethod) { //---< nMethod size in hex >--- - unsigned int total_size = nm->total_size(); - ast->print(PTR32_FORMAT, total_size); - ast->print("(" SIZE_FORMAT_W(4) "K)", total_size/K); + ast->print(PTR32_FORMAT, TopSizeArray[i].nm_size); + ast->print("(" SIZE_FORMAT_W(4) "K)", TopSizeArray[i].nm_size/K); ast->fill_to(51); ast->print(" %c", blobTypeChar[TopSizeArray[i].type]); //---< compiler information >--- @@ -1397,16 +1420,13 @@ void CodeHeapState::print_usedSpace(outputStream* out, CodeHeap* heap) { ast->print("%5s %3d", compTypeName[TopSizeArray[i].compiler], TopSizeArray[i].level); //---< method temperature >--- ast->fill_to(67); - ast->print("%5d", nm->hotness_counter()); + ast->print("%5d", TopSizeArray[i].temperature); //---< name and signature >--- ast->fill_to(67+6); - if (nm->is_not_installed()) { - ast->print(" not (yet) installed method "); - } - if (nm->is_zombie()) { + if (TopSizeArray[i].type == nMethod_dead) { ast->print(" zombie method "); } - ast->print("%s", blob_name); + ast->print("%s", TopSizeArray[i].blob_name); } else { //---< block size in hex >--- ast->print(PTR32_FORMAT, (unsigned int)(TopSizeArray[i].len<<log2_seg_size)); @@ -1415,7 +1435,7 @@ void CodeHeapState::print_usedSpace(outputStream* out, CodeHeap* heap) { ast->fill_to(56); //---< name and signature >--- ast->fill_to(67+6); - ast->print("%s", blob_name); + ast->print("%s", TopSizeArray[i].blob_name); } ast->cr(); BUFFEREDSTREAM_FLUSH_AUTO("") @@ -2196,7 +2216,7 @@ void CodeHeapState::print_names(outputStream* out, CodeHeap* heap) { char* low_bound = heap->low_boundary(); CodeBlob* last_blob = NULL; bool name_in_addr_range = true; - bool have_CodeCache_lock = CodeCache_lock->owned_by_self(); + bool have_locks = holding_required_locks(); //---< print at least 128K per block (i.e. between headers) >--- if (granules_per_line*granule_size < 128*K) { @@ -2208,7 +2228,7 @@ void CodeHeapState::print_names(outputStream* out, CodeHeap* heap) { " Due to the living nature of the code heap and because the CodeCache_lock\n" " is not continuously held, the displayed name might be wrong or no name\n" " might be found at all. The likelihood for that to happen increases\n" - " over time passed between aggregtion and print steps.\n"); + " over time passed between aggregation and print steps.\n"); BUFFEREDSTREAM_FLUSH_LOCKED("") for (unsigned int ix = 0; ix < alloc_granules; ix++) { @@ -2235,7 +2255,7 @@ void CodeHeapState::print_names(outputStream* out, CodeHeap* heap) { // Returns NULL or void*. Returned CodeBlob may be uninitialized. char* this_seg = low_bound + ix*granule_size + is; CodeBlob* this_blob = (CodeBlob*)(heap->find_start(this_seg)); - bool blob_is_safe = blob_access_is_safe(this_blob, NULL); + bool blob_is_safe = blob_access_is_safe(this_blob); // blob could have been flushed, freed, and merged. // this_blob < last_blob is an indicator for that. if (blob_is_safe && (this_blob > last_blob)) { @@ -2247,7 +2267,7 @@ void CodeHeapState::print_names(outputStream* out, CodeHeap* heap) { cbType = (blobType)StatArray[ix].type; } else { //---< access these fields only if we own the CodeCache_lock >--- - if (have_CodeCache_lock) { + if (have_locks) { cbType = get_cbType(this_blob); } } @@ -2255,11 +2275,11 @@ void CodeHeapState::print_names(outputStream* out, CodeHeap* heap) { //---< access these fields only if we own the CodeCache_lock >--- const char* blob_name = "<unavailable>"; nmethod* nm = NULL; - if (have_CodeCache_lock) { + if (have_locks) { blob_name = this_blob->name(); nm = this_blob->as_nmethod_or_null(); // this_blob->name() could return NULL if no name was given to CTOR. Inlined, maybe invisible on stack - if ((blob_name == NULL) || !os::is_readable_pointer(blob_name)) { + if (blob_name == NULL) { blob_name = "<unavailable>"; } } @@ -2283,7 +2303,7 @@ void CodeHeapState::print_names(outputStream* out, CodeHeap* heap) { // access nmethod and Method fields only if we own the CodeCache_lock. // This fact is implicitly transported via nm != NULL. - if (CompiledMethod::nmethod_access_is_safe(nm)) { + if (nmethod_access_is_safe(nm)) { Method* method = nm->method(); ResourceMark rm; //---< collect all data to locals as quickly as possible >--- @@ -2489,8 +2509,10 @@ void CodeHeapState::print_line_delim(outputStream* out, bufferedStream* ast, cha } } +// Find out which blob type we have at hand. +// Return "noType" if anything abnormal is detected. CodeHeapState::blobType CodeHeapState::get_cbType(CodeBlob* cb) { - if ((cb != NULL) && os::is_readable_pointer(cb)) { + if (cb != NULL) { if (cb->is_runtime_stub()) return runtimeStub; if (cb->is_deoptimization_stub()) return deoptimizationStub; if (cb->is_uncommon_trap_stub()) return uncommonTrapStub; @@ -2500,12 +2522,11 @@ CodeHeapState::blobType CodeHeapState::get_cbType(CodeBlob* cb) { if (cb->is_method_handles_adapter_blob()) return mh_adapterBlob; if (cb->is_buffer_blob()) return bufferBlob; - //---< access these fields only if we own the CodeCache_lock >--- - // Should be ensured by caller. aggregate() amd print_names() do that. - if (CodeCache_lock->owned_by_self()) { + //---< access these fields only if we own CodeCache_lock and Compile_lock >--- + // Should be ensured by caller. aggregate() and print_names() do that. + if (holding_required_locks()) { nmethod* nm = cb->as_nmethod_or_null(); if (nm != NULL) { // no is_readable check required, nm = (nmethod*)cb. - if (nm->is_not_installed()) return nMethod_inconstruction; if (nm->is_zombie()) return nMethod_dead; if (nm->is_unloaded()) return nMethod_unloaded; if (nm->is_in_use()) return nMethod_inuse; @@ -2518,13 +2539,22 @@ CodeHeapState::blobType CodeHeapState::get_cbType(CodeBlob* cb) { return noType; } -bool CodeHeapState::blob_access_is_safe(CodeBlob* this_blob, CodeBlob* prev_blob) { +// make sure the blob at hand is not garbage. +bool CodeHeapState::blob_access_is_safe(CodeBlob* this_blob) { return (this_blob != NULL) && // a blob must have been found, obviously - ((this_blob == prev_blob) || (prev_blob == NULL)) && // when re-checking, the same blob must have been found (this_blob->header_size() >= 0) && (this_blob->relocation_size() >= 0) && ((address)this_blob + this_blob->header_size() == (address)(this_blob->relocation_begin())) && - ((address)this_blob + CodeBlob::align_code_offset(this_blob->header_size() + this_blob->relocation_size()) == (address)(this_blob->content_begin())) && - os::is_readable_pointer((address)(this_blob->relocation_begin())) && - os::is_readable_pointer(this_blob->content_begin()); + ((address)this_blob + CodeBlob::align_code_offset(this_blob->header_size() + this_blob->relocation_size()) == (address)(this_blob->content_begin())); +} + +// make sure the nmethod at hand (and the linked method) is not garbage. +bool CodeHeapState::nmethod_access_is_safe(nmethod* nm) { + Method* method = (nm == NULL) ? NULL : nm->method(); // nm->method() was found to be uninitialized, i.e. != NULL, but invalid. + return (nm != NULL) && (method != NULL) && nm->is_alive() && (method->signature() != NULL); +} + +bool CodeHeapState::holding_required_locks() { + return SafepointSynchronize::is_at_safepoint() || + (CodeCache_lock->owned_by_self() && Compile_lock->owned_by_self()); } diff --git a/src/hotspot/share/code/codeHeapState.hpp b/src/hotspot/share/code/codeHeapState.hpp index 3b314ca587c..6e0f148ad44 100644 --- a/src/hotspot/share/code/codeHeapState.hpp +++ b/src/hotspot/share/code/codeHeapState.hpp @@ -47,6 +47,8 @@ class CodeHeapState : public CHeapObj<mtCode> { // The nMethod_* values correspond to the CompiledMethod enum values. // We can't use the CompiledMethod values 1:1 because we depend on noType == 0. nMethod_inconstruction, // under construction. Very soon, the type will transition to "in_use". + // can't be observed while holding Compile_lock and CodeCache_lock simultaneously. + // left in here for completeness (and to document we spent a thought). nMethod_inuse, // executable. This is the "normal" state for a nmethod. nMethod_notused, // assumed inactive, marked not entrant. Could be revived if necessary. nMethod_notentrant, // no new activations allowed, marked for deoptimization. Old activations may still exist. @@ -95,7 +97,9 @@ class CodeHeapState : public CHeapObj<mtCode> { static void print_line_delim(outputStream* out, bufferedStream *sst, char* low_bound, unsigned int ix, unsigned int gpl); static void print_line_delim(outputStream* out, outputStream *sst, char* low_bound, unsigned int ix, unsigned int gpl); static blobType get_cbType(CodeBlob* cb); - static bool blob_access_is_safe(CodeBlob* this_blob, CodeBlob* prev_blob); + static bool blob_access_is_safe(CodeBlob* this_blob); + static bool nmethod_access_is_safe(nmethod* nm); + static bool holding_required_locks(); public: static void discard(outputStream* out, CodeHeap* heap); @@ -164,12 +168,16 @@ struct FreeBlk : public CHeapObj<mtCode> { // know about those largest blocks. // All TopSizeBlks of a heap segment are stored in the related TopSizeArray. struct TopSizeBlk : public CHeapObj<mtCode> { - HeapBlock* start; // address of block + HeapBlock* start; // address of block + const char* blob_name; // name of blob (mostly: name_and_sig of nmethod) unsigned int len; // length of block, in _segment_size units. Will never overflow int. unsigned int index; // ordering index, 0 is largest block // contains array index of next smaller block // -1 indicates end of list + + unsigned int nm_size; // nmeethod total size (if nmethod, 0 otherwise) + int temperature; // nmethod temperature (if nmethod, 0 otherwise) CompLevel level; // optimization level (see globalDefinitions.hpp) u2 compiler; // compiler which generated this blob u2 type; // blob type @@ -216,7 +224,6 @@ struct CodeHeapStat { unsigned int nBlocks_t2; unsigned int nBlocks_alive; unsigned int nBlocks_dead; - unsigned int nBlocks_inconstr; unsigned int nBlocks_unloaded; unsigned int nBlocks_stub; // FreeBlk data diff --git a/src/hotspot/share/code/compiledMethod.cpp b/src/hotspot/share/code/compiledMethod.cpp index 98d8ed2e74a..a256aba77c7 100644 --- a/src/hotspot/share/code/compiledMethod.cpp +++ b/src/hotspot/share/code/compiledMethod.cpp @@ -69,6 +69,13 @@ CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType ty } void CompiledMethod::init_defaults() { + { // avoid uninitialized fields, even for short time periods + _is_far_code = false; + _scopes_data_begin = NULL; + _deopt_handler_begin = NULL; + _deopt_mh_handler_begin = NULL; + _exception_cache = NULL; + } _has_unsafe_access = 0; _has_method_handle_invokes = 0; _lazy_critical_native = 0; @@ -706,21 +713,6 @@ bool CompiledMethod::cleanup_inline_caches_impl(bool unloading_occurred, bool cl return true; } -// Iterating over all nmethods, e.g. with the help of CodeCache::nmethods_do(fun) was found -// to not be inherently safe. There is a chance that fields are seen which are not properly -// initialized. This happens despite the fact that nmethods_do() asserts the CodeCache_lock -// to be held. -// To bundle knowledge about necessary checks in one place, this function was introduced. -// It is not claimed that these checks are sufficient, but they were found to be necessary. -bool CompiledMethod::nmethod_access_is_safe(nmethod* nm) { - Method* method = (nm == NULL) ? NULL : nm->method(); // nm->method() may be uninitialized, i.e. != NULL, but invalid - return (nm != NULL) && (method != NULL) && (method->signature() != NULL) && - !nm->is_zombie() && !nm->is_not_installed() && - os::is_readable_pointer(method) && - os::is_readable_pointer(method->constants()) && - os::is_readable_pointer(method->signature()); -} - address CompiledMethod::continuation_for_implicit_exception(address pc, bool for_div0_check) { // Exception happened outside inline-cache check code => we are inside // an active nmethod => use cpc to determine a return address diff --git a/src/hotspot/share/code/compiledMethod.hpp b/src/hotspot/share/code/compiledMethod.hpp index ef9968736fc..0c606fc1aa4 100644 --- a/src/hotspot/share/code/compiledMethod.hpp +++ b/src/hotspot/share/code/compiledMethod.hpp @@ -267,8 +267,6 @@ class CompiledMethod : public CodeBlob { return _mark_for_deoptimization_status != deoptimize_noupdate; } - static bool nmethod_access_is_safe(nmethod* nm); - // tells whether frames described by this nmethod can be deoptimized // note: native wrappers cannot be deoptimized. bool can_be_deoptimized() const { return is_java_method(); } diff --git a/src/hotspot/share/code/debugInfoRec.cpp b/src/hotspot/share/code/debugInfoRec.cpp index 9367a1e4de6..1ab6e7d7bae 100644 --- a/src/hotspot/share/code/debugInfoRec.cpp +++ b/src/hotspot/share/code/debugInfoRec.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -26,6 +26,7 @@ #include "code/debugInfoRec.hpp" #include "code/scopeDesc.hpp" #include "prims/jvmtiExport.hpp" +#include "runtime/globals_extension.hpp" // Private definition. // There is one DIR_Chunk for each scope and values array. diff --git a/src/hotspot/share/code/relocInfo.cpp b/src/hotspot/share/code/relocInfo.cpp index fbe4e0782c6..9dbb7917923 100644 --- a/src/hotspot/share/code/relocInfo.cpp +++ b/src/hotspot/share/code/relocInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -30,10 +30,11 @@ #include "memory/resourceArea.hpp" #include "memory/universe.hpp" #include "oops/compressedOops.inline.hpp" +#include "oops/oop.inline.hpp" #include "runtime/flags/flagSetting.hpp" #include "runtime/stubCodeGenerator.hpp" +#include "utilities/align.hpp" #include "utilities/copy.hpp" -#include "oops/oop.inline.hpp" const RelocationHolder RelocationHolder::none; // its type is relocInfo::none @@ -41,15 +42,18 @@ const RelocationHolder RelocationHolder::none; // its type is relocInfo::none // Implementation of relocInfo #ifdef ASSERT -relocInfo::relocInfo(relocType t, int off, int f) { - assert(t != data_prefix_tag, "cannot build a prefix this way"); - assert((t & type_mask) == t, "wrong type"); - assert((f & format_mask) == f, "wrong format"); - assert(off >= 0 && off < offset_limit(), "offset out off bounds"); - assert((off & (offset_unit-1)) == 0, "misaligned offset"); - (*this) = relocInfo(t, RAW_BITS, off, f); +relocInfo::relocType relocInfo::check_relocType(relocType type) { + assert(type != data_prefix_tag, "cannot build a prefix this way"); + assert((type & type_mask) == type, "wrong type"); + return type; } -#endif + +void relocInfo::check_offset_and_format(int offset, int format) { + assert(offset >= 0 && offset < offset_limit(), "offset out off bounds"); + assert(is_aligned(offset, offset_unit), "misaligned offset"); + assert((format & format_mask) == format, "wrong format"); +} +#endif // ASSERT void relocInfo::initialize(CodeSection* dest, Relocation* reloc) { relocInfo* data = this+1; // here's where the data might go diff --git a/src/hotspot/share/code/relocInfo.hpp b/src/hotspot/share/code/relocInfo.hpp index 8c583f034e3..2d4029ade6d 100644 --- a/src/hotspot/share/code/relocInfo.hpp +++ b/src/hotspot/share/code/relocInfo.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -53,10 +53,6 @@ class NativeMovConstReg; // RelocIterator // A StackObj which iterates over the relocations associated with // a range of code addresses. Can be used to operate a copy of code. -// BoundRelocation -// An _internal_ type shared by packers and unpackers of relocations. -// It pastes together a RelocationHolder with some pointers into -// code and relocInfo streams. // Notes on relocType: @@ -275,27 +271,26 @@ class relocInfo { type_mask = 15 // A mask which selects only the above values }; - protected: + private: unsigned short _value; - enum RawBitsToken { RAW_BITS }; - relocInfo(relocType type, RawBitsToken ignore, int bits) + static const enum class RawBitsToken {} RAW_BITS{}; + + relocInfo(relocType type, RawBitsToken, int bits) : _value((type << nontype_width) + bits) { } - relocInfo(relocType type, RawBitsToken ignore, int off, int f) - : _value((type << nontype_width) + (off / (unsigned)offset_unit) + (f << offset_width)) { } + static relocType check_relocType(relocType type) NOT_DEBUG({ return type; }); + + static void check_offset_and_format(int offset, int format) NOT_DEBUG_RETURN; + + static int compute_bits(int offset, int format) { + check_offset_and_format(offset, format); + return (offset / offset_unit) + (format << offset_width); + } public: - // constructor relocInfo(relocType type, int offset, int format = 0) -#ifndef ASSERT - { - (*this) = relocInfo(type, RAW_BITS, offset, format); - } -#else - // Put a bunch of assertions out-of-line. - ; -#endif + : relocInfo(check_relocType(type), RAW_BITS, compute_bits(offset, format)) {} #define APPLY_TO_RELOCATIONS(visitor) \ visitor(oop) \ @@ -376,7 +371,7 @@ class relocInfo { inline friend relocInfo prefix_relocInfo(int datalen); - protected: + private: // an immediate relocInfo optimizes a prefix with one 10-bit unsigned value static relocInfo immediate_relocInfo(int data0) { assert(fits_into_immediate(data0), "data0 in limits"); @@ -492,8 +487,8 @@ class RelocationHolder { }; // A RelocIterator iterates through the relocation information of a CodeBlob. -// It is a variable BoundRelocation which is able to take on successive -// values as it is advanced through a code stream. +// It provides access to successive relocations as it is advanced through a +// code stream. // Usage: // RelocIterator iter(nm); // while (iter.next()) { diff --git a/src/hotspot/share/compiler/compilationPolicy.cpp b/src/hotspot/share/compiler/compilationPolicy.cpp index b5ce247f917..869ecdd4f79 100644 --- a/src/hotspot/share/compiler/compilationPolicy.cpp +++ b/src/hotspot/share/compiler/compilationPolicy.cpp @@ -36,6 +36,7 @@ #include "oops/oop.inline.hpp" #include "prims/nativeLookup.hpp" #include "runtime/frame.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/handles.inline.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/thread.hpp" @@ -105,7 +106,7 @@ void CompilationPolicy::compile_if_required(const methodHandle& selected_method, } CompileBroker::compile_method(selected_method, InvocationEntryBci, CompilationPolicy::policy()->initial_compile_level(selected_method), - methodHandle(), 0, CompileTask::Reason_MustBeCompiled, CHECK); + methodHandle(), 0, CompileTask::Reason_MustBeCompiled, THREAD); } } @@ -378,10 +379,10 @@ bool SimpleCompPolicy::is_mature(Method* method) { } nmethod* SimpleCompPolicy::event(const methodHandle& method, const methodHandle& inlinee, int branch_bci, - int bci, CompLevel comp_level, CompiledMethod* nm, JavaThread* thread) { + int bci, CompLevel comp_level, CompiledMethod* nm, TRAPS) { assert(comp_level == CompLevel_none, "This should be only called from the interpreter"); NOT_PRODUCT(trace_frequency_counter_overflow(method, branch_bci, bci)); - if (JvmtiExport::can_post_interpreter_events() && thread->is_interp_only_mode()) { + if (JvmtiExport::can_post_interpreter_events() && THREAD->as_Java_thread()->is_interp_only_mode()) { // If certain JVMTI events (e.g. frame pop event) are requested then the // thread is forced to remain in interpreted code. This is // implemented partly by a check in the run_compiled_code @@ -407,7 +408,7 @@ nmethod* SimpleCompPolicy::event(const methodHandle& method, const methodHandle& // when code cache is full, compilation gets switched off, UseCompiler // is set to false if (!method->has_compiled_code() && UseCompiler) { - method_invocation_event(method, thread); + method_invocation_event(method, THREAD); } else { // Force counter overflow on method entry, even if no compilation // happened. (The method_invocation_event call does this also.) @@ -423,7 +424,7 @@ nmethod* SimpleCompPolicy::event(const methodHandle& method, const methodHandle& NOT_PRODUCT(trace_osr_request(method, osr_nm, bci)); // when code cache is full, we should not compile any more... if (osr_nm == NULL && UseCompiler) { - method_back_branch_event(method, bci, thread); + method_back_branch_event(method, bci, THREAD); osr_nm = method->lookup_osr_nmethod_for(bci, CompLevel_highest_tier, true); } if (osr_nm == NULL) { @@ -478,7 +479,7 @@ void SimpleCompPolicy::trace_osr_request(const methodHandle& method, nmethod* os } #endif // !PRODUCT -void SimpleCompPolicy::method_invocation_event(const methodHandle& m, JavaThread* thread) { +void SimpleCompPolicy::method_invocation_event(const methodHandle& m, TRAPS) { const int comp_level = CompLevel_highest_tier; const int hot_count = m->invocation_count(); reset_counter_for_invocation_event(m); @@ -486,17 +487,17 @@ void SimpleCompPolicy::method_invocation_event(const methodHandle& m, JavaThread if (is_compilation_enabled() && can_be_compiled(m, comp_level)) { CompiledMethod* nm = m->code(); if (nm == NULL ) { - CompileBroker::compile_method(m, InvocationEntryBci, comp_level, m, hot_count, CompileTask::Reason_InvocationCount, thread); + CompileBroker::compile_method(m, InvocationEntryBci, comp_level, m, hot_count, CompileTask::Reason_InvocationCount, THREAD); } } } -void SimpleCompPolicy::method_back_branch_event(const methodHandle& m, int bci, JavaThread* thread) { +void SimpleCompPolicy::method_back_branch_event(const methodHandle& m, int bci, TRAPS) { const int comp_level = CompLevel_highest_tier; const int hot_count = m->backedge_count(); if (is_compilation_enabled() && can_be_osr_compiled(m, comp_level)) { - CompileBroker::compile_method(m, bci, comp_level, m, hot_count, CompileTask::Reason_BackedgeCount, thread); + CompileBroker::compile_method(m, bci, comp_level, m, hot_count, CompileTask::Reason_BackedgeCount, THREAD); NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(bci, comp_level, true));) } } diff --git a/src/hotspot/share/compiler/compilationPolicy.hpp b/src/hotspot/share/compiler/compilationPolicy.hpp index 088b2673e2a..39b970721f0 100644 --- a/src/hotspot/share/compiler/compilationPolicy.hpp +++ b/src/hotspot/share/compiler/compilationPolicy.hpp @@ -63,7 +63,7 @@ class CompilationPolicy : public CHeapObj<mtCompiler> { virtual int compiler_count(CompLevel comp_level) = 0; // main notification entry, return a pointer to an nmethod if the OSR is required, // returns NULL otherwise. - virtual nmethod* event(const methodHandle& method, const methodHandle& inlinee, int branch_bci, int bci, CompLevel comp_level, CompiledMethod* nm, JavaThread* thread) = 0; + virtual nmethod* event(const methodHandle& method, const methodHandle& inlinee, int branch_bci, int bci, CompLevel comp_level, CompiledMethod* nm, TRAPS) = 0; // safepoint() is called at the end of the safepoint virtual void do_safepoint_work() = 0; // reprofile request @@ -90,8 +90,8 @@ class SimpleCompPolicy : public CompilationPolicy { static void trace_osr_completion(nmethod* osr_nm); void reset_counter_for_invocation_event(const methodHandle& method); void reset_counter_for_back_branch_event(const methodHandle& method); - void method_invocation_event(const methodHandle& m, JavaThread* thread); - void method_back_branch_event(const methodHandle& m, int bci, JavaThread* thread); + void method_invocation_event(const methodHandle& m, TRAPS); + void method_back_branch_event(const methodHandle& m, int bci, TRAPS); public: SimpleCompPolicy() : _compiler_count(0) { } virtual CompLevel initial_compile_level(const methodHandle& m) { return CompLevel_highest_tier; } @@ -102,7 +102,7 @@ class SimpleCompPolicy : public CompilationPolicy { virtual bool is_mature(Method* method); virtual void initialize(); virtual CompileTask* select_task(CompileQueue* compile_queue); - virtual nmethod* event(const methodHandle& method, const methodHandle& inlinee, int branch_bci, int bci, CompLevel comp_level, CompiledMethod* nm, JavaThread* thread); + virtual nmethod* event(const methodHandle& method, const methodHandle& inlinee, int branch_bci, int bci, CompLevel comp_level, CompiledMethod* nm, TRAPS); }; diff --git a/src/hotspot/share/compiler/compileBroker.cpp b/src/hotspot/share/compiler/compileBroker.cpp index 94d47d19e8e..f33db98ec0a 100644 --- a/src/hotspot/share/compiler/compileBroker.cpp +++ b/src/hotspot/share/compiler/compileBroker.cpp @@ -50,6 +50,7 @@ #include "prims/whitebox.hpp" #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/handles.inline.hpp" #include "runtime/init.hpp" #include "runtime/interfaceSupport.inline.hpp" @@ -1255,7 +1256,7 @@ nmethod* CompileBroker::compile_method(const methodHandle& method, int osr_bci, int comp_level, const methodHandle& hot_method, int hot_count, CompileTask::CompileReason compile_reason, - Thread* THREAD) { + TRAPS) { // Do nothing if compilebroker is not initalized or compiles are submitted on level none if (!_initialized || comp_level == CompLevel_none) { return NULL; @@ -1265,6 +1266,7 @@ nmethod* CompileBroker::compile_method(const methodHandle& method, int osr_bci, assert(comp != NULL, "Ensure we have a compiler"); DirectiveSet* directive = DirectivesStack::getMatchingDirective(method, comp); + // CompileBroker::compile_method can trap and can have pending aysnc exception. nmethod* nm = CompileBroker::compile_method(method, osr_bci, comp_level, hot_method, hot_count, compile_reason, directive, THREAD); DirectivesStack::release(directive); return nm; @@ -1275,7 +1277,7 @@ nmethod* CompileBroker::compile_method(const methodHandle& method, int osr_bci, const methodHandle& hot_method, int hot_count, CompileTask::CompileReason compile_reason, DirectiveSet* directive, - Thread* THREAD) { + TRAPS) { // make sure arguments make sense assert(method->method_holder()->is_instance_klass(), "not an instance method"); @@ -1328,10 +1330,10 @@ nmethod* CompileBroker::compile_method(const methodHandle& method, int osr_bci, assert(!HAS_PENDING_EXCEPTION, "No exception should be present"); // some prerequisites that are compiler specific if (comp->is_c2()) { - method->constants()->resolve_string_constants(CHECK_AND_CLEAR_NULL); + method->constants()->resolve_string_constants(CHECK_AND_CLEAR_NONASYNC_NULL); // Resolve all classes seen in the signature of the method // we are compiling. - Method::load_signature_classes(method, CHECK_AND_CLEAR_NULL); + Method::load_signature_classes(method, CHECK_AND_CLEAR_NONASYNC_NULL); } // If the method is native, do the lookup in the thread requesting @@ -2762,42 +2764,59 @@ void CompileBroker::print_heapinfo(outputStream* out, const char* function, size } // We hold the CodeHeapStateAnalytics_lock all the time, from here until we leave this function. - // That prevents another thread from destroying our view on the CodeHeap. + // That prevents other threads from destroying (making inconsistent) our view on the CodeHeap. // When we request individual parts of the analysis via the jcmd interface, it is possible // that in between another thread (another jcmd user or the vm running into CodeCache OOM) - // updated the aggregated data. That's a tolerable tradeoff because we can't hold a lock - // across user interaction. - // Acquire this lock before acquiring the CodeCache_lock. - // CodeHeapStateAnalytics_lock could be held by a concurrent thread for a long time, - // leading to an unnecessarily long hold time of the CodeCache_lock. + // updated the aggregated data. We will then see a modified, but again consistent, view + // on the CodeHeap. That's a tolerable tradeoff we have to accept because we can't hold + // a lock across user interaction. + + // We should definitely acquire this lock before acquiring Compile_lock and CodeCache_lock. + // CodeHeapStateAnalytics_lock may be held by a concurrent thread for a long time, + // leading to an unnecessarily long hold time of the other locks we acquired before. ts.update(); // record starting point - MutexLocker mu1(CodeHeapStateAnalytics_lock, Mutex::_no_safepoint_check_flag); + MutexLocker mu0(CodeHeapStateAnalytics_lock, Mutex::_safepoint_check_flag); out->print_cr("\n__ CodeHeapStateAnalytics lock wait took %10.3f seconds _________\n", ts.seconds()); - // If we serve an "allFun" call, it is beneficial to hold the CodeCache_lock - // for the entire duration of aggregation and printing. That makes sure - // we see a consistent picture and do not run into issues caused by - // the CodeHeap being altered concurrently. - Mutex* global_lock = allFun ? CodeCache_lock : NULL; - Mutex* function_lock = allFun ? NULL : CodeCache_lock; + // Holding the CodeCache_lock protects from concurrent alterations of the CodeCache. + // Unfortunately, such protection is not sufficient: + // When a new nmethod is created via ciEnv::register_method(), the + // Compile_lock is taken first. After some initializations, + // nmethod::new_nmethod() takes over, grabbing the CodeCache_lock + // immediately (after finalizing the oop references). To lock out concurrent + // modifiers, we have to grab both locks as well in the described sequence. + // + // If we serve an "allFun" call, it is beneficial to hold CodeCache_lock and Compile_lock + // for the entire duration of aggregation and printing. That makes sure we see + // a consistent picture and do not run into issues caused by concurrent alterations. + bool should_take_Compile_lock = !SafepointSynchronize::is_at_safepoint() && + !Compile_lock->owned_by_self(); + bool should_take_CodeCache_lock = !SafepointSynchronize::is_at_safepoint() && + !CodeCache_lock->owned_by_self(); + Mutex* global_lock_1 = allFun ? (should_take_Compile_lock ? Compile_lock : NULL) : NULL; + Monitor* global_lock_2 = allFun ? (should_take_CodeCache_lock ? CodeCache_lock : NULL) : NULL; + Mutex* function_lock_1 = allFun ? NULL : (should_take_Compile_lock ? Compile_lock : NULL); + Monitor* function_lock_2 = allFun ? NULL : (should_take_CodeCache_lock ? CodeCache_lock : NULL); ts_global.update(); // record starting point - MutexLocker mu2(global_lock, Mutex::_no_safepoint_check_flag); - if (global_lock != NULL) { - out->print_cr("\n__ CodeCache (global) lock wait took %10.3f seconds _________\n", ts_global.seconds()); + MutexLocker mu1(global_lock_1, Mutex::_safepoint_check_flag); + MutexLocker mu2(global_lock_2, Mutex::_no_safepoint_check_flag); + if ((global_lock_1 != NULL) || (global_lock_2 != NULL)) { + out->print_cr("\n__ Compile & CodeCache (global) lock wait took %10.3f seconds _________\n", ts_global.seconds()); ts_global.update(); // record starting point } if (aggregate) { ts.update(); // record starting point - MutexLocker mu3(function_lock, Mutex::_no_safepoint_check_flag); - if (function_lock != NULL) { - out->print_cr("\n__ CodeCache (function) lock wait took %10.3f seconds _________\n", ts.seconds()); + MutexLocker mu11(function_lock_1, Mutex::_safepoint_check_flag); + MutexLocker mu22(function_lock_2, Mutex::_no_safepoint_check_flag); + if ((function_lock_1 != NULL) || (function_lock_1 != NULL)) { + out->print_cr("\n__ Compile & CodeCache (function) lock wait took %10.3f seconds _________\n", ts.seconds()); } ts.update(); // record starting point CodeCache::aggregate(out, granularity); - if (function_lock != NULL) { - out->print_cr("\n__ CodeCache (function) lock hold took %10.3f seconds _________\n", ts.seconds()); + if ((function_lock_1 != NULL) || (function_lock_1 != NULL)) { + out->print_cr("\n__ Compile & CodeCache (function) lock hold took %10.3f seconds _________\n", ts.seconds()); } } @@ -2807,15 +2826,18 @@ void CompileBroker::print_heapinfo(outputStream* out, const char* function, size if (methodSpace) CodeCache::print_space(out); if (methodAge) CodeCache::print_age(out); if (methodNames) { - // print_names() has shown to be sensitive to concurrent CodeHeap modifications. - // Therefore, request the CodeCache_lock before calling... - MutexLocker mu3(function_lock, Mutex::_no_safepoint_check_flag); - CodeCache::print_names(out); + if (allFun) { + // print_names() can only be used safely if the locks have been continuously held + // since aggregation begin. That is true only for function "all". + CodeCache::print_names(out); + } else { + out->print_cr("\nCodeHeapStateAnalytics: Function 'MethodNames' is only available as part of function 'all'"); + } } if (discard) CodeCache::discard(out); - if (global_lock != NULL) { - out->print_cr("\n__ CodeCache (global) lock hold took %10.3f seconds _________\n", ts_global.seconds()); + if ((global_lock_1 != NULL) || (global_lock_2 != NULL)) { + out->print_cr("\n__ Compile & CodeCache (global) lock hold took %10.3f seconds _________\n", ts_global.seconds()); } out->print_cr("\n__ CodeHeapStateAnalytics total duration %10.3f seconds _________\n", ts_total.seconds()); } diff --git a/src/hotspot/share/compiler/compileBroker.hpp b/src/hotspot/share/compiler/compileBroker.hpp index b3be2ec649b..2da97cf107e 100644 --- a/src/hotspot/share/compiler/compileBroker.hpp +++ b/src/hotspot/share/compiler/compileBroker.hpp @@ -271,10 +271,6 @@ class CompileBroker: AllStatic { static void shutdown_compiler_runtime(AbstractCompiler* comp, CompilerThread* thread); public: - - static DirectivesStack* dirstack(); - static void set_dirstack(DirectivesStack* stack); - enum { // The entry bci used for non-OSR compilations. standard_entry_bci = InvocationEntryBci @@ -289,7 +285,6 @@ class CompileBroker: AllStatic { static bool compilation_is_complete(const methodHandle& method, int osr_bci, int comp_level); static bool compilation_is_in_queue(const methodHandle& method); static void print_compile_queues(outputStream* st); - static void print_directives(outputStream* st); static int queue_size(int comp_level) { CompileQueue *q = compile_queue(comp_level); return q != NULL ? q->size() : 0; @@ -303,7 +298,7 @@ class CompileBroker: AllStatic { const methodHandle& hot_method, int hot_count, CompileTask::CompileReason compile_reason, - Thread* thread); + TRAPS); static nmethod* compile_method(const methodHandle& method, int osr_bci, @@ -312,7 +307,7 @@ class CompileBroker: AllStatic { int hot_count, CompileTask::CompileReason compile_reason, DirectiveSet* directive, - Thread* thread); + TRAPS); // Acquire any needed locks and assign a compile id static uint assign_compile_id_unlocked(Thread* thread, const methodHandle& method, int osr_bci); diff --git a/src/hotspot/share/compiler/compilerOracle.cpp b/src/hotspot/share/compiler/compilerOracle.cpp index fe4c93d450c..26328783964 100644 --- a/src/hotspot/share/compiler/compilerOracle.cpp +++ b/src/hotspot/share/compiler/compilerOracle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -33,6 +33,7 @@ #include "oops/klass.hpp" #include "oops/method.hpp" #include "oops/symbol.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/handles.inline.hpp" #include "runtime/jniHandles.hpp" #include "runtime/os.hpp" diff --git a/src/hotspot/share/compiler/tieredThresholdPolicy.cpp b/src/hotspot/share/compiler/tieredThresholdPolicy.cpp index a380e90e49d..e6836879fc1 100644 --- a/src/hotspot/share/compiler/tieredThresholdPolicy.cpp +++ b/src/hotspot/share/compiler/tieredThresholdPolicy.cpp @@ -29,6 +29,7 @@ #include "memory/resourceArea.hpp" #include "runtime/arguments.hpp" #include "runtime/frame.inline.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/handles.inline.hpp" #include "runtime/safepoint.hpp" #include "runtime/safepointVerifiers.hpp" @@ -480,10 +481,10 @@ void TieredThresholdPolicy::reprofile(ScopeDesc* trap_scope, bool is_osr) { } nmethod* TieredThresholdPolicy::event(const methodHandle& method, const methodHandle& inlinee, - int branch_bci, int bci, CompLevel comp_level, CompiledMethod* nm, JavaThread* thread) { + int branch_bci, int bci, CompLevel comp_level, CompiledMethod* nm, TRAPS) { if (comp_level == CompLevel_none && JvmtiExport::can_post_interpreter_events() && - thread->is_interp_only_mode()) { + THREAD->as_Java_thread()->is_interp_only_mode()) { return NULL; } if (ReplayCompiles) { @@ -501,28 +502,31 @@ nmethod* TieredThresholdPolicy::event(const methodHandle& method, const methodHa } if (bci == InvocationEntryBci) { - method_invocation_event(method, inlinee, comp_level, nm, thread); + method_invocation_event(method, inlinee, comp_level, nm, THREAD); } else { // method == inlinee if the event originated in the main method - method_back_branch_event(method, inlinee, bci, comp_level, nm, thread); + method_back_branch_event(method, inlinee, bci, comp_level, nm, THREAD); // Check if event led to a higher level OSR compilation - CompLevel expected_comp_level = comp_level; + CompLevel expected_comp_level = MIN2(CompLevel_full_optimization, static_cast<CompLevel>(comp_level + 1)); if (!CompilationModeFlag::disable_intermediate() && inlinee->is_not_osr_compilable(expected_comp_level)) { // It's not possble to reach the expected level so fall back to simple. expected_comp_level = CompLevel_simple; } - nmethod* osr_nm = inlinee->lookup_osr_nmethod_for(bci, expected_comp_level, false); - assert(osr_nm == NULL || osr_nm->comp_level() >= expected_comp_level, "lookup_osr_nmethod_for is broken"); - if (osr_nm != NULL) { - // Perform OSR with new nmethod - return osr_nm; + CompLevel max_osr_level = static_cast<CompLevel>(inlinee->highest_osr_comp_level()); + if (max_osr_level >= expected_comp_level) { // fast check to avoid locking in a typical scenario + nmethod* osr_nm = inlinee->lookup_osr_nmethod_for(bci, expected_comp_level, false); + assert(osr_nm == NULL || osr_nm->comp_level() >= expected_comp_level, "lookup_osr_nmethod_for is broken"); + if (osr_nm != NULL && osr_nm->comp_level() != comp_level) { + // Perform OSR with new nmethod + return osr_nm; + } } } return NULL; } // Check if the method can be compiled, change level if necessary -void TieredThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread) { +void TieredThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel level, TRAPS) { assert(verify_level(level) && level <= TieredStopAtLevel, "Invalid compilation level %d", level); if (level == CompLevel_none) { @@ -534,9 +538,10 @@ void TieredThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel l mh->code()->make_not_used(); } // Deoptimize immediately (we don't have to wait for a compile). - RegisterMap map(thread, false); - frame fr = thread->last_frame().sender(&map); - Deoptimization::deoptimize_frame(thread, fr.id()); + JavaThread* jt = THREAD->as_Java_thread(); + RegisterMap map(jt, false); + frame fr = jt->last_frame().sender(&map); + Deoptimization::deoptimize_frame(jt, fr.id()); } return; } @@ -566,7 +571,7 @@ void TieredThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel l // pure C1. if ((bci == InvocationEntryBci && !can_be_compiled(mh, level))) { if (level == CompLevel_full_optimization && can_be_compiled(mh, CompLevel_simple)) { - compile(mh, bci, CompLevel_simple, thread); + compile(mh, bci, CompLevel_simple, THREAD); } return; } @@ -577,7 +582,7 @@ void TieredThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel l // Invalidate the existing OSR nmethod so that a compile at CompLevel_simple is permitted. osr_nm->make_not_entrant(); } - compile(mh, bci, CompLevel_simple, thread); + compile(mh, bci, CompLevel_simple, THREAD); } return; } @@ -591,7 +596,7 @@ void TieredThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel l } int hot_count = (bci == InvocationEntryBci) ? mh->invocation_count() : mh->backedge_count(); update_rate(nanos_to_millis(os::javaTimeNanos()), mh()); - CompileBroker::compile_method(mh, bci, level, mh, hot_count, CompileTask::Reason_Tiered, thread); + CompileBroker::compile_method(mh, bci, level, mh, hot_count, CompileTask::Reason_Tiered, THREAD); } } @@ -810,7 +815,7 @@ bool TieredThresholdPolicy::should_not_inline(ciEnv* env, ciMethod* callee) { } // Create MDO if necessary. -void TieredThresholdPolicy::create_mdo(const methodHandle& mh, JavaThread* THREAD) { +void TieredThresholdPolicy::create_mdo(const methodHandle& mh, Thread* THREAD) { if (mh->is_native() || mh->is_abstract() || mh->is_accessor() || @@ -991,7 +996,7 @@ CompLevel TieredThresholdPolicy::common(Predicate p, const methodHandle& method, // Determine if a method should be compiled with a normal entry point at a different level. -CompLevel TieredThresholdPolicy::call_event(const methodHandle& method, CompLevel cur_level, JavaThread* thread) { +CompLevel TieredThresholdPolicy::call_event(const methodHandle& method, CompLevel cur_level, Thread* thread) { CompLevel osr_level = MIN2((CompLevel) method->highest_osr_comp_level(), common(&TieredThresholdPolicy::loop_predicate, method, cur_level, true)); CompLevel next_level = common(&TieredThresholdPolicy::call_predicate, method, cur_level); @@ -1012,7 +1017,7 @@ CompLevel TieredThresholdPolicy::call_event(const methodHandle& method, CompLeve } // Determine if we should do an OSR compilation of a given method. -CompLevel TieredThresholdPolicy::loop_event(const methodHandle& method, CompLevel cur_level, JavaThread* thread) { +CompLevel TieredThresholdPolicy::loop_event(const methodHandle& method, CompLevel cur_level, Thread* thread) { CompLevel next_level = common(&TieredThresholdPolicy::loop_predicate, method, cur_level, true); if (cur_level == CompLevel_none) { // If there is a live OSR method that means that we deopted to the interpreter @@ -1025,7 +1030,7 @@ CompLevel TieredThresholdPolicy::loop_event(const methodHandle& method, CompLeve return next_level; } -bool TieredThresholdPolicy::maybe_switch_to_aot(const methodHandle& mh, CompLevel cur_level, CompLevel next_level, JavaThread* thread) { +bool TieredThresholdPolicy::maybe_switch_to_aot(const methodHandle& mh, CompLevel cur_level, CompLevel next_level, Thread* thread) { if (UseAOT) { if (cur_level == CompLevel_full_profile || cur_level == CompLevel_none) { // If the current level is full profile or interpreter and we're switching to any other level, @@ -1047,18 +1052,18 @@ bool TieredThresholdPolicy::maybe_switch_to_aot(const methodHandle& mh, CompLeve // Handle the invocation event. void TieredThresholdPolicy::method_invocation_event(const methodHandle& mh, const methodHandle& imh, - CompLevel level, CompiledMethod* nm, JavaThread* thread) { + CompLevel level, CompiledMethod* nm, TRAPS) { if (should_create_mdo(mh, level)) { - create_mdo(mh, thread); + create_mdo(mh, THREAD); } - CompLevel next_level = call_event(mh, level, thread); + CompLevel next_level = call_event(mh, level, THREAD); if (next_level != level) { - if (maybe_switch_to_aot(mh, level, next_level, thread)) { + if (maybe_switch_to_aot(mh, level, next_level, THREAD)) { // No JITting necessary return; } if (is_compilation_enabled() && !CompileBroker::compilation_is_in_queue(mh)) { - compile(mh, InvocationEntryBci, next_level, thread); + compile(mh, InvocationEntryBci, next_level, THREAD); } } } @@ -1066,21 +1071,21 @@ void TieredThresholdPolicy::method_invocation_event(const methodHandle& mh, cons // Handle the back branch event. Notice that we can compile the method // with a regular entry from here. void TieredThresholdPolicy::method_back_branch_event(const methodHandle& mh, const methodHandle& imh, - int bci, CompLevel level, CompiledMethod* nm, JavaThread* thread) { + int bci, CompLevel level, CompiledMethod* nm, TRAPS) { if (should_create_mdo(mh, level)) { - create_mdo(mh, thread); + create_mdo(mh, THREAD); } // Check if MDO should be created for the inlined method if (should_create_mdo(imh, level)) { - create_mdo(imh, thread); + create_mdo(imh, THREAD); } if (is_compilation_enabled()) { - CompLevel next_osr_level = loop_event(imh, level, thread); + CompLevel next_osr_level = loop_event(imh, level, THREAD); CompLevel max_osr_level = (CompLevel)imh->highest_osr_comp_level(); // At the very least compile the OSR version if (!CompileBroker::compilation_is_in_queue(imh) && (next_osr_level != level)) { - compile(imh, bci, next_osr_level, thread); + compile(imh, bci, next_osr_level, CHECK); } // Use loop event as an opportunity to also check if there's been @@ -1091,13 +1096,13 @@ void TieredThresholdPolicy::method_back_branch_event(const methodHandle& mh, con // Recompile the enclosing method to prevent infinite OSRs. Stay at AOT level while it's compiling. if (max_osr_level != CompLevel_none && !CompileBroker::compilation_is_in_queue(mh)) { CompLevel enclosing_level = limit_level(CompLevel_full_profile); - compile(mh, InvocationEntryBci, enclosing_level, thread); + compile(mh, InvocationEntryBci, enclosing_level, THREAD); } } else { // Current loop event level is not AOT guarantee(nm != NULL, "Should have nmethod here"); cur_level = comp_level(mh()); - next_level = call_event(mh, cur_level, thread); + next_level = call_event(mh, cur_level, THREAD); if (max_osr_level == CompLevel_full_optimization) { // The inlinee OSRed to full opt, we need to modify the enclosing method to avoid deopts @@ -1126,17 +1131,17 @@ void TieredThresholdPolicy::method_back_branch_event(const methodHandle& mh, con next_level = CompLevel_full_profile; } if (cur_level != next_level) { - if (!maybe_switch_to_aot(mh, cur_level, next_level, thread) && !CompileBroker::compilation_is_in_queue(mh)) { - compile(mh, InvocationEntryBci, next_level, thread); + if (!maybe_switch_to_aot(mh, cur_level, next_level, THREAD) && !CompileBroker::compilation_is_in_queue(mh)) { + compile(mh, InvocationEntryBci, next_level, THREAD); } } } } else { cur_level = comp_level(mh()); - next_level = call_event(mh, cur_level, thread); + next_level = call_event(mh, cur_level, THREAD); if (next_level != cur_level) { - if (!maybe_switch_to_aot(mh, cur_level, next_level, thread) && !CompileBroker::compilation_is_in_queue(mh)) { - compile(mh, InvocationEntryBci, next_level, thread); + if (!maybe_switch_to_aot(mh, cur_level, next_level, THREAD) && !CompileBroker::compilation_is_in_queue(mh)) { + compile(mh, InvocationEntryBci, next_level, THREAD); } } } diff --git a/src/hotspot/share/compiler/tieredThresholdPolicy.hpp b/src/hotspot/share/compiler/tieredThresholdPolicy.hpp index cc422ac2a03..3074ba9da46 100644 --- a/src/hotspot/share/compiler/tieredThresholdPolicy.hpp +++ b/src/hotspot/share/compiler/tieredThresholdPolicy.hpp @@ -166,8 +166,6 @@ class TieredThresholdPolicy : public CompilationPolicy { jlong _start_time; int _c1_count, _c2_count; - // Check if the counter is big enough and set carry (effectively infinity). - inline void set_carry_if_necessary(InvocationCounter *counter); // Set carry flags in the counters (in Method* and MDO). inline void handle_counter_overflow(Method* method); // Verify that a level is consistent with the compilation mode @@ -187,10 +185,10 @@ class TieredThresholdPolicy : public CompilationPolicy { // Transition functions. // call_event determines if a method should be compiled at a different // level with a regular invocation entry. - CompLevel call_event(const methodHandle& method, CompLevel cur_level, JavaThread* thread); + CompLevel call_event(const methodHandle& method, CompLevel cur_level, Thread* thread); // loop_event checks if a method should be OSR compiled at a different // level. - CompLevel loop_event(const methodHandle& method, CompLevel cur_level, JavaThread* thread); + CompLevel loop_event(const methodHandle& method, CompLevel cur_level, Thread* thread); void print_counters(const char* prefix, Method* m); // Has a method been long around? // We don't remove old methods from the compile queue even if they have @@ -213,13 +211,13 @@ class TieredThresholdPolicy : public CompilationPolicy { // determines whether we should do that. inline bool should_create_mdo(const methodHandle& method, CompLevel cur_level); // Create MDO if necessary. - void create_mdo(const methodHandle& mh, JavaThread* thread); + void create_mdo(const methodHandle& mh, Thread* thread); // Is method profiled enough? bool is_method_profiled(const methodHandle& method); double _increase_threshold_at_ratio; - bool maybe_switch_to_aot(const methodHandle& mh, CompLevel cur_level, CompLevel next_level, JavaThread* thread); + bool maybe_switch_to_aot(const methodHandle& mh, CompLevel cur_level, CompLevel next_level, Thread* thread); int c1_count() const { return _c1_count; } int c2_count() const { return _c2_count; } @@ -229,7 +227,7 @@ class TieredThresholdPolicy : public CompilationPolicy { enum EventType { CALL, LOOP, COMPILE, REMOVE_FROM_QUEUE, UPDATE_IN_QUEUE, REPROFILE, MAKE_NOT_ENTRANT }; void print_event(EventType type, Method* m, Method* im, int bci, CompLevel level); // Check if the method can be compiled, change level if necessary - void compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread); + void compile(const methodHandle& mh, int bci, CompLevel level, TRAPS); // Simple methods are as good being compiled with C1 as C2. // This function tells if it's such a function. inline static bool is_trivial(Method* method); @@ -244,9 +242,9 @@ class TieredThresholdPolicy : public CompilationPolicy { // Get a compilation level for a given method. static CompLevel comp_level(Method* method); void method_invocation_event(const methodHandle& method, const methodHandle& inlinee, - CompLevel level, CompiledMethod* nm, JavaThread* thread); + CompLevel level, CompiledMethod* nm, TRAPS); void method_back_branch_event(const methodHandle& method, const methodHandle& inlinee, - int bci, CompLevel level, CompiledMethod* nm, JavaThread* thread); + int bci, CompLevel level, CompiledMethod* nm, TRAPS); void set_increase_threshold_at_ratio() { _increase_threshold_at_ratio = 100 / (100 - (double)IncreaseFirstTierCompileThresholdAt); } void set_start_time(jlong t) { _start_time = t; } @@ -266,7 +264,7 @@ class TieredThresholdPolicy : public CompilationPolicy { virtual void disable_compilation(Method* method) { } virtual void reprofile(ScopeDesc* trap_scope, bool is_osr); virtual nmethod* event(const methodHandle& method, const methodHandle& inlinee, - int branch_bci, int bci, CompLevel comp_level, CompiledMethod* nm, JavaThread* thread); + int branch_bci, int bci, CompLevel comp_level, CompiledMethod* nm, TRAPS); // Select task is called by CompileBroker. We should return a task or NULL. virtual CompileTask* select_task(CompileQueue* compile_queue); // Tell the runtime if we think a given method is adequately profiled. diff --git a/src/hotspot/share/gc/epsilon/epsilonHeap.hpp b/src/hotspot/share/gc/epsilon/epsilonHeap.hpp index f08c67a3c89..2d90439a1ee 100644 --- a/src/hotspot/share/gc/epsilon/epsilonHeap.hpp +++ b/src/hotspot/share/gc/epsilon/epsilonHeap.hpp @@ -95,7 +95,6 @@ class EpsilonHeap : public CollectedHeap { size_t* actual_size); // TLAB allocation - virtual bool supports_tlab_allocation() const { return true; } virtual size_t tlab_capacity(Thread* thr) const { return capacity(); } virtual size_t tlab_used(Thread* thr) const { return used(); } virtual size_t max_tlab_size() const { return _max_tlab_size; } diff --git a/src/hotspot/share/gc/epsilon/epsilonInitLogger.cpp b/src/hotspot/share/gc/epsilon/epsilonInitLogger.cpp index c18bc1d8206..1006e848b5d 100644 --- a/src/hotspot/share/gc/epsilon/epsilonInitLogger.cpp +++ b/src/hotspot/share/gc/epsilon/epsilonInitLogger.cpp @@ -27,6 +27,7 @@ #include "gc/epsilon/epsilonInitLogger.hpp" #include "logging/log.hpp" #include "runtime/globals.hpp" +#include "runtime/globals_extension.hpp" #include "utilities/globalDefinitions.hpp" void EpsilonInitLogger::print_gc_specific() { diff --git a/src/hotspot/share/gc/g1/g1Analytics.cpp b/src/hotspot/share/gc/g1/g1Analytics.cpp index c817d27a899..db8c1384fb4 100644 --- a/src/hotspot/share/gc/g1/g1Analytics.cpp +++ b/src/hotspot/share/gc/g1/g1Analytics.cpp @@ -151,7 +151,8 @@ void G1Analytics::report_alloc_rate_ms(double alloc_rate) { void G1Analytics::compute_pause_time_ratios(double end_time_sec, double pause_time_ms) { double long_interval_ms = (end_time_sec - oldest_known_gc_end_time_sec()) * 1000.0; - _long_term_pause_time_ratio = _recent_gc_times_ms->sum() / long_interval_ms; + double gc_pause_time_ms = _recent_gc_times_ms->sum() - _recent_gc_times_ms->oldest() + pause_time_ms; + _long_term_pause_time_ratio = gc_pause_time_ms / long_interval_ms; _long_term_pause_time_ratio = clamp(_long_term_pause_time_ratio, 0.0, 1.0); double short_interval_ms = (end_time_sec - most_recent_gc_end_time_sec()) * 1000.0; @@ -224,11 +225,7 @@ void G1Analytics::report_rs_length(double rs_length) { } double G1Analytics::predict_alloc_rate_ms() const { - if (enough_samples_available(_alloc_rate_ms_seq)) { - return predict_zero_bounded(_alloc_rate_ms_seq); - } else { - return 0.0; - } + return predict_zero_bounded(_alloc_rate_ms_seq); } double G1Analytics::predict_concurrent_refine_rate_ms() const { @@ -323,7 +320,6 @@ void G1Analytics::update_recent_gc_times(double end_time_sec, double pause_time_ms) { _recent_gc_times_ms->add(pause_time_ms); _recent_prev_end_times_for_all_gcs_sec->add(end_time_sec); - _prev_collection_pause_end_ms = end_time_sec * 1000.0; } void G1Analytics::report_concurrent_mark_cleanup_times_ms(double ms) { diff --git a/src/hotspot/share/gc/g1/g1Analytics.hpp b/src/hotspot/share/gc/g1/g1Analytics.hpp index 8057f375db3..172c630b563 100644 --- a/src/hotspot/share/gc/g1/g1Analytics.hpp +++ b/src/hotspot/share/gc/g1/g1Analytics.hpp @@ -114,6 +114,10 @@ class G1Analytics: public CHeapObj<mtGC> { _prev_collection_pause_end_ms += ms; } + void set_prev_collection_pause_end_ms(double ms) { + _prev_collection_pause_end_ms = ms; + } + void report_concurrent_mark_remark_times_ms(double ms); void report_concurrent_mark_cleanup_times_ms(double ms); void report_alloc_rate_ms(double alloc_rate); diff --git a/src/hotspot/share/gc/g1/g1CardTable.hpp b/src/hotspot/share/gc/g1/g1CardTable.hpp index aa3b7946618..3540bb9411a 100644 --- a/src/hotspot/share/gc/g1/g1CardTable.hpp +++ b/src/hotspot/share/gc/g1/g1CardTable.hpp @@ -84,6 +84,7 @@ class G1CardTable : public CardTable { } static CardValue g1_young_card_val() { return g1_young_gen; } + static CardValue g1_scanned_card_val() { return g1_card_already_scanned; } void verify_g1_young_region(MemRegion mr) PRODUCT_RETURN; void g1_mark_as_young(const MemRegion& mr); @@ -103,8 +104,8 @@ class G1CardTable : public CardTable { // be inaccurate as it does not perform the dirtying atomically. inline size_t mark_region_dirty(size_t start_card_index, size_t num_cards); - // Mark the given range of cards as Scanned. All of these cards must be Dirty. - inline void mark_as_scanned(size_t start_card_index, size_t num_cards); + // Change the given range of dirty cards to "which". All of these cards must be Dirty. + inline void change_dirty_cards_to(size_t start_card_index, size_t num_cards, CardValue which); inline uint region_idx_for(CardValue* p); diff --git a/src/hotspot/share/gc/g1/g1CardTable.inline.hpp b/src/hotspot/share/gc/g1/g1CardTable.inline.hpp index 9e95cfc3630..ae9637a0d14 100644 --- a/src/hotspot/share/gc/g1/g1CardTable.inline.hpp +++ b/src/hotspot/share/gc/g1/g1CardTable.inline.hpp @@ -77,14 +77,14 @@ inline size_t G1CardTable::mark_region_dirty(size_t start_card_index, size_t num return result; } -inline void G1CardTable::mark_as_scanned(size_t start_card_index, size_t num_cards) { +inline void G1CardTable::change_dirty_cards_to(size_t start_card_index, size_t num_cards, CardValue which) { CardValue* start = &_byte_map[start_card_index]; CardValue* const end = start + num_cards; while (start < end) { CardValue value = *start; assert(value == dirty_card_val(), "Must have been dirty %d start " PTR_FORMAT " " PTR_FORMAT, value, p2i(start), p2i(end)); - *start++ = g1_card_already_scanned; + *start++ = which; } } diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp index ab28e850a33..d55d10a25eb 100644 --- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp +++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp @@ -850,7 +850,7 @@ HeapWord* G1CollectedHeap::attempt_allocation_humongous(size_t word_size) { // before the allocation is that we avoid having to keep track of the newly // allocated memory while we do a GC. if (policy()->need_to_start_conc_mark("concurrent humongous allocation", - word_size)) { + word_size)) { collect(GCCause::_g1_humongous_allocation); } @@ -1677,21 +1677,22 @@ jint G1CollectedHeap::initialize() { // 6843694 - ensure that the maximum region index can fit // in the remembered set structures. const uint max_region_idx = (1U << (sizeof(RegionIdx_t)*BitsPerByte-1)) - 1; - guarantee((max_regions() - 1) <= max_region_idx, "too many regions"); + guarantee((max_reserved_regions() - 1) <= max_region_idx, "too many regions"); // The G1FromCardCache reserves card with value 0 as "invalid", so the heap must not // start within the first card. guarantee(heap_rs.base() >= (char*)G1CardTable::card_size, "Java heap must not start within the first card."); + G1FromCardCache::initialize(max_reserved_regions()); // Also create a G1 rem set. _rem_set = new G1RemSet(this, _card_table, _hot_card_cache); - _rem_set->initialize(max_regions()); + _rem_set->initialize(max_reserved_regions()); size_t max_cards_per_region = ((size_t)1 << (sizeof(CardIdx_t)*BitsPerByte-1)) - 1; guarantee(HeapRegion::CardsPerRegion > 0, "make sure it's initialized"); guarantee(HeapRegion::CardsPerRegion < max_cards_per_region, "too many cards per region"); - FreeRegionList::set_unrealistically_long_length(max_expandable_regions() + 1); + FreeRegionList::set_unrealistically_long_length(max_regions() + 1); _bot = new G1BlockOffsetTable(reserved(), bot_storage); @@ -1713,7 +1714,7 @@ jint G1CollectedHeap::initialize() { _numa->set_region_info(HeapRegion::GrainBytes, page_size); // Create the G1ConcurrentMark data structure and thread. - // (Must do this late, so that "max_regions" is defined.) + // (Must do this late, so that "max_[reserved_]regions" is defined.) _cm = new G1ConcurrentMark(this, prev_bitmap_storage, next_bitmap_storage); _cm_thread = _cm->cm_thread(); @@ -1765,7 +1766,7 @@ jint G1CollectedHeap::initialize() { _preserved_marks_set.init(ParallelGCThreads); - _collection_set.initialize(max_regions()); + _collection_set.initialize(max_reserved_regions()); G1InitLogger::print(); @@ -2368,10 +2369,6 @@ bool G1CollectedHeap::block_is_obj(const HeapWord* addr) const { return hr->block_is_obj(addr); } -bool G1CollectedHeap::supports_tlab_allocation() const { - return true; -} - size_t G1CollectedHeap::tlab_capacity(Thread* ignored) const { return (_policy->young_list_target_length() - _survivor.length()) * HeapRegion::GrainBytes; } @@ -2391,7 +2388,7 @@ size_t G1CollectedHeap::unsafe_max_tlab_alloc(Thread* ignored) const { } size_t G1CollectedHeap::max_capacity() const { - return _hrm->max_expandable_length() * HeapRegion::GrainBytes; + return max_regions() * HeapRegion::GrainBytes; } void G1CollectedHeap::deduplicate_string(oop str) { @@ -2716,12 +2713,18 @@ HeapWord* G1CollectedHeap::do_collection_pause(size_t word_size, return result; } -void G1CollectedHeap::do_concurrent_mark() { +void G1CollectedHeap::start_concurrent_cycle(bool concurrent_operation_is_full_mark) { + assert(!_cm_thread->in_progress(), "Can not start concurrent operation while in progress"); + MutexLocker x(CGC_lock, Mutex::_no_safepoint_check_flag); - if (!_cm_thread->in_progress()) { - _cm_thread->set_started(); - CGC_lock->notify(); + if (concurrent_operation_is_full_mark) { + _cm->post_concurrent_mark_start(); + _cm_thread->start_full_mark(); + } else { + _cm->post_concurrent_undo_start(); + _cm_thread->start_undo_mark(); } + CGC_lock->notify(); } bool G1CollectedHeap::is_potential_eager_reclaim_candidate(HeapRegion* r) const { @@ -2974,13 +2977,11 @@ void G1CollectedHeap::do_collection_pause_at_safepoint_helper(double target_paus // We also do not allow mixed GCs during marking. assert(!collector_state()->mark_or_rebuild_in_progress() || collector_state()->in_young_only_phase(), "sanity"); - // Record whether this pause is a concurrent start. When the current - // thread has completed its logging output and it's safe to signal - // the CM thread, the flag's value in the policy has been reset. - bool should_start_conc_mark = collector_state()->in_concurrent_start_gc(); - if (should_start_conc_mark) { - _cm->gc_tracer_cm()->set_gc_cause(gc_cause()); - } + // Record whether this pause may need to trigger a concurrent operation. Later, + // when we signal the G1ConcurrentMarkThread, the collector state has already + // been reset for the next pause. + bool should_start_concurrent_mark_operation = collector_state()->in_concurrent_start_gc(); + bool concurrent_operation_is_full_mark = false; // Inner scope for scope based logging, timers, and stats collection { @@ -3044,10 +3045,11 @@ void G1CollectedHeap::do_collection_pause_at_safepoint_helper(double target_paus collection_set()->optional_region_length()); pre_evacuate_collection_set(evacuation_info, &per_thread_states); + bool may_do_optional_evacuation = _collection_set.optional_region_length() != 0; // Actually do the work... - evacuate_initial_collection_set(&per_thread_states); + evacuate_initial_collection_set(&per_thread_states, may_do_optional_evacuation); - if (_collection_set.optional_region_length() != 0) { + if (may_do_optional_evacuation) { evacuate_optional_collection_set(&per_thread_states); } post_evacuate_collection_set(evacuation_info, &rdcqs, &per_thread_states); @@ -3057,25 +3059,19 @@ void G1CollectedHeap::do_collection_pause_at_safepoint_helper(double target_paus _survivor_evac_stats.adjust_desired_plab_sz(); _old_evac_stats.adjust_desired_plab_sz(); - if (should_start_conc_mark) { - // We have to do this before we notify the CM threads that - // they can start working to make sure that all the - // appropriate initialization is done on the CM object. - concurrent_mark()->post_concurrent_start(); - // Note that we don't actually trigger the CM thread at - // this point. We do that later when we're sure that - // the current thread has completed its logging output. - } - allocate_dummy_regions(); _allocator->init_mutator_alloc_regions(); expand_heap_after_young_collection(); + // Refine the type of a concurrent mark operation now that we did the + // evacuation, eventually aborting it. + concurrent_operation_is_full_mark = policy()->concurrent_operation_is_full_mark("Revise IHOP"); + double sample_end_time_sec = os::elapsedTime(); double pause_time_ms = (sample_end_time_sec - sample_start_time_sec) * MILLIUNITS; - policy()->record_collection_pause_end(pause_time_ms); + policy()->record_collection_pause_end(pause_time_ms, concurrent_operation_is_full_mark); } verify_after_young_collection(verify_type); @@ -3116,13 +3112,13 @@ void G1CollectedHeap::do_collection_pause_at_safepoint_helper(double target_paus // without its logging output interfering with the logging output // that came from the pause. - if (should_start_conc_mark) { - // CAUTION: after the doConcurrentMark() call below, the concurrent marking + if (should_start_concurrent_mark_operation) { + // CAUTION: after the start_concurrent_cycle() call below, the concurrent marking // thread(s) could be running concurrently with us. Make sure that anything // after this point does not assume that we are the only GC thread running. // Note: of course, the actual marking work will not start until the safepoint // itself is released in SuspendibleThreadSet::desynchronize(). - do_concurrent_mark(); + start_concurrent_cycle(concurrent_operation_is_full_mark); ConcurrentGCBreakpoints::notify_idle_to_active(); } } @@ -3732,7 +3728,7 @@ void G1CollectedHeap::pre_evacuate_collection_set(G1EvacuationInfo& evacuation_i // Concurrent start needs claim bits to keep track of the marked-through CLDs. if (collector_state()->in_concurrent_start_gc()) { - concurrent_mark()->pre_concurrent_start(); + concurrent_mark()->pre_concurrent_start(gc_cause()); double start_clear_claimed_marks = os::elapsedTime(); @@ -3819,10 +3815,11 @@ class G1EvacuateRegionsBaseTask : public AbstractGangTask { class G1EvacuateRegionsTask : public G1EvacuateRegionsBaseTask { G1RootProcessor* _root_processor; + bool _has_optional_evacuation_work; void scan_roots(G1ParScanThreadState* pss, uint worker_id) { _root_processor->evacuate_roots(pss, worker_id); - _g1h->rem_set()->scan_heap_roots(pss, worker_id, G1GCPhaseTimes::ScanHR, G1GCPhaseTimes::ObjCopy); + _g1h->rem_set()->scan_heap_roots(pss, worker_id, G1GCPhaseTimes::ScanHR, G1GCPhaseTimes::ObjCopy, _has_optional_evacuation_work); _g1h->rem_set()->scan_collection_set_regions(pss, worker_id, G1GCPhaseTimes::ScanHR, G1GCPhaseTimes::CodeRoots, G1GCPhaseTimes::ObjCopy); } @@ -3843,13 +3840,16 @@ class G1EvacuateRegionsTask : public G1EvacuateRegionsBaseTask { G1ParScanThreadStateSet* per_thread_states, G1ScannerTasksQueueSet* task_queues, G1RootProcessor* root_processor, - uint num_workers) : + uint num_workers, + bool has_optional_evacuation_work) : G1EvacuateRegionsBaseTask("G1 Evacuate Regions", per_thread_states, task_queues, num_workers), - _root_processor(root_processor) + _root_processor(root_processor), + _has_optional_evacuation_work(has_optional_evacuation_work) { } }; -void G1CollectedHeap::evacuate_initial_collection_set(G1ParScanThreadStateSet* per_thread_states) { +void G1CollectedHeap::evacuate_initial_collection_set(G1ParScanThreadStateSet* per_thread_states, + bool has_optional_evacuation_work) { G1GCPhaseTimes* p = phase_times(); { @@ -3864,7 +3864,12 @@ void G1CollectedHeap::evacuate_initial_collection_set(G1ParScanThreadStateSet* p Ticks start_processing = Ticks::now(); { G1RootProcessor root_processor(this, num_workers); - G1EvacuateRegionsTask g1_par_task(this, per_thread_states, _task_queues, &root_processor, num_workers); + G1EvacuateRegionsTask g1_par_task(this, + per_thread_states, + _task_queues, + &root_processor, + num_workers, + has_optional_evacuation_work); task_time = run_task_timed(&g1_par_task); // Closing the inner scope will execute the destructor for the G1RootProcessor object. // To extract its code root fixup time we measure total time of this scope and @@ -3874,12 +3879,14 @@ void G1CollectedHeap::evacuate_initial_collection_set(G1ParScanThreadStateSet* p p->record_initial_evac_time(task_time.seconds() * 1000.0); p->record_or_add_code_root_fixup_time((total_processing - task_time).seconds() * 1000.0); + + rem_set()->complete_evac_phase(has_optional_evacuation_work); } class G1EvacuateOptionalRegionsTask : public G1EvacuateRegionsBaseTask { void scan_roots(G1ParScanThreadState* pss, uint worker_id) { - _g1h->rem_set()->scan_heap_roots(pss, worker_id, G1GCPhaseTimes::OptScanHR, G1GCPhaseTimes::OptObjCopy); + _g1h->rem_set()->scan_heap_roots(pss, worker_id, G1GCPhaseTimes::OptScanHR, G1GCPhaseTimes::OptObjCopy, true /* remember_already_scanned_cards */); _g1h->rem_set()->scan_collection_set_regions(pss, worker_id, G1GCPhaseTimes::OptScanHR, G1GCPhaseTimes::OptCodeRoots, G1GCPhaseTimes::OptObjCopy); } @@ -3939,6 +3946,8 @@ void G1CollectedHeap::evacuate_optional_collection_set(G1ParScanThreadStateSet* evacuate_next_optional_regions(per_thread_states); phase_times()->record_or_add_optional_evac_time((Ticks::now() - start).seconds() * 1000.0); } + + rem_set()->complete_evac_phase(true /* has_more_than_one_evacuation_phase */); } _collection_set.abandon_optional_collection_set(per_thread_states); diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp index 2f325819186..4c98d5f38d9 100644 --- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp +++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp @@ -101,7 +101,7 @@ class G1EvacSummary; typedef OverflowTaskQueue<ScannerTask, mtGC> G1ScannerTasksQueue; typedef GenericTaskQueueSet<G1ScannerTasksQueue, mtGC> G1ScannerTasksQueueSet; -typedef int RegionIdx_t; // needs to hold [ 0..max_regions() ) +typedef int RegionIdx_t; // needs to hold [ 0..max_reserved_regions() ) typedef int CardIdx_t; // needs to hold [ 0..CardsPerRegion ) // The G1 STW is alive closure. @@ -746,6 +746,9 @@ class G1CollectedHeap : public CollectedHeap { void reset_taskqueue_stats(); #endif // TASKQUEUE_STATS + // Start a concurrent cycle. + void start_concurrent_cycle(bool concurrent_operation_is_full_mark); + // Schedule the VM operation that will do an evacuation pause to // satisfy an allocation request of word_size. *succeeded will // return whether the VM operation was successful (it did do an @@ -782,7 +785,23 @@ class G1CollectedHeap : public CollectedHeap { void calculate_collection_set(G1EvacuationInfo& evacuation_info, double target_pause_time_ms); // Actually do the work of evacuating the parts of the collection set. - void evacuate_initial_collection_set(G1ParScanThreadStateSet* per_thread_states); + // The has_optional_evacuation_work flag for the initial collection set + // evacuation indicates whether one or more optional evacuation steps may + // follow. + // If not set, G1 can avoid clearing the card tables of regions that we scan + // for roots from the heap: when scanning the card table for dirty cards after + // all remembered sets have been dumped onto it, for optional evacuation we + // mark these cards as "Scanned" to know that we do not need to re-scan them + // in the additional optional evacuation passes. This means that in the "Clear + // Card Table" phase we need to clear those marks. However, if there is no + // optional evacuation, g1 can immediately clean the dirty cards it encounters + // as nobody else will be looking at them again, saving the clear card table + // work later. + // This case is very common (young only collections and most mixed gcs), so + // depending on the ratio between scanned and evacuated regions (which g1 always + // needs to clear), this is a big win. + void evacuate_initial_collection_set(G1ParScanThreadStateSet* per_thread_states, + bool has_optional_evacuation_work); void evacuate_optional_collection_set(G1ParScanThreadStateSet* per_thread_states); private: // Evacuate the next set of optional regions. @@ -1061,11 +1080,12 @@ class G1CollectedHeap : public CollectedHeap { // The current number of regions in the heap. uint num_regions() const { return _hrm->length(); } - // The max number of regions in the heap. - uint max_regions() const { return _hrm->max_length(); } + // The max number of regions reserved for the heap. Except for static array + // sizing purposes you probably want to use max_regions(). + uint max_reserved_regions() const { return _hrm->reserved_length(); } - // Max number of regions that can be comitted. - uint max_expandable_regions() const { return _hrm->max_expandable_length(); } + // Max number of regions that can be committed. + uint max_regions() const { return _hrm->max_length(); } // The number of regions that are completely free. uint num_free_regions() const { return _hrm->num_free_regions(); } @@ -1248,7 +1268,6 @@ class G1CollectedHeap : public CollectedHeap { // Section on thread-local allocation buffers (TLABs) // See CollectedHeap for semantics. - bool supports_tlab_allocation() const; size_t tlab_capacity(Thread* ignored) const; size_t tlab_used(Thread* ignored) const; size_t max_tlab_size() const; @@ -1306,16 +1325,6 @@ class G1CollectedHeap : public CollectedHeap { bool check_young_list_empty(); #endif - // *** Stuff related to concurrent marking. It's not clear to me that so - // many of these need to be public. - - // The functions below are helper functions that a subclass of - // "CollectedHeap" can use in the implementation of its virtual - // functions. - // This performs a concurrent marking of the live objects in a - // bitmap off to the side. - void do_concurrent_mark(); - bool is_marked_next(oop obj) const; // Determine if an object is dead, given the object and also diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp index a0133f31343..fa350232846 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp @@ -62,6 +62,7 @@ #include "oops/access.inline.hpp" #include "oops/oop.inline.hpp" #include "runtime/atomic.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/handles.inline.hpp" #include "runtime/java.hpp" #include "runtime/orderAccess.hpp" @@ -405,8 +406,8 @@ G1ConcurrentMark::G1ConcurrentMark(G1CollectedHeap* g1h, _num_concurrent_workers(0), _max_concurrent_workers(0), - _region_mark_stats(NEW_C_HEAP_ARRAY(G1RegionMarkStats, _g1h->max_regions(), mtGC)), - _top_at_rebuild_starts(NEW_C_HEAP_ARRAY(HeapWord*, _g1h->max_regions(), mtGC)) + _region_mark_stats(NEW_C_HEAP_ARRAY(G1RegionMarkStats, _g1h->max_reserved_regions(), mtGC)), + _top_at_rebuild_starts(NEW_C_HEAP_ARRAY(HeapWord*, _g1h->max_reserved_regions(), mtGC)) { assert(CGC_lock != NULL, "CGC_lock must be initialized"); @@ -462,8 +463,8 @@ void G1ConcurrentMark::reset() { _tasks[i]->reset(_next_mark_bitmap); } - uint max_regions = _g1h->max_regions(); - for (uint i = 0; i < max_regions; i++) { + uint max_reserved_regions = _g1h->max_reserved_regions(); + for (uint i = 0; i < max_reserved_regions; i++) { _top_at_rebuild_starts[i] = NULL; _region_mark_stats[i].clear(); } @@ -518,8 +519,8 @@ void G1ConcurrentMark::reset_marking_for_restart() { if (has_overflown()) { _global_mark_stack.expand(); - uint max_regions = _g1h->max_regions(); - for (uint i = 0; i < max_regions; i++) { + uint max_reserved_regions = _g1h->max_reserved_regions(); + for (uint i = 0; i < max_reserved_regions; i++) { _region_mark_stats[i].clear_during_overflow(); } } @@ -606,7 +607,7 @@ class G1ClearBitMapTask : public AbstractGangTask { // as asserts here to minimize their overhead on the product. However, we // will have them as guarantees at the beginning / end of the bitmap // clearing to get some checking in the product. - assert(_cm == NULL || _cm->cm_thread()->during_cycle(), "invariant"); + assert(_cm == NULL || _cm->cm_thread()->in_progress(), "invariant"); assert(_cm == NULL || !G1CollectedHeap::heap()->collector_state()->mark_or_rebuild_in_progress(), "invariant"); } assert(cur == end, "Must have completed iteration over the bitmap for region %u.", r->hrm_index()); @@ -655,7 +656,7 @@ void G1ConcurrentMark::clear_bitmap(G1CMBitMap* bitmap, WorkGang* workers, bool void G1ConcurrentMark::cleanup_for_next_mark() { // Make sure that the concurrent mark thread looks to still be in // the current cycle. - guarantee(cm_thread()->during_cycle(), "invariant"); + guarantee(cm_thread()->in_progress(), "invariant"); // We are finishing up the current cycle by clearing the next // marking bitmap and getting it ready for the next cycle. During @@ -666,7 +667,7 @@ void G1ConcurrentMark::cleanup_for_next_mark() { clear_bitmap(_next_mark_bitmap, _concurrent_workers, true); // Repeat the asserts from above. - guarantee(cm_thread()->during_cycle(), "invariant"); + guarantee(cm_thread()->in_progress(), "invariant"); guarantee(!_g1h->collector_state()->mark_or_rebuild_in_progress(), "invariant"); } @@ -683,7 +684,7 @@ class NoteStartOfMarkHRClosure : public HeapRegionClosure { } }; -void G1ConcurrentMark::pre_concurrent_start() { +void G1ConcurrentMark::pre_concurrent_start(GCCause::Cause cause) { assert_at_safepoint_on_vm_thread(); // Reset marking state. @@ -694,10 +695,12 @@ void G1ConcurrentMark::pre_concurrent_start() { _g1h->heap_region_iterate(&startcl); _root_regions.reset(); + + _gc_tracer_cm->set_gc_cause(cause); } -void G1ConcurrentMark::post_concurrent_start() { +void G1ConcurrentMark::post_concurrent_mark_start() { // Start Concurrent Marking weak-reference discovery. ReferenceProcessor* rp = _g1h->ref_processor_cm(); // enable ("weak") refs discovery @@ -718,6 +721,10 @@ void G1ConcurrentMark::post_concurrent_start() { // during it. No need to call it here. } +void G1ConcurrentMark::post_concurrent_undo_start() { + root_regions()->cancel_scan(); +} + /* * Notice that in the next two methods, we actually leave the STS * during the barrier sync and join it immediately afterwards. If we @@ -1955,7 +1962,7 @@ void G1ConcurrentMark::print_stats() { } void G1ConcurrentMark::concurrent_cycle_abort() { - if (!cm_thread()->during_cycle() || _has_aborted) { + if (!cm_thread()->in_progress() || _has_aborted) { // We haven't started a concurrent cycle or we have already aborted it. No need to do anything. return; } diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp b/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp index c5c7072eb10..6ac83ba4953 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp @@ -30,12 +30,14 @@ #include "gc/g1/g1HeapVerifier.hpp" #include "gc/g1/g1RegionMarkStatsCache.hpp" #include "gc/g1/heapRegionSet.hpp" +#include "gc/shared/gcCause.hpp" #include "gc/shared/taskTerminator.hpp" #include "gc/shared/taskqueue.hpp" #include "gc/shared/verifyOption.hpp" #include "gc/shared/workgroup.hpp" #include "memory/allocation.hpp" #include "utilities/compilerWarnings.hpp" +#include "utilities/numberSeq.hpp" class ConcurrentGCTimer; class G1ConcurrentMarkThread; @@ -305,7 +307,7 @@ class G1ConcurrentMark : public CHeapObj<mtGC> { MemRegion const _heap; // Root region tracking and claiming - G1CMRootMemRegions _root_regions; + G1CMRootMemRegions _root_regions; // For grey objects G1CMMarkStack _global_mark_stack; // Grey objects behind global finger @@ -542,8 +544,9 @@ class G1ConcurrentMark : public CHeapObj<mtGC> { // These two methods do the work that needs to be done at the start and end of the // concurrent start pause. - void pre_concurrent_start(); - void post_concurrent_start(); + void pre_concurrent_start(GCCause::Cause cause); + void post_concurrent_mark_start(); + void post_concurrent_undo_start(); // Scan all the root regions and mark everything reachable from // them. @@ -594,7 +597,6 @@ class G1ConcurrentMark : public CHeapObj<mtGC> { inline bool is_marked_in_next_bitmap(oop p) const; ConcurrentGCTimer* gc_timer_cm() const { return _gc_timer_cm; } - G1OldTracer* gc_tracer_cm() const { return _gc_tracer_cm; } private: // Rebuilds the remembered sets for chosen regions in parallel and concurrently to the application. diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMark.inline.hpp b/src/hotspot/share/gc/g1/g1ConcurrentMark.inline.hpp index 3189c27db7b..bd797e6eb9c 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentMark.inline.hpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.inline.hpp @@ -182,13 +182,13 @@ inline size_t G1CMTask::scan_objArray(objArrayOop obj, MemRegion mr) { } inline HeapWord* G1ConcurrentMark::top_at_rebuild_start(uint region) const { - assert(region < _g1h->max_regions(), "Tried to access TARS for region %u out of bounds", region); + assert(region < _g1h->max_reserved_regions(), "Tried to access TARS for region %u out of bounds", region); return _top_at_rebuild_starts[region]; } inline void G1ConcurrentMark::update_top_at_rebuild_start(HeapRegion* r) { uint const region = r->hrm_index(); - assert(region < _g1h->max_regions(), "Tried to access TARS for region %u out of bounds", region); + assert(region < _g1h->max_reserved_regions(), "Tried to access TARS for region %u out of bounds", region); assert(_top_at_rebuild_starts[region] == NULL, "TARS for region %u has already been set to " PTR_FORMAT " should be NULL", region, p2i(_top_at_rebuild_starts[region])); diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp b/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp index e204fb2d9bc..23879d7bbed 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp @@ -42,6 +42,7 @@ #include "runtime/handles.inline.hpp" #include "runtime/vmThread.hpp" #include "utilities/debug.hpp" +#include "utilities/formatBuffer.hpp" #include "utilities/ticks.hpp" G1ConcurrentMarkThread::G1ConcurrentMarkThread(G1ConcurrentMark* cm) : @@ -135,13 +136,22 @@ void G1ConcurrentMarkThread::run_service() { _vtime_start = os::elapsedVTime(); while (wait_for_next_cycle()) { + assert(in_progress(), "must be"); GCIdMark gc_id_mark; - GCTraceConcTime(Info, gc) tt("Concurrent Cycle"); + GCTraceConcTime(Info, gc) tt(FormatBuffer<128>("Concurrent %s Cycle", + _state == FullMark ? "Mark" : "Undo")); concurrent_cycle_start(); - full_concurrent_cycle_do(); - concurrent_cycle_end(); + + if (_state == FullMark) { + concurrent_mark_cycle_do(); + } else { + assert(_state == UndoMark, "Must do undo mark but is %d", _state); + concurrent_undo_cycle_do(); + } + + concurrent_cycle_end(_state == FullMark && !_cm->has_aborted()); _vtime_accum = (os::elapsedVTime() - _vtime_start); } @@ -154,17 +164,11 @@ void G1ConcurrentMarkThread::stop_service() { } bool G1ConcurrentMarkThread::wait_for_next_cycle() { - assert(!in_progress(), "should have been cleared"); - MonitorLocker ml(CGC_lock, Mutex::_no_safepoint_check_flag); - while (!started() && !should_terminate()) { + while (!in_progress() && !should_terminate()) { ml.wait(); } - if (started()) { - set_in_progress(); - } - return !should_terminate(); } @@ -269,7 +273,7 @@ void G1ConcurrentMarkThread::concurrent_cycle_start() { _cm->concurrent_cycle_start(); } -void G1ConcurrentMarkThread::full_concurrent_cycle_do() { +void G1ConcurrentMarkThread::concurrent_mark_cycle_do() { HandleMark hm(Thread::current()); ResourceMark rm; @@ -289,6 +293,9 @@ void G1ConcurrentMarkThread::full_concurrent_cycle_do() { // // For the same reason ConcurrentGCBreakpoints (in the phase methods) before // here risk deadlock, because a young GC must wait for root region scanning. + // + // We can not easily abort before root region scan either because of the + // reasons mentioned in G1CollectedHeap::abort_concurrent_cycle(). // Phase 2: Scan root regions. if (phase_scan_root_regions()) return; @@ -309,14 +316,26 @@ void G1ConcurrentMarkThread::full_concurrent_cycle_do() { phase_clear_bitmap_for_next_mark(); } -void G1ConcurrentMarkThread::concurrent_cycle_end() { +void G1ConcurrentMarkThread::concurrent_undo_cycle_do() { + HandleMark hm(Thread::current()); + ResourceMark rm; + + // We can (and should) abort if there has been a concurrent cycle abort for + // some reason. + if (_cm->has_aborted()) { return; } + + // Phase 1: Clear bitmap for next mark. + phase_clear_bitmap_for_next_mark(); +} + +void G1ConcurrentMarkThread::concurrent_cycle_end(bool mark_cycle_completed) { // Update the number of full collections that have been // completed. This will also notify the G1OldGCCount_lock in case a // Java thread is waiting for a full GC to happen (e.g., it // called System.gc() with +ExplicitGCInvokesConcurrent). SuspendibleThreadSetJoiner sts_join; G1CollectedHeap::heap()->increment_old_marking_cycles_completed(true /* concurrent */, - !_cm->has_aborted()); + mark_cycle_completed /* heap_examined */); _cm->concurrent_cycle_end(); ConcurrentGCBreakpoints::notify_active_to_idle(); diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.hpp b/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.hpp index 1ea73abc76c..1a57e5bfd7e 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.hpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.hpp @@ -40,15 +40,15 @@ class G1ConcurrentMarkThread: public ConcurrentGCThread { G1ConcurrentMark* _cm; - enum ServiceState { + enum ServiceState : uint { Idle, - Started, - InProgress + FullMark, + UndoMark }; volatile ServiceState _state; - // Wait for next cycle. Returns false if the service should be stopped. + // Wait for next cycle. Returns the command passed over. bool wait_for_next_cycle(); bool mark_loop_needs_restart() const; @@ -74,8 +74,10 @@ class G1ConcurrentMarkThread: public ConcurrentGCThread { void concurrent_cycle_start(); - void full_concurrent_cycle_do(); - void concurrent_cycle_end(); + void concurrent_mark_cycle_do(); + void concurrent_undo_cycle_do(); + + void concurrent_cycle_end(bool mark_cycle_completed); // Delay pauses to meet MMU. void delay_to_keep_mmu(bool remark); @@ -93,24 +95,19 @@ class G1ConcurrentMarkThread: public ConcurrentGCThread { // Marking virtual time so far this thread and concurrent marking tasks. double vtime_mark_accum(); - G1ConcurrentMark* cm() { return _cm; } + G1ConcurrentMark* cm() { return _cm; } - void set_idle() { assert(_state != Started, "must not be starting a new cycle"); _state = Idle; } - bool idle() { return _state == Idle; } - void set_started() { assert(_state == Idle, "cycle in progress"); _state = Started; } - bool started() { return _state == Started; } - void set_in_progress() { assert(_state == Started, "must be starting a cycle"); _state = InProgress; } - bool in_progress() { return _state == InProgress; } + void set_idle(); + void start_full_mark(); + void start_undo_mark(); - // Returns true from the moment a marking cycle is + bool idle() const; + // Returns true from the moment a concurrent cycle is // initiated (during the concurrent start pause when started() is set) // to the moment when the cycle completes (just after the next // marking bitmap has been cleared and in_progress() is - // cleared). While during_cycle() is true we will not start another cycle - // so that cycles do not overlap. We cannot use just in_progress() - // as the CM thread might take some time to wake up before noticing - // that started() is set and set in_progress(). - bool during_cycle() { return !idle(); } + // cleared). + bool in_progress() const; }; #endif // SHARE_GC_G1_G1CONCURRENTMARKTHREAD_HPP diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.inline.hpp b/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.inline.hpp index 60769af0903..ee707cda226 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.inline.hpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.inline.hpp @@ -38,4 +38,25 @@ inline double G1ConcurrentMarkThread::vtime_mark_accum() { return _cm->all_task_accum_vtime(); } +inline void G1ConcurrentMarkThread::set_idle() { + assert(_state == FullMark || _state == UndoMark, "must not be starting a new cycle"); + _state = Idle; +} + +inline void G1ConcurrentMarkThread::start_full_mark() { + assert(_state == Idle, "cycle in progress"); + _state = FullMark; +} + +inline void G1ConcurrentMarkThread::start_undo_mark() { + assert(_state == Idle, "cycle in progress"); + _state = UndoMark; +} + +inline bool G1ConcurrentMarkThread::idle() const { return _state == Idle; } + +inline bool G1ConcurrentMarkThread::in_progress() const { + return !idle(); +} + #endif // SHARE_GC_G1_G1CONCURRENTMARKTHREAD_INLINE_HPP diff --git a/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp b/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp index b8bd67eb07a..bb9731f8b41 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp @@ -30,6 +30,7 @@ #include "logging/log.hpp" #include "memory/allocation.inline.hpp" #include "memory/iterator.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/java.hpp" #include "runtime/thread.hpp" #include "utilities/debug.hpp" diff --git a/src/hotspot/share/gc/g1/g1FromCardCache.cpp b/src/hotspot/share/gc/g1/g1FromCardCache.cpp index 1ef65898ec7..e677f04e6de 100644 --- a/src/hotspot/share/gc/g1/g1FromCardCache.cpp +++ b/src/hotspot/share/gc/g1/g1FromCardCache.cpp @@ -23,32 +23,34 @@ */ #include "precompiled.hpp" +#include "gc/g1/g1ConcurrentRefine.hpp" +#include "gc/g1/g1DirtyCardQueue.hpp" #include "gc/g1/g1FromCardCache.hpp" -#include "gc/g1/g1RemSet.hpp" #include "memory/padded.inline.hpp" +#include "runtime/globals.hpp" #include "utilities/debug.hpp" uintptr_t** G1FromCardCache::_cache = NULL; -uint G1FromCardCache::_max_regions = 0; +uint G1FromCardCache::_max_reserved_regions = 0; size_t G1FromCardCache::_static_mem_size = 0; #ifdef ASSERT uint G1FromCardCache::_max_workers = 0; #endif -void G1FromCardCache::initialize(uint num_par_rem_sets, uint max_num_regions) { - guarantee(max_num_regions > 0, "Heap size must be valid"); +void G1FromCardCache::initialize(uint max_reserved_regions) { + guarantee(max_reserved_regions > 0, "Heap size must be valid"); guarantee(_cache == NULL, "Should not call this multiple times"); - _max_regions = max_num_regions; + _max_reserved_regions = max_reserved_regions; #ifdef ASSERT - _max_workers = num_par_rem_sets; + _max_workers = num_par_rem_sets(); #endif - _cache = Padded2DArray<uintptr_t, mtGC>::create_unfreeable(_max_regions, - num_par_rem_sets, + _cache = Padded2DArray<uintptr_t, mtGC>::create_unfreeable(_max_reserved_regions, + num_par_rem_sets(), &_static_mem_size); if (AlwaysPreTouch) { - invalidate(0, _max_regions); + invalidate(0, _max_reserved_regions); } } @@ -57,9 +59,9 @@ void G1FromCardCache::invalidate(uint start_idx, size_t new_num_regions) { "Trying to invalidate beyond maximum region, from %u size " SIZE_FORMAT, start_idx, new_num_regions); uint end_idx = (start_idx + (uint)new_num_regions); - assert(end_idx <= _max_regions, "Must be within max."); + assert(end_idx <= _max_reserved_regions, "Must be within max."); - for (uint i = 0; i < G1RemSet::num_par_rem_sets(); i++) { + for (uint i = 0; i < num_par_rem_sets(); i++) { for (uint j = start_idx; j < end_idx; j++) { set(i, j, InvalidCard); } @@ -68,8 +70,8 @@ void G1FromCardCache::invalidate(uint start_idx, size_t new_num_regions) { #ifndef PRODUCT void G1FromCardCache::print(outputStream* out) { - for (uint i = 0; i < G1RemSet::num_par_rem_sets(); i++) { - for (uint j = 0; j < _max_regions; j++) { + for (uint i = 0; i < num_par_rem_sets(); i++) { + for (uint j = 0; j < _max_reserved_regions; j++) { out->print_cr("_from_card_cache[%u][%u] = " SIZE_FORMAT ".", i, j, at(i, j)); } @@ -77,8 +79,12 @@ void G1FromCardCache::print(outputStream* out) { } #endif +uint G1FromCardCache::num_par_rem_sets() { + return G1DirtyCardQueueSet::num_par_ids() + G1ConcurrentRefine::max_num_threads() + MAX2(ConcGCThreads, ParallelGCThreads); +} + void G1FromCardCache::clear(uint region_idx) { - uint num_par_remsets = G1RemSet::num_par_rem_sets(); + uint num_par_remsets = num_par_rem_sets(); for (uint i = 0; i < num_par_remsets; i++) { set(i, region_idx, InvalidCard); } diff --git a/src/hotspot/share/gc/g1/g1FromCardCache.hpp b/src/hotspot/share/gc/g1/g1FromCardCache.hpp index 22f837dd2ef..b76d7b1b863 100644 --- a/src/hotspot/share/gc/g1/g1FromCardCache.hpp +++ b/src/hotspot/share/gc/g1/g1FromCardCache.hpp @@ -38,14 +38,14 @@ class G1FromCardCache : public AllStatic { // freeing. I.e. a single clear of a single memory area instead of multiple separate // accesses with a large stride per region. static uintptr_t** _cache; - static uint _max_regions; + static uint _max_reserved_regions; static size_t _static_mem_size; #ifdef ASSERT static uint _max_workers; static void check_bounds(uint worker_id, uint region_idx) { assert(worker_id < _max_workers, "Worker_id %u is larger than maximum %u", worker_id, _max_workers); - assert(region_idx < _max_regions, "Region_idx %u is larger than maximum %u", region_idx, _max_regions); + assert(region_idx < _max_reserved_regions, "Region_idx %u is larger than maximum %u", region_idx, _max_reserved_regions); } #endif @@ -54,6 +54,13 @@ class G1FromCardCache : public AllStatic { // This means that the heap must not contain card zero. static const uintptr_t InvalidCard = 0; + // Gives an approximation on how many threads can be expected to add records to + // a remembered set in parallel. This is used for sizing the G1FromCardCache to + // decrease performance losses due to data structure sharing. + // Examples for quantities that influence this value are the maximum number of + // mutator threads, maximum number of concurrent refinement or GC threads. + static uint num_par_rem_sets(); + public: static void clear(uint region_idx); @@ -79,7 +86,7 @@ class G1FromCardCache : public AllStatic { _cache[region_idx][worker_id] = val; } - static void initialize(uint num_par_rem_sets, uint max_num_regions); + static void initialize(uint max_reserved_regions); static void invalidate(uint start_idx, size_t num_regions); diff --git a/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp b/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp index 97742d26ee9..be35978ba17 100644 --- a/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp +++ b/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp @@ -48,7 +48,7 @@ class G1ResetHumongousClosure : public HeapRegionClosure { if (_bitmap->is_marked(obj)) { // Clear bitmap and fix mark word. _bitmap->clear(obj); - obj->init_mark_raw(); + obj->init_mark(); } else { assert(current->is_empty(), "Should have been cleared in phase 2."); } @@ -71,7 +71,7 @@ size_t G1FullGCCompactTask::G1CompactRegionClosure::apply(oop obj) { HeapWord* obj_addr = cast_from_oop<HeapWord*>(obj); assert(obj_addr != destination, "everything in this pass should be moving"); Copy::aligned_conjoint_words(obj_addr, destination, size); - oop(destination)->init_mark_raw(); + oop(destination)->init_mark(); assert(oop(destination)->klass() != NULL, "should have a class"); return size; diff --git a/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp b/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp index a27f7e73ad9..2799ac5109e 100644 --- a/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp +++ b/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp @@ -112,15 +112,15 @@ void G1FullGCCompactionPoint::forward(oop object, size_t size) { // with BiasedLocking, in this case forwardee() will return NULL // even if the mark-word is used. This is no problem since // forwardee() will return NULL in the compaction phase as well. - object->init_mark_raw(); + object->init_mark(); } else { // Make sure object has the correct mark-word set or that it will be // fixed when restoring the preserved marks. - assert(object->mark_raw() == markWord::prototype_for_klass(object->klass()) || // Correct mark + assert(object->mark() == markWord::prototype_for_klass(object->klass()) || // Correct mark object->mark_must_be_preserved() || // Will be restored by PreservedMarksSet - (UseBiasedLocking && object->has_bias_pattern_raw()), // Will be restored by BiasedLocking + (UseBiasedLocking && object->has_bias_pattern()), // Will be restored by BiasedLocking "should have correct prototype obj: " PTR_FORMAT " mark: " PTR_FORMAT " prototype: " PTR_FORMAT, - p2i(object), object->mark_raw().value(), markWord::prototype_for_klass(object->klass()).value()); + p2i(object), object->mark().value(), markWord::prototype_for_klass(object->klass()).value()); } assert(object->forwardee() == NULL, "should be forwarded to NULL"); } diff --git a/src/hotspot/share/gc/g1/g1FullGCMarker.inline.hpp b/src/hotspot/share/gc/g1/g1FullGCMarker.inline.hpp index 5baadbb0edf..efa0fb91bbf 100644 --- a/src/hotspot/share/gc/g1/g1FullGCMarker.inline.hpp +++ b/src/hotspot/share/gc/g1/g1FullGCMarker.inline.hpp @@ -50,7 +50,7 @@ inline bool G1FullGCMarker::mark_object(oop obj) { } // Marked by us, preserve if needed. - markWord mark = obj->mark_raw(); + markWord mark = obj->mark(); if (obj->mark_must_be_preserved(mark) && !G1ArchiveAllocator::is_open_archive_object(obj)) { preserved_stack()->push(obj, mark); diff --git a/src/hotspot/share/gc/g1/g1FullGCOopClosures.inline.hpp b/src/hotspot/share/gc/g1/g1FullGCOopClosures.inline.hpp index e79eea77851..16c34eace8d 100644 --- a/src/hotspot/share/gc/g1/g1FullGCOopClosures.inline.hpp +++ b/src/hotspot/share/gc/g1/g1FullGCOopClosures.inline.hpp @@ -77,11 +77,11 @@ template <class T> inline void G1AdjustClosure::adjust_pointer(T* p) { oop forwardee = obj->forwardee(); if (forwardee == NULL) { // Not forwarded, return current reference. - assert(obj->mark_raw() == markWord::prototype_for_klass(obj->klass()) || // Correct mark + assert(obj->mark() == markWord::prototype_for_klass(obj->klass()) || // Correct mark obj->mark_must_be_preserved() || // Will be restored by PreservedMarksSet - (UseBiasedLocking && obj->has_bias_pattern_raw()), // Will be restored by BiasedLocking + (UseBiasedLocking && obj->has_bias_pattern()), // Will be restored by BiasedLocking "Must have correct prototype or be preserved, obj: " PTR_FORMAT ", mark: " PTR_FORMAT ", prototype: " PTR_FORMAT, - p2i(obj), obj->mark_raw().value(), markWord::prototype_for_klass(obj->klass()).value()); + p2i(obj), obj->mark().value(), markWord::prototype_for_klass(obj->klass()).value()); return; } diff --git a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp index 2c3ae1e711f..59db5f680dc 100644 --- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp +++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp @@ -58,7 +58,6 @@ G1GCPhaseTimes::G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads) : // Root scanning phases _gc_par_phases[ThreadRoots] = new WorkerDataArray<double>("ThreadRoots", "Thread Roots (ms):", max_gc_threads); - _gc_par_phases[ObjectSynchronizerRoots] = new WorkerDataArray<double>("ObjectSynchronizerRoots", "ObjectSynchronizer Roots (ms):", max_gc_threads); _gc_par_phases[CLDGRoots] = new WorkerDataArray<double>("CLDGRoots", "CLDG Roots (ms):", max_gc_threads); AOT_ONLY(_gc_par_phases[AOTCodeRoots] = new WorkerDataArray<double>("AOTCodeRoots", "AOT Root Scan (ms):", max_gc_threads);) _gc_par_phases[CMRefRoots] = new WorkerDataArray<double>("CMRefRoots", "CM RefProcessor Roots (ms):", max_gc_threads); diff --git a/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp b/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp index 1daebe1e41f..a4e69273bee 100644 --- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp +++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp @@ -48,7 +48,6 @@ class G1GCPhaseTimes : public CHeapObj<mtGC> { GCWorkerStart, ExtRootScan, ThreadRoots, - ObjectSynchronizerRoots, CLDGRoots, AOT_ONLY(AOTCodeRoots COMMA) CMRefRoots, diff --git a/src/hotspot/share/gc/g1/g1HeapRegionAttr.hpp b/src/hotspot/share/gc/g1/g1HeapRegionAttr.hpp index 710d2862472..50fc8b8ca97 100644 --- a/src/hotspot/share/gc/g1/g1HeapRegionAttr.hpp +++ b/src/hotspot/share/gc/g1/g1HeapRegionAttr.hpp @@ -32,7 +32,13 @@ // lookups for that information all over the place. struct G1HeapRegionAttr { public: +#if defined(_M_ARM64)&& defined(_MSC_VER) && _MSC_VER <= 1927 + // workaround for MSCV ARM64 bug + // https://developercommunity.visualstudio.com/content/problem/1079221/arm64-bad-code-generation-around-signed-char-arith.html + typedef int32_t region_type_t; +#else typedef int8_t region_type_t; +#endif typedef uint8_t needs_remset_update_t; private: diff --git a/src/hotspot/share/gc/g1/g1HeterogeneousHeapPolicy.cpp b/src/hotspot/share/gc/g1/g1HeterogeneousHeapPolicy.cpp index fba7eb2edab..92aa996ef5c 100644 --- a/src/hotspot/share/gc/g1/g1HeterogeneousHeapPolicy.cpp +++ b/src/hotspot/share/gc/g1/g1HeterogeneousHeapPolicy.cpp @@ -39,8 +39,8 @@ void G1HeterogeneousHeapPolicy::init(G1CollectedHeap* g1h, G1CollectionSet* coll } // After a collection pause, young list target length is updated. So we need to make sure we have enough regions in dram for young gen. -void G1HeterogeneousHeapPolicy::record_collection_pause_end(double pause_time_ms) { - G1Policy::record_collection_pause_end(pause_time_ms); +void G1HeterogeneousHeapPolicy::record_collection_pause_end(double pause_time_ms, bool concurrent_operation_is_full_mark) { + G1Policy::record_collection_pause_end(pause_time_ms, concurrent_operation_is_full_mark); _manager->adjust_dram_regions((uint)young_list_target_length(), G1CollectedHeap::heap()->workers()); } diff --git a/src/hotspot/share/gc/g1/g1HeterogeneousHeapPolicy.hpp b/src/hotspot/share/gc/g1/g1HeterogeneousHeapPolicy.hpp index 88feca7b5a1..6051fc532b8 100644 --- a/src/hotspot/share/gc/g1/g1HeterogeneousHeapPolicy.hpp +++ b/src/hotspot/share/gc/g1/g1HeterogeneousHeapPolicy.hpp @@ -38,7 +38,7 @@ class G1HeterogeneousHeapPolicy : public G1Policy { // initialize policy virtual void init(G1CollectedHeap* g1h, G1CollectionSet* collection_set); // Record end of an evacuation pause. - virtual void record_collection_pause_end(double pause_time_ms); + virtual void record_collection_pause_end(double pause_time_ms, bool concurrent_operation_is_full_mark); // Record the end of full collection. virtual void record_full_collection_end(); diff --git a/src/hotspot/share/gc/g1/g1MMUTracker.cpp b/src/hotspot/share/gc/g1/g1MMUTracker.cpp index 5cd43a59078..259bff9f654 100644 --- a/src/hotspot/share/gc/g1/g1MMUTracker.cpp +++ b/src/hotspot/share/gc/g1/g1MMUTracker.cpp @@ -39,15 +39,12 @@ G1MMUTracker::G1MMUTracker(double time_slice, double max_gc_time) : _time_slice(time_slice), - _max_gc_time(max_gc_time) { } - -G1MMUTrackerQueue::G1MMUTrackerQueue(double time_slice, double max_gc_time) : - G1MMUTracker(time_slice, max_gc_time), + _max_gc_time(max_gc_time), _head_index(0), _tail_index(trim_index(_head_index+1)), _no_entries(0) { } -void G1MMUTrackerQueue::remove_expired_entries(double current_time) { +void G1MMUTracker::remove_expired_entries(double current_time) { double limit = current_time - _time_slice; while (_no_entries > 0) { if (is_double_geq(limit, _array[_tail_index].end_time())) { @@ -59,12 +56,12 @@ void G1MMUTrackerQueue::remove_expired_entries(double current_time) { guarantee(_no_entries == 0, "should have no entries in the array"); } -double G1MMUTrackerQueue::calculate_gc_time(double current_time) { +double G1MMUTracker::calculate_gc_time(double current_time) { double gc_time = 0.0; double limit = current_time - _time_slice; for (int i = 0; i < _no_entries; ++i) { int index = trim_index(_tail_index + i); - G1MMUTrackerQueueElem *elem = &_array[index]; + G1MMUTrackerElem *elem = &_array[index]; if (elem->end_time() > limit) { if (elem->start_time() > limit) gc_time += elem->duration(); @@ -75,7 +72,7 @@ double G1MMUTrackerQueue::calculate_gc_time(double current_time) { return gc_time; } -void G1MMUTrackerQueue::add_pause(double start, double end) { +void G1MMUTracker::add_pause(double start, double end) { remove_expired_entries(end); if (_no_entries == QueueLength) { // OK, we've filled up the queue. There are a few ways @@ -99,7 +96,7 @@ void G1MMUTrackerQueue::add_pause(double start, double end) { _head_index = trim_index(_head_index + 1); ++_no_entries; } - _array[_head_index] = G1MMUTrackerQueueElem(start, end); + _array[_head_index] = G1MMUTrackerElem(start, end); // Current entry needs to be added before calculating the value double slice_time = calculate_gc_time(end); @@ -114,7 +111,7 @@ void G1MMUTrackerQueue::add_pause(double start, double end) { } } -double G1MMUTrackerQueue::when_sec(double current_time, double pause_time) { +double G1MMUTracker::when_sec(double current_time, double pause_time) { // if the pause is over the maximum, just assume that it's the maximum double adjusted_pause_time = (pause_time > max_gc_time()) ? max_gc_time() : pause_time; @@ -126,13 +123,13 @@ double G1MMUTrackerQueue::when_sec(double current_time, double pause_time) { return 0.0; if (adjusted_pause_time == max_gc_time()) { - G1MMUTrackerQueueElem *elem = &_array[_head_index]; + G1MMUTrackerElem *elem = &_array[_head_index]; return elem->end_time() - limit; } int index = _tail_index; while ( 1 ) { - G1MMUTrackerQueueElem *elem = &_array[index]; + G1MMUTrackerElem *elem = &_array[index]; if (elem->end_time() > limit) { if (elem->start_time() > limit) diff -= elem->duration(); diff --git a/src/hotspot/share/gc/g1/g1MMUTracker.hpp b/src/hotspot/share/gc/g1/g1MMUTracker.hpp index cf35f15dd87..0b27a89bedd 100644 --- a/src/hotspot/share/gc/g1/g1MMUTracker.hpp +++ b/src/hotspot/share/gc/g1/g1MMUTracker.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -29,45 +29,7 @@ #include "memory/allocation.hpp" #include "utilities/debug.hpp" -// Two major user controls over G1 behavior are setting a pause time goal (MaxGCPauseMillis), -// over a time slice (GCPauseIntervalMillis). This defines the Minimum Mutator -// Utilisation (MMU) goal. -// -// * Definitions * -// Mutator Utilisation: -// - for a given time slice duration "ts", -// - mutator utilisation is the following fraction: -// non_gc_time / ts -// -// Minimum Mutator Utilisation (MMU): -// - the worst mutator utilisation across all time slices. -// -// G1MMUTracker keeps track of the GC work and decides when it is OK to do GC work -// and for how long so that the MMU invariants are maintained. -// -// ***** ALL TIMES ARE IN SECS!!!!!!! ***** -// this is the "interface" -class G1MMUTracker: public CHeapObj<mtGC> { -protected: - double _time_slice; - double _max_gc_time; // this is per time slice - -public: - G1MMUTracker(double time_slice, double max_gc_time); - - virtual void add_pause(double start, double end) = 0; - virtual double when_sec(double current_time, double pause_time) = 0; - - double max_gc_time() const { - return _max_gc_time; - } - - inline double when_max_gc_sec(double current_time) { - return when_sec(current_time, max_gc_time()); - } -}; - -class G1MMUTrackerQueueElem { +class G1MMUTrackerElem { private: double _start_time; double _end_time; @@ -77,25 +39,45 @@ class G1MMUTrackerQueueElem { inline double end_time() { return _end_time; } inline double duration() { return _end_time - _start_time; } - G1MMUTrackerQueueElem() { + G1MMUTrackerElem() { _start_time = 0.0; _end_time = 0.0; } - G1MMUTrackerQueueElem(double start_time, double end_time) { + G1MMUTrackerElem(double start_time, double end_time) { _start_time = start_time; _end_time = end_time; } }; -// this is an implementation of the MMUTracker using a (fixed-size) queue -// that keeps track of all the recent pause times -class G1MMUTrackerQueue: public G1MMUTracker { + +// Two major user controls over G1 behavior are setting a pause +// time goal (MaxGCPauseMillis), over a time slice (GCPauseIntervalMillis). +// This defines the Minimum Mutator Utilisation (MMU) goal. +// +// * Definitions * +// Mutator Utilisation: +// - for a given time slice duration "ts", +// - mutator utilisation is the following fraction: +// non_gc_time / ts +// +// Minimum Mutator Utilisation (MMU): +// - the worst mutator utilisation across all time slices. +// +// The G1MMUTracker uses a fixed-size queue to keep track of all +// recent pause times. The pause time data is used to avoid +// breaking the MMU. +// +// ***** ALL TIMES ARE IN SECS!!!!!!! ***** +class G1MMUTracker: public CHeapObj<mtGC> { private: enum PrivateConstants { QueueLength = 64 }; + double _time_slice; + double _max_gc_time; // this is per time slice + // The array keeps track of all the pauses that fall within a time // slice (the last time slice during which pauses took place). // The data structure implemented is a circular queue. @@ -105,13 +87,13 @@ class G1MMUTrackerQueue: public G1MMUTracker { // If the array is full, an easy fix is to look for the pauses with // the shortest gap between them and consolidate them. // For now, we have taken the expedient alternative of forgetting - // the oldest entry in the event that +G1UseFixedWindowMMUTracker, thus - // potentially violating MMU specs for some time thereafter. + // the oldest entry, thus potentially violating MMU specs for + // some time thereafter. - G1MMUTrackerQueueElem _array[QueueLength]; - int _head_index; - int _tail_index; - int _no_entries; + G1MMUTrackerElem _array[QueueLength]; + int _head_index; + int _tail_index; + int _no_entries; inline int trim_index(int index) { return (index + QueueLength) % QueueLength; @@ -121,11 +103,19 @@ class G1MMUTrackerQueue: public G1MMUTracker { double calculate_gc_time(double current_time); public: - G1MMUTrackerQueue(double time_slice, double max_gc_time); + G1MMUTracker(double time_slice, double max_gc_time); + + void add_pause(double start, double end); - virtual void add_pause(double start, double end); + double when_sec(double current_time, double pause_time); - virtual double when_sec(double current_time, double pause_time); + double max_gc_time() const { + return _max_gc_time; + } + + double when_max_gc_sec(double current_time) { + return when_sec(current_time, max_gc_time()); + } }; #endif // SHARE_GC_G1_G1MMUTRACKER_HPP diff --git a/src/hotspot/share/gc/g1/g1OopClosures.inline.hpp b/src/hotspot/share/gc/g1/g1OopClosures.inline.hpp index d77ebb91ad5..012f6d8a8b2 100644 --- a/src/hotspot/share/gc/g1/g1OopClosures.inline.hpp +++ b/src/hotspot/share/gc/g1/g1OopClosures.inline.hpp @@ -47,8 +47,8 @@ inline void G1ScanClosureBase::prefetch_and_push(T* p, const oop obj) { // stall. We'll try to prefetch the object (for write, given that // we might need to install the forwarding reference) and we'll // get back to it when pop it from the queue - Prefetch::write(obj->mark_addr_raw(), 0); - Prefetch::read(obj->mark_addr_raw(), (HeapWordSize*2)); + Prefetch::write(obj->mark_addr(), 0); + Prefetch::read(obj->mark_addr(), (HeapWordSize*2)); // slightly paranoid test; I'm trying to catch potential // problems before we go into push_on_queue to know where the @@ -231,7 +231,7 @@ void G1ParCopyClosure<barrier, do_mark_object>::do_oop_work(T* p) { const G1HeapRegionAttr state = _g1h->region_attr(obj); if (state.is_in_cset()) { oop forwardee; - markWord m = obj->mark_raw(); + markWord m = obj->mark(); if (m.is_marked()) { forwardee = (oop) m.decode_pointer(); } else { diff --git a/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp b/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp index b92f649277f..14cec799e4b 100644 --- a/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp +++ b/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp @@ -31,15 +31,28 @@ #include "gc/g1/g1RootClosures.hpp" #include "gc/g1/g1StringDedup.hpp" #include "gc/g1/g1Trace.hpp" +#include "gc/shared/partialArrayTaskStepper.inline.hpp" #include "gc/shared/taskqueue.inline.hpp" #include "memory/allocation.inline.hpp" #include "oops/access.inline.hpp" #include "oops/oop.inline.hpp" +#include "runtime/atomic.hpp" #include "runtime/prefetch.inline.hpp" +#include "utilities/globalDefinitions.hpp" +#include "utilities/macros.hpp" + +// In fastdebug builds the code size can get out of hand, potentially +// tripping over compiler limits (which may be bugs, but nevertheless +// need to be taken into consideration). A side benefit of limiting +// inlining is that we get more call frames that might aid debugging. +// And the fastdebug compile time for this file is much reduced. +// Explicit NOINLINE to block ATTRIBUTE_FLATTENing. +#define MAYBE_INLINE_EVACUATION NOT_DEBUG(inline) DEBUG_ONLY(NOINLINE) G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h, G1RedirtyCardsQueueSet* rdcqs, uint worker_id, + uint n_workers, size_t young_cset_length, size_t optional_cset_length) : _g1h(g1h), @@ -60,6 +73,8 @@ G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h, _surviving_young_words(NULL), _surviving_words_length(young_cset_length + 1), _old_gen_is_full(false), + _partial_objarray_chunk_size(ParGCArrayScanChunk), + _partial_array_stepper(n_workers), _num_optional_regions(optional_cset_length), _numa(g1h->numa()), _obj_alloc_stat(NULL) @@ -155,7 +170,9 @@ void G1ParScanThreadState::verify_task(ScannerTask task) const { } #endif // ASSERT -template <class T> void G1ParScanThreadState::do_oop_evac(T* p) { +template <class T> +MAYBE_INLINE_EVACUATION +void G1ParScanThreadState::do_oop_evac(T* p) { // Reference should not be NULL here as such are never pushed to the task queue. oop obj = RawAccess<IS_NOT_NULL>::oop_load(p); @@ -176,7 +193,7 @@ template <class T> void G1ParScanThreadState::do_oop_evac(T* p) { return; } - markWord m = obj->mark_raw(); + markWord m = obj->mark(); if (m.is_marked()) { obj = (oop) m.decode_pointer(); } else { @@ -194,55 +211,69 @@ template <class T> void G1ParScanThreadState::do_oop_evac(T* p) { } } +MAYBE_INLINE_EVACUATION void G1ParScanThreadState::do_partial_array(PartialArrayScanTask task) { oop from_obj = task.to_source_array(); assert(_g1h->is_in_reserved(from_obj), "must be in heap."); assert(from_obj->is_objArray(), "must be obj array"); - objArrayOop from_obj_array = objArrayOop(from_obj); - // The from-space object contains the real length. - int length = from_obj_array->length(); - assert(from_obj->is_forwarded(), "must be forwarded"); - oop to_obj = from_obj->forwardee(); + + oop to_obj = from_obj->forwardee(); assert(from_obj != to_obj, "should not be chunking self-forwarded objects"); - objArrayOop to_obj_array = objArrayOop(to_obj); - // We keep track of the next start index in the length field of the - // to-space object. - int next_index = to_obj_array->length(); - assert(0 <= next_index && next_index < length, - "invariant, next index: %d, length: %d", next_index, length); - - int start = next_index; - int end = length; - int remainder = end - start; - // We'll try not to push a range that's smaller than ParGCArrayScanChunk. - if (remainder > 2 * ParGCArrayScanChunk) { - end = start + ParGCArrayScanChunk; - to_obj_array->set_length(end); - // Push the remainder before we process the range in case another - // worker has run out of things to do and can steal it. + assert(to_obj->is_objArray(), "must be obj array"); + objArrayOop to_array = objArrayOop(to_obj); + + PartialArrayTaskStepper::Step step + = _partial_array_stepper.next(objArrayOop(from_obj), + to_array, + _partial_objarray_chunk_size); + for (uint i = 0; i < step._ncreate; ++i) { push_on_queue(ScannerTask(PartialArrayScanTask(from_obj))); - } else { - assert(length == end, "sanity"); - // We'll process the final range for this object. Restore the length - // so that the heap remains parsable in case of evacuation failure. - to_obj_array->set_length(end); } - HeapRegion* hr = _g1h->heap_region_containing(to_obj); + HeapRegion* hr = _g1h->heap_region_containing(to_array); G1ScanInYoungSetter x(&_scanner, hr->is_young()); - // Process indexes [start,end). It will also process the header - // along with the first chunk (i.e., the chunk with start == 0). - // Note that at this point the length field of to_obj_array is not - // correct given that we are using it to keep track of the next - // start index. oop_iterate_range() (thankfully!) ignores the length - // field and only relies on the start / end parameters. It does - // however return the size of the object which will be incorrect. So - // we have to ignore it even if we wanted to use it. - to_obj_array->oop_iterate_range(&_scanner, start, end); + // Process claimed task. The length of to_array is not correct, but + // fortunately the iteration ignores the length field and just relies + // on start/end. + to_array->oop_iterate_range(&_scanner, + step._index, + step._index + _partial_objarray_chunk_size); +} + +MAYBE_INLINE_EVACUATION +void G1ParScanThreadState::start_partial_objarray(G1HeapRegionAttr dest_attr, + oop from_obj, + oop to_obj) { + assert(from_obj->is_objArray(), "precondition"); + assert(from_obj->is_forwarded(), "precondition"); + assert(from_obj->forwardee() == to_obj, "precondition"); + assert(from_obj != to_obj, "should not be scanning self-forwarded objects"); + assert(to_obj->is_objArray(), "precondition"); + + objArrayOop to_array = objArrayOop(to_obj); + + PartialArrayTaskStepper::Step step + = _partial_array_stepper.start(objArrayOop(from_obj), + to_array, + _partial_objarray_chunk_size); + + // Push any needed partial scan tasks. Pushed before processing the + // intitial chunk to allow other workers to steal while we're processing. + for (uint i = 0; i < step._ncreate; ++i) { + push_on_queue(ScannerTask(PartialArrayScanTask(from_obj))); + } + + G1ScanInYoungSetter x(&_scanner, dest_attr.is_young()); + // Process the initial chunk. No need to process the type in the + // klass, as it will already be handled by processing the built-in + // module. The length of to_array is not correct, but fortunately + // the iteration ignores that length field and relies on start/end. + to_array->oop_iterate_range(&_scanner, 0, step._index); } +MAYBE_INLINE_EVACUATION void G1ParScanThreadState::dispatch_task(ScannerTask task) { verify_task(task); if (task.is_narrow_oop_ptr()) { @@ -388,13 +419,17 @@ void G1ParScanThreadState::undo_allocation(G1HeapRegionAttr dest_attr, // Private inline function, for direct internal use and providing the // implementation of the public not-inline function. +MAYBE_INLINE_EVACUATION oop G1ParScanThreadState::do_copy_to_survivor_space(G1HeapRegionAttr const region_attr, oop const old, markWord const old_mark) { assert(region_attr.is_in_cset(), "Unexpected region attr type: %s", region_attr.get_type_str()); - const size_t word_sz = old->size(); + // Get the klass once. We'll need it again later, and this avoids + // re-decoding when it's compressed. + Klass* klass = old->klass(); + const size_t word_sz = old->size_given_klass(klass); uint age = 0; G1HeapRegionAttr dest_attr = next_region_attr(region_attr, old_mark, age); @@ -450,15 +485,30 @@ oop G1ParScanThreadState::do_copy_to_survivor_space(G1HeapRegionAttr const regio // In this case, we have to install the mark word first, // otherwise obj looks to be forwarded (the old mark word, // which contains the forward pointer, was copied) - obj->set_mark_raw(old_mark); + obj->set_mark(old_mark); markWord new_mark = old_mark.displaced_mark_helper().set_age(age); old_mark.set_displaced_mark_helper(new_mark); } else { - obj->set_mark_raw(old_mark.set_age(age)); + obj->set_mark(old_mark.set_age(age)); } _age_table.add(age, word_sz); } else { - obj->set_mark_raw(old_mark); + obj->set_mark(old_mark); + } + + // Most objects are not arrays, so do one array check rather than + // checking for each array category for each object. + // CMH: Valhalla flat arrays can split this work up, but for now, doesn't + if (klass->is_array_klass() && !klass->is_flatArray_klass()) { + if (klass->is_objArray_klass()) { + start_partial_objarray(dest_attr, old, obj); + } else { + // Nothing needs to be done for typeArrays. Body doesn't contain + // any oops to scan, and the type in the klass will already be handled + // by processing the built-in module. + assert(klass->is_typeArray_klass(), "invariant"); + } + return obj; } if (G1StringDedup::is_enabled()) { @@ -474,17 +524,10 @@ oop G1ParScanThreadState::do_copy_to_survivor_space(G1HeapRegionAttr const regio obj); } - if (obj->is_objArray() && arrayOop(obj)->length() >= ParGCArrayScanChunk) { - // We keep track of the next start index in the length field of - // the to-space object. The actual length can be found in the - // length field of the from-space object. - arrayOop(obj)->set_length(0); - do_partial_array(PartialArrayScanTask(old)); - } else { - G1ScanInYoungSetter x(&_scanner, dest_attr.is_young()); - obj->oop_iterate_backwards(&_scanner); - } + G1ScanInYoungSetter x(&_scanner, dest_attr.is_young()); + obj->oop_iterate_backwards(&_scanner); return obj; + } else { _plab_allocator->undo_allocation(dest_attr, obj_ptr, word_sz, node_index); return forward_ptr; @@ -503,7 +546,9 @@ G1ParScanThreadState* G1ParScanThreadStateSet::state_for_worker(uint worker_id) assert(worker_id < _n_workers, "out of bounds access"); if (_states[worker_id] == NULL) { _states[worker_id] = - new G1ParScanThreadState(_g1h, _rdcqs, worker_id, _young_cset_length, _optional_cset_length); + new G1ParScanThreadState(_g1h, _rdcqs, + worker_id, _n_workers, + _young_cset_length, _optional_cset_length); } return _states[worker_id]; } diff --git a/src/hotspot/share/gc/g1/g1ParScanThreadState.hpp b/src/hotspot/share/gc/g1/g1ParScanThreadState.hpp index d57bb7dd88b..0f6a4f211bc 100644 --- a/src/hotspot/share/gc/g1/g1ParScanThreadState.hpp +++ b/src/hotspot/share/gc/g1/g1ParScanThreadState.hpp @@ -32,6 +32,7 @@ #include "gc/g1/g1RemSet.hpp" #include "gc/g1/heapRegionRemSet.hpp" #include "gc/shared/ageTable.hpp" +#include "gc/shared/partialArrayTaskStepper.hpp" #include "gc/shared/taskqueue.hpp" #include "memory/allocation.hpp" #include "oops/oop.hpp" @@ -79,6 +80,9 @@ class G1ParScanThreadState : public CHeapObj<mtGC> { // Indicates whether in the last generation (old) there is no more space // available for allocation. bool _old_gen_is_full; + // Size (in elements) of a partial objArray task chunk. + int _partial_objarray_chunk_size; + PartialArrayTaskStepper _partial_array_stepper; G1RedirtyCardsQueue& redirty_cards_queue() { return _rdcq; } G1CardTable* ct() { return _ct; } @@ -105,6 +109,7 @@ class G1ParScanThreadState : public CHeapObj<mtGC> { G1ParScanThreadState(G1CollectedHeap* g1h, G1RedirtyCardsQueueSet* rdcqs, uint worker_id, + uint n_workers, size_t young_cset_length, size_t optional_cset_length); virtual ~G1ParScanThreadState(); @@ -156,7 +161,8 @@ class G1ParScanThreadState : public CHeapObj<mtGC> { size_t flush(size_t* surviving_young_words); private: - inline void do_partial_array(PartialArrayScanTask task); + void do_partial_array(PartialArrayScanTask task); + void start_partial_objarray(G1HeapRegionAttr dest_dir, oop from, oop to); HeapWord* allocate_copy_slow(G1HeapRegionAttr* dest_attr, oop old, @@ -169,14 +175,14 @@ class G1ParScanThreadState : public CHeapObj<mtGC> { size_t word_sz, uint node_index); - inline oop do_copy_to_survivor_space(G1HeapRegionAttr region_attr, - oop obj, - markWord old_mark); + oop do_copy_to_survivor_space(G1HeapRegionAttr region_attr, + oop obj, + markWord old_mark); // This method is applied to the fields of the objects that have just been copied. - template <class T> inline void do_oop_evac(T* p); + template <class T> void do_oop_evac(T* p); - inline void dispatch_task(ScannerTask task); + void dispatch_task(ScannerTask task); // Tries to allocate word_sz in the PLAB of the next "generation" after trying to // allocate into dest. Previous_plab_refill_failed indicates whether previous @@ -249,9 +255,6 @@ class G1ParScanThreadStateSet : public StackObj { G1ParScanThreadState* state_for_worker(uint worker_id); const size_t* surviving_young_words() const; - - private: - G1ParScanThreadState* new_par_scan_state(uint worker_id, size_t young_cset_length); }; #endif // SHARE_GC_G1_G1PARSCANTHREADSTATE_HPP diff --git a/src/hotspot/share/gc/g1/g1Policy.cpp b/src/hotspot/share/gc/g1/g1Policy.cpp index 11938aba1c7..1354296cb9b 100644 --- a/src/hotspot/share/gc/g1/g1Policy.cpp +++ b/src/hotspot/share/gc/g1/g1Policy.cpp @@ -46,7 +46,6 @@ #include "gc/shared/gcPolicyCounters.hpp" #include "logging/log.hpp" #include "runtime/arguments.hpp" -#include "runtime/globals.hpp" #include "runtime/java.hpp" #include "runtime/mutexLocker.hpp" #include "utilities/debug.hpp" @@ -57,13 +56,13 @@ G1Policy::G1Policy(STWGCTimer* gc_timer) : _predictor(G1ConfidencePercent / 100.0), _analytics(new G1Analytics(&_predictor)), _remset_tracker(), - _mmu_tracker(new G1MMUTrackerQueue(GCPauseIntervalMillis / 1000.0, MaxGCPauseMillis / 1000.0)), + _mmu_tracker(new G1MMUTracker(GCPauseIntervalMillis / 1000.0, MaxGCPauseMillis / 1000.0)), _old_gen_alloc_tracker(), _ihop_control(create_ihop_control(&_old_gen_alloc_tracker, &_predictor)), _policy_counters(new GCPolicyCounters("GarbageFirst", 1, 2)), _full_collection_start_sec(0.0), - _young_list_desired_length(0), _young_list_target_length(0), + _young_list_fixed_length(0), _young_list_max_length(0), _eden_surv_rate_group(new G1SurvRateGroup()), _survivor_surv_rate_group(new G1SurvRateGroup()), @@ -108,11 +107,14 @@ void G1Policy::init(G1CollectedHeap* g1h, G1CollectionSet* collection_set) { assert(Heap_lock->owned_by_self(), "Locking discipline."); - _young_gen_sizer->adjust_max_new_size(_g1h->max_expandable_regions()); + if (!use_adaptive_young_list_length()) { + _young_list_fixed_length = _young_gen_sizer->min_desired_young_length(); + } + _young_gen_sizer->adjust_max_new_size(_g1h->max_regions()); _free_regions_at_end_of_collection = _g1h->num_free_regions(); - update_young_length_bounds(); + update_young_list_max_and_target_length(); // We may immediately start allocating regions and placing them on the // collection set list. Initialize the per-collection set info _collection_set->start_incremental_building(); @@ -187,255 +189,158 @@ void G1Policy::record_new_heap_size(uint new_number_of_regions) { _ihop_control->update_target_occupancy(new_number_of_regions * HeapRegion::GrainBytes); } -uint G1Policy::calculate_desired_eden_length_by_mmu() const { - // One could argue that any useful eden length to keep any MMU would be 1, but - // in theory this is possible. Other constraints enforce a minimum eden of 1 - // anyway. +uint G1Policy::calculate_young_list_desired_min_length(uint base_min_length) const { uint desired_min_length = 0; if (use_adaptive_young_list_length()) { - double now_sec = os::elapsedTime(); - double when_ms = _mmu_tracker->when_max_gc_sec(now_sec) * 1000.0; - double alloc_rate_ms = _analytics->predict_alloc_rate_ms(); - desired_min_length = (uint) ceil(alloc_rate_ms * when_ms); + if (_analytics->num_alloc_rate_ms() > 3) { + double now_sec = os::elapsedTime(); + double when_ms = _mmu_tracker->when_max_gc_sec(now_sec) * 1000.0; + double alloc_rate_ms = _analytics->predict_alloc_rate_ms(); + desired_min_length = (uint) ceil(alloc_rate_ms * when_ms); + } else { + // otherwise we don't have enough info to make the prediction + } } - return desired_min_length; -} - -void G1Policy::update_young_length_bounds() { - update_young_length_bounds(_analytics->predict_rs_length()); -} - -void G1Policy::update_young_length_bounds(size_t rs_length) { - _young_list_desired_length = calculate_young_desired_length(rs_length); - _young_list_target_length = calculate_young_target_length(_young_list_desired_length); - _young_list_max_length = calculate_young_max_length(_young_list_target_length); - - log_debug(gc,ergo,heap)("Young list lengths: desired: %u, target: %u, max: %u", - _young_list_desired_length, - _young_list_target_length, - _young_list_max_length); -} - -// Calculates desired young gen length. It is calculated from: -// -// - sizer min/max bounds on young gen -// - pause time goal for whole young gen evacuation -// - MMU goal influencing eden to make GCs spaced apart. -// - a minimum one eden region length. -// -// We may enter with already allocated eden and survivor regions, that may be -// higher than the maximum, or the above goals may result in a desired value -// smaller than are already allocated. -// The main reason is revising young length, with or without the GCLocker being -// active. -// -uint G1Policy::calculate_young_desired_length(size_t rs_length) const { - uint min_young_length_by_sizer = _young_gen_sizer->min_desired_young_length(); - uint max_young_length_by_sizer = _young_gen_sizer->max_desired_young_length(); - - assert(min_young_length_by_sizer >= 1, "invariant"); - assert(max_young_length_by_sizer >= min_young_length_by_sizer, "invariant"); - - // Absolute minimum eden length. - // Enforcing a minimum eden length helps at startup when the predictors are not - // yet trained on the application to avoid unnecessary (but very short) full gcs - // on very small (initial) heaps. - uint const MinDesiredEdenLength = 1; + desired_min_length += base_min_length; + // make sure we don't go below any user-defined minimum bound + return MAX2(_young_gen_sizer->min_desired_young_length(), desired_min_length); +} - // Calculate the absolute and desired min bounds first. +uint G1Policy::calculate_young_list_desired_max_length() const { + // Here, we might want to also take into account any additional + // constraints (i.e., user-defined minimum bound). Currently, we + // effectively don't set this bound. + return _young_gen_sizer->max_desired_young_length(); +} - // This is how many survivor regions we already have. - const uint survivor_length = _g1h->survivor_regions_count(); - // Size of the already allocated young gen. - const uint allocated_young_length = _g1h->young_regions_count(); - // This is the absolute minimum young length that we can return. Ensure that we - // don't go below any user-defined minimum bound; but we might have already - // allocated more than that for various reasons. In this case, use that. - uint absolute_min_young_length = MAX2(allocated_young_length, min_young_length_by_sizer); - // Calculate the absolute max bounds. After evac failure or when revising the - // young length we might have exceeded absolute min length or absolute_max_length, - // so adjust the result accordingly. - uint absolute_max_young_length = MAX2(max_young_length_by_sizer, absolute_min_young_length); - - uint desired_eden_length_by_mmu = 0; - uint desired_eden_length_by_pause = 0; - - uint desired_young_length = 0; - if (use_adaptive_young_list_length()) { - desired_eden_length_by_mmu = calculate_desired_eden_length_by_mmu(); +uint G1Policy::update_young_list_max_and_target_length() { + return update_young_list_max_and_target_length(_analytics->predict_rs_length()); +} - const size_t pending_cards = _analytics->predict_pending_cards(); - double survivor_base_time_ms = predict_base_elapsed_time_ms(pending_cards, rs_length); +uint G1Policy::update_young_list_max_and_target_length(size_t rs_length) { + uint unbounded_target_length = update_young_list_target_length(rs_length); + update_max_gc_locker_expansion(); + return unbounded_target_length; +} - desired_eden_length_by_pause = - calculate_desired_eden_length_by_pause(survivor_base_time_ms, - absolute_min_young_length - survivor_length, - absolute_max_young_length - survivor_length); +uint G1Policy::update_young_list_target_length(size_t rs_length) { + YoungTargetLengths young_lengths = young_list_target_lengths(rs_length); + _young_list_target_length = young_lengths.first; - // Incorporate MMU concerns; assume that it overrides the pause time - // goal, as the default value has been chosen to effectively disable it. - // Also request at least one eden region, see above for reasons. - uint desired_eden_length = MAX3(desired_eden_length_by_pause, - desired_eden_length_by_mmu, - MinDesiredEdenLength); + return young_lengths.second; +} - desired_young_length = desired_eden_length + survivor_length; +G1Policy::YoungTargetLengths G1Policy::young_list_target_lengths(size_t rs_length) const { + YoungTargetLengths result; + + // Calculate the absolute and desired min bounds first. + + // This is how many young regions we already have (currently: the survivors). + const uint base_min_length = _g1h->survivor_regions_count(); + uint desired_min_length = calculate_young_list_desired_min_length(base_min_length); + // This is the absolute minimum young length. Ensure that we + // will at least have one eden region available for allocation. + uint absolute_min_length = base_min_length + MAX2(_g1h->eden_regions_count(), (uint)1); + // If we shrank the young list target it should not shrink below the current size. + desired_min_length = MAX2(desired_min_length, absolute_min_length); + // Calculate the absolute and desired max bounds. + + uint desired_max_length = calculate_young_list_desired_max_length(); + + uint young_list_target_length = 0; + if (use_adaptive_young_list_length()) { + if (collector_state()->in_young_only_phase()) { + young_list_target_length = + calculate_young_list_target_length(rs_length, + base_min_length, + desired_min_length, + desired_max_length); + } else { + // Don't calculate anything and let the code below bound it to + // the desired_min_length, i.e., do the next GC as soon as + // possible to maximize how many old regions we can add to it. + } } else { // The user asked for a fixed young gen so we'll fix the young gen // whether the next GC is young or mixed. - desired_young_length = min_young_length_by_sizer; - } - // Clamp to absolute min/max after we determined desired lengths. - desired_young_length = clamp(desired_young_length, absolute_min_young_length, absolute_max_young_length); - - log_trace(gc, ergo, heap)("Young desired length %u " - "survivor length %u " - "allocated young length %u " - "absolute min young length %u " - "absolute max young length %u " - "desired eden length by mmu %u " - "desired eden length by pause %u " - "desired eden length by default %u", - desired_young_length, survivor_length, - allocated_young_length, absolute_min_young_length, - absolute_max_young_length, desired_eden_length_by_mmu, - desired_eden_length_by_pause, - MinDesiredEdenLength); - - assert(desired_young_length >= allocated_young_length, "must be"); - return desired_young_length; -} - -// Limit the desired (wished) young length by current free regions. If the request -// can be satisfied without using up reserve regions, do so, otherwise eat into -// the reserve, giving away at most what the heap sizer allows. -uint G1Policy::calculate_young_target_length(uint desired_young_length) const { - uint allocated_young_length = _g1h->young_regions_count(); - - uint receiving_additional_eden; - if (allocated_young_length >= desired_young_length) { - // Already used up all we actually want (may happen as G1 revises the - // young list length concurrently, or caused by gclocker). Do not allow more, - // potentially resulting in GC. - receiving_additional_eden = 0; - log_trace(gc, ergo, heap)("Young target length: Already used up desired young %u allocated %u", - desired_young_length, - allocated_young_length); - } else { - // Now look at how many free regions are there currently, and the heap reserve. - // We will try our best not to "eat" into the reserve as long as we can. If we - // do, we at most eat the sizer's minimum regions into the reserve or half the - // reserve rounded up (if possible; this is an arbitrary value). - - uint max_to_eat_into_reserve = MIN2(_young_gen_sizer->min_desired_young_length(), - (_reserve_regions + 1) / 2); - - log_trace(gc, ergo, heap)("Young target length: Common " - "free regions at end of collection %u " - "desired young length %u " - "reserve region %u " - "max to eat into reserve %u", - _free_regions_at_end_of_collection, - desired_young_length, - _reserve_regions, - max_to_eat_into_reserve); - - if (_free_regions_at_end_of_collection <= _reserve_regions) { - // Fully eat (or already eating) into the reserve, hand back at most absolute_min_length regions. - uint receiving_young = MIN3(_free_regions_at_end_of_collection, - desired_young_length, - max_to_eat_into_reserve); - // We could already have allocated more regions than what we could get - // above. - receiving_additional_eden = allocated_young_length < receiving_young ? - receiving_young - allocated_young_length : 0; - - log_trace(gc, ergo, heap)("Young target length: Fully eat into reserve " - "receiving young %u receiving additional eden %u", - receiving_young, - receiving_additional_eden); - } else if (_free_regions_at_end_of_collection < (desired_young_length + _reserve_regions)) { - // Partially eat into the reserve, at most max_to_eat_into_reserve regions. - uint free_outside_reserve = _free_regions_at_end_of_collection - _reserve_regions; - assert(free_outside_reserve < desired_young_length, - "must be %u %u", - free_outside_reserve, desired_young_length); - - uint receiving_within_reserve = MIN2(desired_young_length - free_outside_reserve, - max_to_eat_into_reserve); - uint receiving_young = free_outside_reserve + receiving_within_reserve; - // Again, we could have already allocated more than we could get. - receiving_additional_eden = allocated_young_length < receiving_young ? - receiving_young - allocated_young_length : 0; - - log_trace(gc, ergo, heap)("Young target length: Partially eat into reserve " - "free outside reserve %u " - "receiving within reserve %u " - "receiving young %u " - "receiving additional eden %u", - free_outside_reserve, receiving_within_reserve, - receiving_young, receiving_additional_eden); - } else { - // No need to use the reserve. - receiving_additional_eden = desired_young_length - allocated_young_length; - log_trace(gc, ergo, heap)("Young target length: No need to use reserve " - "receiving additional eden %u", - receiving_additional_eden); - } + young_list_target_length = _young_list_fixed_length; } - uint target_young_length = allocated_young_length + receiving_additional_eden; + result.second = young_list_target_length; - assert(target_young_length >= allocated_young_length, "must be"); - - log_trace(gc, ergo, heap)("Young target length: " - "young target length %u " - "allocated young length %u " - "received additional eden %u", - target_young_length, allocated_young_length, - receiving_additional_eden); - return target_young_length; -} + // We will try our best not to "eat" into the reserve. + uint absolute_max_length = 0; + if (_free_regions_at_end_of_collection > _reserve_regions) { + absolute_max_length = _free_regions_at_end_of_collection - _reserve_regions; + } + if (desired_max_length > absolute_max_length) { + desired_max_length = absolute_max_length; + } -uint G1Policy::calculate_desired_eden_length_by_pause(double base_time_ms, - uint min_eden_length, - uint max_eden_length) const { - if (!next_gc_should_be_mixed(NULL, NULL)) { - return calculate_desired_eden_length_before_young_only(base_time_ms, - min_eden_length, - max_eden_length); - } else { - return calculate_desired_eden_length_before_mixed(base_time_ms, - min_eden_length, - max_eden_length); + // Make sure we don't go over the desired max length, nor under the + // desired min length. In case they clash, desired_min_length wins + // which is why that test is second. + if (young_list_target_length > desired_max_length) { + young_list_target_length = desired_max_length; + } + if (young_list_target_length < desired_min_length) { + young_list_target_length = desired_min_length; } -} + assert(young_list_target_length > base_min_length, + "we should be able to allocate at least one eden region"); + assert(young_list_target_length >= absolute_min_length, "post-condition"); -uint G1Policy::calculate_desired_eden_length_before_young_only(double base_time_ms, - uint min_eden_length, - uint max_eden_length) const { + result.first = young_list_target_length; + return result; +} + +uint G1Policy::calculate_young_list_target_length(size_t rs_length, + uint base_min_length, + uint desired_min_length, + uint desired_max_length) const { assert(use_adaptive_young_list_length(), "pre-condition"); + assert(collector_state()->in_young_only_phase(), "only call this for young GCs"); + + // In case some edge-condition makes the desired max length too small... + if (desired_max_length <= desired_min_length) { + return desired_min_length; + } - assert(min_eden_length <= max_eden_length, "must be %u %u", min_eden_length, max_eden_length); + // We'll adjust min_young_length and max_young_length not to include + // the already allocated young regions (i.e., so they reflect the + // min and max eden regions we'll allocate). The base_min_length + // will be reflected in the predictions by the + // survivor_regions_evac_time prediction. + assert(desired_min_length > base_min_length, "invariant"); + uint min_young_length = desired_min_length - base_min_length; + assert(desired_max_length > base_min_length, "invariant"); + uint max_young_length = desired_max_length - base_min_length; + + const double target_pause_time_ms = _mmu_tracker->max_gc_time() * 1000.0; + const size_t pending_cards = _analytics->predict_pending_cards(); + const double base_time_ms = predict_base_elapsed_time_ms(pending_cards, rs_length); + const uint available_free_regions = _free_regions_at_end_of_collection; + const uint base_free_regions = + available_free_regions > _reserve_regions ? available_free_regions - _reserve_regions : 0; // Here, we will make sure that the shortest young length that // makes sense fits within the target pause time. G1YoungLengthPredictor p(base_time_ms, - _free_regions_at_end_of_collection, - _mmu_tracker->max_gc_time() * 1000.0, + base_free_regions, + target_pause_time_ms, this); - if (p.will_fit(min_eden_length)) { + if (p.will_fit(min_young_length)) { // The shortest young length will fit into the target pause time; // we'll now check whether the absolute maximum number of young // regions will fit in the target pause time. If not, we'll do // a binary search between min_young_length and max_young_length. - if (p.will_fit(max_eden_length)) { + if (p.will_fit(max_young_length)) { // The maximum young length will fit into the target pause time. // We are done so set min young length to the maximum length (as // the result is assumed to be returned in min_young_length). - min_eden_length = max_eden_length; + min_young_length = max_young_length; } else { // The maximum possible number of young regions will not fit within // the target pause time so we'll search for the optimal @@ -452,56 +357,37 @@ uint G1Policy::calculate_desired_eden_length_before_young_only(double base_time_ // does, it becomes the new min. If it doesn't, it becomes // the new max. This way we maintain the loop invariants. - assert(min_eden_length < max_eden_length, "invariant"); - uint diff = (max_eden_length - min_eden_length) / 2; + assert(min_young_length < max_young_length, "invariant"); + uint diff = (max_young_length - min_young_length) / 2; while (diff > 0) { - uint eden_length = min_eden_length + diff; - if (p.will_fit(eden_length)) { - min_eden_length = eden_length; + uint young_length = min_young_length + diff; + if (p.will_fit(young_length)) { + min_young_length = young_length; } else { - max_eden_length = eden_length; + max_young_length = young_length; } - assert(min_eden_length < max_eden_length, "invariant"); - diff = (max_eden_length - min_eden_length) / 2; + assert(min_young_length < max_young_length, "invariant"); + diff = (max_young_length - min_young_length) / 2; } // The results is min_young_length which, according to the // loop invariants, should fit within the target pause time. // These are the post-conditions of the binary search above: - assert(min_eden_length < max_eden_length, - "otherwise we should have discovered that max_eden_length " + assert(min_young_length < max_young_length, + "otherwise we should have discovered that max_young_length " "fits into the pause target and not done the binary search"); - assert(p.will_fit(min_eden_length), - "min_eden_length, the result of the binary search, should " + assert(p.will_fit(min_young_length), + "min_young_length, the result of the binary search, should " "fit into the pause target"); - assert(!p.will_fit(min_eden_length + 1), - "min_eden_length, the result of the binary search, should be " + assert(!p.will_fit(min_young_length + 1), + "min_young_length, the result of the binary search, should be " "optimal, so no larger length should fit into the pause target"); } } else { // Even the minimum length doesn't fit into the pause time // target, return it as the result nevertheless. } - return min_eden_length; -} - -uint G1Policy::calculate_desired_eden_length_before_mixed(double survivor_base_time_ms, - uint min_eden_length, - uint max_eden_length) const { - G1CollectionSetCandidates* candidates = _collection_set->candidates(); - - uint min_old_regions_end = MIN2(candidates->cur_idx() + calc_min_old_cset_length(), candidates->num_regions()); - double predicted_region_evac_time_ms = survivor_base_time_ms; - for (uint i = candidates->cur_idx(); i < min_old_regions_end; i++) { - HeapRegion* r = candidates->at(i); - predicted_region_evac_time_ms += predict_region_total_time_ms(r, false); - } - uint desired_eden_length_by_min_cset_length = - calculate_desired_eden_length_before_young_only(predicted_region_evac_time_ms, - min_eden_length, - max_eden_length); - - return desired_eden_length_by_min_cset_length; + return base_min_length + min_young_length; } double G1Policy::predict_survivor_regions_evac_time() const { @@ -531,7 +417,8 @@ void G1Policy::revise_young_list_target_length_if_necessary(size_t rs_length) { // add 10% to avoid having to recalculate often size_t rs_length_prediction = rs_length * 1100 / 1000; update_rs_length_prediction(rs_length_prediction); - update_young_length_bounds(rs_length_prediction); + + update_young_list_max_and_target_length(rs_length_prediction); } } @@ -558,10 +445,6 @@ void G1Policy::record_full_collection_end() { // Consider this like a collection pause for the purposes of allocation // since last pause. double end_sec = os::elapsedTime(); - double full_gc_time_sec = end_sec - _full_collection_start_sec; - double full_gc_time_ms = full_gc_time_sec * 1000.0; - - _analytics->update_recent_gc_times(end_sec, full_gc_time_ms); collector_state()->set_in_full_gc(false); @@ -569,7 +452,7 @@ void G1Policy::record_full_collection_end() { // transitions and make sure we start with young GCs after the Full GC. collector_state()->set_in_young_only_phase(true); collector_state()->set_in_young_gc_before_mixed(false); - collector_state()->set_initiate_conc_mark_if_possible(need_to_start_conc_mark("end of Full GC", 0)); + collector_state()->set_initiate_conc_mark_if_possible(need_to_start_conc_mark("end of Full GC")); collector_state()->set_in_concurrent_start_gc(false); collector_state()->set_mark_or_rebuild_in_progress(false); collector_state()->set_clearing_next_bitmap(false); @@ -579,7 +462,7 @@ void G1Policy::record_full_collection_end() { _free_regions_at_end_of_collection = _g1h->num_free_regions(); _survivor_surv_rate_group->reset(); - update_young_length_bounds(); + update_young_list_max_and_target_length(); update_rs_length_prediction(); _old_gen_alloc_tracker.reset_after_gc(_g1h->humongous_regions_count() * HeapRegion::GrainBytes); @@ -664,7 +547,7 @@ void G1Policy::record_collection_pause_start(double start_time_sec) { assert(_g1h->collection_set()->verify_young_ages(), "region age verification failed"); } -void G1Policy::record_concurrent_mark_init_end(double mark_init_elapsed_time_ms) { +void G1Policy::record_concurrent_mark_init_end() { assert(!collector_state()->initiate_conc_mark_if_possible(), "we should have cleared it by now"); collector_state()->set_in_concurrent_start_gc(false); } @@ -677,7 +560,6 @@ void G1Policy::record_concurrent_mark_remark_end() { double end_time_sec = os::elapsedTime(); double elapsed_time_ms = (end_time_sec - _mark_remark_start_sec)*1000.0; _analytics->report_concurrent_mark_remark_times_ms(elapsed_time_ms); - _analytics->append_prev_collection_pause_end_ms(elapsed_time_ms); record_pause(Remark, _mark_remark_start_sec, end_time_sec); } @@ -709,7 +591,7 @@ double G1Policy::constant_other_time_ms(double pause_time_ms) const { } bool G1Policy::about_to_start_mixed_phase() const { - return _g1h->concurrent_mark()->cm_thread()->during_cycle() || collector_state()->in_young_gc_before_mixed(); + return _g1h->concurrent_mark()->cm_thread()->in_progress() || collector_state()->in_young_gc_before_mixed(); } bool G1Policy::need_to_start_conc_mark(const char* source, size_t alloc_word_size) { @@ -730,10 +612,14 @@ bool G1Policy::need_to_start_conc_mark(const char* source, size_t alloc_word_siz result ? "Request concurrent cycle initiation (occupancy higher than threshold)" : "Do not request concurrent cycle initiation (still doing mixed collections)", cur_used_bytes, alloc_byte_size, marking_initiating_used_threshold, (double) marking_initiating_used_threshold / _g1h->capacity() * 100, source); } - return result; } +bool G1Policy::concurrent_operation_is_full_mark(const char* msg) { + return collector_state()->in_concurrent_start_gc() && + ((_g1h->gc_cause() != GCCause::_g1_humongous_allocation) || need_to_start_conc_mark(msg)); +} + double G1Policy::logged_cards_processing_time() const { double all_cards_processing_time = average_time_ms(G1GCPhaseTimes::ScanHR) + average_time_ms(G1GCPhaseTimes::OptScanHR); size_t logged_dirty_cards = phase_times()->sum_thread_work_items(G1GCPhaseTimes::MergeLB, G1GCPhaseTimes::MergeLBDirtyCards); @@ -749,24 +635,23 @@ double G1Policy::logged_cards_processing_time() const { // Anything below that is considered to be zero #define MIN_TIMER_GRANULARITY 0.0000001 -void G1Policy::record_collection_pause_end(double pause_time_ms) { +void G1Policy::record_collection_pause_end(double pause_time_ms, bool concurrent_operation_is_full_mark) { G1GCPhaseTimes* p = phase_times(); double end_time_sec = os::elapsedTime(); + double start_time_sec = phase_times()->cur_collection_start_sec(); - PauseKind this_pause = young_gc_pause_kind(); - - bool update_stats = !_g1h->evacuation_failed(); + PauseKind this_pause = young_gc_pause_kind(concurrent_operation_is_full_mark); - record_pause(this_pause, end_time_sec - pause_time_ms / 1000.0, end_time_sec); + bool update_stats = should_update_gc_stats(); if (is_concurrent_start_pause(this_pause)) { - record_concurrent_mark_init_end(0.0); + record_concurrent_mark_init_end(); } else { maybe_start_marking(); } - double app_time_ms = (phase_times()->cur_collection_start_sec() * 1000.0 - _analytics->prev_collection_pause_end_ms()); + double app_time_ms = (start_time_sec * 1000.0 - _analytics->prev_collection_pause_end_ms()); if (app_time_ms < MIN_TIMER_GRANULARITY) { // This usually happens due to the timer not having the required // granularity. Some Linuxes are the usual culprits. @@ -786,11 +671,10 @@ void G1Policy::record_collection_pause_end(double pause_time_ms) { uint regions_allocated = _collection_set->eden_region_length(); double alloc_rate_ms = (double) regions_allocated / app_time_ms; _analytics->report_alloc_rate_ms(alloc_rate_ms); - - _analytics->compute_pause_time_ratios(end_time_sec, pause_time_ms); - _analytics->update_recent_gc_times(end_time_sec, pause_time_ms); } + record_pause(this_pause, start_time_sec, end_time_sec); + if (is_last_young_pause(this_pause)) { assert(!is_concurrent_start_pause(this_pause), "The young GC before mixed is not allowed to be concurrent start GC"); @@ -901,7 +785,7 @@ void G1Policy::record_collection_pause_end(double pause_time_ms) { assert(!(is_concurrent_start_pause(this_pause) && collector_state()->mark_or_rebuild_in_progress()), "If the last pause has been concurrent start, we should not have been in the marking window"); if (is_concurrent_start_pause(this_pause)) { - collector_state()->set_mark_or_rebuild_in_progress(true); + collector_state()->set_mark_or_rebuild_in_progress(concurrent_operation_is_full_mark); } _free_regions_at_end_of_collection = _g1h->num_free_regions(); @@ -911,10 +795,15 @@ void G1Policy::record_collection_pause_end(double pause_time_ms) { // Do not update dynamic IHOP due to G1 periodic collection as it is highly likely // that in this case we are not running in a "normal" operating mode. if (_g1h->gc_cause() != GCCause::_g1_periodic_collection) { - update_young_length_bounds(); + // IHOP control wants to know the expected young gen length if it were not + // restrained by the heap reserve. Using the actual length would make the + // prediction too small and the limit the young gen every time we get to the + // predicted target occupancy. + size_t last_unrestrained_young_length = update_young_list_max_and_target_length(); _old_gen_alloc_tracker.reset_after_gc(_g1h->humongous_regions_count() * HeapRegion::GrainBytes); update_ihop_prediction(app_time_ms / 1000.0, + last_unrestrained_young_length * HeapRegion::GrainBytes, is_young_only_pause(this_pause)); _ihop_control->send_trace_event(_g1h->gc_tracer_stw()); @@ -925,7 +814,7 @@ void G1Policy::record_collection_pause_end(double pause_time_ms) { // for completing the marking, i.e. are faster than expected. // This skews the predicted marking length towards smaller values which might cause // the mark start being too late. - _concurrent_start_to_mixed.reset(); + abort_time_to_mixed_tracking(); } // Note that _mmu_tracker->max_gc_time() returns the time in seconds. @@ -965,6 +854,7 @@ G1IHOPControl* G1Policy::create_ihop_control(const G1OldGenAllocationTracker* ol } void G1Policy::update_ihop_prediction(double mutator_time_s, + size_t young_gen_size, bool this_gc_was_young_only) { // Always try to update IHOP prediction. Even evacuation failures give information // about e.g. whether to start IHOP earlier next time. @@ -992,11 +882,6 @@ void G1Policy::update_ihop_prediction(double mutator_time_s, // marking, which makes any prediction useless. This increases the accuracy of the // prediction. if (this_gc_was_young_only && mutator_time_s > min_valid_time) { - // IHOP control wants to know the expected young gen length if it were not - // restrained by the heap reserve. Using the actual length would make the - // prediction too small and the limit the young gen every time we get to the - // predicted target occupancy. - size_t young_gen_size = young_list_desired_length() * HeapRegion::GrainBytes; _ihop_control->update_allocation_info(mutator_time_s, young_gen_size); report = true; } @@ -1103,7 +988,7 @@ void G1Policy::print_age_table() { _survivors_age_table.print_age_table(_tenuring_threshold); } -uint G1Policy::calculate_young_max_length(uint target_young_length) const { +void G1Policy::update_max_gc_locker_expansion() { uint expansion_region_num = 0; if (GCLockerEdenExpansionPercent > 0) { double perc = (double) GCLockerEdenExpansionPercent / 100.0; @@ -1111,10 +996,11 @@ uint G1Policy::calculate_young_max_length(uint target_young_length) const { // We use ceiling so that if expansion_region_num_d is > 0.0 (but // less than 1.0) we'll get 1. expansion_region_num = (uint) ceil(expansion_region_num_d); + } else { + assert(expansion_region_num == 0, "sanity"); } - uint max_length = target_young_length + expansion_region_num; - assert(target_young_length <= max_length, "overflow"); - return max_length; + _young_list_max_length = _young_list_target_length + expansion_region_num; + assert(_young_list_target_length <= _young_list_max_length, "post-condition"); } // Calculates survivor space parameters. @@ -1143,7 +1029,7 @@ bool G1Policy::force_concurrent_start_if_outside_cycle(GCCause::Cause gc_cause) // We actually check whether we are marking here and not if we are in a // reclamation phase. This means that we will schedule a concurrent mark // even while we are still in the process of reclaiming memory. - bool during_cycle = _g1h->concurrent_mark()->cm_thread()->during_cycle(); + bool during_cycle = _g1h->concurrent_mark()->cm_thread()->in_progress(); if (!during_cycle) { log_debug(gc, ergo)("Request concurrent cycle initiation (requested by GC cause). " "GC cause: %s", @@ -1238,7 +1124,6 @@ void G1Policy::record_concurrent_mark_cleanup_end() { double end_sec = os::elapsedTime(); double elapsed_time_ms = (end_sec - _mark_cleanup_start_sec) * 1000.0; _analytics->report_concurrent_mark_cleanup_times_ms(elapsed_time_ms); - _analytics->append_prev_collection_pause_end_ms(elapsed_time_ms); record_pause(Cleanup, _mark_cleanup_start_sec, end_sec); } @@ -1275,7 +1160,10 @@ bool G1Policy::is_young_only_pause(PauseKind kind) { assert(kind != FullGC, "must be"); assert(kind != Remark, "must be"); assert(kind != Cleanup, "must be"); - return kind == ConcurrentStartGC || kind == LastYoungGC || kind == YoungOnlyGC; + return kind == ConcurrentStartUndoGC || + kind == ConcurrentStartMarkGC || + kind == LastYoungGC || + kind == YoungOnlyGC; } bool G1Policy::is_mixed_pause(PauseKind kind) { @@ -1290,14 +1178,14 @@ bool G1Policy::is_last_young_pause(PauseKind kind) { } bool G1Policy::is_concurrent_start_pause(PauseKind kind) { - return kind == ConcurrentStartGC; + return kind == ConcurrentStartMarkGC || kind == ConcurrentStartUndoGC; } -G1Policy::PauseKind G1Policy::young_gc_pause_kind() const { +G1Policy::PauseKind G1Policy::young_gc_pause_kind(bool concurrent_operation_is_full_mark) const { assert(!collector_state()->in_full_gc(), "must be"); if (collector_state()->in_concurrent_start_gc()) { assert(!collector_state()->in_young_gc_before_mixed(), "must be"); - return ConcurrentStartGC; + return concurrent_operation_is_full_mark ? ConcurrentStartMarkGC : ConcurrentStartUndoGC; } else if (collector_state()->in_young_gc_before_mixed()) { assert(!collector_state()->in_concurrent_start_gc(), "must be"); return LastYoungGC; @@ -1312,11 +1200,45 @@ G1Policy::PauseKind G1Policy::young_gc_pause_kind() const { } } -void G1Policy::record_pause(PauseKind kind, double start, double end) { +bool G1Policy::should_update_gc_stats() { + // Evacuation failures skew the timing too much to be considered for statistics updates. + // We make the assumption that these are rare. + return !_g1h->evacuation_failed(); +} + +void G1Policy::update_gc_pause_time_ratios(PauseKind kind, double start_time_sec, double end_time_sec) { + + double pause_time_sec = end_time_sec - start_time_sec; + double pause_time_ms = pause_time_sec * 1000.0; + + _analytics->compute_pause_time_ratios(end_time_sec, pause_time_ms); + _analytics->update_recent_gc_times(end_time_sec, pause_time_ms); + + if (kind == Cleanup || kind == Remark) { + _analytics->append_prev_collection_pause_end_ms(pause_time_ms); + } else { + _analytics->set_prev_collection_pause_end_ms(end_time_sec * 1000.0); + } +} + +void G1Policy::record_pause(PauseKind kind, + double start, + double end) { // Manage the MMU tracker. For some reason it ignores Full GCs. if (kind != FullGC) { _mmu_tracker->add_pause(start, end); } + + if (should_update_gc_stats()) { + update_gc_pause_time_ratios(kind, start, end); + } + + update_time_to_mixed_tracking(kind, start, end); +} + +void G1Policy::update_time_to_mixed_tracking(PauseKind kind, + double start, + double end) { // Manage the mutator time tracking from concurrent start to first mixed gc. switch (kind) { case FullGC: @@ -1328,11 +1250,19 @@ void G1Policy::record_pause(PauseKind kind, double start, double end) { case LastYoungGC: _concurrent_start_to_mixed.add_pause(end - start); break; - case ConcurrentStartGC: + case ConcurrentStartMarkGC: + // Do not track time-to-mixed time for periodic collections as they are likely + // to be not representative to regular operation as the mutators are idle at + // that time. Also only track full concurrent mark cycles. if (_g1h->gc_cause() != GCCause::_g1_periodic_collection) { _concurrent_start_to_mixed.record_concurrent_start_end(end); } break; + case ConcurrentStartUndoGC: + assert(_g1h->gc_cause() == GCCause::_g1_humongous_allocation, + "GC cause must be humongous allocation but is %d", + _g1h->gc_cause()); + break; case MixedGC: _concurrent_start_to_mixed.record_mixed_gc_start(start); break; @@ -1349,10 +1279,8 @@ bool G1Policy::next_gc_should_be_mixed(const char* true_action_str, const char* false_action_str) const { G1CollectionSetCandidates* candidates = _collection_set->candidates(); - if (candidates == NULL || candidates->is_empty()) { - if (false_action_str != NULL) { - log_debug(gc, ergo)("%s (candidate old regions not available)", false_action_str); - } + if (candidates->is_empty()) { + log_debug(gc, ergo)("%s (candidate old regions not available)", false_action_str); return false; } @@ -1361,24 +1289,12 @@ bool G1Policy::next_gc_should_be_mixed(const char* true_action_str, double reclaimable_percent = reclaimable_bytes_percent(reclaimable_bytes); double threshold = (double) G1HeapWastePercent; if (reclaimable_percent <= threshold) { - if (false_action_str != NULL) { - log_debug(gc, ergo)("%s (reclaimable percentage below threshold). " - "candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) " - "threshold: " UINTX_FORMAT, - false_action_str, - candidates->num_remaining(), reclaimable_bytes, reclaimable_percent, - G1HeapWastePercent); - } + log_debug(gc, ergo)("%s (reclaimable percentage not over threshold). candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) threshold: " UINTX_FORMAT, + false_action_str, candidates->num_remaining(), reclaimable_bytes, reclaimable_percent, G1HeapWastePercent); return false; } - if (true_action_str != NULL) { - log_debug(gc, ergo)("%s (candidate old regions available). " - "candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) " - "threshold: " UINTX_FORMAT, - true_action_str, - candidates->num_remaining(), reclaimable_bytes, reclaimable_percent, - G1HeapWastePercent); - } + log_debug(gc, ergo)("%s (candidate old regions available). candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) threshold: " UINTX_FORMAT, + true_action_str, candidates->num_remaining(), reclaimable_bytes, reclaimable_percent, G1HeapWastePercent); return true; } diff --git a/src/hotspot/share/gc/g1/g1Policy.hpp b/src/hotspot/share/gc/g1/g1Policy.hpp index 677b012ffd8..6062213e3f8 100644 --- a/src/hotspot/share/gc/g1/g1Policy.hpp +++ b/src/hotspot/share/gc/g1/g1Policy.hpp @@ -60,6 +60,7 @@ class G1Policy: public CHeapObj<mtGC> { const G1Predictions* predictor); // Update the IHOP control with necessary statistics. void update_ihop_prediction(double mutator_time_s, + size_t young_gen_size, bool this_gc_was_young_only); void report_ihop_statistics(); @@ -77,8 +78,8 @@ class G1Policy: public CHeapObj<mtGC> { double _full_collection_start_sec; - uint _young_list_desired_length; uint _young_list_target_length; + uint _young_list_fixed_length; // The max number of regions we can extend the eden by while the GC // locker is active. This should be >= _young_list_target_length; @@ -167,10 +168,6 @@ class G1Policy: public CHeapObj<mtGC> { private: G1CollectionSet* _collection_set; - - bool next_gc_should_be_mixed(const char* true_action_str, - const char* false_action_str) const; - double average_time_ms(G1GCPhaseTimes::GCParPhases phase) const; double other_time_ms(double pause_time_ms) const; @@ -192,44 +189,44 @@ class G1Policy: public CHeapObj<mtGC> { double _mark_remark_start_sec; double _mark_cleanup_start_sec; - // Updates the internal young gen maximum and target and desired lengths. - // If no rs_length parameter is passed, predict the RS length using the - // prediction model, otherwise use the given rs_length as the prediction. - void update_young_length_bounds(); - void update_young_length_bounds(size_t rs_length); - - // Calculate and return the minimum desired eden length based on the MMU target. - uint calculate_desired_eden_length_by_mmu() const; - - // Calculate the desired eden length meeting the pause time goal. - // The parameters are: rs_length represents the prediction of how large the - // young RSet lengths will be, min_eden_length and max_eden_length are the bounds - // (inclusive) within eden can grow. - uint calculate_desired_eden_length_by_pause(double base_time_ms, - uint min_eden_length, - uint max_eden_length) const; - - // Calculate the desired eden length that can fit into the pause time - // goal before young only gcs. - uint calculate_desired_eden_length_before_young_only(double base_time_ms, - uint min_eden_length, - uint max_eden_length) const; - - // Calculates the desired eden length before mixed gc so that after adding the - // minimum amount of old gen regions from the collection set, the eden fits into - // the pause time goal. - uint calculate_desired_eden_length_before_mixed(double survivor_base_time_ms, - uint min_eden_length, - uint max_eden_length) const; - - // Calculate desired young length based on current situation without taking actually - // available free regions into account. - uint calculate_young_desired_length(size_t rs_length) const; - // Limit the given desired young length to available free regions. - uint calculate_young_target_length(uint desired_young_length) const; - // The GCLocker might cause us to need more regions than the target. Calculate - // the maximum number of regions to use in that case. - uint calculate_young_max_length(uint target_young_length) const; + // Updates the internal young list maximum and target lengths. Returns the + // unbounded young list target length. If no rs_length parameter is passed, + // predict the RS length using the prediction model, otherwise use the + // given rs_length as the prediction. + uint update_young_list_max_and_target_length(); + uint update_young_list_max_and_target_length(size_t rs_length); + + // Update the young list target length either by setting it to the + // desired fixed value or by calculating it using G1's pause + // prediction model. + // Returns the unbounded young list target length. + uint update_young_list_target_length(size_t rs_length); + + // Calculate and return the minimum desired young list target + // length. This is the minimum desired young list length according + // to the user's inputs. + uint calculate_young_list_desired_min_length(uint base_min_length) const; + + // Calculate and return the maximum desired young list target + // length. This is the maximum desired young list length according + // to the user's inputs. + uint calculate_young_list_desired_max_length() const; + + // Calculate and return the maximum young list target length that + // can fit into the pause time goal. The parameters are: rs_length + // represent the prediction of how large the young RSet lengths will + // be, base_min_length is the already existing number of regions in + // the young list, min_length and max_length are the desired min and + // max young list length according to the user's inputs. + uint calculate_young_list_target_length(size_t rs_length, + uint base_min_length, + uint desired_min_length, + uint desired_max_length) const; + + // Result of the bounded_young_list_target_length() method, containing both the + // bounded as well as the unbounded young list target lengths in this order. + typedef Pair<uint, uint, StackObj> YoungTargetLengths; + YoungTargetLengths young_list_target_lengths(size_t rs_length) const; void update_rs_length_prediction(); void update_rs_length_prediction(size_t prediction); @@ -267,12 +264,13 @@ class G1Policy: public CHeapObj<mtGC> { void maybe_start_marking(); // The kind of STW pause. - enum PauseKind { + enum PauseKind : uint { FullGC, YoungOnlyGC, MixedGC, LastYoungGC, - ConcurrentStartGC, + ConcurrentStartMarkGC, + ConcurrentStartUndoGC, Cleanup, Remark }; @@ -282,9 +280,16 @@ class G1Policy: public CHeapObj<mtGC> { static bool is_last_young_pause(PauseKind kind); static bool is_concurrent_start_pause(PauseKind kind); // Calculate PauseKind from internal state. - PauseKind young_gc_pause_kind() const; + PauseKind young_gc_pause_kind(bool concurrent_operation_is_full_mark) const; + // Manage time-to-mixed tracking. + void update_time_to_mixed_tracking(PauseKind pause, double start, double end); // Record the given STW pause with the given start and end times (in s). void record_pause(PauseKind kind, double start, double end); + + bool should_update_gc_stats(); + + void update_gc_pause_time_ratios(PauseKind kind, double start_sec, double end_sec); + // Indicate that we aborted marking before doing any mixed GCs. void abort_time_to_mixed_tracking(); @@ -317,18 +322,20 @@ class G1Policy: public CHeapObj<mtGC> { bool need_to_start_conc_mark(const char* source, size_t alloc_word_size = 0); + bool concurrent_operation_is_full_mark(const char* msg = NULL); + bool about_to_start_mixed_phase() const; // Record the start and end of an evacuation pause. void record_collection_pause_start(double start_time_sec); - virtual void record_collection_pause_end(double pause_time_ms); + virtual void record_collection_pause_end(double pause_time_ms, bool concurrent_operation_is_full_mark); // Record the start and end of a full collection. void record_full_collection_start(); virtual void record_full_collection_end(); // Must currently be called while the world is stopped. - void record_concurrent_mark_init_end(double mark_init_elapsed_time_ms); + void record_concurrent_mark_init_end(); // Record start and end of remark. void record_concurrent_mark_remark_start(); @@ -340,6 +347,9 @@ class G1Policy: public CHeapObj<mtGC> { void print_phases(); + bool next_gc_should_be_mixed(const char* true_action_str, + const char* false_action_str) const; + // Calculate and return the number of initial and optional old gen regions from // the given collection set candidates and the remaining time. void calculate_old_collection_set_regions(G1CollectionSetCandidates* candidates, @@ -376,7 +386,6 @@ class G1Policy: public CHeapObj<mtGC> { // the concurrent start work and start a marking cycle. void decide_on_conc_mark_initiation(); - uint young_list_desired_length() const { return _young_list_desired_length; } size_t young_list_target_length() const { return _young_list_target_length; } bool should_allocate_mutator_region() const; @@ -437,6 +446,8 @@ class G1Policy: public CHeapObj<mtGC> { void print_age_table(); + void update_max_gc_locker_expansion(); + void update_survivors_policy(); virtual bool force_upgrade_to_full() { diff --git a/src/hotspot/share/gc/g1/g1RegionToSpaceMapper.cpp b/src/hotspot/share/gc/g1/g1RegionToSpaceMapper.cpp index 725bf93b030..88907a6f87f 100644 --- a/src/hotspot/share/gc/g1/g1RegionToSpaceMapper.cpp +++ b/src/hotspot/share/gc/g1/g1RegionToSpaceMapper.cpp @@ -42,7 +42,7 @@ G1RegionToSpaceMapper::G1RegionToSpaceMapper(ReservedSpace rs, size_t page_size, size_t region_granularity, size_t commit_factor, - MemoryType type) : + MEMFLAGS type) : _listener(NULL), _storage(rs, used_size, page_size), _region_granularity(region_granularity), @@ -67,7 +67,7 @@ class G1RegionsLargerThanCommitSizeMapper : public G1RegionToSpaceMapper { size_t page_size, size_t alloc_granularity, size_t commit_factor, - MemoryType type) : + MEMFLAGS type) : G1RegionToSpaceMapper(rs, actual_size, page_size, alloc_granularity, commit_factor, type), _pages_per_region(alloc_granularity / (page_size * commit_factor)) { @@ -130,7 +130,7 @@ class G1RegionsSmallerThanCommitSizeMapper : public G1RegionToSpaceMapper { size_t page_size, size_t alloc_granularity, size_t commit_factor, - MemoryType type) : + MEMFLAGS type) : G1RegionToSpaceMapper(rs, actual_size, page_size, alloc_granularity, commit_factor, type), _regions_per_page((page_size * commit_factor) / alloc_granularity) { @@ -220,7 +220,7 @@ static bool map_nvdimm_space(ReservedSpace rs) { return false; } // commit this memory in nv-dimm - char* ret = os::attempt_reserve_memory_at(rs.size(), rs.base(), _backing_fd); + char* ret = os::attempt_reserve_memory_at(rs.base(), rs.size(), _backing_fd); if (ret != rs.base()) { if (ret != NULL) { @@ -240,7 +240,7 @@ G1RegionToHeteroSpaceMapper::G1RegionToHeteroSpaceMapper(ReservedSpace rs, size_t page_size, size_t alloc_granularity, size_t commit_factor, - MemoryType type) : + MEMFLAGS type) : G1RegionToSpaceMapper(rs, actual_size, page_size, alloc_granularity, commit_factor, type), _rs(rs), _dram_mapper(NULL), @@ -267,7 +267,7 @@ bool G1RegionToHeteroSpaceMapper::initialize() { assert(rs_dram.size() == rs_nvdimm.size() && rs_nvdimm.size() == MaxHeapSize, "They all should be same"); // Reserve dram memory - char* base = os::attempt_reserve_memory_at(rs_dram.size(), rs_dram.base()); + char* base = os::attempt_reserve_memory_at(rs_dram.base(), rs_dram.size()); if (base != rs_dram.base()) { if (base != NULL) { os::release_memory(base, rs_dram.size()); @@ -337,7 +337,7 @@ G1RegionToSpaceMapper* G1RegionToSpaceMapper::create_heap_mapper(ReservedSpace r size_t page_size, size_t region_granularity, size_t commit_factor, - MemoryType type) { + MEMFLAGS type) { if (AllocateOldGenAt != NULL) { G1RegionToHeteroSpaceMapper* mapper = new G1RegionToHeteroSpaceMapper(rs, actual_size, page_size, region_granularity, commit_factor, type); if (!mapper->initialize()) { @@ -355,7 +355,7 @@ G1RegionToSpaceMapper* G1RegionToSpaceMapper::create_mapper(ReservedSpace rs, size_t page_size, size_t region_granularity, size_t commit_factor, - MemoryType type) { + MEMFLAGS type) { if (region_granularity >= (page_size * commit_factor)) { return new G1RegionsLargerThanCommitSizeMapper(rs, actual_size, page_size, region_granularity, commit_factor, type); } else { diff --git a/src/hotspot/share/gc/g1/g1RegionToSpaceMapper.hpp b/src/hotspot/share/gc/g1/g1RegionToSpaceMapper.hpp index 87ffae6172b..7a76d4eea93 100644 --- a/src/hotspot/share/gc/g1/g1RegionToSpaceMapper.hpp +++ b/src/hotspot/share/gc/g1/g1RegionToSpaceMapper.hpp @@ -53,9 +53,9 @@ class G1RegionToSpaceMapper : public CHeapObj<mtGC> { // Mapping management CHeapBitMap _region_commit_map; - MemoryType _memory_type; + MEMFLAGS _memory_type; - G1RegionToSpaceMapper(ReservedSpace rs, size_t used_size, size_t page_size, size_t region_granularity, size_t commit_factor, MemoryType type); + G1RegionToSpaceMapper(ReservedSpace rs, size_t used_size, size_t page_size, size_t region_granularity, size_t commit_factor, MEMFLAGS type); void fire_on_commit(uint start_idx, size_t num_regions, bool zero_filled); public: @@ -85,14 +85,14 @@ class G1RegionToSpaceMapper : public CHeapObj<mtGC> { size_t page_size, size_t region_granularity, size_t byte_translation_factor, - MemoryType type); + MEMFLAGS type); static G1RegionToSpaceMapper* create_heap_mapper(ReservedSpace rs, size_t actual_size, size_t page_size, size_t region_granularity, size_t byte_translation_factor, - MemoryType type); + MEMFLAGS type); }; // G1RegionToSpaceMapper implementation where @@ -106,10 +106,10 @@ class G1RegionToHeteroSpaceMapper : public G1RegionToSpaceMapper { uint _start_index_of_dram; size_t _page_size; size_t _commit_factor; - MemoryType _type; + MEMFLAGS _type; public: - G1RegionToHeteroSpaceMapper(ReservedSpace rs, size_t used_size, size_t page_size, size_t region_granularity, size_t commit_factor, MemoryType type); + G1RegionToHeteroSpaceMapper(ReservedSpace rs, size_t used_size, size_t page_size, size_t region_granularity, size_t commit_factor, MEMFLAGS type); bool initialize(); uint num_committed_dram() const; uint num_committed_nvdimm() const; diff --git a/src/hotspot/share/gc/g1/g1RemSet.cpp b/src/hotspot/share/gc/g1/g1RemSet.cpp index 354cc5ed8f0..98809fc08b4 100644 --- a/src/hotspot/share/gc/g1/g1RemSet.cpp +++ b/src/hotspot/share/gc/g1/g1RemSet.cpp @@ -38,6 +38,7 @@ #include "gc/g1/g1RootClosures.hpp" #include "gc/g1/g1RemSet.hpp" #include "gc/g1/g1SharedDirtyCardQueue.hpp" +#include "gc/g1/g1_globals.hpp" #include "gc/g1/heapRegion.inline.hpp" #include "gc/g1/heapRegionManager.inline.hpp" #include "gc/g1/heapRegionRemSet.inline.hpp" @@ -86,7 +87,7 @@ class G1RemSetScanState : public CHeapObj<mtGC> { class G1DirtyRegions; - size_t _max_regions; + size_t _max_reserved_regions; // Has this region that is part of the regions in the collection set been processed yet. typedef bool G1RemsetIterState; @@ -130,8 +131,17 @@ class G1RemSetScanState : public CHeapObj<mtGC> { } private: - // The complete set of regions which card table needs to be cleared at the end of GC because - // we scribbled all over them. + // The complete set of regions which card table needs to be cleared at the end + // of GC because we scribbled over these card tables. + // + // Regions may be added for two reasons: + // - they were part of the collection set: they may contain g1_young_card_val + // or regular card marks that we never scan so we must always clear their card + // table + // - or in case g1 does an optional evacuation pass, g1 marks the cards in there + // as g1_scanned_card_val. If G1 only did an initial evacuation pass, the + // scanning already cleared these cards. In that case they are not in this set + // at the end of the collection. G1DirtyRegions* _all_dirty_regions; // The set of regions which card table needs to be scanned for new dirty cards // in the current evacuation pass. @@ -141,16 +151,16 @@ class G1RemSetScanState : public CHeapObj<mtGC> { class G1DirtyRegions : public CHeapObj<mtGC> { uint* _buffer; uint _cur_idx; - size_t _max_regions; + size_t _max_reserved_regions; bool* _contains; public: - G1DirtyRegions(size_t max_regions) : - _buffer(NEW_C_HEAP_ARRAY(uint, max_regions, mtGC)), + G1DirtyRegions(size_t max_reserved_regions) : + _buffer(NEW_C_HEAP_ARRAY(uint, max_reserved_regions, mtGC)), _cur_idx(0), - _max_regions(max_regions), - _contains(NEW_C_HEAP_ARRAY(bool, max_regions, mtGC)) { + _max_reserved_regions(max_reserved_regions), + _contains(NEW_C_HEAP_ARRAY(bool, max_reserved_regions, mtGC)) { reset(); } @@ -164,7 +174,7 @@ class G1RemSetScanState : public CHeapObj<mtGC> { void reset() { _cur_idx = 0; - ::memset(_contains, false, _max_regions * sizeof(bool)); + ::memset(_contains, false, _max_reserved_regions * sizeof(bool)); } uint size() const { return _cur_idx; } @@ -273,7 +283,7 @@ class G1RemSetScanState : public CHeapObj<mtGC> { public: G1RemSetScanState() : - _max_regions(0), + _max_reserved_regions(0), _collection_set_iter_state(NULL), _card_table_scan_state(NULL), _scan_chunks_per_region(get_chunks_per_region(HeapRegion::LogOfHRGrainBytes)), @@ -293,16 +303,16 @@ class G1RemSetScanState : public CHeapObj<mtGC> { FREE_C_HEAP_ARRAY(HeapWord*, _scan_top); } - void initialize(size_t max_regions) { + void initialize(size_t max_reserved_regions) { assert(_collection_set_iter_state == NULL, "Must not be initialized twice"); - _max_regions = max_regions; - _collection_set_iter_state = NEW_C_HEAP_ARRAY(G1RemsetIterState, max_regions, mtGC); - _card_table_scan_state = NEW_C_HEAP_ARRAY(uint, max_regions, mtGC); - _num_total_scan_chunks = max_regions * _scan_chunks_per_region; + _max_reserved_regions = max_reserved_regions; + _collection_set_iter_state = NEW_C_HEAP_ARRAY(G1RemsetIterState, max_reserved_regions, mtGC); + _card_table_scan_state = NEW_C_HEAP_ARRAY(uint, max_reserved_regions, mtGC); + _num_total_scan_chunks = max_reserved_regions * _scan_chunks_per_region; _region_scan_chunks = NEW_C_HEAP_ARRAY(bool, _num_total_scan_chunks, mtGC); _scan_chunks_shift = (uint8_t)log2_intptr(HeapRegion::CardsPerRegion / _scan_chunks_per_region); - _scan_top = NEW_C_HEAP_ARRAY(HeapWord*, max_regions, mtGC); + _scan_top = NEW_C_HEAP_ARRAY(HeapWord*, max_reserved_regions, mtGC); } void prepare() { @@ -310,26 +320,32 @@ class G1RemSetScanState : public CHeapObj<mtGC> { // regions currently not available or free. Since regions might // become used during the collection these values must be valid // for those regions as well. - for (size_t i = 0; i < _max_regions; i++) { + for (size_t i = 0; i < _max_reserved_regions; i++) { reset_region_claim((uint)i); clear_scan_top((uint)i); } - _all_dirty_regions = new G1DirtyRegions(_max_regions); - _next_dirty_regions = new G1DirtyRegions(_max_regions); + _all_dirty_regions = new G1DirtyRegions(_max_reserved_regions); + _next_dirty_regions = new G1DirtyRegions(_max_reserved_regions); } void prepare_for_merge_heap_roots() { - _all_dirty_regions->merge(_next_dirty_regions); + assert(_next_dirty_regions->size() == 0, "next dirty regions must be empty"); - _next_dirty_regions->reset(); - for (size_t i = 0; i < _max_regions; i++) { + for (size_t i = 0; i < _max_reserved_regions; i++) { _card_table_scan_state[i] = 0; } ::memset(_region_scan_chunks, false, _num_total_scan_chunks * sizeof(*_region_scan_chunks)); } + void complete_evac_phase(bool merge_dirty_regions) { + if (merge_dirty_regions) { + _all_dirty_regions->merge(_next_dirty_regions); + } + _next_dirty_regions->reset(); + } + // Returns whether the given region contains cards we need to scan. The remembered // set and other sources may contain cards that // - are in uncommitted regions @@ -373,8 +389,6 @@ class G1RemSetScanState : public CHeapObj<mtGC> { } void cleanup(WorkGang* workers) { - _all_dirty_regions->merge(_next_dirty_regions); - clear_card_table(workers); delete _all_dirty_regions; @@ -416,7 +430,7 @@ class G1RemSetScanState : public CHeapObj<mtGC> { // Attempt to claim the given region in the collection set for iteration. Returns true // if this call caused the transition from Unclaimed to Claimed. inline bool claim_collection_set_region(uint region) { - assert(region < _max_regions, "Tried to access invalid region %u", region); + assert(region < _max_reserved_regions, "Tried to access invalid region %u", region); if (_collection_set_iter_state[region]) { return false; } @@ -424,12 +438,12 @@ class G1RemSetScanState : public CHeapObj<mtGC> { } bool has_cards_to_scan(uint region) { - assert(region < _max_regions, "Tried to access invalid region %u", region); + assert(region < _max_reserved_regions, "Tried to access invalid region %u", region); return _card_table_scan_state[region] < HeapRegion::CardsPerRegion; } uint claim_cards_to_scan(uint region, uint increment) { - assert(region < _max_regions, "Tried to access invalid region %u", region); + assert(region < _max_reserved_regions, "Tried to access invalid region %u", region); return Atomic::fetch_and_add(&_card_table_scan_state[region], increment); } @@ -447,7 +461,7 @@ class G1RemSetScanState : public CHeapObj<mtGC> { #ifdef ASSERT HeapRegion* hr = G1CollectedHeap::heap()->region_at(region); assert(hr->in_collection_set(), - "Only add young regions to all dirty regions directly but %u is %s", + "Only add collection set regions to all dirty regions directly but %u is %s", hr->hrm_index(), hr->get_short_type_str()); #endif _all_dirty_regions->add_dirty_region(region); @@ -481,13 +495,8 @@ G1RemSet::~G1RemSet() { delete _scan_state; } -uint G1RemSet::num_par_rem_sets() { - return G1DirtyCardQueueSet::num_par_ids() + G1ConcurrentRefine::max_num_threads() + MAX2(ConcGCThreads, ParallelGCThreads); -} - -void G1RemSet::initialize(uint max_regions) { - G1FromCardCache::initialize(num_par_rem_sets(), max_regions); - _scan_state->initialize(max_regions); +void G1RemSet::initialize(uint max_reserved_regions) { + _scan_state->initialize(max_reserved_regions); } // Helper class to scan and detect ranges of cards that need to be scanned on the @@ -645,6 +654,7 @@ class G1ScanHRForRegionClosure : public HeapRegionClosure { // The address to which this thread already scanned (walked the heap) up to during // card scanning (exclusive). HeapWord* _scanned_to; + G1CardTable::CardValue _scanned_card_value; HeapWord* scan_memregion(uint region_idx_for_card, MemRegion mr) { HeapRegion* const card_region = _g1h->region_at(region_idx_for_card); @@ -681,7 +691,7 @@ class G1ScanHRForRegionClosure : public HeapRegionClosure { } ALWAYSINLINE void do_card_block(uint const region_idx, size_t const first_card, size_t const num_cards) { - _ct->mark_as_scanned(first_card, num_cards); + _ct->change_dirty_cards_to(first_card, num_cards, _scanned_card_value); do_claimed_block(region_idx, first_card, num_cards); _blocks_scanned++; } @@ -731,7 +741,8 @@ class G1ScanHRForRegionClosure : public HeapRegionClosure { G1ScanHRForRegionClosure(G1RemSetScanState* scan_state, G1ParScanThreadState* pss, uint worker_id, - G1GCPhaseTimes::GCParPhases phase) : + G1GCPhaseTimes::GCParPhases phase, + bool remember_already_scanned_cards) : _g1h(G1CollectedHeap::heap()), _ct(_g1h->card_table()), _bot(_g1h->bot()), @@ -744,7 +755,9 @@ class G1ScanHRForRegionClosure : public HeapRegionClosure { _chunks_claimed(0), _rem_set_root_scan_time(), _rem_set_trim_partially_time(), - _scanned_to(NULL) { + _scanned_to(NULL), + _scanned_card_value(remember_already_scanned_cards ? G1CardTable::g1_scanned_card_val() + : G1CardTable::clean_card_val()) { } bool do_heap_region(HeapRegion* r) { @@ -769,10 +782,11 @@ class G1ScanHRForRegionClosure : public HeapRegionClosure { }; void G1RemSet::scan_heap_roots(G1ParScanThreadState* pss, - uint worker_id, - G1GCPhaseTimes::GCParPhases scan_phase, - G1GCPhaseTimes::GCParPhases objcopy_phase) { - G1ScanHRForRegionClosure cl(_scan_state, pss, worker_id, scan_phase); + uint worker_id, + G1GCPhaseTimes::GCParPhases scan_phase, + G1GCPhaseTimes::GCParPhases objcopy_phase, + bool remember_already_scanned_cards) { + G1ScanHRForRegionClosure cl(_scan_state, pss, worker_id, scan_phase, remember_already_scanned_cards); _scan_state->iterate_dirty_regions_from(&cl, worker_id); G1GCPhaseTimes* p = _g1p->phase_times(); @@ -895,18 +909,11 @@ void G1RemSet::scan_collection_set_regions(G1ParScanThreadState* pss, void G1RemSet::prepare_region_for_scan(HeapRegion* region) { uint hrm_index = region->hrm_index(); - if (region->in_collection_set()) { - // Young regions had their card table marked as young at their allocation; - // we need to make sure that these marks are cleared at the end of GC, *but* - // they should not be scanned for cards. - // So directly add them to the "all_dirty_regions". - // Same for regions in the (initial) collection set: they may contain cards from - // the log buffers, make sure they are cleaned. - _scan_state->add_all_dirty_region(hrm_index); - } else if (region->is_old_or_humongous_or_archive()) { + if (region->is_old_or_humongous_or_archive()) { _scan_state->set_scan_top(hrm_index, region->top()); } else { - assert(region->is_free(), "Should only be free region at this point %s", region->get_type_str()); + assert(region->in_collection_set() || region->is_free(), + "Should only be free or in the collection set at this point %s", region->get_type_str()); } } @@ -988,13 +995,34 @@ class G1MergeHeapRootsTask : public AbstractGangTask { } } - virtual bool do_heap_region(HeapRegion* r) { + // Helper to put the remembered set cards for these regions onto the card + // table. + // + // Called directly for humongous starts regions because we should not add + // humongous eager reclaim candidates to the "all" list of regions to + // clear the card table by default as we do not know yet whether this region + // will be reclaimed (and reused). + // If the humongous region contains dirty cards, g1 will scan them + // because dumping the remembered set entries onto the card table will add + // the humongous region to the "dirty" region list to scan. Then scanning + // either clears the card during scan (if there is only an initial evacuation + // pass) or the "dirty" list will be merged with the "all" list later otherwise. + // (And there is no problem either way if the region does not contain dirty + // cards). + void dump_rem_set_for_region(HeapRegion* r) { assert(r->in_collection_set() || r->is_starts_humongous(), "must be"); HeapRegionRemSet* rem_set = r->rem_set(); if (!rem_set->is_empty()) { rem_set->iterate_prts(*this); } + } + + virtual bool do_heap_region(HeapRegion* r) { + assert(r->in_collection_set(), "must be"); + + _scan_state->add_all_dirty_region(r->hrm_index()); + dump_rem_set_for_region(r); return false; } @@ -1026,7 +1054,7 @@ class G1MergeHeapRootsTask : public AbstractGangTask { guarantee(r->rem_set()->occupancy_less_or_equal_than(G1RSetSparseRegionEntries), "Found a not-small remembered set here. This is inconsistent with previous assumptions."); - _cl.do_heap_region(r); + _cl.dump_rem_set_for_region(r); // We should only clear the card based remembered set here as we will not // implicitly rebuild anything else during eager reclaim. Note that at the moment @@ -1243,6 +1271,10 @@ void G1RemSet::merge_heap_roots(bool initial_evacuation) { } } +void G1RemSet::complete_evac_phase(bool has_more_than_one_evacuation_phase) { + _scan_state->complete_evac_phase(has_more_than_one_evacuation_phase); +} + void G1RemSet::exclude_region_from_scan(uint region_idx) { _scan_state->clear_scan_top(region_idx); } diff --git a/src/hotspot/share/gc/g1/g1RemSet.hpp b/src/hotspot/share/gc/g1/g1RemSet.hpp index 186c52e5211..c44ea34c739 100644 --- a/src/hotspot/share/gc/g1/g1RemSet.hpp +++ b/src/hotspot/share/gc/g1/g1RemSet.hpp @@ -70,15 +70,9 @@ class G1RemSet: public CHeapObj<mtGC> { public: typedef CardTable::CardValue CardValue; - // Gives an approximation on how many threads can be expected to add records to - // a remembered set in parallel. This can be used for sizing data structures to - // decrease performance losses due to data structure sharing. - // Examples for quantities that influence this value are the maximum number of - // mutator threads, maximum number of concurrent refinement or GC threads. - static uint num_par_rem_sets(); // Initialize data that depends on the heap size being known. - void initialize(uint max_regions); + void initialize(uint max_reserved_regions); G1RemSet(G1CollectedHeap* g1h, G1CardTable* ct, @@ -90,13 +84,15 @@ class G1RemSet: public CHeapObj<mtGC> { void scan_heap_roots(G1ParScanThreadState* pss, uint worker_id, G1GCPhaseTimes::GCParPhases scan_phase, - G1GCPhaseTimes::GCParPhases objcopy_phase); + G1GCPhaseTimes::GCParPhases objcopy_phase, + bool remember_already_scanned_cards); // Merge cards from various sources (remembered sets, hot card cache, log buffers) // and calculate the cards that need to be scanned later (via scan_heap_roots()). // If initial_evacuation is set, this is called during the initial evacuation. void merge_heap_roots(bool initial_evacuation); + void complete_evac_phase(bool has_more_than_one_evacuation_phase); // Prepare for and cleanup after scanning the heap roots. Must be called // once before and after in sequential code. void prepare_for_scan_heap_roots(); diff --git a/src/hotspot/share/gc/g1/g1RootProcessor.cpp b/src/hotspot/share/gc/g1/g1RootProcessor.cpp index d70ad7c4cf5..ae951b1a5b4 100644 --- a/src/hotspot/share/gc/g1/g1RootProcessor.cpp +++ b/src/hotspot/share/gc/g1/g1RootProcessor.cpp @@ -180,13 +180,6 @@ void G1RootProcessor::process_vm_roots(G1RootClosures* closures, uint worker_id) { OopClosure* strong_roots = closures->strong_oops(); - { - G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ObjectSynchronizerRoots, worker_id); - if (_process_strong_tasks.try_claim_task(G1RP_PS_ObjectSynchronizer_oops_do)) { - ObjectSynchronizer::oops_do(strong_roots); - } - } - #if INCLUDE_AOT if (UseAOT) { G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::AOTCodeRoots, worker_id); diff --git a/src/hotspot/share/gc/g1/g1RootProcessor.hpp b/src/hotspot/share/gc/g1/g1RootProcessor.hpp index 26f35e937ad..22d8e3ebbef 100644 --- a/src/hotspot/share/gc/g1/g1RootProcessor.hpp +++ b/src/hotspot/share/gc/g1/g1RootProcessor.hpp @@ -54,7 +54,6 @@ class G1RootProcessor : public StackObj { enum G1H_process_roots_tasks { G1RP_PS_Universe_oops_do, - G1RP_PS_ObjectSynchronizer_oops_do, G1RP_PS_Management_oops_do, G1RP_PS_ClassLoaderDataGraph_oops_do, G1RP_PS_jvmti_oops_do, diff --git a/src/hotspot/share/gc/g1/g1ServiceThread.cpp b/src/hotspot/share/gc/g1/g1ServiceThread.cpp index 3450abbcd93..0c7f91ab6d7 100644 --- a/src/hotspot/share/gc/g1/g1ServiceThread.cpp +++ b/src/hotspot/share/gc/g1/g1ServiceThread.cpp @@ -59,7 +59,7 @@ void G1ServiceThread::sleep_before_next_cycle() { bool G1ServiceThread::should_start_periodic_gc() { G1CollectedHeap* g1h = G1CollectedHeap::heap(); // If we are currently in a concurrent mark we are going to uncommit memory soon. - if (g1h->concurrent_mark()->cm_thread()->during_cycle()) { + if (g1h->concurrent_mark()->cm_thread()->in_progress()) { log_debug(gc, periodic)("Concurrent cycle in progress. Skipping."); return false; } diff --git a/src/hotspot/share/gc/g1/heapRegion.cpp b/src/hotspot/share/gc/g1/heapRegion.cpp index ce63b911dab..eadde715f6f 100644 --- a/src/hotspot/share/gc/g1/heapRegion.cpp +++ b/src/hotspot/share/gc/g1/heapRegion.cpp @@ -43,6 +43,7 @@ #include "oops/access.inline.hpp" #include "oops/compressedOops.inline.hpp" #include "oops/oop.inline.hpp" +#include "runtime/globals_extension.hpp" #include "utilities/powerOfTwo.hpp" int HeapRegion::LogOfHRGrainBytes = 0; diff --git a/src/hotspot/share/gc/g1/heapRegionManager.cpp b/src/hotspot/share/gc/g1/heapRegionManager.cpp index 15892182d29..f527eb8c7b2 100644 --- a/src/hotspot/share/gc/g1/heapRegionManager.cpp +++ b/src/hotspot/share/gc/g1/heapRegionManager.cpp @@ -85,11 +85,11 @@ HeapRegionManager* HeapRegionManager::create_manager(G1CollectedHeap* heap) { } void HeapRegionManager::initialize(G1RegionToSpaceMapper* heap_storage, - G1RegionToSpaceMapper* prev_bitmap, - G1RegionToSpaceMapper* next_bitmap, - G1RegionToSpaceMapper* bot, - G1RegionToSpaceMapper* cardtable, - G1RegionToSpaceMapper* card_counts) { + G1RegionToSpaceMapper* prev_bitmap, + G1RegionToSpaceMapper* next_bitmap, + G1RegionToSpaceMapper* bot, + G1RegionToSpaceMapper* cardtable, + G1RegionToSpaceMapper* card_counts) { _allocated_heapregions_length = 0; _heap_mapper = heap_storage; @@ -184,7 +184,8 @@ HeapRegion* HeapRegionManager::new_heap_region(uint hrm_index) { void HeapRegionManager::commit_regions(uint index, size_t num_regions, WorkGang* pretouch_gang) { guarantee(num_regions > 0, "Must commit more than zero regions"); - guarantee(_num_committed + num_regions <= max_length(), "Cannot commit more than the maximum amount of regions"); + guarantee(num_regions <= available(), + "Cannot commit more than the maximum amount of regions"); _num_committed += (uint)num_regions; @@ -321,16 +322,19 @@ void HeapRegionManager::expand_exact(uint start, uint num_regions, WorkGang* pre uint HeapRegionManager::expand_on_preferred_node(uint preferred_index) { uint expand_candidate = UINT_MAX; - for (uint i = 0; i < max_length(); i++) { - if (is_available(i)) { - // Already in use continue - continue; - } - // Always save the candidate so we can expand later on. - expand_candidate = i; - if (is_on_preferred_index(expand_candidate, preferred_index)) { - // We have found a candidate on the preffered node, break. - break; + + if (available() >= 1) { + for (uint i = 0; i < reserved_length(); i++) { + if (is_available(i)) { + // Already in use continue + continue; + } + // Always save the candidate so we can expand later on. + expand_candidate = i; + if (is_on_preferred_index(expand_candidate, preferred_index)) { + // We have found a candidate on the preferred node, break. + break; + } } } @@ -397,14 +401,18 @@ uint HeapRegionManager::find_contiguous_in_free_list(uint num_regions) { range_start = _available_map.get_next_one_offset(range_end); range_end = _available_map.get_next_zero_offset(range_start); candidate = find_contiguous_in_range((uint) range_start, (uint) range_end, num_regions); - } while (candidate == G1_NO_HRM_INDEX && range_end < max_length()); + } while (candidate == G1_NO_HRM_INDEX && range_end < reserved_length()); return candidate; } uint HeapRegionManager::find_contiguous_allow_expand(uint num_regions) { + // Check if we can actually satisfy the allocation. + if (num_regions > available()) { + return G1_NO_HRM_INDEX; + } // Find any candidate. - return find_contiguous_in_range(0, max_length(), num_regions); + return find_contiguous_in_range(0, reserved_length(), num_regions); } HeapRegion* HeapRegionManager::next_region_in_heap(const HeapRegion* r) const { @@ -420,7 +428,7 @@ HeapRegion* HeapRegionManager::next_region_in_heap(const HeapRegion* r) const { } void HeapRegionManager::iterate(HeapRegionClosure* blk) const { - uint len = max_length(); + uint len = reserved_length(); for (uint i = 0; i < len; i++) { if (!is_available(i)) { @@ -436,13 +444,13 @@ void HeapRegionManager::iterate(HeapRegionClosure* blk) const { } HeapRegionRange HeapRegionManager::find_unavailable_from_idx(uint index) const { - guarantee(index <= max_length(), "checking"); + guarantee(index <= reserved_length(), "checking"); // Find first unavailable region from offset. BitMap::idx_t start = _available_map.get_next_zero_offset(index); if (start == _available_map.size()) { // No unavailable regions found. - return HeapRegionRange(max_length(), max_length()); + return HeapRegionRange(reserved_length(), reserved_length()); } // The end of the range is the next available region. @@ -452,22 +460,25 @@ HeapRegionRange HeapRegionManager::find_unavailable_from_idx(uint index) const { assert(!_available_map.at(end - 1), "Last region (" SIZE_FORMAT ") in range is not unavailable", end - 1); assert(end == _available_map.size() || _available_map.at(end), "Region (" SIZE_FORMAT ") is not available", end); + // Shrink returned range to number of regions left to commit if necessary. + end = MIN2(start + available(), end); return HeapRegionRange((uint) start, (uint) end); } uint HeapRegionManager::find_highest_free(bool* expanded) { // Loop downwards from the highest region index, looking for an // entry which is either free or not yet committed. If not yet - // committed, expand_at that index. - uint curr = max_length() - 1; + // committed, expand at that index. + uint curr = reserved_length() - 1; while (true) { HeapRegion *hr = _regions.get_by_index(curr); if (hr == NULL || !is_available(curr)) { - uint res = expand_at(curr, 1, NULL); - if (res == 1) { - *expanded = true; - return curr; - } + // Found uncommitted and free region, expand to make it available for use. + expand_exact(curr, 1, NULL); + assert(at(curr)->is_free(), "Region (%u) must be available and free after expand", curr); + + *expanded = true; + return curr; } else { if (hr->is_free()) { *expanded = false; @@ -491,7 +502,7 @@ bool HeapRegionManager::allocate_containing_regions(MemRegion range, size_t* com for (uint curr_index = start_index; curr_index <= last_index; curr_index++) { if (!is_available(curr_index)) { commits++; - expand_at(curr_index, 1, pretouch_workers); + expand_exact(curr_index, 1, pretouch_workers); } HeapRegion* curr_region = _regions.get_by_index(curr_index); if (!curr_region->is_free()) { @@ -611,9 +622,12 @@ void HeapRegionManager::verify() { guarantee(length() <= _allocated_heapregions_length, "invariant: _length: %u _allocated_length: %u", length(), _allocated_heapregions_length); - guarantee(_allocated_heapregions_length <= max_length(), + guarantee(_allocated_heapregions_length <= reserved_length(), "invariant: _allocated_length: %u _max_length: %u", - _allocated_heapregions_length, max_length()); + _allocated_heapregions_length, reserved_length()); + guarantee(_num_committed <= max_length(), + "invariant: _num_committed: %u max_regions: %u", + _num_committed, max_length()); bool prev_committed = true; uint num_committed = 0; @@ -640,7 +654,7 @@ void HeapRegionManager::verify() { prev_committed = true; prev_end = hr->end(); } - for (uint i = _allocated_heapregions_length; i < max_length(); i++) { + for (uint i = _allocated_heapregions_length; i < reserved_length(); i++) { guarantee(_regions.get_by_index(i) == NULL, "invariant i: %u", i); } @@ -693,7 +707,7 @@ class G1RebuildFreeListTask : public AbstractGangTask { AbstractGangTask("G1 Rebuild Free List Task"), _hrm(hrm), _worker_freelists(NEW_C_HEAP_ARRAY(FreeRegionList, num_workers, mtGC)), - _worker_chunk_size((_hrm->max_length() + num_workers - 1) / num_workers), + _worker_chunk_size((_hrm->reserved_length() + num_workers - 1) / num_workers), _num_workers(num_workers) { for (uint worker = 0; worker < _num_workers; worker++) { ::new (&_worker_freelists[worker]) FreeRegionList("Appendable Worker Free List"); @@ -718,7 +732,7 @@ class G1RebuildFreeListTask : public AbstractGangTask { EventGCPhaseParallel event; uint start = worker_id * _worker_chunk_size; - uint end = MIN2(start + _worker_chunk_size, _hrm->max_length()); + uint end = MIN2(start + _worker_chunk_size, _hrm->reserved_length()); // If start is outside the heap, this worker has nothing to do. if (start > end) { diff --git a/src/hotspot/share/gc/g1/heapRegionManager.hpp b/src/hotspot/share/gc/g1/heapRegionManager.hpp index 4aad234dda1..c629b3ba562 100644 --- a/src/hotspot/share/gc/g1/heapRegionManager.hpp +++ b/src/hotspot/share/gc/g1/heapRegionManager.hpp @@ -73,13 +73,14 @@ class HeapRegionRange : public StackObj { // region we retain the HeapRegion to be able to re-use it in the // future (in case we recommit it). // -// We keep track of three lengths: +// We keep track of four lengths: // // * _num_committed (returned by length()) is the number of currently // committed regions. These may not be contiguous. // * _allocated_heapregions_length (not exposed outside this class) is the // number of regions+1 for which we have HeapRegions. -// * max_length() returns the maximum number of regions the heap can have. +// * max_length() returns the maximum number of regions the heap may commit. +// * reserved_length() returns the maximum number of regions the heap has reserved. // class HeapRegionManager: public CHeapObj<mtGC> { @@ -94,7 +95,7 @@ class HeapRegionManager: public CHeapObj<mtGC> { // for allocation. CHeapBitMap _available_map; - // The number of regions committed in the heap. + // The number of regions committed in the heap. uint _num_committed; // Internal only. The highest heap region +1 we allocated a HeapRegion instance for. @@ -124,7 +125,7 @@ class HeapRegionManager: public CHeapObj<mtGC> { // Finds the next sequence of unavailable regions starting at the given index. Returns the // sequence found as a HeapRegionRange. If no regions can be found, both start and end of - // the returned range is equal to max_regions(). + // the returned range is equal to reserved_length(). HeapRegionRange find_unavailable_from_idx(uint index) const; // Finds the next sequence of empty regions starting from start_idx, going backwards in // the heap. Returns the length of the sequence found. If this value is zero, no @@ -240,17 +241,17 @@ class HeapRegionManager: public CHeapObj<mtGC> { return num_free_regions() * HeapRegion::GrainBytes; } - // Return the number of available (uncommitted) regions. + // Return the number of regions available (uncommitted) regions. uint available() const { return max_length() - length(); } // Return the number of regions that have been committed in the heap. uint length() const { return _num_committed; } - // Return the maximum number of regions in the heap. - uint max_length() const { return (uint)_regions.length(); } + // The number of regions reserved for the heap. + uint reserved_length() const { return (uint)_regions.length(); } // Return maximum number of regions that heap can expand to. - virtual uint max_expandable_length() const { return (uint)_regions.length(); } + virtual uint max_length() const { return reserved_length(); } MemoryUsage get_auxiliary_data_memory_usage() const; @@ -267,7 +268,7 @@ class HeapRegionManager: public CHeapObj<mtGC> { // this. virtual uint expand_at(uint start, uint num_regions, WorkGang* pretouch_workers); - // Try to expand on the given node index. + // Try to expand on the given node index, returning the index of the new region. virtual uint expand_on_preferred_node(uint node_index); HeapRegion* next_region_in_heap(const HeapRegion* r) const; diff --git a/src/hotspot/share/gc/g1/heapRegionManager.inline.hpp b/src/hotspot/share/gc/g1/heapRegionManager.inline.hpp index a72b5447c5f..e290ffb1abc 100644 --- a/src/hotspot/share/gc/g1/heapRegionManager.inline.hpp +++ b/src/hotspot/share/gc/g1/heapRegionManager.inline.hpp @@ -62,7 +62,7 @@ inline HeapRegion* HeapRegionManager::next_region_in_humongous(HeapRegion* hr) c assert(is_available(index), "pre-condition"); assert(hr->is_humongous(), "next_region_in_humongous should only be called for a humongous region."); index++; - if (index < max_length() && is_available(index) && at(index)->is_continues_humongous()) { + if (index < reserved_length() && is_available(index) && at(index)->is_continues_humongous()) { return at(index); } else { return NULL; diff --git a/src/hotspot/share/gc/g1/heapRegionRemSet.cpp b/src/hotspot/share/gc/g1/heapRegionRemSet.cpp index b38d9f66eab..f23932b9d0e 100644 --- a/src/hotspot/share/gc/g1/heapRegionRemSet.cpp +++ b/src/hotspot/share/gc/g1/heapRegionRemSet.cpp @@ -33,6 +33,7 @@ #include "memory/padded.inline.hpp" #include "oops/oop.inline.hpp" #include "runtime/atomic.hpp" +#include "runtime/globals_extension.hpp" #include "utilities/bitMap.inline.hpp" #include "utilities/debug.hpp" #include "utilities/formatBuffer.hpp" @@ -267,7 +268,7 @@ PerRegionTable* OtherRegionsTable::delete_region_table(size_t& added_by_deleted) _coarse_map.at_put(max_hrm_index, true); } else { // This will lazily initialize an uninitialized bitmap - _coarse_map.reinitialize(G1CollectedHeap::heap()->max_regions()); + _coarse_map.reinitialize(G1CollectedHeap::heap()->max_reserved_regions()); assert(!_coarse_map.at(max_hrm_index), "No coarse entries"); _coarse_map.at_put(max_hrm_index, true); // Release store guarantees that the bitmap has initialized before any diff --git a/src/hotspot/share/gc/g1/heterogeneousHeapRegionManager.cpp b/src/hotspot/share/gc/g1/heterogeneousHeapRegionManager.cpp index 69180522603..85a0af541f0 100644 --- a/src/hotspot/share/gc/g1/heterogeneousHeapRegionManager.cpp +++ b/src/hotspot/share/gc/g1/heterogeneousHeapRegionManager.cpp @@ -59,7 +59,7 @@ void HeterogeneousHeapRegionManager::initialize(G1RegionToSpaceMapper* heap_stor // Dram regions are committed later as needed during mutator region allocation or // when young list target length is determined after gc cycle. uint HeterogeneousHeapRegionManager::expand_by(uint num_regions, WorkGang* pretouch_workers) { - uint num_regions_possible = total_regions_committed() >= max_expandable_length() ? 0 : max_expandable_length() - total_regions_committed(); + uint num_regions_possible = total_regions_committed() >= max_length() ? 0 : max_length() - total_regions_committed(); uint num_expanded = expand_nvdimm(MIN2(num_regions, num_regions_possible), pretouch_workers); return num_expanded; } @@ -71,11 +71,11 @@ uint HeterogeneousHeapRegionManager::expand_at(uint start, uint num_regions, Wor if (num_regions == 0) { return 0; } - uint target_num_regions = MIN2(num_regions, max_expandable_length() - total_regions_committed()); + uint target_num_regions = MIN2(num_regions, max_length() - total_regions_committed()); uint end = is_in_nvdimm(start) ? end_index_of_nvdimm() : end_index_of_dram(); uint num_expanded = expand_in_range(start, end, target_num_regions, pretouch_workers); - assert(total_regions_committed() <= max_expandable_length(), "must be"); + assert(total_regions_committed() <= max_length(), "must be"); return num_expanded; } @@ -140,13 +140,13 @@ uint HeterogeneousHeapRegionManager::num_committed_nvdimm() const { } // Return maximum number of regions that heap can expand to. -uint HeterogeneousHeapRegionManager::max_expandable_length() const { +uint HeterogeneousHeapRegionManager::max_length() const { return _max_regions; } uint HeterogeneousHeapRegionManager::find_unavailable_in_range(uint start_idx, uint end_idx, uint* res_idx) const { guarantee(res_idx != NULL, "checking"); - guarantee(start_idx <= (max_length() + 1), "checking"); + guarantee(start_idx <= (reserved_length() + 1), "checking"); uint num_regions = 0; @@ -232,8 +232,8 @@ uint HeterogeneousHeapRegionManager::shrink_in_range(uint start, uint end, uint uint HeterogeneousHeapRegionManager::find_empty_in_range_reverse(uint start_idx, uint end_idx, uint* res_idx) { guarantee(res_idx != NULL, "checking"); - guarantee(start_idx < max_length(), "checking"); - guarantee(end_idx < max_length(), "checking"); + guarantee(start_idx < reserved_length(), "checking"); + guarantee(end_idx < reserved_length(), "checking"); if(start_idx > end_idx) { return 0; } @@ -385,7 +385,7 @@ uint HeterogeneousHeapRegionManager::find_contiguous(size_t start, size_t end, s "Found region sequence starting at " UINT32_FORMAT ", length " SIZE_FORMAT " that is not empty at " UINT32_FORMAT ". Hr is " PTR_FORMAT, found, num, i, p2i(hr)); } - if (!empty_only && length_unavailable > (max_expandable_length() - total_regions_committed())) { + if (!empty_only && length_unavailable > (max_length() - total_regions_committed())) { // if 'length_unavailable' number of regions will be made available, we will exceed max regions. return G1_NO_HRM_INDEX; } diff --git a/src/hotspot/share/gc/g1/heterogeneousHeapRegionManager.hpp b/src/hotspot/share/gc/g1/heterogeneousHeapRegionManager.hpp index 1e65c145396..ad4a446b6d2 100644 --- a/src/hotspot/share/gc/g1/heterogeneousHeapRegionManager.hpp +++ b/src/hotspot/share/gc/g1/heterogeneousHeapRegionManager.hpp @@ -124,7 +124,7 @@ class HeterogeneousHeapRegionManager : public HeapRegionManager { virtual HeapRegion* allocate_humongous_allow_expand(uint num_regions); // Return maximum number of regions that heap can expand to. - uint max_expandable_length() const; + uint max_length() const; // Override. Expand in nv-dimm. uint expand_by(uint num_regions, WorkGang* pretouch_workers); diff --git a/src/hotspot/share/gc/g1/vmStructs_g1.hpp b/src/hotspot/share/gc/g1/vmStructs_g1.hpp index 5aa4170d681..d2d46028b9a 100644 --- a/src/hotspot/share/gc/g1/vmStructs_g1.hpp +++ b/src/hotspot/share/gc/g1/vmStructs_g1.hpp @@ -53,7 +53,6 @@ nonstatic_field(G1HeapRegionTable, _shift_by, uint) \ \ nonstatic_field(HeapRegionManager, _regions, G1HeapRegionTable) \ - nonstatic_field(HeapRegionManager, _num_committed, uint) \ \ volatile_nonstatic_field(G1CollectedHeap, _summary_bytes_used, size_t) \ nonstatic_field(G1CollectedHeap, _hrm, HeapRegionManager*) \ diff --git a/src/hotspot/share/gc/parallel/parallelScavengeHeap.hpp b/src/hotspot/share/gc/parallel/parallelScavengeHeap.hpp index 64da505ec23..ed72efea866 100644 --- a/src/hotspot/share/gc/parallel/parallelScavengeHeap.hpp +++ b/src/hotspot/share/gc/parallel/parallelScavengeHeap.hpp @@ -202,8 +202,6 @@ class ParallelScavengeHeap : public CollectedHeap { void ensure_parsability(bool retire_tlabs); void resize_all_tlabs(); - bool supports_tlab_allocation() const { return true; } - size_t tlab_capacity(Thread* thr) const; size_t tlab_used(Thread* thr) const; size_t unsafe_max_tlab_alloc(Thread* thr) const; diff --git a/src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp b/src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp index 1d38e0c01b4..979db9e2870 100644 --- a/src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp +++ b/src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp @@ -133,7 +133,7 @@ inline void follow_array_specialized(objArrayOop obj, int index, ParCompactionMa const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride); const size_t end_index = beg_index + stride; - T* const base = (T*)obj->base_raw(); + T* const base = (T*)obj->base(); T* const beg = base + beg_index; T* const end = base + end_index; diff --git a/src/hotspot/share/gc/parallel/psParallelCompact.cpp b/src/hotspot/share/gc/parallel/psParallelCompact.cpp index 6b0b1defca2..34fe6ca9665 100644 --- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp +++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp @@ -2011,10 +2011,6 @@ static void mark_from_roots_work(ParallelRootType::Value root_type, uint worker_ PCMarkAndPushClosure mark_and_push_closure(cm); switch (root_type) { - case ParallelRootType::object_synchronizer: - ObjectSynchronizer::oops_do(&mark_and_push_closure); - break; - case ParallelRootType::class_loader_data: { CLDToOopClosure cld_closure(&mark_and_push_closure, ClassLoaderData::_claim_strong); @@ -2225,7 +2221,6 @@ void PSParallelCompact::adjust_roots(ParCompactionManager* cm) { // General strong roots. Threads::oops_do(&oop_closure, NULL); - ObjectSynchronizer::oops_do(&oop_closure); OopStorageSet::strong_oops_do(&oop_closure); CLDToOopClosure cld_closure(&oop_closure, ClassLoaderData::_claim_strong); ClassLoaderDataGraph::cld_do(&cld_closure); diff --git a/src/hotspot/share/gc/parallel/psPromotionLAB.cpp b/src/hotspot/share/gc/parallel/psPromotionLAB.cpp index cc21fa340a0..f119084cd1c 100644 --- a/src/hotspot/share/gc/parallel/psPromotionLAB.cpp +++ b/src/hotspot/share/gc/parallel/psPromotionLAB.cpp @@ -83,7 +83,7 @@ void PSPromotionLAB::flush() { // so they can always fill with an array. HeapWord* tlab_end = end() + filler_header_size; typeArrayOop filler_oop = (typeArrayOop) top(); - filler_oop->set_mark_raw(markWord::prototype()); + filler_oop->set_mark(markWord::prototype()); filler_oop->set_klass(Universe::intArrayKlassObj()); const size_t array_length = pointer_delta(tlab_end, top()) - typeArrayOopDesc::header_size(T_INT); diff --git a/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp b/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp index 9280d41fa00..3dc587da9e0 100644 --- a/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp +++ b/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp @@ -53,7 +53,7 @@ inline void PSPromotionManager::claim_or_forward_depth(T* p) { assert(should_scavenge(p, true), "revisiting object?"); assert(ParallelScavengeHeap::heap()->is_in(p), "pointer outside heap"); oop obj = RawAccess<IS_NOT_NULL>::oop_load(p); - Prefetch::write(obj->mark_addr_raw(), 0); + Prefetch::write(obj->mark_addr(), 0); push_depth(ScannerTask(p)); } @@ -141,7 +141,7 @@ inline oop PSPromotionManager::copy_to_survivor_space(oop o) { // NOTE! We must be very careful with any methods that access the mark // in o. There may be multiple threads racing on it, and it may be forwarded // at any time. Do not use oop methods for accessing the mark! - markWord test_mark = o->mark_raw(); + markWord test_mark = o->mark(); // The same test as "o->is_forwarded()" if (!test_mark.is_marked()) { diff --git a/src/hotspot/share/gc/parallel/psRootType.hpp b/src/hotspot/share/gc/parallel/psRootType.hpp index de60d8e01f6..921bbfdd2b0 100644 --- a/src/hotspot/share/gc/parallel/psRootType.hpp +++ b/src/hotspot/share/gc/parallel/psRootType.hpp @@ -34,7 +34,6 @@ class ParallelRootType : public AllStatic { // The order reflects the order these roots are to be processed, // We do not want any holes in the enum as we enumerate these values by incrementing them. enum Value { - object_synchronizer, class_loader_data, code_cache, //"threads" are handled in parallel as a special case diff --git a/src/hotspot/share/gc/parallel/psScavenge.cpp b/src/hotspot/share/gc/parallel/psScavenge.cpp index 5625d3d5bfe..0b07c01f262 100644 --- a/src/hotspot/share/gc/parallel/psScavenge.cpp +++ b/src/hotspot/share/gc/parallel/psScavenge.cpp @@ -92,10 +92,6 @@ static void scavenge_roots_work(ParallelRootType::Value root_type, uint worker_i PSPromoteRootsClosure roots_to_old_closure(pm); switch (root_type) { - case ParallelRootType::object_synchronizer: - ObjectSynchronizer::oops_do(&roots_closure); - break; - case ParallelRootType::class_loader_data: { PSScavengeCLDClosure cld_closure(pm); diff --git a/src/hotspot/share/gc/serial/defNewGeneration.cpp b/src/hotspot/share/gc/serial/defNewGeneration.cpp index 1a11abb2614..4234adbc091 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.cpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.cpp @@ -693,7 +693,7 @@ void DefNewGeneration::handle_promotion_failure(oop old) { _promotion_failed = true; _promotion_failed_info.register_copy_failure(old->size()); - _preserved_marks_set.get()->push_if_necessary(old, old->mark_raw()); + _preserved_marks_set.get()->push_if_necessary(old, old->mark()); // forward to self old->forward_to(old); @@ -931,11 +931,7 @@ HeapWord* DefNewGeneration::allocate(size_t word_size, bool is_tlab) { // Note that since DefNewGeneration supports lock-free allocation, we // have to use it here, as well. HeapWord* result = eden()->par_allocate(word_size); - if (result != NULL) { - if (_old_gen != NULL) { - _old_gen->sample_eden_chunk(); - } - } else { + if (result == NULL) { // If the eden is full and the last collection bailed out, we are running // out of heap space, and we try to allocate the from-space, too. // allocate_from_space can't be inlined because that would introduce a @@ -947,11 +943,7 @@ HeapWord* DefNewGeneration::allocate(size_t word_size, bool is_tlab) { HeapWord* DefNewGeneration::par_allocate(size_t word_size, bool is_tlab) { - HeapWord* res = eden()->par_allocate(word_size); - if (_old_gen != NULL) { - _old_gen->sample_eden_chunk(); - } - return res; + return eden()->par_allocate(word_size); } size_t DefNewGeneration::tlab_capacity() const { diff --git a/src/hotspot/share/gc/serial/markSweep.cpp b/src/hotspot/share/gc/serial/markSweep.cpp index ebe0da25766..5ed5df58a5c 100644 --- a/src/hotspot/share/gc/serial/markSweep.cpp +++ b/src/hotspot/share/gc/serial/markSweep.cpp @@ -132,7 +132,7 @@ template <class T> inline void MarkSweep::follow_root(T* p) { T heap_oop = RawAccess<>::oop_load(p); if (!CompressedOops::is_null(heap_oop)) { oop obj = CompressedOops::decode_not_null(heap_oop); - if (!obj->mark_raw().is_marked()) { + if (!obj->mark().is_marked()) { mark_object(obj); follow_object(obj); } @@ -148,7 +148,7 @@ void PreservedMark::adjust_pointer() { } void PreservedMark::restore() { - _obj->set_mark_raw(_mark); + _obj->set_mark(_mark); } // We preserve the mark which should be replaced at the end and the location @@ -205,7 +205,7 @@ void MarkSweep::restore_marks() { while (!_preserved_oop_stack.is_empty()) { oop obj = _preserved_oop_stack.pop(); markWord mark = _preserved_mark_stack.pop(); - obj->set_mark_raw(mark); + obj->set_mark(mark); } } diff --git a/src/hotspot/share/gc/serial/markSweep.inline.hpp b/src/hotspot/share/gc/serial/markSweep.inline.hpp index a207f16c118..4b3875f754c 100644 --- a/src/hotspot/share/gc/serial/markSweep.inline.hpp +++ b/src/hotspot/share/gc/serial/markSweep.inline.hpp @@ -38,8 +38,8 @@ inline void MarkSweep::mark_object(oop obj) { // some marks may contain information we need to preserve so we store them away // and overwrite the mark. We'll restore it at the end of markSweep. - markWord mark = obj->mark_raw(); - obj->set_mark_raw(markWord::prototype().set_marked()); + markWord mark = obj->mark(); + obj->set_mark(markWord::prototype().set_marked()); if (obj->mark_must_be_preserved(mark)) { preserve_mark(obj, mark); @@ -50,7 +50,7 @@ template <class T> inline void MarkSweep::mark_and_push(T* p) { T heap_oop = RawAccess<>::oop_load(p); if (!CompressedOops::is_null(heap_oop)) { oop obj = CompressedOops::decode_not_null(heap_oop); - if (!obj->mark_raw().is_marked()) { + if (!obj->mark().is_marked()) { mark_object(obj); _marking_stack.push(obj); } @@ -79,11 +79,11 @@ template <class T> inline void MarkSweep::adjust_pointer(T* p) { oop obj = CompressedOops::decode_not_null(heap_oop); assert(Universe::heap()->is_in(obj), "should be in heap"); - oop new_obj = oop(obj->mark_raw().decode_pointer()); + oop new_obj = oop(obj->mark().decode_pointer()); - assert(new_obj != NULL || // is forwarding ptr? - obj->mark_raw() == markWord::prototype() || // not gc marked? - (UseBiasedLocking && obj->mark_raw().has_bias_pattern()), + assert(new_obj != NULL || // is forwarding ptr? + obj->mark() == markWord::prototype() || // not gc marked? + (UseBiasedLocking && obj->mark().has_bias_pattern()), // not gc marked? "should be forwarded"); diff --git a/src/hotspot/share/gc/shared/barrierSetConfig.hpp b/src/hotspot/share/gc/shared/barrierSetConfig.hpp index 8ede0fa990e..e20e9ef6f7c 100644 --- a/src/hotspot/share/gc/shared/barrierSetConfig.hpp +++ b/src/hotspot/share/gc/shared/barrierSetConfig.hpp @@ -43,20 +43,4 @@ FOR_EACH_ABSTRACT_BARRIER_SET_DO(f) \ FOR_EACH_CONCRETE_BARRIER_SET_DO(f) -// To enable runtime-resolution of GC barriers on primitives, please -// define SUPPORT_BARRIER_ON_PRIMITIVES. -#ifdef SUPPORT_BARRIER_ON_PRIMITIVES -#define ACCESS_PRIMITIVE_SUPPORT INTERNAL_BT_BARRIER_ON_PRIMITIVES -#else -#define ACCESS_PRIMITIVE_SUPPORT DECORATORS_NONE -#endif - -#ifdef SUPPORT_NOT_TO_SPACE_INVARIANT -#define ACCESS_TO_SPACE_INVARIANT_SUPPORT DECORATORS_NONE -#else -#define ACCESS_TO_SPACE_INVARIANT_SUPPORT INTERNAL_BT_TO_SPACE_INVARIANT -#endif - -#define BT_BUILDTIME_DECORATORS (ACCESS_PRIMITIVE_SUPPORT | ACCESS_TO_SPACE_INVARIANT_SUPPORT) - #endif // SHARE_GC_SHARED_BARRIERSETCONFIG_HPP diff --git a/src/hotspot/share/gc/shared/collectedHeap.hpp b/src/hotspot/share/gc/shared/collectedHeap.hpp index 42e2603bbd0..c8e4acbe649 100644 --- a/src/hotspot/share/gc/shared/collectedHeap.hpp +++ b/src/hotspot/share/gc/shared/collectedHeap.hpp @@ -90,6 +90,7 @@ class GCHeapLog : public EventLogBase<GCMessage> { class ParallelObjectIterator : public CHeapObj<mtGC> { public: virtual void object_iterate(ObjectClosure* cl, uint worker_id) = 0; + virtual ~ParallelObjectIterator() {} }; // @@ -354,13 +355,6 @@ class CollectedHeap : public CHeapObj<mtInternal> { // allocation from them and necessitating allocation of new TLABs. virtual void ensure_parsability(bool retire_tlabs); - // Section on thread-local allocation buffers (TLABs) - // If the heap supports thread-local allocation buffers, it should override - // the following methods: - // Returns "true" iff the heap supports thread-local allocation buffers. - // The default is "no". - virtual bool supports_tlab_allocation() const = 0; - // The amount of space available for thread-local allocation buffers. virtual size_t tlab_capacity(Thread *thr) const = 0; diff --git a/src/hotspot/share/gc/shared/gcConfig.cpp b/src/hotspot/share/gc/shared/gcConfig.cpp index 39d860b20a1..fd4512b7eb4 100644 --- a/src/hotspot/share/gc/shared/gcConfig.cpp +++ b/src/hotspot/share/gc/shared/gcConfig.cpp @@ -78,23 +78,21 @@ SHENANDOAHGC_ONLY_ARG(IncludedGC(UseShenandoahGC, CollectedHeap::Shenandoah, #define FOR_EACH_INCLUDED_GC(var) \ for (const IncludedGC* var = &IncludedGCs[0]; var < &IncludedGCs[ARRAY_SIZE(IncludedGCs)]; var++) -#define FAIL_IF_SELECTED(option, enabled) \ - if (option == enabled && FLAG_IS_CMDLINE(option)) { \ - vm_exit_during_initialization(enabled ? \ - "Option -XX:+" #option " not supported" : \ - "Option -XX:-" #option " not supported"); \ +#define FAIL_IF_SELECTED(option) \ + if (option) { \ + vm_exit_during_initialization("Option -XX:+" #option " not supported"); \ } GCArguments* GCConfig::_arguments = NULL; bool GCConfig::_gc_selected_ergonomically = false; void GCConfig::fail_if_non_included_gc_is_selected() { - NOT_EPSILONGC( FAIL_IF_SELECTED(UseEpsilonGC, true)); - NOT_G1GC( FAIL_IF_SELECTED(UseG1GC, true)); - NOT_PARALLELGC( FAIL_IF_SELECTED(UseParallelGC, true)); - NOT_SERIALGC( FAIL_IF_SELECTED(UseSerialGC, true)); - NOT_SHENANDOAHGC(FAIL_IF_SELECTED(UseShenandoahGC, true)); - NOT_ZGC( FAIL_IF_SELECTED(UseZGC, true)); + NOT_EPSILONGC( FAIL_IF_SELECTED(UseEpsilonGC)); + NOT_G1GC( FAIL_IF_SELECTED(UseG1GC)); + NOT_PARALLELGC( FAIL_IF_SELECTED(UseParallelGC)); + NOT_SERIALGC( FAIL_IF_SELECTED(UseSerialGC)); + NOT_SHENANDOAHGC(FAIL_IF_SELECTED(UseShenandoahGC)); + NOT_ZGC( FAIL_IF_SELECTED(UseZGC)); } void GCConfig::select_gc_ergonomically() { diff --git a/src/hotspot/share/gc/shared/gcConfiguration.cpp b/src/hotspot/share/gc/shared/gcConfiguration.cpp index 2a24e031b9c..195b64dcc3c 100644 --- a/src/hotspot/share/gc/shared/gcConfiguration.cpp +++ b/src/hotspot/share/gc/shared/gcConfiguration.cpp @@ -22,6 +22,7 @@ * */ #include "precompiled.hpp" +#include "runtime/globals_extension.hpp" #include "gc/shared/collectedHeap.hpp" #include "gc/shared/gcArguments.hpp" diff --git a/src/hotspot/share/gc/shared/genCollectedHeap.cpp b/src/hotspot/share/gc/shared/genCollectedHeap.cpp index 1c95aeff4d9..48c7060a10f 100644 --- a/src/hotspot/share/gc/shared/genCollectedHeap.cpp +++ b/src/hotspot/share/gc/shared/genCollectedHeap.cpp @@ -817,9 +817,6 @@ void GenCollectedHeap::process_roots(StrongRootsScope* scope, bool is_par = scope->n_threads() > 1; Threads::possibly_parallel_oops_do(is_par, strong_roots, roots_from_code_p); - if (_process_strong_tasks->try_claim_task(GCH_PS_ObjectSynchronizer_oops_do)) { - ObjectSynchronizer::oops_do(strong_roots); - } #if INCLUDE_AOT if (UseAOT && _process_strong_tasks->try_claim_task(GCH_PS_aot_oops_do)) { AOTLoader::oops_do(strong_roots); @@ -1032,33 +1029,22 @@ bool GenCollectedHeap::block_is_obj(const HeapWord* addr) const { return _old_gen->block_is_obj(addr); } -bool GenCollectedHeap::supports_tlab_allocation() const { - assert(!_old_gen->supports_tlab_allocation(), "Old gen supports TLAB allocation?!"); - return _young_gen->supports_tlab_allocation(); -} - size_t GenCollectedHeap::tlab_capacity(Thread* thr) const { assert(!_old_gen->supports_tlab_allocation(), "Old gen supports TLAB allocation?!"); - if (_young_gen->supports_tlab_allocation()) { - return _young_gen->tlab_capacity(); - } - return 0; + assert(_young_gen->supports_tlab_allocation(), "Young gen doesn't support TLAB allocation?!"); + return _young_gen->tlab_capacity(); } size_t GenCollectedHeap::tlab_used(Thread* thr) const { assert(!_old_gen->supports_tlab_allocation(), "Old gen supports TLAB allocation?!"); - if (_young_gen->supports_tlab_allocation()) { - return _young_gen->tlab_used(); - } - return 0; + assert(_young_gen->supports_tlab_allocation(), "Young gen doesn't support TLAB allocation?!"); + return _young_gen->tlab_used(); } size_t GenCollectedHeap::unsafe_max_tlab_alloc(Thread* thr) const { assert(!_old_gen->supports_tlab_allocation(), "Old gen supports TLAB allocation?!"); - if (_young_gen->supports_tlab_allocation()) { - return _young_gen->unsafe_max_tlab_alloc(); - } - return 0; + assert(_young_gen->supports_tlab_allocation(), "Young gen doesn't support TLAB allocation?!"); + return _young_gen->unsafe_max_tlab_alloc(); } HeapWord* GenCollectedHeap::allocate_new_tlab(size_t min_size, diff --git a/src/hotspot/share/gc/shared/genCollectedHeap.hpp b/src/hotspot/share/gc/shared/genCollectedHeap.hpp index 13ada27e269..da88474a0fa 100644 --- a/src/hotspot/share/gc/shared/genCollectedHeap.hpp +++ b/src/hotspot/share/gc/shared/genCollectedHeap.hpp @@ -105,7 +105,6 @@ class GenCollectedHeap : public CollectedHeap { // The set of potentially parallel tasks in root scanning. enum GCH_strong_roots_tasks { - GCH_PS_ObjectSynchronizer_oops_do, GCH_PS_OopStorageSet_oops_do, GCH_PS_ClassLoaderDataGraph_oops_do, GCH_PS_CodeCache_oops_do, @@ -267,7 +266,6 @@ class GenCollectedHeap : public CollectedHeap { bool block_is_obj(const HeapWord* addr) const; // Section on TLAB's. - virtual bool supports_tlab_allocation() const; virtual size_t tlab_capacity(Thread* thr) const; virtual size_t tlab_used(Thread* thr) const; virtual size_t unsafe_max_tlab_alloc(Thread* thr) const; diff --git a/src/hotspot/share/gc/shared/generation.hpp b/src/hotspot/share/gc/shared/generation.hpp index 539e6675fc2..9643dd74db1 100644 --- a/src/hotspot/share/gc/shared/generation.hpp +++ b/src/hotspot/share/gc/shared/generation.hpp @@ -371,17 +371,6 @@ class Generation: public CHeapObj<mtGC> { virtual void post_compact() { ShouldNotReachHere(); } #endif - // Support for CMS's rescan. In this general form we return a pointer - // to an abstract object that can be used, based on specific previously - // decided protocols, to exchange information between generations, - // information that may be useful for speeding up certain types of - // garbage collectors. A NULL value indicates to the client that - // no data recording is expected by the provider. The data-recorder is - // expected to be GC worker thread-local, with the worker index - // indicated by "thr_num". - virtual void* get_data_recorder(int thr_num) { return NULL; } - virtual void sample_eden_chunk() {} - // Some generations may require some cleanup actions before allowing // a verification. virtual void prepare_for_verify() {} diff --git a/src/hotspot/share/gc/shared/locationPrinter.inline.hpp b/src/hotspot/share/gc/shared/locationPrinter.inline.hpp index 9ac0ee1acfe..343687ae0f0 100644 --- a/src/hotspot/share/gc/shared/locationPrinter.inline.hpp +++ b/src/hotspot/share/gc/shared/locationPrinter.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 @@ -70,11 +70,12 @@ bool BlockLocationPrinter<CollectedHeapT>::print_location(outputStream* st, void // Compressed oop needs to be decoded first. #ifdef _LP64 if (UseCompressedOops && ((uintptr_t)addr &~ (uintptr_t)max_juint) == 0) { - narrowOop narrow_oop = (narrowOop)(uintptr_t)addr; + narrowOop narrow_oop = CompressedOops::narrow_oop_cast((uintptr_t)addr); oop o = CompressedOops::decode_raw(narrow_oop); if (is_valid_obj(o)) { - st->print(UINT32_FORMAT " is a compressed pointer to object: ", narrow_oop); + st->print(UINT32_FORMAT " is a compressed pointer to object: ", + CompressedOops::narrow_oop_value(narrow_oop)); o->print_on(st); return true; } diff --git a/src/hotspot/share/gc/shared/memAllocator.cpp b/src/hotspot/share/gc/shared/memAllocator.cpp index f1aaec58119..b9c5c91ee5a 100644 --- a/src/hotspot/share/gc/shared/memAllocator.cpp +++ b/src/hotspot/share/gc/shared/memAllocator.cpp @@ -382,7 +382,7 @@ void MemAllocator::mem_clear(HeapWord* mem) const { oop MemAllocator::finish(HeapWord* mem) const { assert(mem != NULL, "NULL object pointer"); - oopDesc::set_mark_raw(mem, Klass::default_prototype_header(_klass)); + oopDesc::set_mark(mem, Klass::default_prototype_header(_klass)); // Need a release store to ensure array/class length, mark word, and // object zeroing are visible before setting the klass non-NULL, for // concurrent collectors. diff --git a/src/hotspot/share/gc/shared/oopStorage.cpp b/src/hotspot/share/gc/shared/oopStorage.cpp index 1f8dbeaa61c..4248c9d91b8 100644 --- a/src/hotspot/share/gc/shared/oopStorage.cpp +++ b/src/hotspot/share/gc/shared/oopStorage.cpp @@ -697,7 +697,7 @@ void OopStorage::release(const oop* ptr) { check_release_entry(ptr); Block* block = find_block_or_null(ptr); assert(block != NULL, "%s: invalid release " PTR_FORMAT, name(), p2i(ptr)); - log_trace(oopstorage, ref)("%s: released " PTR_FORMAT, name(), p2i(ptr)); + log_trace(oopstorage, ref)("%s: releasing " PTR_FORMAT, name(), p2i(ptr)); block->release_entries(block->bitmask_for_entry(ptr), this); Atomic::dec(&_allocation_count); } @@ -708,7 +708,6 @@ void OopStorage::release(const oop* const* ptrs, size_t size) { check_release_entry(ptrs[i]); Block* block = find_block_or_null(ptrs[i]); assert(block != NULL, "%s: invalid release " PTR_FORMAT, name(), p2i(ptrs[i])); - log_trace(oopstorage, ref)("%s: released " PTR_FORMAT, name(), p2i(ptrs[i])); size_t count = 0; uintx releasing = 0; for ( ; i < size; ++i) { @@ -717,7 +716,7 @@ void OopStorage::release(const oop* const* ptrs, size_t size) { // If entry not in block, finish block and resume outer loop with entry. if (!block->contains(entry)) break; // Add entry to releasing bitmap. - log_trace(oopstorage, ref)("%s: released " PTR_FORMAT, name(), p2i(entry)); + log_trace(oopstorage, ref)("%s: releasing " PTR_FORMAT, name(), p2i(entry)); uintx entry_bitmask = block->bitmask_for_entry(entry); assert((releasing & entry_bitmask) == 0, "Duplicate entry: " PTR_FORMAT, p2i(entry)); diff --git a/src/hotspot/share/gc/shared/oopStorageSet.hpp b/src/hotspot/share/gc/shared/oopStorageSet.hpp index 9fd8a3ce5be..2318c972317 100644 --- a/src/hotspot/share/gc/shared/oopStorageSet.hpp +++ b/src/hotspot/share/gc/shared/oopStorageSet.hpp @@ -38,7 +38,7 @@ class OopStorageSet : public AllStatic { public: // Must be updated when new OopStorages are introduced static const uint strong_count = 4 JVMTI_ONLY(+ 1); - static const uint weak_count = 4 JFR_ONLY(+ 1); + static const uint weak_count = 5 JFR_ONLY(+ 1); static const uint all_count = strong_count + weak_count; private: diff --git a/src/hotspot/share/gc/shared/partialArrayTaskStepper.cpp b/src/hotspot/share/gc/shared/partialArrayTaskStepper.cpp new file mode 100644 index 00000000000..7b60e1b0e11 --- /dev/null +++ b/src/hotspot/share/gc/shared/partialArrayTaskStepper.cpp @@ -0,0 +1,53 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "gc/shared/partialArrayTaskStepper.hpp" +#include "oops/arrayOop.hpp" +#include "utilities/globalDefinitions.hpp" + +static uint compute_task_limit(uint n_workers) { + // Don't need more than n_workers tasks at a time. But allowing up to + // that maximizes available parallelism. + return n_workers; +} + +static uint compute_task_fanout(uint task_limit) { + assert(task_limit > 0, "precondition"); + // There is a tradeoff between providing parallelism more quickly and + // number of enqueued tasks. A constant fanout may be too slow when + // parallelism (and so task_limit) is large. A constant fraction might + // be overly eager. Using log2 attempts to balance between those. + uint result = log2_uint(task_limit); + // result must be > 0. result should be > 1 if task_limit > 1, to + // provide some potentially parallel tasks. But don't just +1 to + // avoid otherwise increasing rate of task generation. + if (result < 2) ++result; + return result; +} + +PartialArrayTaskStepper::PartialArrayTaskStepper(uint n_workers) : + _task_limit(compute_task_limit(n_workers)), + _task_fanout(compute_task_fanout(_task_limit)) +{} diff --git a/src/hotspot/share/gc/shared/partialArrayTaskStepper.hpp b/src/hotspot/share/gc/shared/partialArrayTaskStepper.hpp new file mode 100644 index 00000000000..aec993f907c --- /dev/null +++ b/src/hotspot/share/gc/shared/partialArrayTaskStepper.hpp @@ -0,0 +1,82 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_GC_SHARED_PARTIALARRAYTASKSTEPPER_HPP +#define SHARE_GC_SHARED_PARTIALARRAYTASKSTEPPER_HPP + +#include "oops/arrayOop.hpp" +#include "utilities/globalDefinitions.hpp" + +// Helper for handling PartialArrayTasks. +// +// When an array is large, we want to split it up into chunks that can be +// processed in parallel. Each task (implicitly) represents such a chunk. +// We can enqueue multiple tasks at the same time. We want to enqueue +// enough tasks to benefit from the available parallelism, while not so many +// as to substantially expand the task queues. +// +// A task directly refers to the from-space array. The from-space array's +// forwarding pointer refers to the associated to-space array, and its +// length is the actual length. The to-space array's length field is used to +// indicate processing progress. It is the starting index of the next chunk +// to process, or equals the actual length when there are no more chunks to +// be processed. +class PartialArrayTaskStepper { +public: + PartialArrayTaskStepper(uint n_workers); + + struct Step { + int _index; // Array index for the step. + uint _ncreate; // Number of new tasks to create. + }; + + // Set to's length to the end of the initial chunk, which is the start of + // the first partial task if the array is large enough to need splitting. + // Returns a Step with _index being that index and _ncreate being the + // initial number of partial tasks to enqueue. + inline Step start(arrayOop from, arrayOop to, int chunk_size) const; + + // Increment to's length by chunk_size to claim the next chunk. Returns a + // Step with _index being the starting index of the claimed chunk and + // _ncreate being the number of additional partial tasks to enqueue. + // precondition: chunk_size must be the same as used to start the task sequence. + inline Step next(arrayOop from, arrayOop to, int chunk_size) const; + + class TestSupport; // For unit tests + +private: + // Limit on the number of partial array tasks to create for a given array. + uint _task_limit; + // Maximum number of new tasks to create when processing an existing task. + uint _task_fanout; + + // Split start/next into public part dealing with oops and private + // impl dealing with lengths and pointers to lengths, for unit testing. + // length is the actual length obtained from the from-space object. + // to_length_addr is the address of the to-space object's length value. + inline Step start_impl(int length, int* to_length_addr, int chunk_size) const; + inline Step next_impl(int length, int* to_length_addr, int chunk_size) const; +}; + +#endif // SHARE_GC_SHARED_PARTIALARRAYTASKSTEPPER_HPP diff --git a/src/hotspot/share/gc/shared/partialArrayTaskStepper.inline.hpp b/src/hotspot/share/gc/shared/partialArrayTaskStepper.inline.hpp new file mode 100644 index 00000000000..de6ded3f19f --- /dev/null +++ b/src/hotspot/share/gc/shared/partialArrayTaskStepper.inline.hpp @@ -0,0 +1,117 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_GC_SHARED_PARTIALARRAYTASKSTEPPER_INLINE_HPP +#define SHARE_GC_SHARED_PARTIALARRAYTASKSTEPPER_INLINE_HPP + +#include "gc/shared/partialArrayTaskStepper.hpp" +#include "oops/arrayOop.hpp" +#include "runtime/atomic.hpp" + +PartialArrayTaskStepper::Step +PartialArrayTaskStepper::start_impl(int length, + int* to_length_addr, + int chunk_size) const { + assert(chunk_size > 0, "precondition"); + + int end = length % chunk_size; // End of initial chunk. + // Set to's length to end of initial chunk. Partial tasks use that length + // field as the start of the next chunk to process. Must be done before + // enqueuing partial scan tasks, in case other threads steal any of those + // tasks. + // + // The value of end can be 0, either because of a 0-length array or + // because length is a multiple of the chunk size. Both of those are + // relatively rare and handled in the normal course of the iteration, so + // not worth doing anything special about here. + *to_length_addr = end; + + // If the initial chunk is the complete array, then don't need any partial + // tasks. Otherwise, start with just one partial task; see new task + // calculation in next(). + Step result = { end, (length > end) ? 1u : 0u }; + return result; +} + +PartialArrayTaskStepper::Step +PartialArrayTaskStepper::start(arrayOop from, arrayOop to, int chunk_size) const { + return start_impl(from->length(), to->length_addr(), chunk_size); +} + +PartialArrayTaskStepper::Step +PartialArrayTaskStepper::next_impl(int length, + int* to_length_addr, + int chunk_size) const { + assert(chunk_size > 0, "precondition"); + + // The start of the next task is in the length field of the to-space object. + // Atomically increment by the chunk size to claim the associated chunk. + // Because we limit the number of enqueued tasks to being no more than the + // number of remaining chunks to process, we can use an atomic add for the + // claim, rather than a CAS loop. + int start = Atomic::fetch_and_add(to_length_addr, + chunk_size, + memory_order_relaxed); + + assert(start < length, "invariant: start %d, length %d", start, length); + assert(((length - start) % chunk_size) == 0, + "invariant: start %d, length %d, chunk size %d", + start, length, chunk_size); + + // Determine the number of new tasks to create. + // Zero-based index for this partial task. The initial task isn't counted. + uint task_num = (start / chunk_size); + // Number of tasks left to process, including this one. + uint remaining_tasks = (length - start) / chunk_size; + assert(remaining_tasks > 0, "invariant"); + // Compute number of pending tasks, including this one. The maximum number + // of tasks is a function of task_num (N) and _task_fanout (F). + // 1 : current task + // N : number of preceeding tasks + // F*N : maximum created for preceeding tasks + // => F*N - N + 1 : maximum number of tasks + // => (F-1)*N + 1 + assert(_task_limit > 0, "precondition"); + assert(_task_fanout > 0, "precondition"); + uint max_pending = (_task_fanout - 1) * task_num + 1; + + // The actual pending may be less than that. Bound by remaining_tasks to + // not overrun. Also bound by _task_limit to avoid spawning an excessive + // number of tasks for a large array. The +1 is to replace the current + // task with a new task when _task_limit limited. The pending value may + // not be what's actually in the queues, because of concurrent task + // processing. That's okay; we just need to determine the correct number + // of tasks to add for this task. + uint pending = MIN3(max_pending, remaining_tasks, _task_limit); + uint ncreate = MIN2(_task_fanout, MIN2(remaining_tasks, _task_limit + 1) - pending); + Step result = { start, ncreate }; + return result; +} + +PartialArrayTaskStepper::Step +PartialArrayTaskStepper::next(arrayOop from, arrayOop to, int chunk_size) const { + return next_impl(from->length(), to->length_addr(), chunk_size); +} + +#endif // SHARE_GC_SHARED_PARTIALARRAYTASKSTEPPER_INLINE_HPP diff --git a/src/hotspot/share/gc/shared/preservedMarks.inline.hpp b/src/hotspot/share/gc/shared/preservedMarks.inline.hpp index c7dfb51e366..82df737a7b8 100644 --- a/src/hotspot/share/gc/shared/preservedMarks.inline.hpp +++ b/src/hotspot/share/gc/shared/preservedMarks.inline.hpp @@ -47,7 +47,7 @@ inline void PreservedMarks::push_if_necessary(oop obj, markWord m) { } inline void PreservedMarks::init_forwarded_mark(oop obj) { - obj->init_mark_raw(); + obj->init_mark(); } inline PreservedMarks::PreservedMarks() @@ -59,7 +59,7 @@ inline PreservedMarks::PreservedMarks() 0 /* max_cache_size */) { } void PreservedMarks::OopAndMarkWord::set_mark() const { - _o->set_mark_raw(_m); + _o->set_mark(_m); } #endif // SHARE_GC_SHARED_PRESERVEDMARKS_INLINE_HPP diff --git a/src/hotspot/share/gc/shared/referenceProcessor.hpp b/src/hotspot/share/gc/shared/referenceProcessor.hpp index 83fc5bafee7..74eeafcd1ad 100644 --- a/src/hotspot/share/gc/shared/referenceProcessor.hpp +++ b/src/hotspot/share/gc/shared/referenceProcessor.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -39,7 +39,7 @@ class ReferenceProcessorPhaseTimes; // List of discovered references. class DiscoveredList { public: - DiscoveredList() : _oop_head(NULL), _compressed_head(0), _len(0) { } + DiscoveredList() : _oop_head(NULL), _compressed_head(narrowOop::null), _len(0) { } inline oop head() const; HeapWord* adr_head() { return UseCompressedOops ? (HeapWord*)&_compressed_head : diff --git a/src/hotspot/share/gc/shared/space.cpp b/src/hotspot/share/gc/shared/space.cpp index 6e215c8e6b7..c267f1c0c3e 100644 --- a/src/hotspot/share/gc/shared/space.cpp +++ b/src/hotspot/share/gc/shared/space.cpp @@ -379,7 +379,7 @@ HeapWord* CompactibleSpace::forward(oop q, size_t size, } else { // if the object isn't moving we can just set the mark to the default // mark and handle it specially later on. - q->init_mark_raw(); + q->init_mark(); assert(q->forwardee() == NULL, "should be forwarded to NULL"); } @@ -617,14 +617,14 @@ void ContiguousSpace::allocate_temporary_filler(int factor) { // allocate uninitialized int array typeArrayOop t = (typeArrayOop) allocate(size); assert(t != NULL, "allocation should succeed"); - t->set_mark_raw(markWord::prototype()); + t->set_mark(markWord::prototype()); t->set_klass(Universe::intArrayKlassObj()); t->set_length((int)length); } else { assert(size == CollectedHeap::min_fill_size(), "size for smallest fake object doesn't match"); instanceOop obj = (instanceOop) allocate(size); - obj->set_mark_raw(markWord::prototype()); + obj->set_mark(markWord::prototype()); obj->set_klass_gap(0); obj->set_klass(SystemDictionary::Object_klass()); } diff --git a/src/hotspot/share/gc/shared/space.inline.hpp b/src/hotspot/share/gc/shared/space.inline.hpp index 37ae2765e71..e7d9e025ec9 100644 --- a/src/hotspot/share/gc/shared/space.inline.hpp +++ b/src/hotspot/share/gc/shared/space.inline.hpp @@ -117,7 +117,7 @@ class DeadSpacer : StackObj { _allowed_deadspace_words -= dead_length; CollectedHeap::fill_with_object(dead_start, dead_length); oop obj = oop(dead_start); - obj->set_mark_raw(obj->mark_raw().set_marked()); + obj->set_mark(obj->mark().set_marked()); assert(dead_length == (size_t)obj->size(), "bad filler object size"); log_develop_trace(gc, compaction)("Inserting object to dead space: " PTR_FORMAT ", " PTR_FORMAT ", " SIZE_FORMAT "b", @@ -163,10 +163,6 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c HeapWord* scan_limit = space->scan_limit(); while (cur_obj < scan_limit) { - assert(!space->scanned_block_is_obj(cur_obj) || - oop(cur_obj)->mark_raw().is_marked() || oop(cur_obj)->mark_raw().is_unlocked() || - oop(cur_obj)->mark_raw().has_bias_pattern(), - "these are the only valid states during a mark sweep"); if (space->scanned_block_is_obj(cur_obj) && oop(cur_obj)->is_gc_marked()) { // prefetch beyond cur_obj Prefetch::write(cur_obj, interval); @@ -340,7 +336,7 @@ inline void CompactibleSpace::scan_and_compact(SpaceType* space) { // copy object and reinit its mark assert(cur_obj != compaction_top, "everything in this pass should be moving"); Copy::aligned_conjoint_words(cur_obj, compaction_top, size); - oop(compaction_top)->init_mark_raw(); + oop(compaction_top)->init_mark(); assert(oop(compaction_top)->klass() != NULL, "should have a class"); debug_only(prev_obj = cur_obj); diff --git a/src/hotspot/share/gc/shared/taskqueue.inline.hpp b/src/hotspot/share/gc/shared/taskqueue.inline.hpp index 3e377a7a7a9..46372956cf0 100644 --- a/src/hotspot/share/gc/shared/taskqueue.inline.hpp +++ b/src/hotspot/share/gc/shared/taskqueue.inline.hpp @@ -205,7 +205,7 @@ bool OverflowTaskQueue<E, F, N>::pop_overflow(E& t) template<class E, MEMFLAGS F, unsigned int N> bool GenericTaskQueue<E, F, N>::pop_global(E& t) { Age oldAge = age_relaxed(); -#ifndef CPU_MULTI_COPY_ATOMIC + // Architectures with non-multi-copy-atomic memory model require a // full fence here to guarantee that bottom is not older than age, // which is crucial for the correctness of the algorithm. @@ -219,12 +219,8 @@ bool GenericTaskQueue<E, F, N>::pop_global(E& t) { // The requirement is that Thread3 must never read an older bottom // value than Thread2 after Thread3 has seen the age value from // Thread2. - OrderAccess::fence(); -#else - // Everyone else can make do with a LoadLoad barrier to keep reads - // from age and bottom in order. - OrderAccess::loadload(); -#endif + OrderAccess::loadload_for_IRIW(); + uint localBot = bottom_acquire(); uint n_elems = clean_size(localBot, oldAge.top()); if (n_elems == 0) { diff --git a/src/hotspot/share/gc/shared/workerPolicy.cpp b/src/hotspot/share/gc/shared/workerPolicy.cpp index 76f80dc1396..8116265bd01 100644 --- a/src/hotspot/share/gc/shared/workerPolicy.cpp +++ b/src/hotspot/share/gc/shared/workerPolicy.cpp @@ -27,6 +27,7 @@ #include "gc/shared/workerPolicy.hpp" #include "logging/log.hpp" #include "memory/universe.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/os.inline.hpp" #include "runtime/vm_version.hpp" diff --git a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp index b64bf975ad6..4ce2366fe0c 100644 --- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp +++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahHeuristics.cpp @@ -23,7 +23,6 @@ */ #include "precompiled.hpp" - #include "gc/shared/gcCause.hpp" #include "gc/shenandoah/shenandoahCollectionSet.inline.hpp" #include "gc/shenandoah/shenandoahCollectorPolicy.hpp" @@ -33,6 +32,7 @@ #include "gc/shenandoah/heuristics/shenandoahHeuristics.hpp" #include "logging/log.hpp" #include "logging/logTag.hpp" +#include "runtime/globals_extension.hpp" int ShenandoahHeuristics::compare_by_garbage(RegionData a, RegionData b) { if (a._garbage > b._garbage) diff --git a/src/hotspot/share/gc/shenandoah/mode/shenandoahIUMode.cpp b/src/hotspot/share/gc/shenandoah/mode/shenandoahIUMode.cpp index 78564bd45e1..ca221567b2c 100644 --- a/src/hotspot/share/gc/shenandoah/mode/shenandoahIUMode.cpp +++ b/src/hotspot/share/gc/shenandoah/mode/shenandoahIUMode.cpp @@ -31,6 +31,7 @@ #include "gc/shenandoah/mode/shenandoahIUMode.hpp" #include "logging/log.hpp" #include "logging/logTag.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/java.hpp" void ShenandoahIUMode::initialize_flags() const { diff --git a/src/hotspot/share/gc/shenandoah/mode/shenandoahPassiveMode.cpp b/src/hotspot/share/gc/shenandoah/mode/shenandoahPassiveMode.cpp index 1d5005f70b4..bb7d0c4660b 100644 --- a/src/hotspot/share/gc/shenandoah/mode/shenandoahPassiveMode.cpp +++ b/src/hotspot/share/gc/shenandoah/mode/shenandoahPassiveMode.cpp @@ -27,6 +27,7 @@ #include "gc/shenandoah/mode/shenandoahPassiveMode.hpp" #include "logging/log.hpp" #include "logging/logTag.hpp" +#include "runtime/globals_extension.hpp" void ShenandoahPassiveMode::initialize_flags() const { // Do not allow concurrent cycles. diff --git a/src/hotspot/share/gc/shenandoah/mode/shenandoahSATBMode.cpp b/src/hotspot/share/gc/shenandoah/mode/shenandoahSATBMode.cpp index c6e7c8fc6a8..020df4b581a 100644 --- a/src/hotspot/share/gc/shenandoah/mode/shenandoahSATBMode.cpp +++ b/src/hotspot/share/gc/shenandoah/mode/shenandoahSATBMode.cpp @@ -31,6 +31,7 @@ #include "gc/shenandoah/mode/shenandoahSATBMode.hpp" #include "logging/log.hpp" #include "logging/logTag.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/java.hpp" void ShenandoahSATBMode::initialize_flags() const { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp index d146214f517..f0733a6fa45 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp @@ -29,6 +29,7 @@ #include "gc/shenandoah/shenandoahCollectorPolicy.hpp" #include "gc/shenandoah/shenandoahHeap.inline.hpp" #include "gc/shenandoah/shenandoahHeapRegion.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/java.hpp" #include "utilities/defaultStream.hpp" diff --git a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp index 336b34e3c3f..4b5f1ebe76a 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp @@ -204,7 +204,7 @@ oop ShenandoahBarrierSet::load_reference_barrier_native_impl(oop obj, T* load_ad } oop fwd = load_reference_barrier_not_null(obj); - if (load_addr != NULL && fwd != obj) { + if (ShenandoahSelfFixing && load_addr != NULL && fwd != obj) { // Since we are here and we know the load address, update the reference. ShenandoahHeap::cas_oop(fwd, load_addr, obj); } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp index dccf0e2ce4c..65ec2f8b550 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp @@ -112,50 +112,18 @@ void ShenandoahCodeRoots::initialize() { } void ShenandoahCodeRoots::register_nmethod(nmethod* nm) { - switch (ShenandoahCodeRootsStyle) { - case 0: - case 1: - break; - case 2: { - assert_locked_or_safepoint(CodeCache_lock); - _nmethod_table->register_nmethod(nm); - break; - } - default: - ShouldNotReachHere(); - } + assert_locked_or_safepoint(CodeCache_lock); + _nmethod_table->register_nmethod(nm); } void ShenandoahCodeRoots::unregister_nmethod(nmethod* nm) { - switch (ShenandoahCodeRootsStyle) { - case 0: - case 1: { - break; - } - case 2: { - assert_locked_or_safepoint(CodeCache_lock); - _nmethod_table->unregister_nmethod(nm); - break; - } - default: - ShouldNotReachHere(); - } + assert_locked_or_safepoint(CodeCache_lock); + _nmethod_table->unregister_nmethod(nm); } void ShenandoahCodeRoots::flush_nmethod(nmethod* nm) { - switch (ShenandoahCodeRootsStyle) { - case 0: - case 1: { - break; - } - case 2: { - assert_locked_or_safepoint(CodeCache_lock); - _nmethod_table->flush_nmethod(nm); - break; - } - default: - ShouldNotReachHere(); - } + assert_locked_or_safepoint(CodeCache_lock); + _nmethod_table->flush_nmethod(nm); } void ShenandoahCodeRoots::arm_nmethods() { @@ -389,64 +357,18 @@ ShenandoahCodeRootsIterator::ShenandoahCodeRootsIterator() : _table_snapshot(NULL) { assert(SafepointSynchronize::is_at_safepoint(), "Must be at safepoint"); assert(!Thread::current()->is_Worker_thread(), "Should not be acquired by workers"); - switch (ShenandoahCodeRootsStyle) { - case 0: - case 1: { - // No need to do anything here - break; - } - case 2: { - CodeCache_lock->lock_without_safepoint_check(); - _table_snapshot = ShenandoahCodeRoots::table()->snapshot_for_iteration(); - break; - } - default: - ShouldNotReachHere(); - } + CodeCache_lock->lock_without_safepoint_check(); + _table_snapshot = ShenandoahCodeRoots::table()->snapshot_for_iteration(); } ShenandoahCodeRootsIterator::~ShenandoahCodeRootsIterator() { - switch (ShenandoahCodeRootsStyle) { - case 0: - case 1: { - // No need to do anything here - break; - } - case 2: { - ShenandoahCodeRoots::table()->finish_iteration(_table_snapshot); - _table_snapshot = NULL; - CodeCache_lock->unlock(); - break; - } - default: - ShouldNotReachHere(); - } + ShenandoahCodeRoots::table()->finish_iteration(_table_snapshot); + _table_snapshot = NULL; + CodeCache_lock->unlock(); } void ShenandoahCodeRootsIterator::possibly_parallel_blobs_do(CodeBlobClosure *f) { - switch (ShenandoahCodeRootsStyle) { - case 0: { - if (_seq_claimed.try_set()) { - CodeCache::blobs_do(f); - } - break; - } - case 1: { - _par_iterator.parallel_blobs_do(f); - break; - } - case 2: { - ShenandoahCodeRootsIterator::fast_parallel_blobs_do(f); - break; - } - default: - ShouldNotReachHere(); - } -} - -void ShenandoahCodeRootsIterator::fast_parallel_blobs_do(CodeBlobClosure *f) { assert(SafepointSynchronize::is_at_safepoint(), "Must be at safepoint"); assert(_table_snapshot != NULL, "Sanity"); _table_snapshot->parallel_blobs_do(f); } - diff --git a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp index ebb4162c1d9..16c0485bf48 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp @@ -78,7 +78,6 @@ class ShenandoahCodeRootsIterator { ~ShenandoahCodeRootsIterator(); void possibly_parallel_blobs_do(CodeBlobClosure *f); - void fast_parallel_blobs_do(CodeBlobClosure *f); }; class ShenandoahCodeRoots : public AllStatic { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp index 891ccfe93d6..815fde581b4 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp @@ -107,20 +107,7 @@ class ShenandoahInitMarkRootsTask : public AbstractGangTask { private: void do_work(ShenandoahHeap* heap, OopClosure* oops, uint worker_id) { - // The rationale for selecting the roots to scan is as follows: - // a. With unload_classes = true, we only want to scan the actual strong roots from the - // code cache. This will allow us to identify the dead classes, unload them, *and* - // invalidate the relevant code cache blobs. This could be only done together with - // class unloading. - // b. With unload_classes = false, we have to nominally retain all the references from code - // cache, because there could be the case of embedded class/oop in the generated code, - // which we will never visit during mark. Without code cache invalidation, as in (a), - // we risk executing that code cache blob, and crashing. - if (heap->unload_classes()) { - _rp->strong_roots_do(worker_id, oops); - } else { - _rp->roots_do(worker_id, oops); - } + _rp->roots_do(worker_id, oops); } }; @@ -256,7 +243,6 @@ class ShenandoahFinalMarkingTask : public AbstractGangTask { ShenandoahConcurrentMark* _cm; TaskTerminator* _terminator; bool _dedup_string; - ShenandoahSharedFlag _claimed_syncroots; public: ShenandoahFinalMarkingTask(ShenandoahConcurrentMark* cm, TaskTerminator* terminator, bool dedup_string) : @@ -294,9 +280,6 @@ class ShenandoahFinalMarkingTask : public AbstractGangTask { ShenandoahStoreValEnqueueBarrier ? &resolve_mark_cl : NULL, do_nmethods ? &blobsCl : NULL); Threads::threads_do(&tc); - if (ShenandoahStoreValEnqueueBarrier && _claimed_syncroots.try_set()) { - ObjectSynchronizer::oops_do(&resolve_mark_cl); - } } else { ShenandoahMarkRefsClosure mark_cl(q, rp); MarkingCodeBlobClosure blobsCl(&mark_cl, !CodeBlobToOopClosure::FixRelocations); @@ -304,9 +287,6 @@ class ShenandoahFinalMarkingTask : public AbstractGangTask { ShenandoahStoreValEnqueueBarrier ? &mark_cl : NULL, do_nmethods ? &blobsCl : NULL); Threads::threads_do(&tc); - if (ShenandoahStoreValEnqueueBarrier && _claimed_syncroots.try_set()) { - ObjectSynchronizer::oops_do(&mark_cl); - } } } diff --git a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentRoots.cpp b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentRoots.cpp index d9424d50611..c3878b8c736 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentRoots.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentRoots.cpp @@ -37,12 +37,7 @@ bool ShenandoahConcurrentRoots::should_do_concurrent_roots() { } bool ShenandoahConcurrentRoots::can_do_concurrent_class_unloading() { -#if (defined(X86) || defined(AARCH64)) - return ShenandoahCodeRootsStyle == 2 && - ClassUnloading; -#else - return false; -#endif + return ClassUnloading; } bool ShenandoahConcurrentRoots::should_do_concurrent_class_unloading() { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahForwarding.inline.hpp b/src/hotspot/share/gc/shenandoah/shenandoahForwarding.inline.hpp index 85daeeb8df1..e271dfb1f2f 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahForwarding.inline.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahForwarding.inline.hpp @@ -40,7 +40,7 @@ inline HeapWord* ShenandoahForwarding::get_forwardee_raw_unchecked(oop obj) { // On this path, we can encounter the "marked" object, but with NULL // fwdptr. That object is still not forwarded, and we need to return // the object itself. - markWord mark = obj->mark_raw(); + markWord mark = obj->mark(); if (mark.is_marked()) { HeapWord* fwdptr = (HeapWord*) mark.clear_lock_bits().to_pointer(); if (fwdptr != NULL) { @@ -55,7 +55,7 @@ inline oop ShenandoahForwarding::get_forwardee_mutator(oop obj) { shenandoah_assert_correct(NULL, obj); assert(Thread::current()->is_Java_thread(), "Must be a mutator thread"); - markWord mark = obj->mark_raw(); + markWord mark = obj->mark(); if (mark.is_marked()) { HeapWord* fwdptr = (HeapWord*) mark.clear_lock_bits().to_pointer(); assert(fwdptr != NULL, "Forwarding pointer is never null here"); @@ -71,17 +71,17 @@ inline oop ShenandoahForwarding::get_forwardee(oop obj) { } inline bool ShenandoahForwarding::is_forwarded(oop obj) { - return obj->mark_raw().is_marked(); + return obj->mark().is_marked(); } inline oop ShenandoahForwarding::try_update_forwardee(oop obj, oop update) { - markWord old_mark = obj->mark_raw(); + markWord old_mark = obj->mark(); if (old_mark.is_marked()) { return oop(old_mark.clear_lock_bits().to_pointer()); } markWord new_mark = markWord::encode_pointer_as_mark(update); - markWord prev_mark = obj->cas_set_mark_raw(new_mark, old_mark); + markWord prev_mark = obj->cas_set_mark(new_mark, old_mark, memory_order_conservative); if (prev_mark == old_mark) { return update; } else { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp index 7df181fa2ca..eff5c50ea53 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp @@ -1250,7 +1250,7 @@ size_t ShenandoahHeap::tlab_capacity(Thread *thr) const { class ObjectIterateScanRootClosure : public BasicOopIterateClosure { private: MarkBitMap* _bitmap; - Stack<oop,mtGC>* _oop_stack; + ShenandoahScanObjectStack* _oop_stack; ShenandoahHeap* const _heap; ShenandoahMarkingContext* const _marking_context; @@ -1273,7 +1273,7 @@ class ObjectIterateScanRootClosure : public BasicOopIterateClosure { } } public: - ObjectIterateScanRootClosure(MarkBitMap* bitmap, Stack<oop,mtGC>* oop_stack) : + ObjectIterateScanRootClosure(MarkBitMap* bitmap, ShenandoahScanObjectStack* oop_stack) : _bitmap(bitmap), _oop_stack(oop_stack), _heap(ShenandoahHeap::heap()), _marking_context(_heap->marking_context()) {} void do_oop(oop* p) { do_oop_work(p); } @@ -1306,29 +1306,16 @@ void ShenandoahHeap::ensure_parsability(bool retire_tlabs) { * is allowed to report dead objects, but is not required to do so. */ void ShenandoahHeap::object_iterate(ObjectClosure* cl) { - assert(SafepointSynchronize::is_at_safepoint(), "safe iteration is only available during safepoints"); - if (!_aux_bitmap_region_special && !os::commit_memory((char*)_aux_bitmap_region.start(), _aux_bitmap_region.byte_size(), false)) { - log_warning(gc)("Could not commit native memory for auxiliary marking bitmap for heap iteration"); - return; - } - // Reset bitmap - _aux_bit_map.clear(); - - Stack<oop,mtGC> oop_stack; + if (!prepare_aux_bitmap_for_iteration()) + return; + ShenandoahScanObjectStack oop_stack; ObjectIterateScanRootClosure oops(&_aux_bit_map, &oop_stack); + // Seed the stack with root scan + scan_roots_for_iteration(&oop_stack, &oops); - { - // First, we process GC roots according to current GC cycle. - // This populates the work stack with initial objects. - // It is important to relinquish the associated locks before diving - // into heap dumper. - ShenandoahHeapIterationRootScanner rp; - rp.roots_do(&oops); - } - - // Work through the oop stack to traverse heap. + // Work through the oop stack to traverse heap while (! oop_stack.is_empty()) { oop obj = oop_stack.pop(); assert(oopDesc::is_oop(obj), "must be a valid oop"); @@ -1337,12 +1324,179 @@ void ShenandoahHeap::object_iterate(ObjectClosure* cl) { } assert(oop_stack.is_empty(), "should be empty"); + // Reclaim bitmap + reclaim_aux_bitmap_for_iteration(); +} + +bool ShenandoahHeap::prepare_aux_bitmap_for_iteration() { + assert(SafepointSynchronize::is_at_safepoint(), "safe iteration is only available during safepoints"); + + if (!_aux_bitmap_region_special && !os::commit_memory((char*)_aux_bitmap_region.start(), _aux_bitmap_region.byte_size(), false)) { + log_warning(gc)("Could not commit native memory for auxiliary marking bitmap for heap iteration"); + return false; + } + // Reset bitmap + _aux_bit_map.clear(); + return true; +} +void ShenandoahHeap::scan_roots_for_iteration(ShenandoahScanObjectStack* oop_stack, ObjectIterateScanRootClosure* oops) { + // Process GC roots according to current GC cycle + // This populates the work stack with initial objects + // It is important to relinquish the associated locks before diving + // into heap dumper + ShenandoahHeapIterationRootScanner rp; + rp.roots_do(oops); +} + +void ShenandoahHeap::reclaim_aux_bitmap_for_iteration() { if (!_aux_bitmap_region_special && !os::uncommit_memory((char*)_aux_bitmap_region.start(), _aux_bitmap_region.byte_size())) { log_warning(gc)("Could not uncommit native memory for auxiliary marking bitmap for heap iteration"); } } +// Closure for parallelly iterate objects +class ShenandoahObjectIterateParScanClosure : public BasicOopIterateClosure { +private: + MarkBitMap* _bitmap; + ShenandoahObjToScanQueue* _queue; + ShenandoahHeap* const _heap; + ShenandoahMarkingContext* const _marking_context; + + template <class T> + void do_oop_work(T* p) { + T o = RawAccess<>::oop_load(p); + if (!CompressedOops::is_null(o)) { + oop obj = CompressedOops::decode_not_null(o); + if (_heap->is_concurrent_weak_root_in_progress() && !_marking_context->is_marked(obj)) { + // There may be dead oops in weak roots in concurrent root phase, do not touch them. + return; + } + obj = ShenandoahBarrierSet::resolve_forwarded_not_null(obj); + + assert(oopDesc::is_oop(obj), "Must be a valid oop"); + if (_bitmap->par_mark(obj)) { + _queue->push(ShenandoahMarkTask(obj)); + } + } + } +public: + ShenandoahObjectIterateParScanClosure(MarkBitMap* bitmap, ShenandoahObjToScanQueue* q) : + _bitmap(bitmap), _queue(q), _heap(ShenandoahHeap::heap()), + _marking_context(_heap->marking_context()) {} + void do_oop(oop* p) { do_oop_work(p); } + void do_oop(narrowOop* p) { do_oop_work(p); } +}; + +// Object iterator for parallel heap iteraion. +// The root scanning phase happenes in construction as a preparation of +// parallel marking queues. +// Every worker processes it's own marking queue. work-stealing is used +// to balance workload. +class ShenandoahParallelObjectIterator : public ParallelObjectIterator { +private: + uint _num_workers; + bool _init_ready; + MarkBitMap* _aux_bit_map; + ShenandoahHeap* _heap; + ShenandoahScanObjectStack _roots_stack; // global roots stack + ShenandoahObjToScanQueueSet* _task_queues; +public: + ShenandoahParallelObjectIterator(uint num_workers, MarkBitMap* bitmap) : + _num_workers(num_workers), + _init_ready(false), + _aux_bit_map(bitmap), + _heap(ShenandoahHeap::heap()) { + // Initialize bitmap + _init_ready = _heap->prepare_aux_bitmap_for_iteration(); + if (!_init_ready) { + return; + } + + ObjectIterateScanRootClosure oops(_aux_bit_map, &_roots_stack); + _heap->scan_roots_for_iteration(&_roots_stack, &oops); + + _init_ready = prepare_worker_queues(); + } + + ~ShenandoahParallelObjectIterator() { + // Reclaim bitmap + _heap->reclaim_aux_bitmap_for_iteration(); + // Reclaim queue for workers + if (_task_queues!= NULL) { + for (uint i = 0; i < _num_workers; ++i) { + ShenandoahObjToScanQueue* q = _task_queues->queue(i); + if (q != NULL) { + delete q; + _task_queues->register_queue(i, NULL); + } + } + delete _task_queues; + _task_queues = NULL; + } + } + + virtual void object_iterate(ObjectClosure* cl, uint worker_id) { + if (_init_ready) { + object_iterate_parallel(cl, worker_id, _task_queues); + } + } + +private: + // Divide global root_stack into worker queues + bool prepare_worker_queues() { + _task_queues = new ShenandoahObjToScanQueueSet((int) _num_workers); + // Initialize queues for every workers + for (uint i = 0; i < _num_workers; ++i) { + ShenandoahObjToScanQueue* task_queue = new ShenandoahObjToScanQueue(); + task_queue->initialize(); + _task_queues->register_queue(i, task_queue); + } + // Divide roots among the workers. Assume that object referencing distribution + // is related with root kind, use round-robin to make every worker have same chance + // to process every kind of roots + size_t roots_num = _roots_stack.size(); + if (roots_num == 0) { + // No work to do + return false; + } + + for (uint j = 0; j < roots_num; j++) { + uint stack_id = j % _num_workers; + oop obj = _roots_stack.pop(); + _task_queues->queue(stack_id)->push(ShenandoahMarkTask(obj)); + } + return true; + } + + void object_iterate_parallel(ObjectClosure* cl, + uint worker_id, + ShenandoahObjToScanQueueSet* queue_set) { + assert(SafepointSynchronize::is_at_safepoint(), "safe iteration is only available during safepoints"); + assert(queue_set != NULL, "task queue must not be NULL"); + + ShenandoahObjToScanQueue* q = queue_set->queue(worker_id); + assert(q != NULL, "object iterate queue must not be NULL"); + + ShenandoahMarkTask t; + ShenandoahObjectIterateParScanClosure oops(_aux_bit_map, q); + + // Work through the queue to traverse heap. + // Steal when there is no task in queue. + while (q->pop(t) || queue_set->steal(worker_id, t)) { + oop obj = t.obj(); + assert(oopDesc::is_oop(obj), "must be a valid oop"); + cl->do_object(obj); + obj->oop_iterate(&oops); + } + assert(q->is_empty(), "should be empty"); + } +}; + +ParallelObjectIterator* ShenandoahHeap::parallel_object_iterator(uint workers) { + return new ShenandoahParallelObjectIterator(workers, &_aux_bit_map); +} + // Keep alive an object that was loaded with AS_NO_KEEPALIVE. void ShenandoahHeap::keep_alive(oop obj) { if (is_concurrent_mark_in_progress() && (obj != NULL)) { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp b/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp index 1fdd1c1330b..c20aa63fb2b 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp @@ -37,8 +37,10 @@ #include "gc/shenandoah/shenandoahUnload.hpp" #include "services/memoryManager.hpp" #include "utilities/globalDefinitions.hpp" +#include "utilities/stack.hpp" class ConcurrentGCTimer; +class ObjectIterateScanRootClosure; class ReferenceProcessor; class ShenandoahCollectorPolicy; class ShenandoahControlThread; @@ -57,6 +59,7 @@ class ShenandoahFreeSet; class ShenandoahConcurrentMark; class ShenandoahMarkCompact; class ShenandoahMonitoringSupport; +class ShenandoahObjToScanQueueSet; class ShenandoahPacer; class ShenandoahVerifier; class ShenandoahWorkGang; @@ -107,6 +110,7 @@ class ShenandoahHeapRegionClosure : public StackObj { typedef ShenandoahLock ShenandoahHeapLock; typedef ShenandoahLocker ShenandoahHeapLocker; +typedef Stack<oop, mtGC> ShenandoahScanObjectStack; // Shenandoah GC is low-pause concurrent GC that uses Brooks forwarding pointers // to encode forwarding data. See BrooksPointer for details on forwarding data encoding. @@ -117,7 +121,7 @@ class ShenandoahHeap : public CollectedHeap { friend class VMStructs; friend class ShenandoahGCSession; friend class ShenandoahGCStateResetter; - + friend class ShenandoahParallelObjectIterator; // ---------- Locks that guard important data structures in Heap // private: @@ -524,6 +528,10 @@ class ShenandoahHeap : public CollectedHeap { // Prepare and finish concurrent unloading void prepare_concurrent_unloading(); void finish_concurrent_unloading(); + // Heap iteration support + void scan_roots_for_iteration(ShenandoahScanObjectStack* oop_stack, ObjectIterateScanRootClosure* oops); + bool prepare_aux_bitmap_for_iteration(); + void reclaim_aux_bitmap_for_iteration(); // ---------- Generic interface hooks // Minor things that super-interface expects us to implement to play nice with @@ -549,6 +557,8 @@ class ShenandoahHeap : public CollectedHeap { // Used for native heap walkers: heap dumpers, mostly void object_iterate(ObjectClosure* cl); + // Parallel heap iteration support + virtual ParallelObjectIterator* parallel_object_iterator(uint workers); // Keep alive an object that was loaded with AS_NO_KEEPALIVE. void keep_alive(oop obj); @@ -596,9 +606,6 @@ class ShenandoahHeap : public CollectedHeap { void notify_mutator_alloc_words(size_t words, bool waste); - // Shenandoah supports TLAB allocation - bool supports_tlab_allocation() const { return true; } - HeapWord* allocate_new_tlab(size_t min_size, size_t requested_size, size_t* actual_size); size_t tlab_capacity(Thread *thr) const; size_t unsafe_max_tlab_alloc(Thread *thread) const; diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp b/src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp index e207a27daf9..3bb97e01f59 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp @@ -149,14 +149,14 @@ inline oop ShenandoahHeap::cas_oop(oop n, oop* addr, oop c) { inline oop ShenandoahHeap::cas_oop(oop n, narrowOop* addr, narrowOop c) { assert(is_aligned(addr, sizeof(narrowOop)), "Address should be aligned: " PTR_FORMAT, p2i(addr)); narrowOop val = CompressedOops::encode(n); - return CompressedOops::decode((narrowOop) Atomic::cmpxchg(addr, c, val)); + return CompressedOops::decode(Atomic::cmpxchg(addr, c, val)); } inline oop ShenandoahHeap::cas_oop(oop n, narrowOop* addr, oop c) { assert(is_aligned(addr, sizeof(narrowOop)), "Address should be aligned: " PTR_FORMAT, p2i(addr)); narrowOop cmp = CompressedOops::encode(c); narrowOop val = CompressedOops::encode(n); - return CompressedOops::decode((narrowOop) Atomic::cmpxchg(addr, cmp, val)); + return CompressedOops::decode(Atomic::cmpxchg(addr, cmp, val)); } template <class T> diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp index d50353eb455..2dd5f161d1d 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp @@ -35,6 +35,7 @@ #include "memory/universe.hpp" #include "oops/oop.inline.hpp" #include "runtime/atomic.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/java.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/os.hpp" diff --git a/src/hotspot/share/gc/shenandoah/shenandoahMarkCompact.cpp b/src/hotspot/share/gc/shenandoah/shenandoahMarkCompact.cpp index 3b5bfb66931..9993a9c612b 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahMarkCompact.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahMarkCompact.cpp @@ -323,7 +323,7 @@ class ShenandoahPrepareForCompactionObjectClosure : public ObjectClosure { // Object fits into current region, record new location: assert(_compact_point + obj_size <= _to_region->end(), "must fit"); shenandoah_assert_not_forwarded(NULL, p); - _preserved_marks->push_if_necessary(p, p->mark_raw()); + _preserved_marks->push_if_necessary(p, p->mark()); p->forward_to(oop(_compact_point)); _compact_point += obj_size; } @@ -431,7 +431,7 @@ void ShenandoahMarkCompact::calculate_target_humongous_objects() { if (start >= to_begin && start != r->index()) { // Fits into current window, and the move is non-trivial. Record the move then, and continue scan. - _preserved_marks->get(0)->push_if_necessary(old_obj, old_obj->mark_raw()); + _preserved_marks->get(0)->push_if_necessary(old_obj, old_obj->mark()); old_obj->forward_to(oop(heap->get_region(start)->bottom())); to_end = start; continue; @@ -806,7 +806,7 @@ class ShenandoahCompactObjectsClosure : public ObjectClosure { HeapWord* compact_to = cast_from_oop<HeapWord*>(p->forwardee()); Copy::aligned_conjoint_words(compact_from, compact_to, size); oop new_obj = oop(compact_to); - new_obj->init_mark_raw(); + new_obj->init_mark(); } } }; @@ -922,7 +922,7 @@ void ShenandoahMarkCompact::compact_humongous_objects() { ShenandoahHeapRegion::region_size_words()*num_regions); oop new_obj = oop(heap->get_region(new_start)->bottom()); - new_obj->init_mark_raw(); + new_obj->init_mark(); { for (size_t c = old_start; c <= old_end; c++) { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp b/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp index 3ecd77d523e..c4f150af690 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp @@ -39,7 +39,6 @@ class outputStream; f(CNT_PREFIX ## CodeCacheRoots, DESC_PREFIX "Code Cache Roots") \ f(CNT_PREFIX ## VMStrongRoots, DESC_PREFIX "VM Strong Roots") \ f(CNT_PREFIX ## VMWeakRoots, DESC_PREFIX "VM Weak Roots") \ - f(CNT_PREFIX ## ObjectSynchronizerRoots, DESC_PREFIX "Synchronizer Roots") \ f(CNT_PREFIX ## CLDGRoots, DESC_PREFIX "CLDG Roots") \ f(CNT_PREFIX ## JVMTIWeakRoots, DESC_PREFIX "JVMTI Weak Roots") \ f(CNT_PREFIX ## StringDedupTableRoots, DESC_PREFIX "Dedup Table Roots") \ diff --git a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp index 39470c1af2f..dd49bfea8bc 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp @@ -36,26 +36,6 @@ #include "memory/resourceArea.hpp" #include "runtime/thread.hpp" -ShenandoahSerialRoot::ShenandoahSerialRoot(ShenandoahSerialRoot::OopsDo oops_do, - ShenandoahPhaseTimings::Phase phase, ShenandoahPhaseTimings::ParPhase par_phase) : - _oops_do(oops_do), _phase(phase), _par_phase(par_phase) { -} - -void ShenandoahSerialRoot::oops_do(OopClosure* cl, uint worker_id) { - if (_claimed.try_set()) { - ShenandoahWorkerTimingsTracker timer(_phase, _par_phase, worker_id); - _oops_do(cl); - } -} - -ShenandoahSerialRoots::ShenandoahSerialRoots(ShenandoahPhaseTimings::Phase phase) : - _object_synchronizer_root(&ObjectSynchronizer::oops_do, phase, ShenandoahPhaseTimings::ObjectSynchronizerRoots) { -} - -void ShenandoahSerialRoots::oops_do(OopClosure* cl, uint worker_id) { - _object_synchronizer_root.oops_do(cl, worker_id); -} - ShenandoahWeakSerialRoot::ShenandoahWeakSerialRoot(ShenandoahWeakSerialRoot::WeakOopsDo weak_oops_do, ShenandoahPhaseTimings::Phase phase, ShenandoahPhaseTimings::ParPhase par_phase) : _weak_oops_do(weak_oops_do), _phase(phase), _par_phase(par_phase) { @@ -179,7 +159,6 @@ ShenandoahRootProcessor::ShenandoahRootProcessor(ShenandoahPhaseTimings::Phase p ShenandoahRootScanner::ShenandoahRootScanner(uint n_workers, ShenandoahPhaseTimings::Phase phase) : ShenandoahRootProcessor(phase), - _serial_roots(phase), _thread_roots(phase, n_workers > 1) { nmethod::oops_do_marking_prologue(); } @@ -189,44 +168,15 @@ ShenandoahRootScanner::~ShenandoahRootScanner() { } void ShenandoahRootScanner::roots_do(uint worker_id, OopClosure* oops) { - CLDToOopClosure clds_cl(oops, ClassLoaderData::_claim_strong); - MarkingCodeBlobClosure blobs_cl(oops, !CodeBlobToOopClosure::FixRelocations); - roots_do(worker_id, oops, &clds_cl, &blobs_cl); -} - -void ShenandoahRootScanner::strong_roots_do(uint worker_id, OopClosure* oops) { - CLDToOopClosure clds_cl(oops, ClassLoaderData::_claim_strong); MarkingCodeBlobClosure blobs_cl(oops, !CodeBlobToOopClosure::FixRelocations); - strong_roots_do(worker_id, oops, &clds_cl, &blobs_cl); + roots_do(worker_id, oops, &blobs_cl); } -void ShenandoahRootScanner::roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds, CodeBlobClosure* code, ThreadClosure *tc) { - assert(!ShenandoahSafepoint::is_at_shenandoah_safepoint() || - !ShenandoahHeap::heap()->unload_classes(), - "Expect class unloading when Shenandoah cycle is running"); - assert(clds != NULL, "Only possible with CLD closure"); +void ShenandoahRootScanner::roots_do(uint worker_id, OopClosure* oops, CodeBlobClosure* code, ThreadClosure *tc) { + assert(ShenandoahSafepoint::is_at_shenandoah_safepoint(), "Must be at a safepoint"); ShenandoahParallelOopsDoThreadClosure tc_cl(oops, code, tc); - ResourceMark rm; - - // Process serial-claiming roots first - _serial_roots.oops_do(oops, worker_id); - - // Process heavy-weight/fully parallel roots the last - _thread_roots.threads_do(&tc_cl, worker_id); -} - -void ShenandoahRootScanner::strong_roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds, CodeBlobClosure* code, ThreadClosure* tc) { - assert(ShenandoahHeap::heap()->unload_classes(), "Should be used during class unloading"); - ShenandoahParallelOopsDoThreadClosure tc_cl(oops, code, tc); - - ResourceMark rm; - - // Process serial-claiming roots first - _serial_roots.oops_do(oops, worker_id); - - // Process heavy-weight/fully parallel roots the last _thread_roots.threads_do(&tc_cl, worker_id); } @@ -235,7 +185,6 @@ ShenandoahRootEvacuator::ShenandoahRootEvacuator(uint n_workers, bool stw_roots_processing, bool stw_class_unloading) : ShenandoahRootProcessor(phase), - _serial_roots(phase), _vm_roots(phase), _cld_roots(phase, n_workers), _thread_roots(phase, n_workers > 1), @@ -256,7 +205,6 @@ void ShenandoahRootEvacuator::roots_do(uint worker_id, OopClosure* oops) { AlwaysTrueClosure always_true; // Process serial-claiming roots first - _serial_roots.oops_do(oops, worker_id); _serial_weak_roots.weak_oops_do(oops, worker_id); // Process light-weight/limited parallel roots then @@ -281,7 +229,6 @@ void ShenandoahRootEvacuator::roots_do(uint worker_id, OopClosure* oops) { ShenandoahRootUpdater::ShenandoahRootUpdater(uint n_workers, ShenandoahPhaseTimings::Phase phase) : ShenandoahRootProcessor(phase), - _serial_roots(phase), _vm_roots(phase), _cld_roots(phase, n_workers), _thread_roots(phase, n_workers > 1), @@ -293,7 +240,6 @@ ShenandoahRootUpdater::ShenandoahRootUpdater(uint n_workers, ShenandoahPhaseTimi ShenandoahRootAdjuster::ShenandoahRootAdjuster(uint n_workers, ShenandoahPhaseTimings::Phase phase) : ShenandoahRootProcessor(phase), - _serial_roots(phase), _vm_roots(phase), _cld_roots(phase, n_workers), _thread_roots(phase, n_workers > 1), @@ -314,7 +260,6 @@ void ShenandoahRootAdjuster::roots_do(uint worker_id, OopClosure* oops) { AlwaysTrueClosure always_true; // Process serial-claiming roots first - _serial_roots.oops_do(oops, worker_id); _serial_weak_roots.weak_oops_do(oops, worker_id); // Process light-weight/limited parallel roots then @@ -330,7 +275,6 @@ void ShenandoahRootAdjuster::roots_do(uint worker_id, OopClosure* oops) { ShenandoahHeapIterationRootScanner::ShenandoahHeapIterationRootScanner() : ShenandoahRootProcessor(ShenandoahPhaseTimings::heap_iteration_roots), - _serial_roots(ShenandoahPhaseTimings::heap_iteration_roots), _thread_roots(ShenandoahPhaseTimings::heap_iteration_roots, false /*is par*/), _vm_roots(ShenandoahPhaseTimings::heap_iteration_roots), _cld_roots(ShenandoahPhaseTimings::heap_iteration_roots, 1), @@ -351,7 +295,6 @@ ShenandoahHeapIterationRootScanner::ShenandoahHeapIterationRootScanner() : ResourceMark rm; // Process serial-claiming roots first - _serial_roots.oops_do(oops, 0); _serial_weak_roots.weak_oops_do(oops, 0); // Process light-weight/limited parallel roots then diff --git a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp index 895e3444efd..f901c6ac360 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp @@ -34,29 +34,6 @@ #include "gc/shenandoah/shenandoahUtils.hpp" #include "memory/iterator.hpp" -class ShenandoahSerialRoot { -public: - typedef void (*OopsDo)(OopClosure*); -private: - ShenandoahSharedFlag _claimed; - const OopsDo _oops_do; - const ShenandoahPhaseTimings::Phase _phase; - const ShenandoahPhaseTimings::ParPhase _par_phase; - -public: - ShenandoahSerialRoot(OopsDo oops_do, - ShenandoahPhaseTimings::Phase phase, ShenandoahPhaseTimings::ParPhase par_phase); - void oops_do(OopClosure* cl, uint worker_id); -}; - -class ShenandoahSerialRoots { -private: - ShenandoahSerialRoot _object_synchronizer_root; -public: - ShenandoahSerialRoots(ShenandoahPhaseTimings::Phase phase); - void oops_do(OopClosure* cl, uint worker_id); -}; - class ShenandoahWeakSerialRoot { typedef void (*WeakOopsDo)(BoolObjectClosure*, OopClosure*); private: @@ -199,22 +176,16 @@ class ShenandoahRootProcessor : public StackObj { class ShenandoahRootScanner : public ShenandoahRootProcessor { private: - ShenandoahSerialRoots _serial_roots; ShenandoahThreadRoots _thread_roots; public: ShenandoahRootScanner(uint n_workers, ShenandoahPhaseTimings::Phase phase); ~ShenandoahRootScanner(); - // Apply oops, clds and blobs to all strongly reachable roots in the system, - // during class unloading cycle - void strong_roots_do(uint worker_id, OopClosure* cl); - void strong_roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds, CodeBlobClosure* code, ThreadClosure* tc = NULL); - - // Apply oops, clds and blobs to all strongly reachable roots and weakly reachable - // roots when class unloading is disabled during this cycle void roots_do(uint worker_id, OopClosure* cl); - void roots_do(uint worker_id, OopClosure* oops, CLDClosure* clds, CodeBlobClosure* code, ThreadClosure* tc = NULL); + +private: + void roots_do(uint worker_id, OopClosure* oops, CodeBlobClosure* code, ThreadClosure* tc = NULL); }; template <bool CONCURRENT> @@ -238,7 +209,6 @@ class ShenandoahConcurrentRootScanner { // root scanning class ShenandoahHeapIterationRootScanner : public ShenandoahRootProcessor { private: - ShenandoahSerialRoots _serial_roots; ShenandoahThreadRoots _thread_roots; ShenandoahVMRoots<false /*concurrent*/> _vm_roots; ShenandoahClassLoaderDataRoots<false /*concurrent*/, true /*single threaded*/> @@ -257,7 +227,6 @@ class ShenandoahHeapIterationRootScanner : public ShenandoahRootProcessor { // Evacuate all roots at a safepoint class ShenandoahRootEvacuator : public ShenandoahRootProcessor { private: - ShenandoahSerialRoots _serial_roots; ShenandoahVMRoots<false /*concurrent*/> _vm_roots; ShenandoahClassLoaderDataRoots<false /*concurrent*/, false /*single threaded*/> _cld_roots; @@ -278,7 +247,6 @@ class ShenandoahRootEvacuator : public ShenandoahRootProcessor { // Update all roots at a safepoint class ShenandoahRootUpdater : public ShenandoahRootProcessor { private: - ShenandoahSerialRoots _serial_roots; ShenandoahVMRoots<false /*concurrent*/> _vm_roots; ShenandoahClassLoaderDataRoots<false /*concurrent*/, false /*single threaded*/> _cld_roots; @@ -298,7 +266,6 @@ class ShenandoahRootUpdater : public ShenandoahRootProcessor { // Adjuster all roots at a safepoint during full gc class ShenandoahRootAdjuster : public ShenandoahRootProcessor { private: - ShenandoahSerialRoots _serial_roots; ShenandoahVMRoots<false /*concurrent*/> _vm_roots; ShenandoahClassLoaderDataRoots<false /*concurrent*/, false /*single threaded*/> _cld_roots; diff --git a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp index 883e8229961..87e2cd1bdac 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.inline.hpp @@ -195,7 +195,6 @@ void ShenandoahRootUpdater::roots_do(uint worker_id, IsAlive* is_alive, KeepAliv CLDToOopClosure clds(keep_alive, ClassLoaderData::_claim_strong); // Process serial-claiming roots first - _serial_roots.oops_do(keep_alive, worker_id); _serial_weak_roots.weak_oops_do(is_alive, keep_alive, worker_id); // Process light-weight/limited parallel roots then diff --git a/src/hotspot/share/gc/shenandoah/shenandoahRootVerifier.cpp b/src/hotspot/share/gc/shenandoah/shenandoahRootVerifier.cpp index c1d0394e617..dcc8e115fd1 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahRootVerifier.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahRootVerifier.cpp @@ -74,7 +74,6 @@ void ShenandoahRootVerifier::oops_do(OopClosure* oops) { if (verify(SerialRoots)) { shenandoah_assert_safepoint(); - ObjectSynchronizer::oops_do(oops); } if (verify(JNIHandleRoots)) { @@ -118,7 +117,6 @@ void ShenandoahRootVerifier::roots_do(OopClosure* oops) { ClassLoaderDataGraph::cld_do(&clds); JNIHandles::oops_do(oops); - ObjectSynchronizer::oops_do(oops); Universe::vm_global()->oops_do(oops); AlwaysTrueClosure always_true; @@ -143,7 +141,6 @@ void ShenandoahRootVerifier::strong_roots_do(OopClosure* oops) { ClassLoaderDataGraph::roots_cld_do(&clds, NULL); JNIHandles::oops_do(oops); - ObjectSynchronizer::oops_do(oops); Universe::vm_global()->oops_do(oops); // Do thread roots the last. This allows verification code to find diff --git a/src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp b/src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp index 8324c5caef8..2f4fde13641 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp @@ -141,10 +141,17 @@ class ShenandoahGCPauseMark : public StackObj { class ShenandoahSafepoint : public AllStatic { public: - // check if Shenandoah GC safepoint is in progress + // Check if Shenandoah GC safepoint is in progress. This is nominally + // equivalent to calling SafepointSynchronize::is_at_safepoint(), but + // it also checks the Shenandoah specifics, when it can. static inline bool is_at_shenandoah_safepoint() { if (!SafepointSynchronize::is_at_safepoint()) return false; + // This is not VM thread, cannot see what VM thread is doing, + // so pretend this is a proper Shenandoah safepoint + if (!Thread::current()->is_VM_thread()) return true; + + // Otherwise check we are at proper operation type VM_Operation* vm_op = VMThread::vm_operation(); if (vm_op == NULL) return false; diff --git a/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp b/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp index 98aa933e01c..5417cb5a9fc 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp @@ -336,12 +336,6 @@ product(bool, ShenandoahLoadRefBarrier, true, DIAGNOSTIC, \ "Turn on/off load-reference barriers in Shenandoah") \ \ - product(uintx, ShenandoahCodeRootsStyle, 2, DIAGNOSTIC, \ - "Use this style to scan the code cache roots:" \ - " 0 - sequential iterator;" \ - " 1 - parallel iterator;" \ - " 2 - parallel iterator with cset filters;") \ - \ develop(bool, ShenandoahVerifyOptoBarriers, false, \ "Verify no missing barriers in C2.") \ \ diff --git a/src/hotspot/share/gc/z/zCollectedHeap.cpp b/src/hotspot/share/gc/z/zCollectedHeap.cpp index a3b09849fdc..59d6bf66da8 100644 --- a/src/hotspot/share/gc/z/zCollectedHeap.cpp +++ b/src/hotspot/share/gc/z/zCollectedHeap.cpp @@ -205,10 +205,6 @@ void ZCollectedHeap::do_full_collection(bool clear_all_soft_refs) { ShouldNotReachHere(); } -bool ZCollectedHeap::supports_tlab_allocation() const { - return true; -} - size_t ZCollectedHeap::tlab_capacity(Thread* ignored) const { return _heap.tlab_capacity(); } @@ -225,22 +221,6 @@ size_t ZCollectedHeap::unsafe_max_tlab_alloc(Thread* ignored) const { return _heap.unsafe_max_tlab_alloc(); } -bool ZCollectedHeap::can_elide_tlab_store_barriers() const { - return false; -} - -bool ZCollectedHeap::can_elide_initializing_store_barrier(oop new_obj) { - // Not supported - ShouldNotReachHere(); - return true; -} - -bool ZCollectedHeap::card_mark_must_follow_store() const { - // Not supported - ShouldNotReachHere(); - return false; -} - GrowableArray<GCMemoryManager*> ZCollectedHeap::memory_managers() { return GrowableArray<GCMemoryManager*>(1, 1, _heap.serviceability_memory_manager()); } diff --git a/src/hotspot/share/gc/z/zCollectedHeap.hpp b/src/hotspot/share/gc/z/zCollectedHeap.hpp index 9d482a6a1de..0b00c51d3ea 100644 --- a/src/hotspot/share/gc/z/zCollectedHeap.hpp +++ b/src/hotspot/share/gc/z/zCollectedHeap.hpp @@ -83,16 +83,11 @@ class ZCollectedHeap : public CollectedHeap { virtual void collect_as_vm_thread(GCCause::Cause cause); virtual void do_full_collection(bool clear_all_soft_refs); - virtual bool supports_tlab_allocation() const; virtual size_t tlab_capacity(Thread* thr) const; virtual size_t tlab_used(Thread* thr) const; virtual size_t max_tlab_size() const; virtual size_t unsafe_max_tlab_alloc(Thread* thr) const; - virtual bool can_elide_tlab_store_barriers() const; - virtual bool can_elide_initializing_store_barrier(oop new_obj); - virtual bool card_mark_must_follow_store() const; - virtual GrowableArray<GCMemoryManager*> memory_managers(); virtual GrowableArray<MemoryPool*> memory_pools(); diff --git a/src/hotspot/share/gc/z/zInitialize.cpp b/src/hotspot/share/gc/z/zInitialize.cpp index adeb6e9772a..3975b87d61f 100644 --- a/src/hotspot/share/gc/z/zInitialize.cpp +++ b/src/hotspot/share/gc/z/zInitialize.cpp @@ -52,5 +52,5 @@ ZInitialize::ZInitialize(ZBarrierSet* barrier_set) { ZLargePages::initialize(); ZBarrierSet::set_barrier_set(barrier_set); - initialize_os(); + pd_initialize(); } diff --git a/src/hotspot/share/gc/z/zInitialize.hpp b/src/hotspot/share/gc/z/zInitialize.hpp index 85470ed0ec3..599b6566234 100644 --- a/src/hotspot/share/gc/z/zInitialize.hpp +++ b/src/hotspot/share/gc/z/zInitialize.hpp @@ -30,7 +30,7 @@ class ZBarrierSet; class ZInitialize { private: - void initialize_os(); + void pd_initialize(); public: ZInitialize(ZBarrierSet* barrier_set); diff --git a/src/hotspot/share/gc/z/zLargePages.cpp b/src/hotspot/share/gc/z/zLargePages.cpp index 0a93b9ee6be..88656d15381 100644 --- a/src/hotspot/share/gc/z/zLargePages.cpp +++ b/src/hotspot/share/gc/z/zLargePages.cpp @@ -29,7 +29,7 @@ ZLargePages::State ZLargePages::_state; void ZLargePages::initialize() { - initialize_platform(); + pd_initialize(); log_info_p(gc, init)("Memory: " JULONG_FORMAT "M", os::physical_memory() / M); log_info_p(gc, init)("Large Page Support: %s", to_string()); diff --git a/src/hotspot/share/gc/z/zLargePages.hpp b/src/hotspot/share/gc/z/zLargePages.hpp index 0c22e89026e..1201b496266 100644 --- a/src/hotspot/share/gc/z/zLargePages.hpp +++ b/src/hotspot/share/gc/z/zLargePages.hpp @@ -36,7 +36,7 @@ class ZLargePages : public AllStatic { static State _state; - static void initialize_platform(); + static void pd_initialize(); public: static void initialize(); diff --git a/src/hotspot/share/gc/z/zMark.cpp b/src/hotspot/share/gc/z/zMark.cpp index ed409b58e87..a08cc54d5fb 100644 --- a/src/hotspot/share/gc/z/zMark.cpp +++ b/src/hotspot/share/gc/z/zMark.cpp @@ -643,6 +643,7 @@ class ZMarkConcurrentRootsIteratorClosure : public ZRootsIteratorClosure { class ZMarkConcurrentRootsTask : public ZTask { private: + ZMark* const _mark; SuspendibleThreadSetJoiner _sts_joiner; ZConcurrentRootsIteratorClaimStrong _roots; ZMarkConcurrentRootsIteratorClosure _cl; @@ -650,6 +651,7 @@ class ZMarkConcurrentRootsTask : public ZTask { public: ZMarkConcurrentRootsTask(ZMark* mark) : ZTask("ZMarkConcurrentRootsTask"), + _mark(mark), _sts_joiner(), _roots(), _cl() { @@ -662,6 +664,12 @@ class ZMarkConcurrentRootsTask : public ZTask { virtual void work() { _roots.oops_do(&_cl); + + // Flush and free worker stacks. Needed here since + // the set of workers executing during root scanning + // can be different from the set of workers executing + // during mark. + _mark->flush_and_free(); } }; diff --git a/src/hotspot/share/gc/z/zMark.hpp b/src/hotspot/share/gc/z/zMark.hpp index 5d3b8f5da74..74f0fea1be8 100644 --- a/src/hotspot/share/gc/z/zMark.hpp +++ b/src/hotspot/share/gc/z/zMark.hpp @@ -95,8 +95,8 @@ class ZMark { void work_with_timeout(ZMarkCache* cache, ZMarkStripe* stripe, ZMarkThreadLocalStacks* stacks, - uint64_t timeout_in_millis); - void work(uint64_t timeout_in_millis); + uint64_t timeout_in_micros); + void work(uint64_t timeout_in_micros); void verify_all_stacks_empty() const; diff --git a/src/hotspot/share/gc/z/zMarkStackAllocator.cpp b/src/hotspot/share/gc/z/zMarkStackAllocator.cpp index 8b7d2642188..fc6618aebf3 100644 --- a/src/hotspot/share/gc/z/zMarkStackAllocator.cpp +++ b/src/hotspot/share/gc/z/zMarkStackAllocator.cpp @@ -42,8 +42,7 @@ ZMarkStackSpace::ZMarkStackSpace() : // Reserve address space const size_t size = ZMarkStackSpaceLimit; - const size_t alignment = (size_t)os::vm_allocation_granularity(); - const uintptr_t addr = (uintptr_t)os::reserve_memory(size, NULL, alignment, mtGC); + const uintptr_t addr = (uintptr_t)os::reserve_memory(size, mtGC); if (addr == 0) { log_error_pd(gc, marking)("Failed to reserve address space for mark stacks"); return; diff --git a/src/hotspot/share/gc/z/zNUMA.cpp b/src/hotspot/share/gc/z/zNUMA.cpp index 6871e4434de..2ee790ede30 100644 --- a/src/hotspot/share/gc/z/zNUMA.cpp +++ b/src/hotspot/share/gc/z/zNUMA.cpp @@ -28,7 +28,7 @@ bool ZNUMA::_enabled; void ZNUMA::initialize() { - initialize_platform(); + pd_initialize(); log_info_p(gc, init)("NUMA Support: %s", to_string()); if (_enabled) { diff --git a/src/hotspot/share/gc/z/zNUMA.hpp b/src/hotspot/share/gc/z/zNUMA.hpp index f31f98c9a63..0dc4390e8b4 100644 --- a/src/hotspot/share/gc/z/zNUMA.hpp +++ b/src/hotspot/share/gc/z/zNUMA.hpp @@ -30,7 +30,7 @@ class ZNUMA : public AllStatic { private: static bool _enabled; - static void initialize_platform(); + static void pd_initialize(); public: static void initialize(); diff --git a/src/hotspot/share/gc/z/zRootsIterator.cpp b/src/hotspot/share/gc/z/zRootsIterator.cpp index a50772f96d1..bc6fb2d5206 100644 --- a/src/hotspot/share/gc/z/zRootsIterator.cpp +++ b/src/hotspot/share/gc/z/zRootsIterator.cpp @@ -54,7 +54,6 @@ static const ZStatSubPhase ZSubPhasePauseRootsSetup("Pause Roots Setup"); static const ZStatSubPhase ZSubPhasePauseRoots("Pause Roots"); static const ZStatSubPhase ZSubPhasePauseRootsTeardown("Pause Roots Teardown"); -static const ZStatSubPhase ZSubPhasePauseRootsObjectSynchronizer("Pause Roots ObjectSynchronizer"); static const ZStatSubPhase ZSubPhasePauseRootsJVMTIWeakExport("Pause Roots JVMTIWeakExport"); static const ZStatSubPhase ZSubPhasePauseRootsVMThread("Pause Roots VM Thread"); static const ZStatSubPhase ZSubPhasePauseRootsJavaThreads("Pause Roots Java Threads"); @@ -184,7 +183,6 @@ void ZJavaThreadsIterator::threads_do(ThreadClosure* cl) { ZRootsIterator::ZRootsIterator(bool visit_jvmti_weak_export) : _visit_jvmti_weak_export(visit_jvmti_weak_export), _java_threads_iter(), - _object_synchronizer(this), _jvmti_weak_export(this), _vm_thread(this), _java_threads(this), @@ -211,11 +209,6 @@ ZRootsIterator::~ZRootsIterator() { COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::update_pointers()); } -void ZRootsIterator::do_object_synchronizer(ZRootsIteratorClosure* cl) { - ZStatTimer timer(ZSubPhasePauseRootsObjectSynchronizer); - ObjectSynchronizer::oops_do(cl); -} - void ZRootsIterator::do_jvmti_weak_export(ZRootsIteratorClosure* cl) { ZStatTimer timer(ZSubPhasePauseRootsJVMTIWeakExport); AlwaysTrueClosure always_alive; @@ -241,7 +234,6 @@ void ZRootsIterator::do_code_cache(ZRootsIteratorClosure* cl) { void ZRootsIterator::oops_do(ZRootsIteratorClosure* cl) { ZStatTimer timer(ZSubPhasePauseRoots); - _object_synchronizer.oops_do(cl); _vm_thread.oops_do(cl); _java_threads.oops_do(cl); if (!ClassUnloading) { diff --git a/src/hotspot/share/gc/z/zRootsIterator.hpp b/src/hotspot/share/gc/z/zRootsIterator.hpp index ea60739b529..becb39089f6 100644 --- a/src/hotspot/share/gc/z/zRootsIterator.hpp +++ b/src/hotspot/share/gc/z/zRootsIterator.hpp @@ -110,13 +110,11 @@ class ZRootsIterator { const bool _visit_jvmti_weak_export; ZJavaThreadsIterator _java_threads_iter; - void do_object_synchronizer(ZRootsIteratorClosure* cl); void do_jvmti_weak_export(ZRootsIteratorClosure* cl); void do_vm_thread(ZRootsIteratorClosure* cl); void do_java_threads(ZRootsIteratorClosure* cl); void do_code_cache(ZRootsIteratorClosure* cl); - ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_object_synchronizer> _object_synchronizer; ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_jvmti_weak_export> _jvmti_weak_export; ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_vm_thread> _vm_thread; ZParallelOopsDo<ZRootsIterator, &ZRootsIterator::do_java_threads> _java_threads; diff --git a/src/hotspot/share/gc/z/zStat.cpp b/src/hotspot/share/gc/z/zStat.cpp index 21eacbe2b52..183e8d5bcc4 100644 --- a/src/hotspot/share/gc/z/zStat.cpp +++ b/src/hotspot/share/gc/z/zStat.cpp @@ -390,22 +390,35 @@ ZStatIterableValue<T>::ZStatIterableValue(const char* group, template <typename T> T* ZStatIterableValue<T>::insert() const { - T** current = &_first; + T* const next = _first; + _first = (T*)this; + return next; +} - while (*current != NULL) { - // First sort by group, then by name - const int group_cmp = strcmp((*current)->group(), group()); - const int name_cmp = strcmp((*current)->name(), name()); - if ((group_cmp > 0) || (group_cmp == 0 && name_cmp > 0)) { - break; - } +template <typename T> +void ZStatIterableValue<T>::sort() { + T* first_unsorted = _first; + _first = NULL; + + while (first_unsorted != NULL) { + T* const value = first_unsorted; + first_unsorted = value->_next; + value->_next = NULL; + + T** current = &_first; + + while (*current != NULL) { + // First sort by group, then by name + const int group_cmp = strcmp((*current)->group(), value->group()); + if ((group_cmp > 0) || (group_cmp == 0 && strcmp((*current)->name(), value->name()) > 0)) { + break; + } - current = &(*current)->_next; + current = &(*current)->_next; + } + value->_next = *current; + *current = value; } - - T* const next = *current; - *current = (T*)this; - return next; } // @@ -882,6 +895,8 @@ void ZStat::run_service() { ZStatSamplerHistory* const history = new ZStatSamplerHistory[ZStatSampler::count()]; LogTarget(Info, gc, stats) log; + ZStatSampler::sort(); + // Main loop while (_metronome.wait_for_tick()) { sample_and_collect(history); diff --git a/src/hotspot/share/gc/z/zStat.hpp b/src/hotspot/share/gc/z/zStat.hpp index 9220327f6f7..3faac3b8ea5 100644 --- a/src/hotspot/share/gc/z/zStat.hpp +++ b/src/hotspot/share/gc/z/zStat.hpp @@ -101,6 +101,8 @@ class ZStatIterableValue : public ZStatValue { uint32_t size); public: + static void sort(); + static uint32_t count() { return _count; } diff --git a/src/hotspot/share/gc/z/zVirtualMemory.cpp b/src/hotspot/share/gc/z/zVirtualMemory.cpp index 61660c2da0c..f8070d9b8be 100644 --- a/src/hotspot/share/gc/z/zVirtualMemory.cpp +++ b/src/hotspot/share/gc/z/zVirtualMemory.cpp @@ -23,12 +23,13 @@ #include "precompiled.hpp" #include "gc/shared/gcLogPrecious.hpp" +#include "gc/z/zAddress.inline.hpp" #include "gc/z/zAddressSpaceLimit.hpp" #include "gc/z/zGlobals.hpp" #include "gc/z/zVirtualMemory.inline.hpp" #include "services/memTracker.hpp" -#include "utilities/debug.hpp" #include "utilities/align.hpp" +#include "utilities/debug.hpp" ZVirtualMemoryManager::ZVirtualMemoryManager(size_t max_capacity) : _manager(), @@ -47,8 +48,8 @@ ZVirtualMemoryManager::ZVirtualMemoryManager(size_t max_capacity) : return; } - // Initialize OS specific parts - initialize_os(); + // Initialize platform specific parts + pd_initialize(); // Successfully initialized _initialized = true; @@ -62,9 +63,7 @@ size_t ZVirtualMemoryManager::reserve_discontiguous(uintptr_t start, size_t size assert(is_aligned(size, ZGranuleSize), "Misaligned"); - if (reserve_contiguous_platform(start, size)) { - // Make the address range free - _manager.free(start, size); + if (reserve_contiguous(start, size)) { return size; } @@ -99,16 +98,48 @@ size_t ZVirtualMemoryManager::reserve_discontiguous(size_t size) { return reserved; } +bool ZVirtualMemoryManager::reserve_contiguous(uintptr_t start, size_t size) { + assert(is_aligned(size, ZGranuleSize), "Must be granule aligned"); + + // Reserve address views + const uintptr_t marked0 = ZAddress::marked0(start); + const uintptr_t marked1 = ZAddress::marked1(start); + const uintptr_t remapped = ZAddress::remapped(start); + + // Reserve address space + if (!pd_reserve(marked0, size)) { + return false; + } + + if (!pd_reserve(marked1, size)) { + pd_unreserve(marked0, size); + return false; + } + + if (!pd_reserve(remapped, size)) { + pd_unreserve(marked0, size); + pd_unreserve(marked1, size); + return false; + } + + // Register address views with native memory tracker + nmt_reserve(marked0, size); + nmt_reserve(marked1, size); + nmt_reserve(remapped, size); + + // Make the address range free + _manager.free(start, size); + + return true; +} + bool ZVirtualMemoryManager::reserve_contiguous(size_t size) { // Allow at most 8192 attempts spread evenly across [0, ZAddressOffsetMax) const size_t unused = ZAddressOffsetMax - size; const size_t increment = MAX2(align_up(unused / 8192, ZGranuleSize), ZGranuleSize); for (size_t start = 0; start + size <= ZAddressOffsetMax; start += increment) { - if (reserve_contiguous_platform(start, size)) { - // Make the address range free - _manager.free(start, size); - + if (reserve_contiguous(start, size)) { // Success return true; } diff --git a/src/hotspot/share/gc/z/zVirtualMemory.hpp b/src/hotspot/share/gc/z/zVirtualMemory.hpp index f743e7aaee4..bac2b605e5c 100644 --- a/src/hotspot/share/gc/z/zVirtualMemory.hpp +++ b/src/hotspot/share/gc/z/zVirtualMemory.hpp @@ -50,9 +50,12 @@ class ZVirtualMemoryManager { ZMemoryManager _manager; bool _initialized; - void initialize_os(); + // Platform specific implementation + void pd_initialize(); + bool pd_reserve(uintptr_t addr, size_t size); + void pd_unreserve(uintptr_t addr, size_t size); - bool reserve_contiguous_platform(uintptr_t start, size_t size); + bool reserve_contiguous(uintptr_t start, size_t size); bool reserve_contiguous(size_t size); size_t reserve_discontiguous(uintptr_t start, size_t size, size_t min_range); size_t reserve_discontiguous(size_t size); diff --git a/src/hotspot/share/include/jvm.h b/src/hotspot/share/include/jvm.h index 15b064dcb7d..fb9dfba4301 100644 --- a/src/hotspot/share/include/jvm.h +++ b/src/hotspot/share/include/jvm.h @@ -198,13 +198,13 @@ JVM_LookupLambdaProxyClassFromArchive(JNIEnv* env, jclass caller, jboolean initialize); JNIEXPORT jboolean JNICALL -JVM_IsCDSDumpingEnabled(JNIEnv* env); +JVM_IsDynamicDumpingEnabled(JNIEnv* env); JNIEXPORT jboolean JNICALL -JVM_IsCDSSharingEnabled(JNIEnv* env); +JVM_IsSharingEnabled(JNIEnv* env); JNIEXPORT jlong JNICALL -JVM_GetRandomSeedForCDSDump(); +JVM_GetRandomSeedForDumping(); /* * java.lang.Throwable diff --git a/src/hotspot/share/interpreter/interpreterRuntime.cpp b/src/hotspot/share/interpreter/interpreterRuntime.cpp index 55539ef5c93..b796fe14925 100644 --- a/src/hotspot/share/interpreter/interpreterRuntime.cpp +++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp @@ -568,6 +568,7 @@ void InterpreterRuntime::note_trap_inner(JavaThread* thread, int reason, if (trap_mdo == NULL) { Method::build_interpreter_method_data(trap_method, THREAD); if (HAS_PENDING_EXCEPTION) { + // Only metaspace OOM is expected. No Java code executed. assert((PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())), "we expect only an OOM error here"); CLEAR_PENDING_EXCEPTION; @@ -1001,24 +1002,21 @@ JRT_ENTRY_NO_ASYNC(void, InterpreterRuntime::monitorenter(JavaThread* thread, Ba JRT_END -//%note monitor_1 -JRT_ENTRY_NO_ASYNC(void, InterpreterRuntime::monitorexit(JavaThread* thread, BasicObjectLock* elem)) -#ifdef ASSERT - thread->last_frame().interpreter_frame_verify_monitor(elem); -#endif - Handle h_obj(thread, elem->obj()); - assert(Universe::heap()->is_in_or_null(h_obj()), - "must be NULL or an object"); - if (elem == NULL || h_obj()->is_unlocked()) { - THROW(vmSymbols::java_lang_IllegalMonitorStateException()); +JRT_LEAF(void, InterpreterRuntime::monitorexit(BasicObjectLock* elem)) + oop obj = elem->obj(); + assert(Universe::heap()->is_in(obj), "must be an object"); + // The object could become unlocked through a JNI call, which we have no other checks for. + // Give a fatal message if CheckJNICalls. Otherwise we ignore it. + if (obj->is_unlocked()) { + if (CheckJNICalls) { + fatal("Object has been unlocked by JNI"); + } + return; } - ObjectSynchronizer::exit(h_obj(), elem->lock(), thread); - // Free entry. This must be done here, since a pending exception might be installed on - // exit. If it is not cleared, the exception handling code will try to unlock the monitor again. + ObjectSynchronizer::exit(obj, elem->lock(), Thread::current()); + // Free entry. If it is not cleared, the exception handling code will try to unlock the monitor + // again at method exit or in the case of an exception. elem->set_obj(NULL); -#ifdef ASSERT - thread->last_frame().interpreter_frame_verify_monitor(elem); -#endif JRT_END @@ -1245,6 +1243,7 @@ JRT_END nmethod* InterpreterRuntime::frequency_counter_overflow(JavaThread* thread, address branch_bcp) { + // frequency_counter_overflow_inner can throw async exception. nmethod* nm = frequency_counter_overflow_inner(thread, branch_bcp); assert(branch_bcp != NULL || nm == NULL, "always returns null for non OSR requests"); if (branch_bcp != NULL && nm != NULL) { @@ -1286,9 +1285,6 @@ nmethod* InterpreterRuntime::frequency_counter_overflow(JavaThread* thread, addr JRT_ENTRY(nmethod*, InterpreterRuntime::frequency_counter_overflow_inner(JavaThread* thread, address branch_bcp)) - if (HAS_PENDING_EXCEPTION) { - return NULL; - } // use UnlockFlagSaver to clear and restore the _do_not_unlock_if_synchronized // flag, in case this method triggers classloading which will call into Java. UnlockFlagSaver fs(thread); @@ -1299,8 +1295,7 @@ JRT_ENTRY(nmethod*, const int branch_bci = branch_bcp != NULL ? method->bci_from(branch_bcp) : InvocationEntryBci; const int bci = branch_bcp != NULL ? method->bci_from(last_frame.bcp()) : InvocationEntryBci; - nmethod* osr_nm = CompilationPolicy::policy()->event(method, method, branch_bci, bci, CompLevel_none, NULL, thread); - assert(!HAS_PENDING_EXCEPTION, "Event handler should not throw any exceptions"); + nmethod* osr_nm = CompilationPolicy::policy()->event(method, method, branch_bci, bci, CompLevel_none, NULL, THREAD); BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod(); if (osr_nm != NULL && bs_nm != NULL) { @@ -1341,9 +1336,6 @@ JRT_LEAF(jint, InterpreterRuntime::bcp_to_di(Method* method, address cur_bcp)) JRT_END JRT_ENTRY(void, InterpreterRuntime::profile_method(JavaThread* thread)) - if (HAS_PENDING_EXCEPTION) { - return; - } // use UnlockFlagSaver to clear and restore the _do_not_unlock_if_synchronized // flag, in case this method triggers classloading which will call into Java. UnlockFlagSaver fs(thread); @@ -1354,6 +1346,7 @@ JRT_ENTRY(void, InterpreterRuntime::profile_method(JavaThread* thread)) methodHandle method(thread, last_frame.method()); Method::build_interpreter_method_data(method, THREAD); if (HAS_PENDING_EXCEPTION) { + // Only metaspace OOM is expected. No Java code executed. assert((PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())), "we expect only an OOM error here"); CLEAR_PENDING_EXCEPTION; // and fall through... @@ -1413,6 +1406,7 @@ JRT_END JRT_ENTRY(MethodCounters*, InterpreterRuntime::build_method_counters(JavaThread* thread, Method* m)) MethodCounters* mcs = Method::build_method_counters(m, thread); if (HAS_PENDING_EXCEPTION) { + // Only metaspace OOM is expected. No Java code executed. assert((PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())), "we expect only an OOM error here"); CLEAR_PENDING_EXCEPTION; } diff --git a/src/hotspot/share/interpreter/interpreterRuntime.hpp b/src/hotspot/share/interpreter/interpreterRuntime.hpp index d26d166f675..40425b9a136 100644 --- a/src/hotspot/share/interpreter/interpreterRuntime.hpp +++ b/src/hotspot/share/interpreter/interpreterRuntime.hpp @@ -113,7 +113,7 @@ class InterpreterRuntime: AllStatic { public: // Synchronization static void monitorenter(JavaThread* thread, BasicObjectLock* elem); - static void monitorexit (JavaThread* thread, BasicObjectLock* elem); + static void monitorexit (BasicObjectLock* elem); static void throw_illegal_monitor_state_exception(JavaThread* thread); static void new_illegal_monitor_state_exception(JavaThread* thread); diff --git a/src/hotspot/share/interpreter/templateTable.cpp b/src/hotspot/share/interpreter/templateTable.cpp index 11a61bdff10..d0342b47d14 100644 --- a/src/hotspot/share/interpreter/templateTable.cpp +++ b/src/hotspot/share/interpreter/templateTable.cpp @@ -506,8 +506,6 @@ void TemplateTable::initialize() { def(Bytecodes::_shouldnotreachhere , ____|____|____|____, vtos, vtos, shouldnotreachhere , _ ); - // platform specific bytecodes - pd_initialize(); } void TemplateTable::unimplemented_bc() { diff --git a/src/hotspot/share/interpreter/templateTable.hpp b/src/hotspot/share/interpreter/templateTable.hpp index e6b2f538c0d..337bcdaa805 100644 --- a/src/hotspot/share/interpreter/templateTable.hpp +++ b/src/hotspot/share/interpreter/templateTable.hpp @@ -343,7 +343,6 @@ class TemplateTable: AllStatic { public: // Initialization static void initialize(); - static void pd_initialize(); // Templates static Template* template_for (Bytecodes::Code code) { Bytecodes::check (code); return &_template_table [code]; } diff --git a/src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp b/src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp index fe3ac9fdbac..ba162c35703 100644 --- a/src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp +++ b/src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp @@ -627,7 +627,7 @@ BytecodeInterpreter::run(interpreterState istate) { (* BiasedLocking::rebiased_lock_entry_count_addr())++; } } else { - CALL_VM(InterpreterRuntime::monitorenter(THREAD, mon), handle_exception); + InterpreterRuntime::monitorenter(THREAD, mon); } success = true; } else { @@ -1822,7 +1822,7 @@ BytecodeInterpreter::run(interpreterState istate) { if (call_vm || lockee->cas_set_mark(header, old_header) != old_header) { // restore object for the slow case most_recent->set_obj(lockee); - CALL_VM(InterpreterRuntime::monitorexit(THREAD, most_recent), handle_exception); + InterpreterRuntime::monitorexit(most_recent); } } } @@ -2959,11 +2959,7 @@ BytecodeInterpreter::run(interpreterState istate) { if (lockee->cas_set_mark(header, old_header) != old_header) { // restore object for the slow case end->set_obj(lockee); - { - // Prevent any HandleMarkCleaner from freeing our live handles - HandleMark __hm(THREAD); - CALL_VM_NOCHECK(InterpreterRuntime::monitorexit(THREAD, end)); - } + InterpreterRuntime::monitorexit(end); } } } @@ -3013,11 +3009,7 @@ BytecodeInterpreter::run(interpreterState istate) { THREAD->clear_pending_exception(); } } else if (UseHeavyMonitors) { - { - // Prevent any HandleMarkCleaner from freeing our live handles. - HandleMark __hm(THREAD); - CALL_VM_NOCHECK(InterpreterRuntime::monitorexit(THREAD, base)); - } + InterpreterRuntime::monitorexit(base); if (THREAD->has_pending_exception()) { if (!suppress_error) illegal_state_oop = Handle(THREAD, THREAD->pending_exception()); THREAD->clear_pending_exception(); @@ -3035,11 +3027,7 @@ BytecodeInterpreter::run(interpreterState istate) { if (rcvr->cas_set_mark(header, old_header) != old_header) { // restore object for the slow case base->set_obj(rcvr); - { - // Prevent any HandleMarkCleaner from freeing our live handles - HandleMark __hm(THREAD); - CALL_VM_NOCHECK(InterpreterRuntime::monitorexit(THREAD, base)); - } + InterpreterRuntime::monitorexit(base); if (THREAD->has_pending_exception()) { if (!suppress_error) illegal_state_oop = Handle(THREAD, THREAD->pending_exception()); THREAD->clear_pending_exception(); diff --git a/src/hotspot/share/jfr/leakprofiler/chains/rootSetClosure.cpp b/src/hotspot/share/jfr/leakprofiler/chains/rootSetClosure.cpp index 947291bef0b..73a76cf07df 100644 --- a/src/hotspot/share/jfr/leakprofiler/chains/rootSetClosure.cpp +++ b/src/hotspot/share/jfr/leakprofiler/chains/rootSetClosure.cpp @@ -57,7 +57,7 @@ template <typename Delegate> void RootSetClosure<Delegate>::do_oop(narrowOop* ref) { assert(ref != NULL, "invariant"); assert(is_aligned(ref, sizeof(narrowOop)), "invariant"); - if (*ref != 0) { + if (CompressedOops::is_null(*ref)) { _delegate->do_root(UnifiedOopRef::encode_in_native(ref)); } } @@ -71,7 +71,6 @@ void RootSetClosure<Delegate>::process() { ClassLoaderDataGraph::always_strong_cld_do(&cldt_closure); // We don't follow code blob oops, because they have misaligned oops. Threads::oops_do(this, NULL); - ObjectSynchronizer::oops_do(this); OopStorageSet::strong_oops_do(this); AOTLoader::oops_do(this); } diff --git a/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp b/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp index be8d9ff0db8..0b270033463 100644 --- a/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp +++ b/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp @@ -95,7 +95,6 @@ class ReferenceToRootClosure : public StackObj { bool _complete; bool do_cldg_roots(); - bool do_object_synchronizer_roots(); bool do_oop_storage_roots(); bool do_string_table_roots(); bool do_aot_loader_roots(); @@ -129,13 +128,6 @@ bool ReferenceToRootClosure::do_cldg_roots() { return rlc.complete(); } -bool ReferenceToRootClosure::do_object_synchronizer_roots() { - assert(!complete(), "invariant"); - ReferenceLocateClosure rlc(_callback, OldObjectRoot::_object_synchronizer, OldObjectRoot::_type_undetermined, NULL); - ObjectSynchronizer::oops_do(&rlc); - return rlc.complete(); -} - bool ReferenceToRootClosure::do_oop_storage_roots() { int i = 0; for (OopStorageSet::Iterator it = OopStorageSet::strong_iterator(); !it.is_end(); ++it, ++i) { @@ -171,11 +163,6 @@ bool ReferenceToRootClosure::do_roots() { return true; } - if (do_object_synchronizer_roots()) { - _complete = true; - return true; - } - if (do_oop_storage_roots()) { _complete = true; return true; diff --git a/src/hotspot/share/jfr/leakprofiler/utilities/rootType.cpp b/src/hotspot/share/jfr/leakprofiler/utilities/rootType.cpp index ba0241646a0..7d746e4f48b 100644 --- a/src/hotspot/share/jfr/leakprofiler/utilities/rootType.cpp +++ b/src/hotspot/share/jfr/leakprofiler/utilities/rootType.cpp @@ -54,8 +54,6 @@ const char* OldObjectRoot::system_description(System system) { return "Universe"; case _threads: return "Threads"; - case _object_synchronizer: - return "Object Monitor"; case _class_loader_data: return "Class Loader Data"; case _code_cache: diff --git a/src/hotspot/share/jfr/leakprofiler/utilities/rootType.hpp b/src/hotspot/share/jfr/leakprofiler/utilities/rootType.hpp index e58a2c07c30..746b7a3bfb7 100644 --- a/src/hotspot/share/jfr/leakprofiler/utilities/rootType.hpp +++ b/src/hotspot/share/jfr/leakprofiler/utilities/rootType.hpp @@ -36,7 +36,6 @@ class OldObjectRoot : public AllStatic { _threads, _strong_oop_storage_set_first, _strong_oop_storage_set_last = _strong_oop_storage_set_first + OopStorageSet::strong_count - 1, - _object_synchronizer, _class_loader_data, _code_cache, _aot, diff --git a/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp b/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp index 5295b137ccf..946ff0e5bb0 100644 --- a/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp +++ b/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp @@ -279,11 +279,11 @@ TRACE_REQUEST_FUNC(ThreadContextSwitchRate) { #define SEND_FLAGS_OF_TYPE(eventType, flagType) \ do { \ JVMFlag *flag = JVMFlag::flags; \ - while (flag->_name != NULL) { \ + while (flag->name() != NULL) { \ if (flag->is_ ## flagType()) { \ if (flag->is_unlocked()) { \ Event ## eventType event; \ - event.set_name(flag->_name); \ + event.set_name(flag->name()); \ event.set_value(flag->get_ ## flagType()); \ event.set_origin(flag->get_origin()); \ event.commit(); \ diff --git a/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp b/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp index 3d66f12e87d..bd235c710de 100644 --- a/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp +++ b/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp @@ -343,6 +343,7 @@ class JfrThreadSampler : public NonJavaThread { virtual void post_run(); public: virtual char* name() const { return (char*)"JFR Thread Sampler"; } + bool is_JfrSampler_thread() const { return true; } void run(); static Monitor* transition_block() { return JfrThreadSampler_lock; } static void on_javathread_suspend(JavaThread* thread); diff --git a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.cpp b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.cpp index 6b2c91a9442..3fb38f4f521 100644 --- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.cpp +++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.cpp @@ -52,7 +52,7 @@ static traceid atomic_inc(traceid volatile* const dest) { } static traceid next_class_id() { - static volatile traceid class_id_counter = LAST_TYPE_ID + 1; + static volatile traceid class_id_counter = LAST_TYPE_ID; return atomic_inc(&class_id_counter) << TRACE_ID_SHIFT; } @@ -62,17 +62,17 @@ static traceid next_thread_id() { } static traceid next_module_id() { - static volatile traceid module_id_counter = 1; + static volatile traceid module_id_counter = 0; return atomic_inc(&module_id_counter) << TRACE_ID_SHIFT; } static traceid next_package_id() { - static volatile traceid package_id_counter = 1; + static volatile traceid package_id_counter = 0; return atomic_inc(&package_id_counter) << TRACE_ID_SHIFT; } static traceid next_class_loader_data_id() { - static volatile traceid cld_id_counter = 1; + static volatile traceid cld_id_counter = 0; return atomic_inc(&cld_id_counter) << TRACE_ID_SHIFT; } diff --git a/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp b/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp index dd2ffefff8b..dceccf2b3cd 100644 --- a/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp +++ b/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp @@ -454,12 +454,8 @@ static bool prepare_for_emergency_dump(Thread* thread) { Heap_lock->unlock(); } - if (VMOperationQueue_lock->owned_by_self()) { - VMOperationQueue_lock->unlock(); - } - - if (VMOperationRequest_lock->owned_by_self()) { - VMOperationRequest_lock->unlock(); + if (VMOperation_lock->owned_by_self()) { + VMOperation_lock->unlock(); } if (Service_lock->owned_by_self()) { diff --git a/src/hotspot/share/jvmci/compilerRuntime.cpp b/src/hotspot/share/jvmci/compilerRuntime.cpp index d90f1e705f2..f0776dbcad4 100644 --- a/src/hotspot/share/jvmci/compilerRuntime.cpp +++ b/src/hotspot/share/jvmci/compilerRuntime.cpp @@ -252,16 +252,12 @@ JRT_BLOCK_ENTRY(void, CompilerRuntime::invocation_event(JavaThread *thread, Meth JRT_BLOCK methodHandle mh(THREAD, counters->method()); RegisterMap map(thread, false); - // Compute the enclosing method frame fr = thread->last_frame().sender(&map); CompiledMethod* cm = fr.cb()->as_compiled_method_or_null(); assert(cm != NULL && cm->is_compiled(), "Sanity check"); methodHandle emh(THREAD, cm->method()); - - assert(!HAS_PENDING_EXCEPTION, "Should not have any exceptions pending"); - CompilationPolicy::policy()->event(emh, mh, InvocationEntryBci, InvocationEntryBci, CompLevel_aot, cm, thread); - assert(!HAS_PENDING_EXCEPTION, "Event handler should not throw any exceptions"); + CompilationPolicy::policy()->event(emh, mh, InvocationEntryBci, InvocationEntryBci, CompLevel_aot, cm, THREAD); JRT_BLOCK_END JRT_END @@ -281,9 +277,7 @@ JRT_BLOCK_ENTRY(void, CompilerRuntime::backedge_event(JavaThread *thread, Method CompiledMethod* cm = fr.cb()->as_compiled_method_or_null(); assert(cm != NULL && cm->is_compiled(), "Sanity check"); methodHandle emh(THREAD, cm->method()); - assert(!HAS_PENDING_EXCEPTION, "Should not have any exceptions pending"); - nmethod* osr_nm = CompilationPolicy::policy()->event(emh, mh, branch_bci, target_bci, CompLevel_aot, cm, thread); - assert(!HAS_PENDING_EXCEPTION, "Event handler should not throw any exceptions"); + nmethod* osr_nm = CompilationPolicy::policy()->event(emh, mh, branch_bci, target_bci, CompLevel_aot, cm, THREAD); if (osr_nm != NULL) { Deoptimization::deoptimize_frame(thread, fr.id()); } diff --git a/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp b/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp index 59b795a6a76..bc6f5dec646 100644 --- a/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp +++ b/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp @@ -897,8 +897,14 @@ JVMCI::CodeInstallResult CodeInstaller::initialize_buffer(CodeBuffer& buffer, bo JVMCI_ERROR_OK("method contains safepoint, but has no deopt rescue slot"); } if (JVMCIENV->equals(reason, jvmci_env()->get_site_InfopointReason_IMPLICIT_EXCEPTION())) { - JVMCI_event_4("implicit exception at %i", pc_offset); - _implicit_exception_table.add_deoptimize(pc_offset); + if (jvmci_env()->isa_site_ImplicitExceptionDispatch(site)) { + jint dispatch_offset = jvmci_env()->get_site_ImplicitExceptionDispatch_dispatchOffset(site); + JVMCI_event_4("implicit exception at %i, dispatch to %i", pc_offset, dispatch_offset); + _implicit_exception_table.append(pc_offset, dispatch_offset); + } else { + JVMCI_event_4("implicit exception at %i", pc_offset); + _implicit_exception_table.add_deoptimize(pc_offset); + } } } else { JVMCI_event_4("infopoint at %i", pc_offset); diff --git a/src/hotspot/share/jvmci/jvmciCompiler.cpp b/src/hotspot/share/jvmci/jvmciCompiler.cpp index 6e57e1ce5db..fcbef2390fb 100644 --- a/src/hotspot/share/jvmci/jvmciCompiler.cpp +++ b/src/hotspot/share/jvmci/jvmciCompiler.cpp @@ -77,7 +77,7 @@ void JVMCICompiler::bootstrap(TRAPS) { !mh->is_class_initializer()) { ResourceMark rm; int hot_count = 10; // TODO: what's the appropriate value? - CompileBroker::compile_method(mh, InvocationEntryBci, CompLevel_full_optimization, mh, hot_count, CompileTask::Reason_Bootstrap, THREAD); + CompileBroker::compile_method(mh, InvocationEntryBci, CompLevel_full_optimization, mh, hot_count, CompileTask::Reason_Bootstrap, CHECK); } } diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp index 7c70fb08c70..f2845394677 100644 --- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp +++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp @@ -48,6 +48,7 @@ #include "runtime/deoptimization.hpp" #include "runtime/fieldDescriptor.inline.hpp" #include "runtime/frame.inline.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/interfaceSupport.inline.hpp" #include "runtime/jniHandles.inline.hpp" #include "runtime/reflectionUtils.hpp" @@ -236,7 +237,7 @@ C2V_VMENTRY_NULL(jobject, getFlagValue, (JNIEnv* env, jobject c2vm, jobject name } else if (flag->is_double()) { RETURN_BOXED_DOUBLE(flag->get_double()); } else { - JVMCI_ERROR_NULL("VM flag %s has unsupported type %s", flag->_name, flag->_type); + JVMCI_ERROR_NULL("VM flag %s has unsupported type %s", flag->name(), flag->type_string()); } #undef RETURN_BOXED_LONG #undef RETURN_BOXED_DOUBLE diff --git a/src/hotspot/share/jvmci/jvmciJavaClasses.hpp b/src/hotspot/share/jvmci/jvmciJavaClasses.hpp index 91c9302729a..7e981d5738a 100644 --- a/src/hotspot/share/jvmci/jvmciJavaClasses.hpp +++ b/src/hotspot/share/jvmci/jvmciJavaClasses.hpp @@ -177,6 +177,9 @@ object_field(site_Call, target, "Ljdk/vm/ci/meta/InvokeTarget;") \ boolean_field(site_Call, direct) \ end_class \ + start_class(site_ImplicitExceptionDispatch, jdk_vm_ci_code_site_ImplicitExceptionDispatch) \ + int_field(site_ImplicitExceptionDispatch, dispatchOffset) \ + end_class \ start_class(site_DataPatch, jdk_vm_ci_code_site_DataPatch) \ object_field(site_DataPatch, reference, "Ljdk/vm/ci/code/site/Reference;") \ end_class \ diff --git a/src/hotspot/share/jvmci/jvmciRuntime.cpp b/src/hotspot/share/jvmci/jvmciRuntime.cpp index 2135cc3ca17..9613006cf3a 100644 --- a/src/hotspot/share/jvmci/jvmciRuntime.cpp +++ b/src/hotspot/share/jvmci/jvmciRuntime.cpp @@ -76,10 +76,10 @@ static void deopt_caller() { } // Manages a scope for a JVMCI runtime call that attempts a heap allocation. -// If there is a pending exception upon closing the scope and the runtime +// If there is a pending nonasync exception upon closing the scope and the runtime // call is of the variety where allocation failure returns NULL without an // exception, the following action is taken: -// 1. The pending exception is cleared +// 1. The pending nonasync exception is cleared // 2. NULL is written to JavaThread::_vm_result // 3. Checks that an OutOfMemoryError is Universe::out_of_memory_error_retry(). class RetryableAllocationMark: public StackObj { @@ -101,7 +101,8 @@ class RetryableAllocationMark: public StackObj { JavaThread* THREAD = _thread; if (HAS_PENDING_EXCEPTION) { oop ex = PENDING_EXCEPTION; - CLEAR_PENDING_EXCEPTION; + // Do not clear probable async exceptions. + CLEAR_PENDING_NONASYNC_EXCEPTION; oop retry_oome = Universe::out_of_memory_error_retry(); if (ex->is_a(retry_oome->klass()) && retry_oome != ex) { ResourceMark rm; diff --git a/src/hotspot/share/jvmci/jvmci_globals.cpp b/src/hotspot/share/jvmci/jvmci_globals.cpp index dc6a9000da0..c9b3869f2f8 100644 --- a/src/hotspot/share/jvmci/jvmci_globals.cpp +++ b/src/hotspot/share/jvmci/jvmci_globals.cpp @@ -23,13 +23,14 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcConfig.hpp" #include "jvm.h" #include "jvmci/jvmci_globals.hpp" -#include "gc/shared/gcConfig.hpp" -#include "utilities/defaultStream.hpp" -#include "utilities/ostream.hpp" #include "runtime/arguments.hpp" +#include "runtime/flags/jvmFlagAccess.hpp" #include "runtime/globals_extension.hpp" +#include "utilities/defaultStream.hpp" +#include "utilities/ostream.hpp" fileStream* JVMCIGlobals::_jni_config_file = NULL; @@ -187,7 +188,7 @@ bool JVMCIGlobals::enable_jvmci_product_mode(JVMFlag::Flags origin) { bool value = true; JVMFlag *jvmciEnableFlag = JVMFlag::find_flag("EnableJVMCIProduct"); - if (JVMFlag::boolAtPut(jvmciEnableFlag, &value, origin) != JVMFlag::SUCCESS) { + if (JVMFlagAccess::boolAtPut(jvmciEnableFlag, &value, origin) != JVMFlag::SUCCESS) { return false; } diff --git a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp index 3d4979492c1..7d1ef915b70 100644 --- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp +++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp @@ -49,7 +49,8 @@ static_field(CompilerToVM::Data, SharedRuntime_ic_miss_stub, address) \ static_field(CompilerToVM::Data, SharedRuntime_handle_wrong_method_stub, address) \ static_field(CompilerToVM::Data, SharedRuntime_deopt_blob_unpack, address) \ - static_field(CompilerToVM::Data, SharedRuntime_deopt_blob_unpack_with_exception_in_tls, address) \ + static_field(CompilerToVM::Data, SharedRuntime_deopt_blob_unpack_with_exception_in_tls, \ + address) \ static_field(CompilerToVM::Data, SharedRuntime_deopt_blob_uncommon_trap, address) \ \ static_field(CompilerToVM::Data, ThreadLocalAllocBuffer_alignment_reserve, size_t) \ @@ -725,7 +726,7 @@ #ifdef AARCH64 #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \ - static_field(VM_Version, _psr_info.dczid_el0, uint32_t) \ + static_field(VM_Version, _zva_length, int) \ volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*) #define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \ @@ -753,7 +754,9 @@ #define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \ LP64_ONLY(declare_constant(frame::arg_reg_save_area_bytes)) \ declare_constant(frame::interpreter_frame_sender_sp_offset) \ - declare_constant(frame::interpreter_frame_last_sp_offset) \ + declare_constant(frame::interpreter_frame_last_sp_offset) + +#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \ declare_constant(VM_Version::CPU_CX8) \ declare_constant(VM_Version::CPU_CMOV) \ declare_constant(VM_Version::CPU_FXSR) \ @@ -784,23 +787,22 @@ declare_constant(VM_Version::CPU_AVX512DQ) \ declare_constant(VM_Version::CPU_AVX512PF) \ declare_constant(VM_Version::CPU_AVX512ER) \ - declare_constant(VM_Version::CPU_AVX512CD) - -#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512BW", CPU_AVX512BW) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512VL", CPU_AVX512VL) \ - declare_preprocessor_constant("VM_Version::CPU_SHA", CPU_SHA) \ - declare_preprocessor_constant("VM_Version::CPU_FMA", CPU_FMA) \ - declare_preprocessor_constant("VM_Version::CPU_VZEROUPPER", CPU_VZEROUPPER) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512_VPOPCNTDQ", CPU_AVX512_VPOPCNTDQ) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512_VPCLMULQDQ", CPU_AVX512_VPCLMULQDQ) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512_VAES", CPU_AVX512_VAES) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512_VNNI", CPU_AVX512_VNNI) \ - declare_preprocessor_constant("VM_Version::CPU_FLUSH", CPU_FLUSH) \ - declare_preprocessor_constant("VM_Version::CPU_FLUSHOPT", CPU_FLUSHOPT) \ - declare_preprocessor_constant("VM_Version::CPU_CLWB", CPU_CLWB) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512_VBMI2", CPU_AVX512_VBMI2) \ - declare_preprocessor_constant("VM_Version::CPU_AVX512_VBMI", CPU_AVX512_VBMI) + declare_constant(VM_Version::CPU_AVX512CD) \ + declare_constant(VM_Version::CPU_AVX512BW) \ + declare_constant(VM_Version::CPU_AVX512VL) \ + declare_constant(VM_Version::CPU_SHA) \ + declare_constant(VM_Version::CPU_FMA) \ + declare_constant(VM_Version::CPU_VZEROUPPER) \ + declare_constant(VM_Version::CPU_AVX512_VPOPCNTDQ) \ + declare_constant(VM_Version::CPU_AVX512_VPCLMULQDQ) \ + declare_constant(VM_Version::CPU_AVX512_VAES) \ + declare_constant(VM_Version::CPU_AVX512_VNNI) \ + declare_constant(VM_Version::CPU_FLUSH) \ + declare_constant(VM_Version::CPU_FLUSHOPT) \ + declare_constant(VM_Version::CPU_CLWB) \ + declare_constant(VM_Version::CPU_AVX512_VBMI2) \ + declare_constant(VM_Version::CPU_AVX512_VBMI) \ + declare_constant(VM_Version::CPU_HV) #endif @@ -823,7 +825,6 @@ #define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function) #endif - // // Instantiation of VMStructEntries, VMTypeEntries and VMIntConstantEntries // diff --git a/src/hotspot/share/jvmci/vmSymbols_jvmci.hpp b/src/hotspot/share/jvmci/vmSymbols_jvmci.hpp index dfbd0bb89c7..4d0b167bb43 100644 --- a/src/hotspot/share/jvmci/vmSymbols_jvmci.hpp +++ b/src/hotspot/share/jvmci/vmSymbols_jvmci.hpp @@ -92,6 +92,7 @@ template(jdk_vm_ci_code_site_DataSectionReference, "jdk/vm/ci/code/site/DataSectionReference") \ template(jdk_vm_ci_code_site_ExceptionHandler, "jdk/vm/ci/code/site/ExceptionHandler") \ template(jdk_vm_ci_code_site_Mark, "jdk/vm/ci/code/site/Mark") \ + template(jdk_vm_ci_code_site_ImplicitExceptionDispatch, "jdk/vm/ci/code/site/ImplicitExceptionDispatch") \ template(jdk_vm_ci_code_site_Infopoint, "jdk/vm/ci/code/site/Infopoint") \ template(jdk_vm_ci_code_stack_InspectedFrameVisitor, "jdk/vm/ci/code/stack/InspectedFrameVisitor") \ template(jdk_vm_ci_code_site_Site, "jdk/vm/ci/code/site/Site") \ diff --git a/src/hotspot/share/logging/logStream.hpp b/src/hotspot/share/logging/logStream.hpp index 2602eeaa6fc..7da8be05dd9 100644 --- a/src/hotspot/share/logging/logStream.hpp +++ b/src/hotspot/share/logging/logStream.hpp @@ -32,8 +32,9 @@ class LogStream : public outputStream { - friend class LogStreamTest_TestLineBufferAllocation_test_vm_Test; // see test/native/logging/test_logStream.cpp - friend class LogStreamTest_TestLineBufferAllocationCap_test_vm_Test; // see test/native/logging/test_logStream.cpp + // see test/hotspot/gtest/logging/test_logStream.cpp + friend class LogStreamTest_TestLineBufferAllocation_vm_Test; + friend class LogStreamTest_TestLineBufferAllocationCap_vm_Test; // Helper class, maintains the line buffer. For small line lengths, // we avoid malloc and use a fixed sized member char array. If LogStream diff --git a/src/hotspot/share/logging/logTag.cpp b/src/hotspot/share/logging/logTag.cpp index 1ab13173854..a4cd535cf7a 100644 --- a/src/hotspot/share/logging/logTag.cpp +++ b/src/hotspot/share/logging/logTag.cpp @@ -26,9 +26,8 @@ #include "utilities/stringUtils.hpp" #include "utilities/globalDefinitions.hpp" #include "utilities/ostream.hpp" -#include "utilities/quickSort.hpp" -const char* LogTag::_name[] = { +const char* const LogTag::_name[] = { "", // __NO_TAG #define LOG_TAG(name) #name, LOG_TAG_LIST @@ -60,28 +59,30 @@ LogTagType LogTag::fuzzy_match(const char *str) { return match; } -static int cmp_logtag(LogTagType a, LogTagType b) { - return strcmp(LogTag::name(a), LogTag::name(b)); +void LogTag::list_tags(outputStream* out) { + for (size_t i = 1; i < LogTag::Count; i++) { // Not including __NO_TAG + out->print("%s %s", (i == 1 ? "" : ","), _name[static_cast<LogTagType>(i)]); + } + out->cr(); } -static const size_t sorted_tagcount = LogTag::Count - 1; // Not counting _NO_TAG -static LogTagType sorted_tags[sorted_tagcount]; - -class TagSorter { +#ifdef ASSERT +class LogTagTypeChecker { public: - TagSorter() { - for (size_t i = 1; i < LogTag::Count; i++) { - sorted_tags[i - 1] = static_cast<LogTagType>(i); + LogTagTypeChecker() { + assert(LogTagType::__NO_TAG == static_cast<LogTagType>(0), "First tag should be __NO_TAG"); + + // assert the LogTag type enum is sorted + for (size_t i = 1; i < LogTag::Count - 1; i++) { + const char* a = LogTag::name(static_cast<LogTagType>(i)); + const char* b = LogTag::name(static_cast<LogTagType>(i + 1)); + + assert(strcmp(a, b) < 0, + "LogTag type not in alphabetical order at index %zu: %s should be after %s", + i, a, b); } - QuickSort::sort(sorted_tags, sorted_tagcount, cmp_logtag, true); } }; -static TagSorter tagsorter; // Sorts tags during static initialization - -void LogTag::list_tags(outputStream* out) { - for (size_t i = 0; i < sorted_tagcount; i++) { - out->print("%s %s", (i == 0 ? "" : ","), _name[sorted_tags[i]]); - } - out->cr(); -} +static LogTagTypeChecker logtagtypechecker; // Assert LogTag tags are set up as expected during static initialization +#endif // ASSERT diff --git a/src/hotspot/share/logging/logTag.hpp b/src/hotspot/share/logging/logTag.hpp index 378e7e0c11c..76689089bef 100644 --- a/src/hotspot/share/logging/logTag.hpp +++ b/src/hotspot/share/logging/logTag.hpp @@ -27,15 +27,16 @@ #include "memory/allocation.hpp" #include "utilities/globalDefinitions.hpp" -// List of available logging tags. New tags should be added here. +// List of available logging tags. New tags should be added here, in +// alphabetical order. // (The tags 'all', 'disable' and 'help' are special tags that can // not be used in log calls, and should not be listed below.) #define LOG_TAG_LIST \ LOG_TAG(add) \ LOG_TAG(age) \ LOG_TAG(alloc) \ - LOG_TAG(aot) \ LOG_TAG(annotation) \ + LOG_TAG(aot) \ LOG_TAG(arguments) \ LOG_TAG(attach) \ LOG_TAG(barrier) \ @@ -53,8 +54,8 @@ LOG_TAG(compaction) \ LOG_TAG(compilation) \ LOG_TAG(condy) \ - LOG_TAG(constraints) \ LOG_TAG(constantpool) \ + LOG_TAG(constraints) \ LOG_TAG(container) \ LOG_TAG(coops) \ LOG_TAG(cpu) \ @@ -101,10 +102,11 @@ LOG_TAG(marking) \ LOG_TAG(membername) \ LOG_TAG(memops) \ - LOG_TAG(methodcomparator) \ LOG_TAG(metadata) \ LOG_TAG(metaspace) \ + LOG_TAG(methodcomparator) \ LOG_TAG(methodhandles) \ + LOG_TAG(mirror) \ LOG_TAG(mmu) \ LOG_TAG(module) \ LOG_TAG(monitorinflation) \ @@ -123,27 +125,27 @@ LOG_TAG(os) \ LOG_TAG(owner) \ LOG_TAG(pagesize) \ + LOG_TAG(parser) \ LOG_TAG(patch) \ LOG_TAG(path) \ LOG_TAG(perf) \ LOG_TAG(periodic) \ LOG_TAG(phases) \ LOG_TAG(plab) \ + LOG_TAG(preorder) /* Trace all classes loaded in order referenced (not loaded) */ \ LOG_TAG(preview) /* Trace loading of preview feature types */ \ LOG_TAG(primitivewrappers) \ LOG_TAG(promotion) \ - LOG_TAG(preorder) /* Trace all classes loaded in order referenced (not loaded) */ \ LOG_TAG(protectiondomain) /* "Trace protection domain verification" */ \ - LOG_TAG(ref) \ + LOG_TAG(ptrqueue) \ + LOG_TAG(purge) \ + LOG_TAG(record) \ LOG_TAG(redefine) \ + LOG_TAG(ref) \ LOG_TAG(refine) \ LOG_TAG(region) \ LOG_TAG(reloc) \ LOG_TAG(remset) \ - LOG_TAG(parser) \ - LOG_TAG(ptrqueue) \ - LOG_TAG(purge) \ - LOG_TAG(record) \ LOG_TAG(resolve) \ LOG_TAG(safepoint) \ LOG_TAG(sampling) \ @@ -151,6 +153,7 @@ LOG_TAG(sealed) \ LOG_TAG(setting) \ LOG_TAG(smr) \ + LOG_TAG(stackmap) \ LOG_TAG(stacktrace) \ LOG_TAG(stackwalk) \ LOG_TAG(start) \ @@ -160,24 +163,22 @@ LOG_TAG(streaming) \ LOG_TAG(stringdedup) \ LOG_TAG(stringtable) \ - LOG_TAG(symboltable) \ - LOG_TAG(stackmap) \ LOG_TAG(subclass) \ LOG_TAG(survivor) \ LOG_TAG(sweep) \ + LOG_TAG(symboltable) \ LOG_TAG(system) \ LOG_TAG(table) \ LOG_TAG(task) \ DEBUG_ONLY(LOG_TAG(test)) \ LOG_TAG(thread) \ - LOG_TAG(tlab) \ LOG_TAG(time) \ LOG_TAG(timer) \ + LOG_TAG(tlab) \ LOG_TAG(tracking) \ - LOG_TAG(update) \ LOG_TAG(unload) /* Trace unloading of classes */ \ LOG_TAG(unshareable) \ - LOG_TAG(mirror) \ + LOG_TAG(update) \ LOG_TAG(valuetypes) \ LOG_TAG(verification) \ LOG_TAG(verify) \ @@ -228,7 +229,7 @@ class LogTag : public AllStatic { static void list_tags(outputStream* out); private: - static const char* _name[]; + static const char* const _name[]; }; typedef LogTag::type LogTagType; diff --git a/src/hotspot/share/memory/allocation.hpp b/src/hotspot/share/memory/allocation.hpp index 4471c4e18ca..6766bd2021a 100644 --- a/src/hotspot/share/memory/allocation.hpp +++ b/src/hotspot/share/memory/allocation.hpp @@ -151,15 +151,21 @@ class AllocatedObj { /* * Memory types */ -enum MemoryType { +enum class MEMFLAGS { MEMORY_TYPES_DO(MEMORY_TYPE_DECLARE_ENUM) mtValueTypes, // memory for buffered value types mt_number_of_types // number of memory types (mtDontTrack // is not included as validate type) }; -typedef MemoryType MEMFLAGS; +#define MEMORY_TYPE_SHORTNAME(type, human_readable) \ + constexpr MEMFLAGS type = MEMFLAGS::type; +// Generate short aliases for the enum values. E.g. mtGC instead of MEMFLAGS::mtGC. +MEMORY_TYPES_DO(MEMORY_TYPE_SHORTNAME) + +// Make an int version of the sentinel end value. +constexpr int mt_number_of_types = static_cast<int>(MEMFLAGS::mt_number_of_types); #if INCLUDE_NMT diff --git a/src/hotspot/share/memory/allocation.inline.hpp b/src/hotspot/share/memory/allocation.inline.hpp index ccec420a286..fb62038ed1b 100644 --- a/src/hotspot/share/memory/allocation.inline.hpp +++ b/src/hotspot/share/memory/allocation.inline.hpp @@ -55,9 +55,8 @@ size_t MmapArrayAllocator<E>::size_for(size_t length) { template <class E> E* MmapArrayAllocator<E>::allocate_or_null(size_t length, MEMFLAGS flags) { size_t size = size_for(length); - int alignment = os::vm_allocation_granularity(); - char* addr = os::reserve_memory(size, NULL, alignment, flags); + char* addr = os::reserve_memory(size, flags); if (addr == NULL) { return NULL; } @@ -73,9 +72,8 @@ E* MmapArrayAllocator<E>::allocate_or_null(size_t length, MEMFLAGS flags) { template <class E> E* MmapArrayAllocator<E>::allocate(size_t length, MEMFLAGS flags) { size_t size = size_for(length); - int alignment = os::vm_allocation_granularity(); - char* addr = os::reserve_memory(size, NULL, alignment, flags); + char* addr = os::reserve_memory(size, flags); if (addr == NULL) { vm_exit_out_of_memory(size, OOM_MMAP_ERROR, "Allocator (reserve)"); } diff --git a/src/hotspot/share/memory/archiveBuilder.cpp b/src/hotspot/share/memory/archiveBuilder.cpp index cd2144fbca4..d46e279a96c 100644 --- a/src/hotspot/share/memory/archiveBuilder.cpp +++ b/src/hotspot/share/memory/archiveBuilder.cpp @@ -41,6 +41,7 @@ #include "utilities/hashtable.inline.hpp" ArchiveBuilder* ArchiveBuilder::_singleton = NULL; +intx ArchiveBuilder::_buffer_to_target_delta = 0; ArchiveBuilder::OtherROAllocMark::~OtherROAllocMark() { char* newtop = ArchiveBuilder::singleton()->_ro_region->top(); @@ -454,7 +455,6 @@ void ArchiveBuilder::make_shallow_copy(DumpRegion *dump_region, SourceObjInfo* s address src = ref->obj(); int bytes = src_info->size_in_bytes(); char* dest; - size_t alignment = BytesPerWord; char* oldtop; char* newtop; @@ -467,10 +467,10 @@ void ArchiveBuilder::make_shallow_copy(DumpRegion *dump_region, SourceObjInfo* s Klass* klass = (Klass*)src; if (klass->is_instance_klass()) { SystemDictionaryShared::validate_before_archiving(InstanceKlass::cast(klass)); - dump_region->allocate(sizeof(address), BytesPerWord); + dump_region->allocate(sizeof(address)); } } - dest = dump_region->allocate(bytes, alignment); + dest = dump_region->allocate(bytes); newtop = dump_region->top(); memcpy(dest, src, bytes); @@ -575,6 +575,34 @@ void ArchiveBuilder::relocate_well_known_klasses() { SystemDictionary::well_known_klasses_do(&doit); } +void ArchiveBuilder::make_klasses_shareable() { + for (int i = 0; i < klasses()->length(); i++) { + Klass* k = klasses()->at(i); + k->remove_java_mirror(); + if (k->is_objArray_klass()) { + // InstanceKlass and TypeArrayKlass will in turn call remove_unshareable_info + // on their array classes. + } else if (k->is_typeArray_klass()) { + k->remove_unshareable_info(); + } else { + assert(k->is_instance_klass(), " must be"); + InstanceKlass* ik = InstanceKlass::cast(k); + if (DynamicDumpSharedSpaces) { + // For static dump, class loader type are already set. + ik->assign_class_loader_type(); + } + + MetaspaceShared::rewrite_nofast_bytecodes_and_calculate_fingerprints(Thread::current(), ik); + ik->remove_unshareable_info(); + + if (log_is_enabled(Debug, cds, class)) { + ResourceMark rm; + log_debug(cds, class)("klasses[%4d] = " PTR_FORMAT " %s", i, p2i(to_target(ik)), ik->external_name()); + } + } + } +} + void ArchiveBuilder::print_stats(int ro_all, int rw_all, int mc_all) { _alloc_stats->print_stats(ro_all, rw_all, mc_all); } diff --git a/src/hotspot/share/memory/archiveBuilder.hpp b/src/hotspot/share/memory/archiveBuilder.hpp index aada366118f..09243561ea0 100644 --- a/src/hotspot/share/memory/archiveBuilder.hpp +++ b/src/hotspot/share/memory/archiveBuilder.hpp @@ -198,6 +198,37 @@ class ArchiveBuilder : public StackObj { _ro_region = ro_region; } +protected: + DumpRegion* _current_dump_space; + address _alloc_bottom; + + DumpRegion* current_dump_space() const { return _current_dump_space; } + +public: + void set_current_dump_space(DumpRegion* r) { _current_dump_space = r; } + + bool is_in_buffer_space(address p) const { + return (_alloc_bottom <= p && p < (address)current_dump_space()->top()); + } + + template <typename T> bool is_in_target_space(T target_obj) const { + address buff_obj = address(target_obj) - _buffer_to_target_delta; + return is_in_buffer_space(buff_obj); + } + + template <typename T> bool is_in_buffer_space(T obj) const { + return is_in_buffer_space(address(obj)); + } + + template <typename T> T to_target_no_check(T obj) const { + return (T)(address(obj) + _buffer_to_target_delta); + } + + template <typename T> T to_target(T obj) const { + assert(is_in_buffer_space(obj), "must be"); + return (T)(address(obj) + _buffer_to_target_delta); + } + public: ArchiveBuilder(DumpRegion* rw_region, DumpRegion* ro_region); ~ArchiveBuilder(); @@ -215,7 +246,7 @@ class ArchiveBuilder : public StackObj { void dump_ro_region(); void relocate_pointers(); void relocate_well_known_klasses(); - + void make_klasses_shareable(); address get_dumped_addr(address src_obj) const; // All klasses and symbols that will be copied into the archive @@ -242,6 +273,7 @@ class ArchiveBuilder : public StackObj { } void print_stats(int ro_all, int rw_all, int mc_all); + static intx _buffer_to_target_delta; }; #endif // SHARE_MEMORY_ARCHIVEBUILDER_HPP diff --git a/src/hotspot/share/memory/archiveUtils.cpp b/src/hotspot/share/memory/archiveUtils.cpp index cb8982b279b..b30ec8b4575 100644 --- a/src/hotspot/share/memory/archiveUtils.cpp +++ b/src/hotspot/share/memory/archiveUtils.cpp @@ -37,6 +37,10 @@ address* ArchivePtrMarker::_ptr_base; address* ArchivePtrMarker::_ptr_end; bool ArchivePtrMarker::_compacted; +// Metaspace::allocate() requires that all blocks must be aligned with KlassAlignmentInBytes. +// We enforce the same alignment rule in blocks allocated from the shared space. +const int SharedSpaceObjectAlignment = KlassAlignmentInBytes; + void ArchivePtrMarker::initialize(CHeapBitMap* ptrmap, address* ptr_base, address* ptr_end) { assert(_ptrmap == NULL, "initialize only once"); _ptr_base = ptr_base; @@ -165,9 +169,9 @@ char* DumpRegion::expand_top_to(char* newtop) { return _top; } -char* DumpRegion::allocate(size_t num_bytes, size_t alignment) { - char* p = (char*)align_up(_top, alignment); - char* newtop = p + align_up(num_bytes, alignment); +char* DumpRegion::allocate(size_t num_bytes) { + char* p = (char*)align_up(_top, (size_t)SharedSpaceObjectAlignment); + char* newtop = p + align_up(num_bytes, (size_t)SharedSpaceObjectAlignment); expand_top_to(newtop); memset(p, 0, newtop - p); return p; @@ -271,8 +275,8 @@ void ReadClosure::do_tag(int tag) { } void ReadClosure::do_oop(oop *p) { - narrowOop o = (narrowOop)nextPtr(); - if (o == 0 || !HeapShared::open_archive_heap_region_mapped()) { + narrowOop o = CompressedOops::narrow_oop_cast(nextPtr()); + if (CompressedOops::is_null(o) || !HeapShared::open_archive_heap_region_mapped()) { *p = NULL; } else { assert(HeapShared::is_heap_object_archiving_allowed(), diff --git a/src/hotspot/share/memory/archiveUtils.hpp b/src/hotspot/share/memory/archiveUtils.hpp index 3bec3784bb2..68cd060cef4 100644 --- a/src/hotspot/share/memory/archiveUtils.hpp +++ b/src/hotspot/share/memory/archiveUtils.hpp @@ -157,7 +157,7 @@ class DumpRegion { DumpRegion(const char* name) : _name(name), _base(NULL), _top(NULL), _end(NULL), _is_packed(false) {} char* expand_top_to(char* newtop); - char* allocate(size_t num_bytes, size_t alignment=BytesPerWord); + char* allocate(size_t num_bytes); void append_intptr_t(intptr_t n, bool need_to_mark = false); diff --git a/src/hotspot/share/memory/cppVtables.cpp b/src/hotspot/share/memory/cppVtables.cpp index 44a7df87c8d..6cad96c5e7a 100644 --- a/src/hotspot/share/memory/cppVtables.cpp +++ b/src/hotspot/share/memory/cppVtables.cpp @@ -121,7 +121,7 @@ template <class T> intptr_t* CppVtableCloner<T>::allocate(const char* name) { assert(is_aligned(mc_region()->top(), sizeof(intptr_t)), "bad alignment"); int n = get_vtable_length(name); - _info = (CppVtableInfo*)mc_region()->allocate(CppVtableInfo::byte_size(n), sizeof(intptr_t)); + _info = (CppVtableInfo*)mc_region()->allocate(CppVtableInfo::byte_size(n)); _info->set_vtable_size(n); intptr_t* p = clone_vtable(name, _info); @@ -246,7 +246,7 @@ static intptr_t** _cloned_cpp_vtptrs = NULL; void CppVtables::allocate_cloned_cpp_vtptrs() { assert(DumpSharedSpaces, "must"); size_t vtptrs_bytes = _num_cloned_vtable_kinds * sizeof(intptr_t*); - _cloned_cpp_vtptrs = (intptr_t**)mc_region()->allocate(vtptrs_bytes, sizeof(intptr_t*)); + _cloned_cpp_vtptrs = (intptr_t**)mc_region()->allocate(vtptrs_bytes); } void CppVtables::serialize_cloned_cpp_vtptrs(SerializeClosure* soc) { diff --git a/src/hotspot/share/memory/dynamicArchive.cpp b/src/hotspot/share/memory/dynamicArchive.cpp index f45ab9cd3fa..15b0c829fdd 100644 --- a/src/hotspot/share/memory/dynamicArchive.cpp +++ b/src/hotspot/share/memory/dynamicArchive.cpp @@ -44,8 +44,6 @@ class DynamicArchiveBuilder : public ArchiveBuilder { public: - static intx _buffer_to_target_delta; - DumpRegion* _current_dump_space; static size_t reserve_alignment() { return os::vm_allocation_granularity(); @@ -59,32 +57,6 @@ class DynamicArchiveBuilder : public ArchiveBuilder { ArchivePtrMarker::mark_pointer(ptr_loc); } - DumpRegion* current_dump_space() const { - return _current_dump_space; - } - - bool is_in_buffer_space(address p) const { - return (_alloc_bottom <= p && p < (address)current_dump_space()->top()); - } - - template <typename T> bool is_in_target_space(T target_obj) const { - address buff_obj = address(target_obj) - _buffer_to_target_delta; - return is_in_buffer_space(buff_obj); - } - - template <typename T> bool is_in_buffer_space(T obj) const { - return is_in_buffer_space(address(obj)); - } - - template <typename T> T to_target_no_check(T obj) const { - return (T)(address(obj) + _buffer_to_target_delta); - } - - template <typename T> T to_target(T obj) const { - assert(is_in_buffer_space(obj), "must be"); - return (T)(address(obj) + _buffer_to_target_delta); - } - template <typename T> T get_dumped_addr(T obj) { return (T)ArchiveBuilder::get_dumped_addr((address)obj); } @@ -113,7 +85,6 @@ class DynamicArchiveBuilder : public ArchiveBuilder { public: DynamicArchiveHeader *_header; - address _alloc_bottom; address _last_verified_top; size_t _other_region_used_bytes; @@ -128,7 +99,7 @@ class DynamicArchiveBuilder : public ArchiveBuilder { void init_header(address addr); void release_header(); void make_trampolines(); - void make_klasses_shareable(); + void sort_methods(); void sort_methods(InstanceKlass* ik) const; void remark_pointers_for_instance_klass(InstanceKlass* k, bool should_mark) const; void relocate_buffer_to_target(); @@ -250,6 +221,7 @@ class DynamicArchiveBuilder : public ArchiveBuilder { verify_estimate_size(_estimated_hashtable_bytes, "Hashtables"); make_trampolines(); + sort_methods(); log_info(cds)("Make classes shareable"); make_klasses_shareable(); @@ -275,8 +247,6 @@ class DynamicArchiveBuilder : public ArchiveBuilder { } }; -intx DynamicArchiveBuilder::_buffer_to_target_delta; - size_t DynamicArchiveBuilder::estimate_archive_size() { // size of the symbol table and two dictionaries, plus the RunTimeSharedClassInfo's _estimated_hashtable_bytes = 0; @@ -420,35 +390,14 @@ void DynamicArchiveBuilder::make_trampolines() { guarantee(p <= mc_space->top(), "Estimate of trampoline size is insufficient"); } -void DynamicArchiveBuilder::make_klasses_shareable() { - int i, count = klasses()->length(); - +void DynamicArchiveBuilder::sort_methods() { InstanceKlass::disable_method_binary_search(); - for (i = 0; i < count; i++) { + for (int i = 0; i < klasses()->length(); i++) { Klass* k = klasses()->at(i); if (k->is_instance_klass()) { sort_methods(InstanceKlass::cast(k)); } } - - for (i = 0; i < count; i++) { - Klass* k = klasses()->at(i); - if (!k->is_instance_klass()) { - continue; - } - InstanceKlass* ik = InstanceKlass::cast(k); - ik->assign_class_loader_type(); - - MetaspaceShared::rewrite_nofast_bytecodes_and_calculate_fingerprints(Thread::current(), ik); - ik->remove_unshareable_info(); - - assert(ik->array_klasses() == NULL, "sanity"); - - if (log_is_enabled(Debug, cds, dynamic)) { - ResourceMark rm; - log_debug(cds, dynamic)("klasses[%4i] = " PTR_FORMAT " %s", i, p2i(to_target(ik)), ik->external_name()); - } - } } // The address order of the copied Symbols may be different than when the original diff --git a/src/hotspot/share/memory/filemap.cpp b/src/hotspot/share/memory/filemap.cpp index 2ac796751da..f61875e7d91 100644 --- a/src/hotspot/share/memory/filemap.cpp +++ b/src/hotspot/share/memory/filemap.cpp @@ -50,6 +50,7 @@ #include "oops/oop.inline.hpp" #include "prims/jvmtiExport.hpp" #include "runtime/arguments.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/java.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/os.inline.hpp" @@ -1662,8 +1663,7 @@ size_t FileMapInfo::read_bytes(void* buffer, size_t count) { address FileMapInfo::decode_start_address(FileMapRegion* spc, bool with_current_oop_encoding_mode) { size_t offset = spc->mapping_offset(); - assert(offset == (size_t)(uint32_t)offset, "must be 32-bit only"); - uint n = (uint)offset; + narrowOop n = CompressedOops::narrow_oop_cast(offset); if (with_current_oop_encoding_mode) { return cast_from_oop<address>(CompressedOops::decode_not_null(n)); } else { diff --git a/src/hotspot/share/memory/heap.cpp b/src/hotspot/share/memory/heap.cpp index 38157d69d4e..2db317b5a87 100644 --- a/src/hotspot/share/memory/heap.cpp +++ b/src/hotspot/share/memory/heap.cpp @@ -205,6 +205,7 @@ bool CodeHeap::reserve(ReservedSpace rs, size_t committed_size, size_t segment_s assert(rs.size() >= committed_size, "reserved < committed"); assert(segment_size >= sizeof(FreeBlock), "segment size is too small"); assert(is_power_of_2(segment_size), "segment_size must be a power of 2"); + assert_locked_or_safepoint(CodeCache_lock); _segment_size = segment_size; _log2_segment_size = exact_log2(segment_size); @@ -253,6 +254,8 @@ bool CodeHeap::reserve(ReservedSpace rs, size_t committed_size, size_t segment_s bool CodeHeap::expand_by(size_t size) { + assert_locked_or_safepoint(CodeCache_lock); + // expand _memory space size_t dm = align_to_page_size(_memory.committed_size() + size) - _memory.committed_size(); if (dm > 0) { @@ -283,6 +286,7 @@ bool CodeHeap::expand_by(size_t size) { void* CodeHeap::allocate(size_t instance_size) { size_t number_of_segments = size_to_segments(instance_size + header_size()); assert(segments_to_size(number_of_segments) >= sizeof(FreeBlock), "not enough room for FreeList"); + assert_locked_or_safepoint(CodeCache_lock); // First check if we can satisfy request from freelist NOT_PRODUCT(verify()); @@ -347,6 +351,8 @@ HeapBlock* CodeHeap::split_block(HeapBlock *b, size_t split_at) { void CodeHeap::deallocate_tail(void* p, size_t used_size) { assert(p == find_start(p), "illegal deallocation"); + assert_locked_or_safepoint(CodeCache_lock); + // Find start of HeapBlock HeapBlock* b = (((HeapBlock *)p) - 1); assert(b->allocated_space() == p, "sanity check"); @@ -363,6 +369,8 @@ void CodeHeap::deallocate_tail(void* p, size_t used_size) { void CodeHeap::deallocate(void* p) { assert(p == find_start(p), "illegal deallocation"); + assert_locked_or_safepoint(CodeCache_lock); + // Find start of HeapBlock HeapBlock* b = (((HeapBlock *)p) - 1); assert(b->allocated_space() == p, "sanity check"); @@ -790,6 +798,7 @@ void CodeHeap::print() { void CodeHeap::verify() { if (VerifyCodeCache) { + assert_locked_or_safepoint(CodeCache_lock); size_t len = 0; int count = 0; for(FreeBlock* b = _freelist; b != NULL; b = b->link()) { diff --git a/src/hotspot/share/memory/heapShared.cpp b/src/hotspot/share/memory/heapShared.cpp index dfd398db138..1d9821300f4 100644 --- a/src/hotspot/share/memory/heapShared.cpp +++ b/src/hotspot/share/memory/heapShared.cpp @@ -36,6 +36,7 @@ #include "logging/log.hpp" #include "logging/logMessage.hpp" #include "logging/logStream.hpp" +#include "memory/archiveBuilder.hpp" #include "memory/archiveUtils.hpp" #include "memory/filemap.hpp" #include "memory/heapShared.inline.hpp" @@ -191,7 +192,7 @@ oop HeapShared::archive_heap_object(oop obj, Thread* THREAD) { // identity_hash for all shared objects, so they are less likely to be written // into during run time, increasing the potential of memory sharing. int hash_original = obj->identity_hash(); - archived_oop->set_mark_raw(markWord::prototype().copy_set_hash(hash_original)); + archived_oop->set_mark(markWord::prototype().copy_set_hash(hash_original)); assert(archived_oop->mark().is_unlocked(), "sanity"); DEBUG_ONLY(int hash_archived = archived_oop->identity_hash()); @@ -382,7 +383,7 @@ void KlassSubGraphInfo::add_subgraph_entry_field( new(ResourceObj::C_HEAP, mtClass) GrowableArray<juint>(10, mtClass); } _subgraph_entry_fields->append((juint)static_field_offset); - _subgraph_entry_fields->append(CompressedOops::encode(v)); + _subgraph_entry_fields->append(CompressedOops::narrow_oop_value(v)); _subgraph_entry_fields->append(is_closed_archive ? 1 : 0); } @@ -398,7 +399,7 @@ void KlassSubGraphInfo::add_subgraph_object_klass(Klass* orig_k, Klass *relocate new(ResourceObj::C_HEAP, mtClass) GrowableArray<Klass*>(50, mtClass); } - assert(relocated_k->is_shared(), "must be a shared class"); + assert(ArchiveBuilder::singleton()->is_in_buffer_space(relocated_k), "must be a shared class"); if (_k == relocated_k) { // Don't add the Klass containing the sub-graph to it's own klass @@ -590,7 +591,7 @@ void HeapShared::initialize_from_archived_subgraph(Klass* k, TRAPS) { assert(efr_len % 3 == 0, "sanity"); for (i = 0; i < efr_len;) { int field_offset = entry_field_records->at(i); - narrowOop nv = entry_field_records->at(i+1); + narrowOop nv = CompressedOops::narrow_oop_cast(entry_field_records->at(i+1)); int is_closed_archive = entry_field_records->at(i+2); oop v; if (is_closed_archive == 0) { diff --git a/src/hotspot/share/memory/iterator.hpp b/src/hotspot/share/memory/iterator.hpp index c4ea162e334..e9ddc974046 100644 --- a/src/hotspot/share/memory/iterator.hpp +++ b/src/hotspot/share/memory/iterator.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -44,7 +44,7 @@ class Thread; class Closure : public StackObj { }; // Thread iterator -class ThreadClosure: public Closure { +class ThreadClosure { public: virtual void do_thread(Thread* thread) = 0; }; diff --git a/src/hotspot/share/memory/metaspace.cpp b/src/hotspot/share/memory/metaspace.cpp index 9f5a36bbdf9..bf8a21f40ca 100644 --- a/src/hotspot/share/memory/metaspace.cpp +++ b/src/hotspot/share/memory/metaspace.cpp @@ -42,6 +42,7 @@ #include "oops/compressedOops.hpp" #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/init.hpp" #include "services/memTracker.hpp" #include "utilities/copy.hpp" diff --git a/src/hotspot/share/memory/metaspaceShared.cpp b/src/hotspot/share/memory/metaspaceShared.cpp index 84af76938ca..68c2ac253ad 100644 --- a/src/hotspot/share/memory/metaspaceShared.cpp +++ b/src/hotspot/share/memory/metaspaceShared.cpp @@ -546,30 +546,6 @@ GrowableArray<Klass*>* MetaspaceShared::collected_klasses() { return _global_klass_objects; } -static void remove_unshareable_in_classes() { - for (int i = 0; i < _global_klass_objects->length(); i++) { - Klass* k = _global_klass_objects->at(i); - if (!k->is_objArray_klass()) { - // InstanceKlass and TypeArrayKlass will in turn call remove_unshareable_info - // on their array classes. - assert(k->is_instance_klass() || k->is_typeArray_klass(), "must be"); - k->remove_unshareable_info(); - } - } -} - -static void remove_java_mirror_in_classes() { - for (int i = 0; i < _global_klass_objects->length(); i++) { - Klass* k = _global_klass_objects->at(i); - if (!k->is_objArray_klass()) { - // InstanceKlass and TypeArrayKlass will in turn call remove_unshareable_info - // on their array classes. - assert(k->is_instance_klass() || k->is_typeArray_klass(), "must be"); - k->remove_java_mirror(); - } - } -} - static void rewrite_nofast_bytecode(const methodHandle& method) { BytecodeStream bcs(method); while (!bcs.is_last_bytecode()) { @@ -589,21 +565,9 @@ static void rewrite_nofast_bytecode(const methodHandle& method) { } } -// Walk all methods in the class list to ensure that they won't be modified at -// run time. This includes: // [1] Rewrite all bytecodes as needed, so that the ConstMethod* will not be modified // at run time by RewriteBytecodes/RewriteFrequentPairs // [2] Assign a fingerprint, so one doesn't need to be assigned at run-time. -static void rewrite_nofast_bytecodes_and_calculate_fingerprints(Thread* thread) { - for (int i = 0; i < _global_klass_objects->length(); i++) { - Klass* k = _global_klass_objects->at(i); - if (k->is_instance_klass()) { - InstanceKlass* ik = InstanceKlass::cast(k); - MetaspaceShared::rewrite_nofast_bytecodes_and_calculate_fingerprints(thread, ik); - } - } -} - void MetaspaceShared::rewrite_nofast_bytecodes_and_calculate_fingerprints(Thread* thread, InstanceKlass* ik) { for (int i = 0; i < ik->methods()->length(); i++) { methodHandle m(thread, ik->methods()->at(i)); @@ -647,7 +611,10 @@ class VM_PopulateDumpSharedSpace: public VM_Operation { class StaticArchiveBuilder : public ArchiveBuilder { public: StaticArchiveBuilder(DumpRegion* rw_region, DumpRegion* ro_region) - : ArchiveBuilder(rw_region, ro_region) {} + : ArchiveBuilder(rw_region, ro_region) { + _alloc_bottom = address(SharedBaseAddress); + _buffer_to_target_delta = 0; + } virtual void iterate_roots(MetaspaceClosure* it, bool is_relocating_pointers) { FileMapInfo::metaspace_pointers_do(it, false); @@ -671,13 +638,6 @@ class StaticArchiveBuilder : public ArchiveBuilder { char* VM_PopulateDumpSharedSpace::dump_read_only_tables() { ArchiveBuilder::OtherROAllocMark mark; - log_info(cds)("Removing java_mirror ... "); - if (!HeapShared::is_heap_object_archiving_allowed()) { - Universe::clear_basic_type_mirrors(); - } - remove_java_mirror_in_classes(); - log_info(cds)("done. "); - SystemDictionaryShared::write_to_archive(); // Write the other data to the output array. @@ -767,19 +727,10 @@ void VM_PopulateDumpSharedSpace::doit() { SystemDictionaryShared::check_excluded_classes(); StaticArchiveBuilder builder(&_rw_region, &_ro_region); + builder.set_current_dump_space(&_mc_region); builder.gather_klasses_and_symbols(); _global_klass_objects = builder.klasses(); - // Ensure the ConstMethods won't be modified at run-time - log_info(cds)("Updating ConstMethods ... "); - rewrite_nofast_bytecodes_and_calculate_fingerprints(THREAD); - log_info(cds)("done. "); - - // Remove all references outside the metadata - log_info(cds)("Removing unshareable information ... "); - remove_unshareable_in_classes(); - log_info(cds)("done. "); - builder.gather_source_objs(); CppVtables::allocate_cloned_cpp_vtptrs(); @@ -788,6 +739,7 @@ void VM_PopulateDumpSharedSpace::doit() { { _mc_region.pack(&_rw_region); + builder.set_current_dump_space(&_rw_region); builder.dump_rw_region(); #if INCLUDE_CDS_JAVA_HEAP if (MetaspaceShared::use_full_module_graph()) { @@ -800,6 +752,7 @@ void VM_PopulateDumpSharedSpace::doit() { } { _rw_region.pack(&_ro_region); + builder.set_current_dump_space(&_ro_region); builder.dump_ro_region(); #if INCLUDE_CDS_JAVA_HEAP if (MetaspaceShared::use_full_module_graph()) { @@ -820,6 +773,9 @@ void VM_PopulateDumpSharedSpace::doit() { builder.relocate_well_known_klasses(); + log_info(cds)("Make classes shareable"); + builder.make_klasses_shareable(); + char* serialized_data = dump_read_only_tables(); _ro_region.pack(); @@ -873,9 +829,9 @@ void VM_PopulateDumpSharedSpace::doit() { "for testing purposes only and should not be used in a production environment"); } - // There may be other pending VM operations that operate on the InstanceKlasses, - // which will fail because InstanceKlasses::remove_unshareable_info() - // has been called. Forget these operations and exit the VM directly. + // There may be pending VM operations. We have changed some global states + // (such as SystemDictionary::_well_known_klasses) that may cause these VM operations + // to fail. For safety, forget these operations and exit the VM directly. vm_direct_exit(0); } @@ -1490,6 +1446,8 @@ MapArchiveResult MetaspaceShared::map_archives(FileMapInfo* static_mapinfo, File // map_heap_regions() compares the current narrow oop and klass encodings // with the archived ones, so it must be done after all encodings are determined. static_mapinfo->map_heap_regions(); + + disable_full_module_graph(); // Disabled temporarily for JDK-8253081 } }); log_info(cds)("optimized module handling: %s", MetaspaceShared::use_optimized_module_handling() ? "enabled" : "disabled"); diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp index deef6097453..3b4f538d2ef 100644 --- a/src/hotspot/share/memory/universe.cpp +++ b/src/hotspot/share/memory/universe.cpp @@ -59,7 +59,7 @@ #include "prims/resolvedMethodTable.hpp" #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" -#include "runtime/flags/jvmFlagConstraintList.hpp" +#include "runtime/flags/jvmFlagLimit.hpp" #include "runtime/handles.inline.hpp" #include "runtime/init.hpp" #include "runtime/java.hpp" @@ -188,15 +188,6 @@ void Universe::replace_mirror(BasicType t, oop new_mirror) { Universe::_mirrors[t].replace(new_mirror); } -// Not sure why CDS has to do this -void Universe::clear_basic_type_mirrors() { - for (int i = T_BOOLEAN; i < T_VOID+1; i++) { - if (!is_reference_type((BasicType)i)) { - Universe::_mirrors[i].replace(NULL); - } - } -} - void Universe::basic_type_classes_do(void f(Klass*)) { for (int i = T_BOOLEAN; i < T_LONG+1; i++) { f(_typeArrayKlassObjs[i]); @@ -251,7 +242,11 @@ void Universe::serialize(SerializeClosure* f) { _mirrors[i] = OopHandle(vm_global(), mirror_oop); } } else { - mirror_oop = _mirrors[i].resolve(); + if (HeapShared::is_heap_object_archiving_allowed()) { + mirror_oop = _mirrors[i].resolve(); + } else { + mirror_oop = NULL; + } f->do_oop(&mirror_oop); // write to archive } if (mirror_oop != NULL) { // may be null if archived heap is disabled @@ -775,7 +770,7 @@ jint universe_init() { AOTLoader::universe_init(); // Checks 'AfterMemoryInit' constraints. - if (!JVMFlagConstraintList::check_constraints(JVMFlagConstraint::AfterMemoryInit)) { + if (!JVMFlagLimit::check_all_constraints(JVMFlagConstraintPhase::AfterMemoryInit)) { return JNI_EINVAL; } @@ -835,8 +830,6 @@ jint Universe::initialize_heap() { void Universe::initialize_tlab() { ThreadLocalAllocBuffer::set_max_size(Universe::heap()->max_tlab_size()); if (UseTLAB) { - assert(Universe::heap()->supports_tlab_allocation(), - "Should support thread-local allocation buffers"); ThreadLocalAllocBuffer::startup_initialization(); } } diff --git a/src/hotspot/share/memory/universe.hpp b/src/hotspot/share/memory/universe.hpp index a565ff82fa4..fb86910a6dd 100644 --- a/src/hotspot/share/memory/universe.hpp +++ b/src/hotspot/share/memory/universe.hpp @@ -236,7 +236,6 @@ class Universe: AllStatic { static oop java_mirror(BasicType t); static void replace_mirror(BasicType t, oop obj); - static void clear_basic_type_mirrors(); static oop main_thread_group(); static void set_main_thread_group(oop group); diff --git a/src/hotspot/share/memory/virtualspace.cpp b/src/hotspot/share/memory/virtualspace.cpp index 7f88f0dcf50..c67e9c1c78f 100644 --- a/src/hotspot/share/memory/virtualspace.cpp +++ b/src/hotspot/share/memory/virtualspace.cpp @@ -29,6 +29,7 @@ #include "oops/compressedOops.hpp" #include "oops/markWord.hpp" #include "oops/oop.inline.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/java.hpp" #include "runtime/os.inline.hpp" #include "services/memTracker.hpp" @@ -178,7 +179,7 @@ void ReservedSpace::initialize(size_t size, size_t alignment, bool large, } if (base == NULL) { - // Optimistically assume that the OSes returns an aligned base pointer. + // Optimistically assume that the OS returns an aligned base pointer. // When reserving a large address range, most OSes seem to align to at // least 64K. @@ -187,13 +188,13 @@ void ReservedSpace::initialize(size_t size, size_t alignment, bool large, // important. If available space is not detected, return NULL. if (requested_address != 0) { - base = os::attempt_reserve_memory_at(size, requested_address, _fd_for_heap); + base = os::attempt_reserve_memory_at(requested_address, size, _fd_for_heap); if (failed_to_reserve_as_requested(base, requested_address, size, false, _fd_for_heap != -1)) { // OS ignored requested address. Try different address. base = NULL; } } else { - base = os::reserve_memory(size, NULL, alignment, _fd_for_heap); + base = os::reserve_memory_with_fd(size, _fd_for_heap); } if (base == NULL) return; @@ -370,18 +371,14 @@ void ReservedHeapSpace::try_reserve_heap(size_t size, log_debug(gc, heap, coops)("Reserve regular memory without large pages"); } - // Optimistically assume that the OSes returns an aligned base pointer. - // When reserving a large address range, most OSes seem to align to at - // least 64K. - - // If the memory was requested at a particular address, use - // os::attempt_reserve_memory_at() to avoid over mapping something - // important. If available space is not detected, return NULL. - if (requested_address != 0) { - base = os::attempt_reserve_memory_at(size, requested_address, _fd_for_heap); + base = os::attempt_reserve_memory_at(requested_address, size, _fd_for_heap); } else { - base = os::reserve_memory(size, NULL, alignment, _fd_for_heap); + // Optimistically assume that the OSes returns an aligned base pointer. + // When reserving a large address range, most OSes seem to align to at + // least 64K. + // If the returned memory is not aligned we will release and retry. + base = os::reserve_memory_with_fd(size, _fd_for_heap); } } if (base == NULL) { return; } diff --git a/src/hotspot/share/oops/access.hpp b/src/hotspot/share/oops/access.hpp index bbb3ba01644..2233c8a971a 100644 --- a/src/hotspot/share/oops/access.hpp +++ b/src/hotspot/share/oops/access.hpp @@ -284,11 +284,6 @@ class Access: public AllStatic { OopType new_oop_value = new_value; return AccessInternal::atomic_xchg<decorators | INTERNAL_VALUE_IS_OOP>(addr, new_oop_value); } - - static oop resolve(oop obj) { - verify_decorators<DECORATORS_NONE>(); - return AccessInternal::resolve<decorators>(obj); - } }; // Helper for performing raw accesses (knows only of memory ordering diff --git a/src/hotspot/share/oops/accessBackend.hpp b/src/hotspot/share/oops/accessBackend.hpp index 8d823315588..cf0aa9a891a 100644 --- a/src/hotspot/share/oops/accessBackend.hpp +++ b/src/hotspot/share/oops/accessBackend.hpp @@ -678,8 +678,7 @@ namespace AccessInternal { template<DecoratorSet decorators> static bool is_hardwired_primitive() { - return !HasDecorator<decorators, INTERNAL_BT_BARRIER_ON_PRIMITIVES>::value && - !HasDecorator<decorators, INTERNAL_VALUE_IS_OOP>::value; + return !HasDecorator<decorators, INTERNAL_VALUE_IS_OOP>::value; } template <DecoratorSet decorators, typename T> @@ -991,22 +990,6 @@ namespace AccessInternal { const DecoratorSet expanded_decorators = decorators; RuntimeDispatch<expanded_decorators, void*, BARRIER_VALUE_COPY>::value_copy(src, dst, md); } - - - template <DecoratorSet decorators> - inline static typename EnableIf< - HasDecorator<decorators, INTERNAL_BT_TO_SPACE_INVARIANT>::value, oop>::type - resolve(oop obj) { - typedef RawAccessBarrier<decorators & RAW_DECORATOR_MASK> Raw; - return Raw::resolve(obj); - } - - template <DecoratorSet decorators> - inline static typename EnableIf< - !HasDecorator<decorators, INTERNAL_BT_TO_SPACE_INVARIANT>::value, oop>::type - resolve(oop obj) { - return RuntimeDispatch<decorators, oop, BARRIER_RESOLVE>::resolve(obj); - } }; // Step 2: Reduce types. @@ -1305,12 +1288,6 @@ namespace AccessInternal { PreRuntimeDispatch::value_copy<expanded_decorators>(src, dst, md); } - template <DecoratorSet decorators> - inline oop resolve(oop obj) { - const DecoratorSet expanded_decorators = DecoratorFixup<decorators>::value; - return PreRuntimeDispatch::resolve<expanded_decorators>(obj); - } - // Infer the type that should be returned from an Access::oop_load. template <typename P, DecoratorSet decorators> class OopLoadProxy: public StackObj { diff --git a/src/hotspot/share/oops/accessBackend.inline.hpp b/src/hotspot/share/oops/accessBackend.inline.hpp index 3187a64dafe..a64a18abb3c 100644 --- a/src/hotspot/share/oops/accessBackend.inline.hpp +++ b/src/hotspot/share/oops/accessBackend.inline.hpp @@ -362,7 +362,7 @@ inline void RawAccessBarrier<decorators>::clone(oop src, oop dst, size_t size) { reinterpret_cast<jlong*>((oopDesc*)dst), align_object_size(size) / HeapWordsPerLong); // Clear the header - dst->init_mark_raw(); + dst->init_mark(); } template <DecoratorSet decorators> diff --git a/src/hotspot/share/oops/accessDecorators.hpp b/src/hotspot/share/oops/accessDecorators.hpp index cc53b717097..dcd48443f79 100644 --- a/src/hotspot/share/oops/accessDecorators.hpp +++ b/src/hotspot/share/oops/accessDecorators.hpp @@ -54,20 +54,13 @@ const DecoratorSet DECORATORS_NONE = UCONST64(0); const DecoratorSet INTERNAL_CONVERT_COMPRESSED_OOP = UCONST64(1) << 1; const DecoratorSet INTERNAL_VALUE_IS_OOP = UCONST64(1) << 2; -// == Internal build-time Decorators == -// * INTERNAL_BT_BARRIER_ON_PRIMITIVES: This is set in the barrierSetConfig.hpp file. -// * INTERNAL_BT_TO_SPACE_INVARIANT: This is set in the barrierSetConfig.hpp file iff -// no GC is bundled in the build that is to-space invariant. -const DecoratorSet INTERNAL_BT_BARRIER_ON_PRIMITIVES = UCONST64(1) << 3; -const DecoratorSet INTERNAL_BT_TO_SPACE_INVARIANT = UCONST64(1) << 4; - // == Internal run-time Decorators == // * INTERNAL_RT_USE_COMPRESSED_OOPS: This decorator will be set in runtime resolved // access backends iff UseCompressedOops is true. const DecoratorSet INTERNAL_RT_USE_COMPRESSED_OOPS = UCONST64(1) << 5; const DecoratorSet INTERNAL_DECORATOR_MASK = INTERNAL_CONVERT_COMPRESSED_OOP | INTERNAL_VALUE_IS_OOP | - INTERNAL_BT_BARRIER_ON_PRIMITIVES | INTERNAL_RT_USE_COMPRESSED_OOPS; + INTERNAL_RT_USE_COMPRESSED_OOPS; // == Memory Ordering Decorators == // The memory ordering decorators can be described in the following way: @@ -241,7 +234,7 @@ namespace AccessInternal { // If no barrier strength has been picked, normal will be used static const DecoratorSet barrier_strength_default = memory_ordering_default | ((AS_DECORATOR_MASK & memory_ordering_default) == 0 ? AS_NORMAL : DECORATORS_NONE); - static const DecoratorSet value = barrier_strength_default | BT_BUILDTIME_DECORATORS; + static const DecoratorSet value = barrier_strength_default; }; // This function implements the above DecoratorFixup rules, but without meta @@ -257,8 +250,7 @@ namespace AccessInternal { // If no barrier strength has been picked, normal will be used DecoratorSet barrier_strength_default = memory_ordering_default | ((AS_DECORATOR_MASK & memory_ordering_default) == 0 ? AS_NORMAL : DECORATORS_NONE); - DecoratorSet value = barrier_strength_default | BT_BUILDTIME_DECORATORS; - return value; + return barrier_strength_default; } } diff --git a/src/hotspot/share/oops/arrayOop.hpp b/src/hotspot/share/oops/arrayOop.hpp index 900bad3ed55..14bf1208445 100644 --- a/src/hotspot/share/oops/arrayOop.hpp +++ b/src/hotspot/share/oops/arrayOop.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -61,6 +61,12 @@ class arrayOopDesc : public oopDesc { return (int)hs; } + // Returns the address of the length "field". See length_offset_in_bytes(). + static int* length_addr_impl(void* obj_ptr) { + char* ptr = static_cast<char*>(obj_ptr); + return reinterpret_cast<int*>(ptr + length_offset_in_bytes()); + } + // Check whether an element of a typeArrayOop with the given type must be // aligned 0 mod 8. The typeArrayOop itself must be aligned at least this // strongly. @@ -85,7 +91,6 @@ class arrayOopDesc : public oopDesc { // Returns the address of the first element. The elements in the array will not // relocate from this address until a subsequent thread transition. inline void* base(BasicType type) const; - inline void* base_raw(BasicType type) const; // GC barrier invariant template <typename T> static T* obj_offset_to_raw(arrayOop obj, size_t offset_in_bytes, T* raw) { @@ -102,16 +107,17 @@ class arrayOopDesc : public oopDesc { // Tells whether index is within bounds. bool is_within_bounds(int index) const { return 0 <= index && index < length(); } - // Accessors for instance variable which is not a C++ declared nonstatic - // field. - int length() const { - return *(int*)(((intptr_t)this) + length_offset_in_bytes()); - } - void set_length(int length) { - set_length((HeapWord*)this, length); + // Accessors for array length. There's not a member variable for + // it; see length_offset_in_bytes(). + int length() const { return *length_addr_impl(const_cast<arrayOopDesc*>(this)); } + void set_length(int length) { *length_addr_impl(this) = length; } + + int* length_addr() { + return length_addr_impl(this); } + static void set_length(HeapWord* mem, int length) { - *(int*)(((char*)mem) + length_offset_in_bytes()) = length; + *length_addr_impl(mem) = length; } // Should only be called with constants as argument diff --git a/src/hotspot/share/oops/arrayOop.inline.hpp b/src/hotspot/share/oops/arrayOop.inline.hpp index 7db448c4241..7b9aad1a2fb 100644 --- a/src/hotspot/share/oops/arrayOop.inline.hpp +++ b/src/hotspot/share/oops/arrayOop.inline.hpp @@ -29,11 +29,6 @@ #include "oops/arrayOop.hpp" void* arrayOopDesc::base(BasicType type) const { - oop resolved_obj = Access<>::resolve(as_oop()); - return arrayOop(resolved_obj)->base_raw(type); -} - -void* arrayOopDesc::base_raw(BasicType type) const { return reinterpret_cast<void*>(cast_from_oop<intptr_t>(as_oop()) + base_offset_in_bytes(type)); } diff --git a/src/hotspot/share/oops/compressedOops.hpp b/src/hotspot/share/oops/compressedOops.hpp index 3522606b457..60f099c9be9 100644 --- a/src/hotspot/share/oops/compressedOops.hpp +++ b/src/hotspot/share/oops/compressedOops.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 @@ -29,6 +29,7 @@ #include "memory/memRegion.hpp" #include "oops/oopsHierarchy.hpp" #include "utilities/globalDefinitions.hpp" +#include <type_traits> class outputStream; class ReservedHeapSpace; @@ -76,6 +77,10 @@ class CompressedOops : public AllStatic { AnyNarrowOopMode = 4 }; + // The representation type for narrowOop is assumed to be uint32_t. + static_assert(std::is_same<uint32_t, std::underlying_type_t<narrowOop>>::value, + "narrowOop has unexpected representation type"); + static void initialize(const ReservedHeapSpace& heap_space); static void set_base(address base); @@ -112,7 +117,7 @@ class CompressedOops : public AllStatic { static void print_mode(outputStream* st); static bool is_null(oop v) { return v == NULL; } - static bool is_null(narrowOop v) { return v == 0; } + static bool is_null(narrowOop v) { return v == narrowOop::null; } static inline oop decode_raw(narrowOop v); static inline oop decode_not_null(narrowOop v); @@ -125,6 +130,12 @@ class CompressedOops : public AllStatic { static oop decode(oop v) { return v; } static narrowOop encode_not_null(narrowOop v) { return v; } static narrowOop encode(narrowOop v) { return v; } + + static inline uint32_t narrow_oop_value(oop o); + static inline uint32_t narrow_oop_value(narrowOop o); + + template<typename T> + static inline narrowOop narrow_oop_cast(T i); }; // For UseCompressedClassPointers. diff --git a/src/hotspot/share/oops/compressedOops.inline.hpp b/src/hotspot/share/oops/compressedOops.inline.hpp index 3fcaa2f54c6..8c8a922094d 100644 --- a/src/hotspot/share/oops/compressedOops.inline.hpp +++ b/src/hotspot/share/oops/compressedOops.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -62,14 +62,30 @@ inline narrowOop CompressedOops::encode_not_null(oop v) { assert(is_in(v), "address not in heap range: " PTR_FORMAT, p2i((void*)v)); uint64_t pd = (uint64_t)(pointer_delta((void*)v, (void*)base(), 1)); assert(OopEncodingHeapMax > pd, "change encoding max if new encoding"); - uint64_t result = pd >> shift(); - assert((result & CONST64(0xffffffff00000000)) == 0, "narrow oop overflow"); + narrowOop result = narrow_oop_cast(pd >> shift()); assert(decode(result) == v, "reversibility"); - return (narrowOop)result; + return result; } inline narrowOop CompressedOops::encode(oop v) { - return is_null(v) ? (narrowOop)0 : encode_not_null(v); + return is_null(v) ? narrowOop::null : encode_not_null(v); +} + +inline uint32_t CompressedOops::narrow_oop_value(oop o) { + return narrow_oop_value(encode(o)); +} + +inline uint32_t CompressedOops::narrow_oop_value(narrowOop o) { + return static_cast<uint32_t>(o); +} + +template<typename T> +inline narrowOop CompressedOops::narrow_oop_cast(T i) { + static_assert(std::is_integral<T>::value, "precondition"); + uint32_t narrow_value = static_cast<uint32_t>(i); + // Ensure no bits lost in conversion to uint32_t. + assert(i == static_cast<T>(narrow_value), "narrowOop overflow"); + return static_cast<narrowOop>(narrow_value); } static inline bool check_alignment(Klass* v) { diff --git a/src/hotspot/share/oops/constantPool.cpp b/src/hotspot/share/oops/constantPool.cpp index 9b8ba309468..dcbc9b77d16 100644 --- a/src/hotspot/share/oops/constantPool.cpp +++ b/src/hotspot/share/oops/constantPool.cpp @@ -286,7 +286,6 @@ void ConstantPool::archive_resolved_references(Thread* THREAD) { ik->is_shared_app_class())) { // Archiving resolved references for classes from non-builtin loaders // is not yet supported. - set_resolved_references(OopHandle()); return; } @@ -319,7 +318,6 @@ void ConstantPool::archive_resolved_references(Thread* THREAD) { // resolved references will be created using the normal process // when there is no archived value. _cache->set_archived_references(archived); - set_resolved_references(OopHandle()); } } @@ -399,15 +397,7 @@ void ConstantPool::remove_unshareable_info() { // at runtime. set_resolved_reference_length( resolved_references() != NULL ? resolved_references()->length() : 0); - - // If archiving heap objects is not allowed, clear the resolved references. - // Otherwise, it is cleared after the resolved references array is cached - // (see archive_resolved_references()). - // If DynamicDumpSharedSpaces is enabled, clear the resolved references also - // as java objects are not archived in the top layer. - if (!HeapShared::is_heap_object_archiving_allowed() || DynamicDumpSharedSpaces) { - set_resolved_references(OopHandle()); - } + set_resolved_references(OopHandle()); // Shared ConstantPools are in the RO region, so the _flags cannot be modified. // The _on_stack flag is used to prevent ConstantPools from deallocation during diff --git a/src/hotspot/share/oops/cpCache.inline.hpp b/src/hotspot/share/oops/cpCache.inline.hpp index 46069d7c637..b32cde7de0d 100644 --- a/src/hotspot/share/oops/cpCache.inline.hpp +++ b/src/hotspot/share/oops/cpCache.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 @@ -89,7 +89,7 @@ inline ConstantPoolCache::ConstantPoolCache(int length, const intStack& invokedynamic_references_map) : _length(length), _constant_pool(NULL) { - CDS_JAVA_HEAP_ONLY(_archived_references = 0;) + CDS_JAVA_HEAP_ONLY(_archived_references = narrowOop::null;) initialize(inverse_index_map, invokedynamic_inverse_index_map, invokedynamic_references_map); for (int i = 0; i < length; i++) { diff --git a/src/hotspot/share/oops/inlineKlass.cpp b/src/hotspot/share/oops/inlineKlass.cpp index 4cf51c39b10..3553233493e 100644 --- a/src/hotspot/share/oops/inlineKlass.cpp +++ b/src/hotspot/share/oops/inlineKlass.cpp @@ -275,7 +275,7 @@ Klass* InlineKlass::array_klass_impl(bool or_null, TRAPS) { int InlineKlass::collect_fields(GrowableArray<SigEntry>* sig, int base_off) { int count = 0; SigEntry::add_entry(sig, T_INLINE_TYPE, base_off); - for (AllFieldStream fs(this); !fs.done(); fs.next()) { + for (JavaFieldStream fs(this); !fs.done(); fs.next()) { if (fs.access_flags().is_static()) continue; int offset = base_off + fs.offset() - (base_off > 0 ? first_field_offset() : 0); if (fs.is_inlined()) { @@ -376,12 +376,12 @@ bool InlineKlass::is_scalarizable() const { // Can this inline type be passed as multiple values? bool InlineKlass::can_be_passed_as_fields() const { - return InlineTypePassFieldsAsArgs && is_scalarizable() && !is_empty_inline_type(); + return InlineTypePassFieldsAsArgs && is_scalarizable(); } // Can this inline type be returned as multiple values? bool InlineKlass::can_be_returned_as_fields(bool init) const { - return InlineTypeReturnedAsFields && is_scalarizable() && !is_empty_inline_type() && (init || return_regs() != NULL); + return InlineTypeReturnedAsFields && is_scalarizable() && (init || return_regs() != NULL); } // Create handles for all oop fields returned in registers that are going to be live across a safepoint diff --git a/src/hotspot/share/oops/instanceKlass.inline.hpp b/src/hotspot/share/oops/instanceKlass.inline.hpp index 6a438e210f5..09a9658825a 100644 --- a/src/hotspot/share/oops/instanceKlass.inline.hpp +++ b/src/hotspot/share/oops/instanceKlass.inline.hpp @@ -58,7 +58,7 @@ inline void InstanceKlass::release_set_methods_jmethod_ids(jmethodID* jmeths) { template <typename T, class OopClosureType> ALWAYSINLINE void InstanceKlass::oop_oop_iterate_oop_map(OopMapBlock* map, oop obj, OopClosureType* closure) { - T* p = (T*)obj->obj_field_addr_raw<T>(map->offset()); + T* p = (T*)obj->obj_field_addr<T>(map->offset()); T* const end = p + map->count(); for (; p < end; ++p) { @@ -68,7 +68,7 @@ ALWAYSINLINE void InstanceKlass::oop_oop_iterate_oop_map(OopMapBlock* map, oop o template <typename T, class OopClosureType> ALWAYSINLINE void InstanceKlass::oop_oop_iterate_oop_map_reverse(OopMapBlock* map, oop obj, OopClosureType* closure) { - T* const start = (T*)obj->obj_field_addr_raw<T>(map->offset()); + T* const start = (T*)obj->obj_field_addr<T>(map->offset()); T* p = start + map->count(); while (start < p) { @@ -79,7 +79,7 @@ ALWAYSINLINE void InstanceKlass::oop_oop_iterate_oop_map_reverse(OopMapBlock* ma template <typename T, class OopClosureType> ALWAYSINLINE void InstanceKlass::oop_oop_iterate_oop_map_bounded(OopMapBlock* map, oop obj, OopClosureType* closure, MemRegion mr) { - T* p = (T*)obj->obj_field_addr_raw<T>(map->offset()); + T* p = (T*)obj->obj_field_addr<T>(map->offset()); T* end = p + map->count(); T* const l = (T*)mr.start(); diff --git a/src/hotspot/share/oops/klass.cpp b/src/hotspot/share/oops/klass.cpp index f7f7cf69a41..3e93c4af926 100644 --- a/src/hotspot/share/oops/klass.cpp +++ b/src/hotspot/share/oops/klass.cpp @@ -204,7 +204,7 @@ Klass::Klass(KlassID id) : _id(id), _prototype_header(markWord::prototype()), _shared_class_path_index(-1) { CDS_ONLY(_shared_class_flags = 0;) - CDS_JAVA_HEAP_ONLY(_archived_mirror = 0;) + CDS_JAVA_HEAP_ONLY(_archived_mirror = narrowOop::null;) _primary_supers[0] = this; set_super_check_offset(in_bytes(primary_supers_offset())); } diff --git a/src/hotspot/share/oops/klass.hpp b/src/hotspot/share/oops/klass.hpp index 0c42442b276..40c8848bfc5 100644 --- a/src/hotspot/share/oops/klass.hpp +++ b/src/hotspot/share/oops/klass.hpp @@ -264,7 +264,7 @@ class Klass : public Metadata { void set_java_mirror(Handle m); oop archived_java_mirror_raw() NOT_CDS_JAVA_HEAP_RETURN_(NULL); // no GC barrier - narrowOop archived_java_mirror_raw_narrow() NOT_CDS_JAVA_HEAP_RETURN_(0); // no GC barrier + narrowOop archived_java_mirror_raw_narrow() NOT_CDS_JAVA_HEAP_RETURN_(narrowOop::null); // no GC barrier void set_archived_java_mirror_raw(oop m) NOT_CDS_JAVA_HEAP_RETURN; // no GC barrier // Temporary mirror switch used by RedefineClasses diff --git a/src/hotspot/share/oops/objArrayKlass.cpp b/src/hotspot/share/oops/objArrayKlass.cpp index 38c2b49bd33..e0cfe961899 100644 --- a/src/hotspot/share/oops/objArrayKlass.cpp +++ b/src/hotspot/share/oops/objArrayKlass.cpp @@ -303,17 +303,17 @@ void ObjArrayKlass::copy_array(arrayOop s, int src_pos, arrayOop d, size_t src_offset = (size_t) objArrayOopDesc::obj_at_offset<narrowOop>(src_pos); size_t dst_offset = (size_t) objArrayOopDesc::obj_at_offset<narrowOop>(dst_pos); assert(arrayOopDesc::obj_offset_to_raw<narrowOop>(s, src_offset, NULL) == - objArrayOop(s)->obj_at_addr_raw<narrowOop>(src_pos), "sanity"); + objArrayOop(s)->obj_at_addr<narrowOop>(src_pos), "sanity"); assert(arrayOopDesc::obj_offset_to_raw<narrowOop>(d, dst_offset, NULL) == - objArrayOop(d)->obj_at_addr_raw<narrowOop>(dst_pos), "sanity"); + objArrayOop(d)->obj_at_addr<narrowOop>(dst_pos), "sanity"); do_copy(s, src_offset, d, dst_offset, length, CHECK); } else { size_t src_offset = (size_t) objArrayOopDesc::obj_at_offset<oop>(src_pos); size_t dst_offset = (size_t) objArrayOopDesc::obj_at_offset<oop>(dst_pos); assert(arrayOopDesc::obj_offset_to_raw<oop>(s, src_offset, NULL) == - objArrayOop(s)->obj_at_addr_raw<oop>(src_pos), "sanity"); + objArrayOop(s)->obj_at_addr<oop>(src_pos), "sanity"); assert(arrayOopDesc::obj_offset_to_raw<oop>(d, dst_offset, NULL) == - objArrayOop(d)->obj_at_addr_raw<oop>(dst_pos), "sanity"); + objArrayOop(d)->obj_at_addr<oop>(dst_pos), "sanity"); do_copy(s, src_offset, d, dst_offset, length, CHECK); } } diff --git a/src/hotspot/share/oops/objArrayKlass.inline.hpp b/src/hotspot/share/oops/objArrayKlass.inline.hpp index 6943aea468a..fb25fd3de80 100644 --- a/src/hotspot/share/oops/objArrayKlass.inline.hpp +++ b/src/hotspot/share/oops/objArrayKlass.inline.hpp @@ -37,7 +37,7 @@ template <typename T, class OopClosureType> void ObjArrayKlass::oop_oop_iterate_elements(objArrayOop a, OopClosureType* closure) { - T* p = (T*)a->base_raw(); + T* p = (T*)a->base(); T* const end = p + a->length(); for (;p < end; p++) { @@ -52,7 +52,7 @@ void ObjArrayKlass::oop_oop_iterate_elements_bounded( T* const l = (T*)low; T* const h = (T*)high; - T* p = (T*)a->base_raw(); + T* p = (T*)a->base(); T* end = p + a->length(); if (p < l) { @@ -101,8 +101,8 @@ void ObjArrayKlass::oop_oop_iterate_bounded(oop obj, OopClosureType* closure, Me // for objArrayOops. template <typename T, class OopClosureType> void ObjArrayKlass::oop_oop_iterate_range(objArrayOop a, OopClosureType* closure, int start, int end) { - T* low = (T*)a->base_raw() + start; - T* high = (T*)a->base_raw() + end; + T* low = (T*)a->base() + start; + T* high = (T*)a->base() + end; oop_oop_iterate_elements_bounded<T>(a, closure, low, high); } diff --git a/src/hotspot/share/oops/objArrayOop.hpp b/src/hotspot/share/oops/objArrayOop.hpp index ab556d48aef..5952c058ef5 100644 --- a/src/hotspot/share/oops/objArrayOop.hpp +++ b/src/hotspot/share/oops/objArrayOop.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -38,10 +38,8 @@ class objArrayOopDesc : public arrayOopDesc { friend class Runtime1; friend class psPromotionManager; friend class CSetMarkWordClosure; - friend class G1ParScanPartialArrayClosure; template <class T> T* obj_at_addr(int index) const; - template <class T> T* obj_at_addr_raw(int index) const; template <class T> static ptrdiff_t obj_at_offset(int index) { @@ -82,7 +80,6 @@ class objArrayOopDesc : public arrayOopDesc { // base is the address following the header. HeapWord* base() const; - HeapWord* base_raw() const; // Accessing oop obj_at(int index) const; diff --git a/src/hotspot/share/oops/objArrayOop.inline.hpp b/src/hotspot/share/oops/objArrayOop.inline.hpp index 5862edcc48c..4a9e9540c4c 100644 --- a/src/hotspot/share/oops/objArrayOop.inline.hpp +++ b/src/hotspot/share/oops/objArrayOop.inline.hpp @@ -32,18 +32,12 @@ #include "runtime/globals.hpp" inline HeapWord* objArrayOopDesc::base() const { return (HeapWord*) arrayOopDesc::base(T_OBJECT); } -inline HeapWord* objArrayOopDesc::base_raw() const { return (HeapWord*) arrayOopDesc::base_raw(T_OBJECT); } template <class T> T* objArrayOopDesc::obj_at_addr(int index) const { assert(is_within_bounds(index), "index %d out of bounds %d", index, length()); return &((T*)base())[index]; } -template <class T> T* objArrayOopDesc::obj_at_addr_raw(int index) const { - assert(is_within_bounds(index), "index %d out of bounds %d", index, length()); - return &((T*)base_raw())[index]; -} - inline oop objArrayOopDesc::obj_at(int index) const { assert(is_within_bounds(index), "index %d out of bounds %d", index, length()); ptrdiff_t offset = UseCompressedOops ? obj_at_offset<narrowOop>(index) : obj_at_offset<oop>(index); diff --git a/src/hotspot/share/oops/oop.cpp b/src/hotspot/share/oops/oop.cpp index e0ae524a39f..8047fcd4fb7 100644 --- a/src/hotspot/share/oops/oop.cpp +++ b/src/hotspot/share/oops/oop.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -111,7 +111,7 @@ bool oopDesc::is_oop(oop obj, bool ignore_mark_word) { if (ignore_mark_word) { return true; } - if (obj->mark_raw().value() != 0) { + if (obj->mark().value() != 0) { return true; } return !SafepointSynchronize::is_at_safepoint() ; @@ -147,11 +147,11 @@ bool oopDesc::has_klass_gap() { void* oopDesc::load_klass_raw(oop obj) { if (UseCompressedClassPointers) { - narrowKlass narrow_klass = *(obj->compressed_klass_addr()); + narrowKlass narrow_klass = obj->_metadata._compressed_klass; if (narrow_klass == 0) return NULL; return (void*)CompressedKlassPointers::decode_raw(narrow_klass); } else { - return *(void**)(obj->klass_addr()); + return obj->_metadata._klass; } } @@ -159,7 +159,7 @@ void* oopDesc::load_oop_raw(oop obj, int offset) { uintptr_t addr = (uintptr_t)(void*)obj + (uint)offset; if (UseCompressedOops) { narrowOop narrow_oop = *(narrowOop*)addr; - if (narrow_oop == 0) return NULL; + if (CompressedOops::is_null(narrow_oop)) return NULL; return (void*)CompressedOops::decode_raw(narrow_oop); } else { return *(void**)addr; diff --git a/src/hotspot/share/oops/oop.hpp b/src/hotspot/share/oops/oop.hpp index 4a65ca1c41f..fcc67cbafde 100644 --- a/src/hotspot/share/oops/oop.hpp +++ b/src/hotspot/share/oops/oop.hpp @@ -69,32 +69,25 @@ class oopDesc { public: inline markWord mark() const; - inline markWord mark_raw() const; - inline markWord* mark_addr_raw() const; + inline markWord* mark_addr() const; inline void set_mark(markWord m); - inline void set_mark_raw(markWord m); - static inline void set_mark_raw(HeapWord* mem, markWord m); + static inline void set_mark(HeapWord* mem, markWord m); inline void release_set_mark(markWord m); inline markWord cas_set_mark(markWord new_mark, markWord old_mark); - inline markWord cas_set_mark_raw(markWord new_mark, markWord old_mark, atomic_memory_order order = memory_order_conservative); + inline markWord cas_set_mark(markWord new_mark, markWord old_mark, atomic_memory_order order); // Used only to re-initialize the mark word (e.g., of promoted // objects during a GC) -- requires a valid klass pointer inline void init_mark(); - inline void init_mark_raw(); inline Klass* klass() const; inline Klass* klass_or_null() const; inline Klass* klass_or_null_acquire() const; - static inline Klass** klass_addr(HeapWord* mem); - static inline narrowKlass* compressed_klass_addr(HeapWord* mem); - inline Klass** klass_addr(); - inline narrowKlass* compressed_klass_addr(); inline void set_klass(Klass* k); - static inline void release_set_klass(HeapWord* mem, Klass* klass); + static inline void release_set_klass(HeapWord* mem, Klass* k); // For klass field compression inline int klass_gap() const; @@ -135,11 +128,10 @@ class oopDesc { public: // field addresses in oop - inline void* field_addr(int offset) const; - inline void* field_addr_raw(int offset) const; + inline void* field_addr(int offset) const; // Need this as public for garbage collection. - template <class T> inline T* obj_field_addr_raw(int offset) const; + template <class T> inline T* obj_field_addr(int offset) const; template <typename T> inline size_t field_offset(T* p) const; @@ -255,7 +247,6 @@ class oopDesc { inline bool is_locked() const; inline bool is_unlocked() const; inline bool has_bias_pattern() const; - inline bool has_bias_pattern_raw() const; // asserts and guarantees static bool is_oop(oop obj, bool ignore_mark_word = false); @@ -285,9 +276,6 @@ class oopDesc { inline uint age() const; inline void incr_age(); - // mark-sweep support - void follow_body(int begin, int end); - template <typename OopClosureType> inline void oop_iterate(OopClosureType* cl); @@ -312,9 +300,9 @@ class oopDesc { intptr_t slow_identity_hash(); // marks are forwarded to stack when object is locked - inline bool has_displaced_mark_raw() const; - inline markWord displaced_mark_raw() const; - inline void set_displaced_mark_raw(markWord m); + inline bool has_displaced_mark() const; + inline markWord displaced_mark() const; + inline void set_displaced_mark(markWord m); // Checks if the mark word needs to be preserved inline bool mark_must_be_preserved() const; diff --git a/src/hotspot/share/oops/oop.inline.hpp b/src/hotspot/share/oops/oop.inline.hpp index 36ad70f1cb1..2a5ae40b7f5 100644 --- a/src/hotspot/share/oops/oop.inline.hpp +++ b/src/hotspot/share/oops/oop.inline.hpp @@ -47,11 +47,7 @@ markWord oopDesc::mark() const { return markWord(v); } -markWord oopDesc::mark_raw() const { - return Atomic::load(&_mark); -} - -markWord* oopDesc::mark_addr_raw() const { +markWord* oopDesc::mark_addr() const { return (markWord*) &_mark; } @@ -59,11 +55,7 @@ void oopDesc::set_mark(markWord m) { HeapAccess<MO_RELAXED>::store_at(as_oop(), mark_offset_in_bytes(), m.value()); } -void oopDesc::set_mark_raw(markWord m) { - Atomic::store(&_mark, m); -} - -void oopDesc::set_mark_raw(HeapWord* mem, markWord m) { +void oopDesc::set_mark(HeapWord* mem, markWord m) { *(markWord*)(((char*)mem) + mark_offset_in_bytes()) = m; } @@ -76,7 +68,7 @@ markWord oopDesc::cas_set_mark(markWord new_mark, markWord old_mark) { return markWord(v); } -markWord oopDesc::cas_set_mark_raw(markWord new_mark, markWord old_mark, atomic_memory_order order) { +markWord oopDesc::cas_set_mark(markWord new_mark, markWord old_mark, atomic_memory_order order) { return Atomic::cmpxchg(&_mark, old_mark, new_mark, order); } @@ -84,10 +76,6 @@ void oopDesc::init_mark() { set_mark(markWord::prototype_for_klass(klass())); } -void oopDesc::init_mark_raw() { - set_mark_raw(markWord::prototype_for_klass(klass())); -} - Klass* oopDesc::klass() const { if (UseCompressedClassPointers) { return CompressedKlassPointers::decode_not_null(_metadata._compressed_klass); @@ -113,56 +101,26 @@ Klass* oopDesc::klass_or_null_acquire() const { } } -Klass** oopDesc::klass_addr(HeapWord* mem) { - // Only used internally and with CMS and will not work with - // UseCompressedOops - assert(!UseCompressedClassPointers, "only supported with uncompressed klass pointers"); - ByteSize offset = byte_offset_of(oopDesc, _metadata._klass); - return (Klass**) (((char*)mem) + in_bytes(offset)); -} - -narrowKlass* oopDesc::compressed_klass_addr(HeapWord* mem) { - assert(UseCompressedClassPointers, "only called by compressed klass pointers"); - ByteSize offset = byte_offset_of(oopDesc, _metadata._compressed_klass); - return (narrowKlass*) (((char*)mem) + in_bytes(offset)); -} - -Klass** oopDesc::klass_addr() { - return klass_addr((HeapWord*)this); -} - -narrowKlass* oopDesc::compressed_klass_addr() { - return compressed_klass_addr((HeapWord*)this); -} - -#define CHECK_SET_KLASS(k) \ - do { \ - assert(Universe::is_bootstrapping() || k != NULL, "NULL Klass"); \ - assert(Universe::is_bootstrapping() || k->is_klass(), "not a Klass"); \ - } while (0) - void oopDesc::set_klass(Klass* k) { - CHECK_SET_KLASS(k); + assert(Universe::is_bootstrapping() || (k != NULL && k->is_klass()), "incorrect Klass"); if (UseCompressedClassPointers) { - *compressed_klass_addr() = CompressedKlassPointers::encode_not_null(k); + _metadata._compressed_klass = CompressedKlassPointers::encode_not_null(k); } else { - *klass_addr() = k; + _metadata._klass = k; } } -void oopDesc::release_set_klass(HeapWord* mem, Klass* klass) { - CHECK_SET_KLASS(klass); +void oopDesc::release_set_klass(HeapWord* mem, Klass* k) { + assert(Universe::is_bootstrapping() || (k != NULL && k->is_klass()), "incorrect Klass"); + char* raw_mem = ((char*)mem + klass_offset_in_bytes()); if (UseCompressedClassPointers) { - Atomic::release_store(compressed_klass_addr(mem), - CompressedKlassPointers::encode_not_null(klass)); + Atomic::release_store((narrowKlass*)raw_mem, + CompressedKlassPointers::encode_not_null(k)); } else { - Atomic::release_store(klass_addr(mem), klass); + Atomic::release_store((Klass**)raw_mem, k); } - assert(((oopDesc*)mem)->klass() == klass, "failed oopDesc::klass() encode/decode"); } -#undef CHECK_SET_KLASS - int oopDesc::klass_gap() const { return *(int*)(((intptr_t)this) + klass_gap_offset_in_bytes()); } @@ -248,11 +206,10 @@ bool oopDesc::is_typeArray() const { return klass()->is_typeArray_klass(); } bool oopDesc::is_inline_type() const { return klass()->is_inline_klass(); } bool oopDesc::is_flatArray() const { return klass()->is_flatArray_klass(); } -void* oopDesc::field_addr_raw(int offset) const { return reinterpret_cast<void*>(cast_from_oop<intptr_t>(as_oop()) + offset); } -void* oopDesc::field_addr(int offset) const { return Access<>::resolve(as_oop())->field_addr_raw(offset); } +void* oopDesc::field_addr(int offset) const { return reinterpret_cast<void*>(cast_from_oop<intptr_t>(as_oop()) + offset); } template <class T> -T* oopDesc::obj_field_addr_raw(int offset) const { return (T*) field_addr_raw(offset); } +T* oopDesc::obj_field_addr(int offset) const { return (T*) field_addr(offset); } template <typename T> size_t oopDesc::field_offset(T* p) const { return pointer_delta((void*)p, (void*)this, 1); } @@ -301,21 +258,16 @@ bool oopDesc::has_bias_pattern() const { return mark().has_bias_pattern(); } - -bool oopDesc::has_bias_pattern_raw() const { - return mark_raw().has_bias_pattern(); -} - // Used only for markSweep, scavenging bool oopDesc::is_gc_marked() const { - return mark_raw().is_marked(); + return mark().is_marked(); } // Used by scavengers bool oopDesc::is_forwarded() const { // The extra heap check is needed since the obj might be locked, in which case the // mark would point to a stack location and have the sentinel bit cleared - return mark_raw().is_marked(); + return mark().is_marked(); } // Used by scavengers @@ -323,7 +275,7 @@ void oopDesc::forward_to(oop p) { verify_forwardee(p); markWord m = markWord::encode_pointer_as_mark(p); assert(m.decode_pointer() == p, "encoding must be reversable"); - set_mark_raw(m); + set_mark(m); } // Used by parallel scavengers @@ -331,14 +283,14 @@ bool oopDesc::cas_forward_to(oop p, markWord compare, atomic_memory_order order) verify_forwardee(p); markWord m = markWord::encode_pointer_as_mark(p); assert(m.decode_pointer() == p, "encoding must be reversable"); - return cas_set_mark_raw(m, compare, order) == compare; + return cas_set_mark(m, compare, order) == compare; } oop oopDesc::forward_to_atomic(oop p, markWord compare, atomic_memory_order order) { verify_forwardee(p); markWord m = markWord::encode_pointer_as_mark(p); assert(m.decode_pointer() == p, "encoding must be reversable"); - markWord old_mark = cas_set_mark_raw(m, compare, order); + markWord old_mark = cas_set_mark(m, compare, order); if (old_mark == compare) { return NULL; } else { @@ -350,7 +302,7 @@ oop oopDesc::forward_to_atomic(oop p, markWord compare, atomic_memory_order orde // The forwardee is used when copying during scavenge and mark-sweep. // It does need to clear the low two locking- and GC-related bits. oop oopDesc::forwardee() const { - return (oop) mark_raw().decode_pointer(); + return (oop) mark().decode_pointer(); } // Note that the forwardee is not the same thing as the displaced_mark. @@ -363,19 +315,19 @@ oop oopDesc::forwardee_acquire() const { // The following method needs to be MT safe. uint oopDesc::age() const { assert(!is_forwarded(), "Attempt to read age from forwarded mark"); - if (has_displaced_mark_raw()) { - return displaced_mark_raw().age(); + if (has_displaced_mark()) { + return displaced_mark().age(); } else { - return mark_raw().age(); + return mark().age(); } } void oopDesc::incr_age() { assert(!is_forwarded(), "Attempt to increment age of forwarded mark"); - if (has_displaced_mark_raw()) { - set_displaced_mark_raw(displaced_mark_raw().incr_age()); + if (has_displaced_mark()) { + set_displaced_mark(displaced_mark().incr_age()); } else { - set_mark_raw(mark_raw().incr_age()); + set_mark(mark().incr_age()); } } @@ -427,16 +379,16 @@ intptr_t oopDesc::identity_hash() { } } -bool oopDesc::has_displaced_mark_raw() const { - return mark_raw().has_displaced_mark_helper(); +bool oopDesc::has_displaced_mark() const { + return mark().has_displaced_mark_helper(); } -markWord oopDesc::displaced_mark_raw() const { - return mark_raw().displaced_mark_helper(); +markWord oopDesc::displaced_mark() const { + return mark().displaced_mark_helper(); } -void oopDesc::set_displaced_mark_raw(markWord m) { - mark_raw().set_displaced_mark_helper(m); +void oopDesc::set_displaced_mark(markWord m) { + mark().set_displaced_mark_helper(m); } // Supports deferred calling of obj->klass(). @@ -453,7 +405,7 @@ class DeferredObjectToKlass { }; bool oopDesc::mark_must_be_preserved() const { - return mark_must_be_preserved(mark_raw()); + return mark_must_be_preserved(mark()); } bool oopDesc::mark_must_be_preserved(markWord m) const { diff --git a/src/hotspot/share/oops/oopsHierarchy.hpp b/src/hotspot/share/oops/oopsHierarchy.hpp index 4cd2fc0bc95..90934c411e0 100644 --- a/src/hotspot/share/oops/oopsHierarchy.hpp +++ b/src/hotspot/share/oops/oopsHierarchy.hpp @@ -33,7 +33,8 @@ // This hierarchy is a representation hierarchy, i.e. if A is a superclass // of B, A's representation is a prefix of B's representation. -typedef juint narrowOop; // Offset instead of address for an oop within a java object +// Global offset instead of address for an oop within a java object. +enum class narrowOop : uint32_t { null = 0 }; // If compressed klass pointers then use narrowKlass. typedef juint narrowKlass; diff --git a/src/hotspot/share/oops/symbol.cpp b/src/hotspot/share/oops/symbol.cpp index 32239e5f381..d2ccf62dd29 100644 --- a/src/hotspot/share/oops/symbol.cpp +++ b/src/hotspot/share/oops/symbol.cpp @@ -35,6 +35,7 @@ #include "memory/universe.hpp" #include "oops/symbol.hpp" #include "runtime/atomic.hpp" +#include "runtime/mutexLocker.hpp" #include "runtime/os.hpp" #include "runtime/signature.hpp" #include "utilities/utf8.hpp" @@ -63,13 +64,14 @@ Symbol::Symbol(const u1* name, int length, int refcount) { void* Symbol::operator new(size_t sz, int len) throw() { #if INCLUDE_CDS if (DumpSharedSpaces) { - // To get deterministic output from -Xshare:dump, we ensure that Symbols are allocated in - // increasing addresses. When the symbols are copied into the archive, we preserve their - // relative address order (see SortedSymbolClosure in metaspaceShared.cpp) - // - // We cannot use arena because arena chunks are allocated by the OS. As a result, for example, - // the archived symbol of "java/lang/Object" may sometimes be lower than "java/lang/String", and - // sometimes be higher. This would cause non-deterministic contents in the archive. + MutexLocker ml(DumpRegion_lock, Mutex::_no_safepoint_check_flag); + // To get deterministic output from -Xshare:dump, we ensure that Symbols are allocated in + // increasing addresses. When the symbols are copied into the archive, we preserve their + // relative address order (sorted, see ArchiveBuilder::gather_klasses_and_symbols). + // + // We cannot use arena because arena chunks are allocated by the OS. As a result, for example, + // the archived symbol of "java/lang/Object" may sometimes be lower than "java/lang/String", and + // sometimes be higher. This would cause non-deterministic contents in the archive. DEBUG_ONLY(static void* last = 0); void* p = (void*)MetaspaceShared::symbol_space_alloc(size(len)*wordSize); assert(p > last, "must increase monotonically"); diff --git a/src/hotspot/share/oops/weakHandle.cpp b/src/hotspot/share/oops/weakHandle.cpp index ff154afe021..48bb2a1368d 100644 --- a/src/hotspot/share/oops/weakHandle.cpp +++ b/src/hotspot/share/oops/weakHandle.cpp @@ -31,8 +31,11 @@ #include "utilities/ostream.hpp" WeakHandle::WeakHandle(OopStorage* storage, Handle obj) : + WeakHandle(storage, obj()) {} + +WeakHandle::WeakHandle(OopStorage* storage, oop obj) : _obj(storage->allocate()) { - assert(obj() != NULL, "no need to create weak null oop"); + assert(obj != NULL, "no need to create weak null oop"); if (_obj == NULL) { vm_exit_out_of_memory(sizeof(oop*), OOM_MALLOC_ERROR, @@ -40,7 +43,7 @@ WeakHandle::WeakHandle(OopStorage* storage, Handle obj) : storage->name()); } - NativeAccess<ON_PHANTOM_OOP_REF>::oop_store(_obj, obj()); + NativeAccess<ON_PHANTOM_OOP_REF>::oop_store(_obj, obj); } void WeakHandle::release(OopStorage* storage) const { diff --git a/src/hotspot/share/oops/weakHandle.hpp b/src/hotspot/share/oops/weakHandle.hpp index 435bc1e85cd..c2b589958d2 100644 --- a/src/hotspot/share/oops/weakHandle.hpp +++ b/src/hotspot/share/oops/weakHandle.hpp @@ -48,6 +48,7 @@ class WeakHandle { public: WeakHandle() : _obj(NULL) {} // needed for init WeakHandle(OopStorage* storage, Handle obj); + WeakHandle(OopStorage* storage, oop obj); inline oop resolve() const; inline oop peek() const; diff --git a/src/hotspot/share/opto/addnode.cpp b/src/hotspot/share/opto/addnode.cpp index 05ade24f033..2a8affe48a8 100644 --- a/src/hotspot/share/opto/addnode.cpp +++ b/src/hotspot/share/opto/addnode.cpp @@ -91,9 +91,9 @@ static bool commute(Node *add, bool con_left, bool con_right) { PhiNode *phi; // Check for tight loop increments: Loop-phi of Add of loop-phi - if( in1->is_Phi() && (phi = in1->as_Phi()) && !phi->is_copy() && phi->region()->is_Loop() && phi->in(2)==add) + if (in1->is_Phi() && (phi = in1->as_Phi()) && phi->region()->is_Loop() && phi->in(2) == add) return false; - if( in2->is_Phi() && (phi = in2->as_Phi()) && !phi->is_copy() && phi->region()->is_Loop() && phi->in(2)==add){ + if (in2->is_Phi() && (phi = in2->as_Phi()) && phi->region()->is_Loop() && phi->in(2) == add) { add->swap_edges(1, 2); return true; } @@ -755,41 +755,47 @@ Node* OrINode::Identity(PhaseGVN* phase) { return AddNode::Identity(phase); } -Node *OrINode::Ideal(PhaseGVN *phase, bool can_reshape) { +// Find shift value for Integer or Long OR. +Node* rotate_shift(PhaseGVN* phase, Node* lshift, Node* rshift, int mask) { + // val << norm_con_shift | val >> ({32|64} - norm_con_shift) => rotate_left val, norm_con_shift + const TypeInt* lshift_t = phase->type(lshift)->isa_int(); + const TypeInt* rshift_t = phase->type(rshift)->isa_int(); + if (lshift_t != NULL && lshift_t->is_con() && + rshift_t != NULL && rshift_t->is_con() && + ((lshift_t->get_con() & mask) == ((mask + 1) - (rshift_t->get_con() & mask)))) { + return phase->intcon(lshift_t->get_con() & mask); + } + // val << var_shift | val >> ({0|32|64} - var_shift) => rotate_left val, var_shift + if (rshift->Opcode() == Op_SubI && rshift->in(2) == lshift && rshift->in(1)->is_Con()){ + const TypeInt* shift_t = phase->type(rshift->in(1))->isa_int(); + if (shift_t != NULL && shift_t->is_con() && + (shift_t->get_con() == 0 || shift_t->get_con() == (mask + 1))) { + return lshift; + } + } + return NULL; +} + +Node* OrINode::Ideal(PhaseGVN* phase, bool can_reshape) { int lopcode = in(1)->Opcode(); int ropcode = in(2)->Opcode(); if (Matcher::match_rule_supported(Op_RotateLeft) && lopcode == Op_LShiftI && ropcode == Op_URShiftI && in(1)->in(1) == in(2)->in(1)) { - Node *lshift = in(1)->in(2); - Node *rshift = in(2)->in(2); - // val << norm_con_shift | val >> (32 - norm_con_shift) => rotate_left val , norm_con_shift - if (lshift->is_Con() && rshift->is_Con() && - ((lshift->get_int() & 0x1F) == (32 - (rshift->get_int() & 0x1F)))) { - return new RotateLeftNode(in(1)->in(1), - phase->intcon(lshift->get_int() & 0x1F), TypeInt::INT); - } - // val << var_shift | val >> (0/32 - var_shift) => rotate_left val , var_shift - if (rshift->Opcode() == Op_SubI && rshift->in(2) == lshift && - rshift->in(1)->is_Con() && - (rshift->in(1)->get_int() == 0 || rshift->in(1)->get_int() == 32)) { - return new RotateLeftNode(in(1)->in(1), lshift, TypeInt::INT); + Node* lshift = in(1)->in(2); + Node* rshift = in(2)->in(2); + Node* shift = rotate_shift(phase, lshift, rshift, 0x1F); + if (shift != NULL) { + return new RotateLeftNode(in(1)->in(1), shift, TypeInt::INT); } + return NULL; } if (Matcher::match_rule_supported(Op_RotateRight) && lopcode == Op_URShiftI && ropcode == Op_LShiftI && in(1)->in(1) == in(2)->in(1)) { Node *rshift = in(1)->in(2); Node *lshift = in(2)->in(2); - // val >> norm_con_shift | val << (32 - norm_con_shift) => rotate_right val , norm_con_shift - if (rshift->is_Con() && lshift->is_Con() && - ((rshift->get_int() & 0x1F) == (32 - (lshift->get_int() & 0x1F)))) { - return new RotateRightNode(in(1)->in(1), - phase->intcon(rshift->get_int() & 0x1F), TypeInt::INT); - } - // val >> var_shift | val << (0/32 - var_shift) => rotate_right val , var_shift - if (lshift->Opcode() == Op_SubI && lshift->in(2) == rshift && - lshift->in(1)->is_Con() && - (lshift->in(1)->get_int() == 0 || lshift->in(1)->get_int() == 32)) { - return new RotateRightNode(in(1)->in(1), rshift, TypeInt::INT); + Node* shift = rotate_shift(phase, rshift, lshift, 0x1F); + if (shift != NULL) { + return new RotateRightNode(in(1)->in(1), shift, TypeInt::INT); } } return NULL; @@ -836,42 +842,27 @@ Node* OrLNode::Identity(PhaseGVN* phase) { return AddNode::Identity(phase); } -Node *OrLNode::Ideal(PhaseGVN *phase, bool can_reshape) { +Node* OrLNode::Ideal(PhaseGVN* phase, bool can_reshape) { int lopcode = in(1)->Opcode(); int ropcode = in(2)->Opcode(); if (Matcher::match_rule_supported(Op_RotateLeft) && lopcode == Op_LShiftL && ropcode == Op_URShiftL && in(1)->in(1) == in(2)->in(1)) { - Node *lshift = in(1)->in(2); - Node *rshift = in(2)->in(2); - // val << norm_con_shift | val >> (64 - norm_con_shift) => rotate_left val , norm_con_shift - if (lshift->is_Con() && rshift->is_Con() && - ((lshift->get_int() & 0x3F) == (64 - (rshift->get_int() & 0x3F)))) { - return new RotateLeftNode(in(1)->in(1), - phase->intcon(lshift->get_int() & 0x3F), TypeLong::LONG); - } - // val << var_shift | val >> (0/64 - var_shift) => rotate_left val , var_shift - if (rshift->Opcode() == Op_SubI && rshift->in(2) == lshift && - rshift->in(1)->is_Con() && - (rshift->in(1)->get_int() == 0 || rshift->in(1)->get_int() == 64)) { - return new RotateLeftNode(in(1)->in(1), lshift, TypeLong::LONG); - } + Node* lshift = in(1)->in(2); + Node* rshift = in(2)->in(2); + Node* shift = rotate_shift(phase, lshift, rshift, 0x3F); + if (shift != NULL) { + return new RotateLeftNode(in(1)->in(1), shift, TypeLong::LONG); + } + return NULL; } if (Matcher::match_rule_supported(Op_RotateRight) && lopcode == Op_URShiftL && ropcode == Op_LShiftL && in(1)->in(1) == in(2)->in(1)) { - Node *rshift = in(1)->in(2); - Node *lshift = in(2)->in(2); - // val >> norm_con_shift | val << (64 - norm_con_shift) => rotate_right val , norm_con_shift - if (rshift->is_Con() && lshift->is_Con() && - ((rshift->get_int() & 0x3F) == (64 - (lshift->get_int() & 0x3F)))) { - return new RotateRightNode(in(1)->in(1), - phase->intcon(rshift->get_int() & 0x3F), TypeLong::LONG); - } - // val >> var_shift | val << (0/64 - var_shift) => rotate_right val , var_shift - if (lshift->Opcode() == Op_SubI && lshift->in(2) == rshift && - lshift->in(1)->is_Con() && - (lshift->in(1)->get_int() == 0 || lshift->in(1)->get_int() == 64)) { - return new RotateRightNode(in(1)->in(1), rshift, TypeLong::LONG); - } + Node* rshift = in(1)->in(2); + Node* lshift = in(2)->in(2); + Node* shift = rotate_shift(phase, rshift, lshift, 0x3F); + if (shift != NULL) { + return new RotateRightNode(in(1)->in(1), shift, TypeLong::LONG); + } } return NULL; } diff --git a/src/hotspot/share/opto/c2_globals.hpp b/src/hotspot/share/opto/c2_globals.hpp index 90d2188fabc..850fd4f62df 100644 --- a/src/hotspot/share/opto/c2_globals.hpp +++ b/src/hotspot/share/opto/c2_globals.hpp @@ -49,6 +49,14 @@ product(bool, StressGCM, false, DIAGNOSTIC, \ "Randomize instruction scheduling in GCM") \ \ + product(bool, StressIGVN, false, DIAGNOSTIC, \ + "Randomize worklist traversal in IGVN") \ + \ + product(uint, StressSeed, 0, DIAGNOSTIC, \ + "Seed for IGVN stress testing (if unset, a random one is " \ + "generated") \ + range(0, max_juint) \ + \ develop(bool, StressMethodHandleLinkerInlining, false, \ "Stress inlining through method handle linkers") \ \ @@ -97,6 +105,10 @@ notproduct(bool, PrintIdeal, false, \ "Print ideal graph before code generation") \ \ + notproduct(uintx, PrintIdealIndentThreshold, 0, \ + "A depth threshold of ideal graph. Indentation is disabled " \ + "when users attempt to dump an ideal graph deeper than it.") \ + \ notproduct(bool, PrintOpto, false, \ "Print compiler2 attempts") \ \ @@ -765,7 +777,7 @@ product(bool, UseProfiledLoopPredicate, true, \ "Move predicates out of loops based on profiling data") \ \ - product(bool, UseArrayLoadStoreProfile, false, \ + product(bool, UseArrayLoadStoreProfile, true, \ "Take advantage of profiling at array load/store") \ \ product(bool, ExpandSubTypeCheckAtParseTime, false, DIAGNOSTIC, \ diff --git a/src/hotspot/share/opto/callGenerator.cpp b/src/hotspot/share/opto/callGenerator.cpp index 7c98ac483b1..fa9ad1f595f 100644 --- a/src/hotspot/share/opto/callGenerator.cpp +++ b/src/hotspot/share/opto/callGenerator.cpp @@ -462,7 +462,7 @@ void LateInlineCallGenerator::do_late_inline() { uint j = TypeFunc::Parms; for (uint i1 = 0; i1 < nargs; i1++) { const Type* t = domain_sig->field_at(TypeFunc::Parms + i1); - if (method()->has_scalarized_args() && t->is_inlinetypeptr() && !t->maybe_null()) { + if (method()->has_scalarized_args() && t->is_inlinetypeptr() && !t->maybe_null() && t->inline_klass()->can_be_passed_as_fields()) { // Inline type arguments are not passed by reference: we get an argument per // field of the inline type. Build InlineTypeNodes from the inline type arguments. GraphKit arg_kit(jvms, &gvn); diff --git a/src/hotspot/share/opto/cfgnode.cpp b/src/hotspot/share/opto/cfgnode.cpp index b5dbd300d4c..7b7b8f50300 100644 --- a/src/hotspot/share/opto/cfgnode.cpp +++ b/src/hotspot/share/opto/cfgnode.cpp @@ -555,7 +555,7 @@ Node *RegionNode::Ideal(PhaseGVN *phase, bool can_reshape) { assert( igvn->eqv(n->in(0), this), "" ); assert( n->req() == 2 && n->in(1) != NULL, "Only one data input expected" ); // Break dead loop data path. - // Eagerly replace phis with top to avoid phis copies generation. + // Eagerly replace phis with top to avoid regionless phis. igvn->replace_node(n, top); if( max != outcnt() ) { progress = true; @@ -596,7 +596,7 @@ Node *RegionNode::Ideal(PhaseGVN *phase, bool can_reshape) { assert( req() == 1, "no inputs expected" ); // During IGVN phase such region will be subsumed by TOP node // so region's phis will have TOP as control node. - // Kill phis here to avoid it. PhiNode::is_copy() will be always false. + // Kill phis here to avoid it. // Also set other user's input to top. parent_ctrl = phase->C->top(); } else { @@ -611,7 +611,7 @@ Node *RegionNode::Ideal(PhaseGVN *phase, bool can_reshape) { Node* n = last_out(i); igvn->hash_delete(n); // Remove from worklist before modifying edges if( n->is_Phi() ) { // Collapse all Phis - // Eagerly replace phis to avoid copies generation. + // Eagerly replace phis to avoid regionless phis. Node* in; if( cnt == 0 ) { assert( n->req() == 1, "No data inputs expected" ); @@ -1387,7 +1387,6 @@ Node* PhiNode::unique_input(PhaseTransform* phase, bool uncast) { // phi / -- Node* r = in(0); // RegionNode - if (r == NULL) return in(1); // Already degraded to a Copy Node* input = NULL; // The unique direct input (maybe uncasted = ConstraintCasts removed) for (uint i = 1, cnt = req(); i < cnt; ++i) { @@ -1871,11 +1870,8 @@ bool PhiNode::wait_for_region_igvn(PhaseGVN* phase) { // Return a node which is more "ideal" than the current node. Must preserve // the CFG, but we can still strip out dead paths. Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) { - // The next should never happen after 6297035 fix. - if( is_copy() ) // Already degraded to a Copy ? - return NULL; // No change - Node *r = in(0); // RegionNode + assert(r != NULL && r->is_Region(), "this phi must have a region"); assert(r->in(0) == NULL || !r->in(0)->is_Root(), "not a specially hidden merge"); // Note: During parsing, phis are often transformed before their regions. diff --git a/src/hotspot/share/opto/cfgnode.hpp b/src/hotspot/share/opto/cfgnode.hpp index 971309e30d1..40fcef2b606 100644 --- a/src/hotspot/share/opto/cfgnode.hpp +++ b/src/hotspot/share/opto/cfgnode.hpp @@ -114,9 +114,7 @@ class JProjNode : public ProjNode { //------------------------------PhiNode---------------------------------------- // PhiNodes merge values from different Control paths. Slot 0 points to the // controlling RegionNode. Other slots map 1-for-1 with incoming control flow -// paths to the RegionNode. For speed reasons (to avoid another pass) we -// can turn PhiNodes into copys in-place by NULL'ing out their RegionNode -// input in slot 0. +// paths to the RegionNode. class PhiNode : public TypeNode { friend class PhaseRenumberLive; @@ -172,13 +170,6 @@ class PhiNode : public TypeNode { // Accessors RegionNode* region() const { Node* r = in(Region); assert(!r || r->is_Region(), ""); return (RegionNode*)r; } - Node* is_copy() const { - // The node is a real phi if _in[0] is a Region node. - DEBUG_ONLY(const Node* r = _in[Region];) - assert(r != NULL && r->is_Region(), "Not valid control"); - return NULL; // not a copy! - } - bool is_tripcount() const; // Determine a unique non-trivial input, if any. diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp index ff0064a64f3..32887ab8b8c 100644 --- a/src/hotspot/share/opto/compile.cpp +++ b/src/hotspot/share/opto/compile.cpp @@ -71,6 +71,7 @@ #include "opto/type.hpp" #include "opto/vectornode.hpp" #include "runtime/arguments.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/signature.hpp" #include "runtime/stubRoutines.hpp" @@ -531,6 +532,7 @@ Compile::Compile( ciEnv* ci_env, ciMethod* target, int osr_bci, #endif _has_method_handle_invokes(false), _clinit_barrier_on_entry(false), + _stress_seed(0), _comp_arena(mtCompiler), _barrier_set_state(BarrierSet::barrier_set()->barrier_set_c2()->create_barrier_state(comp_arena())), _env(ci_env), @@ -733,6 +735,18 @@ Compile::Compile( ciEnv* ci_env, ciMethod* target, int osr_bci, if (failing()) return; NOT_PRODUCT( verify_graph_edges(); ) + // If IGVN is randomized for stress testing, seed random number + // generation and log the seed for repeatability. + if (StressIGVN) { + _stress_seed = FLAG_IS_DEFAULT(StressSeed) ? + static_cast<uint>(Ticks::now().nanoseconds()) : StressSeed; + if (_log != NULL) { + _log->elem("stress_test seed='%u'", _stress_seed); + } else if (FLAG_IS_DEFAULT(StressSeed)) { + tty->print_cr("Warning: set +LogCompilation to log the seed."); + } + } + // Now optimize Optimize(); if (failing()) return; @@ -819,6 +833,7 @@ Compile::Compile( ciEnv* ci_env, #endif _has_method_handle_invokes(false), _clinit_barrier_on_entry(false), + _stress_seed(0), _comp_arena(mtCompiler), _barrier_set_state(BarrierSet::barrier_set()->barrier_set_c2()->create_barrier_state(comp_arena())), _env(ci_env), @@ -4886,8 +4901,13 @@ Node* Compile::optimize_acmp(PhaseGVN* phase, Node* a, Node* b) { return NULL; } -// Auxiliary method to support randomized stressing/fuzzing. -// +// Auxiliary methods to support randomized stressing/fuzzing. + +int Compile::random() { + _stress_seed = os::next_random(_stress_seed); + return static_cast<int>(_stress_seed); +} + // This method can be called the arbitrary number of times, with current count // as the argument. The logic allows selecting a single candidate from the // running list of candidates as follows: diff --git a/src/hotspot/share/opto/compile.hpp b/src/hotspot/share/opto/compile.hpp index c0da064591f..b5569387006 100644 --- a/src/hotspot/share/opto/compile.hpp +++ b/src/hotspot/share/opto/compile.hpp @@ -70,7 +70,6 @@ class PhaseGVN; class PhaseIterGVN; class PhaseRegAlloc; class PhaseCCP; -class PhaseCCP_DCE; class PhaseOutput; class RootNode; class relocInfo; @@ -305,6 +304,7 @@ class Compile : public Phase { bool _clinit_barrier_on_entry; // True if clinit barrier is needed on nmethod entry bool _has_flattened_accesses; // Any known flattened array accesses? bool _flattened_accesses_share_alias; // Initially all flattened array share a single slice + uint _stress_seed; // Seed for stress testing // Compilation environment. Arena _comp_arena; // Arena with lifetime equivalent to Compile @@ -1159,6 +1159,7 @@ class Compile : public Phase { Node* optimize_acmp(PhaseGVN* phase, Node* a, Node* b); // Auxiliary method for randomized fuzzing/stressing + int random(); static bool randomized_select(int count); // supporting clone_map diff --git a/src/hotspot/share/opto/graphKit.cpp b/src/hotspot/share/opto/graphKit.cpp index 749688c0f22..f8fd520540e 100644 --- a/src/hotspot/share/opto/graphKit.cpp +++ b/src/hotspot/share/opto/graphKit.cpp @@ -1812,7 +1812,7 @@ void GraphKit::set_arguments_for_java_call(CallJavaNode* call, bool is_late_inli for (uint i = TypeFunc::Parms, idx = TypeFunc::Parms; i < nargs; i++) { Node* arg = argument(i-TypeFunc::Parms); const Type* t = domain->field_at(i); - if (call->method()->has_scalarized_args() && t->is_inlinetypeptr() && !t->maybe_null()) { + if (call->method()->has_scalarized_args() && t->is_inlinetypeptr() && !t->maybe_null() && t->inline_klass()->can_be_passed_as_fields()) { // We don't pass inline type arguments by reference but instead pass each field of the inline type InlineTypeNode* vt = arg->as_InlineType(); vt->pass_fields(this, call, sig_cc, idx); diff --git a/src/hotspot/share/opto/ifnode.cpp b/src/hotspot/share/opto/ifnode.cpp index 9cbb62ecd8b..05eb3e850f3 100644 --- a/src/hotspot/share/opto/ifnode.cpp +++ b/src/hotspot/share/opto/ifnode.cpp @@ -86,7 +86,6 @@ static Node* split_if(IfNode *iff, PhaseIterGVN *igvn) { i1 = cmp->in(1); if( i1 == NULL || !i1->is_Phi() ) return NULL; PhiNode *phi = i1->as_Phi(); - if( phi->is_copy() ) return NULL; Node *con2 = cmp->in(2); if( !con2->is_Con() ) return NULL; // See that the merge point contains some constants diff --git a/src/hotspot/share/opto/inlinetypenode.cpp b/src/hotspot/share/opto/inlinetypenode.cpp index a8f87ca2d2a..9546f2589c5 100644 --- a/src/hotspot/share/opto/inlinetypenode.cpp +++ b/src/hotspot/share/opto/inlinetypenode.cpp @@ -223,14 +223,14 @@ int InlineTypeBaseNode::make_scalar_in_safepoint(PhaseIterGVN* igvn, Unique_Node return sfpt->replace_edges_in_range(this, sobj, start, end); } -void InlineTypeBaseNode::make_scalar_in_safepoints(PhaseIterGVN* igvn) { +void InlineTypeBaseNode::make_scalar_in_safepoints(PhaseIterGVN* igvn, bool allow_oop) { // Process all safepoint uses and scalarize inline type Unique_Node_List worklist; for (DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++) { SafePointNode* sfpt = fast_out(i)->isa_SafePoint(); if (sfpt != NULL && !sfpt->is_CallLeaf() && (!sfpt->is_Call() || sfpt->as_Call()->has_debug_use(this))) { int nb = 0; - if (is_allocated(igvn) && get_oop()->is_Con()) { + if (allow_oop && is_allocated(igvn) && get_oop()->is_Con()) { // Inline type is allocated with a constant oop, link it directly nb = sfpt->replace_edges_in_range(this, get_oop(), sfpt->jvms()->debug_start(), sfpt->jvms()->debug_end()); igvn->rehash_node_delayed(sfpt); @@ -273,8 +273,12 @@ void InlineTypeBaseNode::load(GraphKit* kit, Node* base, Node* ptr, ciInstanceKl Node* value = NULL; ciType* ft = field_type(i); if (field_is_flattened(i)) { - // Recursively load the flattened inline type field - value = InlineTypeNode::make_from_flattened(kit, ft->as_inline_klass(), base, ptr, holder, offset, decorators); + if (ft->as_inline_klass()->is_empty()) { + value = InlineTypeNode::make_default(kit->gvn(), ft->as_inline_klass()); + } else { + // Recursively load the flattened inline type field + value = InlineTypeNode::make_from_flattened(kit, ft->as_inline_klass(), base, ptr, holder, offset, decorators); + } } else { const TypeOopPtr* oop_ptr = kit->gvn().type(base)->isa_oopptr(); bool is_array = (oop_ptr->isa_aryptr() != NULL); @@ -510,7 +514,7 @@ InlineTypeNode* InlineTypeNode::make_default(PhaseGVN& gvn, ciInlineKlass* vk) { if (field_type->is_inlinetype()) { ciInlineKlass* field_klass = field_type->as_inline_klass(); if (field_klass->is_scalarizable()) { - value = InlineTypeNode::make_default(gvn, field_klass); + value = make_default(gvn, field_klass); } else { value = default_oop(gvn, field_klass); } @@ -538,7 +542,9 @@ bool InlineTypeNode::is_default(PhaseGVN* gvn) const { InlineTypeNode* InlineTypeNode::make_from_oop(GraphKit* kit, Node* oop, ciInlineKlass* vk) { PhaseGVN& gvn = kit->gvn(); - + if (vk->is_empty()) { + return make_default(gvn, vk); + } // Create and initialize an InlineTypeNode by loading all field // values from a heap-allocated version and also save the oop. InlineTypeNode* vt = new InlineTypeNode(vk, oop); @@ -577,7 +583,7 @@ InlineTypeNode* InlineTypeNode::make_from_oop(GraphKit* kit, Node* oop, ciInline // Oop can never be null Node* init_ctl = kit->control(); vt->load(kit, oop, oop, vk, /* holder_offset */ 0); - assert(init_ctl != kit->control() || !gvn.type(oop)->is_inlinetypeptr() || oop->is_Con() || oop->Opcode() == Op_InlineTypePtr || + assert(vt->is_default(&gvn) || init_ctl != kit->control() || !gvn.type(oop)->is_inlinetypeptr() || oop->is_Con() || oop->Opcode() == Op_InlineTypePtr || AllocateNode::Ideal_allocation(oop, &gvn) != NULL || vt->is_loaded(&gvn) == oop, "inline type should be loaded"); } @@ -599,8 +605,8 @@ InlineTypeNode* InlineTypeNode::make_from_flattened(GraphKit* kit, ciInlineKlass } InlineTypeNode* InlineTypeNode::make_from_multi(GraphKit* kit, MultiNode* multi, ExtendedSignature& sig, ciInlineKlass* vk, uint& base_input, bool in) { - InlineTypeNode* vt = InlineTypeNode::make_uninitialized(kit->gvn(), vk); - vt->initialize_fields(kit, multi, sig, base_input, 0, in); + InlineTypeNode* vt = make_uninitialized(kit->gvn(), vk); + vt->initialize_fields(kit, multi, sig, base_input, in); return kit->gvn().transform(vt)->as_InlineType(); } @@ -659,10 +665,12 @@ Node* InlineTypeNode::is_loaded(PhaseGVN* phase, ciInlineKlass* vk, Node* base, if (value->is_InlineType()) { InlineTypeNode* vt = value->as_InlineType(); if (field_is_flattened(i)) { - // Check inline type field load recursively - base = vt->is_loaded(phase, vk, base, offset - vt->inline_klass()->first_field_offset()); - if (base == NULL) { - return NULL; + if (!vt->inline_klass()->is_empty()) { + // Check inline type field load recursively + base = vt->is_loaded(phase, vk, base, offset - vt->inline_klass()->first_field_offset()); + if (base == NULL) { + return NULL; + } } continue; } else { @@ -705,16 +713,16 @@ Node* InlineTypeNode::tagged_klass(ciInlineKlass* vk, PhaseGVN& gvn) { return gvn.makecon(TypeRawPtr::make((address)bits)); } -void InlineTypeNode::pass_fields(GraphKit* kit, Node* n, ExtendedSignature& sig, uint& base_input, int base_offset) { +void InlineTypeNode::pass_fields(GraphKit* kit, Node* n, ExtendedSignature& sig, uint& base_input) { for (uint i = 0; i < field_count(); i++) { - int sig_offset = (*sig)._offset; - uint idx = field_index(sig_offset - base_offset); - Node* arg = field_value(idx); + int offset = field_offset(i); + ciType* type = field_type(i); + Node* arg = field_value(i); - if (field_is_flattened(idx)) { + if (field_is_flattened(i)) { // Flattened inline type field InlineTypeNode* vt = arg->as_InlineType(); - vt->pass_fields(kit, n, sig, base_input, sig_offset - vt->inline_klass()->first_field_offset()); + vt->pass_fields(kit, n, sig, base_input); } else { if (arg->is_InlineType()) { // Non-flattened inline type field @@ -739,18 +747,15 @@ void InlineTypeNode::pass_fields(GraphKit* kit, Node* n, ExtendedSignature& sig, } } -void InlineTypeNode::initialize_fields(GraphKit* kit, MultiNode* multi, ExtendedSignature& sig, uint& base_input, int base_offset, bool in) { +void InlineTypeNode::initialize_fields(GraphKit* kit, MultiNode* multi, ExtendedSignature& sig, uint& base_input, bool in) { PhaseGVN& gvn = kit->gvn(); - for (uint i = 0; i < field_count(); i++) { - int sig_offset = (*sig)._offset; - uint idx = field_index(sig_offset - base_offset); - ciType* type = field_type(idx); - + for (uint i = 0; i < field_count(); ++i) { + ciType* type = field_type(i); Node* parm = NULL; - if (field_is_flattened(idx)) { + if (field_is_flattened(i)) { // Flattened inline type field - InlineTypeNode* vt = InlineTypeNode::make_uninitialized(gvn, type->as_inline_klass()); - vt->initialize_fields(kit, multi, sig, base_input, sig_offset - type->as_inline_klass()->first_field_offset(), in); + InlineTypeNode* vt = make_uninitialized(gvn, type->as_inline_klass()); + vt->initialize_fields(kit, multi, sig, base_input, in); parm = gvn.transform(vt); } else { if (multi->is_Start()) { @@ -764,20 +769,21 @@ void InlineTypeNode::initialize_fields(GraphKit* kit, MultiNode* multi, Extended if (type->is_inlinetype()) { // Non-flattened inline type field if (type->as_inline_klass()->is_scalarizable()) { - parm = InlineTypeNode::make_from_oop(kit, parm, type->as_inline_klass()); + parm = make_from_oop(kit, parm, type->as_inline_klass()); } else { parm = kit->null2default(parm, type->as_inline_klass()); } } - base_input += type2size[type->basic_type()]; - // Skip reserved arguments BasicType bt = type->basic_type(); + base_input += type2size[bt]; + // Skip reserved arguments while (SigEntry::next_is_reserved(sig, bt)) { base_input += type2size[bt]; } } assert(parm != NULL, "should never be null"); - set_field_value(idx, parm); + assert(field_value(i) == NULL, "already set"); + set_field_value(i, parm); gvn.record_for_igvn(parm); } } diff --git a/src/hotspot/share/opto/inlinetypenode.hpp b/src/hotspot/share/opto/inlinetypenode.hpp index bcbdd624831..9c733219253 100644 --- a/src/hotspot/share/opto/inlinetypenode.hpp +++ b/src/hotspot/share/opto/inlinetypenode.hpp @@ -76,7 +76,7 @@ class InlineTypeBaseNode : public TypeNode { bool field_is_flattened(uint index) const; // Replace InlineTypeNodes in debug info at safepoints with SafePointScalarObjectNodes - void make_scalar_in_safepoints(PhaseIterGVN* igvn); + void make_scalar_in_safepoints(PhaseIterGVN* igvn, bool allow_oop = true); // Store the inline type as a flattened (headerless) representation void store_flattened(GraphKit* kit, Node* base, Node* ptr, ciInstanceKlass* holder = NULL, int holder_offset = 0, DecoratorSet decorators = IN_HEAP | MO_UNORDERED) const; @@ -139,9 +139,9 @@ class InlineTypeNode : public InlineTypeBaseNode { } static Node* tagged_klass(ciInlineKlass* vk, PhaseGVN& gvn); // Pass inline type as fields at a call or return - void pass_fields(GraphKit* kit, Node* n, ExtendedSignature& sig, uint& base_input, int base_offset = 0); + void pass_fields(GraphKit* kit, Node* n, ExtendedSignature& sig, uint& base_input); // Initialize the inline type fields with the inputs or outputs of a MultiNode - void initialize_fields(GraphKit* kit, MultiNode* multi, ExtendedSignature& sig, uint& base_input, int base_offset, bool in); + void initialize_fields(GraphKit* kit, MultiNode* multi, ExtendedSignature& sig, uint& base_input, bool in); // Allocation optimizations void remove_redundant_allocations(PhaseIterGVN* igvn, PhaseIdealLoop* phase); diff --git a/src/hotspot/share/opto/loopPredicate.cpp b/src/hotspot/share/opto/loopPredicate.cpp index 91aad8cad84..7f04d2ac6c2 100644 --- a/src/hotspot/share/opto/loopPredicate.cpp +++ b/src/hotspot/share/opto/loopPredicate.cpp @@ -210,8 +210,7 @@ ProjNode* PhaseIdealLoop::create_new_if_for_predicate(ProjNode* cont_proj, Node* } //--------------------------clone_predicate----------------------- -ProjNode* PhaseIdealLoop::clone_loop_predicate(ProjNode* predicate_proj, Node* new_entry, Deoptimization::DeoptReason reason, - bool is_slow_loop, uint idx_before_clone, Node_List &old_new) { +ProjNode* PhaseIdealLoop::clone_predicate_to_unswitched_loop(ProjNode* predicate_proj, Node* new_entry, Deoptimization::DeoptReason reason) { ProjNode* new_predicate_proj = create_new_if_for_predicate(predicate_proj, new_entry, reason, Op_If); IfNode* iff = new_predicate_proj->in(0)->as_If(); Node* ctrl = iff->in(0); @@ -225,16 +224,14 @@ ProjNode* PhaseIdealLoop::clone_loop_predicate(ProjNode* predicate_proj, Node* n register_new_node(bol, ctrl); _igvn.hash_delete(iff); iff->set_req(1, bol); - clone_concrete_loop_predicates(reason, predicate_proj, new_predicate_proj, is_slow_loop, idx_before_clone, old_new); return new_predicate_proj; } -// Clones all non-empty loop predicates (including skeleton predicates) starting at 'old_predicate_proj' to 'new_predicate_proj' -// and rewires the control edges of data nodes in the loop to the old predicates to the new cloned predicates. -void PhaseIdealLoop::clone_concrete_loop_predicates(Deoptimization::DeoptReason reason, ProjNode* old_predicate_proj, - ProjNode* new_predicate_proj, bool is_slow_loop, uint idx_before_clone, - Node_List &old_new) { - assert(old_predicate_proj->is_Proj(), "must be projection"); +// Clones skeleton predicates starting at 'old_predicate_proj' to +// 'new_predicate_proj' and rewires the control edges of data nodes in +// the loop from the old predicates to the new cloned predicates. +void PhaseIdealLoop::clone_skeleton_predicates_to_unswitched_loop(IdealLoopTree* loop, const Node_List& old_new, Deoptimization::DeoptReason reason, + ProjNode* old_predicate_proj, ProjNode* iffast, ProjNode* ifslow) { IfNode* iff = old_predicate_proj->in(0)->as_If(); ProjNode* uncommon_proj = iff->proj_out(1 - old_predicate_proj->as_Proj()->_con); Node* rgn = uncommon_proj->unique_ctrl_out(); @@ -249,93 +246,60 @@ void PhaseIdealLoop::clone_concrete_loop_predicates(Deoptimization::DeoptReason uncommon_proj = iff->proj_out(1 - predicate->as_Proj()->_con); if (uncommon_proj->unique_ctrl_out() != rgn) break; - if (iff->is_RangeCheck()) { + if (iff->in(1)->Opcode() == Op_Opaque4 && skeleton_predicate_has_opaque(iff)) { // Only need to clone range check predicates as those can be changed and duplicated by inserting pre/main/post loops // and doing loop unrolling. Push the original predicates on a list to later process them in reverse order to keep the // original predicate order. list.push(predicate); -#ifdef ASSERT - } else { - // All other If predicates should not have a control input to nodes belonging to the original loop - for (DUIterator i = predicate->outs(); predicate->has_out(i); i++) { - Node* old_node = predicate->out(i); - Node* new_node = old_new[old_node->_idx]; - if (!old_node->is_CFG() && new_node != NULL && old_node->_idx >= idx_before_clone) { - assert(false, "should not be part of the original loop"); - } - } -#endif } predicate = predicate->in(0)->in(0); } + Node_List to_process; // Process in reverse order such that 'create_new_if_for_predicate' can be used and the original order is maintained for (int i = list.size()-1; i >= 0; i--) { predicate = list.at(i); assert(predicate->in(0)->is_If(), "must be If node"); iff = predicate->in(0)->as_If(); - assert(predicate->is_Proj() && predicate->as_Proj()->is_IfProj() && iff->is_RangeCheck(), "predicate must be a projection of a range check"); + assert(predicate->is_Proj() && predicate->as_Proj()->is_IfProj(), "predicate must be a projection of an if node"); IfProjNode* predicate_proj = predicate->as_IfProj(); // cloned_proj is the same type of projection as the original predicate projection (IfTrue or IfFalse) - ProjNode* cloned_proj = create_new_if_for_predicate(new_predicate_proj, NULL, reason, Op_RangeCheck, predicate_proj->is_IfTrue()); + ProjNode* fast_proj = create_new_if_for_predicate(iffast, NULL, reason, iff->Opcode(), predicate_proj->is_IfTrue()); + ProjNode* slow_proj = create_new_if_for_predicate(ifslow, NULL, reason, iff->Opcode(), predicate_proj->is_IfTrue()); // Replace bool input by input from original predicate - _igvn.replace_input_of(cloned_proj->in(0), 1, iff->in(1)); - - if (is_slow_loop) { - for (DUIterator i = predicate->outs(); predicate->has_out(i); i++) { - Node* slow_node = predicate->out(i); - Node* fast_node = old_new[slow_node->_idx]; - if (!slow_node->is_CFG() && fast_node != NULL && slow_node->_idx > idx_before_clone) { - // 'slow_node' is a data node and part of the slow loop. This is a clone of the fast loop node - // which was temporarily added below in order to verify that 'slow_node' is a clone of 'fast_node'. - // Update the control input and reset the mapping for 'slow_node' back to NULL. - _igvn.replace_input_of(slow_node, 0, cloned_proj); - old_new.map(slow_node->_idx, NULL); - --i; - } - assert(slow_node->_idx <= idx_before_clone || old_new[slow_node->_idx] == NULL, "mapping of cloned nodes must be null"); - } + _igvn.replace_input_of(fast_proj->in(0), 1, iff->in(1)); + _igvn.replace_input_of(slow_proj->in(0), 1, iff->in(1)); - // Let old predicates before unswitched loops which were cloned die if all their control edges were rewired - // to the cloned predicates in the unswitched loops. - if (predicate->outcnt() == 1) { - _igvn.replace_input_of(iff, 1, _igvn.intcon(predicate_proj->_con)); - } - } else { - // Fast loop - for (DUIterator i = predicate->outs(); predicate->has_out(i); i++) { - Node* fast_node = predicate->out(i); + for (DUIterator i = predicate->outs(); predicate->has_out(i); i++) { + Node* fast_node = predicate->out(i); + if (loop->is_member(get_loop(ctrl_or_self(fast_node)))) { + assert(fast_node->in(0) == predicate, "only control edge"); Node* slow_node = old_new[fast_node->_idx]; - if (!fast_node->is_CFG() && slow_node != NULL && slow_node->_idx > idx_before_clone) { - // 'fast_node' is a data node and part of the fast loop. Add the clone of the fast loop node - // to the 'old_new' mapping in order to verify later when cloning the predicates for the slow loop - // that 'slow_node' is a clone of 'fast_node'. Update the control input for 'fast_node'. - _igvn.replace_input_of(fast_node, 0, cloned_proj); - assert(old_new[slow_node->_idx] == NULL, "mapping must be null for cloned nodes"); - old_new.map(slow_node->_idx, fast_node); - --i; - } + assert(slow_node->in(0) == predicate, "only control edge"); + _igvn.replace_input_of(fast_node, 0, fast_proj); + to_process.push(slow_node); + --i; } } + // Have to delay updates to the slow loop so uses of predicate are + // not modified while we iterate on them. + while (to_process.size() > 0) { + Node* slow_node = to_process.pop(); + _igvn.replace_input_of(slow_node, 0, slow_proj); + } } } //--------------------------clone_loop_predicates----------------------- // Clone loop predicates to cloned loops when unswitching a loop. -Node* PhaseIdealLoop::clone_loop_predicates(Node* old_entry, Node* new_entry, bool clone_limit_check, - bool is_slow_loop, uint idx_before_clone, Node_List &old_new) { -#ifdef ASSERT - assert(LoopUnswitching, "sanity - only called when unswitching a loop"); - if (new_entry == NULL || !(new_entry->is_Proj() || new_entry->is_Region() || new_entry->is_SafePoint())) { - if (new_entry != NULL) - new_entry->dump(); - assert(false, "not IfTrue, IfFalse, Region or SafePoint"); - } -#endif +void PhaseIdealLoop::clone_predicates_to_unswitched_loop(IdealLoopTree* loop, const Node_List& old_new, ProjNode*& iffast, ProjNode*& ifslow) { + LoopNode* head = loop->_head->as_Loop(); + bool clone_limit_check = !head->is_CountedLoop(); + Node* entry = head->skip_strip_mined()->in(LoopNode::EntryControl); + // Search original predicates - Node* entry = old_entry; ProjNode* limit_check_proj = NULL; limit_check_proj = find_predicate_insertion_point(entry, Deoptimization::Reason_loop_limit_check); if (limit_check_proj != NULL) { @@ -354,39 +318,45 @@ Node* PhaseIdealLoop::clone_loop_predicates(Node* old_entry, Node* new_entry, bo } if (predicate_proj != NULL) { // right pattern that can be used by loop predication // clone predicate - new_entry = clone_loop_predicate(predicate_proj, new_entry, Deoptimization::Reason_predicate, is_slow_loop, - idx_before_clone, old_new); - assert(new_entry != NULL && new_entry->is_Proj(), "IfTrue or IfFalse after clone predicate"); - if (TraceLoopPredicate) { - tty->print("Loop Predicate cloned: "); - debug_only( new_entry->in(0)->dump(); ); - } + iffast = clone_predicate_to_unswitched_loop(predicate_proj, iffast, Deoptimization::Reason_predicate); + ifslow = clone_predicate_to_unswitched_loop(predicate_proj, ifslow, Deoptimization::Reason_predicate); + clone_skeleton_predicates_to_unswitched_loop(loop, old_new, Deoptimization::Reason_predicate, predicate_proj, iffast, ifslow); + + check_created_predicate_for_unswitching(iffast); + check_created_predicate_for_unswitching(ifslow); } if (profile_predicate_proj != NULL) { // right pattern that can be used by loop predication // clone predicate - new_entry = clone_loop_predicate(profile_predicate_proj, new_entry,Deoptimization::Reason_profile_predicate, - is_slow_loop, idx_before_clone, old_new); - assert(new_entry != NULL && new_entry->is_Proj(), "IfTrue or IfFalse after clone predicate"); - if (TraceLoopPredicate) { - tty->print("Loop Predicate cloned: "); - debug_only( new_entry->in(0)->dump(); ); - } + iffast = clone_predicate_to_unswitched_loop(profile_predicate_proj, iffast, Deoptimization::Reason_profile_predicate); + ifslow = clone_predicate_to_unswitched_loop(profile_predicate_proj, ifslow, Deoptimization::Reason_profile_predicate); + clone_skeleton_predicates_to_unswitched_loop(loop, old_new, Deoptimization::Reason_profile_predicate, profile_predicate_proj, iffast, ifslow); + + check_created_predicate_for_unswitching(iffast); + check_created_predicate_for_unswitching(ifslow); } if (limit_check_proj != NULL && clone_limit_check) { // Clone loop limit check last to insert it before loop. // Don't clone a limit check which was already finalized // for this counted loop (only one limit check is needed). - new_entry = clone_loop_predicate(limit_check_proj, new_entry, Deoptimization::Reason_loop_limit_check, - is_slow_loop, idx_before_clone, old_new); - assert(new_entry != NULL && new_entry->is_Proj(), "IfTrue or IfFalse after clone limit check"); - if (TraceLoopLimitCheck) { - tty->print("Loop Limit Check cloned: "); - debug_only( new_entry->in(0)->dump(); ) - } + iffast = clone_predicate_to_unswitched_loop(limit_check_proj, iffast, Deoptimization::Reason_loop_limit_check); + ifslow = clone_predicate_to_unswitched_loop(limit_check_proj, ifslow, Deoptimization::Reason_loop_limit_check); + + check_created_predicate_for_unswitching(iffast); + check_created_predicate_for_unswitching(ifslow); } - return new_entry; } +#ifndef PRODUCT +void PhaseIdealLoop::check_created_predicate_for_unswitching(const Node* new_entry) const { + assert(new_entry != NULL, "IfTrue or IfFalse after clone predicate"); + if (TraceLoopPredicate) { + tty->print("Loop Predicate cloned: "); + debug_only(new_entry->in(0)->dump();); + } +} +#endif + + //--------------------------skip_loop_predicates------------------------------ // Skip related predicates. Node* PhaseIdealLoop::skip_loop_predicates(Node* entry) { diff --git a/src/hotspot/share/opto/loopTransform.cpp b/src/hotspot/share/opto/loopTransform.cpp index ec7ecc7bdfc..ff266916b4b 100644 --- a/src/hotspot/share/opto/loopTransform.cpp +++ b/src/hotspot/share/opto/loopTransform.cpp @@ -40,6 +40,7 @@ #include "opto/subnode.hpp" #include "opto/superword.hpp" #include "opto/vectornode.hpp" +#include "runtime/globals_extension.hpp" //------------------------------is_loop_exit----------------------------------- // Given an IfNode, return the loop-exiting projection or NULL if both diff --git a/src/hotspot/share/opto/loopUnswitch.cpp b/src/hotspot/share/opto/loopUnswitch.cpp index 04be30a07dd..de335c6b785 100644 --- a/src/hotspot/share/opto/loopUnswitch.cpp +++ b/src/hotspot/share/opto/loopUnswitch.cpp @@ -347,7 +347,6 @@ ProjNode* PhaseIdealLoop::create_slow_version_of_loop(IdealLoopTree *loop, register_node(iffast, outer_loop, iff, dom_depth(iff)); ProjNode* ifslow = new IfFalseNode(iff); register_node(ifslow, outer_loop, iff, dom_depth(iff)); - uint idx_before_clone = Compile::current()->unique(); // Clone the loop body. The clone becomes the slow loop. The // original pre-header will (illegally) have 3 control users @@ -355,11 +354,10 @@ ProjNode* PhaseIdealLoop::create_slow_version_of_loop(IdealLoopTree *loop, clone_loop(loop, old_new, dom_depth(head->skip_strip_mined()), mode, iff); assert(old_new[head->_idx]->is_Loop(), "" ); - // Fast (true) control - Node* iffast_pred = clone_loop_predicates(entry, iffast, !counted_loop, false, idx_before_clone, old_new); - - // Slow (false) control - Node* ifslow_pred = clone_loop_predicates(entry, ifslow, !counted_loop, true, idx_before_clone, old_new); + // Fast (true) and Slow (false) control + ProjNode* iffast_pred = iffast; + ProjNode* ifslow_pred = ifslow; + clone_predicates_to_unswitched_loop(loop, old_new, iffast_pred, ifslow_pred); Node* l = head->skip_strip_mined(); _igvn.replace_input_of(l, LoopNode::EntryControl, iffast_pred); diff --git a/src/hotspot/share/opto/loopnode.cpp b/src/hotspot/share/opto/loopnode.cpp index 1919c98b075..04a54b4f2fb 100644 --- a/src/hotspot/share/opto/loopnode.cpp +++ b/src/hotspot/share/opto/loopnode.cpp @@ -49,7 +49,7 @@ // Determine if a node is a counted loop induction variable. // NOTE: The method is declared in "node.hpp". bool Node::is_cloop_ind_var() const { - return (is_Phi() && !as_Phi()->is_copy() && + return (is_Phi() && as_Phi()->region()->is_CountedLoop() && as_Phi()->region()->as_CountedLoop()->phi() == this); } diff --git a/src/hotspot/share/opto/loopnode.hpp b/src/hotspot/share/opto/loopnode.hpp index 9435b465274..814df456a0a 100644 --- a/src/hotspot/share/opto/loopnode.hpp +++ b/src/hotspot/share/opto/loopnode.hpp @@ -1435,13 +1435,11 @@ class PhaseIdealLoop : public PhaseTransform { } // Clone loop predicates to slow and fast loop when unswitching a loop - Node* clone_loop_predicates(Node* old_entry, Node* new_entry, bool clone_limit_check, bool is_slow_loop, - uint idx_before_clone, Node_List &old_new); - ProjNode* clone_loop_predicate(ProjNode* predicate_proj, Node* new_entry, Deoptimization::DeoptReason reason, - bool is_slow_loop, uint idx_before_clone, Node_List &old_new); - void clone_concrete_loop_predicates(Deoptimization::DeoptReason reason, ProjNode* old_predicate_proj, - ProjNode* new_predicate_proj, bool is_slow_loop, - uint idx_before_clone, Node_List &old_new); + void clone_predicates_to_unswitched_loop(IdealLoopTree* loop, const Node_List& old_new, ProjNode*& iffast, ProjNode*& ifslow); + ProjNode* clone_predicate_to_unswitched_loop(ProjNode* predicate_proj, Node* new_entry, Deoptimization::DeoptReason reason); + void clone_skeleton_predicates_to_unswitched_loop(IdealLoopTree* loop, const Node_List& old_new, Deoptimization::DeoptReason reason, + ProjNode* old_predicate_proj, ProjNode* iffast, ProjNode* ifslow); + void check_created_predicate_for_unswitching(const Node* new_entry) const PRODUCT_RETURN; bool _created_loop_node; #ifdef ASSERT diff --git a/src/hotspot/share/opto/macro.cpp b/src/hotspot/share/opto/macro.cpp index ef2242b201a..3f0e0d89f80 100644 --- a/src/hotspot/share/opto/macro.cpp +++ b/src/hotspot/share/opto/macro.cpp @@ -614,8 +614,6 @@ Node* PhaseMacroExpand::inline_type_from_mem(Node* mem, Node* ctl, ciInlineKlass for (int i = 0; i < vk->nof_declared_nonstatic_fields(); ++i) { ciType* field_type = vt->field_type(i); int field_offset = offset + vt->field_offset(i); - // Each inline type field has its own memory slice - adr_type = adr_type->with_field_offset(field_offset); Node* value = NULL; if (vt->field_is_flattened(i)) { value = inline_type_from_mem(mem, ctl, field_type->as_inline_klass(), adr_type, field_offset, alloc); @@ -626,6 +624,8 @@ Node* PhaseMacroExpand::inline_type_from_mem(Node* mem, Node* ctl, ciInlineKlass ft = ft->make_narrowoop(); bt = T_NARROWOOP; } + // Each inline type field has its own memory slice + adr_type = adr_type->with_field_offset(field_offset); value = value_from_mem(mem, ctl, bt, ft, adr_type, alloc); if (value != NULL && ft->isa_narrowoop()) { assert(UseCompressedOops, "unexpected narrow oop"); @@ -969,10 +969,13 @@ bool PhaseMacroExpand::scalar_replacement(AllocateNode *alloc, GrowableArray <Sa _igvn._worklist.push(sfpt); safepoints_done.append_if_missing(sfpt); // keep it for rollback } - // Scalarize inline types that were added to the safepoint + // Scalarize inline types that were added to the safepoint. + // Don't allow linking a constant oop (if available) for flat array elements + // because Deoptimization::reassign_flat_array_elements needs field values. + bool allow_oop = (klass == NULL) || !klass->is_flat_array_klass(); for (uint i = 0; i < value_worklist.size(); ++i) { Node* vt = value_worklist.at(i); - vt->as_InlineType()->make_scalar_in_safepoints(&_igvn); + vt->as_InlineType()->make_scalar_in_safepoints(&_igvn, allow_oop); } return true; } diff --git a/src/hotspot/share/opto/memnode.cpp b/src/hotspot/share/opto/memnode.cpp index 9e6c08e175f..55d9a996352 100644 --- a/src/hotspot/share/opto/memnode.cpp +++ b/src/hotspot/share/opto/memnode.cpp @@ -4689,8 +4689,7 @@ Node *MergeMemNode::Ideal(PhaseGVN *phase, bool can_reshape) { Node* phi_reg = NULL; uint phi_len = (uint)-1; - if (phi_base != NULL && !phi_base->is_copy()) { - // do not examine phi if degraded to a copy + if (phi_base != NULL) { phi_reg = phi_base->region(); phi_len = phi_base->req(); // see if the phi is unfinished @@ -5005,10 +5004,6 @@ bool MergeMemStream::match_memory(Node* mem, const MergeMemNode* mm, int idx) { if (mem == n) return true; // might be empty_memory() n = (idx == Compile::AliasIdxBot)? mm->base_memory(): mm->memory_at(idx); if (mem == n) return true; - while (n->is_Phi() && (n = n->as_Phi()->is_copy()) != NULL) { - if (mem == n) return true; - if (n == NULL) break; - } return false; } #endif // !PRODUCT diff --git a/src/hotspot/share/opto/node.cpp b/src/hotspot/share/opto/node.cpp index b9179de40a9..e101f62f534 100644 --- a/src/hotspot/share/opto/node.cpp +++ b/src/hotspot/share/opto/node.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -329,6 +329,7 @@ Node::Node(uint req) : _idx(Init(req)) #ifdef ASSERT , _parse_idx(_idx) + , _indent(0) #endif { assert( req < Compile::current()->max_node_limit() - NodeLimitFudgeFactor, "Input limit exceeded" ); @@ -349,6 +350,7 @@ Node::Node(Node *n0) : _idx(Init(1)) #ifdef ASSERT , _parse_idx(_idx) + , _indent(0) #endif { debug_only( verify_construction() ); @@ -362,6 +364,7 @@ Node::Node(Node *n0, Node *n1) : _idx(Init(2)) #ifdef ASSERT , _parse_idx(_idx) + , _indent(0) #endif { debug_only( verify_construction() ); @@ -377,6 +380,7 @@ Node::Node(Node *n0, Node *n1, Node *n2) : _idx(Init(3)) #ifdef ASSERT , _parse_idx(_idx) + , _indent(0) #endif { debug_only( verify_construction() ); @@ -394,6 +398,7 @@ Node::Node(Node *n0, Node *n1, Node *n2, Node *n3) : _idx(Init(4)) #ifdef ASSERT , _parse_idx(_idx) + , _indent(0) #endif { debug_only( verify_construction() ); @@ -413,6 +418,7 @@ Node::Node(Node *n0, Node *n1, Node *n2, Node *n3, Node *n4) : _idx(Init(5)) #ifdef ASSERT , _parse_idx(_idx) + , _indent(0) #endif { debug_only( verify_construction() ); @@ -435,6 +441,7 @@ Node::Node(Node *n0, Node *n1, Node *n2, Node *n3, : _idx(Init(6)) #ifdef ASSERT , _parse_idx(_idx) + , _indent(0) #endif { debug_only( verify_construction() ); @@ -459,6 +466,7 @@ Node::Node(Node *n0, Node *n1, Node *n2, Node *n3, : _idx(Init(7)) #ifdef ASSERT , _parse_idx(_idx) + , _indent(0) #endif { debug_only( verify_construction() ); @@ -1045,7 +1053,7 @@ bool Node::verify_jvms(const JVMState* using_jvms) const { //------------------------------init_NodeProperty------------------------------ void Node::init_NodeProperty() { - assert(_max_classes <= max_jushort, "too many NodeProperty classes"); + assert(_max_classes <= max_juint, "too many NodeProperty classes"); assert(max_flags() <= max_jushort, "too many NodeProperty flags"); } @@ -1727,7 +1735,12 @@ void Node::dump(const char* suffix, bool mark, outputStream *st) const { Compile* C = Compile::current(); bool is_new = C->node_arena()->contains(this); C->_in_dump_cnt++; - st->print("%c%d%s\t%s\t=== ", is_new ? ' ' : 'o', _idx, mark ? " >" : "", Name()); + + if (_indent > 0) { + st->print("%*s", (_indent << 1), " "); + } + + st->print("%c%d%s%s === ", is_new ? ' ' : 'o', _idx, mark ? " >" : " ", Name()); // Dump the required and precedence inputs dump_req(st); @@ -1852,7 +1865,7 @@ void Node::dump_out(outputStream *st) const { // moving in a given direction until a certain depth (distance from the start // node) is reached. Duplicates are ignored. // Arguments: -// nstack: the nodes are collected into this array. +// queue: the nodes are collected into this array. // start: the node at which to start collecting. // direction: if this is a positive number, collect input nodes; if it is // a negative number, collect output nodes. @@ -1860,15 +1873,18 @@ void Node::dump_out(outputStream *st) const { // include_start: whether to include the start node in the result collection. // only_ctrl: whether to regard control edges only during traversal. // only_data: whether to regard data edges only during traversal. -static void collect_nodes_i(GrowableArray<Node*> *nstack, const Node* start, int direction, uint depth, bool include_start, bool only_ctrl, bool only_data) { +static void collect_nodes_i(GrowableArray<Node*>* queue, const Node* start, int direction, uint depth, bool include_start, bool only_ctrl, bool only_data) { + bool indent = depth <= PrintIdealIndentThreshold; Node* s = (Node*) start; // remove const - nstack->append(s); + queue->append(s); int begin = 0; int end = 0; + + s->set_indent(0); for(uint i = 0; i < depth; i++) { - end = nstack->length(); + end = queue->length(); for(int j = begin; j < end; j++) { - Node* tp = nstack->at(j); + Node* tp = queue->at(j); uint limit = direction > 0 ? tp->len() : tp->outcnt(); for(uint k = 0; k < limit; k++) { Node* n = direction > 0 ? tp->in(k) : tp->raw_out(k); @@ -1878,17 +1894,17 @@ static void collect_nodes_i(GrowableArray<Node*> *nstack, const Node* start, int if (n->is_Root() || n->is_top()) continue; if (only_ctrl && !n->is_CFG()) continue; if (only_data && n->is_CFG()) continue; - - bool on_stack = nstack->contains(n); - if (!on_stack) { - nstack->append(n); + bool in_queue = queue->contains(n); + if (!in_queue) { + queue->append(n); + n->set_indent(indent ? (i + 1) : 0); } } } begin = end; } if (!include_start) { - nstack->remove(s); + queue->remove(s); } } @@ -1896,17 +1912,17 @@ static void collect_nodes_i(GrowableArray<Node*> *nstack, const Node* start, int static void dump_nodes(const Node* start, int d, bool only_ctrl) { if (NotANode(start)) return; - GrowableArray <Node *> nstack(Compile::current()->live_nodes()); - collect_nodes_i(&nstack, start, d, (uint) ABS(d), true, only_ctrl, false); + GrowableArray <Node *> queue(Compile::current()->live_nodes()); + collect_nodes_i(&queue, start, d, (uint) ABS(d), true, only_ctrl, false); - int end = nstack.length(); + int end = queue.length(); if (d > 0) { for(int j = end-1; j >= 0; j--) { - nstack.at(j)->dump(); + queue.at(j)->dump(); } } else { for(int j = 0; j < end; j++) { - nstack.at(j)->dump(); + queue.at(j)->dump(); } } } diff --git a/src/hotspot/share/opto/node.hpp b/src/hotspot/share/opto/node.hpp index a6f1b05e9c8..488136124eb 100644 --- a/src/hotspot/share/opto/node.hpp +++ b/src/hotspot/share/opto/node.hpp @@ -613,7 +613,7 @@ class Node { ClassMask_##cl = ((Bit_##cl << 1) - 1) , // This enum is used only for C2 ideal and mach nodes with is_<node>() methods - // so that it's values fits into 16 bits. + // so that its values fit into 32 bits. enum NodeClasses { Bit_Node = 0x00000000, Class_Node = 0x00000000, @@ -729,7 +729,7 @@ class Node { DEFINE_CLASS_ID(Halt, Node, 15) DEFINE_CLASS_ID(Opaque1, Node, 16) - _max_classes = ClassMask_Halt + _max_classes = ClassMask_Opaque1 }; #undef DEFINE_CLASS_ID @@ -1134,6 +1134,12 @@ class Node { //----------------- Printing, etc #ifndef PRODUCT + int _indent; + + public: + void set_indent(int indent) { _indent = indent; } + + private: static bool add_to_worklist(Node* n, Node_List* worklist, Arena* old_arena, VectorSet* old_space, VectorSet* new_space); public: Node* find(int idx, bool only_ctrl = false); // Search the graph for the given idx. diff --git a/src/hotspot/share/opto/parse1.cpp b/src/hotspot/share/opto/parse1.cpp index 49f2dd08fd3..c290b3bc8e5 100644 --- a/src/hotspot/share/opto/parse1.cpp +++ b/src/hotspot/share/opto/parse1.cpp @@ -863,12 +863,12 @@ JVMState* Compile::build_start_state(StartNode* start, const TypeFunc* tf) { set_default_node_notes(entry_nn); } PhaseGVN& gvn = *initial_gvn(); - uint j = 0; + uint i = 0; ExtendedSignature sig_cc = ExtendedSignature(method()->get_sig_cc(), SigEntryFilter()); - for (uint i = 0; i < (uint)arg_size; i++) { + for (uint j = 0; i < (uint)arg_size; i++) { const Type* t = tf->domain_sig()->field_at(i); Node* parm = NULL; - if (has_scalarized_args() && t->is_inlinetypeptr() && !t->maybe_null()) { + if (has_scalarized_args() && t->is_inlinetypeptr() && !t->maybe_null() && t->inline_klass()->can_be_passed_as_fields()) { // Inline type arguments are not passed by reference: we get an argument per // field of the inline type. Build InlineTypeNodes from the inline type arguments. GraphKit kit(jvms, &gvn); @@ -890,8 +890,8 @@ JVMState* Compile::build_start_state(StartNode* start, const TypeFunc* tf) { // Record all these guys for later GVN. record_for_igvn(parm); } - for (; j < map->req(); j++) { - map->init_req(j, top()); + for (; i < map->req(); i++) { + map->init_req(i, top()); } assert(jvms->argoff() == TypeFunc::Parms, "parser gets arguments here"); set_default_node_notes(old_nn); diff --git a/src/hotspot/share/opto/parse2.cpp b/src/hotspot/share/opto/parse2.cpp index 9f9525e5470..4e489de7b4f 100644 --- a/src/hotspot/share/opto/parse2.cpp +++ b/src/hotspot/share/opto/parse2.cpp @@ -295,6 +295,10 @@ void Parse::array_store(BasicType bt) { if (stopped()) return; dec_sp(3); } + if (elemtype->inline_klass()->is_empty()) { + // Ignore empty inline stores, array is already initialized. + return; + } } else if (!ary_t->is_not_flat() && tval != TypePtr::NULL_PTR) { // Array might be flattened, emit runtime checks (for NULL, a simple inline_array_null_guard is sufficient). assert(UseFlatArray && !not_flattened && elemtype->is_oopptr()->can_be_inline_type() && diff --git a/src/hotspot/share/opto/parse3.cpp b/src/hotspot/share/opto/parse3.cpp index b45f34d7536..1b45d29053c 100644 --- a/src/hotspot/share/opto/parse3.cpp +++ b/src/hotspot/share/opto/parse3.cpp @@ -120,7 +120,6 @@ void Parse::do_field_access(bool is_get, bool is_field) { void Parse::do_get_xxx(Node* obj, ciField* field) { BasicType bt = field->layout_type(); - // Does this field have a constant value? If so, just push the value. if (field->is_constant() && // Keep consistent with types found by ciTypeFlow: for an @@ -138,62 +137,52 @@ void Parse::do_get_xxx(Node* obj, ciField* field) { } ciType* field_klass = field->type(); - bool is_vol = field->is_volatile(); - bool flattened = field->is_flattened(); - - // Compute address and memory type. int offset = field->offset_in_bytes(); - const TypePtr* adr_type = C->alias_type(field)->adr_type(); - Node *adr = basic_plus_adr(obj, obj, offset); - - // Build the resultant type of the load - const Type *type; - bool must_assert_null = false; - DecoratorSet decorators = IN_HEAP; - decorators |= is_vol ? MO_SEQ_CST : MO_UNORDERED; - - bool is_obj = is_reference_type(bt); - - if (is_obj) { - if (!field->type()->is_loaded()) { - type = TypeInstPtr::BOTTOM; - must_assert_null = true; - } else if (field->is_static_constant()) { - // This can happen if the constant oop is non-perm. - ciObject* con = field->constant_value().as_object(); - // Do not "join" in the previous type; it doesn't add value, - // and may yield a vacuous result if the field is of interface type. - if (con->is_null_object()) { - type = TypePtr::NULL_PTR; + Node* ld = NULL; + if (bt == T_INLINE_TYPE && field_klass->as_inline_klass()->is_empty()) { + // Loading from a field of an empty inline type. Just return the default instance. + ld = InlineTypeNode::make_default(_gvn, field_klass->as_inline_klass()); + } else if (field->is_flattened()) { + // Loading from a flattened inline type field. + ld = InlineTypeNode::make_from_flattened(this, field_klass->as_inline_klass(), obj, obj, field->holder(), offset); + } else { + // Build the resultant type of the load + const Type* type; + if (is_reference_type(bt)) { + if (!field_klass->is_loaded()) { + type = TypeInstPtr::BOTTOM; + must_assert_null = true; + } else if (field->is_static_constant()) { + // This can happen if the constant oop is non-perm. + ciObject* con = field->constant_value().as_object(); + // Do not "join" in the previous type; it doesn't add value, + // and may yield a vacuous result if the field is of interface type. + if (con->is_null_object()) { + type = TypePtr::NULL_PTR; + } else { + type = TypeOopPtr::make_from_constant(con)->isa_oopptr(); + } + assert(type != NULL, "field singleton type must be consistent"); } else { - type = TypeOopPtr::make_from_constant(con)->isa_oopptr(); - } - assert(type != NULL, "field singleton type must be consistent"); - } else { - type = TypeOopPtr::make_from_klass(field_klass->as_klass()); - if (bt == T_INLINE_TYPE && field->is_static()) { - // Check if static inline type field is already initialized - assert(!flattened, "static fields should not be flattened"); - ciInstance* mirror = field->holder()->java_mirror(); - ciObject* val = mirror->field_value(field).as_object(); - if (!val->is_null_object()) { - type = type->join_speculative(TypePtr::NOTNULL); + type = TypeOopPtr::make_from_klass(field_klass->as_klass()); + if (bt == T_INLINE_TYPE && field->is_static()) { + // Check if static inline type field is already initialized + ciInstance* mirror = field->holder()->java_mirror(); + ciObject* val = mirror->field_value(field).as_object(); + if (!val->is_null_object()) { + type = type->join_speculative(TypePtr::NOTNULL); + } } } + } else { + type = Type::get_const_basic_type(bt); } - } else { - type = Type::get_const_basic_type(bt); - } - - Node* ld = NULL; - if (flattened) { - // Load flattened inline type - ld = InlineTypeNode::make_from_flattened(this, field_klass->as_inline_klass(), obj, obj, field->holder(), offset); - } else { + Node* adr = basic_plus_adr(obj, obj, offset); + const TypePtr* adr_type = C->alias_type(field)->adr_type(); DecoratorSet decorators = IN_HEAP; - decorators |= is_vol ? MO_SEQ_CST : MO_UNORDERED; + decorators |= field->is_volatile() ? MO_SEQ_CST : MO_UNORDERED; ld = access_load_at(obj, adr, adr_type, type, bt, decorators); if (bt == T_INLINE_TYPE) { // Load a non-flattened inline type from memory @@ -227,7 +216,7 @@ void Parse::do_get_xxx(Node* obj, ciField* field) { } if (C->log() != NULL) { C->log()->elem("assert_null reason='field' klass='%d'", - C->log()->identify(field->type())); + C->log()->identify(field_klass)); } // If there is going to be a trap, put it at the next bytecode: set_bci(iter().next_bci()); @@ -238,48 +227,36 @@ void Parse::do_get_xxx(Node* obj, ciField* field) { void Parse::do_put_xxx(Node* obj, ciField* field, bool is_field) { bool is_vol = field->is_volatile(); - - // Compute address and memory type. int offset = field->offset_in_bytes(); - const TypePtr* adr_type = C->alias_type(field)->adr_type(); - Node* adr = basic_plus_adr(obj, obj, offset); BasicType bt = field->layout_type(); - // Value to be stored Node* val = type2size[bt] == 1 ? pop() : pop_pair(); - DecoratorSet decorators = IN_HEAP; - decorators |= is_vol ? MO_SEQ_CST : MO_UNORDERED; - - bool is_obj = is_reference_type(bt); - // Store the value. - const Type* field_type; - if (!field->type()->is_loaded()) { - field_type = TypeInstPtr::BOTTOM; - } else { - if (is_obj) { - field_type = TypeOopPtr::make_from_klass(field->type()->as_klass()); - } else { - field_type = Type::BOTTOM; - } - } - - if (bt == T_INLINE_TYPE && !val->is_InlineType()) { - // We can see a null constant here - assert(val->bottom_type()->remove_speculative() == TypePtr::NULL_PTR, "Anything other than null?"); - push(null()); - uncommon_trap(Deoptimization::Reason_null_check, Deoptimization::Action_none); - assert(stopped(), "dead path"); + assert(bt != T_INLINE_TYPE || val->is_InlineType() || !gvn().type(val)->maybe_null(), "Null store to inline type field"); + if (bt == T_INLINE_TYPE && field->type()->as_inline_klass()->is_empty()) { + // Storing to a field of an empty inline type. Ignore. return; - } - - if (field->is_flattened()) { - // Store flattened inline type to a non-static field + } else if (field->is_flattened()) { + // Storing to a flattened inline type field. if (!val->is_InlineType()) { - assert(!gvn().type(val)->maybe_null(), "should never be null"); val = InlineTypeNode::make_from_oop(this, val, field->type()->as_inline_klass()); } - val->as_InlineType()->store_flattened(this, obj, obj, field->holder(), offset, decorators); + val->as_InlineType()->store_flattened(this, obj, obj, field->holder(), offset); } else { + // Store the value. + const Type* field_type; + if (!field->type()->is_loaded()) { + field_type = TypeInstPtr::BOTTOM; + } else { + if (is_reference_type(bt)) { + field_type = TypeOopPtr::make_from_klass(field->type()->as_klass()); + } else { + field_type = Type::BOTTOM; + } + } + Node* adr = basic_plus_adr(obj, obj, offset); + const TypePtr* adr_type = C->alias_type(field)->adr_type(); + DecoratorSet decorators = IN_HEAP; + decorators |= is_vol ? MO_SEQ_CST : MO_UNORDERED; inc_sp(1); access_store_at(obj, adr, adr_type, val, field_type, bt, decorators); dec_sp(1); diff --git a/src/hotspot/share/opto/parseHelper.cpp b/src/hotspot/share/opto/parseHelper.cpp index 0319fea74d2..3869e084a03 100644 --- a/src/hotspot/share/opto/parseHelper.cpp +++ b/src/hotspot/share/opto/parseHelper.cpp @@ -281,6 +281,7 @@ void Parse::do_new() { bool will_link; ciInstanceKlass* klass = iter().get_klass(will_link)->as_instance_klass(); assert(will_link, "_new: typeflow responsibility"); + assert(!klass->is_inlinetype(), "unexpected inline type"); // Should throw an InstantiationError? if (klass->is_abstract() || klass->is_interface() || diff --git a/src/hotspot/share/opto/phaseX.cpp b/src/hotspot/share/opto/phaseX.cpp index 1740f5f8303..7f2fdd35073 100644 --- a/src/hotspot/share/opto/phaseX.cpp +++ b/src/hotspot/share/opto/phaseX.cpp @@ -975,26 +975,11 @@ PhaseIterGVN::PhaseIterGVN( PhaseGVN *gvn ) : PhaseGVN(gvn), } } -/** - * Initialize worklist for each node. - */ -void PhaseIterGVN::init_worklist(Node* first) { - Unique_Node_List to_process; - to_process.push(first); - - while (to_process.size() > 0) { - Node* n = to_process.pop(); - if (!_worklist.member(n)) { - _worklist.push(n); - - uint cnt = n->req(); - for(uint i = 0; i < cnt; i++) { - Node* m = n->in(i); - if (m != NULL) { - to_process.push(m); - } - } - } +void PhaseIterGVN::shuffle_worklist() { + if (_worklist.size() < 2) return; + for (uint i = _worklist.size() - 1; i >= 1; i--) { + uint j = C->random() % (i + 1); + swap(_worklist.adr()[i], _worklist.adr()[j]); } } @@ -1150,6 +1135,9 @@ void PhaseIterGVN::trace_PhaseIterGVN_verbose(Node* n, int num_processed) { void PhaseIterGVN::optimize() { DEBUG_ONLY(uint num_processed = 0;) NOT_PRODUCT(init_verifyPhaseIterGVN();) + if (StressIGVN) { + shuffle_worklist(); + } uint loop_count = 0; // Pull from worklist and transform the node. If the node has changed, diff --git a/src/hotspot/share/opto/phaseX.hpp b/src/hotspot/share/opto/phaseX.hpp index 96fc3b0fd1c..80aacb75d34 100644 --- a/src/hotspot/share/opto/phaseX.hpp +++ b/src/hotspot/share/opto/phaseX.hpp @@ -458,8 +458,8 @@ class PhaseIterGVN : public PhaseGVN { protected: - // Warm up hash table, type table and initial worklist - void init_worklist( Node *a_root ); + // Shuffle worklist, for stress testing + void shuffle_worklist(); virtual const Type* saturate(const Type* new_type, const Type* old_type, const Type* limit_type) const; diff --git a/src/hotspot/share/opto/subnode.cpp b/src/hotspot/share/opto/subnode.cpp index 6e4d2277be0..f0e29c2239c 100644 --- a/src/hotspot/share/opto/subnode.cpp +++ b/src/hotspot/share/opto/subnode.cpp @@ -124,7 +124,7 @@ static bool is_cloop_increment(Node* inc) { } const PhiNode* phi = inc->in(1)->as_Phi(); - if (phi->is_copy() || !phi->region()->is_CountedLoop()) { + if (!phi->region()->is_CountedLoop()) { return false; } diff --git a/src/hotspot/share/opto/vectornode.cpp b/src/hotspot/share/opto/vectornode.cpp index d94f3a5329a..b3703e11403 100644 --- a/src/hotspot/share/opto/vectornode.cpp +++ b/src/hotspot/share/opto/vectornode.cpp @@ -835,46 +835,33 @@ MacroLogicVNode* MacroLogicVNode::make(PhaseGVN& gvn, Node* in1, Node* in2, Node Node* VectorNode::degenerate_vector_rotate(Node* src, Node* cnt, bool is_rotate_left, int vlen, BasicType bt, PhaseGVN* phase) { - int shiftLOpc; - int shiftROpc; - Node* shiftLCnt = NULL; - Node* shiftRCnt = NULL; + assert(bt == T_INT || bt == T_LONG, "sanity"); const TypeVect* vt = TypeVect::make(bt, vlen); + int shift_mask = (bt == T_INT) ? 0x1F : 0x3F; + int shiftLOpc = (bt == T_INT) ? Op_LShiftI : Op_LShiftL; + int shiftROpc = (bt == T_INT) ? Op_URShiftI: Op_URShiftL; + // Compute shift values for right rotation and // later swap them in case of left rotation. - if (cnt->is_Con()) { + Node* shiftRCnt = NULL; + Node* shiftLCnt = NULL; + if (cnt->is_Con() && cnt->bottom_type()->isa_int()) { // Constant shift case. - if (bt == T_INT) { - int shift = cnt->get_int() & 31; - shiftRCnt = phase->intcon(shift); - shiftLCnt = phase->intcon(32 - shift); - shiftLOpc = Op_LShiftI; - shiftROpc = Op_URShiftI; - } else { - int shift = cnt->get_int() & 63; - shiftRCnt = phase->intcon(shift); - shiftLCnt = phase->intcon(64 - shift); - shiftLOpc = Op_LShiftL; - shiftROpc = Op_URShiftL; - } + int shift = cnt->get_int() & shift_mask; + shiftRCnt = phase->intcon(shift); + shiftLCnt = phase->intcon(shift_mask + 1 - shift); } else { // Variable shift case. assert(VectorNode::is_invariant_vector(cnt), "Broadcast expected"); cnt = cnt->in(1); - if (bt == T_INT) { - shiftRCnt = phase->transform(new AndINode(cnt, phase->intcon(31))); - shiftLCnt = phase->transform(new SubINode(phase->intcon(32), shiftRCnt)); - shiftLOpc = Op_LShiftI; - shiftROpc = Op_URShiftI; - } else { + if (bt == T_LONG) { + // Shift count vector for Rotate vector has long elements too. assert(cnt->Opcode() == Op_ConvI2L, "ConvI2L expected"); cnt = cnt->in(1); - shiftRCnt = phase->transform(new AndINode(cnt, phase->intcon(63))); - shiftLCnt = phase->transform(new SubINode(phase->intcon(64), shiftRCnt)); - shiftLOpc = Op_LShiftL; - shiftROpc = Op_URShiftL; } + shiftRCnt = phase->transform(new AndINode(cnt, phase->intcon(shift_mask))); + shiftLCnt = phase->transform(new SubINode(phase->intcon(shift_mask + 1), shiftRCnt)); } // Swap the computed left and right shift counts. @@ -908,86 +895,3 @@ Node* RotateRightVNode::Ideal(PhaseGVN* phase, bool can_reshape) { return NULL; } -Node* OrVNode::Ideal(PhaseGVN* phase, bool can_reshape) { - int lopcode = in(1)->Opcode(); - int ropcode = in(2)->Opcode(); - const TypeVect* vt = bottom_type()->is_vect(); - int vec_len = vt->length(); - BasicType bt = vt->element_basic_type(); - - // Vector Rotate operations inferencing, this will be useful when vector - // operations are created via non-SLP route i.e. (VectorAPI). - if (Matcher::match_rule_supported_vector(Op_RotateLeftV, vec_len, bt) && - ((ropcode == Op_LShiftVI && lopcode == Op_URShiftVI) || - (ropcode == Op_LShiftVL && lopcode == Op_URShiftVL)) && - in(1)->in(1) == in(2)->in(1)) { - assert(Op_RShiftCntV == in(1)->in(2)->Opcode(), "LShiftCntV operand expected"); - assert(Op_LShiftCntV == in(2)->in(2)->Opcode(), "RShiftCntV operand expected"); - Node* lshift = in(1)->in(2)->in(1); - Node* rshift = in(2)->in(2)->in(1); - int mod_val = bt == T_LONG ? 64 : 32; - int shift_mask = bt == T_LONG ? 0x3F : 0x1F; - // val >> norm_con_shift | val << (32 - norm_con_shift) => rotate_right val , - // norm_con_shift - if (lshift->is_Con() && rshift->is_Con() && - ((lshift->get_int() & shift_mask) == - (mod_val - (rshift->get_int() & shift_mask)))) { - return new RotateRightVNode( - in(1)->in(1), phase->intcon(lshift->get_int() & shift_mask), vt); - } - if (lshift->Opcode() == Op_AndI && rshift->Opcode() == Op_AndI && - lshift->in(2)->is_Con() && rshift->in(2)->is_Con() && - lshift->in(2)->get_int() == (mod_val - 1) && - rshift->in(2)->get_int() == (mod_val - 1)) { - lshift = lshift->in(1); - rshift = rshift->in(1); - // val << var_shift | val >> (0/32 - var_shift) => rotate_left val , - // var_shift - if (lshift->Opcode() == Op_SubI && lshift->in(2) == rshift && - lshift->in(1)->is_Con() && - (lshift->in(1)->get_int() == 0 || - lshift->in(1)->get_int() == mod_val)) { - Node* rotate_cnt = phase->transform(new ReplicateINode(rshift, vt)); - return new RotateLeftVNode(in(1)->in(1), rotate_cnt, vt); - } - } - } - - if (Matcher::match_rule_supported_vector(Op_RotateRightV, vec_len, bt) && - ((ropcode == Op_URShiftVI && lopcode == Op_LShiftVI) || - (ropcode == Op_URShiftVL && lopcode == Op_LShiftVL)) && - in(1)->in(1) == in(2)->in(1)) { - assert(Op_LShiftCntV == in(1)->in(2)->Opcode(), "RShiftCntV operand expected"); - assert(Op_RShiftCntV == in(2)->in(2)->Opcode(), "LShiftCntV operand expected"); - Node* rshift = in(1)->in(2)->in(1); - Node* lshift = in(2)->in(2)->in(1); - int mod_val = bt == T_LONG ? 64 : 32; - int shift_mask = bt == T_LONG ? 0x3F : 0x1F; - // val << norm_con_shift | val >> (32 - norm_con_shift) => rotate_left val - // , norm_con_shift - if (rshift->is_Con() && lshift->is_Con() && - ((rshift->get_int() & shift_mask) == - (mod_val - (lshift->get_int() & shift_mask)))) { - return new RotateLeftVNode( - in(1)->in(1), phase->intcon(rshift->get_int() & shift_mask), vt); - } - if (lshift->Opcode() == Op_AndI && rshift->Opcode() == Op_AndI && - lshift->in(2)->is_Con() && rshift->in(2)->is_Con() && - rshift->in(2)->get_int() == (mod_val - 1) && - lshift->in(2)->get_int() == (mod_val - 1)) { - rshift = rshift->in(1); - lshift = lshift->in(1); - // val >> var_shift | val << (0/32 - var_shift) => rotate_right val , - // var_shift - if (rshift->Opcode() == Op_SubI && rshift->in(2) == lshift && - rshift->in(1)->is_Con() && - (rshift->in(1)->get_int() == 0 || - rshift->in(1)->get_int() == mod_val)) { - Node* rotate_cnt = phase->transform(new ReplicateINode(lshift, vt)); - return new RotateRightVNode(in(1)->in(1), rotate_cnt, vt); - } - } - } - return NULL; -} - diff --git a/src/hotspot/share/opto/vectornode.hpp b/src/hotspot/share/opto/vectornode.hpp index 570f0645a01..719070f8ed2 100644 --- a/src/hotspot/share/opto/vectornode.hpp +++ b/src/hotspot/share/opto/vectornode.hpp @@ -624,7 +624,6 @@ class OrVNode : public VectorNode { public: OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {} virtual int Opcode() const; - Node* Ideal(PhaseGVN* phase, bool can_reshape); }; //------------------------------XorVNode--------------------------------------- diff --git a/src/hotspot/share/prims/jni.cpp b/src/hotspot/share/prims/jni.cpp index 77a27595c29..33fc5c4d053 100644 --- a/src/hotspot/share/prims/jni.cpp +++ b/src/hotspot/share/prims/jni.cpp @@ -95,7 +95,7 @@ static jint CurrentVersion = JNI_VERSION_10; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING) extern LONG WINAPI topLevelExceptionFilter(_EXCEPTION_POINTERS* ); #endif @@ -2522,7 +2522,6 @@ JNI_ENTRY(jobject, jni_GetObjectArrayElement(JNIEnv *env, jobjectArray array, js if (arr->is_within_bounds(index)) { if (arr->is_flatArray()) { flatArrayOop a = flatArrayOop(JNIHandles::resolve_non_null(array)); - arrayHandle ah(THREAD, a); flatArrayHandle vah(thread, a); res = flatArrayOopDesc::value_alloc_copy_from_index(vah, index, CHECK_NULL); assert(res != NULL, "Must be set in one of two paths above"); @@ -3488,18 +3487,19 @@ JNI_END JNI_ENTRY(jobject, jni_CreateSubElementSelector(JNIEnv* env, jarray array)) JNIWrapper("jni_CreateSubElementSelector"); - arrayOop ar = arrayOop(JNIHandles::resolve_non_null(array)); + oop ar = JNIHandles::resolve_non_null(array); if (!ar->is_array()) { THROW_MSG_NULL(vmSymbols::java_lang_IllegalArgumentException(), "Not an array"); } if (!ar->is_flatArray()) { THROW_MSG_NULL(vmSymbols::java_lang_IllegalArgumentException(), "Not a flattened array"); } + flatArrayHandle ar_h(THREAD, flatArrayOop(ar)); Klass* ses_k = SystemDictionary::resolve_or_null(vmSymbols::jdk_internal_vm_jni_SubElementSelector(), Handle(THREAD, SystemDictionary::java_system_loader()), Handle(), CHECK_NULL); InstanceKlass* ses_ik = InstanceKlass::cast(ses_k); ses_ik->initialize(CHECK_NULL); - Klass* elementKlass = ArrayKlass::cast(ar->klass())->element_klass(); + Klass* elementKlass = ArrayKlass::cast(ar_h()->klass())->element_klass(); oop ses = ses_ik->allocate_instance(CHECK_NULL); Handle ses_h(THREAD, ses); jdk_internal_vm_jni_SubElementSelector::setArrayElementType(ses_h(), elementKlass->java_mirror()); @@ -3571,12 +3571,13 @@ JNI_ENTRY(jobject, jni_GetObjectSubElement(JNIEnv* env, jarray array, jobject se + jdk_internal_vm_jni_SubElementSelector::getOffset(slct); res = HeapAccess<ON_UNKNOWN_OOP_REF>::oop_load_at(ar, offset); } else { + Handle slct_h(THREAD, slct); InlineKlass* fieldKlass = InlineKlass::cast(java_lang_Class::as_Klass(jdk_internal_vm_jni_SubElementSelector::getSubElementType(slct))); res = fieldKlass->allocate_instance_buffer(CHECK_NULL); // The array might have been moved by the GC, refreshing the arrayOop ar = (flatArrayOop)JNIHandles::resolve_non_null(array); address addr = (address)ar->value_at_addr(index, vak->layout_helper()) - + jdk_internal_vm_jni_SubElementSelector::getOffset(slct); + + jdk_internal_vm_jni_SubElementSelector::getOffset(slct_h()); fieldKlass->inline_copy_payload_to_new_oop(addr, res); } return JNIHandles::make_local(res); @@ -4257,11 +4258,11 @@ static jint JNI_CreateJavaVM_inner(JavaVM **vm, void **penv, void *args) { _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM(JavaVM **vm, void **penv, void *args) { jint result = JNI_ERR; // On Windows, let CreateJavaVM run with SEH protection -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING) __try { #endif result = JNI_CreateJavaVM_inner(vm, penv, args); -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING) } __except(topLevelExceptionFilter((_EXCEPTION_POINTERS*)_exception_info())) { // Nothing to do. } @@ -4329,11 +4330,11 @@ static jint JNICALL jni_DestroyJavaVM_inner(JavaVM *vm) { jint JNICALL jni_DestroyJavaVM(JavaVM *vm) { jint result = JNI_ERR; // On Windows, we need SEH protection -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING) __try { #endif result = jni_DestroyJavaVM_inner(vm); -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USE_VECTORED_EXCEPTION_HANDLING) } __except(topLevelExceptionFilter((_EXCEPTION_POINTERS*)_exception_info())) { // Nothing to do. } diff --git a/src/hotspot/share/prims/jvm.cpp b/src/hotspot/share/prims/jvm.cpp index 3cd7820bfd0..84c81688aa6 100644 --- a/src/hotspot/share/prims/jvm.cpp +++ b/src/hotspot/share/prims/jvm.cpp @@ -66,6 +66,7 @@ #include "prims/stackwalk.hpp" #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/handles.inline.hpp" #include "runtime/init.hpp" #include "runtime/interfaceSupport.inline.hpp" @@ -1287,9 +1288,6 @@ JVM_ENTRY(jobjectArray, JVM_GetClassInterfaces(JNIEnv *env, jclass cls)) if (klass->is_instance_klass()) { InstanceKlass* ik = InstanceKlass::cast(klass); size = ik->local_interfaces()->length(); - if (ik->has_injected_identityObject()) { - size--; - } } else { assert(klass->is_objArray_klass() || klass->is_typeArray_klass(), "Illegal mirror klass"); size = 3; @@ -1301,13 +1299,10 @@ JVM_ENTRY(jobjectArray, JVM_GetClassInterfaces(JNIEnv *env, jclass cls)) // Fill in result if (klass->is_instance_klass()) { // Regular instance klass, fill in all local interfaces - int cursor = 0; for (int index = 0; index < size; index++) { InstanceKlass* ik = InstanceKlass::cast(klass); Klass* k = ik->local_interfaces()->at(index); - if (!ik->has_injected_identityObject() || k != SystemDictionary::IdentityObject_klass()) { - result->obj_at_put(cursor++, k->java_mirror()); - } + result->obj_at_put(index, k->java_mirror()); } } else { // All arrays implement java.lang.Cloneable, java.io.Serializable and java.lang.IdentityObject @@ -3909,18 +3904,18 @@ JVM_ENTRY(jclass, JVM_LookupLambdaProxyClassFromArchive(JNIEnv* env, #endif // INCLUDE_CDS JVM_END -JVM_ENTRY(jboolean, JVM_IsCDSDumpingEnabled(JNIEnv* env)) - JVMWrapper("JVM_IsCDSDumpingEnable"); +JVM_ENTRY(jboolean, JVM_IsDynamicDumpingEnabled(JNIEnv* env)) + JVMWrapper("JVM_IsDynamicDumpingEnable"); return DynamicDumpSharedSpaces; JVM_END -JVM_ENTRY(jboolean, JVM_IsCDSSharingEnabled(JNIEnv* env)) - JVMWrapper("JVM_IsCDSSharingEnable"); +JVM_ENTRY(jboolean, JVM_IsSharingEnabled(JNIEnv* env)) + JVMWrapper("JVM_IsSharingEnable"); return UseSharedSpaces; JVM_END -JVM_ENTRY_NO_ENV(jlong, JVM_GetRandomSeedForCDSDump()) - JVMWrapper("JVM_GetRandomSeedForCDSDump"); +JVM_ENTRY_NO_ENV(jlong, JVM_GetRandomSeedForDumping()) + JVMWrapper("JVM_GetRandomSeedForDumping"); if (DumpSharedSpaces) { const char* release = Abstract_VM_Version::vm_release(); const char* dbg_level = Abstract_VM_Version::jdk_debug_level(); @@ -3935,7 +3930,7 @@ JVM_ENTRY_NO_ENV(jlong, JVM_GetRandomSeedForCDSDump()) if (seed == 0) { // don't let this ever be zero. seed = 0x87654321; } - log_debug(cds)("JVM_GetRandomSeedForCDSDump() = " JLONG_FORMAT, seed); + log_debug(cds)("JVM_GetRandomSeedForDumping() = " JLONG_FORMAT, seed); return seed; } else { return 0; diff --git a/src/hotspot/share/prims/jvmtiEnv.cpp b/src/hotspot/share/prims/jvmtiEnv.cpp index 6e74fe84d15..9d7aae14116 100644 --- a/src/hotspot/share/prims/jvmtiEnv.cpp +++ b/src/hotspot/share/prims/jvmtiEnv.cpp @@ -1213,8 +1213,8 @@ JvmtiEnv::GetOwnedMonitorInfo(JavaThread* java_thread, jint* owned_monitor_count } else { // get owned monitors info with handshake GetOwnedMonitorInfoClosure op(calling_thread, this, owned_monitors_list); - bool executed = Handshake::execute_direct(&op, java_thread); - err = executed ? op.result() : JVMTI_ERROR_THREAD_NOT_ALIVE; + Handshake::execute(&op, java_thread); + err = op.result(); } jint owned_monitor_count = owned_monitors_list->length(); if (err == JVMTI_ERROR_NONE) { @@ -1258,8 +1258,8 @@ JvmtiEnv::GetOwnedMonitorStackDepthInfo(JavaThread* java_thread, jint* monitor_i } else { // get owned monitors info with handshake GetOwnedMonitorInfoClosure op(calling_thread, this, owned_monitors_list); - bool executed = Handshake::execute_direct(&op, java_thread); - err = executed ? op.result() : JVMTI_ERROR_THREAD_NOT_ALIVE; + Handshake::execute(&op, java_thread); + err = op.result(); } jint owned_monitor_count = owned_monitors_list->length(); @@ -1302,8 +1302,8 @@ JvmtiEnv::GetCurrentContendedMonitor(JavaThread* java_thread, jobject* monitor_p } else { // get contended monitor information with handshake GetCurrentContendedMonitorClosure op(calling_thread, this, monitor_ptr); - bool executed = Handshake::execute_direct(&op, java_thread); - err = executed ? op.result() : JVMTI_ERROR_THREAD_NOT_ALIVE; + Handshake::execute(&op, java_thread); + err = op.result(); } return err; } /* end GetCurrentContendedMonitor */ @@ -1540,8 +1540,8 @@ JvmtiEnv::GetStackTrace(JavaThread* java_thread, jint start_depth, jint max_fram } else { // Get stack trace with handshake. GetStackTraceClosure op(this, start_depth, max_frame_count, frame_buffer, count_ptr); - bool executed = Handshake::execute_direct(&op, java_thread); - err = executed ? op.result() : JVMTI_ERROR_THREAD_NOT_ALIVE; + Handshake::execute(&op, java_thread); + err = op.result(); } return err; @@ -1585,8 +1585,8 @@ JvmtiEnv::GetThreadListStackTraces(jint thread_count, const jthread* thread_list } GetSingleStackTraceClosure op(this, current_thread, *thread_list, max_frame_count); - bool executed = Handshake::execute_direct(&op, java_thread); - err = executed ? op.result() : JVMTI_ERROR_THREAD_NOT_ALIVE; + Handshake::execute(&op, java_thread); + err = op.result(); if (err == JVMTI_ERROR_NONE) { *stack_info_ptr = op.stack_info(); } @@ -1623,8 +1623,8 @@ JvmtiEnv::GetFrameCount(JavaThread* java_thread, jint* count_ptr) { } else { // get java stack frame count with handshake. GetFrameCountClosure op(this, state, count_ptr); - bool executed = Handshake::execute_direct(&op, java_thread); - err = executed ? op.result() : JVMTI_ERROR_THREAD_NOT_ALIVE; + Handshake::execute(&op, java_thread); + err = op.result(); } return err; } /* end GetFrameCount */ @@ -1721,10 +1721,9 @@ JvmtiEnv::PopFrame(JavaThread* java_thread) { state->update_for_pop_top_frame(); } else { UpdateForPopTopFrameClosure op(state); - bool executed = Handshake::execute_direct(&op, java_thread); - jvmtiError err = executed ? op.result() : JVMTI_ERROR_THREAD_NOT_ALIVE; - if (err != JVMTI_ERROR_NONE) { - return err; + Handshake::execute(&op, java_thread); + if (op.result() != JVMTI_ERROR_NONE) { + return op.result(); } } } @@ -1756,8 +1755,8 @@ JvmtiEnv::GetFrameLocation(JavaThread* java_thread, jint depth, jmethodID* metho } else { // JVMTI get java stack frame location via direct handshake. GetFrameLocationClosure op(this, depth, method_ptr, location_ptr); - bool executed = Handshake::execute_direct(&op, java_thread); - err = executed ? op.result() : JVMTI_ERROR_THREAD_NOT_ALIVE; + Handshake::execute(&op, java_thread); + err = op.result(); } return err; } /* end GetFrameLocation */ @@ -1805,8 +1804,8 @@ JvmtiEnv::NotifyFramePop(JavaThread* java_thread, jint depth) { state->env_thread_state(this)->set_frame_pop(frame_number); } else { SetFramePopClosure op(this, state, depth); - bool executed = Handshake::execute_direct(&op, java_thread); - err = executed ? op.result() : JVMTI_ERROR_THREAD_NOT_ALIVE; + Handshake::execute(&op, java_thread); + err = op.result(); } return err; } /* end NotifyFramePop */ @@ -2656,18 +2655,14 @@ JvmtiEnv::GetImplementedInterfaces(oop k_mirror, jint* interface_count_ptr, jcla InstanceKlass* ik = InstanceKlass::cast(k); Array<InstanceKlass*>* interface_list = ik->local_interfaces(); int result_length = (interface_list == NULL ? 0 : interface_list->length()); - if (ik->has_injected_identityObject()) result_length--; jclass* result_list = (jclass*) jvmtiMalloc(result_length * sizeof(jclass)); - int cursor = 0; for (int i_index = 0; i_index < result_length; i_index += 1) { InstanceKlass* klass_at = interface_list->at(i_index); assert(klass_at->is_klass(), "interfaces must be Klass*s"); assert(klass_at->is_interface(), "interfaces must be interfaces"); - if (klass_at != SystemDictionary::IdentityObject_klass() || !ik->has_injected_identityObject()) { - oop mirror_at = klass_at->java_mirror(); - Handle handle_at = Handle(current_thread, mirror_at); - result_list[cursor++] = (jclass) jni_reference(handle_at); - } + oop mirror_at = klass_at->java_mirror(); + Handle handle_at = Handle(current_thread, mirror_at); + result_list[i_index] = (jclass) jni_reference(handle_at); } *interface_count_ptr = result_length; *interfaces_ptr = result_list; diff --git a/src/hotspot/share/prims/jvmtiEnvBase.cpp b/src/hotspot/share/prims/jvmtiEnvBase.cpp index 55e3e4ab9e3..8f59547518c 100644 --- a/src/hotspot/share/prims/jvmtiEnvBase.cpp +++ b/src/hotspot/share/prims/jvmtiEnvBase.cpp @@ -649,10 +649,9 @@ JvmtiEnvBase::count_locked_objects(JavaThread *java_thread, Handle hobj) { jvmtiError JvmtiEnvBase::get_current_contended_monitor(JavaThread *calling_thread, JavaThread *java_thread, jobject *monitor_ptr) { - JavaThread *current_jt = JavaThread::current(); - assert(current_jt == java_thread || - current_jt == java_thread->active_handshaker(), - "call by myself or at direct handshake"); + Thread *current_thread = Thread::current(); + assert(java_thread->is_handshake_safe_for(current_thread), + "call by myself or at handshake"); oop obj = NULL; // The ObjectMonitor* can't be async deflated since we are either // at a safepoint or the calling thread is operating on itself so @@ -676,8 +675,8 @@ JvmtiEnvBase::get_current_contended_monitor(JavaThread *calling_thread, JavaThre if (obj == NULL) { *monitor_ptr = NULL; } else { - HandleMark hm(current_jt); - Handle hobj(current_jt, obj); + HandleMark hm(current_thread); + Handle hobj(current_thread, obj); *monitor_ptr = jni_reference(calling_thread, hobj); } return JVMTI_ERROR_NONE; @@ -687,15 +686,19 @@ JvmtiEnvBase::get_current_contended_monitor(JavaThread *calling_thread, JavaThre jvmtiError JvmtiEnvBase::get_owned_monitors(JavaThread *calling_thread, JavaThread* java_thread, GrowableArray<jvmtiMonitorStackDepthInfo*> *owned_monitors_list) { + // Note: + // calling_thread is the thread that requested the list of monitors for java_thread. + // java_thread is the thread owning the monitors. + // current_thread is the thread executing this code, can be a non-JavaThread (e.g. VM Thread). + // And they all may be different threads. jvmtiError err = JVMTI_ERROR_NONE; - JavaThread *current_jt = JavaThread::current(); - assert(current_jt == java_thread || - current_jt == java_thread->active_handshaker(), - "call by myself or at direct handshake"); + Thread *current_thread = Thread::current(); + assert(java_thread->is_handshake_safe_for(current_thread), + "call by myself or at handshake"); if (java_thread->has_last_Java_frame()) { - ResourceMark rm(current_jt); - HandleMark hm(current_jt); + ResourceMark rm(current_thread); + HandleMark hm(current_thread); RegisterMap reg_map(java_thread); int depth = 0; @@ -819,9 +822,8 @@ JvmtiEnvBase::get_stack_trace(JavaThread *java_thread, uint32_t debug_bits = 0; #endif Thread *current_thread = Thread::current(); - assert(current_thread == java_thread || - SafepointSynchronize::is_at_safepoint() || - current_thread == java_thread->active_handshaker(), + assert(SafepointSynchronize::is_at_safepoint() || + java_thread->is_handshake_safe_for(current_thread), "call by myself / at safepoint / at handshake"); int count = 0; if (java_thread->has_last_Java_frame()) { @@ -903,9 +905,8 @@ JvmtiEnvBase::get_frame_location(JavaThread *java_thread, jint depth, uint32_t debug_bits = 0; #endif Thread* current_thread = Thread::current(); - assert(current_thread == java_thread || - current_thread == java_thread->active_handshaker(), - "call by myself or at direct handshake"); + assert(java_thread->is_handshake_safe_for(current_thread), + "call by myself or at handshake"); ResourceMark rm(current_thread); vframe *vf = vframeFor(java_thread, depth); @@ -1164,9 +1165,8 @@ void MultipleStackTracesCollector::fill_frames(jthread jt, JavaThread *thr, oop thread_oop) { #ifdef ASSERT Thread *current_thread = Thread::current(); - assert(current_thread == thr || - SafepointSynchronize::is_at_safepoint() || - current_thread == thr->active_handshaker(), + assert(SafepointSynchronize::is_at_safepoint() || + thr->is_handshake_safe_for(current_thread), "call by myself / at safepoint / at handshake"); #endif @@ -1310,7 +1310,7 @@ VM_GetAllStackTraces::doit() { // HandleMark must be defined in the caller only. // It is to keep a ret_ob_h handle alive after return to the caller. jvmtiError -JvmtiEnvBase::check_top_frame(JavaThread* current_thread, JavaThread* java_thread, +JvmtiEnvBase::check_top_frame(Thread* current_thread, JavaThread* java_thread, jvalue value, TosState tos, Handle* ret_ob_h) { ResourceMark rm(current_thread); @@ -1373,7 +1373,7 @@ JvmtiEnvBase::check_top_frame(JavaThread* current_thread, JavaThread* java_threa jvmtiError JvmtiEnvBase::force_early_return(JavaThread* java_thread, jvalue value, TosState tos) { - JavaThread* current_thread = JavaThread::current(); + Thread* current_thread = Thread::current(); HandleMark hm(current_thread); uint32_t debug_bits = 0; diff --git a/src/hotspot/share/prims/jvmtiEnvBase.hpp b/src/hotspot/share/prims/jvmtiEnvBase.hpp index 21d518cea7c..7d3db079957 100644 --- a/src/hotspot/share/prims/jvmtiEnvBase.hpp +++ b/src/hotspot/share/prims/jvmtiEnvBase.hpp @@ -306,7 +306,7 @@ class JvmtiEnvBase : public CHeapObj<mtInternal> { jobject *monitor_ptr); jvmtiError get_owned_monitors(JavaThread *calling_thread, JavaThread* java_thread, GrowableArray<jvmtiMonitorStackDepthInfo*> *owned_monitors_list); - jvmtiError check_top_frame(JavaThread* current_thread, JavaThread* java_thread, + jvmtiError check_top_frame(Thread* current_thread, JavaThread* java_thread, jvalue value, TosState tos, Handle* ret_ob_h); jvmtiError force_early_return(JavaThread* java_thread, jvalue value, TosState tos); }; @@ -336,58 +336,58 @@ class JvmtiEnvIterator : public StackObj { JvmtiEnv* next(JvmtiEnvBase* env) { return env->next_environment(); } }; +class JvmtiHandshakeClosure : public HandshakeClosure { + protected: + jvmtiError _result; + public: + JvmtiHandshakeClosure(const char* name) + : HandshakeClosure(name), + _result(JVMTI_ERROR_THREAD_NOT_ALIVE) {} + jvmtiError result() { return _result; } +}; + // HandshakeClosure to update for pop top frame. -class UpdateForPopTopFrameClosure : public HandshakeClosure { +class UpdateForPopTopFrameClosure : public JvmtiHandshakeClosure { private: JvmtiThreadState* _state; - jvmtiError _result; public: UpdateForPopTopFrameClosure(JvmtiThreadState* state) - : HandshakeClosure("UpdateForPopTopFrame"), - _state(state), - _result(JVMTI_ERROR_THREAD_NOT_ALIVE) {} - jvmtiError result() { return _result; } + : JvmtiHandshakeClosure("UpdateForPopTopFrame"), + _state(state) {} void do_thread(Thread *target); }; // HandshakeClosure to set frame pop. -class SetFramePopClosure : public HandshakeClosure { +class SetFramePopClosure : public JvmtiHandshakeClosure { private: JvmtiEnv *_env; JvmtiThreadState* _state; jint _depth; - jvmtiError _result; public: SetFramePopClosure(JvmtiEnv *env, JvmtiThreadState* state, jint depth) - : HandshakeClosure("SetFramePop"), + : JvmtiHandshakeClosure("SetFramePop"), _env(env), _state(state), - _depth(depth), - _result(JVMTI_ERROR_THREAD_NOT_ALIVE) {} - jvmtiError result() { return _result; } + _depth(depth) {} void do_thread(Thread *target); }; - // HandshakeClosure to get monitor information with stack depth. -class GetOwnedMonitorInfoClosure : public HandshakeClosure { +class GetOwnedMonitorInfoClosure : public JvmtiHandshakeClosure { private: JavaThread* _calling_thread; JvmtiEnv *_env; - jvmtiError _result; GrowableArray<jvmtiMonitorStackDepthInfo*> *_owned_monitors_list; public: GetOwnedMonitorInfoClosure(JavaThread* calling_thread, JvmtiEnv* env, GrowableArray<jvmtiMonitorStackDepthInfo*>* owned_monitor_list) - : HandshakeClosure("GetOwnedMonitorInfo"), + : JvmtiHandshakeClosure("GetOwnedMonitorInfo"), _calling_thread(calling_thread), _env(env), - _result(JVMTI_ERROR_THREAD_NOT_ALIVE), _owned_monitors_list(owned_monitor_list) {} - jvmtiError result() { return _result; } void do_thread(Thread *target); }; @@ -417,46 +417,39 @@ class VM_GetObjectMonitorUsage : public VM_Operation { }; // HandshakeClosure to get current contended monitor. -class GetCurrentContendedMonitorClosure : public HandshakeClosure { +class GetCurrentContendedMonitorClosure : public JvmtiHandshakeClosure { private: JavaThread *_calling_thread; JvmtiEnv *_env; jobject *_owned_monitor_ptr; - jvmtiError _result; public: GetCurrentContendedMonitorClosure(JavaThread* calling_thread, JvmtiEnv *env, jobject *mon_ptr) - : HandshakeClosure("GetCurrentContendedMonitor"), + : JvmtiHandshakeClosure("GetCurrentContendedMonitor"), _calling_thread(calling_thread), _env(env), - _owned_monitor_ptr(mon_ptr), - _result(JVMTI_ERROR_THREAD_NOT_ALIVE) {} - jvmtiError result() { return _result; } + _owned_monitor_ptr(mon_ptr) {} void do_thread(Thread *target); }; // HandshakeClosure to get stack trace. -class GetStackTraceClosure : public HandshakeClosure { +class GetStackTraceClosure : public JvmtiHandshakeClosure { private: JvmtiEnv *_env; jint _start_depth; jint _max_count; jvmtiFrameInfo *_frame_buffer; jint *_count_ptr; - jvmtiError _result; public: GetStackTraceClosure(JvmtiEnv *env, jint start_depth, jint max_count, jvmtiFrameInfo* frame_buffer, jint* count_ptr) - : HandshakeClosure("GetStackTrace"), + : JvmtiHandshakeClosure("GetStackTrace"), _env(env), _start_depth(start_depth), _max_count(max_count), _frame_buffer(frame_buffer), - _count_ptr(count_ptr), - _result(JVMTI_ERROR_THREAD_NOT_ALIVE) { - } - jvmtiError result() { return _result; } + _count_ptr(count_ptr) {} void do_thread(Thread *target); }; @@ -556,45 +549,37 @@ class GetSingleStackTraceClosure : public HandshakeClosure { }; // HandshakeClosure to count stack frames. -class GetFrameCountClosure : public HandshakeClosure { +class GetFrameCountClosure : public JvmtiHandshakeClosure { private: JvmtiEnv *_env; JvmtiThreadState *_state; jint *_count_ptr; - jvmtiError _result; public: GetFrameCountClosure(JvmtiEnv *env, JvmtiThreadState *state, jint *count_ptr) - : HandshakeClosure("GetFrameCount"), + : JvmtiHandshakeClosure("GetFrameCount"), _env(env), _state(state), - _count_ptr(count_ptr), - _result(JVMTI_ERROR_THREAD_NOT_ALIVE) { - } - jvmtiError result() { return _result; } + _count_ptr(count_ptr) {} void do_thread(Thread *target); }; // HandshakeClosure to get frame location. -class GetFrameLocationClosure : public HandshakeClosure { +class GetFrameLocationClosure : public JvmtiHandshakeClosure { private: JvmtiEnv *_env; jint _depth; jmethodID* _method_ptr; jlocation* _location_ptr; - jvmtiError _result; public: GetFrameLocationClosure(JvmtiEnv *env, jint depth, jmethodID* method_ptr, jlocation* location_ptr) - : HandshakeClosure("GetFrameLocation"), + : JvmtiHandshakeClosure("GetFrameLocation"), _env(env), _depth(depth), _method_ptr(method_ptr), - _location_ptr(location_ptr), - _result(JVMTI_ERROR_THREAD_NOT_ALIVE) { - } - jvmtiError result() { return _result; } + _location_ptr(location_ptr) {} void do_thread(Thread *target); }; diff --git a/src/hotspot/share/prims/jvmtiEnvThreadState.cpp b/src/hotspot/share/prims/jvmtiEnvThreadState.cpp index c6ed99e4a67..a154f82a810 100644 --- a/src/hotspot/share/prims/jvmtiEnvThreadState.cpp +++ b/src/hotspot/share/prims/jvmtiEnvThreadState.cpp @@ -194,7 +194,7 @@ JvmtiFramePops* JvmtiEnvThreadState::get_frame_pops() { #ifdef ASSERT Thread *current = Thread::current(); #endif - assert(get_thread() == current || current == get_thread()->active_handshaker(), + assert(get_thread()->is_handshake_safe_for(current), "frame pop data only accessible from same thread or direct handshake"); if (_frame_pops == NULL) { _frame_pops = new JvmtiFramePops(); @@ -212,7 +212,7 @@ void JvmtiEnvThreadState::set_frame_pop(int frame_number) { #ifdef ASSERT Thread *current = Thread::current(); #endif - assert(get_thread() == current || current == get_thread()->active_handshaker(), + assert(get_thread()->is_handshake_safe_for(current), "frame pop data only accessible from same thread or direct handshake"); JvmtiFramePop fpop(frame_number); JvmtiEventController::set_frame_pop(this, fpop); @@ -223,7 +223,7 @@ void JvmtiEnvThreadState::clear_frame_pop(int frame_number) { #ifdef ASSERT Thread *current = Thread::current(); #endif - assert(get_thread() == current || current == get_thread()->active_handshaker(), + assert(get_thread()->is_handshake_safe_for(current), "frame pop data only accessible from same thread or direct handshake"); JvmtiFramePop fpop(frame_number); JvmtiEventController::clear_frame_pop(this, fpop); @@ -234,7 +234,7 @@ bool JvmtiEnvThreadState::is_frame_pop(int cur_frame_number) { #ifdef ASSERT Thread *current = Thread::current(); #endif - assert(get_thread() == current || current == get_thread()->active_handshaker(), + assert(get_thread()->is_handshake_safe_for(current), "frame pop data only accessible from same thread or direct handshake"); if (!get_thread()->is_interp_only_mode() || _frame_pops == NULL) { return false; @@ -248,12 +248,13 @@ class GetCurrentLocationClosure : public HandshakeClosure { private: jmethodID _method_id; int _bci; - + bool _completed; public: GetCurrentLocationClosure() : HandshakeClosure("GetCurrentLocation"), _method_id(NULL), - _bci(0) {} + _bci(0), + _completed(false) {} void do_thread(Thread *target) { JavaThread *jt = target->as_Java_thread(); ResourceMark rmark; // jt != Thread::current() @@ -272,11 +273,15 @@ class GetCurrentLocationClosure : public HandshakeClosure { _method_id = (jmethodID)NULL; _bci = 0; } + _completed = true; } void get_current_location(jmethodID *method_id, int *bci) { *method_id = _method_id; *bci = _bci; } + bool completed() { + return _completed; + } }; void JvmtiEnvThreadState::reset_current_location(jvmtiEvent event_type, bool enabled) { @@ -314,11 +319,11 @@ void JvmtiEnvThreadState::reset_current_location(jvmtiEvent event_type, bool ena // so get current location with direct handshake. GetCurrentLocationClosure op; Thread *current = Thread::current(); - if (current == _thread || _thread->active_handshaker() == current) { + if (_thread->is_handshake_safe_for(current)) { op.do_thread(_thread); } else { - bool executed = Handshake::execute_direct(&op, _thread); - guarantee(executed, "Direct handshake failed. Target thread is not alive?"); + Handshake::execute(&op, _thread); + guarantee(op.completed(), "Handshake failed. Target thread is not alive?"); } op.get_current_location(&method_id, &bci); set_current_location(method_id, bci); diff --git a/src/hotspot/share/prims/jvmtiEventController.cpp b/src/hotspot/share/prims/jvmtiEventController.cpp index 5d6b49b22aa..ace58f4a3e0 100644 --- a/src/hotspot/share/prims/jvmtiEventController.cpp +++ b/src/hotspot/share/prims/jvmtiEventController.cpp @@ -194,9 +194,10 @@ JvmtiEnvEventEnable::~JvmtiEnvEventEnable() { // class EnterInterpOnlyModeClosure : public HandshakeClosure { - -public: - EnterInterpOnlyModeClosure() : HandshakeClosure("EnterInterpOnlyMode") { } + private: + bool _completed; + public: + EnterInterpOnlyModeClosure() : HandshakeClosure("EnterInterpOnlyMode"), _completed(false) { } void do_thread(Thread* th) { JavaThread* jt = th->as_Java_thread(); JvmtiThreadState* state = jt->jvmti_thread_state(); @@ -220,6 +221,10 @@ class EnterInterpOnlyModeClosure : public HandshakeClosure { } } } + _completed = true; + } + bool completed() { + return _completed = true; } }; @@ -333,11 +338,11 @@ void JvmtiEventControllerPrivate::enter_interp_only_mode(JvmtiThreadState *state EnterInterpOnlyModeClosure hs; JavaThread *target = state->get_thread(); Thread *current = Thread::current(); - if (target == current || target->active_handshaker() == current) { + if (target->is_handshake_safe_for(current)) { hs.do_thread(target); } else { - bool executed = Handshake::execute_direct(&hs, target); - guarantee(executed, "Direct handshake failed. Target thread is not alive?"); + Handshake::execute(&hs, target); + guarantee(hs.completed(), "Handshake failed: Target thread is not alive?"); } } diff --git a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp index 86b79751d6d..80a79ae83ed 100644 --- a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp +++ b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp @@ -96,31 +96,69 @@ static inline InstanceKlass* get_ik(jclass def) { // If any of the classes are being redefined, wait // Parallel constant pool merging leads to indeterminate constant pools. void VM_RedefineClasses::lock_classes() { + JvmtiThreadState *state = JvmtiThreadState::state_for(JavaThread::current()); + GrowableArray<Klass*>* redef_classes = state->get_classes_being_redefined(); + MonitorLocker ml(RedefineClasses_lock); + + if (redef_classes == NULL) { + redef_classes = new(ResourceObj::C_HEAP, mtClass) GrowableArray<Klass*>(1, mtClass); + state->set_classes_being_redefined(redef_classes); + } + bool has_redefined; do { has_redefined = false; - // Go through classes each time until none are being redefined. + // Go through classes each time until none are being redefined. Skip + // the ones that are being redefined by this thread currently. Class file + // load hook event may trigger new class redefine when we are redefining + // a class (after lock_classes()). for (int i = 0; i < _class_count; i++) { - if (get_ik(_class_defs[i].klass)->is_being_redefined()) { - ml.wait(); - has_redefined = true; - break; // for loop + InstanceKlass* ik = get_ik(_class_defs[i].klass); + // Check if we are currently redefining the class in this thread already. + if (redef_classes->contains(ik)) { + assert(ik->is_being_redefined(), "sanity"); + } else { + if (ik->is_being_redefined()) { + ml.wait(); + has_redefined = true; + break; // for loop + } } } } while (has_redefined); + for (int i = 0; i < _class_count; i++) { - get_ik(_class_defs[i].klass)->set_is_being_redefined(true); + InstanceKlass* ik = get_ik(_class_defs[i].klass); + redef_classes->push(ik); // Add to the _classes_being_redefined list + ik->set_is_being_redefined(true); } ml.notify_all(); } void VM_RedefineClasses::unlock_classes() { + JvmtiThreadState *state = JvmtiThreadState::state_for(JavaThread::current()); + GrowableArray<Klass*>* redef_classes = state->get_classes_being_redefined(); + assert(redef_classes != NULL, "_classes_being_redefined is not allocated"); + MonitorLocker ml(RedefineClasses_lock); - for (int i = 0; i < _class_count; i++) { - assert(get_ik(_class_defs[i].klass)->is_being_redefined(), + + for (int i = _class_count - 1; i >= 0; i--) { + InstanceKlass* def_ik = get_ik(_class_defs[i].klass); + if (redef_classes->length() > 0) { + // Remove the class from _classes_being_redefined list + Klass* k = redef_classes->pop(); + assert(def_ik == k, "unlocking wrong class"); + } + assert(def_ik->is_being_redefined(), "should be being redefined to get here"); - get_ik(_class_defs[i].klass)->set_is_being_redefined(false); + + // Unlock after we finish all redefines for this class within + // the thread. Same class can be pushed to the list multiple + // times (not more than once by each recursive redefinition). + if (!redef_classes->contains(def_ik)) { + def_ik->set_is_being_redefined(false); + } } ml.notify_all(); } diff --git a/src/hotspot/share/prims/jvmtiTagMap.cpp b/src/hotspot/share/prims/jvmtiTagMap.cpp index 263d1ec0c82..94f1fcc541e 100644 --- a/src/hotspot/share/prims/jvmtiTagMap.cpp +++ b/src/hotspot/share/prims/jvmtiTagMap.cpp @@ -187,8 +187,7 @@ class JvmtiTagHashmap : public CHeapObj<mtInternal> { // hash a given key (oop) with the specified size static unsigned int hash(oop key, int size) { - const oop obj = Access<>::resolve(key); - const unsigned int hash = Universe::heap()->hash_oop(obj); + const unsigned int hash = Universe::heap()->hash_oop(key); return hash % size; } @@ -1751,7 +1750,6 @@ static jvmtiHeapRootKind toJvmtiHeapRootKind(jvmtiHeapReferenceKind kind) { switch (kind) { case JVMTI_HEAP_REFERENCE_JNI_GLOBAL: return JVMTI_HEAP_ROOT_JNI_GLOBAL; case JVMTI_HEAP_REFERENCE_SYSTEM_CLASS: return JVMTI_HEAP_ROOT_SYSTEM_CLASS; - case JVMTI_HEAP_REFERENCE_MONITOR: return JVMTI_HEAP_ROOT_MONITOR; case JVMTI_HEAP_REFERENCE_STACK_LOCAL: return JVMTI_HEAP_ROOT_STACK_LOCAL; case JVMTI_HEAP_REFERENCE_JNI_LOCAL: return JVMTI_HEAP_ROOT_JNI_LOCAL; case JVMTI_HEAP_REFERENCE_THREAD: return JVMTI_HEAP_ROOT_THREAD; @@ -3017,13 +3015,6 @@ inline bool VM_HeapWalkOperation::collect_simple_roots() { return false; } - // Inflated monitors - blk.set_kind(JVMTI_HEAP_REFERENCE_MONITOR); - ObjectSynchronizer::oops_do(&blk); - if (blk.stopped()) { - return false; - } - // threads are now handled in collect_stack_roots() // Other kinds of roots maintained by HotSpot diff --git a/src/hotspot/share/prims/jvmtiThreadState.cpp b/src/hotspot/share/prims/jvmtiThreadState.cpp index 2bcf10689e1..1d1dc7aced3 100644 --- a/src/hotspot/share/prims/jvmtiThreadState.cpp +++ b/src/hotspot/share/prims/jvmtiThreadState.cpp @@ -57,6 +57,7 @@ JvmtiThreadState::JvmtiThreadState(JavaThread* thread) _pending_step_for_popframe = false; _class_being_redefined = NULL; _class_load_kind = jvmti_class_load_kind_load; + _classes_being_redefined = NULL; _head_env_thread_state = NULL; _dynamic_code_event_collector = NULL; _vm_object_alloc_event_collector = NULL; @@ -106,6 +107,10 @@ JvmtiThreadState::JvmtiThreadState(JavaThread* thread) JvmtiThreadState::~JvmtiThreadState() { assert(JvmtiThreadState_lock->is_locked(), "sanity check"); + if (_classes_being_redefined != NULL) { + delete _classes_being_redefined; // free the GrowableArray on C heap + } + // clear this as the state for the thread get_thread()->set_jvmti_thread_state(NULL); @@ -219,9 +224,8 @@ int JvmtiThreadState::count_frames() { #ifdef ASSERT Thread *current_thread = Thread::current(); #endif - assert(current_thread == get_thread() || - SafepointSynchronize::is_at_safepoint() || - current_thread == get_thread()->active_handshaker(), + assert(SafepointSynchronize::is_at_safepoint() || + get_thread()->is_handshake_safe_for(current_thread), "call by myself / at safepoint / at handshake"); if (!get_thread()->has_last_Java_frame()) return 0; // no Java frames @@ -241,8 +245,7 @@ int JvmtiThreadState::count_frames() { void JvmtiThreadState::invalidate_cur_stack_depth() { assert(SafepointSynchronize::is_at_safepoint() || - JavaThread::current() == get_thread() || - Thread::current() == get_thread()->active_handshaker(), + get_thread()->is_handshake_safe_for(Thread::current()), "bad synchronization with owner thread"); _cur_stack_depth = UNKNOWN_STACK_DEPTH; @@ -272,8 +275,8 @@ void JvmtiThreadState::decr_cur_stack_depth() { } int JvmtiThreadState::cur_stack_depth() { - JavaThread *current = JavaThread::current(); - guarantee(current == get_thread() || current == get_thread()->active_handshaker(), + Thread *current = Thread::current(); + guarantee(get_thread()->is_handshake_safe_for(current), "must be current thread or direct handshake"); if (!is_interp_only_mode() || _cur_stack_depth == UNKNOWN_STACK_DEPTH) { diff --git a/src/hotspot/share/prims/jvmtiThreadState.hpp b/src/hotspot/share/prims/jvmtiThreadState.hpp index 1564ff8517c..7aec8055791 100644 --- a/src/hotspot/share/prims/jvmtiThreadState.hpp +++ b/src/hotspot/share/prims/jvmtiThreadState.hpp @@ -99,6 +99,7 @@ class JvmtiThreadState : public CHeapObj<mtInternal> { // info to the class file load hook event handler. Klass* _class_being_redefined; JvmtiClassLoadKind _class_load_kind; + GrowableArray<Klass*>* _classes_being_redefined; // This is only valid when is_interp_only_mode() returns true int _cur_stack_depth; @@ -244,6 +245,15 @@ class JvmtiThreadState : public CHeapObj<mtInternal> { return _class_load_kind; } + // Get the classes that are currently being redefined by this thread. + inline GrowableArray<Klass*>* get_classes_being_redefined() { + return _classes_being_redefined; + } + + inline void set_classes_being_redefined(GrowableArray<Klass*>* redef_classes) { + _classes_being_redefined = redef_classes; + } + // RedefineClasses support // The bug 6214132 caused the verification to fail. // diff --git a/src/hotspot/share/prims/unsafe.cpp b/src/hotspot/share/prims/unsafe.cpp index c5ef981a88a..956f48d4fc7 100644 --- a/src/hotspot/share/prims/unsafe.cpp +++ b/src/hotspot/share/prims/unsafe.cpp @@ -121,8 +121,8 @@ static inline void assert_field_offset_sane(oop p, jlong field_offset) { assert(byte_offset >= 0 && byte_offset <= (jlong)MAX_OBJECT_SIZE, "sane offset"); if (byte_offset == (jint)byte_offset) { void* ptr_plus_disp = cast_from_oop<address>(p) + byte_offset; - assert(p->field_addr_raw((jint)byte_offset) == ptr_plus_disp, - "raw [ptr+disp] must be consistent with oop::field_addr_raw"); + assert(p->field_addr((jint)byte_offset) == ptr_plus_disp, + "raw [ptr+disp] must be consistent with oop::field_addr"); } jlong p_size = HeapWordSize * (jlong)(p->size()); assert(byte_offset < p_size, "Unsafe access: offset " INT64_FORMAT " > object's size " INT64_FORMAT, (int64_t)byte_offset, (int64_t)p_size); @@ -134,10 +134,6 @@ static inline void* index_oop_from_field_offset_long(oop p, jlong field_offset) assert_field_offset_sane(p, field_offset); jlong byte_offset = field_offset_to_byte_offset(field_offset); - if (p != NULL) { - p = Access<>::resolve(p); - } - if (sizeof(char*) == sizeof(jint)) { // (this constant folds!) return cast_from_oop<address>(p) + (jint) byte_offset; } else { @@ -1092,7 +1088,6 @@ UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSetReference(JNIEnv *env, jobject unsafe UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSetInt(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint e, jint x)) { oop p = JNIHandles::resolve(obj); - GuardUnsafeAccess guard(thread); if (p == NULL) { volatile jint* addr = (volatile jint*)index_oop_from_field_offset_long(p, offset); return RawAccess<>::atomic_cmpxchg(addr, e, x) == e; @@ -1104,7 +1099,6 @@ UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSetInt(JNIEnv *env, jobject unsafe, jobj UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSetLong(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong e, jlong x)) { oop p = JNIHandles::resolve(obj); - GuardUnsafeAccess guard(thread); if (p == NULL) { volatile jlong* addr = (volatile jlong*)index_oop_from_field_offset_long(p, offset); return RawAccess<>::atomic_cmpxchg(addr, e, x) == e; diff --git a/src/hotspot/share/prims/whitebox.cpp b/src/hotspot/share/prims/whitebox.cpp index 942379b29ed..cf9b85ef699 100644 --- a/src/hotspot/share/prims/whitebox.cpp +++ b/src/hotspot/share/prims/whitebox.cpp @@ -68,6 +68,7 @@ #include "runtime/deoptimization.hpp" #include "runtime/fieldDescriptor.inline.hpp" #include "runtime/flags/jvmFlag.hpp" +#include "runtime/flags/jvmFlagAccess.hpp" #include "runtime/frame.inline.hpp" #include "runtime/handles.inline.hpp" #include "runtime/handshake.hpp" @@ -93,7 +94,7 @@ #include "gc/g1/g1Arguments.hpp" #include "gc/g1/g1CollectedHeap.inline.hpp" #include "gc/g1/g1ConcurrentMark.hpp" -#include "gc/g1/g1ConcurrentMarkThread.hpp" +#include "gc/g1/g1ConcurrentMarkThread.inline.hpp" #include "gc/g1/heapRegionRemSet.hpp" #include "gc/g1/heterogeneousHeapRegionManager.hpp" #endif // INCLUDE_G1GC @@ -474,7 +475,7 @@ WB_END WB_ENTRY(jboolean, WB_G1InConcurrentMark(JNIEnv* env, jobject o)) if (UseG1GC) { G1CollectedHeap* g1h = G1CollectedHeap::heap(); - return g1h->concurrent_mark()->cm_thread()->during_cycle(); + return g1h->concurrent_mark()->cm_thread()->in_progress(); } THROW_MSG_0(vmSymbols::java_lang_UnsupportedOperationException(), "WB_G1InConcurrentMark: G1 GC is not enabled"); WB_END @@ -482,7 +483,7 @@ WB_END WB_ENTRY(jboolean, WB_G1StartMarkCycle(JNIEnv* env, jobject o)) if (UseG1GC) { G1CollectedHeap* g1h = G1CollectedHeap::heap(); - if (!g1h->concurrent_mark()->cm_thread()->during_cycle()) { + if (!g1h->concurrent_mark()->cm_thread()->in_progress()) { g1h->collect(GCCause::_wb_conc_mark); return true; } @@ -763,7 +764,7 @@ WB_ENTRY(jlong, WB_NMTReserveMemory(JNIEnv* env, jobject o, jlong size)) WB_END WB_ENTRY(jlong, WB_NMTAttemptReserveMemoryAt(JNIEnv* env, jobject o, jlong addr, jlong size)) - addr = (jlong)(uintptr_t)os::attempt_reserve_memory_at((size_t)size, (char*)(uintptr_t)addr); + addr = (jlong)(uintptr_t)os::attempt_reserve_memory_at((char*)(uintptr_t)addr, (size_t)size); MemTracker::record_virtual_memory_type((address)addr, mtTest); return addr; @@ -1055,7 +1056,7 @@ bool WhiteBox::compile_method(Method* method, int comp_level, int bci, Thread* T DirectivesStack::release(directive); // Compile method and check result - nmethod* nm = CompileBroker::compile_method(mh, bci, comp_level, mh, mh->invocation_count(), CompileTask::Reason_Whitebox, THREAD); + nmethod* nm = CompileBroker::compile_method(mh, bci, comp_level, mh, mh->invocation_count(), CompileTask::Reason_Whitebox, CHECK_false); MutexLocker mu(THREAD, Compile_lock); bool is_queued = mh->queued_for_compilation(); if ((!is_blocking && is_queued) || nm != NULL) { @@ -1207,8 +1208,8 @@ WB_ENTRY(void, WB_ClearMethodState(JNIEnv* env, jobject o, jobject method)) } WB_END -template <typename T> -static bool GetVMFlag(JavaThread* thread, JNIEnv* env, jstring name, T* value, JVMFlag::Error (*TAt)(const JVMFlag*, T*)) { +template <typename T, int type_enum> +static bool GetVMFlag(JavaThread* thread, JNIEnv* env, jstring name, T* value) { if (name == NULL) { return false; } @@ -1216,13 +1217,13 @@ static bool GetVMFlag(JavaThread* thread, JNIEnv* env, jstring name, T* value, J const char* flag_name = env->GetStringUTFChars(name, NULL); CHECK_JNI_EXCEPTION_(env, false); const JVMFlag* flag = JVMFlag::find_declared_flag(flag_name); - JVMFlag::Error result = (*TAt)(flag, value); + JVMFlag::Error result = JVMFlagAccess::get<T, type_enum>(flag, value); env->ReleaseStringUTFChars(name, flag_name); return (result == JVMFlag::SUCCESS); } -template <typename T> -static bool SetVMFlag(JavaThread* thread, JNIEnv* env, jstring name, T* value, JVMFlag::Error (*TAtPut)(JVMFlag* flag, T*, JVMFlag::Flags)) { +template <typename T, int type_enum> +static bool SetVMFlag(JavaThread* thread, JNIEnv* env, jstring name, T* value) { if (name == NULL) { return false; } @@ -1230,7 +1231,7 @@ static bool SetVMFlag(JavaThread* thread, JNIEnv* env, jstring name, T* value, J const char* flag_name = env->GetStringUTFChars(name, NULL); CHECK_JNI_EXCEPTION_(env, false); JVMFlag* flag = JVMFlag::find_flag(flag_name); - JVMFlag::Error result = (*TAtPut)(flag, value, JVMFlag::INTERNAL); + JVMFlag::Error result = JVMFlagAccess::set<T, type_enum>(flag, value, JVMFlag::INTERNAL); env->ReleaseStringUTFChars(name, flag_name); return (result == JVMFlag::SUCCESS); } @@ -1286,7 +1287,7 @@ WB_END WB_ENTRY(jobject, WB_GetBooleanVMFlag(JNIEnv* env, jobject o, jstring name)) bool result; - if (GetVMFlag <bool> (thread, env, name, &result, &JVMFlag::boolAt)) { + if (GetVMFlag <JVM_FLAG_TYPE(bool)> (thread, env, name, &result)) { ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI return booleanBox(thread, env, result); } @@ -1295,7 +1296,7 @@ WB_END WB_ENTRY(jobject, WB_GetIntVMFlag(JNIEnv* env, jobject o, jstring name)) int result; - if (GetVMFlag <int> (thread, env, name, &result, &JVMFlag::intAt)) { + if (GetVMFlag <JVM_FLAG_TYPE(int)> (thread, env, name, &result)) { ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI return longBox(thread, env, result); } @@ -1304,7 +1305,7 @@ WB_END WB_ENTRY(jobject, WB_GetUintVMFlag(JNIEnv* env, jobject o, jstring name)) uint result; - if (GetVMFlag <uint> (thread, env, name, &result, &JVMFlag::uintAt)) { + if (GetVMFlag <JVM_FLAG_TYPE(uint)> (thread, env, name, &result)) { ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI return longBox(thread, env, result); } @@ -1313,7 +1314,7 @@ WB_END WB_ENTRY(jobject, WB_GetIntxVMFlag(JNIEnv* env, jobject o, jstring name)) intx result; - if (GetVMFlag <intx> (thread, env, name, &result, &JVMFlag::intxAt)) { + if (GetVMFlag <JVM_FLAG_TYPE(intx)> (thread, env, name, &result)) { ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI return longBox(thread, env, result); } @@ -1322,7 +1323,7 @@ WB_END WB_ENTRY(jobject, WB_GetUintxVMFlag(JNIEnv* env, jobject o, jstring name)) uintx result; - if (GetVMFlag <uintx> (thread, env, name, &result, &JVMFlag::uintxAt)) { + if (GetVMFlag <JVM_FLAG_TYPE(uintx)> (thread, env, name, &result)) { ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI return longBox(thread, env, result); } @@ -1331,7 +1332,7 @@ WB_END WB_ENTRY(jobject, WB_GetUint64VMFlag(JNIEnv* env, jobject o, jstring name)) uint64_t result; - if (GetVMFlag <uint64_t> (thread, env, name, &result, &JVMFlag::uint64_tAt)) { + if (GetVMFlag <JVM_FLAG_TYPE(uint64_t)> (thread, env, name, &result)) { ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI return longBox(thread, env, result); } @@ -1340,7 +1341,7 @@ WB_END WB_ENTRY(jobject, WB_GetSizeTVMFlag(JNIEnv* env, jobject o, jstring name)) size_t result; - if (GetVMFlag <size_t> (thread, env, name, &result, &JVMFlag::size_tAt)) { + if (GetVMFlag <JVM_FLAG_TYPE(size_t)> (thread, env, name, &result)) { ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI return longBox(thread, env, result); } @@ -1349,7 +1350,7 @@ WB_END WB_ENTRY(jobject, WB_GetDoubleVMFlag(JNIEnv* env, jobject o, jstring name)) double result; - if (GetVMFlag <double> (thread, env, name, &result, &JVMFlag::doubleAt)) { + if (GetVMFlag <JVM_FLAG_TYPE(double)> (thread, env, name, &result)) { ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI return doubleBox(thread, env, result); } @@ -1358,7 +1359,7 @@ WB_END WB_ENTRY(jstring, WB_GetStringVMFlag(JNIEnv* env, jobject o, jstring name)) ccstr ccstrResult; - if (GetVMFlag <ccstr> (thread, env, name, &ccstrResult, &JVMFlag::ccstrAt)) { + if (GetVMFlag <JVM_FLAG_TYPE(ccstr)> (thread, env, name, &ccstrResult)) { ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI jstring result = env->NewStringUTF(ccstrResult); CHECK_JNI_EXCEPTION_(env, NULL); @@ -1369,42 +1370,42 @@ WB_END WB_ENTRY(void, WB_SetBooleanVMFlag(JNIEnv* env, jobject o, jstring name, jboolean value)) bool result = value == JNI_TRUE ? true : false; - SetVMFlag <bool> (thread, env, name, &result, &JVMFlag::boolAtPut); + SetVMFlag <JVM_FLAG_TYPE(bool)> (thread, env, name, &result); WB_END WB_ENTRY(void, WB_SetIntVMFlag(JNIEnv* env, jobject o, jstring name, jlong value)) int result = value; - SetVMFlag <int> (thread, env, name, &result, &JVMFlag::intAtPut); + SetVMFlag <JVM_FLAG_TYPE(int)> (thread, env, name, &result); WB_END WB_ENTRY(void, WB_SetUintVMFlag(JNIEnv* env, jobject o, jstring name, jlong value)) uint result = value; - SetVMFlag <uint> (thread, env, name, &result, &JVMFlag::uintAtPut); + SetVMFlag <JVM_FLAG_TYPE(uint)> (thread, env, name, &result); WB_END WB_ENTRY(void, WB_SetIntxVMFlag(JNIEnv* env, jobject o, jstring name, jlong value)) intx result = value; - SetVMFlag <intx> (thread, env, name, &result, &JVMFlag::intxAtPut); + SetVMFlag <JVM_FLAG_TYPE(intx)> (thread, env, name, &result); WB_END WB_ENTRY(void, WB_SetUintxVMFlag(JNIEnv* env, jobject o, jstring name, jlong value)) uintx result = value; - SetVMFlag <uintx> (thread, env, name, &result, &JVMFlag::uintxAtPut); + SetVMFlag <JVM_FLAG_TYPE(uintx)> (thread, env, name, &result); WB_END WB_ENTRY(void, WB_SetUint64VMFlag(JNIEnv* env, jobject o, jstring name, jlong value)) uint64_t result = value; - SetVMFlag <uint64_t> (thread, env, name, &result, &JVMFlag::uint64_tAtPut); + SetVMFlag <JVM_FLAG_TYPE(uint64_t)> (thread, env, name, &result); WB_END WB_ENTRY(void, WB_SetSizeTVMFlag(JNIEnv* env, jobject o, jstring name, jlong value)) size_t result = value; - SetVMFlag <size_t> (thread, env, name, &result, &JVMFlag::size_tAtPut); + SetVMFlag <JVM_FLAG_TYPE(size_t)> (thread, env, name, &result); WB_END WB_ENTRY(void, WB_SetDoubleVMFlag(JNIEnv* env, jobject o, jstring name, jdouble value)) double result = value; - SetVMFlag <double> (thread, env, name, &result, &JVMFlag::doubleAtPut); + SetVMFlag <JVM_FLAG_TYPE(double)> (thread, env, name, &result); WB_END WB_ENTRY(void, WB_SetStringVMFlag(JNIEnv* env, jobject o, jstring name, jstring value)) @@ -1421,7 +1422,7 @@ WB_ENTRY(void, WB_SetStringVMFlag(JNIEnv* env, jobject o, jstring name, jstring bool needFree; { ThreadInVMfromNative ttvfn(thread); // back to VM - needFree = SetVMFlag <ccstr> (thread, env, name, &ccstrResult, &JVMFlag::ccstrAtPut); + needFree = SetVMFlag <JVM_FLAG_TYPE(ccstr)> (thread, env, name, &ccstrResult); } if (value != NULL) { env->ReleaseStringUTFChars(value, ccstrValue); @@ -1474,7 +1475,7 @@ WB_ENTRY(void, WB_ReadReservedMemory(JNIEnv* env, jobject o)) static char c; static volatile char* p; - p = os::reserve_memory(os::vm_allocation_granularity(), NULL, 0); + p = os::reserve_memory(os::vm_allocation_granularity()); if (p == NULL) { THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), "Failed to reserve memory"); } @@ -2119,6 +2120,32 @@ WB_ENTRY(jint, WB_HandshakeWalkStack(JNIEnv* env, jobject wb, jobject thread_han return tsc.num_threads_completed(); WB_END +WB_ENTRY(void, WB_AsyncHandshakeWalkStack(JNIEnv* env, jobject wb, jobject thread_handle)) + class TraceSelfClosure : public AsyncHandshakeClosure { + JavaThread* _self; + void do_thread(Thread* th) { + assert(th->is_Java_thread(), "sanity"); + // AsynchHandshake handshakes are only executed by target. + assert(_self == th, "Must be"); + assert(Thread::current() == th, "Must be"); + JavaThread* jt = th->as_Java_thread(); + ResourceMark rm; + jt->print_on(tty); + jt->print_stack_on(tty); + tty->cr(); + } + + public: + TraceSelfClosure(JavaThread* self_target) : AsyncHandshakeClosure("WB_TraceSelf"), _self(self_target) {} + }; + oop thread_oop = JNIHandles::resolve(thread_handle); + if (thread_oop != NULL) { + JavaThread* target = java_lang_Thread::thread(thread_oop); + TraceSelfClosure* tsc = new TraceSelfClosure(target); + Handshake::execute(tsc, target); + } +WB_END + //Some convenience methods to deal with objects from java int WhiteBox::offset_for_field(const char* field_name, oop object, Symbol* signature_symbol) { @@ -2356,6 +2383,10 @@ WB_ENTRY(jboolean, WB_IsJVMTIIncluded(JNIEnv* env, jobject wb)) return INCLUDE_JVMTI ? JNI_TRUE : JNI_FALSE; WB_END +WB_ENTRY(void, WB_WaitUnsafe(JNIEnv* env, jobject wb, jint time)) + os::naked_short_sleep(time); +WB_END + #define CC (char*) static JNINativeMethod methods[] = { @@ -2586,6 +2617,7 @@ static JNINativeMethod methods[] = { {CC"clearInlineCaches0", CC"(Z)V", (void*)&WB_ClearInlineCaches }, {CC"handshakeWalkStack", CC"(Ljava/lang/Thread;Z)I", (void*)&WB_HandshakeWalkStack }, + {CC"asyncHandshakeWalkStack", CC"(Ljava/lang/Thread;)V", (void*)&WB_AsyncHandshakeWalkStack }, {CC"checkThreadObjOfTerminatingThread", CC"(Ljava/lang/Thread;)V", (void*)&WB_CheckThreadObjOfTerminatingThread }, {CC"addCompilerDirective", CC"(Ljava/lang/String;)I", (void*)&WB_AddCompilerDirective }, @@ -2612,6 +2644,7 @@ static JNINativeMethod methods[] = { {CC"aotLibrariesCount", CC"()I", (void*)&WB_AotLibrariesCount }, {CC"getKlassMetadataSize", CC"(Ljava/lang/Class;)I",(void*)&WB_GetKlassMetadataSize}, {CC"isJVMTIIncluded", CC"()Z", (void*)&WB_IsJVMTIIncluded}, + {CC"waitUnsafe", CC"(I)V", (void*)&WB_WaitUnsafe}, }; diff --git a/src/hotspot/share/runtime/abstract_vm_version.cpp b/src/hotspot/share/runtime/abstract_vm_version.cpp index 379936a12bb..5876f6c5cc0 100644 --- a/src/hotspot/share/runtime/abstract_vm_version.cpp +++ b/src/hotspot/share/runtime/abstract_vm_version.cpp @@ -291,6 +291,22 @@ unsigned int Abstract_VM_Version::jvm_version() { (Abstract_VM_Version::vm_build_number() & 0xFF); } +void Abstract_VM_Version::insert_features_names(char* buf, size_t buflen, const char* features_names[]) { + uint64_t features = _features; + uint features_names_index = 0; + + while (features != 0) { + if (features & 1) { + int res = jio_snprintf(buf, buflen, ", %s", features_names[features_names_index]); + assert(res > 0, "not enough temporary space allocated"); + buf += res; + buflen -= res; + } + features >>= 1; + ++features_names_index; + } +} + bool Abstract_VM_Version::print_matching_lines_from_file(const char* filename, outputStream* st, const char* keywords_to_match[]) { char line[500]; FILE* fp = fopen(filename, "r"); diff --git a/src/hotspot/share/runtime/abstract_vm_version.hpp b/src/hotspot/share/runtime/abstract_vm_version.hpp index 0233610cad7..e6ffbc5ad4e 100644 --- a/src/hotspot/share/runtime/abstract_vm_version.hpp +++ b/src/hotspot/share/runtime/abstract_vm_version.hpp @@ -119,13 +119,9 @@ class Abstract_VM_Version: AllStatic { static const char* jdk_debug_level(); static const char* printable_jdk_debug_level(); - static uint64_t features() { - return _features; - } - - static const char* features_string() { - return _features_string; - } + static uint64_t features() { return _features; } + static const char* features_string() { return _features_string; } + static void insert_features_names(char* buf, size_t buflen, const char* features_names[]); static VirtualizationType get_detected_virtualization() { return _detected_virtualization; diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp index a2223bda9f6..d88db885896 100644 --- a/src/hotspot/share/runtime/arguments.cpp +++ b/src/hotspot/share/runtime/arguments.cpp @@ -41,8 +41,7 @@ #include "prims/jvmtiExport.hpp" #include "runtime/arguments.hpp" #include "runtime/flags/jvmFlag.hpp" -#include "runtime/flags/jvmFlagConstraintList.hpp" -#include "runtime/flags/jvmFlagRangeList.hpp" +#include "runtime/flags/jvmFlagAccess.hpp" #include "runtime/globals_extension.hpp" #include "runtime/java.hpp" #include "runtime/os.inline.hpp" @@ -554,6 +553,7 @@ static SpecialFlag const special_jvm_flags[] = { { "UseSemaphoreGCThreadsSynchronization", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) }, { "ForceNUMA", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) }, { "InsertMemBarAfterArraycopy", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) }, + { "Debugging", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) }, #ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS // These entries will generate build errors. Their purpose is to test the macros. @@ -877,7 +877,7 @@ void Arguments::describe_range_error(ArgsRange errcode) { } static bool set_bool_flag(JVMFlag* flag, bool value, JVMFlag::Flags origin) { - if (JVMFlag::boolAtPut(flag, &value, origin) == JVMFlag::SUCCESS) { + if (JVMFlagAccess::boolAtPut(flag, &value, origin) == JVMFlag::SUCCESS) { return true; } else { return false; @@ -892,7 +892,7 @@ static bool set_fp_numeric_flag(JVMFlag* flag, char* value, JVMFlag::Flags origi return false; } - if (JVMFlag::doubleAtPut(flag, &v, origin) == JVMFlag::SUCCESS) { + if (JVMFlagAccess::doubleAtPut(flag, &v, origin) == JVMFlag::SUCCESS) { return true; } return false; @@ -924,35 +924,35 @@ static bool set_numeric_flag(JVMFlag* flag, char* value, JVMFlag::Flags origin) if (is_neg) { int_v = -int_v; } - return JVMFlag::intAtPut(flag, &int_v, origin) == JVMFlag::SUCCESS; + return JVMFlagAccess::intAtPut(flag, &int_v, origin) == JVMFlag::SUCCESS; } else if (flag->is_uint()) { uint uint_v = (uint) v; - return JVMFlag::uintAtPut(flag, &uint_v, origin) == JVMFlag::SUCCESS; + return JVMFlagAccess::uintAtPut(flag, &uint_v, origin) == JVMFlag::SUCCESS; } else if (flag->is_intx()) { intx_v = (intx) v; if (is_neg) { intx_v = -intx_v; } - return JVMFlag::intxAtPut(flag, &intx_v, origin) == JVMFlag::SUCCESS; + return JVMFlagAccess::intxAtPut(flag, &intx_v, origin) == JVMFlag::SUCCESS; } else if (flag->is_uintx()) { uintx uintx_v = (uintx) v; - return JVMFlag::uintxAtPut(flag, &uintx_v, origin) == JVMFlag::SUCCESS; + return JVMFlagAccess::uintxAtPut(flag, &uintx_v, origin) == JVMFlag::SUCCESS; } else if (flag->is_uint64_t()) { uint64_t uint64_t_v = (uint64_t) v; - return JVMFlag::uint64_tAtPut(flag, &uint64_t_v, origin) == JVMFlag::SUCCESS; + return JVMFlagAccess::uint64_tAtPut(flag, &uint64_t_v, origin) == JVMFlag::SUCCESS; } else if (flag->is_size_t()) { size_t size_t_v = (size_t) v; - return JVMFlag::size_tAtPut(flag, &size_t_v, origin) == JVMFlag::SUCCESS; + return JVMFlagAccess::size_tAtPut(flag, &size_t_v, origin) == JVMFlag::SUCCESS; } else if (flag->is_double()) { double double_v = (double) v; - return JVMFlag::doubleAtPut(flag, &double_v, origin) == JVMFlag::SUCCESS; + return JVMFlagAccess::doubleAtPut(flag, &double_v, origin) == JVMFlag::SUCCESS; } else { return false; } } static bool set_string_flag(JVMFlag* flag, const char* value, JVMFlag::Flags origin) { - if (JVMFlag::ccstrAtPut(flag, &value, origin) != JVMFlag::SUCCESS) return false; + if (JVMFlagAccess::ccstrAtPut(flag, &value, origin) != JVMFlag::SUCCESS) return false; // Contract: JVMFlag always returns a pointer that needs freeing. FREE_C_HEAP_ARRAY(char, value); return true; @@ -960,7 +960,7 @@ static bool set_string_flag(JVMFlag* flag, const char* value, JVMFlag::Flags ori static bool append_to_string_flag(JVMFlag* flag, const char* new_value, JVMFlag::Flags origin) { const char* old_value = ""; - if (JVMFlag::ccstrAt(flag, &old_value) != JVMFlag::SUCCESS) return false; + if (JVMFlagAccess::ccstrAt(flag, &old_value) != JVMFlag::SUCCESS) return false; size_t old_len = old_value != NULL ? strlen(old_value) : 0; size_t new_len = strlen(new_value); const char* value; @@ -977,7 +977,7 @@ static bool append_to_string_flag(JVMFlag* flag, const char* new_value, JVMFlag: value = buf; free_this_too = buf; } - (void) JVMFlag::ccstrAtPut(flag, &value, origin); + (void) JVMFlagAccess::ccstrAtPut(flag, &value, origin); // JVMFlag always returns a pointer that needs freeing. FREE_C_HEAP_ARRAY(char, value); // JVMFlag made its own copy, so I must delete my own temp. buffer. @@ -1355,7 +1355,7 @@ bool Arguments::process_argument(const char* arg, jio_fprintf(defaultStream::error_stream(), "Did you mean '%s%s%s'? ", (fuzzy_matched->is_bool()) ? "(+/-)" : "", - fuzzy_matched->_name, + fuzzy_matched->name(), (fuzzy_matched->is_bool()) ? "" : "=<value>"); } } diff --git a/src/hotspot/share/runtime/arguments.hpp b/src/hotspot/share/runtime/arguments.hpp index 2be3d3ad746..347c15f1286 100644 --- a/src/hotspot/share/runtime/arguments.hpp +++ b/src/hotspot/share/runtime/arguments.hpp @@ -478,7 +478,6 @@ class Arguments : AllStatic { // Return the "real" name for option arg if arg is an alias, and print a warning if arg is deprecated. // Return NULL if the arg has expired. static const char* handle_aliases_and_deprecation(const char* arg, bool warn); - static bool lookup_logging_aliases(const char* arg, char* buffer); static AliasedLoggingFlag catch_logging_aliases(const char* name, bool on); static char* SharedArchivePath; @@ -503,8 +502,6 @@ class Arguments : AllStatic { // Adjusts the arguments after the OS have adjusted the arguments static jint adjust_after_os(); - // Check for consistency in the selection of the garbage collector. - static bool check_gc_consistency(); // Check user-selected gc // Check consistency or otherwise of VM argument settings static bool check_vm_args_consistency(); // Used by os_solaris diff --git a/src/hotspot/share/runtime/biasedLocking.cpp b/src/hotspot/share/runtime/biasedLocking.cpp index 98bdb1fe709..725d5393961 100644 --- a/src/hotspot/share/runtime/biasedLocking.cpp +++ b/src/hotspot/share/runtime/biasedLocking.cpp @@ -511,6 +511,7 @@ class RevokeOneBias : public HandshakeClosure { JavaThread* _biased_locker; BiasedLocking::Condition _status_code; traceid _biased_locker_id; + bool _executed; public: RevokeOneBias(Handle obj, JavaThread* requesting_thread, JavaThread* biased_locker) @@ -519,10 +520,14 @@ class RevokeOneBias : public HandshakeClosure { , _requesting_thread(requesting_thread) , _biased_locker(biased_locker) , _status_code(BiasedLocking::NOT_BIASED) - , _biased_locker_id(0) {} + , _biased_locker_id(0) + , _executed(false) {} + + bool executed() { return _executed; } void do_thread(Thread* target) { assert(target == _biased_locker, "Wrong thread"); + _executed = true; oop o = _obj(); markWord mark = o->mark(); @@ -624,11 +629,11 @@ BiasedLocking::Condition BiasedLocking::single_revoke_with_handshake(Handle obj, p2i(biaser), p2i(obj())); RevokeOneBias revoke(obj, requester, biaser); - bool executed = Handshake::execute_direct(&revoke, biaser); + Handshake::execute(&revoke, biaser); if (revoke.status_code() == NOT_REVOKED) { return NOT_REVOKED; } - if (executed) { + if (revoke.executed()) { log_info(biasedlocking, handshake)("Handshake revocation for object " INTPTR_FORMAT " succeeded. Bias was %srevoked", p2i(obj()), (revoke.status_code() == BIAS_REVOKED ? "" : "already ")); if (event.should_commit() && revoke.status_code() == BIAS_REVOKED) { @@ -670,7 +675,7 @@ BiasedLocking::Condition BiasedLocking::single_revoke_with_handshake(Handle obj, void BiasedLocking::walk_stack_and_revoke(oop obj, JavaThread* biased_locker) { Thread* cur = Thread::current(); assert(!SafepointSynchronize::is_at_safepoint(), "this should always be executed outside safepoints"); - assert(cur == biased_locker || cur == biased_locker->active_handshaker(), "wrong thread"); + assert(biased_locker->is_handshake_safe_for(cur), "wrong thread"); markWord mark = obj->mark(); assert(mark.biased_locker() == biased_locker && diff --git a/src/hotspot/share/runtime/deoptimization.cpp b/src/hotspot/share/runtime/deoptimization.cpp index f04b2872e3f..d5a7d1064e4 100644 --- a/src/hotspot/share/runtime/deoptimization.cpp +++ b/src/hotspot/share/runtime/deoptimization.cpp @@ -1265,7 +1265,10 @@ int compare(ReassignedField* left, ReassignedField* right) { // Restore fields of an eliminated instance object using the same field order // returned by HotSpotResolvedObjectTypeImpl.getInstanceFields(true) static int reassign_fields_by_klass(InstanceKlass* klass, frame* fr, RegisterMap* reg_map, ObjectValue* sv, int svIndex, oop obj, bool skip_internal, int base_offset, TRAPS) { - + if (svIndex >= sv->field_size()) { + // No fields left to re-assign. + return svIndex; + } GrowableArray<ReassignedField>* fields = new GrowableArray<ReassignedField>(); InstanceKlass* ik = klass; while (ik != NULL) { @@ -1387,19 +1390,16 @@ static int reassign_fields_by_klass(InstanceKlass* klass, frame* fr, RegisterMap } // restore fields of an eliminated inline type array -void Deoptimization::reassign_flat_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, flatArrayOop obj, FlatArrayKlass* vak, TRAPS) { +void Deoptimization::reassign_flat_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, flatArrayOop obj, FlatArrayKlass* vak, bool skip_internal, TRAPS) { InlineKlass* vk = vak->element_klass(); assert(vk->flatten_array(), "should only be used for flattened inline type arrays"); - if (vk->is_empty_inline_type()) { - return; // No fields to re-assign - } // Adjust offset to omit oop header int base_offset = arrayOopDesc::base_offset_in_bytes(T_INLINE_TYPE) - InlineKlass::cast(vk)->first_field_offset(); // Initialize all elements of the flattened inline type array for (int i = 0; i < sv->field_size(); i++) { ScopeValue* val = sv->field_at(i); int offset = base_offset + (i << Klass::layout_helper_log2_element_size(vak->layout_helper())); - reassign_fields_by_klass(vk, fr, reg_map, val->as_ObjectValue(), 0, (oop)obj, false /* skip_internal */, offset, CHECK); + reassign_fields_by_klass(vk, fr, reg_map, val->as_ObjectValue(), 0, (oop)obj, skip_internal, offset, CHECK); } } @@ -1427,7 +1427,7 @@ void Deoptimization::reassign_fields(frame* fr, RegisterMap* reg_map, GrowableAr reassign_fields_by_klass(ik, fr, reg_map, sv, 0, obj(), skip_internal, 0, CHECK); } else if (k->is_flatArray_klass()) { FlatArrayKlass* vak = FlatArrayKlass::cast(k); - reassign_flat_array_elements(fr, reg_map, sv, (flatArrayOop) obj(), vak, CHECK); + reassign_flat_array_elements(fr, reg_map, sv, (flatArrayOop) obj(), vak, skip_internal, CHECK); } else if (k->is_typeArray_klass()) { TypeArrayKlass* ak = TypeArrayKlass::cast(k); reassign_type_array_elements(fr, reg_map, sv, (typeArrayOop) obj(), ak->element_type()); @@ -1744,6 +1744,7 @@ Deoptimization::get_method_data(JavaThread* thread, const methodHandle& m, // that simply means we won't have an MDO to update. Method::build_interpreter_method_data(m, THREAD); if (HAS_PENDING_EXCEPTION) { + // Only metaspace OOM is expected. No Java code executed. assert((PENDING_EXCEPTION->is_a(SystemDictionary::OutOfMemoryError_klass())), "we expect only an OOM error here"); CLEAR_PENDING_EXCEPTION; } @@ -1762,7 +1763,23 @@ void Deoptimization::load_class_by_index(const constantPoolHandle& constant_pool // So this whole "class index" feature should probably be removed. if (constant_pool->tag_at(index).is_unresolved_klass()) { - Klass* tk = constant_pool->klass_at_ignore_error(index, CHECK); + Klass* tk = constant_pool->klass_at_ignore_error(index, THREAD); + if (HAS_PENDING_EXCEPTION) { + // Exception happened during classloading. We ignore the exception here, since it + // is going to be rethrown since the current activation is going to be deoptimized and + // the interpreter will re-execute the bytecode. + // Do not clear probable Async Exceptions. + CLEAR_PENDING_NONASYNC_EXCEPTION; + // Class loading called java code which may have caused a stack + // overflow. If the exception was thrown right before the return + // to the runtime the stack is no longer guarded. Reguard the + // stack otherwise if we return to the uncommon trap blob and the + // stack bang causes a stack overflow we crash. + JavaThread* jt = THREAD->as_Java_thread(); + bool guard_pages_enabled = jt->stack_guards_enabled(); + if (!guard_pages_enabled) guard_pages_enabled = jt->reguard_stack(); + assert(guard_pages_enabled, "stack banging in uncommon trap blob may cause crash"); + } return; } @@ -1770,27 +1787,6 @@ void Deoptimization::load_class_by_index(const constantPoolHandle& constant_pool "no symbolic names here, please"); } - -void Deoptimization::load_class_by_index(const constantPoolHandle& constant_pool, int index) { - EXCEPTION_MARK; - load_class_by_index(constant_pool, index, THREAD); - if (HAS_PENDING_EXCEPTION) { - // Exception happened during classloading. We ignore the exception here, since it - // is going to be rethrown since the current activation is going to be deoptimized and - // the interpreter will re-execute the bytecode. - CLEAR_PENDING_EXCEPTION; - // Class loading called java code which may have caused a stack - // overflow. If the exception was thrown right before the return - // to the runtime the stack is no longer guarded. Reguard the - // stack otherwise if we return to the uncommon trap blob and the - // stack bang causes a stack overflow we crash. - JavaThread* thread = THREAD->as_Java_thread(); - bool guard_pages_enabled = thread->stack_guards_enabled(); - if (!guard_pages_enabled) guard_pages_enabled = thread->reguard_stack(); - assert(guard_pages_enabled, "stack banging in uncommon trap blob may cause crash"); - } -} - #if INCLUDE_JFR class DeoptReasonSerializer : public JfrSerializer { @@ -2052,7 +2048,7 @@ JRT_ENTRY(void, Deoptimization::uncommon_trap_inner(JavaThread* thread, jint tra // Load class if necessary if (unloaded_class_index >= 0) { constantPoolHandle constants(THREAD, trap_method->constants()); - load_class_by_index(constants, unloaded_class_index); + load_class_by_index(constants, unloaded_class_index, THREAD); } // Flush the nmethod if necessary and desirable. diff --git a/src/hotspot/share/runtime/deoptimization.hpp b/src/hotspot/share/runtime/deoptimization.hpp index 05de613a337..28c9026db44 100644 --- a/src/hotspot/share/runtime/deoptimization.hpp +++ b/src/hotspot/share/runtime/deoptimization.hpp @@ -173,7 +173,7 @@ class Deoptimization : AllStatic { static bool realloc_inline_type_result(InlineKlass* vk, const RegisterMap& map, GrowableArray<Handle>& return_oops, TRAPS); static void reassign_type_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, typeArrayOop obj, BasicType type); static void reassign_object_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, objArrayOop obj); - static void reassign_flat_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, flatArrayOop obj, FlatArrayKlass* vak, TRAPS); + static void reassign_flat_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, flatArrayOop obj, FlatArrayKlass* vak, bool skip_internal, TRAPS); static void reassign_fields(frame* fr, RegisterMap* reg_map, GrowableArray<ScopeValue*>* objects, bool realloc_failures, bool skip_internal, TRAPS); static void relock_objects(GrowableArray<MonitorInfo*>* monitors, JavaThread* thread, bool realloc_failures); static void pop_frames_failed_reallocs(JavaThread* thread, vframeArray* array); @@ -456,7 +456,6 @@ class Deoptimization : AllStatic { bool& ret_maybe_prior_recompile); // class loading support for uncommon trap static void load_class_by_index(const constantPoolHandle& constant_pool, int index, TRAPS); - static void load_class_by_index(const constantPoolHandle& constant_pool, int index); static UnrollBlock* fetch_unroll_info_helper(JavaThread* thread, int exec_mode); diff --git a/src/hotspot/share/runtime/flags/jvmFlag.cpp b/src/hotspot/share/runtime/flags/jvmFlag.cpp index 4d44a58a34c..d90a134d0b5 100644 --- a/src/hotspot/share/runtime/flags/jvmFlag.cpp +++ b/src/hotspot/share/runtime/flags/jvmFlag.cpp @@ -27,63 +27,12 @@ #include "memory/allocation.inline.hpp" #include "runtime/arguments.hpp" #include "runtime/flags/jvmFlag.hpp" -#include "runtime/flags/jvmFlagConstraintList.hpp" +#include "runtime/flags/jvmFlagAccess.hpp" #include "runtime/flags/jvmFlagLookup.hpp" -#include "runtime/flags/jvmFlagRangeList.hpp" #include "runtime/globals_extension.hpp" #include "utilities/defaultStream.hpp" #include "utilities/stringUtils.hpp" -#define DEFAULT_RANGE_STR_CHUNK_SIZE 64 -static char* create_range_str(const char *fmt, ...) { - static size_t string_length = DEFAULT_RANGE_STR_CHUNK_SIZE; - static char* range_string = NEW_C_HEAP_ARRAY(char, string_length, mtLogging); - - int size_needed = 0; - do { - va_list args; - va_start(args, fmt); - size_needed = jio_vsnprintf(range_string, string_length, fmt, args); - va_end(args); - - if (size_needed < 0) { - string_length += DEFAULT_RANGE_STR_CHUNK_SIZE; - range_string = REALLOC_C_HEAP_ARRAY(char, range_string, string_length, mtLogging); - guarantee(range_string != NULL, "create_range_str string should not be NULL"); - } - } while (size_needed < 0); - - return range_string; -} - -const char* JVMFlag::get_int_default_range_str() { - return create_range_str("[ " INT32_FORMAT_W(-25) " ... " INT32_FORMAT_W(25) " ]", INT_MIN, INT_MAX); -} - -const char* JVMFlag::get_uint_default_range_str() { - return create_range_str("[ " UINT32_FORMAT_W(-25) " ... " UINT32_FORMAT_W(25) " ]", 0, UINT_MAX); -} - -const char* JVMFlag::get_intx_default_range_str() { - return create_range_str("[ " INTX_FORMAT_W(-25) " ... " INTX_FORMAT_W(25) " ]", min_intx, max_intx); -} - -const char* JVMFlag::get_uintx_default_range_str() { - return create_range_str("[ " UINTX_FORMAT_W(-25) " ... " UINTX_FORMAT_W(25) " ]", 0, max_uintx); -} - -const char* JVMFlag::get_uint64_t_default_range_str() { - return create_range_str("[ " UINT64_FORMAT_W(-25) " ... " UINT64_FORMAT_W(25) " ]", 0, uint64_t(max_juint)); -} - -const char* JVMFlag::get_size_t_default_range_str() { - return create_range_str("[ " SIZE_FORMAT_W(-25) " ... " SIZE_FORMAT_W(25) " ]", 0, SIZE_MAX); -} - -const char* JVMFlag::get_double_default_range_str() { - return create_range_str("[ %-25.3f ... %25.3f ]", DBL_MIN, DBL_MAX); -} - static bool is_product_build() { #ifdef PRODUCT return true; @@ -92,100 +41,12 @@ static bool is_product_build() { #endif } -bool JVMFlag::is_bool() const { - return strcmp(_type, "bool") == 0; -} - -bool JVMFlag::is_int() const { - return strcmp(_type, "int") == 0; -} - -bool JVMFlag::is_uint() const { - return strcmp(_type, "uint") == 0; -} - -bool JVMFlag::is_intx() const { - return strcmp(_type, "intx") == 0; -} - -bool JVMFlag::is_uintx() const { - return strcmp(_type, "uintx") == 0; -} - -bool JVMFlag::is_uint64_t() const { - return strcmp(_type, "uint64_t") == 0; -} - -bool JVMFlag::is_size_t() const { - return strcmp(_type, "size_t") == 0; -} - -bool JVMFlag::is_double() const { - return strcmp(_type, "double") == 0; -} - -bool JVMFlag::is_ccstr() const { - return strcmp(_type, "ccstr") == 0 || strcmp(_type, "ccstrlist") == 0; -} - -bool JVMFlag::ccstr_accumulates() const { - return strcmp(_type, "ccstrlist") == 0; -} - -JVMFlag::Flags JVMFlag::get_origin() const { - return Flags(_flags & VALUE_ORIGIN_MASK); -} - void JVMFlag::set_origin(Flags origin) { assert((origin & VALUE_ORIGIN_MASK) == origin, "sanity"); Flags new_origin = Flags((origin == COMMAND_LINE) ? Flags(origin | ORIG_COMMAND_LINE) : origin); _flags = Flags((_flags & ~VALUE_ORIGIN_MASK) | new_origin); } -bool JVMFlag::is_default() const { - return (get_origin() == DEFAULT); -} - -bool JVMFlag::is_ergonomic() const { - return (get_origin() == ERGONOMIC); -} - -bool JVMFlag::is_command_line() const { - return (_flags & ORIG_COMMAND_LINE) != 0; -} - -bool JVMFlag::is_jimage_resource() const { - return (get_origin() == JIMAGE_RESOURCE); -} - -void JVMFlag::set_command_line() { - _flags = Flags(_flags | ORIG_COMMAND_LINE); -} - -bool JVMFlag::is_product() const { - return (_flags & KIND_PRODUCT) != 0; -} - -bool JVMFlag::is_manageable() const { - return (_flags & KIND_MANAGEABLE) != 0; -} - -bool JVMFlag::is_diagnostic() const { - return (_flags & KIND_DIAGNOSTIC) != 0; -} - -bool JVMFlag::is_experimental() const { - return (_flags & KIND_EXPERIMENTAL) != 0; -} - -bool JVMFlag::is_notproduct() const { - return (_flags & KIND_NOT_PRODUCT) != 0; -} - -bool JVMFlag::is_develop() const { - return (_flags & KIND_DEVELOP) != 0; -} - /** * Returns if this flag is a constant in the binary. Right now this is * true for notproduct and develop flags in product builds. @@ -262,17 +123,6 @@ JVMFlag::MsgType JVMFlag::get_locked_message(char* buf, int buflen) const { return JVMFlag::NONE; } -bool JVMFlag::is_writeable() const { - return is_manageable(); -} - -// All flags except "manageable" are assumed to be internal flags. -// Long term, we need to define a mechanism to specify which flags -// are external/stable and change this function accordingly. -bool JVMFlag::is_external() const { - return is_manageable(); -} - // Helper function for JVMFlag::print_on(). // Fills current line up to requested position. // Should the current position already be past the requested position, @@ -341,7 +191,7 @@ void JVMFlag::print_on(outputStream* st, bool withComments, bool printRanges) co const unsigned int col7_width = 1; st->fill_to(col1_pos); - st->print("%*s", col1_width, _type); // right-justified, therefore width is required. + st->print("%*s", col1_width, type_string()); // right-justified, therefore width is required. fill_to_pos(st, col2_pos); st->print("%s", _name); @@ -385,7 +235,7 @@ void JVMFlag::print_on(outputStream* st, bool withComments, bool printRanges) co st->print("%s", cp); } } else { - st->print("unhandled type %s", _type); + st->print("unhandled type %s", type_string()); st->cr(); return; } @@ -449,33 +299,13 @@ void JVMFlag::print_on(outputStream* st, bool withComments, bool printRanges) co const unsigned int col7_width = 1; st->fill_to(col1_pos); - st->print("%*s", col1_width, _type); // right-justified, therefore width is required. + st->print("%*s", col1_width, type_string()); // right-justified, therefore width is required. fill_to_pos(st, col2_pos); st->print("%s", _name); fill_to_pos(st, col4_pos); - RangeStrFunc func = NULL; - if (is_int()) { - func = JVMFlag::get_int_default_range_str; - } else if (is_uint()) { - func = JVMFlag::get_uint_default_range_str; - } else if (is_intx()) { - func = JVMFlag::get_intx_default_range_str; - } else if (is_uintx()) { - func = JVMFlag::get_uintx_default_range_str; - } else if (is_uint64_t()) { - func = JVMFlag::get_uint64_t_default_range_str; - } else if (is_size_t()) { - func = JVMFlag::get_size_t_default_range_str; - } else if (is_double()) { - func = JVMFlag::get_double_default_range_str; - } else { - st->print("unhandled type %s", _type); - st->cr(); - return; - } - JVMFlagRangeList::print(st, this, func); + JVMFlagAccess::print_range(st, this); fill_to_pos(st, col5_pos); print_kind(st, col5_width); @@ -662,9 +492,9 @@ static constexpr int flag_group(int flag_enum) { return 0; } -constexpr JVMFlag::JVMFlag(int flag_enum, const char* type, const char* name, +constexpr JVMFlag::JVMFlag(int flag_enum, FlagType type, const char* name, void* addr, int flags, int extra_flags, const char* doc) : - _type(type), _name(name), _addr(addr), _flags() NOT_PRODUCT(COMMA _doc(doc)) { + _addr(addr), _name(name), _flags(), _type(type) NOT_PRODUCT(COMMA _doc(doc)) { flags = flags | extra_flags | JVMFlag::DEFAULT | flag_group(flag_enum); if ((flags & JVMFlag::KIND_PRODUCT) != 0) { if (flags & (JVMFlag::KIND_DIAGNOSTIC | JVMFlag::KIND_MANAGEABLE | JVMFlag::KIND_EXPERIMENTAL)) { @@ -675,7 +505,7 @@ constexpr JVMFlag::JVMFlag(int flag_enum, const char* type, const char* name, _flags = static_cast<Flags>(flags); } -constexpr JVMFlag::JVMFlag(int flag_enum, const char* type, const char* name, +constexpr JVMFlag::JVMFlag(int flag_enum, FlagType type, const char* name, void* addr, int flags, const char* doc) : JVMFlag(flag_enum, type, name, addr, flags, /*extra_flags*/0, doc) {} @@ -685,11 +515,12 @@ const int DEVELOP_KIND = JVMFlag::KIND_DEVELOP; const int DEVELOP_KIND_PD = JVMFlag::KIND_DEVELOP | JVMFlag::KIND_PLATFORM_DEPENDENT; const int NOTPROD_KIND = JVMFlag::KIND_NOT_PRODUCT; -#define DEVELOP_FLAG_INIT( type, name, value, ...) JVMFlag(FLAG_MEMBER_ENUM(name), #type, XSTR(name), (void*)&name, DEVELOP_KIND, __VA_ARGS__), -#define DEVELOP_FLAG_INIT_PD(type, name, ...) JVMFlag(FLAG_MEMBER_ENUM(name), #type, XSTR(name), (void*)&name, DEVELOP_KIND_PD, __VA_ARGS__), -#define PRODUCT_FLAG_INIT( type, name, value, ...) JVMFlag(FLAG_MEMBER_ENUM(name), #type, XSTR(name), (void*)&name, PRODUCT_KIND, __VA_ARGS__), -#define PRODUCT_FLAG_INIT_PD(type, name, ...) JVMFlag(FLAG_MEMBER_ENUM(name), #type, XSTR(name), (void*)&name, PRODUCT_KIND_PD, __VA_ARGS__), -#define NOTPROD_FLAG_INIT( type, name, value, ...) JVMFlag(FLAG_MEMBER_ENUM(name), #type, XSTR(name), (void*)&name, NOTPROD_KIND, __VA_ARGS__), +#define FLAG_TYPE(type) (JVMFlag::TYPE_ ## type) +#define INITIALIZE_DEVELOP_FLAG( type, name, value, ...) JVMFlag(FLAG_MEMBER_ENUM(name), FLAG_TYPE(type), XSTR(name), (void*)&name, DEVELOP_KIND, __VA_ARGS__), +#define INITIALIZE_DEVELOP_FLAG_PD(type, name, ...) JVMFlag(FLAG_MEMBER_ENUM(name), FLAG_TYPE(type), XSTR(name), (void*)&name, DEVELOP_KIND_PD, __VA_ARGS__), +#define INITIALIZE_PRODUCT_FLAG( type, name, value, ...) JVMFlag(FLAG_MEMBER_ENUM(name), FLAG_TYPE(type), XSTR(name), (void*)&name, PRODUCT_KIND, __VA_ARGS__), +#define INITIALIZE_PRODUCT_FLAG_PD(type, name, ...) JVMFlag(FLAG_MEMBER_ENUM(name), FLAG_TYPE(type), XSTR(name), (void*)&name, PRODUCT_KIND_PD, __VA_ARGS__), +#define INITIALIZE_NOTPROD_FLAG( type, name, value, ...) JVMFlag(FLAG_MEMBER_ENUM(name), FLAG_TYPE(type), XSTR(name), (void*)&name, NOTPROD_KIND, __VA_ARGS__), // Handy aliases to match the symbols used in the flag specification macros. const int DIAGNOSTIC = JVMFlag::KIND_DIAGNOSTIC; @@ -697,11 +528,11 @@ const int MANAGEABLE = JVMFlag::KIND_MANAGEABLE; const int EXPERIMENTAL = JVMFlag::KIND_EXPERIMENTAL; #define MATERIALIZE_ALL_FLAGS \ - ALL_FLAGS(DEVELOP_FLAG_INIT, \ - DEVELOP_FLAG_INIT_PD, \ - PRODUCT_FLAG_INIT, \ - PRODUCT_FLAG_INIT_PD, \ - NOTPROD_FLAG_INIT, \ + ALL_FLAGS(INITIALIZE_DEVELOP_FLAG, \ + INITIALIZE_DEVELOP_FLAG_PD, \ + INITIALIZE_PRODUCT_FLAG, \ + INITIALIZE_PRODUCT_FLAG_PD, \ + INITIALIZE_NOTPROD_FLAG, \ IGNORE_RANGE, \ IGNORE_CONSTRAINT) @@ -779,413 +610,29 @@ JVMFlag* JVMFlag::fuzzy_match(const char* name, size_t length, bool allow_locked return match; } -// Returns the address of the index'th element -JVMFlag* JVMFlagEx::flag_from_enum(JVMFlagsEnum flag) { - assert((size_t)flag < JVMFlag::numFlags, "bad command line flag index"); - return &JVMFlag::flags[flag]; -} - -bool JVMFlagEx::is_default(JVMFlagsEnum flag) { +bool JVMFlag::is_default(JVMFlagsEnum flag) { return flag_from_enum(flag)->is_default(); } -bool JVMFlagEx::is_ergo(JVMFlagsEnum flag) { +bool JVMFlag::is_ergo(JVMFlagsEnum flag) { return flag_from_enum(flag)->is_ergonomic(); } -bool JVMFlagEx::is_cmdline(JVMFlagsEnum flag) { +bool JVMFlag::is_cmdline(JVMFlagsEnum flag) { return flag_from_enum(flag)->is_command_line(); } -bool JVMFlagEx::is_jimage_resource(JVMFlagsEnum flag) { - assert((size_t)flag < JVMFlag::numFlags, "bad command line flag index"); - JVMFlag* f = &JVMFlag::flags[flag]; - return f->is_jimage_resource(); -} - -void JVMFlagEx::setOnCmdLine(JVMFlagsEnum flag) { - JVMFlag* faddr = flag_from_enum(flag); - assert(faddr != NULL, "Unknown flag"); - faddr->set_command_line(); -} - -template<class E, class T> -static void trace_flag_changed(JVMFlag* flag, const T old_value, const T new_value, const JVMFlag::Flags origin) { - E e; - e.set_name(flag->_name); - e.set_oldValue(old_value); - e.set_newValue(new_value); - e.set_origin(origin); - e.commit(); -} - -static JVMFlag::Error apply_constraint_and_check_range_bool(JVMFlag* flag, bool new_value, bool verbose) { - JVMFlag::Error status = JVMFlag::SUCCESS; - JVMFlagConstraintChecker constraint = JVMFlagConstraintList::find_if_needs_check(flag); - if (constraint.exists()) { - status = constraint.apply_bool(new_value, verbose); - } - return status; -} - -JVMFlag::Error JVMFlag::boolAt(const JVMFlag* flag, bool* value) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_bool()) return JVMFlag::WRONG_FORMAT; - *value = flag->get_bool(); - return JVMFlag::SUCCESS; -} - -JVMFlag::Error JVMFlag::boolAtPut(JVMFlag* flag, bool* value, JVMFlag::Flags origin) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_bool()) return JVMFlag::WRONG_FORMAT; - JVMFlag::Error check = apply_constraint_and_check_range_bool(flag, *value, !JVMFlagConstraintList::validated_after_ergo()); - if (check != JVMFlag::SUCCESS) return check; - bool old_value = flag->get_bool(); - trace_flag_changed<EventBooleanFlagChanged, bool>(flag, old_value, *value, origin); - flag->set_bool(*value); - *value = old_value; - flag->set_origin(origin); - return JVMFlag::SUCCESS; -} - -JVMFlag::Error JVMFlagEx::boolAtPut(JVMFlagsEnum flag, bool value, JVMFlag::Flags origin) { - JVMFlag* faddr = flag_from_enum(flag); - guarantee(faddr != NULL && faddr->is_bool(), "wrong flag type"); - return JVMFlag::boolAtPut(faddr, &value, origin); -} - -static JVMFlag::Error apply_constraint_and_check_range_int(JVMFlag* flag, int new_value, bool verbose) { - JVMFlag::Error status = JVMFlag::SUCCESS; - JVMFlagRangeChecker range = JVMFlagRangeList::find(flag); - if (range.exists()) { - status = range.check_int(new_value, verbose); - } - if (status == JVMFlag::SUCCESS) { - JVMFlagConstraintChecker constraint = JVMFlagConstraintList::find_if_needs_check(flag); - if (constraint.exists()) { - status = constraint.apply_int(new_value, verbose); - } - } - return status; -} - -JVMFlag::Error JVMFlag::intAt(const JVMFlag* flag, int* value) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_int()) return JVMFlag::WRONG_FORMAT; - *value = flag->get_int(); - return JVMFlag::SUCCESS; -} - -JVMFlag::Error JVMFlag::intAtPut(JVMFlag* flag, int* value, JVMFlag::Flags origin) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_int()) return JVMFlag::WRONG_FORMAT; - JVMFlag::Error check = apply_constraint_and_check_range_int(flag, *value, !JVMFlagConstraintList::validated_after_ergo()); - if (check != JVMFlag::SUCCESS) return check; - int old_value = flag->get_int(); - trace_flag_changed<EventIntFlagChanged, s4>(flag, old_value, *value, origin); - flag->set_int(*value); - *value = old_value; - flag->set_origin(origin); - return JVMFlag::SUCCESS; -} - -JVMFlag::Error JVMFlagEx::intAtPut(JVMFlagsEnum flag, int value, JVMFlag::Flags origin) { - JVMFlag* faddr = flag_from_enum(flag); - guarantee(faddr != NULL && faddr->is_int(), "wrong flag type"); - return JVMFlag::intAtPut(faddr, &value, origin); -} - -static JVMFlag::Error apply_constraint_and_check_range_uint(JVMFlag* flag, uint new_value, bool verbose) { - JVMFlag::Error status = JVMFlag::SUCCESS; - JVMFlagRangeChecker range = JVMFlagRangeList::find(flag); - if (range.exists()) { - status = range.check_uint(new_value, verbose); - } - if (status == JVMFlag::SUCCESS) { - JVMFlagConstraintChecker constraint = JVMFlagConstraintList::find_if_needs_check(flag); - if (constraint.exists()) { - status = constraint.apply_uint(new_value, verbose); - } - } - return status; -} - -JVMFlag::Error JVMFlag::uintAt(const JVMFlag* flag, uint* value) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_uint()) return JVMFlag::WRONG_FORMAT; - *value = flag->get_uint(); - return JVMFlag::SUCCESS; -} - -JVMFlag::Error JVMFlag::uintAtPut(JVMFlag* flag, uint* value, JVMFlag::Flags origin) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_uint()) return JVMFlag::WRONG_FORMAT; - JVMFlag::Error check = apply_constraint_and_check_range_uint(flag, *value, !JVMFlagConstraintList::validated_after_ergo()); - if (check != JVMFlag::SUCCESS) return check; - uint old_value = flag->get_uint(); - trace_flag_changed<EventUnsignedIntFlagChanged, u4>(flag, old_value, *value, origin); - flag->set_uint(*value); - *value = old_value; - flag->set_origin(origin); - return JVMFlag::SUCCESS; -} - -JVMFlag::Error JVMFlagEx::uintAtPut(JVMFlagsEnum flag, uint value, JVMFlag::Flags origin) { - JVMFlag* faddr = flag_from_enum(flag); - guarantee(faddr != NULL && faddr->is_uint(), "wrong flag type"); - return JVMFlag::uintAtPut(faddr, &value, origin); -} - -JVMFlag::Error JVMFlag::intxAt(const JVMFlag* flag, intx* value) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_intx()) return JVMFlag::WRONG_FORMAT; - *value = flag->get_intx(); - return JVMFlag::SUCCESS; -} - -static JVMFlag::Error apply_constraint_and_check_range_intx(JVMFlag* flag, intx new_value, bool verbose) { - JVMFlag::Error status = JVMFlag::SUCCESS; - JVMFlagRangeChecker range = JVMFlagRangeList::find(flag); - if (range.exists()) { - status = range.check_intx(new_value, verbose); - } - if (status == JVMFlag::SUCCESS) { - JVMFlagConstraintChecker constraint = JVMFlagConstraintList::find_if_needs_check(flag); - if (constraint.exists()) { - status = constraint.apply_intx(new_value, verbose); - } - } - return status; -} - -JVMFlag::Error JVMFlag::intxAtPut(JVMFlag* flag, intx* value, JVMFlag::Flags origin) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_intx()) return JVMFlag::WRONG_FORMAT; - JVMFlag::Error check = apply_constraint_and_check_range_intx(flag, *value, !JVMFlagConstraintList::validated_after_ergo()); - if (check != JVMFlag::SUCCESS) return check; - intx old_value = flag->get_intx(); - trace_flag_changed<EventLongFlagChanged, intx>(flag, old_value, *value, origin); - flag->set_intx(*value); - *value = old_value; - flag->set_origin(origin); - return JVMFlag::SUCCESS; -} - -JVMFlag::Error JVMFlagEx::intxAtPut(JVMFlagsEnum flag, intx value, JVMFlag::Flags origin) { - JVMFlag* faddr = flag_from_enum(flag); - guarantee(faddr != NULL && faddr->is_intx(), "wrong flag type"); - return JVMFlag::intxAtPut(faddr, &value, origin); -} - -JVMFlag::Error JVMFlag::uintxAt(const JVMFlag* flag, uintx* value) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_uintx()) return JVMFlag::WRONG_FORMAT; - *value = flag->get_uintx(); - return JVMFlag::SUCCESS; -} - -static JVMFlag::Error apply_constraint_and_check_range_uintx(JVMFlag* flag, uintx new_value, bool verbose) { - JVMFlag::Error status = JVMFlag::SUCCESS; - JVMFlagRangeChecker range = JVMFlagRangeList::find(flag); - if (range.exists()) { - status = range.check_uintx(new_value, verbose); - } - if (status == JVMFlag::SUCCESS) { - JVMFlagConstraintChecker constraint = JVMFlagConstraintList::find_if_needs_check(flag); - if (constraint.exists()) { - status = constraint.apply_uintx(new_value, verbose); - } - } - return status; -} - -JVMFlag::Error JVMFlag::uintxAtPut(JVMFlag* flag, uintx* value, JVMFlag::Flags origin) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_uintx()) return JVMFlag::WRONG_FORMAT; - JVMFlag::Error check = apply_constraint_and_check_range_uintx(flag, *value, !JVMFlagConstraintList::validated_after_ergo()); - if (check != JVMFlag::SUCCESS) return check; - uintx old_value = flag->get_uintx(); - trace_flag_changed<EventUnsignedLongFlagChanged, u8>(flag, old_value, *value, origin); - flag->set_uintx(*value); - *value = old_value; - flag->set_origin(origin); - return JVMFlag::SUCCESS; -} - -JVMFlag::Error JVMFlagEx::uintxAtPut(JVMFlagsEnum flag, uintx value, JVMFlag::Flags origin) { - JVMFlag* faddr = flag_from_enum(flag); - guarantee(faddr != NULL && faddr->is_uintx(), "wrong flag type"); - return JVMFlag::uintxAtPut(faddr, &value, origin); -} - -JVMFlag::Error JVMFlag::uint64_tAt(const JVMFlag* flag, uint64_t* value) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_uint64_t()) return JVMFlag::WRONG_FORMAT; - *value = flag->get_uint64_t(); - return JVMFlag::SUCCESS; -} - -static JVMFlag::Error apply_constraint_and_check_range_uint64_t(JVMFlag* flag, uint64_t new_value, bool verbose) { - JVMFlag::Error status = JVMFlag::SUCCESS; - JVMFlagRangeChecker range = JVMFlagRangeList::find(flag); - if (range.exists()) { - status = range.check_uint64_t(new_value, verbose); - } - if (status == JVMFlag::SUCCESS) { - JVMFlagConstraintChecker constraint = JVMFlagConstraintList::find_if_needs_check(flag); - if (constraint.exists()) { - status = constraint.apply_uint64_t(new_value, verbose); - } - } - return status; -} - -JVMFlag::Error JVMFlag::uint64_tAtPut(JVMFlag* flag, uint64_t* value, JVMFlag::Flags origin) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_uint64_t()) return JVMFlag::WRONG_FORMAT; - JVMFlag::Error check = apply_constraint_and_check_range_uint64_t(flag, *value, !JVMFlagConstraintList::validated_after_ergo()); - if (check != JVMFlag::SUCCESS) return check; - uint64_t old_value = flag->get_uint64_t(); - trace_flag_changed<EventUnsignedLongFlagChanged, u8>(flag, old_value, *value, origin); - flag->set_uint64_t(*value); - *value = old_value; - flag->set_origin(origin); - return JVMFlag::SUCCESS; -} - -JVMFlag::Error JVMFlagEx::uint64_tAtPut(JVMFlagsEnum flag, uint64_t value, JVMFlag::Flags origin) { - JVMFlag* faddr = flag_from_enum(flag); - guarantee(faddr != NULL && faddr->is_uint64_t(), "wrong flag type"); - return JVMFlag::uint64_tAtPut(faddr, &value, origin); -} - -JVMFlag::Error JVMFlag::size_tAt(const JVMFlag* flag, size_t* value) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_size_t()) return JVMFlag::WRONG_FORMAT; - *value = flag->get_size_t(); - return JVMFlag::SUCCESS; -} - -static JVMFlag::Error apply_constraint_and_check_range_size_t(JVMFlag* flag, size_t new_value, bool verbose) { - JVMFlag::Error status = JVMFlag::SUCCESS; - JVMFlagRangeChecker range = JVMFlagRangeList::find(flag); - if (range.exists()) { - status = range.check_size_t(new_value, verbose); - } - if (status == JVMFlag::SUCCESS) { - JVMFlagConstraintChecker constraint = JVMFlagConstraintList::find_if_needs_check(flag); - if (constraint.exists()) { - status = constraint.apply_size_t(new_value, verbose); - } - } - return status; -} - - -JVMFlag::Error JVMFlag::size_tAtPut(JVMFlag* flag, size_t* value, JVMFlag::Flags origin) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_size_t()) return JVMFlag::WRONG_FORMAT; - JVMFlag::Error check = apply_constraint_and_check_range_size_t(flag, *value, !JVMFlagConstraintList::validated_after_ergo()); - if (check != JVMFlag::SUCCESS) return check; - size_t old_value = flag->get_size_t(); - trace_flag_changed<EventUnsignedLongFlagChanged, u8>(flag, old_value, *value, origin); - flag->set_size_t(*value); - *value = old_value; - flag->set_origin(origin); - return JVMFlag::SUCCESS; -} - -JVMFlag::Error JVMFlagEx::size_tAtPut(JVMFlagsEnum flag, size_t value, JVMFlag::Flags origin) { - JVMFlag* faddr = flag_from_enum(flag); - guarantee(faddr != NULL && faddr->is_size_t(), "wrong flag type"); - return JVMFlag::size_tAtPut(faddr, &value, origin); -} - -JVMFlag::Error JVMFlag::doubleAt(const JVMFlag* flag, double* value) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_double()) return JVMFlag::WRONG_FORMAT; - *value = flag->get_double(); - return JVMFlag::SUCCESS; -} - -static JVMFlag::Error apply_constraint_and_check_range_double(JVMFlag* flag, double new_value, bool verbose) { - JVMFlag::Error status = JVMFlag::SUCCESS; - JVMFlagRangeChecker range = JVMFlagRangeList::find(flag); - if (range.exists()) { - status = range.check_double(new_value, verbose); - } - if (status == JVMFlag::SUCCESS) { - JVMFlagConstraintChecker constraint = JVMFlagConstraintList::find_if_needs_check(flag); - if (constraint.exists()) { - status = constraint.apply_double(new_value, verbose); - } - } - return status; -} - -JVMFlag::Error JVMFlag::doubleAtPut(JVMFlag* flag, double* value, JVMFlag::Flags origin) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_double()) return JVMFlag::WRONG_FORMAT; - JVMFlag::Error check = apply_constraint_and_check_range_double(flag, *value, !JVMFlagConstraintList::validated_after_ergo()); - if (check != JVMFlag::SUCCESS) return check; - double old_value = flag->get_double(); - trace_flag_changed<EventDoubleFlagChanged, double>(flag, old_value, *value, origin); - flag->set_double(*value); - *value = old_value; - flag->set_origin(origin); - return JVMFlag::SUCCESS; -} - -JVMFlag::Error JVMFlagEx::doubleAtPut(JVMFlagsEnum flag, double value, JVMFlag::Flags origin) { - JVMFlag* faddr = flag_from_enum(flag); - guarantee(faddr != NULL && faddr->is_double(), "wrong flag type"); - return JVMFlag::doubleAtPut(faddr, &value, origin); -} - -JVMFlag::Error JVMFlag::ccstrAt(const JVMFlag* flag, ccstr* value) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_ccstr()) return JVMFlag::WRONG_FORMAT; - *value = flag->get_ccstr(); - return JVMFlag::SUCCESS; +bool JVMFlag::is_jimage_resource(JVMFlagsEnum flag) { + return flag_from_enum(flag)->is_jimage_resource(); } -JVMFlag::Error JVMFlag::ccstrAtPut(JVMFlag* flag, ccstr* value, JVMFlag::Flags origin) { - if (flag == NULL) return JVMFlag::INVALID_FLAG; - if (!flag->is_ccstr()) return JVMFlag::WRONG_FORMAT; - ccstr old_value = flag->get_ccstr(); - trace_flag_changed<EventStringFlagChanged, const char*>(flag, old_value, *value, origin); - char* new_value = NULL; - if (*value != NULL) { - new_value = os::strdup_check_oom(*value); - } - flag->set_ccstr(new_value); - if (flag->is_default() && old_value != NULL) { - // Prior value is NOT heap allocated, but was a literal constant. - old_value = os::strdup_check_oom(old_value); - } - *value = old_value; - flag->set_origin(origin); - return JVMFlag::SUCCESS; -} - -JVMFlag::Error JVMFlagEx::ccstrAtPut(JVMFlagsEnum flag, ccstr value, JVMFlag::Flags origin) { - JVMFlag* faddr = flag_from_enum(flag); - guarantee(faddr != NULL && faddr->is_ccstr(), "wrong flag type"); - ccstr old_value = faddr->get_ccstr(); - trace_flag_changed<EventStringFlagChanged, const char*>(faddr, old_value, value, origin); - char* new_value = os::strdup_check_oom(value); - faddr->set_ccstr(new_value); - if (!faddr->is_default() && old_value != NULL) { - // Prior value is heap allocated so free it. - FREE_C_HEAP_ARRAY(char, old_value); - } - faddr->set_origin(origin); - return JVMFlag::SUCCESS; +void JVMFlag::setOnCmdLine(JVMFlagsEnum flag) { + flag_from_enum(flag)->set_command_line(); } extern "C" { static int compare_flags(const void* void_a, const void* void_b) { - return strcmp((*((JVMFlag**) void_a))->_name, (*((JVMFlag**) void_b))->_name); + return strcmp((*((JVMFlag**) void_a))->name(), (*((JVMFlag**) void_b))->name()); } } @@ -1225,8 +672,8 @@ void JVMFlag::verify() { #ifdef ASSERT -void JVMFlag::assert_valid_flag_enum(int i) { - assert(0 <= i && i < NUM_JVMFlagsEnum, "must be"); +void JVMFlag::assert_valid_flag_enum(JVMFlagsEnum i) { + assert(0 <= int(i) && int(i) < NUM_JVMFlagsEnum, "must be"); } void JVMFlag::check_all_flag_declarations() { diff --git a/src/hotspot/share/runtime/flags/jvmFlag.hpp b/src/hotspot/share/runtime/flags/jvmFlag.hpp index 7e8731e49de..62ede9ae146 100644 --- a/src/hotspot/share/runtime/flags/jvmFlag.hpp +++ b/src/hotspot/share/runtime/flags/jvmFlag.hpp @@ -28,12 +28,13 @@ #include "utilities/globalDefinitions.hpp" #include "utilities/macros.hpp" -class outputStream; +enum JVMFlagsEnum : int; -// function type that will construct default range string -typedef const char* (*RangeStrFunc)(void); +class outputStream; -struct JVMFlag { +class JVMFlag { + friend class VMStructs; +public: enum Flags : int { // latest value origin DEFAULT = 0, @@ -105,12 +106,36 @@ struct JVMFlag { NOTPRODUCT_FLAG_BUT_PRODUCT_BUILD }; - const char* _type; - const char* _name; +#define JVM_FLAG_NON_STRING_TYPES_DO(f) \ + f(bool) \ + f(int) \ + f(uint) \ + f(intx) \ + f(uintx) \ + f(uint64_t) \ + f(size_t) \ + f(double) + +#define JVM_FLAG_TYPE_DECLARE(t) \ + TYPE_ ## t, + + enum FlagType : int { + JVM_FLAG_NON_STRING_TYPES_DO(JVM_FLAG_TYPE_DECLARE) + // The two string types are a bit irregular: is_ccstr() returns true for both types. + TYPE_ccstr, + TYPE_ccstrlist, + NUM_FLAG_TYPES + }; + +private: void* _addr; + const char* _name; Flags _flags; + int _type; + NOT_PRODUCT(const char* _doc;) +public: // points to all Flags static array static JVMFlag* flags; @@ -121,12 +146,12 @@ struct JVMFlag { static JVMFlag* find_flag(const char* name, size_t length, bool allow_locked, bool return_flag); public: - constexpr JVMFlag() : _type(), _name(), _addr(), _flags() NOT_PRODUCT(COMMA _doc()) {} + constexpr JVMFlag() : _addr(), _name(), _flags(), _type() NOT_PRODUCT(COMMA _doc()) {} - constexpr JVMFlag(int flag_enum, const char* type, const char* name, + constexpr JVMFlag(int flag_enum, FlagType type, const char* name, void* addr, int flags, int extra_flags, const char* doc); - constexpr JVMFlag(int flag_enum, const char* type, const char* name, + constexpr JVMFlag(int flag_enum, FlagType type, const char* name, void* addr, int flags, const char* doc); static JVMFlag* find_flag(const char* name) { @@ -141,87 +166,97 @@ struct JVMFlag { static JVMFlag* fuzzy_match(const char* name, size_t length, bool allow_locked = false); - static const char* get_int_default_range_str(); - static const char* get_uint_default_range_str(); - static const char* get_intx_default_range_str(); - static const char* get_uintx_default_range_str(); - static const char* get_uint64_t_default_range_str(); - static const char* get_size_t_default_range_str(); - static const char* get_double_default_range_str(); - - static void assert_valid_flag_enum(int i) NOT_DEBUG_RETURN; + static void assert_valid_flag_enum(JVMFlagsEnum i) NOT_DEBUG_RETURN; static void check_all_flag_declarations() NOT_DEBUG_RETURN; - inline int flag_enum() const { - int i = this - JVMFlag::flags; + inline JVMFlagsEnum flag_enum() const { + JVMFlagsEnum i = static_cast<JVMFlagsEnum>(this - JVMFlag::flags); assert_valid_flag_enum(i); return i; } - static JVMFlag* flag_from_enum(int flag_enum) { + static JVMFlag* flag_from_enum(JVMFlagsEnum flag_enum) { assert_valid_flag_enum(flag_enum); return &JVMFlag::flags[flag_enum]; } - bool is_bool() const; - bool get_bool() const { return *((bool*) _addr); } - void set_bool(bool value) const { *((bool*) _addr) = value; } +#define JVM_FLAG_TYPE_ACCESSOR(t) \ + bool is_##t() const { return _type == TYPE_##t;} \ + t get_##t() const { assert(is_##t(), "sanity"); return *((t*) _addr); } \ + void set_##t(t value) { assert(is_##t(), "sanity"); *((t*) _addr) = value; } - bool is_int() const; - int get_int() const { return *((int*) _addr); } - void set_int(int value) const { *((int*) _addr) = value; } + JVM_FLAG_NON_STRING_TYPES_DO(JVM_FLAG_TYPE_ACCESSOR) - bool is_uint() const; - uint get_uint() const { return *((uint*) _addr); } - void set_uint(uint value) const { *((uint*) _addr) = value; } + bool is_ccstr() const { return _type == TYPE_ccstr || _type == TYPE_ccstrlist; } + bool ccstr_accumulates() const { return _type == TYPE_ccstrlist; } + ccstr get_ccstr() const { assert(is_ccstr(), "sanity"); return *((ccstr*) _addr); } + void set_ccstr(ccstr value) { assert(is_ccstr(), "sanity"); *((ccstr*) _addr) = value; } - bool is_intx() const; - intx get_intx() const { return *((intx*) _addr); } - void set_intx(intx value) const { *((intx*) _addr) = value; } +#define JVM_FLAG_AS_STRING(t) \ + case TYPE_##t: return STR(t); - bool is_uintx() const; - uintx get_uintx() const { return *((uintx*) _addr); } - void set_uintx(uintx value) const { *((uintx*) _addr) = value; } + const char* type_string() const { + return type_string_for((FlagType)_type); + } - bool is_uint64_t() const; - uint64_t get_uint64_t() const { return *((uint64_t*) _addr); } - void set_uint64_t(uint64_t value) const { *((uint64_t*) _addr) = value; } + static const char* type_string_for(FlagType t) { + switch(t) { + JVM_FLAG_NON_STRING_TYPES_DO(JVM_FLAG_AS_STRING) + case TYPE_ccstr: return "ccstr"; + case TYPE_ccstrlist: return "ccstrlist"; + default: + ShouldNotReachHere(); + return "unknown"; + } + } + + int type() const { return _type; } + const char* name() const { return _name; } - bool is_size_t() const; - size_t get_size_t() const { return *((size_t*) _addr); } - void set_size_t(size_t value) const { *((size_t*) _addr) = value; } + void assert_type(int type_enum) const { + if (type_enum == JVMFlag::TYPE_ccstr) { + assert(is_ccstr(), "type check"); // ccstr or ccstrlist + } else { + assert(_type == type_enum, "type check"); + } + } - bool is_double() const; - double get_double() const { return *((double*) _addr); } - void set_double(double value) const { *((double*) _addr) = value; } + // Do not use JVMFlag::read() or JVMFlag::write() directly unless you know + // what you're doing. Use FLAG_SET_XXX macros or JVMFlagAccess instead. + template <typename T, int type_enum> T read() const { + assert_type(type_enum); + return *static_cast<T*>(_addr); + } - bool is_ccstr() const; - bool ccstr_accumulates() const; - ccstr get_ccstr() const { return *((ccstr*) _addr); } - void set_ccstr(ccstr value) const { *((ccstr*) _addr) = value; } + template <typename T, int type_enum> void write(T value) { + assert_type(type_enum); + *static_cast<T*>(_addr) = value; + } - Flags get_origin() const; + Flags get_origin() const { return Flags(_flags & VALUE_ORIGIN_MASK); } void set_origin(Flags origin); - bool is_default() const; - bool is_ergonomic() const; - bool is_jimage_resource() const; - bool is_command_line() const; - void set_command_line(); - - bool is_product() const; - bool is_manageable() const; - bool is_diagnostic() const; - bool is_experimental() const; - bool is_notproduct() const; - bool is_develop() const; + bool is_default() const { return (get_origin() == DEFAULT); } + bool is_ergonomic() const { return (get_origin() == ERGONOMIC); } + bool is_command_line() const { return (_flags & ORIG_COMMAND_LINE) != 0; } + void set_command_line() { _flags = Flags(_flags | ORIG_COMMAND_LINE); } + bool is_jimage_resource() const { return (get_origin() == JIMAGE_RESOURCE); } + bool is_product() const { return (_flags & KIND_PRODUCT) != 0; } + bool is_manageable() const { return (_flags & KIND_MANAGEABLE) != 0; } + bool is_diagnostic() const { return (_flags & KIND_DIAGNOSTIC) != 0; } + bool is_experimental() const { return (_flags & KIND_EXPERIMENTAL) != 0; } + bool is_notproduct() const { return (_flags & KIND_NOT_PRODUCT) != 0; } + bool is_develop() const { return (_flags & KIND_DEVELOP) != 0; } bool is_constant_in_binary() const; bool is_unlocker() const; bool is_unlocked() const; - bool is_writeable() const; - bool is_external() const; + + // Only manageable flags can be accessed by writeableFlags.cpp + bool is_writeable() const { return is_manageable(); } + // All flags except "manageable" are assumed to be internal flags. + bool is_external() const { return is_manageable(); } void clear_diagnostic(); void clear_experimental(); @@ -230,6 +265,13 @@ struct JVMFlag { JVMFlag::MsgType get_locked_message(char*, int) const; JVMFlag::MsgType get_locked_message_ext(char*, int) const; + static bool is_default(JVMFlagsEnum flag); + static bool is_ergo(JVMFlagsEnum flag); + static bool is_cmdline(JVMFlagsEnum flag); + static bool is_jimage_resource(JVMFlagsEnum flag); + static void setOnCmdLine(JVMFlagsEnum flag); + + // printRanges will print out flags type, name and range values as expected by -XX:+PrintFlagsRanges void print_on(outputStream* st, bool withComments = false, bool printRanges = false) const; void print_kind(outputStream* st, unsigned int width) const; @@ -239,35 +281,6 @@ struct JVMFlag { static const char* flag_error_str(JVMFlag::Error error); public: - static JVMFlag::Error boolAt(const JVMFlag* flag, bool* value); - static JVMFlag::Error boolAtPut(JVMFlag* flag, bool* value, JVMFlag::Flags origin); - - static JVMFlag::Error intAt(const JVMFlag* flag, int* value); - static JVMFlag::Error intAtPut(JVMFlag* flag, int* value, JVMFlag::Flags origin); - - static JVMFlag::Error uintAt(const JVMFlag* flag, uint* value); - static JVMFlag::Error uintAtPut(JVMFlag* flag, uint* value, JVMFlag::Flags origin); - - static JVMFlag::Error intxAt(const JVMFlag* flag, intx* value); - static JVMFlag::Error intxAtPut(JVMFlag* flag, intx* value, JVMFlag::Flags origin); - - static JVMFlag::Error uintxAt(const JVMFlag* flag, uintx* value); - static JVMFlag::Error uintxAtPut(JVMFlag* flag, uintx* value, JVMFlag::Flags origin); - - static JVMFlag::Error size_tAt(const JVMFlag* flag, size_t* value); - static JVMFlag::Error size_tAtPut(JVMFlag* flag, size_t* value, JVMFlag::Flags origin); - - static JVMFlag::Error uint64_tAt(const JVMFlag* flag, uint64_t* value); - static JVMFlag::Error uint64_tAtPut(JVMFlag* flag, uint64_t* value, JVMFlag::Flags origin); - - static JVMFlag::Error doubleAt(const JVMFlag* flag, double* value); - static JVMFlag::Error doubleAtPut(JVMFlag* flag, double* value, JVMFlag::Flags origin); - - static JVMFlag::Error ccstrAt(const JVMFlag* flag, ccstr* value); - // Contract: JVMFlag will make private copy of the incoming value. - // Outgoing value is always malloc-ed, and caller MUST call free. - static JVMFlag::Error ccstrAtPut(JVMFlag* flag, ccstr* value, JVMFlag::Flags origin); - static void printSetFlags(outputStream* out); // printRanges will print out flags type, name and range values as expected by -XX:+PrintFlagsRanges diff --git a/src/hotspot/share/runtime/flags/jvmFlagAccess.cpp b/src/hotspot/share/runtime/flags/jvmFlagAccess.cpp new file mode 100644 index 00000000000..07ff6b1546e --- /dev/null +++ b/src/hotspot/share/runtime/flags/jvmFlagAccess.cpp @@ -0,0 +1,397 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "jfr/jfrEvents.hpp" +#include "memory/allocation.hpp" +#include "runtime/flags/jvmFlag.hpp" +#include "runtime/flags/jvmFlagAccess.hpp" +#include "runtime/flags/jvmFlagLimit.hpp" +#include "runtime/flags/jvmFlagConstraintsRuntime.hpp" +#include "utilities/macros.hpp" +#include "utilities/ostream.hpp" + +template<typename T, typename EVENT> +static void trace_flag_changed(JVMFlag* flag, const T old_value, const T new_value, const JVMFlag::Flags origin) { + EVENT e; + e.set_name(flag->name()); + e.set_oldValue(old_value); + e.set_newValue(new_value); + e.set_origin(origin); + e.commit(); +} + +class FlagAccessImpl { +public: + JVMFlag::Error set(JVMFlag* flag, void* value, JVMFlag::Flags origin) const { + return set_impl(flag, value, origin); + } + + virtual JVMFlag::Error set_impl(JVMFlag* flag, void* value, JVMFlag::Flags origin) const = 0; + virtual JVMFlag::Error check_range(const JVMFlag* flag, bool verbose) const { return JVMFlag::SUCCESS; } + virtual void print_range(outputStream* st, const JVMFlagLimit* range) const { ShouldNotReachHere(); } + virtual void print_default_range(outputStream* st) const { ShouldNotReachHere(); } + virtual JVMFlag::Error check_constraint(const JVMFlag* flag, void * func, bool verbose) const { return JVMFlag::SUCCESS; } +}; + +template <typename T, int type_enum, typename EVENT> +class TypedFlagAccessImpl : public FlagAccessImpl { + +public: + JVMFlag::Error check_constraint_and_set(JVMFlag* flag, void* value_addr, JVMFlag::Flags origin, bool verbose) const { + T value = *((T*)value_addr); + const JVMTypedFlagLimit<T>* constraint = (const JVMTypedFlagLimit<T>*)JVMFlagLimit::get_constraint(flag); + if (constraint != NULL && constraint->phase() <= static_cast<int>(JVMFlagLimit::validating_phase())) { + JVMFlag::Error err = typed_check_constraint(constraint->constraint_func(), value, verbose); + if (err != JVMFlag::SUCCESS) { + return err; + } + } + + T old_value = flag->read<T, type_enum>(); + trace_flag_changed<T, EVENT>(flag, old_value, value, origin); + flag->write<T, type_enum>(value); + *((T*)value_addr) = old_value; + flag->set_origin(origin); + + return JVMFlag::SUCCESS; + } + + JVMFlag::Error check_constraint(const JVMFlag* flag, void * func, bool verbose) const { + return typed_check_constraint(func, flag->read<T, type_enum>(), verbose); + } + + virtual JVMFlag::Error typed_check_constraint(void * func, T value, bool verbose) const = 0; +}; + +class FlagAccessImpl_bool : public TypedFlagAccessImpl<JVM_FLAG_TYPE(bool), EventBooleanFlagChanged> { +public: + JVMFlag::Error set_impl(JVMFlag* flag, void* value_addr, JVMFlag::Flags origin) const { + bool verbose = JVMFlagLimit::verbose_checks_needed(); + return TypedFlagAccessImpl<JVM_FLAG_TYPE(bool), EventBooleanFlagChanged> + ::check_constraint_and_set(flag, value_addr, origin, verbose); + } + + JVMFlag::Error typed_check_constraint(void* func, bool value, bool verbose) const { + return ((JVMFlagConstraintFunc_bool)func)(value, verbose); + } +}; + +template <typename T, int type_enum, typename EVENT> +class RangedFlagAccessImpl : public TypedFlagAccessImpl<T, type_enum, EVENT> { +public: + virtual JVMFlag::Error set_impl(JVMFlag* flag, void* value_addr, JVMFlag::Flags origin) const { + T value = *((T*)value_addr); + bool verbose = JVMFlagLimit::verbose_checks_needed(); + + const JVMTypedFlagLimit<T>* range = (const JVMTypedFlagLimit<T>*)JVMFlagLimit::get_range(flag); + if (range != NULL) { + if ((value < range->min()) || (value > range->max())) { + range_error(flag->name(), value, range->min(), range->max(), verbose); + return JVMFlag::OUT_OF_BOUNDS; + } + } + + return TypedFlagAccessImpl<T, type_enum, EVENT>::check_constraint_and_set(flag, value_addr, origin, verbose); + } + + virtual JVMFlag::Error check_range(const JVMFlag* flag, bool verbose) const { + const JVMTypedFlagLimit<T>* range = (const JVMTypedFlagLimit<T>*)JVMFlagLimit::get_range(flag); + if (range != NULL) { + T value = flag->read<T, type_enum>(); + if ((value < range->min()) || (value > range->max())) { + range_error(flag->name(), value, range->min(), range->max(), verbose); + return JVMFlag::OUT_OF_BOUNDS; + } + } + return JVMFlag::SUCCESS; + } + + virtual void print_range(outputStream* st, const JVMFlagLimit* range) const { + const JVMTypedFlagLimit<T>* r = (const JVMTypedFlagLimit<T>*)range; + print_range_impl(st, r->min(), r->max()); + } + + virtual void range_error(const char* name, T value, T min, T max, bool verbose) const = 0; + virtual void print_range_impl(outputStream* st, T min, T max) const = 0; +}; + +class FlagAccessImpl_int : public RangedFlagAccessImpl<JVM_FLAG_TYPE(int), EventIntFlagChanged> { +public: + void range_error(const char* name, int value, int min, int max, bool verbose) const { + JVMFlag::printError(verbose, + "int %s=%d is outside the allowed range " + "[ %d ... %d ]\n", + name, value, min, max); + } + JVMFlag::Error typed_check_constraint(void* func, int value, bool verbose) const { + return ((JVMFlagConstraintFunc_int)func)(value, verbose); + } + void print_range_impl(outputStream* st, int min, int max) const { + st->print("[ %-25d ... %25d ]", min, max); + } + void print_default_range(outputStream* st) const { + st->print("[ " INT32_FORMAT_W(-25) " ... " INT32_FORMAT_W(25) " ]", INT_MIN, INT_MAX); + } +}; + +class FlagAccessImpl_uint : public RangedFlagAccessImpl<JVM_FLAG_TYPE(uint), EventUnsignedIntFlagChanged> { +public: + void range_error(const char* name, uint value, uint min, uint max, bool verbose) const { + JVMFlag::printError(verbose, + "uint %s=%u is outside the allowed range " + "[ %u ... %u ]\n", + name, value, min, max); + } + JVMFlag::Error typed_check_constraint(void* func, uint value, bool verbose) const { + return ((JVMFlagConstraintFunc_uint)func)(value, verbose); + } + void print_range_impl(outputStream* st, uint min, uint max) const { + st->print("[ %-25u ... %25u ]", min, max); + } + void print_default_range(outputStream* st) const { + st->print("[ " UINT32_FORMAT_W(-25) " ... " UINT32_FORMAT_W(25) " ]", 0, UINT_MAX); + } +}; + +class FlagAccessImpl_intx : public RangedFlagAccessImpl<JVM_FLAG_TYPE(intx), EventLongFlagChanged> { +public: + void range_error(const char* name, intx value, intx min, intx max, bool verbose) const { + JVMFlag::printError(verbose, + "intx %s=" INTX_FORMAT " is outside the allowed range " + "[ " INTX_FORMAT " ... " INTX_FORMAT " ]\n", + name, value, min, max); + } + JVMFlag::Error typed_check_constraint(void* func, intx value, bool verbose) const { + return ((JVMFlagConstraintFunc_intx)func)(value, verbose); + } + void print_range_impl(outputStream* st, intx min, intx max) const { + st->print("[ " INTX_FORMAT_W(-25) " ... " INTX_FORMAT_W(25) " ]", min, max); + } + void print_default_range(outputStream* st) const { + st->print("[ " INTX_FORMAT_W(-25) " ... " INTX_FORMAT_W(25) " ]", min_intx, max_intx); + } +}; + +class FlagAccessImpl_uintx : public RangedFlagAccessImpl<JVM_FLAG_TYPE(uintx), EventUnsignedLongFlagChanged> { +public: + void range_error(const char* name, uintx value, uintx min, uintx max, bool verbose) const { + JVMFlag::printError(verbose, + "uintx %s=" UINTX_FORMAT " is outside the allowed range " + "[ " UINTX_FORMAT " ... " UINTX_FORMAT " ]\n", + name, value, min, max); + } + JVMFlag::Error typed_check_constraint(void* func, uintx value, bool verbose) const { + return ((JVMFlagConstraintFunc_uintx)func)(value, verbose); + } + void print_range_impl(outputStream* st, uintx min, uintx max) const { + st->print("[ " UINTX_FORMAT_W(-25) " ... " UINTX_FORMAT_W(25) " ]", min, max); + } + void print_default_range(outputStream* st) const { + st->print("[ " UINTX_FORMAT_W(-25) " ... " UINTX_FORMAT_W(25) " ]", uintx(0), max_uintx); + } +}; + +class FlagAccessImpl_uint64_t : public RangedFlagAccessImpl<JVM_FLAG_TYPE(uint64_t), EventUnsignedLongFlagChanged> { +public: + void range_error(const char* name, uint64_t value, uint64_t min, uint64_t max, bool verbose) const { + JVMFlag::printError(verbose, + "uint64_t %s=" UINT64_FORMAT " is outside the allowed range " + "[ " UINT64_FORMAT " ... " UINT64_FORMAT " ]\n", + name, value, min, max); + } + JVMFlag::Error typed_check_constraint(void* func, uint64_t value, bool verbose) const { + return ((JVMFlagConstraintFunc_uint64_t)func)(value, verbose); + } + void print_range_impl(outputStream* st, uint64_t min, uint64_t max) const { + st->print("[ " UINT64_FORMAT_W(-25) " ... " UINT64_FORMAT_W(25) " ]", min, max); + } + void print_default_range(outputStream* st) const { + st->print("[ " UINT64_FORMAT_W(-25) " ... " UINT64_FORMAT_W(25) " ]", uint64_t(0), uint64_t(max_juint)); + } +}; + +class FlagAccessImpl_size_t : public RangedFlagAccessImpl<JVM_FLAG_TYPE(size_t), EventUnsignedLongFlagChanged> { +public: + void range_error(const char* name, size_t value, size_t min, size_t max, bool verbose) const { + JVMFlag::printError(verbose, + "size_t %s=" SIZE_FORMAT " is outside the allowed range " + "[ " SIZE_FORMAT " ... " SIZE_FORMAT " ]\n", + name, value, min, max); + } + JVMFlag::Error typed_check_constraint(void* func, size_t value, bool verbose) const { + return ((JVMFlagConstraintFunc_size_t)func)(value, verbose); + } + void print_range_impl(outputStream* st, size_t min, size_t max) const { + st->print("[ " SIZE_FORMAT_W(-25) " ... " SIZE_FORMAT_W(25) " ]", min, max); + } + void print_default_range(outputStream* st) const { + st->print("[ " SIZE_FORMAT_W(-25) " ... " SIZE_FORMAT_W(25) " ]", size_t(0), size_t(SIZE_MAX)); + } +}; + +class FlagAccessImpl_double : public RangedFlagAccessImpl<JVM_FLAG_TYPE(double), EventDoubleFlagChanged> { +public: + void range_error(const char* name, double value, double min, double max, bool verbose) const { + JVMFlag::printError(verbose, + "double %s=%f is outside the allowed range " + "[ %f ... %f ]\n", + name, value, min, max); + } + JVMFlag::Error typed_check_constraint(void* func, double value, bool verbose) const { + return ((JVMFlagConstraintFunc_double)func)(value, verbose); + } + void print_range_impl(outputStream* st, double min, double max) const { + st->print("[ %-25.3f ... %25.3f ]", min, max); + } + void print_default_range(outputStream* st) const { + st->print("[ %-25.3f ... %25.3f ]", DBL_MIN, DBL_MAX); + } +}; + +#define FLAG_ACCESS_IMPL_INIT(t) \ + static FlagAccessImpl_ ## t flag_access_ ## t; + +#define FLAG_ACCESS_IMPL_ADDR(t) \ + &flag_access_ ## t, + +JVM_FLAG_NON_STRING_TYPES_DO(FLAG_ACCESS_IMPL_INIT) + +static const FlagAccessImpl* flag_accesss[JVMFlag::NUM_FLAG_TYPES] = { + JVM_FLAG_NON_STRING_TYPES_DO(FLAG_ACCESS_IMPL_ADDR) + // ccstr and ccstrlist have special setter +}; + +inline const FlagAccessImpl* JVMFlagAccess::access_impl(const JVMFlag* flag) { + int type = flag->type(); + int max = (int)(sizeof(flag_accesss)/sizeof(flag_accesss[0])); + assert(type >= 0 && type < max , "sanity"); + + return flag_accesss[type]; +} + +// This is called by JVMFlagAccess::*AtPut() and JVMFlagAccess::set<...>(JVMFlag* flag, ...) +JVMFlag::Error JVMFlagAccess::set_impl(JVMFlag* flag, int type_enum, void* value, JVMFlag::Flags origin) { + if (type_enum == JVMFlag::TYPE_ccstr || type_enum == JVMFlag::TYPE_ccstrlist) { + return ccstrAtPut(flag, (ccstr*)value, origin); + } + + if (flag == NULL) { + return JVMFlag::INVALID_FLAG; + } + if (flag->type() != type_enum) { + return JVMFlag::WRONG_FORMAT; + } + return access_impl(flag)->set(flag, value, origin); +} + +JVMFlag::Error JVMFlagAccess::ccstrAtPut(JVMFlag* flag, ccstr* value, JVMFlag::Flags origin) { + if (flag == NULL) return JVMFlag::INVALID_FLAG; + if (!flag->is_ccstr()) return JVMFlag::WRONG_FORMAT; + ccstr old_value = flag->get_ccstr(); + trace_flag_changed<ccstr, EventStringFlagChanged>(flag, old_value, *value, origin); + char* new_value = NULL; + if (*value != NULL) { + new_value = os::strdup_check_oom(*value); + } + flag->set_ccstr(new_value); + if (flag->is_default() && old_value != NULL) { + // Prior value is NOT heap allocated, but was a literal constant. + old_value = os::strdup_check_oom(old_value); + } + *value = old_value; + flag->set_origin(origin); + return JVMFlag::SUCCESS; +} + +// This is called by the FLAG_SET_XXX macros. +JVMFlag::Error JVMFlagAccess::set_impl(JVMFlagsEnum flag_enum, int type_enum, void* value, JVMFlag::Flags origin) { + if (type_enum == JVMFlag::TYPE_ccstr || type_enum == JVMFlag::TYPE_ccstrlist) { + return ccstrAtPut((JVMFlagsEnum)flag_enum, *((ccstr*)value), origin); + } + + JVMFlag* flag = JVMFlag::flag_from_enum(flag_enum); + assert(flag->type() == type_enum, "wrong flag type"); + return set_impl(flag, type_enum, value, origin); +} + +// This is called by the FLAG_SET_XXX macros. +JVMFlag::Error JVMFlagAccess::ccstrAtPut(JVMFlagsEnum flag, ccstr value, JVMFlag::Flags origin) { + JVMFlag* faddr = JVMFlag::flag_from_enum(flag); + assert(faddr->is_ccstr(), "wrong flag type"); + ccstr old_value = faddr->get_ccstr(); + trace_flag_changed<ccstr, EventStringFlagChanged>(faddr, old_value, value, origin); + char* new_value = os::strdup_check_oom(value); + faddr->set_ccstr(new_value); + if (!faddr->is_default() && old_value != NULL) { + // Prior value is heap allocated so free it. + FREE_C_HEAP_ARRAY(char, old_value); + } + faddr->set_origin(origin); + return JVMFlag::SUCCESS; +} + +JVMFlag::Error JVMFlagAccess::check_range(const JVMFlag* flag, bool verbose) { + return access_impl(flag)->check_range(flag, verbose); +} + +JVMFlag::Error JVMFlagAccess::check_constraint(const JVMFlag* flag, void * func, bool verbose) { + return access_impl(flag)->check_constraint(flag, func, verbose); +} + +void JVMFlagAccess::print_range(outputStream* st, const JVMFlag* flag, const JVMFlagLimit* range) { + return access_impl(flag)->print_range(st, range); +} + +void JVMFlagAccess::print_range(outputStream* st, const JVMFlag* flag) { + const JVMFlagLimit* range = JVMFlagLimit::get_range(flag); + if (range != NULL) { + print_range(st, flag, range); + } else { + const JVMFlagLimit* limit = JVMFlagLimit::get_constraint(flag); + if (limit != NULL) { + void* func = limit->constraint_func(); + + // Two special cases where the lower limit of the range is defined by an os:: function call + // and cannot be initialized at compile time with constexpr. + if (func == (void*)VMPageSizeConstraintFunc) { + uintx min = (uintx)os::vm_page_size(); + uintx max = max_uintx; + + JVMTypedFlagLimit<uintx> tmp(0, min, max); + access_impl(flag)->print_range(st, &tmp); + } else if (func == (void*)NUMAInterleaveGranularityConstraintFunc) { + size_t min = os::vm_allocation_granularity(); + size_t max = NOT_LP64(2*G) LP64_ONLY(8192*G); + + JVMTypedFlagLimit<size_t> tmp(0, min, max); + access_impl(flag)->print_range(st, &tmp); + } else { + access_impl(flag)->print_default_range(st); + } + } else { + st->print("[ ... ]"); + } + } +} diff --git a/src/hotspot/share/runtime/flags/jvmFlagAccess.hpp b/src/hotspot/share/runtime/flags/jvmFlagAccess.hpp new file mode 100644 index 00000000000..79676fb0378 --- /dev/null +++ b/src/hotspot/share/runtime/flags/jvmFlagAccess.hpp @@ -0,0 +1,123 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_RUNTIME_FLAGS_JVMFLAGACCESS_HPP +#define SHARE_RUNTIME_FLAGS_JVMFLAGACCESS_HPP + +#include "memory/allStatic.hpp" +#include "runtime/flags/jvmFlag.hpp" + +enum JVMFlagsEnum : int; + +class FlagAccessImpl; +class JVMFlagLimit; +class outputStream; + +// Use this macro in combination with JVMFlag::{read, write} and JVMFlagAccess::{get, set} +// to safely access the underlying variable of a JVMFlag: +// +// JVMFlag* flag = JVMFlag::flag_from_enum(FLAG_MEMBER_ENUM(ObjectAlignmentInBytes)); +// +// /* If you use a wrong type, a run-time assertion will happen */ +// intx v = flag->read<JVM_FLAG_TYPE(intx)>(); +// +// /* If you use a wrong type, or a NULL flag, an error code is returned */ +// JVMFlag::Error err = JVMFlagAccess::get<JVM_FLAG_TYPE(intx)>(flag, &v); + +#define JVM_FLAG_TYPE(t) \ + t, JVMFlag::TYPE_ ## t + +// This class provides a unified interface for getting/setting the JVM flags, with support +// for (1) type correctness checks, (2) range checks, (3) constraint checks. Two main types +// of setters are provided. See notes below on which one to use. +class JVMFlagAccess : AllStatic { + inline static const FlagAccessImpl* access_impl(const JVMFlag* flag); + static JVMFlag::Error set_impl(JVMFlagsEnum flag_enum, int type_enum, void* value, JVMFlag::Flags origin); + static JVMFlag::Error set_impl(JVMFlag* flag, int type_enum, void* value, JVMFlag::Flags origin); + static JVMFlag::Error ccstrAtPut(JVMFlagsEnum flag, ccstr value, JVMFlag::Flags origin); + +public: + static JVMFlag::Error check_range(const JVMFlag* flag, bool verbose); + static JVMFlag::Error check_constraint(const JVMFlag* flag, void * func, bool verbose); + static void print_range(outputStream* st, const JVMFlag* flag, const JVMFlagLimit* range); + static void print_range(outputStream* st, const JVMFlag* flag); + + template <typename T, int type_enum> + static JVMFlag::Error get(const JVMFlag* flag, T* value) { + if (flag == NULL) { + return JVMFlag::INVALID_FLAG; + } + if (type_enum == JVMFlag::TYPE_ccstr) { + if (!flag->is_ccstr()) { // ccstr or ccstrlist + return JVMFlag::WRONG_FORMAT; + } + } else { + if (flag->type() != type_enum) { + return JVMFlag::WRONG_FORMAT; + } + } + *value = flag->read<T, type_enum>(); + return JVMFlag::SUCCESS; + } + + // This is a *flag specific* setter. It should be used only via by the + // FLAG_SET_{DEFAULT, CMDLINE, ERGO, MGMT} macros. + // It's used to set a specific flag whose type is statically known. A mismatched + // type_enum will result in an assert. + template <typename T, int type_enum> + static JVMFlag::Error set(JVMFlagsEnum flag_enum, T value, JVMFlag::Flags origin) { + return set_impl(flag_enum, type_enum, &value, origin); + } + + // This setter, and the xxxAtPut functions below, are *generic* setters. They should be used + // by code that can set a number of different flags, often according to external input that + // may contain errors. + // Examples callers are arguments.cpp, writeableFlags.cpp, and WB_SetXxxVMFlag functions. + // A mismatched type_enum would result in a JVMFlag::WRONG_FORMAT code. + template <typename T, int type_enum> + static JVMFlag::Error set(JVMFlag* flag, T* value, JVMFlag::Flags origin) { + return set_impl(flag, type_enum, (void*)value, origin); + } + + static JVMFlag::Error boolAtPut (JVMFlag* f, bool* v, JVMFlag::Flags origin) { return set<JVM_FLAG_TYPE(bool)> (f, v, origin); } + static JVMFlag::Error intAtPut (JVMFlag* f, int* v, JVMFlag::Flags origin) { return set<JVM_FLAG_TYPE(int)> (f, v, origin); } + static JVMFlag::Error uintAtPut (JVMFlag* f, uint* v, JVMFlag::Flags origin) { return set<JVM_FLAG_TYPE(uint)> (f, v, origin); } + static JVMFlag::Error intxAtPut (JVMFlag* f, intx* v, JVMFlag::Flags origin) { return set<JVM_FLAG_TYPE(intx)> (f, v, origin); } + static JVMFlag::Error uintxAtPut (JVMFlag* f, uintx* v, JVMFlag::Flags origin) { return set<JVM_FLAG_TYPE(uintx)> (f, v, origin); } + static JVMFlag::Error uint64_tAtPut(JVMFlag* f, uint64_t* v, JVMFlag::Flags origin) { return set<JVM_FLAG_TYPE(uint64_t)>(f, v, origin); } + static JVMFlag::Error size_tAtPut (JVMFlag* f, size_t* v, JVMFlag::Flags origin) { return set<JVM_FLAG_TYPE(size_t)> (f, v, origin); } + static JVMFlag::Error doubleAtPut (JVMFlag* f, double* v, JVMFlag::Flags origin) { return set<JVM_FLAG_TYPE(double)> (f, v, origin); } + + // Special handling needed for ccstr + // Contract: JVMFlag will make private copy of the incoming value. + // Outgoing value is always malloc-ed, and caller MUST call free. + static JVMFlag::Error ccstrAtPut(JVMFlag* flag, ccstr* value, JVMFlag::Flags origin); + + // Handy aliases + static JVMFlag::Error ccstrAt(const JVMFlag* flag, ccstr* value) { + return get<ccstr, JVMFlag::TYPE_ccstr>(flag, value); + } +}; + +#endif // SHARE_RUNTIME_FLAGS_JVMFLAGACCESS_HPP diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp deleted file mode 100644 index 9248eb87521..00000000000 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright (c) 2015, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#include "precompiled.hpp" -#include "classfile/stringTable.hpp" -#include "classfile/symbolTable.hpp" -#include "gc/shared/jvmFlagConstraintsGC.hpp" -#include "runtime/arguments.hpp" -#include "runtime/flags/jvmFlag.hpp" -#include "runtime/flags/jvmFlagConstraintList.hpp" -#include "runtime/flags/jvmFlagConstraintsCompiler.hpp" -#include "runtime/flags/jvmFlagConstraintsRuntime.hpp" -#include "runtime/globals.hpp" -#include "runtime/globals_extension.hpp" -#include "runtime/os.hpp" -#include "utilities/macros.hpp" - -class JVMFlagConstraint_bool : public JVMFlagConstraint { - JVMFlagConstraintFunc_bool _constraint; - -public: - JVMFlagConstraint_bool(const JVMFlag* flag, - JVMFlagConstraintFunc_bool func, - ConstraintType type) : JVMFlagConstraint(flag, type), _constraint(func) {} - - JVMFlag::Error apply(bool verbose) { - return _constraint(_flag->get_bool(), verbose); - } - - JVMFlag::Error apply_bool(bool value, bool verbose) { - return _constraint(value, verbose); - } -}; - -class JVMFlagConstraint_int : public JVMFlagConstraint { - JVMFlagConstraintFunc_int _constraint; - -public: - JVMFlagConstraint_int(const JVMFlag* flag, - JVMFlagConstraintFunc_int func, - ConstraintType type) : JVMFlagConstraint(flag, type), _constraint(func) {} - - JVMFlag::Error apply(bool verbose) { - return _constraint(_flag->get_int(), verbose); - } - - JVMFlag::Error apply_int(int value, bool verbose) { - return _constraint(value, verbose); - } -}; - -class JVMFlagConstraint_intx : public JVMFlagConstraint { - JVMFlagConstraintFunc_intx _constraint; - -public: - JVMFlagConstraint_intx(const JVMFlag* flag, - JVMFlagConstraintFunc_intx func, - ConstraintType type) : JVMFlagConstraint(flag, type), _constraint(func) {} - - JVMFlag::Error apply(bool verbose) { - return _constraint(_flag->get_intx(), verbose); - } - - JVMFlag::Error apply_intx(intx value, bool verbose) { - return _constraint(value, verbose); - } -}; - -class JVMFlagConstraint_uint : public JVMFlagConstraint { - JVMFlagConstraintFunc_uint _constraint; - -public: - JVMFlagConstraint_uint(const JVMFlag* flag, - JVMFlagConstraintFunc_uint func, - ConstraintType type) : JVMFlagConstraint(flag, type), _constraint(func) {} - - JVMFlag::Error apply(bool verbose) { - return _constraint(_flag->get_uint(), verbose); - } - - JVMFlag::Error apply_uint(uint value, bool verbose) { - return _constraint(value, verbose); - } -}; - -class JVMFlagConstraint_uintx : public JVMFlagConstraint { - JVMFlagConstraintFunc_uintx _constraint; - -public: - JVMFlagConstraint_uintx(const JVMFlag* flag, - JVMFlagConstraintFunc_uintx func, - ConstraintType type) : JVMFlagConstraint(flag, type), _constraint(func) {} - - JVMFlag::Error apply(bool verbose) { - return _constraint(_flag->get_uintx(), verbose); - } - - JVMFlag::Error apply_uintx(uintx value, bool verbose) { - return _constraint(value, verbose); - } -}; - -class JVMFlagConstraint_uint64_t : public JVMFlagConstraint { - JVMFlagConstraintFunc_uint64_t _constraint; - -public: - JVMFlagConstraint_uint64_t(const JVMFlag* flag, - JVMFlagConstraintFunc_uint64_t func, - ConstraintType type) : JVMFlagConstraint(flag, type), _constraint(func) {} - - JVMFlag::Error apply(bool verbose) { - return _constraint(_flag->get_uint64_t(), verbose); - } - - JVMFlag::Error apply_uint64_t(uint64_t value, bool verbose) { - return _constraint(value, verbose); - } -}; - -class JVMFlagConstraint_size_t : public JVMFlagConstraint { - JVMFlagConstraintFunc_size_t _constraint; - -public: - JVMFlagConstraint_size_t(const JVMFlag* flag, - JVMFlagConstraintFunc_size_t func, - ConstraintType type) : JVMFlagConstraint(flag, type), _constraint(func) {} - - JVMFlag::Error apply(bool verbose) { - return _constraint(_flag->get_size_t(), verbose); - } - - JVMFlag::Error apply_size_t(size_t value, bool verbose) { - return _constraint(value, verbose); - } -}; - -class JVMFlagConstraint_double : public JVMFlagConstraint { - JVMFlagConstraintFunc_double _constraint; - -public: - JVMFlagConstraint_double(const JVMFlag* flag, - JVMFlagConstraintFunc_double func, - ConstraintType type) : JVMFlagConstraint(flag, type), _constraint(func) {} - - JVMFlag::Error apply(bool verbose) { - return _constraint(_flag->get_double(), verbose); - } - - JVMFlag::Error apply_double(double value, bool verbose) { - return _constraint(value, verbose); - } -}; - -#define DEFINE_CONSTRAINT_APPLY(T) \ -JVMFlag::Error JVMFlagConstraintChecker::apply_ ## T(T value, bool verbose) const { \ - assert(exists(), "must be"); \ - JVMFlagConstraint_ ## T constraint(_flag, \ - (JVMFlagConstraintFunc_ ## T)_limit->constraint_func(), \ - (JVMFlagConstraint::ConstraintType)_limit->phase()); \ - return constraint.apply_ ## T(value, verbose); \ -} - -ALL_CONSTRAINT_TYPES(DEFINE_CONSTRAINT_APPLY) - - -JVMFlag::Error JVMFlagConstraintChecker::apply(bool verbose) const { -#define APPLY_CONSTRAINT(T) \ - if (_flag->is_ ## T()) { \ - JVMFlagConstraint_ ## T constraint(_flag, \ - (JVMFlagConstraintFunc_ ## T)_limit->constraint_func(), \ - (JVMFlagConstraint::ConstraintType)_limit->phase()); \ - return constraint.apply(verbose); \ - } - - ALL_CONSTRAINT_TYPES(APPLY_CONSTRAINT); - - ShouldNotReachHere(); - return JVMFlag::INVALID_FLAG; -} - - -JVMFlagConstraint::ConstraintType JVMFlagConstraintList::_validating_type = JVMFlagConstraint::AtParse; - -// Find constraints and return only if found constraint's type is equal or lower than current validating type. -JVMFlagConstraintChecker JVMFlagConstraintList::find_if_needs_check(const JVMFlag* flag) { - JVMFlagConstraintChecker constraint = JVMFlagConstraintList::find(flag); - if (constraint.exists() && (constraint.type() <= _validating_type)) { - return constraint; - } - return JVMFlagConstraintChecker(flag, NULL); -} - -// Check constraints for specific constraint type. -bool JVMFlagConstraintList::check_constraints(JVMFlagConstraint::ConstraintType type) { - guarantee(type > _validating_type, "Constraint check is out of order."); - _validating_type = type; - - bool status = true; - for (int i = 0; i < NUM_JVMFlagsEnum; i++) { - JVMFlagConstraintChecker constraint(&JVMFlag::flags[i], JVMFlagLimit::get_constraint_at(i)); - if (!constraint.exists()) continue; - if (type != constraint.type()) continue; - if (constraint.apply(true) != JVMFlag::SUCCESS) status = false; - } - return status; -} diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.hpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintList.hpp deleted file mode 100644 index d6119f986a2..00000000000 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.hpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2015, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#ifndef SHARE_RUNTIME_FLAGS_JVMFLAGCONSTRAINTLIST_HPP -#define SHARE_RUNTIME_FLAGS_JVMFLAGCONSTRAINTLIST_HPP - -#include "runtime/flags/jvmFlag.hpp" -#include "runtime/flags/jvmFlagLimit.hpp" - -/* - * Here we have a mechanism for extracting constraints (as custom functions) for flags, - * which otherwise can not be expressed via simple range check, specified in flag macro tables. - * - * An example of a constraint is "flag1 < flag2" where both flag1 and flag2 can change. - * - * See runtime "runtime/flags/jvmFlagConstraintsCompiler.hpp", - * "runtime/flags/jvmFlagConstraintsGC.hpp" and - * "runtime/flags/jvmFlagConstraintsRuntime.hpp" for the functions themselves. - */ - -typedef JVMFlag::Error (*JVMFlagConstraintFunc_bool)(bool value, bool verbose); -typedef JVMFlag::Error (*JVMFlagConstraintFunc_int)(int value, bool verbose); -typedef JVMFlag::Error (*JVMFlagConstraintFunc_intx)(intx value, bool verbose); -typedef JVMFlag::Error (*JVMFlagConstraintFunc_uint)(uint value, bool verbose); -typedef JVMFlag::Error (*JVMFlagConstraintFunc_uintx)(uintx value, bool verbose); -typedef JVMFlag::Error (*JVMFlagConstraintFunc_uint64_t)(uint64_t value, bool verbose); -typedef JVMFlag::Error (*JVMFlagConstraintFunc_size_t)(size_t value, bool verbose); -typedef JVMFlag::Error (*JVMFlagConstraintFunc_double)(double value, bool verbose); - -class JVMFlagConstraint : public CHeapObj<mtArguments> { -public: - // During VM initialization, constraint validation will be done order of ConstraintType. - enum ConstraintType { - // Will be validated during argument processing (Arguments::parse_argument). - AtParse = 0, - // Will be validated inside Threads::create_vm(), right after Arguments::apply_ergo(). - AfterErgo = 1, - // Will be validated inside universe_init(), right after Metaspace::global_initialize(). - AfterMemoryInit = 2 - }; - -protected: - const JVMFlag* const _flag; - -private: - ConstraintType _validate_type; - -public: - // the "name" argument must be a string literal - JVMFlagConstraint(const JVMFlag* flag, ConstraintType type) : _flag(flag), _validate_type(type) {} - ~JVMFlagConstraint() {} - const JVMFlag* flag() const { return _flag; } - ConstraintType type() const { return _validate_type; } - virtual JVMFlag::Error apply(bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; }; - virtual JVMFlag::Error apply_bool(bool value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; }; - virtual JVMFlag::Error apply_int(int value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; }; - virtual JVMFlag::Error apply_intx(intx value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; }; - virtual JVMFlag::Error apply_uint(uint value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; }; - virtual JVMFlag::Error apply_uintx(uintx value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; }; - virtual JVMFlag::Error apply_uint64_t(uint64_t value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; }; - virtual JVMFlag::Error apply_size_t(size_t value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; }; - virtual JVMFlag::Error apply_double(double value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; }; -}; - -class JVMFlagConstraintChecker { - const JVMFlag* _flag; - const JVMFlagLimit* _limit; - -public: - JVMFlagConstraintChecker(const JVMFlag* flag, const JVMFlagLimit* limit) : _flag(flag), _limit(limit) {} - bool exists() const { return _limit != NULL; } - JVMFlag::Error apply(bool verbose = true) const; - - JVMFlagConstraint::ConstraintType type() const { return (JVMFlagConstraint::ConstraintType)_limit->phase(); } -#define DECLARE_CONSTRAINT_APPLY(T) JVMFlag::Error apply_ ## T(T new_value, bool verbose = true) const; - ALL_CONSTRAINT_TYPES(DECLARE_CONSTRAINT_APPLY) -}; - -class JVMFlagConstraintList : public AllStatic { -private: - // Latest constraint validation type. - static JVMFlagConstraint::ConstraintType _validating_type; -public: - static void init(); - static JVMFlagConstraintChecker find(const JVMFlag* flag) { return JVMFlagConstraintChecker(flag, JVMFlagLimit::get_constraint(flag)); } - static JVMFlagConstraintChecker find_if_needs_check(const JVMFlag* flag); - // True if 'AfterErgo' or later constraint functions are validated. - static bool validated_after_ergo() { return _validating_type >= JVMFlagConstraint::AfterErgo; }; - static bool check_constraints(JVMFlagConstraint::ConstraintType type); -}; - -#endif // SHARE_RUNTIME_FLAGS_JVMFLAGCONSTRAINTLIST_HPP diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp index 0119162ead1..80a1db91b15 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp +++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp @@ -285,6 +285,17 @@ JVMFlag::Error ArraycopyDstPrefetchDistanceConstraintFunc(uintx value, bool verb return JVMFlag::SUCCESS; } +JVMFlag::Error AVX3ThresholdConstraintFunc(int value, bool verbose) { + if (value != 0 && !is_power_of_2(value)) { + JVMFlag::printError(verbose, + "AVX3Threshold ( %d ) must be 0 or " + "a power of two value between 0 and MAX_INT\n", value); + return JVMFlag::VIOLATES_CONSTRAINT; + } + + return JVMFlag::SUCCESS; +} + JVMFlag::Error ArraycopySrcPrefetchDistanceConstraintFunc(uintx value, bool verbose) { if (value >= 4032) { JVMFlag::printError(verbose, diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.hpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.hpp index 6b4abf8a501..85048b08362 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.hpp +++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.hpp @@ -47,6 +47,7 @@ f(intx, OptoLoopAlignmentConstraintFunc) \ f(uintx, ArraycopyDstPrefetchDistanceConstraintFunc) \ f(uintx, ArraycopySrcPrefetchDistanceConstraintFunc) \ + f(int, AVX3ThresholdConstraintFunc) \ f(uintx, TypeProfileLevelConstraintFunc) \ f(intx, InitArrayShortSizeConstraintFunc) \ f(int , RTMTotalCountIncrRateConstraintFunc) \ diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp index 9d55a110f46..504a6d4d523 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp +++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp @@ -139,8 +139,8 @@ JVMFlag::Error VMPageSizeConstraintFunc(uintx value, bool verbose) { JVMFlag::printError(verbose, "%s %s=" UINTX_FORMAT " is outside the allowed range [ " UINTX_FORMAT " ... " UINTX_FORMAT " ]\n", - JVMFlagLimit::last_checked_flag()->_type, - JVMFlagLimit::last_checked_flag()->_name, + JVMFlagLimit::last_checked_flag()->type_string(), + JVMFlagLimit::last_checked_flag()->name(), value, min, max_uintx); return JVMFlag::VIOLATES_CONSTRAINT; } diff --git a/src/hotspot/share/runtime/flags/jvmFlagLimit.cpp b/src/hotspot/share/runtime/flags/jvmFlagLimit.cpp index b9d5ae5a8e9..c4ab9360c45 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagLimit.cpp +++ b/src/hotspot/share/runtime/flags/jvmFlagLimit.cpp @@ -26,11 +26,10 @@ #include "memory/allocation.inline.hpp" #include "gc/shared/jvmFlagConstraintsGC.hpp" #include "runtime/flags/jvmFlag.hpp" +#include "runtime/flags/jvmFlagAccess.hpp" #include "runtime/flags/jvmFlagLimit.hpp" -#include "runtime/flags/jvmFlagConstraintList.hpp" #include "runtime/flags/jvmFlagConstraintsCompiler.hpp" #include "runtime/flags/jvmFlagConstraintsRuntime.hpp" -#include "runtime/flags/jvmFlagRangeList.hpp" #include "runtime/globals_extension.hpp" #include "gc/shared/referenceProcessor.hpp" #include "oops/markWord.hpp" @@ -98,7 +97,7 @@ class LimitGetter { #define FLAG_LIMIT_PTR( type, name, ...) ), LimitGetter<type>::get_limit(&limit_##name, 0 #define FLAG_LIMIT_PTR_NONE( type, name, ...) ), LimitGetter<type>::no_limit(0 #define APPLY_FLAG_RANGE(...) , __VA_ARGS__ -#define APPLY_FLAG_CONSTRAINT(func, phase) , next_two_args_are_constraint, (short)CONSTRAINT_ENUM(func), int(JVMFlagConstraint::phase) +#define APPLY_FLAG_CONSTRAINT(func, phase) , next_two_args_are_constraint, (short)CONSTRAINT_ENUM(func), int(JVMFlagConstraintPhase::phase) constexpr JVMTypedFlagLimit<int> limit_dummy ( @@ -145,6 +144,49 @@ static constexpr const JVMFlagLimit* const flagLimitTable[1 + NUM_JVMFlagsEnum] ) }; -int JVMFlagLimit::_last_checked = -1; +JVMFlagsEnum JVMFlagLimit::_last_checked = INVALID_JVMFlagsEnum; +JVMFlagConstraintPhase JVMFlagLimit::_validating_phase = JVMFlagConstraintPhase::AtParse; const JVMFlagLimit* const* JVMFlagLimit::flagLimits = &flagLimitTable[1]; // excludes dummy + +const JVMFlag* JVMFlagLimit::last_checked_flag() { + if (_last_checked != INVALID_JVMFlagsEnum) { + return JVMFlag::flag_from_enum(_last_checked); + } else { + return NULL; + } +} + +bool JVMFlagLimit::check_all_ranges() { + bool status = true; + for (int i = 0; i < NUM_JVMFlagsEnum; i++) { + JVMFlagsEnum flag_enum = static_cast<JVMFlagsEnum>(i); + if (get_range_at(flag_enum) != NULL && + JVMFlagAccess::check_range(JVMFlag::flag_from_enum(flag_enum), true) != JVMFlag::SUCCESS) { + status = false; + } + } + return status; +} + +// Check constraints for specific constraint phase. +bool JVMFlagLimit::check_all_constraints(JVMFlagConstraintPhase phase) { + guarantee(phase > _validating_phase, "Constraint check is out of order."); + _validating_phase = phase; + + bool status = true; + for (int i = 0; i < NUM_JVMFlagsEnum; i++) { + JVMFlagsEnum flag_enum = static_cast<JVMFlagsEnum>(i); + const JVMFlagLimit* constraint = get_constraint_at(flag_enum); + if (constraint != NULL && constraint->phase() == static_cast<int>(phase) && + JVMFlagAccess::check_constraint(JVMFlag::flag_from_enum(flag_enum), + constraint->constraint_func(), true) != JVMFlag::SUCCESS) { + status = false; + } + } + return status; +} + +void JVMFlagLimit::print_range(outputStream* st, const JVMFlag* flag) const { + JVMFlagAccess::print_range(st, flag, this); +} diff --git a/src/hotspot/share/runtime/flags/jvmFlagLimit.hpp b/src/hotspot/share/runtime/flags/jvmFlagLimit.hpp index 4474b15963d..d3d6a26a972 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagLimit.hpp +++ b/src/hotspot/share/runtime/flags/jvmFlagLimit.hpp @@ -27,20 +27,27 @@ #include "runtime/flags/jvmFlag.hpp" -#define ALL_LIMIT_TYPES(f) \ - f(int) \ - f(intx) \ - f(uint) \ - f(uintx) \ - f(uint64_t) \ - f(size_t) \ - f(double) - -#define ALL_RANGE_TYPES(f) ALL_LIMIT_TYPES(f) -#define ALL_CONSTRAINT_TYPES(f) ALL_LIMIT_TYPES(f) f(bool) - +class outputStream; template <typename T> class JVMTypedFlagLimit; +enum class JVMFlagConstraintPhase : int { + // Will be validated during argument processing (Arguments::parse_argument). + AtParse = 0, + // Will be validated inside Threads::create_vm(), right after Arguments::apply_ergo(). + AfterErgo = 1, + // Will be validated inside universe_init(), right after Metaspace::global_initialize(). + AfterMemoryInit = 2 +}; + + +typedef JVMFlag::Error (*JVMFlagConstraintFunc_bool)(bool value, bool verbose); +typedef JVMFlag::Error (*JVMFlagConstraintFunc_int)(int value, bool verbose); +typedef JVMFlag::Error (*JVMFlagConstraintFunc_intx)(intx value, bool verbose); +typedef JVMFlag::Error (*JVMFlagConstraintFunc_uint)(uint value, bool verbose); +typedef JVMFlag::Error (*JVMFlagConstraintFunc_uintx)(uintx value, bool verbose); +typedef JVMFlag::Error (*JVMFlagConstraintFunc_uint64_t)(uint64_t value, bool verbose); +typedef JVMFlag::Error (*JVMFlagConstraintFunc_size_t)(size_t value, bool verbose); +typedef JVMFlag::Error (*JVMFlagConstraintFunc_double)(double value, bool verbose); // A JVMFlagLimit is created for each JVMFlag that has a range() and/or constraint() in its declaration in // the globals_xxx.hpp file. @@ -61,14 +68,15 @@ class JVMFlagLimit { char _kind; static const JVMFlagLimit* const* flagLimits; - static int _last_checked; + static JVMFlagsEnum _last_checked; + static JVMFlagConstraintPhase _validating_phase; protected: static constexpr int HAS_RANGE = 1; static constexpr int HAS_CONSTRAINT = 2; private: - static const JVMFlagLimit* get_kind_at(int flag_enum, int required_kind) { + static const JVMFlagLimit* get_kind_at(JVMFlagsEnum flag_enum, int required_kind) { const JVMFlagLimit* limit = at(flag_enum); if (limit != NULL && (limit->_kind & required_kind) != 0) { _last_checked = flag_enum; @@ -78,9 +86,9 @@ class JVMFlagLimit { } } - static const JVMFlagLimit* at(int flag_enum) { + static const JVMFlagLimit* at(JVMFlagsEnum flag_enum) { JVMFlag::assert_valid_flag_enum(flag_enum); - return flagLimits[flag_enum]; + return flagLimits[static_cast<int>(flag_enum)]; } public: @@ -93,28 +101,34 @@ class JVMFlagLimit { static const JVMFlagLimit* get_range(const JVMFlag* flag) { return get_range_at(flag->flag_enum()); } - static const JVMFlagLimit* get_range_at(int flag_enum) { + static const JVMFlagLimit* get_range_at(JVMFlagsEnum flag_enum) { return get_kind_at(flag_enum, HAS_RANGE); } static const JVMFlagLimit* get_constraint(const JVMFlag* flag) { return get_constraint_at(flag->flag_enum()); } - static const JVMFlagLimit* get_constraint_at(int flag_enum) { + static const JVMFlagLimit* get_constraint_at(JVMFlagsEnum flag_enum) { return get_kind_at(flag_enum, HAS_CONSTRAINT); } - static const JVMFlag* last_checked_flag() { - if (_last_checked >= 0) { - return JVMFlag::flag_from_enum(_last_checked); - } else { - return NULL; - } - } + static const JVMFlag* last_checked_flag(); + + // Is the current value of each JVM flag within the allowed range (if specified) + static bool check_all_ranges(); + void print_range(outputStream* st, const JVMFlag* flag) const; -#define AS_TYPED_LIMIT(type) inline JVMTypedFlagLimit<type>* as_ ## type() const { return (JVMTypedFlagLimit<type>*)this; } - ALL_RANGE_TYPES(AS_TYPED_LIMIT) + // Does the current value of each JVM flag satisfy the specified constraint + static bool check_all_constraints(JVMFlagConstraintPhase phase); + + // If range/constraint checks fail, print verbose error messages only if we are parsing + // arguments from the command-line. Silently ignore any invalid values that are + // set programmatically via FLAG_SET_ERGO, etc. + static bool verbose_checks_needed() { + return _validating_phase == JVMFlagConstraintPhase::AtParse; + } + static JVMFlagConstraintPhase validating_phase() { return _validating_phase; } }; enum ConstraintMarker { diff --git a/src/hotspot/share/runtime/flags/jvmFlagLookup.cpp b/src/hotspot/share/runtime/flags/jvmFlagLookup.cpp index e8d57967251..fbdfcf000fd 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagLookup.cpp +++ b/src/hotspot/share/runtime/flags/jvmFlagLookup.cpp @@ -30,9 +30,9 @@ #define DO_FLAG(type, name,...) DO_HASH(FLAG_MEMBER_ENUM(name), XSTR(name)) #define DO_HASH(flag_enum, flag_name) { \ - u2 hash = hash_code(flag_name); \ + unsigned int hash = hash_code(flag_name); \ int bucket_index = (int)(hash % NUM_BUCKETS); \ - _hashes[flag_enum] = hash; \ + _hashes[flag_enum] = (u2)(hash); \ _table[flag_enum] = _buckets[bucket_index]; \ _buckets[bucket_index] = (short)flag_enum; \ } @@ -54,15 +54,15 @@ constexpr JVMFlagLookup::JVMFlagLookup() : _buckets(), _table(), _hashes() { constexpr JVMFlagLookup _flag_lookup_table; JVMFlag* JVMFlagLookup::find_impl(const char* name, size_t length) const { - u2 hash = hash_code(name, length); + unsigned int hash = hash_code(name, length); int bucket_index = (int)(hash % NUM_BUCKETS); for (int flag_enum = _buckets[bucket_index]; flag_enum >= 0; ) { - if (_hashes[flag_enum] == hash) { + if (_hashes[flag_enum] == (u2)hash) { JVMFlag* flag = JVMFlag::flags + flag_enum; - if (strncmp(name, flag->_name, length) == 0) { - // We know flag->_name has at least <length> bytes. + if (strncmp(name, flag->name(), length) == 0) { + // We know flag->name() has at least <length> bytes. // Make sure it has exactly <length> bytes - if (flag->_name[length] == 0) { + if (flag->name()[length] == 0) { return flag; } } diff --git a/src/hotspot/share/runtime/flags/jvmFlagLookup.hpp b/src/hotspot/share/runtime/flags/jvmFlagLookup.hpp index 3ac31b0e61e..128025b8e22 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagLookup.hpp +++ b/src/hotspot/share/runtime/flags/jvmFlagLookup.hpp @@ -51,14 +51,14 @@ class JVMFlagLookup { // This is executed at build-time only, so it doesn't matter if we walk // the string twice. - static constexpr u2 hash_code(const char* s) { + static constexpr unsigned int hash_code(const char* s) { return hash_code(s, string_len(s)); } - static constexpr u2 hash_code(const char* s, size_t len) { - u2 h = 0; + static constexpr unsigned int hash_code(const char* s, size_t len) { + unsigned int h = 0; while (len -- > 0) { - h = (u2)(31*h + (u2) *s); + h = 31*h + (unsigned int) *s; s++; } return h; diff --git a/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp b/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp deleted file mode 100644 index f79f7ec47f8..00000000000 --- a/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright (c) 2015, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#include "precompiled.hpp" -#include "jvm.h" -#include "classfile/stringTable.hpp" -#include "classfile/symbolTable.hpp" -#include "gc/shared/referenceProcessor.hpp" -#include "oops/markWord.hpp" -#include "runtime/arguments.hpp" -#include "runtime/flags/jvmFlag.hpp" -#include "runtime/flags/jvmFlagConstraintList.hpp" -#include "runtime/flags/jvmFlagConstraintsRuntime.hpp" -#include "runtime/flags/jvmFlagRangeList.hpp" -#include "runtime/globals.hpp" -#include "runtime/globals_extension.hpp" -#include "runtime/os.hpp" -#include "runtime/task.hpp" -#include "utilities/macros.hpp" - -class JVMFlagRange_int : public JVMFlagRange { - int _min; - int _max; - -public: - JVMFlagRange_int(const JVMFlag* flag, int min, int max) - : JVMFlagRange(flag), _min(min), _max(max) {} - - JVMFlag::Error check(bool verbose = true) { - return check_int(_flag->get_int(), verbose); - } - - JVMFlag::Error check_int(int value, bool verbose = true) { - if ((value < _min) || (value > _max)) { - JVMFlag::printError(verbose, - "int %s=%d is outside the allowed range " - "[ %d ... %d ]\n", - name(), value, _min, _max); - return JVMFlag::OUT_OF_BOUNDS; - } else { - return JVMFlag::SUCCESS; - } - } - - void print(outputStream* st) { - st->print("[ %-25d ... %25d ]", _min, _max); - } -}; - -class JVMFlagRange_intx : public JVMFlagRange { - intx _min; - intx _max; - -public: - JVMFlagRange_intx(const JVMFlag* flag, intx min, intx max) - : JVMFlagRange(flag), _min(min), _max(max) {} - - JVMFlag::Error check(bool verbose = true) { - return check_intx(_flag->get_intx(), verbose); - } - - JVMFlag::Error check_intx(intx value, bool verbose = true) { - if ((value < _min) || (value > _max)) { - JVMFlag::printError(verbose, - "intx %s=" INTX_FORMAT " is outside the allowed range " - "[ " INTX_FORMAT " ... " INTX_FORMAT " ]\n", - name(), value, _min, _max); - return JVMFlag::OUT_OF_BOUNDS; - } else { - return JVMFlag::SUCCESS; - } - } - - void print(outputStream* st) { - st->print("[ " INTX_FORMAT_W(-25) " ... " INTX_FORMAT_W(25) " ]", _min, _max); - } -}; - -class JVMFlagRange_uint : public JVMFlagRange { - uint _min; - uint _max; - -public: - JVMFlagRange_uint(const JVMFlag* flag, uint min, uint max) - : JVMFlagRange(flag), _min(min), _max(max) {} - - JVMFlag::Error check(bool verbose = true) { - return check_uint(_flag->get_uint(), verbose); - } - - JVMFlag::Error check_uint(uint value, bool verbose = true) { - if ((value < _min) || (value > _max)) { - JVMFlag::printError(verbose, - "uint %s=%u is outside the allowed range " - "[ %u ... %u ]\n", - name(), value, _min, _max); - return JVMFlag::OUT_OF_BOUNDS; - } else { - return JVMFlag::SUCCESS; - } - } - - void print(outputStream* st) { - st->print("[ %-25u ... %25u ]", _min, _max); - } -}; - -class JVMFlagRange_uintx : public JVMFlagRange { - uintx _min; - uintx _max; - -public: - JVMFlagRange_uintx(const JVMFlag* flag, uintx min, uintx max) - : JVMFlagRange(flag), _min(min), _max(max) {} - - JVMFlag::Error check(bool verbose = true) { - return check_uintx(_flag->get_uintx(), verbose); - } - - JVMFlag::Error check_uintx(uintx value, bool verbose = true) { - if ((value < _min) || (value > _max)) { - JVMFlag::printError(verbose, - "uintx %s=" UINTX_FORMAT " is outside the allowed range " - "[ " UINTX_FORMAT " ... " UINTX_FORMAT " ]\n", - name(), value, _min, _max); - return JVMFlag::OUT_OF_BOUNDS; - } else { - return JVMFlag::SUCCESS; - } - } - - void print(outputStream* st) { - st->print("[ " UINTX_FORMAT_W(-25) " ... " UINTX_FORMAT_W(25) " ]", _min, _max); - } -}; - -class JVMFlagRange_uint64_t : public JVMFlagRange { - uint64_t _min; - uint64_t _max; - -public: - JVMFlagRange_uint64_t(const JVMFlag* flag, uint64_t min, uint64_t max) - : JVMFlagRange(flag), _min(min), _max(max) {} - - JVMFlag::Error check(bool verbose = true) { - return check_uint64_t(_flag->get_uintx(), verbose); - } - - JVMFlag::Error check_uint64_t(uint64_t value, bool verbose = true) { - if ((value < _min) || (value > _max)) { - JVMFlag::printError(verbose, - "uint64_t %s=" UINT64_FORMAT " is outside the allowed range " - "[ " UINT64_FORMAT " ... " UINT64_FORMAT " ]\n", - name(), value, _min, _max); - return JVMFlag::OUT_OF_BOUNDS; - } else { - return JVMFlag::SUCCESS; - } - } - - void print(outputStream* st) { - st->print("[ " UINT64_FORMAT_W(-25) " ... " UINT64_FORMAT_W(25) " ]", _min, _max); - } -}; - -class JVMFlagRange_size_t : public JVMFlagRange { - size_t _min; - size_t _max; - -public: - JVMFlagRange_size_t(const JVMFlag* flag, size_t min, size_t max) - : JVMFlagRange(flag), _min(min), _max(max) {} - - JVMFlag::Error check(bool verbose = true) { - return check_size_t(_flag->get_size_t(), verbose); - } - - JVMFlag::Error check_size_t(size_t value, bool verbose = true) { - if ((value < _min) || (value > _max)) { - JVMFlag::printError(verbose, - "size_t %s=" SIZE_FORMAT " is outside the allowed range " - "[ " SIZE_FORMAT " ... " SIZE_FORMAT " ]\n", - name(), value, _min, _max); - return JVMFlag::OUT_OF_BOUNDS; - } else { - return JVMFlag::SUCCESS; - } - } - - void print(outputStream* st) { - st->print("[ " SIZE_FORMAT_W(-25) " ... " SIZE_FORMAT_W(25) " ]", _min, _max); - } -}; - -class JVMFlagRange_double : public JVMFlagRange { - double _min; - double _max; - -public: - JVMFlagRange_double(const JVMFlag* flag, double min, double max) - : JVMFlagRange(flag), _min(min), _max(max) {} - - JVMFlag::Error check(bool verbose = true) { - return check_double(_flag->get_double(), verbose); - } - - JVMFlag::Error check_double(double value, bool verbose = true) { - if ((value < _min) || (value > _max)) { - JVMFlag::printError(verbose, - "double %s=%f is outside the allowed range " - "[ %f ... %f ]\n", - name(), value, _min, _max); - return JVMFlag::OUT_OF_BOUNDS; - } else { - return JVMFlag::SUCCESS; - } - } - - void print(outputStream* st) { - st->print("[ %-25.3f ... %25.3f ]", _min, _max); - } -}; - -#define DEFINE_RANGE_CHECK(T) \ -JVMFlag::Error JVMFlagRangeChecker::check_ ## T(T value, bool verbose) const { \ - assert(exists(), "must be"); \ - JVMFlagRange_ ## T range(_flag, _limit->as_ ## T()->min(), _limit->as_ ## T()->max()); \ - return range.check_ ## T(value, verbose); \ -} - -ALL_RANGE_TYPES(DEFINE_RANGE_CHECK) - - -JVMFlag::Error JVMFlagRangeChecker::check(bool verbose) const { -#define CHECK_RANGE(T) \ - if (_flag->is_ ## T()) { \ - JVMFlagRange_ ## T range(_flag, _limit->as_ ## T()->min(), _limit->as_ ## T()->max()); \ - return range.check(verbose); \ - } - - ALL_RANGE_TYPES(CHECK_RANGE); - - ShouldNotReachHere(); - return JVMFlag::INVALID_FLAG; -} - -void JVMFlagRangeChecker::print(outputStream* out) const { -#define PRINT_RANGE(T) \ - if (_flag->is_ ## T()) { \ - JVMFlagRange_ ## T range(_flag, _limit->as_ ## T()->min(), _limit->as_ ## T()->max()); \ - range.print(out); \ - return; \ - } - - ALL_RANGE_TYPES(PRINT_RANGE); - - ShouldNotReachHere(); -} - -void JVMFlagRangeList::print(outputStream* st, const JVMFlag* flag, RangeStrFunc default_range_str_func) { - JVMFlagRangeChecker range = JVMFlagRangeList::find(flag); - if (range.exists()) { - range.print(st); - } else { - const JVMFlagLimit* limit = JVMFlagLimit::get_constraint(flag); - if (limit != NULL) { - void* func = limit->constraint_func(); - - // Two special cases where the lower limit of the range is defined by an os:: function call - // and cannot be initialized at compile time with constexpr. - if (func == (void*)VMPageSizeConstraintFunc) { - uintx min = (uintx)os::vm_page_size(); - uintx max = max_uintx; - - JVMFlagRange_uintx tmp(flag, min, max); - tmp.print(st); - } else if (func == (void*)NUMAInterleaveGranularityConstraintFunc) { - size_t min = os::vm_allocation_granularity(); - size_t max = NOT_LP64(2*G) LP64_ONLY(8192*G); - - JVMFlagRange_size_t tmp(flag, min, max); - tmp.print(st); - } else { - assert(default_range_str_func!=NULL, "default_range_str_func must be provided"); - st->print("%s", default_range_str_func()); - } - } else { - st->print("[ ... ]"); - } - } -} - -bool JVMFlagRangeList::check_ranges() { - bool status = true; - for (int i = 0; i < NUM_JVMFlagsEnum; i++) { - JVMFlagRangeChecker range(&JVMFlag::flags[i], JVMFlagLimit::get_range_at(i)); - if (range.exists() && range.check(true) != JVMFlag::SUCCESS) status = false; - } - return status; -} diff --git a/src/hotspot/share/runtime/flags/jvmFlagRangeList.hpp b/src/hotspot/share/runtime/flags/jvmFlagRangeList.hpp deleted file mode 100644 index ecc30842126..00000000000 --- a/src/hotspot/share/runtime/flags/jvmFlagRangeList.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2015, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#ifndef SHARE_RUNTIME_FLAGS_JVMFLAGRANGELIST_HPP -#define SHARE_RUNTIME_FLAGS_JVMFLAGRANGELIST_HPP - -#include "runtime/flags/jvmFlag.hpp" -#include "runtime/flags/jvmFlagLimit.hpp" - -/* - * Here we have a mechanism for extracting ranges specified in flag macro tables. - * - * The specified ranges are used to verify that flags have valid values. - * - * An example of a range is "min <= flag <= max". Both "min" and "max" must be - * constant and can not change. If either "min" or "max" can change, - * then we need to use constraint instead. - */ - -class JVMFlagRange : public CHeapObj<mtArguments> { -protected: - const JVMFlag* const _flag; -public: - // the "name" argument must be a string literal - JVMFlagRange(const JVMFlag* flag) : _flag(flag) {} - ~JVMFlagRange() {} - const JVMFlag* flag() const { return _flag; } - const char* name() const { return _flag->_name; } - virtual JVMFlag::Error check(bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; } - virtual JVMFlag::Error check_int(int value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; } - virtual JVMFlag::Error check_intx(intx value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; } - virtual JVMFlag::Error check_uint(uint value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; } - virtual JVMFlag::Error check_uintx(uintx value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; } - virtual JVMFlag::Error check_uint64_t(uint64_t value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; } - virtual JVMFlag::Error check_size_t(size_t value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; } - virtual JVMFlag::Error check_double(double value, bool verbose = true) { ShouldNotReachHere(); return JVMFlag::ERR_OTHER; } - virtual void print(outputStream* st) { ; } -}; - -class JVMFlagRangeChecker { - const JVMFlag* _flag; - const JVMFlagLimit* _limit; - -public: - JVMFlagRangeChecker(const JVMFlag* flag, const JVMFlagLimit* limit) : _flag(flag), _limit(limit) {} - bool exists() const { return _limit != NULL; } - JVMFlag::Error check(bool verbose = true) const; - void print(outputStream* st) const; - -#define DECLARE_RANGE_CHECK(T) JVMFlag::Error check_ ## T(T new_value, bool verbose = true) const; - ALL_RANGE_TYPES(DECLARE_RANGE_CHECK) -}; - -class JVMFlagRangeList : public AllStatic { -public: - static JVMFlagRangeChecker find(const JVMFlag* flag) { return JVMFlagRangeChecker(flag, JVMFlagLimit::get_range(flag)); } - static void print(outputStream* st, const JVMFlag* flag, RangeStrFunc default_range_str_func); - // Check the final values of all flags for ranges. - static bool check_ranges(); -}; - -#endif // SHARE_RUNTIME_FLAGS_JVMFLAGRANGELIST_HPP diff --git a/src/hotspot/share/runtime/globals.cpp b/src/hotspot/share/runtime/globals.cpp index 0371fd72f9f..fa3aa506050 100644 --- a/src/hotspot/share/runtime/globals.cpp +++ b/src/hotspot/share/runtime/globals.cpp @@ -31,7 +31,6 @@ #include "runtime/globals.hpp" #include "runtime/globals_extension.hpp" #include "runtime/globals_shared.hpp" -#include "runtime/flags/jvmFlagConstraintList.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" #include "utilities/defaultStream.hpp" diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index dda16c88b2c..70c904d4315 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -101,10 +101,10 @@ // // range is a macro that will expand to min and max arguments for range -// checking code if provided - see jvmFlagRangeList.hpp +// checking code if provided - see jvmFlagLimit.hpp // // constraint is a macro that will expand to custom function call -// for constraint checking if provided - see jvmFlagConstraintList.hpp +// for constraint checking if provided - see jvmFlagLimit.hpp // Default and minimum StringTable and SymbolTable size values // Must be powers of 2 @@ -185,7 +185,7 @@ const intx ObjectAlignmentInBytes = 8; "features") \ \ product(bool, JavaMonitorsInStackTrace, true, \ - "Print information about Java monitor locks when the stacks are" \ + "Print information about Java monitor locks when the stacks are " \ "dumped") \ \ product_pd(bool, UseLargePages, \ @@ -395,10 +395,6 @@ const intx ObjectAlignmentInBytes = 8; notproduct(bool, WalkStackALot, false, \ "Trace stack (no print) at every exit from the runtime system") \ \ - product(bool, Debugging, false, \ - "Set when executing debug methods in debug.cpp " \ - "(to prevent triggering assertions)") \ - \ notproduct(bool, VerifyLastFrame, false, \ "Verify oops on last frame on entry to VM") \ \ @@ -2439,10 +2435,10 @@ const intx ObjectAlignmentInBytes = 8; "When a class C is loaded, check that " \ "(1) all intrinsics defined by the VM for class C are present "\ "in the loaded class file and are marked with the " \ - "@HotSpotIntrinsicCandidate annotation, that " \ + "@IntrinsicCandidate annotation, that " \ "(2) there is an intrinsic registered for all loaded methods " \ - "that are annotated with the @HotSpotIntrinsicCandidate " \ - "annotation, and that " \ + "that are annotated with the @IntrinsicCandidate annotation, " \ + "and that " \ "(3) no orphan methods exist for class C (i.e., methods for " \ "which the VM declares an intrinsic but that are not declared "\ "in the loaded class C. " \ diff --git a/src/hotspot/share/runtime/globals_extension.hpp b/src/hotspot/share/runtime/globals_extension.hpp index fd906760db9..e5a7750e3d6 100644 --- a/src/hotspot/share/runtime/globals_extension.hpp +++ b/src/hotspot/share/runtime/globals_extension.hpp @@ -26,6 +26,7 @@ #define SHARE_RUNTIME_GLOBALS_EXTENSION_HPP #include "runtime/flags/jvmFlag.hpp" +#include "runtime/flags/jvmFlagAccess.hpp" #include "runtime/globals.hpp" #include "utilities/macros.hpp" @@ -34,81 +35,49 @@ #define FLAG_MEMBER_ENUM(name) Flag_##name##_enum #define FLAG_MEMBER_ENUM_(name) FLAG_MEMBER_ENUM(name), -#define FLAG_MEMBER_ENUM_PRODUCT(type, name, value, ...) FLAG_MEMBER_ENUM_(name) -#define FLAG_MEMBER_ENUM_PD_PRODUCT(type, name, ...) FLAG_MEMBER_ENUM_(name) -#define FLAG_MEMBER_ENUM_DEVELOP(type, name, value, ...) FLAG_MEMBER_ENUM_(name) -#define FLAG_MEMBER_ENUM_PD_DEVELOP(type, name, ...) FLAG_MEMBER_ENUM_(name) -#define FLAG_MEMBER_ENUM_NOTPRODUCT(type, name, value, ...) FLAG_MEMBER_ENUM_(name) +#define DEFINE_FLAG_MEMBER_ENUM(type, name, ...) FLAG_MEMBER_ENUM_(name) -typedef enum : int { - ALL_FLAGS(FLAG_MEMBER_ENUM_DEVELOP, - FLAG_MEMBER_ENUM_PD_DEVELOP, - FLAG_MEMBER_ENUM_PRODUCT, - FLAG_MEMBER_ENUM_PD_PRODUCT, - FLAG_MEMBER_ENUM_NOTPRODUCT, +enum JVMFlagsEnum : int { + INVALID_JVMFlagsEnum = -1, + ALL_FLAGS(DEFINE_FLAG_MEMBER_ENUM, + DEFINE_FLAG_MEMBER_ENUM, + DEFINE_FLAG_MEMBER_ENUM, + DEFINE_FLAG_MEMBER_ENUM, + DEFINE_FLAG_MEMBER_ENUM, IGNORE_RANGE, IGNORE_CONSTRAINT) NUM_JVMFlagsEnum -} JVMFlagsEnum; - -// Can't put the following in JVMFlags because -// of a circular dependency on the enum definition. -class JVMFlagEx : JVMFlag { - public: - static JVMFlag::Error boolAtPut(JVMFlagsEnum flag, bool value, JVMFlag::Flags origin); - static JVMFlag::Error intAtPut(JVMFlagsEnum flag, int value, JVMFlag::Flags origin); - static JVMFlag::Error uintAtPut(JVMFlagsEnum flag, uint value, JVMFlag::Flags origin); - static JVMFlag::Error intxAtPut(JVMFlagsEnum flag, intx value, JVMFlag::Flags origin); - static JVMFlag::Error uintxAtPut(JVMFlagsEnum flag, uintx value, JVMFlag::Flags origin); - static JVMFlag::Error uint64_tAtPut(JVMFlagsEnum flag, uint64_t value, JVMFlag::Flags origin); - static JVMFlag::Error size_tAtPut(JVMFlagsEnum flag, size_t value, JVMFlag::Flags origin); - static JVMFlag::Error doubleAtPut(JVMFlagsEnum flag, double value, JVMFlag::Flags origin); - // Contract: Flag will make private copy of the incoming value - static JVMFlag::Error ccstrAtPut(JVMFlagsEnum flag, ccstr value, JVMFlag::Flags origin); - static JVMFlag::Error ccstrlistAtPut(JVMFlagsEnum flag, ccstr value, JVMFlag::Flags origin) { - return ccstrAtPut(flag, value, origin); - } - - static bool is_default(JVMFlagsEnum flag); - static bool is_ergo(JVMFlagsEnum flag); - static bool is_cmdline(JVMFlagsEnum flag); - static bool is_jimage_resource(JVMFlagsEnum flag); - - static void setOnCmdLine(JVMFlagsEnum flag); - - static JVMFlag* flag_from_enum(JVMFlagsEnum flag); }; // Construct set functions for all flags -#define FLAG_MEMBER_SET(name) Flag_##name##_set -#define FLAG_MEMBER_SET_(type, name) inline JVMFlag::Error FLAG_MEMBER_SET(name)(type value, JVMFlag::Flags origin) { return JVMFlagEx::type##AtPut(FLAG_MEMBER_ENUM(name), value, origin); } +#define FLAG_MEMBER_SETTER(name) Flag_##name##_set +#define FLAG_MEMBER_SETTER_(type, name) \ + inline JVMFlag::Error FLAG_MEMBER_SETTER(name)(type value, JVMFlag::Flags origin) { \ + return JVMFlagAccess::set<JVM_FLAG_TYPE(type)>(FLAG_MEMBER_ENUM(name), value, origin); \ + } -#define FLAG_MEMBER_SET_PRODUCT(type, name, value, ...) FLAG_MEMBER_SET_(type, name) -#define FLAG_MEMBER_SET_PD_PRODUCT(type, name, ...) FLAG_MEMBER_SET_(type, name) -#define FLAG_MEMBER_SET_DEVELOP(type, name, value, ...) FLAG_MEMBER_SET_(type, name) -#define FLAG_MEMBER_SET_PD_DEVELOP(type, name, ...) FLAG_MEMBER_SET_(type, name) -#define FLAG_MEMBER_SET_NOTPRODUCT(type, name, value, ...) FLAG_MEMBER_SET_(type, name) +#define DEFINE_FLAG_MEMBER_SETTER(type, name, ...) FLAG_MEMBER_SETTER_(type, name) -ALL_FLAGS(FLAG_MEMBER_SET_DEVELOP, - FLAG_MEMBER_SET_PD_DEVELOP, - FLAG_MEMBER_SET_PRODUCT, - FLAG_MEMBER_SET_PD_PRODUCT, - FLAG_MEMBER_SET_NOTPRODUCT, +ALL_FLAGS(DEFINE_FLAG_MEMBER_SETTER, + DEFINE_FLAG_MEMBER_SETTER, + DEFINE_FLAG_MEMBER_SETTER, + DEFINE_FLAG_MEMBER_SETTER, + DEFINE_FLAG_MEMBER_SETTER, IGNORE_RANGE, IGNORE_CONSTRAINT) -#define FLAG_IS_DEFAULT(name) (JVMFlagEx::is_default(FLAG_MEMBER_ENUM(name))) -#define FLAG_IS_ERGO(name) (JVMFlagEx::is_ergo(FLAG_MEMBER_ENUM(name))) -#define FLAG_IS_CMDLINE(name) (JVMFlagEx::is_cmdline(FLAG_MEMBER_ENUM(name))) -#define FLAG_IS_JIMAGE_RESOURCE(name) (JVMFlagEx::is_jimage_resource(FLAG_MEMBER_ENUM(name))) +#define FLAG_IS_DEFAULT(name) (JVMFlag::is_default(FLAG_MEMBER_ENUM(name))) +#define FLAG_IS_ERGO(name) (JVMFlag::is_ergo(FLAG_MEMBER_ENUM(name))) +#define FLAG_IS_CMDLINE(name) (JVMFlag::is_cmdline(FLAG_MEMBER_ENUM(name))) +#define FLAG_IS_JIMAGE_RESOURCE(name) (JVMFlag::is_jimage_resource(FLAG_MEMBER_ENUM(name))) #define FLAG_SET_DEFAULT(name, value) ((name) = (value)) -#define FLAG_SET_CMDLINE(name, value) (JVMFlagEx::setOnCmdLine(FLAG_MEMBER_ENUM(name)), \ - FLAG_MEMBER_SET(name)((value), JVMFlag::COMMAND_LINE)) -#define FLAG_SET_ERGO(name, value) (FLAG_MEMBER_SET(name)((value), JVMFlag::ERGONOMIC)) -#define FLAG_SET_MGMT(name, value) (FLAG_MEMBER_SET(name)((value), JVMFlag::MANAGEMENT)) +#define FLAG_SET_CMDLINE(name, value) (JVMFlag::setOnCmdLine(FLAG_MEMBER_ENUM(name)), \ + FLAG_MEMBER_SETTER(name)((value), JVMFlag::COMMAND_LINE)) +#define FLAG_SET_ERGO(name, value) (FLAG_MEMBER_SETTER(name)((value), JVMFlag::ERGONOMIC)) +#define FLAG_SET_MGMT(name, value) (FLAG_MEMBER_SETTER(name)((value), JVMFlag::MANAGEMENT)) #define FLAG_SET_ERGO_IF_DEFAULT(name, value) \ do { \ diff --git a/src/hotspot/share/runtime/handshake.cpp b/src/hotspot/share/runtime/handshake.cpp index 89d27898186..c3af69d7865 100644 --- a/src/hotspot/share/runtime/handshake.cpp +++ b/src/hotspot/share/runtime/handshake.cpp @@ -30,37 +30,53 @@ #include "runtime/handshake.hpp" #include "runtime/interfaceSupport.inline.hpp" #include "runtime/osThread.hpp" -#include "runtime/semaphore.inline.hpp" #include "runtime/task.hpp" #include "runtime/thread.hpp" #include "runtime/vmThread.hpp" #include "utilities/formatBuffer.hpp" +#include "utilities/filterQueue.inline.hpp" #include "utilities/preserveException.hpp" - -class HandshakeOperation: public StackObj { - HandshakeClosure* _handshake_cl; - int32_t _pending_threads; - bool _executed; - bool _is_direct; -public: - HandshakeOperation(HandshakeClosure* cl, bool is_direct = false) : +class HandshakeOperation : public CHeapObj<mtThread> { + friend class HandshakeState; + protected: + HandshakeClosure* _handshake_cl; + // Keeps track of emitted and completed handshake operations. + // Once it reaches zero all handshake operations have been performed. + int32_t _pending_threads; + JavaThread* _target; + + // Must use AsyncHandshakeOperation when using AsyncHandshakeClosure. + HandshakeOperation(AsyncHandshakeClosure* cl, JavaThread* target) : _handshake_cl(cl), _pending_threads(1), - _executed(false), - _is_direct(is_direct) {} + _target(target) {} + public: + HandshakeOperation(HandshakeClosure* cl, JavaThread* target) : + _handshake_cl(cl), + _pending_threads(1), + _target(target) {} + virtual ~HandshakeOperation() {} void do_handshake(JavaThread* thread); bool is_completed() { int32_t val = Atomic::load(&_pending_threads); assert(val >= 0, "_pending_threads=%d cannot be negative", val); return val == 0; } - void add_target_count(int count) { Atomic::add(&_pending_threads, count, memory_order_relaxed); } - bool executed() const { return _executed; } - const char* name() { return _handshake_cl->name(); } + void add_target_count(int count) { Atomic::add(&_pending_threads, count); } + const char* name() { return _handshake_cl->name(); } + bool is_async() { return _handshake_cl->is_async(); } +}; - bool is_direct() { return _is_direct; } +class AsyncHandshakeOperation : public HandshakeOperation { + private: + jlong _start_time_ns; + public: + AsyncHandshakeOperation(AsyncHandshakeClosure* cl, JavaThread* target, jlong start_ns) + : HandshakeOperation(cl, target), _start_time_ns(start_ns) {} + virtual ~AsyncHandshakeOperation() { delete _handshake_cl; } + jlong start_time() const { return _start_time_ns; } }; // Performing handshakes requires a custom yielding strategy because without it @@ -79,7 +95,6 @@ class HandshakeSpinYield : public StackObj { int _result_count[2][HandshakeState::_number_states]; int _prev_result_pos; - int prev_result_pos() { return _prev_result_pos & 0x1; } int current_result_pos() { return (_prev_result_pos + 1) & 0x1; } void wait_raw(jlong now) { @@ -176,8 +191,8 @@ bool VM_Handshake::handshake_has_timed_out(jlong start_time) { void VM_Handshake::handle_timeout() { LogStreamHandle(Warning, handshake) log_stream; - for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thr = jtiwh.next(); ) { - if (thr->has_handshake()) { + for (JavaThreadIteratorWithHandle jtiwh; JavaThread* thr = jtiwh.next(); ) { + if (thr->handshake_state()->has_operation()) { log_stream.print("Thread " PTR_FORMAT " has not cleared its handshake op", p2i(thr)); thr->print_thread_state_on(&log_stream); } @@ -186,78 +201,34 @@ void VM_Handshake::handle_timeout() { fatal("Handshake operation timed out"); } -static void log_handshake_info(jlong start_time_ns, const char* name, int targets, int vmt_executed, const char* extra = NULL) { - if (start_time_ns != 0) { +static void log_handshake_info(jlong start_time_ns, const char* name, int targets, int emitted_handshakes_executed, const char* extra = NULL) { + if (log_is_enabled(Info, handshake)) { jlong completion_time = os::javaTimeNanos() - start_time_ns; - log_info(handshake)("Handshake \"%s\", Targeted threads: %d, Executed by targeted threads: %d, Total completion time: " JLONG_FORMAT " ns%s%s", + log_info(handshake)("Handshake \"%s\", Targeted threads: %d, Executed by requesting thread: %d, Total completion time: " JLONG_FORMAT " ns%s%s", name, targets, - targets - vmt_executed, + emitted_handshakes_executed, completion_time, extra != NULL ? ", " : "", extra != NULL ? extra : ""); } } -class VM_HandshakeOneThread: public VM_Handshake { - JavaThread* _target; - public: - VM_HandshakeOneThread(HandshakeOperation* op, JavaThread* target) : - VM_Handshake(op), _target(target) {} - - void doit() { - jlong start_time_ns = os::javaTimeNanos(); - - ThreadsListHandle tlh; - if (tlh.includes(_target)) { - _target->set_handshake_operation(_op); - } else { - log_handshake_info(start_time_ns, _op->name(), 0, 0, "(thread dead)"); - return; - } - - log_trace(handshake)("JavaThread " INTPTR_FORMAT " signaled, begin attempt to process by VMThtread", p2i(_target)); - HandshakeState::ProcessResult pr = HandshakeState::_no_operation; - HandshakeSpinYield hsy(start_time_ns); - do { - if (handshake_has_timed_out(start_time_ns)) { - handle_timeout(); - } - pr = _target->handshake_try_process(_op); - hsy.add_result(pr); - hsy.process(); - } while (!_op->is_completed()); - - // This pairs up with the release store in do_handshake(). It prevents future - // loads from floating above the load of _pending_threads in is_completed() - // and thus prevents reading stale data modified in the handshake closure - // by the Handshakee. - OrderAccess::acquire(); - - log_handshake_info(start_time_ns, _op->name(), 1, (pr == HandshakeState::_success) ? 1 : 0); - } - - VMOp_Type type() const { return VMOp_HandshakeOneThread; } - - bool executed() const { return _op->executed(); } -}; - class VM_HandshakeAllThreads: public VM_Handshake { public: VM_HandshakeAllThreads(HandshakeOperation* op) : VM_Handshake(op) {} void doit() { jlong start_time_ns = os::javaTimeNanos(); - int handshake_executed_by_vm_thread = 0; JavaThreadIteratorWithHandle jtiwh; int number_of_threads_issued = 0; - for (JavaThread *thr = jtiwh.next(); thr != NULL; thr = jtiwh.next()) { - thr->set_handshake_operation(_op); + for (JavaThread* thr = jtiwh.next(); thr != NULL; thr = jtiwh.next()) { + thr->handshake_state()->add_operation(_op); number_of_threads_issued++; } if (number_of_threads_issued < 1) { - log_handshake_info(start_time_ns, _op->name(), 0, 0); + log_handshake_info(start_time_ns, _op->name(), 0, 0, "no threads alive"); return; } // _op was created with a count == 1 so don't double count. @@ -265,6 +236,9 @@ class VM_HandshakeAllThreads: public VM_Handshake { log_trace(handshake)("Threads signaled, begin processing blocked threads by VMThread"); HandshakeSpinYield hsy(start_time_ns); + // Keeps count on how many of own emitted handshakes + // this thread execute. + int emitted_handshakes_executed = 0; do { // Check if handshake operation has timed out if (handshake_has_timed_out(start_time_ns)) { @@ -273,16 +247,16 @@ class VM_HandshakeAllThreads: public VM_Handshake { // Have VM thread perform the handshake operation for blocked threads. // Observing a blocked state may of course be transient but the processing is guarded - // by semaphores and we optimistically begin by working on the blocked threads + // by mutexes and we optimistically begin by working on the blocked threads jtiwh.rewind(); - for (JavaThread *thr = jtiwh.next(); thr != NULL; thr = jtiwh.next()) { + for (JavaThread* thr = jtiwh.next(); thr != NULL; thr = jtiwh.next()) { // A new thread on the ThreadsList will not have an operation, // hence it is skipped in handshake_try_process. - HandshakeState::ProcessResult pr = thr->handshake_try_process(_op); - if (pr == HandshakeState::_success) { - handshake_executed_by_vm_thread++; - } + HandshakeState::ProcessResult pr = thr->handshake_state()->try_process(_op); hsy.add_result(pr); + if (pr == HandshakeState::_succeeded) { + emitted_handshakes_executed++; + } } hsy.process(); } while (!_op->is_completed()); @@ -293,7 +267,7 @@ class VM_HandshakeAllThreads: public VM_Handshake { // by the Handshakee. OrderAccess::acquire(); - log_handshake_info(start_time_ns, _op->name(), number_of_threads_issued, handshake_executed_by_vm_thread); + log_handshake_info(start_time_ns, _op->name(), number_of_threads_issued, emitted_handshakes_executed); } VMOp_Type type() const { return VMOp_HandshakeAllThreads; } @@ -307,8 +281,8 @@ void HandshakeOperation::do_handshake(JavaThread* thread) { // Only actually execute the operation for non terminated threads. if (!thread->is_terminated()) { + NoSafepointVerifier nsv; _handshake_cl->do_thread(thread); - _executed = true; } if (start_time_ns != 0) { @@ -327,37 +301,40 @@ void HandshakeOperation::do_handshake(JavaThread* thread) { // It is no longer safe to refer to 'this' as the VMThread/Handshaker may have destroyed this operation } -void Handshake::execute(HandshakeClosure* thread_cl) { - HandshakeOperation cto(thread_cl); +void Handshake::execute(HandshakeClosure* hs_cl) { + HandshakeOperation cto(hs_cl, NULL); VM_HandshakeAllThreads handshake(&cto); VMThread::execute(&handshake); } -bool Handshake::execute(HandshakeClosure* thread_cl, JavaThread* target) { - HandshakeOperation cto(thread_cl); - VM_HandshakeOneThread handshake(&cto, target); - VMThread::execute(&handshake); - return handshake.executed(); -} - -bool Handshake::execute_direct(HandshakeClosure* thread_cl, JavaThread* target) { +void Handshake::execute(HandshakeClosure* hs_cl, JavaThread* target) { JavaThread* self = JavaThread::current(); - HandshakeOperation op(thread_cl, /*is_direct*/ true); + HandshakeOperation op(hs_cl, target); jlong start_time_ns = os::javaTimeNanos(); ThreadsListHandle tlh; if (tlh.includes(target)) { - target->set_handshake_operation(&op); + target->handshake_state()->add_operation(&op); } else { - log_handshake_info(start_time_ns, op.name(), 0, 0, "(thread dead)"); - return false; + char buf[128]; + jio_snprintf(buf, sizeof(buf), "(thread= " INTPTR_FORMAT " dead)", p2i(target)); + log_handshake_info(start_time_ns, op.name(), 0, 0, buf); + return; } - HandshakeState::ProcessResult pr = HandshakeState::_no_operation; + // Keeps count on how many of own emitted handshakes + // this thread execute. + int emitted_handshakes_executed = 0; HandshakeSpinYield hsy(start_time_ns); while (!op.is_completed()) { - HandshakeState::ProcessResult pr = target->handshake_try_process(&op); + HandshakeState::ProcessResult pr = target->handshake_state()->try_process(&op); + if (pr == HandshakeState::_succeeded) { + emitted_handshakes_executed++; + } + if (op.is_completed()) { + break; + } hsy.add_result(pr); // Check for pending handshakes to avoid possible deadlocks where our // target is trying to handshake us. @@ -373,39 +350,65 @@ bool Handshake::execute_direct(HandshakeClosure* thread_cl, JavaThread* target) // by the Handshakee. OrderAccess::acquire(); - log_handshake_info(start_time_ns, op.name(), 1, (pr == HandshakeState::_success) ? 1 : 0); + log_handshake_info(start_time_ns, op.name(), 1, emitted_handshakes_executed); +} + +void Handshake::execute(AsyncHandshakeClosure* hs_cl, JavaThread* target) { + jlong start_time_ns = os::javaTimeNanos(); + AsyncHandshakeOperation* op = new AsyncHandshakeOperation(hs_cl, target, start_time_ns); - return op.executed(); + ThreadsListHandle tlh; + if (tlh.includes(target)) { + target->handshake_state()->add_operation(op); + } else { + log_handshake_info(start_time_ns, op->name(), 0, 0, "(thread dead)"); + delete op; + } } -HandshakeState::HandshakeState() : - _operation(NULL), - _operation_direct(NULL), - _handshake_turn_sem(1), - _processing_sem(1), - _thread_in_process_handshake(false), - _active_handshaker(NULL) +HandshakeState::HandshakeState(JavaThread* target) : + _handshakee(target), + _queue(), + _lock(Monitor::leaf, "HandshakeState", Mutex::_allow_vm_block_flag, Monitor::_safepoint_check_never), + _active_handshaker() { } -void HandshakeState::set_operation(HandshakeOperation* op) { - if (!op->is_direct()) { - assert(Thread::current()->is_VM_thread(), "should be the VMThread"); - _operation = op; - } else { - // Serialize direct handshakes so that only one proceeds at a time for a given target - _handshake_turn_sem.wait_with_safepoint_check(JavaThread::current()); - _operation_direct = op; - } +void HandshakeState::add_operation(HandshakeOperation* op) { + // Adds are done lock free and so is arming. + // Calling this method with lock held is considered an error. + assert(!_lock.owned_by_self(), "Lock should not be held"); + _queue.push(op); SafepointMechanism::arm_local_poll_release(_handshakee); } -void HandshakeState::clear_handshake(bool is_direct) { - if (!is_direct) { - _operation = NULL; - } else { - _operation_direct = NULL; - _handshake_turn_sem.signal(); +HandshakeOperation* HandshakeState::pop_for_self() { + assert(_handshakee == Thread::current(), "Must be called by self"); + assert(_lock.owned_by_self(), "Lock must be held"); + return _queue.pop(); +}; + +static bool non_self_queue_filter(HandshakeOperation* op) { + return !op->is_async(); +} + +bool HandshakeState::have_non_self_executable_operation() { + assert(_handshakee != Thread::current(), "Must not be called by self"); + assert(_lock.owned_by_self(), "Lock must be held"); + return _queue.contains(non_self_queue_filter); +} + +HandshakeOperation* HandshakeState::pop() { + assert(_handshakee != Thread::current(), "Must not be called by self"); + assert(_lock.owned_by_self(), "Lock must be held"); + return _queue.pop(non_self_queue_filter); +}; + +void HandshakeState::process_by_self() { + ThreadInVMForHandshake tivm(_handshakee); + { + NoSafepointVerifier nsv; + process_self_inner(); } } @@ -414,31 +417,24 @@ void HandshakeState::process_self_inner() { assert(!_handshakee->is_terminated(), "should not be a terminated thread"); assert(_handshakee->thread_state() != _thread_blocked, "should not be in a blocked state"); assert(_handshakee->thread_state() != _thread_in_native, "should not be in native"); - JavaThread* self = _handshakee; - do { - ThreadInVMForHandshake tivm(self); - if (!_processing_sem.trywait()) { - _processing_sem.wait_with_safepoint_check(self); - } - if (has_operation()) { - HandleMark hm(self); - CautiouslyPreserveExceptionMark pem(self); - HandshakeOperation * op = _operation; - if (op != NULL) { - // Disarm before executing the operation - clear_handshake(/*is_direct*/ false); - op->do_handshake(self); - } - op = _operation_direct; - if (op != NULL) { - // Disarm before executing the operation - clear_handshake(/*is_direct*/ true); - op->do_handshake(self); + while (should_process()) { + HandleMark hm(_handshakee); + CautiouslyPreserveExceptionMark pem(_handshakee); + MutexLocker ml(&_lock, Mutex::_no_safepoint_check_flag); + HandshakeOperation* op = pop_for_self(); + if (op != NULL) { + assert(op->_target == NULL || op->_target == Thread::current(), "Wrong thread"); + bool async = op->is_async(); + log_trace(handshake)("Proc handshake %s " INTPTR_FORMAT " on " INTPTR_FORMAT " by self", + async ? "asynchronous" : "synchronous", p2i(op), p2i(_handshakee)); + op->do_handshake(_handshakee); + if (async) { + log_handshake_info(((AsyncHandshakeOperation*)op)->start_time(), op->name(), 1, 0, "asynchronous"); + delete op; } } - _processing_sem.signal(); - } while (has_operation()); + } } bool HandshakeState::can_process_handshake() { @@ -465,60 +461,78 @@ bool HandshakeState::possibly_can_process_handshake() { } } -bool HandshakeState::claim_handshake(bool is_direct) { - if (!_processing_sem.trywait()) { +bool HandshakeState::claim_handshake() { + if (!_lock.try_lock()) { return false; } - if (has_specific_operation(is_direct)){ - return true; + // Operations are added lock free and then the poll is armed. + // If all handshake operations for the handshakee are finished and someone + // just adds an operation we may see it here. But if the handshakee is not + // armed yet it is not safe to proceed. + if (have_non_self_executable_operation()) { + if (SafepointMechanism::local_poll_armed(_handshakee)) { + return true; + } } - _processing_sem.signal(); + _lock.unlock(); return false; } -HandshakeState::ProcessResult HandshakeState::try_process(HandshakeOperation* op) { - bool is_direct = op->is_direct(); - - if (!has_specific_operation(is_direct)){ +HandshakeState::ProcessResult HandshakeState::try_process(HandshakeOperation* match_op) { + if (!has_operation()) { // JT has already cleared its handshake - return _no_operation; + return HandshakeState::_no_operation; } if (!possibly_can_process_handshake()) { // JT is observed in an unsafe state, it must notice the handshake itself - return _not_safe; + return HandshakeState::_not_safe; } - // Claim the semaphore if there still an operation to be executed. - if (!claim_handshake(is_direct)) { - return _state_busy; + // Claim the mutex if there still an operation to be executed. + if (!claim_handshake()) { + return HandshakeState::_claim_failed; } - // Check if the handshake operation is the same as the one we meant to execute. The - // handshake could have been already processed by the handshakee and a new handshake - // by another JavaThread might be in progress. - if (is_direct && op != _operation_direct) { - _processing_sem.signal(); - return _no_operation; - } - - // If we own the semaphore at this point and while owning the semaphore + // If we own the mutex at this point and while owning the mutex we // can observe a safe state the thread cannot possibly continue without - // getting caught by the semaphore. - ProcessResult pr = _not_safe; - if (can_process_handshake()) { - guarantee(!_processing_sem.trywait(), "we should already own the semaphore"); - log_trace(handshake)("Processing handshake by %s", Thread::current()->is_VM_thread() ? "VMThread" : "Handshaker"); - _active_handshaker = Thread::current(); - op->do_handshake(_handshakee); - _active_handshaker = NULL; - // Disarm after we have executed the operation. - clear_handshake(is_direct); - pr = _success; + // getting caught by the mutex. + if (!can_process_handshake()) { + _lock.unlock(); + return HandshakeState::_not_safe; } - // Release the thread - _processing_sem.signal(); + Thread* current_thread = Thread::current(); + + HandshakeState::ProcessResult pr_ret = HandshakeState::_processed; + int executed = 0; + + do { + HandshakeOperation* op = pop(); + if (op != NULL) { + assert(SafepointMechanism::local_poll_armed(_handshakee), "Must be"); + assert(op->_target == NULL || _handshakee == op->_target, "Wrong thread"); + log_trace(handshake)("Processing handshake " INTPTR_FORMAT " by %s(%s)", p2i(op), + op == match_op ? "handshaker" : "cooperative", + current_thread->is_VM_thread() ? "VM Thread" : "JavaThread"); + + if (op == match_op) { + pr_ret = HandshakeState::_succeeded; + } + + _active_handshaker = current_thread; + op->do_handshake(_handshakee); + _active_handshaker = NULL; + + executed++; + } + } while (have_non_self_executable_operation()); + + _lock.unlock(); - return pr; + log_trace(handshake)("%s(" INTPTR_FORMAT ") executed %d ops for JavaThread: " INTPTR_FORMAT " %s target op: " INTPTR_FORMAT, + current_thread->is_VM_thread() ? "VM Thread" : "JavaThread", + p2i(current_thread), executed, p2i(_handshakee), + pr_ret == HandshakeState::_succeeded ? "including" : "excluding", p2i(match_op)); + return pr_ret; } diff --git a/src/hotspot/share/runtime/handshake.hpp b/src/hotspot/share/runtime/handshake.hpp index bf3de1f375c..eb93b66516c 100644 --- a/src/hotspot/share/runtime/handshake.hpp +++ b/src/hotspot/share/runtime/handshake.hpp @@ -27,86 +27,99 @@ #include "memory/allocation.hpp" #include "memory/iterator.hpp" -#include "runtime/semaphore.hpp" -#include "utilities/autoRestore.hpp" +#include "runtime/flags/flagSetting.hpp" +#include "runtime/mutex.hpp" +#include "utilities/filterQueue.hpp" class HandshakeOperation; class JavaThread; -// A handshake closure is a callback that is executed for each JavaThread -// while that thread is in a safepoint safe state. The callback is executed -// either by the target JavaThread itself or by the VMThread while keeping -// the target thread in a blocked state. A handshake can be performed with a -// single JavaThread as well. In that case, the callback is executed either -// by the target JavaThread itself or, depending on whether the operation is -// a direct handshake or not, by the JavaThread that requested the handshake -// or the VMThread respectively. -class HandshakeClosure : public ThreadClosure { +// A handshake closure is a callback that is executed for a JavaThread +// while it is in a safepoint/handshake-safe state. Depending on the +// nature of the closure, the callback may be executed by the initiating +// thread, the target thread, or the VMThread. If the callback is not executed +// by the target thread it will remain in a blocked state until the callback completes. +class HandshakeClosure : public ThreadClosure, public CHeapObj<mtThread> { const char* const _name; public: HandshakeClosure(const char* name) : _name(name) {} - const char* name() const { - return _name; - } + virtual ~HandshakeClosure() {} + const char* name() const { return _name; } + virtual bool is_async() { return false; } virtual void do_thread(Thread* thread) = 0; }; +class AsyncHandshakeClosure : public HandshakeClosure { + public: + AsyncHandshakeClosure(const char* name) : HandshakeClosure(name) {} + virtual ~AsyncHandshakeClosure() {} + virtual bool is_async() { return true; } +}; + class Handshake : public AllStatic { public: // Execution of handshake operation - static void execute(HandshakeClosure* hs_cl); - static bool execute(HandshakeClosure* hs_cl, JavaThread* target); - static bool execute_direct(HandshakeClosure* hs_cl, JavaThread* target); + static void execute(HandshakeClosure* hs_cl); + static void execute(HandshakeClosure* hs_cl, JavaThread* target); + static void execute(AsyncHandshakeClosure* hs_cl, JavaThread* target); }; // The HandshakeState keeps track of an ongoing handshake for this JavaThread. -// VMThread/Handshaker and JavaThread are serialized with semaphore _processing_sem -// making sure the operation is only done by either VMThread/Handshaker on behalf -// of the JavaThread or by the target JavaThread itself. +// VMThread/Handshaker and JavaThread are serialized with _lock making sure the +// operation is only done by either VMThread/Handshaker on behalf of the +// JavaThread or by the target JavaThread itself. class HandshakeState { + // This a back reference to the JavaThread, + // the target for all operation in the queue. JavaThread* _handshakee; - HandshakeOperation* volatile _operation; - HandshakeOperation* volatile _operation_direct; - - Semaphore _handshake_turn_sem; // Used to serialize direct handshakes for this JavaThread. - Semaphore _processing_sem; - bool _thread_in_process_handshake; + // The queue containing handshake operations to be performed on _handshakee. + FilterQueue<HandshakeOperation*> _queue; + // Provides mutual exclusion to this state and queue. + Mutex _lock; + // Set to the thread executing the handshake operation. + Thread* _active_handshaker; - bool claim_handshake(bool is_direct); + bool claim_handshake(); bool possibly_can_process_handshake(); bool can_process_handshake(); - void clear_handshake(bool is_direct); - void process_self_inner(); -public: - HandshakeState(); + bool have_non_self_executable_operation(); + HandshakeOperation* pop_for_self(); + HandshakeOperation* pop(); + + public: + HandshakeState(JavaThread* thread); - void set_handshakee(JavaThread* thread) { _handshakee = thread; } + void add_operation(HandshakeOperation* op); - void set_operation(HandshakeOperation* op); - bool has_operation() const { return _operation != NULL || _operation_direct != NULL; } - bool has_specific_operation(bool is_direct) const { - return is_direct ? _operation_direct != NULL : _operation != NULL; + bool has_operation() { + return !_queue.is_empty(); } - void process_by_self() { - if (!_thread_in_process_handshake) { - AutoModifyRestore<bool> temporarily(_thread_in_process_handshake, true); - process_self_inner(); - } + // Both _queue and _lock must be checked. If a thread has seen this _handshakee + // as safe it will execute all possible handshake operations in a loop while + // holding _lock. We use lock free addition to the queue, which means it is + // possible for the queue to be seen as empty by _handshakee but as non-empty + // by the thread executing in the loop. To avoid the _handshakee continuing + // while handshake operations are being executed, the _handshakee + // must take slow path, process_by_self(), if _lock is held. + bool should_process() { + return !_queue.is_empty() || _lock.is_locked(); } + void process_by_self(); + enum ProcessResult { _no_operation = 0, _not_safe, - _state_busy, - _success, + _claim_failed, + _processed, + _succeeded, _number_states }; - ProcessResult try_process(HandshakeOperation* op); + ProcessResult try_process(HandshakeOperation* match_op); - Thread* _active_handshaker; Thread* active_handshaker() const { return _active_handshaker; } }; diff --git a/src/hotspot/share/runtime/interfaceSupport.inline.hpp b/src/hotspot/share/runtime/interfaceSupport.inline.hpp index cb7154f7192..f1965a4e380 100644 --- a/src/hotspot/share/runtime/interfaceSupport.inline.hpp +++ b/src/hotspot/share/runtime/interfaceSupport.inline.hpp @@ -132,10 +132,6 @@ class ThreadInVMForHandshake : public ThreadStateTransition { void transition_back() { // This can be invoked from transition states and must return to the original state properly assert(_thread->thread_state() == _thread_in_vm, "should only call when leaving VM after handshake"); - // Change to transition state and ensure it is seen by the VM thread. - _thread->set_thread_state_fence(_thread_in_vm_trans); - - SafepointMechanism::process_if_requested(_thread); _thread->set_thread_state(_original_state); @@ -156,6 +152,9 @@ class ThreadInVMForHandshake : public ThreadStateTransition { } thread->set_thread_state(_thread_in_vm); + + // Threads shouldn't block if they are in the middle of printing, but... + ttyLocker::break_tty_lock_for_safepoint(os::current_thread_id()); } ~ThreadInVMForHandshake() { diff --git a/src/hotspot/share/runtime/javaCalls.cpp b/src/hotspot/share/runtime/javaCalls.cpp index 730b134985b..d5cb7d8af83 100644 --- a/src/hotspot/share/runtime/javaCalls.cpp +++ b/src/hotspot/share/runtime/javaCalls.cpp @@ -109,10 +109,6 @@ JavaCallWrapper::JavaCallWrapper(const methodHandle& callee_method, Handle recei if(clear_pending_exception) { _thread->clear_pending_exception(); } - - if (_anchor.last_Java_sp() == NULL) { - _thread->record_base_of_stack_pointer(); - } } @@ -127,11 +123,6 @@ JavaCallWrapper::~JavaCallWrapper() { debug_only(_thread->dec_java_call_counter()); - if (_anchor.last_Java_sp() == NULL) { - _thread->set_base_of_stack_pointer(NULL); - } - - // Old thread-local info. has been restored. We are not back in the VM. ThreadStateTransition::transition_from_java(_thread, _thread_in_vm); diff --git a/src/hotspot/share/runtime/javaFrameAnchor.hpp b/src/hotspot/share/runtime/javaFrameAnchor.hpp index 59c2fb19cb2..d73372d092a 100644 --- a/src/hotspot/share/runtime/javaFrameAnchor.hpp +++ b/src/hotspot/share/runtime/javaFrameAnchor.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -85,8 +85,6 @@ friend class JavaCallWrapper; JavaFrameAnchor() { clear(); } JavaFrameAnchor(JavaFrameAnchor *src) { copy(src); } - void set_last_Java_pc(address pc) { _last_Java_pc = pc; } - // Assembly stub generation helpers static ByteSize last_Java_sp_offset() { return byte_offset_of(JavaFrameAnchor, _last_Java_sp); } diff --git a/src/hotspot/share/runtime/jniHandles.hpp b/src/hotspot/share/runtime/jniHandles.hpp index b90b43619ab..d64caa58c60 100644 --- a/src/hotspot/share/runtime/jniHandles.hpp +++ b/src/hotspot/share/runtime/jniHandles.hpp @@ -99,9 +99,6 @@ class JNIHandles : AllStatic { static void destroy_weak_global(jobject handle); static bool is_global_weak_cleared(jweak handle); // Test jweak without resolution - // Initialization - static void initialize(); - // Debugging static void print_on(outputStream* st); static void print(); diff --git a/src/hotspot/share/runtime/mutexLocker.cpp b/src/hotspot/share/runtime/mutexLocker.cpp index 90b1b2b9c28..c5fb1c61268 100644 --- a/src/hotspot/share/runtime/mutexLocker.cpp +++ b/src/hotspot/share/runtime/mutexLocker.cpp @@ -65,8 +65,7 @@ Monitor* CodeSweeper_lock = NULL; Mutex* MethodData_lock = NULL; Mutex* TouchedMethodLog_lock = NULL; Mutex* RetData_lock = NULL; -Monitor* VMOperationQueue_lock = NULL; -Monitor* VMOperationRequest_lock = NULL; +Monitor* VMOperation_lock = NULL; Monitor* Threads_lock = NULL; Mutex* NonJavaThreadsList_lock = NULL; Mutex* NonJavaThreadsListSync_lock = NULL; @@ -151,6 +150,7 @@ Mutex* CDSClassFileStream_lock = NULL; #endif Mutex* DumpTimeTable_lock = NULL; Mutex* CDSLambda_lock = NULL; +Mutex* DumpRegion_lock = NULL; #endif // INCLUDE_CDS #if INCLUDE_JVMCI @@ -192,7 +192,7 @@ void assert_lock_strong(const Mutex* lock) { } void assert_locked_or_safepoint_or_handshake(const Mutex* lock, const JavaThread* thread) { - if (Thread::current() == thread->active_handshaker()) return; + if (thread->is_handshake_safe_for(Thread::current())) return; assert_locked_or_safepoint(lock); } #endif @@ -279,8 +279,7 @@ void mutex_init() { def(NonJavaThreadsList_lock , PaddedMutex, barrier, true, _safepoint_check_never); def(NonJavaThreadsListSync_lock , PaddedMutex, leaf, true, _safepoint_check_never); - def(VMOperationQueue_lock , PaddedMonitor, nonleaf, true, _safepoint_check_never); // VM_thread allowed to block on these - def(VMOperationRequest_lock , PaddedMonitor, nonleaf, true, _safepoint_check_always); + def(VMOperation_lock , PaddedMonitor, nonleaf, true, _safepoint_check_always); // VM_thread allowed to block on these def(RetData_lock , PaddedMutex , nonleaf, false, _safepoint_check_always); def(Terminator_lock , PaddedMonitor, nonleaf, true, _safepoint_check_always); def(InitCompleted_lock , PaddedMonitor, leaf, true, _safepoint_check_never); @@ -331,7 +330,7 @@ void mutex_init() { def(UnsafeJlong_lock , PaddedMutex , special, false, _safepoint_check_never); #endif - def(CodeHeapStateAnalytics_lock , PaddedMutex , leaf, true, _safepoint_check_never); + def(CodeHeapStateAnalytics_lock , PaddedMutex , nonleaf+6, false, _safepoint_check_always); def(NMethodSweeperStats_lock , PaddedMutex , special, true, _safepoint_check_never); def(ThreadsSMRDelete_lock , PaddedMonitor, special, true, _safepoint_check_never); def(ThreadIdTableCreate_lock , PaddedMutex , leaf, false, _safepoint_check_always); @@ -346,6 +345,7 @@ void mutex_init() { #endif def(DumpTimeTable_lock , PaddedMutex , leaf - 1, true, _safepoint_check_never); def(CDSLambda_lock , PaddedMutex , leaf, true, _safepoint_check_never); + def(DumpRegion_lock , PaddedMutex , leaf, true, _safepoint_check_never); #endif // INCLUDE_CDS #if INCLUDE_JVMCI diff --git a/src/hotspot/share/runtime/mutexLocker.hpp b/src/hotspot/share/runtime/mutexLocker.hpp index fa82246169e..7cbe6419ed7 100644 --- a/src/hotspot/share/runtime/mutexLocker.hpp +++ b/src/hotspot/share/runtime/mutexLocker.hpp @@ -58,8 +58,7 @@ extern Monitor* CodeSweeper_lock; // a lock used by the sweeper o extern Mutex* MethodData_lock; // a lock on installation of method data extern Mutex* TouchedMethodLog_lock; // a lock on allocation of LogExecutedMethods info extern Mutex* RetData_lock; // a lock on installation of RetData inside method data -extern Monitor* VMOperationQueue_lock; // a lock on queue of vm_operations waiting to execute -extern Monitor* VMOperationRequest_lock; // a lock on Threads waiting for a vm_operation to terminate +extern Monitor* VMOperation_lock; // a lock on queue of vm_operations waiting to execute extern Monitor* Threads_lock; // a lock on the Threads table of active Java threads // (also used by Safepoints too to block threads creation/destruction) extern Mutex* NonJavaThreadsList_lock; // a lock on the NonJavaThreads list @@ -130,6 +129,7 @@ extern Mutex* CDSClassFileStream_lock; // FileMapInfo::open_stream_for #endif extern Mutex* DumpTimeTable_lock; // SystemDictionaryShared::find_or_allocate_info_for extern Mutex* CDSLambda_lock; // SystemDictionaryShared::get_shared_lambda_proxy_class +extern Mutex* DumpRegion_lock; // Symbol::operator new(size_t sz, int len) #endif // INCLUDE_CDS #if INCLUDE_JFR extern Mutex* JfrStacktrace_lock; // used to guard access to the JFR stacktrace table diff --git a/src/hotspot/share/runtime/objectMonitor.cpp b/src/hotspot/share/runtime/objectMonitor.cpp index b558e3f6252..74671fbbf6c 100644 --- a/src/hotspot/share/runtime/objectMonitor.cpp +++ b/src/hotspot/share/runtime/objectMonitor.cpp @@ -24,6 +24,8 @@ #include "precompiled.hpp" #include "classfile/vmSymbols.hpp" +#include "gc/shared/oopStorage.hpp" +#include "gc/shared/oopStorageSet.hpp" #include "jfr/jfrEvents.hpp" #include "jfr/support/jfrThreadId.hpp" #include "logging/log.hpp" @@ -114,6 +116,8 @@ static int Knob_PreSpin = 10; // 20-100 likely better DEBUG_ONLY(static volatile bool InitDone = false;) +OopStorage* ObjectMonitor::_oop_storage = NULL; + // ----------------------------------------------------------------------------- // Theory of operations -- Monitors lists, thread residency, etc: // @@ -237,6 +241,53 @@ void ObjectMonitor::operator delete[] (void *p) { operator delete(p); } +// Check that object() and set_object() are called from the right context: +static void check_object_context() { +#ifdef ASSERT + Thread* self = Thread::current(); + if (self->is_Java_thread()) { + // Mostly called from JavaThreads so sanity check the thread state. + JavaThread* jt = self->as_Java_thread(); + switch (jt->thread_state()) { + case _thread_in_vm: // the usual case + case _thread_in_Java: // during deopt + break; + default: + fatal("called from an unsafe thread state"); + } + assert(jt->is_active_Java_thread(), "must be active JavaThread"); + } else { + // However, ThreadService::get_current_contended_monitor() + // can call here via the VMThread so sanity check it. + assert(self->is_VM_thread(), "must be"); + } +#endif // ASSERT +} + +oop ObjectMonitor::object() const { + check_object_context(); + if (_object.is_null()) { + return NULL; + } + return _object.resolve(); +} + +oop ObjectMonitor::object_peek() const { + if (_object.is_null()) { + return NULL; + } + return _object.peek(); +} + +void ObjectMonitor::set_object(oop obj) { + check_object_context(); + if (_object.is_null()) { + _object = WeakHandle(_oop_storage, obj); + } else { + _object.replace(obj); + } +} + // ----------------------------------------------------------------------------- // Enter support @@ -438,18 +489,15 @@ void ObjectMonitor::install_displaced_markword_in_object(const oop obj) { // Separate loads in is_being_async_deflated(), which is almost always // called before this function, from the load of dmw/header below. - if (support_IRIW_for_not_multiple_copy_atomic_cpu) { - // A non-multiple copy atomic (nMCA) machine needs a bigger - // hammer to separate the loads before and the load below. - OrderAccess::fence(); - } else { - OrderAccess::loadload(); - } - const oop l_object = object(); + // _contentions and dmw/header may get written by different threads. + // Make sure to observe them in the same order when having several observers. + OrderAccess::loadload_for_IRIW(); + + const oop l_object = object_peek(); if (l_object == NULL) { // ObjectMonitor's object ref has already been cleared by async - // deflation so we're done here. + // deflation or GC so we're done here. return; } assert(l_object == obj, "object=" INTPTR_FORMAT " must equal obj=" @@ -703,7 +751,6 @@ void ObjectMonitor::EnterI(TRAPS) { // In addition, Self.TState is stable. assert(_owner == Self, "invariant"); - assert(object() != NULL, "invariant"); UnlinkAfterAcquire(Self, &node); if (_succ == Self) _succ = NULL; @@ -2055,6 +2102,8 @@ void ObjectMonitor::Initialize() { #undef NEWPERFVARIABLE } + _oop_storage = OopStorageSet::create_weak("ObjectSynchronizer Weak"); + DEBUG_ONLY(InitDone = true;) } @@ -2103,7 +2152,7 @@ void ObjectMonitor::print() const { print_on(tty); } void ObjectMonitor::print_debug_style_on(outputStream* st) const { st->print_cr("(ObjectMonitor*) " INTPTR_FORMAT " = {", p2i(this)); st->print_cr(" _header = " INTPTR_FORMAT, header().value()); - st->print_cr(" _object = " INTPTR_FORMAT, p2i(object())); + st->print_cr(" _object = " INTPTR_FORMAT, p2i(object_peek())); st->print(" _allocation_state = "); if (is_free()) { st->print("Free"); diff --git a/src/hotspot/share/runtime/objectMonitor.hpp b/src/hotspot/share/runtime/objectMonitor.hpp index 8a4eaf5bb5c..44f68a1843d 100644 --- a/src/hotspot/share/runtime/objectMonitor.hpp +++ b/src/hotspot/share/runtime/objectMonitor.hpp @@ -28,6 +28,7 @@ #include "memory/allocation.hpp" #include "memory/padded.hpp" #include "oops/markWord.hpp" +#include "oops/weakHandle.hpp" #include "runtime/os.hpp" #include "runtime/park.hpp" #include "runtime/perfData.hpp" @@ -132,14 +133,17 @@ class ObjectMonitor { friend class VMStructs; JVMCI_ONLY(friend class JVMCIVMStructs;) + static OopStorage* _oop_storage; + // The sync code expects the header field to be at offset zero (0). // Enforced by the assert() in header_addr(). volatile markWord _header; // displaced object header word - mark - void* volatile _object; // backward object pointer - strong root + WeakHandle _object; // backward object pointer typedef enum { Free = 0, // Free must be 0 for monitor to be free after memset(..,0,..). New, - Old + Old, + ChainMarker } AllocationState; AllocationState _allocation_state; // Separate _header and _owner on different cache lines since both can @@ -148,7 +152,7 @@ class ObjectMonitor { // change until deflation so _object and _allocation_state are good // choices to share the cache line with _header. DEFINE_PAD_MINUS_SIZE(0, OM_CACHE_LINE_SIZE, sizeof(volatile markWord) + - sizeof(void* volatile) + sizeof(AllocationState)); + sizeof(WeakHandle) + sizeof(AllocationState)); // Used by async deflation as a marker in the _owner field: #define DEFLATER_MARKER reinterpret_cast<void*>(-1) void* volatile _owner; // pointer to owning thread OR BasicLock @@ -329,6 +333,7 @@ class ObjectMonitor { public: oop object() const; + oop object_peek() const; oop* object_addr(); void set_object(oop obj); void release_set_allocation_state(AllocationState s); @@ -338,6 +343,7 @@ class ObjectMonitor { bool is_free() const; bool is_old() const; bool is_new() const; + bool is_chainmarker() const; // Returns true if the specified thread owns the ObjectMonitor. Otherwise // returns false and throws IllegalMonitorStateException (IMSE). diff --git a/src/hotspot/share/runtime/objectMonitor.inline.hpp b/src/hotspot/share/runtime/objectMonitor.inline.hpp index a55eb5b7f87..36252eb2ec1 100644 --- a/src/hotspot/share/runtime/objectMonitor.inline.hpp +++ b/src/hotspot/share/runtime/objectMonitor.inline.hpp @@ -92,24 +92,15 @@ inline void ObjectMonitor::clear_common() { assert(contentions() <= 0, "must not be positive: contentions=%d", contentions()); assert(_waiters == 0, "must be 0: waiters=%d", _waiters); assert(_recursions == 0, "must be 0: recursions=" INTX_FORMAT, _recursions); - assert(object() != NULL, "must be non-NULL"); set_allocation_state(Free); set_object(NULL); } -inline oop ObjectMonitor::object() const { - return (oop)_object; -} - inline oop* ObjectMonitor::object_addr() { return (oop*)&_object; } -inline void ObjectMonitor::set_object(oop obj) { - _object = (void*)obj; -} - // Return number of threads contending for this monitor. inline jint ObjectMonitor::contentions() const { return Atomic::load(&_contentions); @@ -223,6 +214,10 @@ inline bool ObjectMonitor::is_new() const { return _allocation_state == New; } +inline bool ObjectMonitor::is_chainmarker() const { + return _allocation_state == ChainMarker; +} + // The _next_om field can be concurrently read and modified so we // use Atomic operations to disable compiler optimizations that // might try to elide loading and/or storing this field. diff --git a/src/hotspot/share/runtime/orderAccess.hpp b/src/hotspot/share/runtime/orderAccess.hpp index fee9518ef92..ab522a59a81 100644 --- a/src/hotspot/share/runtime/orderAccess.hpp +++ b/src/hotspot/share/runtime/orderAccess.hpp @@ -243,6 +243,17 @@ class OrderAccess : public AllStatic { static void fence(); static void cross_modify_fence(); + + // Processors which are not multi-copy-atomic require a full fence + // to enforce a globally consistent order of Independent Reads of + // Independent Writes. Please use only for such patterns! + static void loadload_for_IRIW() { +#ifndef CPU_MULTI_COPY_ATOMIC + fence(); +#else + loadload(); +#endif + } private: // This is a helper that invokes the StubRoutines::fence_entry() // routine if it exists, It should only be used by platforms that diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp index 2a3621f3712..2081d663d07 100644 --- a/src/hotspot/share/runtime/os.cpp +++ b/src/hotspot/share/runtime/os.cpp @@ -815,7 +815,7 @@ void os::init_random(unsigned int initval) { } -static int random_helper(unsigned int rand_seed) { +int os::next_random(unsigned int rand_seed) { /* standard, well-known linear congruential random generator with * next_rand = (16807*seed) mod (2**31-1) * see @@ -853,7 +853,7 @@ int os::random() { // Make updating the random seed thread safe. while (true) { unsigned int seed = _rand_seed; - unsigned int rand = random_helper(seed); + unsigned int rand = next_random(seed); if (Atomic::cmpxchg(&_rand_seed, seed, rand) == seed) { return static_cast<int>(rand); } @@ -1652,46 +1652,47 @@ bool os::create_stack_guard_pages(char* addr, size_t bytes) { return os::pd_create_stack_guard_pages(addr, bytes); } -char* os::reserve_memory(size_t bytes, char* addr, size_t alignment_hint, int file_desc) { - char* result = NULL; +char* os::reserve_memory(size_t bytes, MEMFLAGS flags) { + char* result = pd_reserve_memory(bytes); + if (result != NULL) { + MemTracker::record_virtual_memory_reserve(result, bytes, CALLER_PC); + if (flags != mtOther) { + MemTracker::record_virtual_memory_type(result, flags); + } + } + + return result; +} + +char* os::reserve_memory_with_fd(size_t bytes, int file_desc) { + char* result; if (file_desc != -1) { // Could have called pd_reserve_memory() followed by replace_existing_mapping_with_file_mapping(), // but AIX may use SHM in which case its more trouble to detach the segment and remap memory to the file. - result = os::map_memory_to_file(addr, bytes, file_desc); + result = os::map_memory_to_file(NULL /* addr */, bytes, file_desc); if (result != NULL) { - MemTracker::record_virtual_memory_reserve_and_commit((address)result, bytes, CALLER_PC); + MemTracker::record_virtual_memory_reserve_and_commit(result, bytes, CALLER_PC); } } else { - result = pd_reserve_memory(bytes, addr, alignment_hint); + result = pd_reserve_memory(bytes); if (result != NULL) { - MemTracker::record_virtual_memory_reserve((address)result, bytes, CALLER_PC); + MemTracker::record_virtual_memory_reserve(result, bytes, CALLER_PC); } } return result; } -char* os::reserve_memory(size_t bytes, char* addr, size_t alignment_hint, - MEMFLAGS flags) { - char* result = pd_reserve_memory(bytes, addr, alignment_hint); - if (result != NULL) { - MemTracker::record_virtual_memory_reserve((address)result, bytes, CALLER_PC); - MemTracker::record_virtual_memory_type((address)result, flags); - } - - return result; -} - -char* os::attempt_reserve_memory_at(size_t bytes, char* addr, int file_desc) { +char* os::attempt_reserve_memory_at(char* addr, size_t bytes, int file_desc) { char* result = NULL; if (file_desc != -1) { - result = pd_attempt_reserve_memory_at(bytes, addr, file_desc); + result = pd_attempt_reserve_memory_at(addr, bytes, file_desc); if (result != NULL) { MemTracker::record_virtual_memory_reserve_and_commit((address)result, bytes, CALLER_PC); } } else { - result = pd_attempt_reserve_memory_at(bytes, addr); + result = pd_attempt_reserve_memory_at(addr, bytes); if (result != NULL) { MemTracker::record_virtual_memory_reserve((address)result, bytes, CALLER_PC); } diff --git a/src/hotspot/share/runtime/os.hpp b/src/hotspot/share/runtime/os.hpp index 21031656aa5..dcffde4d85c 100644 --- a/src/hotspot/share/runtime/os.hpp +++ b/src/hotspot/share/runtime/os.hpp @@ -113,10 +113,11 @@ class os: AllStatic { _page_sizes[1] = 0; // sentinel } - static char* pd_reserve_memory(size_t bytes, char* addr = 0, - size_t alignment_hint = 0); - static char* pd_attempt_reserve_memory_at(size_t bytes, char* addr); - static char* pd_attempt_reserve_memory_at(size_t bytes, char* addr, int file_desc); + static char* pd_reserve_memory(size_t bytes); + + static char* pd_attempt_reserve_memory_at(char* addr, size_t bytes); + static char* pd_attempt_reserve_memory_at(char* addr, size_t bytes, int file_desc); + static bool pd_commit_memory(char* addr, size_t bytes, bool executable); static bool pd_commit_memory(char* addr, size_t size, size_t alignment_hint, bool executable); @@ -310,13 +311,21 @@ class os: AllStatic { const size_t size); static int vm_allocation_granularity(); - static char* reserve_memory(size_t bytes, char* addr = 0, - size_t alignment_hint = 0, int file_desc = -1); - static char* reserve_memory(size_t bytes, char* addr, - size_t alignment_hint, MEMFLAGS flags); + + // Reserves virtual memory. + // alignment_hint - currently only used by AIX + static char* reserve_memory(size_t bytes, MEMFLAGS flags = mtOther); + + // Reserves virtual memory. + // if file_desc != -1, also attaches the memory to the file. + static char* reserve_memory_with_fd(size_t bytes, int file_desc); + + // Reserves virtual memory that starts at an address that is aligned to 'alignment'. static char* reserve_memory_aligned(size_t size, size_t alignment, int file_desc = -1); - static char* attempt_reserve_memory_at(size_t bytes, char* addr, int file_desc = -1); + // Attempts to reserve the virtual memory at [addr, addr + bytes). + // Does not overwrite existing mappings. + static char* attempt_reserve_memory_at(char* addr, size_t bytes, int file_desc = -1); // Split a reserved memory region [base, base+size) into two regions [base, base+split) and // [base+split, base+size). @@ -756,6 +765,7 @@ class os: AllStatic { // random number generation static int random(); // return 32bit pseudorandom number + static int next_random(unsigned int rand_seed); // pure version of random() static void init_random(unsigned int initval); // initialize random sequence // Structured OS Exception support diff --git a/src/hotspot/share/runtime/safepointMechanism.cpp b/src/hotspot/share/runtime/safepointMechanism.cpp index d6c401a9bc0..0c97454eca6 100644 --- a/src/hotspot/share/runtime/safepointMechanism.cpp +++ b/src/hotspot/share/runtime/safepointMechanism.cpp @@ -47,7 +47,7 @@ void SafepointMechanism::default_initialize() { // Polling page const size_t page_size = os::vm_page_size(); const size_t allocation_size = 2 * page_size; - char* polling_page = os::reserve_memory(allocation_size, NULL, page_size); + char* polling_page = os::reserve_memory(allocation_size); os::commit_memory_or_exit(polling_page, allocation_size, false, "Unable to commit Safepoint polling page"); MemTracker::record_virtual_memory_type((address)polling_page, mtSafepoint); @@ -78,8 +78,8 @@ void SafepointMechanism::process(JavaThread *thread) { OrderAccess::loadload(); SafepointSynchronize::block(thread); } - if (thread->has_handshake()) { - thread->handshake_process_by_self(); + if (thread->handshake_state()->should_process()) { + thread->handshake_state()->process_by_self(); // Recursive } } @@ -96,7 +96,7 @@ void SafepointMechanism::process_if_requested_slow(JavaThread *thread) { disarm_local_poll_release(thread); // We might have disarmed next safepoint/handshake OrderAccess::storeload(); - if (global_poll() || thread->has_handshake()) { + if (global_poll() || thread->handshake_state()->has_operation()) { arm_local_poll(thread); } } diff --git a/src/hotspot/share/runtime/safepointMechanism.hpp b/src/hotspot/share/runtime/safepointMechanism.hpp index ed86fc9db17..65b1b21e3a5 100644 --- a/src/hotspot/share/runtime/safepointMechanism.hpp +++ b/src/hotspot/share/runtime/safepointMechanism.hpp @@ -39,7 +39,6 @@ class SafepointMechanism : public AllStatic { static void* poll_armed_value() { return _poll_armed_value; } static void* poll_disarmed_value() { return _poll_disarmed_value; } - static inline bool local_poll_armed(JavaThread* thread); static inline void disarm_local_poll(JavaThread* thread); static inline void disarm_local_poll_release(JavaThread* thread); @@ -58,6 +57,7 @@ class SafepointMechanism : public AllStatic { // between the armed and disarmed value by masking out this bit. const static intptr_t _poll_bit = 8; public: + static inline bool local_poll_armed(JavaThread* thread); static intptr_t poll_bit() { return _poll_bit; } static address get_polling_page() { return _polling_page; } diff --git a/src/hotspot/share/runtime/sharedRuntime.cpp b/src/hotspot/share/runtime/sharedRuntime.cpp index f0eed1a572b..8ba3051f6bf 100644 --- a/src/hotspot/share/runtime/sharedRuntime.cpp +++ b/src/hotspot/share/runtime/sharedRuntime.cpp @@ -2167,6 +2167,14 @@ void SharedRuntime::monitor_exit_helper(oopDesc* obj, BasicLock* lock, JavaThrea assert(JavaThread::current() == thread, "invariant"); // Exit must be non-blocking, and therefore no exceptions can be thrown. EXCEPTION_MARK; + // The object could become unlocked through a JNI call, which we have no other checks for. + // Give a fatal message if CheckJNICalls. Otherwise we ignore it. + if (obj->is_unlocked()) { + if (CheckJNICalls) { + fatal("Object has been unlocked by JNI"); + } + return; + } ObjectSynchronizer::exit(obj, lock, THREAD); } @@ -2243,8 +2251,8 @@ class MethodArityHistogram { static int _max_size; // max. arg size seen static void add_method_to_histogram(nmethod* nm) { - if (CompiledMethod::nmethod_access_is_safe(nm)) { - Method* method = nm->method(); + Method* method = (nm == NULL) ? NULL : nm->method(); + if ((method != NULL) && nm->is_alive()) { ArgumentCount args(method->signature()); int arity = args.size() + (method->is_static() ? 0 : 1); int argsize = method->size_of_parameters(); @@ -2285,7 +2293,10 @@ class MethodArityHistogram { public: MethodArityHistogram() { - MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); + // Take the Compile_lock to protect against changes in the CodeBlob structures + MutexLocker mu1(Compile_lock, Mutex::_safepoint_check_flag); + // Take the CodeCache_lock to protect against changes in the CodeHeap structure + MutexLocker mu2(CodeCache_lock, Mutex::_no_safepoint_check_flag); _max_arity = _max_size = 0; for (int i = 0; i < MAX_ARITY; i++) _arity_histogram[i] = _size_histogram[i] = 0; CodeCache::nmethods_do(add_method_to_histogram); @@ -3198,8 +3209,8 @@ void AdapterHandlerLibrary::create_native_wrapper(const methodHandle& method) { BufferBlob* buf = buffer_blob(); // the temporary code buffer in CodeCache if (buf != NULL) { CodeBuffer buffer(buf); - double locs_buf[20]; - buffer.insts()->initialize_shared_locs((relocInfo*)locs_buf, sizeof(locs_buf) / sizeof(relocInfo)); + struct { double data[20]; } locs_buf; + buffer.insts()->initialize_shared_locs((relocInfo*)&locs_buf, sizeof(locs_buf) / sizeof(relocInfo)); #if defined(AARCH64) // On AArch64 with ZGC and nmethod entry barriers, we need all oops to be // in the constant pool to ensure ordering between the barrier and oops diff --git a/src/hotspot/share/runtime/sharedRuntime.hpp b/src/hotspot/share/runtime/sharedRuntime.hpp index 3481670b8c0..109fcc53e36 100644 --- a/src/hotspot/share/runtime/sharedRuntime.hpp +++ b/src/hotspot/share/runtime/sharedRuntime.hpp @@ -268,7 +268,6 @@ class SharedRuntime: AllStatic { // To be used as the entry point for unresolved native methods. static address native_method_throw_unsatisfied_link_error_entry(); - static address native_method_throw_unsupported_operation_exception_entry(); static oop retrieve_receiver(Symbol* sig, frame caller); diff --git a/src/hotspot/share/runtime/stackValue.cpp b/src/hotspot/share/runtime/stackValue.cpp index 2757e5e67d4..ac8b3a6561b 100644 --- a/src/hotspot/share/runtime/stackValue.cpp +++ b/src/hotspot/share/runtime/stackValue.cpp @@ -98,8 +98,12 @@ StackValue* StackValue::create_stack_value(const frame* fr, const RegisterMap* r // The callee has no clue whether the register holds an int, // long or is unused. He always saves a long. Here we know // a long was saved, but we only want an int back. Narrow the - // saved long to the int that the JVM wants. - value.noop = (narrowOop) *(julong*) value_addr; + // saved long to the int that the JVM wants. We can't just + // use narrow_oop_cast directly, because we don't know what + // the high bits of the value might be. + static_assert(sizeof(narrowOop) == sizeof(juint), "size mismatch"); + juint narrow_value = (juint) *(julong*)value_addr; + value.noop = CompressedOops::narrow_oop_cast(narrow_value); } else { value.noop = *(narrowOop*) value_addr; } diff --git a/src/hotspot/share/runtime/synchronizer.cpp b/src/hotspot/share/runtime/synchronizer.cpp index 901ca793e28..94f88429c27 100644 --- a/src/hotspot/share/runtime/synchronizer.cpp +++ b/src/hotspot/share/runtime/synchronizer.cpp @@ -171,10 +171,6 @@ static ObjectMonitorListGlobals om_list_globals; THROW_MSG_0(vmSymbols::java_lang_IllegalMonitorStateException(), obj->klass()->external_name()); \ } - -#define CHAINMARKER (cast_to_oop<intptr_t>(-1)) - - // =====================> Spin-lock functions // ObjectMonitors are not lockable outside of this file. We use spin-locks @@ -525,10 +521,10 @@ bool ObjectSynchronizer::quick_enter(oop obj, Thread* self, if (mark.has_monitor()) { ObjectMonitor* const m = mark.monitor(); - // An async deflation can race us before we manage to make the - // ObjectMonitor busy by setting the owner below. If we detect + // An async deflation or GC can race us before we manage to make + // the ObjectMonitor busy by setting the owner below. If we detect // that race we just bail out to the slow-path here. - if (m->object() == NULL) { + if (m->object_peek() == NULL) { return false; } Thread* const owner = (Thread *) m->_owner; @@ -1139,13 +1135,11 @@ intptr_t ObjectSynchronizer::FastHashCode(Thread* self, oop obj) { // Separate load of dmw/header above from the loads in // is_being_async_deflated(). - if (support_IRIW_for_not_multiple_copy_atomic_cpu) { - // A non-multiple copy atomic (nMCA) machine needs a bigger - // hammer to separate the load above and the loads below. - OrderAccess::fence(); - } else { - OrderAccess::loadload(); - } + + // dmw/header and _contentions may get written by different threads. + // Make sure to observe them in the same order when having several observers. + OrderAccess::loadload_for_IRIW(); + if (monitor->is_being_async_deflated()) { // But we can't safely use the hash if we detect that async // deflation has occurred. So we attempt to restore the @@ -1343,10 +1337,10 @@ JavaThread* ObjectSynchronizer::get_lock_owner(ThreadsList * t_list, Handle h_ob void ObjectSynchronizer::monitors_iterate(MonitorClosure* closure) { PaddedObjectMonitor* block = Atomic::load(&g_block_list); while (block != NULL) { - assert(block->object() == CHAINMARKER, "must be a block header"); + assert(block->is_chainmarker(), "must be a block header"); for (int i = _BLOCKSIZE - 1; i > 0; i--) { ObjectMonitor* mid = (ObjectMonitor *)(block + i); - if (mid->object() != NULL) { + if (mid->object_peek() != NULL) { // Only process with closure if the object is set. // monitors_iterate() is only called at a safepoint or when the @@ -1431,34 +1425,6 @@ jlong ObjectSynchronizer::time_since_last_async_deflation_ms() { return (os::javaTimeNanos() - last_async_deflation_time_ns()) / (NANOUNITS / MILLIUNITS); } -void ObjectSynchronizer::oops_do(OopClosure* f) { - // We only scan the global used list here (for moribund threads), and - // the thread-local monitors in Thread::oops_do(). - global_used_oops_do(f); -} - -void ObjectSynchronizer::global_used_oops_do(OopClosure* f) { - assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint"); - // Acquire semantics not needed since we're at a safepoint. - list_oops_do(Atomic::load(&om_list_globals._in_use_list), f); -} - -void ObjectSynchronizer::thread_local_used_oops_do(Thread* thread, OopClosure* f) { - assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint"); - list_oops_do(thread->om_in_use_list, f); -} - -void ObjectSynchronizer::list_oops_do(ObjectMonitor* list, OopClosure* f) { - assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint"); - // The oops_do() phase does not overlap with monitor deflation - // so no need to lock ObjectMonitors for the list traversal. - for (ObjectMonitor* mid = list; mid != NULL; mid = unmarked_next(mid)) { - if (mid->object() != NULL) { - f->do_oop(mid->object_addr()); - } - } -} - // ----------------------------------------------------------------------------- // ObjectMonitor Lifecycle @@ -1496,7 +1462,7 @@ ObjectMonitor* ObjectSynchronizer::om_alloc(Thread* self) { // on the shared global list. m = take_from_start_of_om_free_list(self); if (m != NULL) { - guarantee(m->object() == NULL, "invariant"); + guarantee(m->object_peek() == NULL, "invariant"); m->set_allocation_state(ObjectMonitor::New); prepend_to_om_in_use_list(self, m); return m; @@ -1517,7 +1483,7 @@ ObjectMonitor* ObjectSynchronizer::om_alloc(Thread* self) { if (take == NULL) { break; // No more are available. } - guarantee(take->object() == NULL, "invariant"); + guarantee(take->object_peek() == NULL, "invariant"); // We allowed 3 field values to linger during async deflation. // Clear or restore them as appropriate. take->set_header(markWord::zero()); @@ -1579,7 +1545,7 @@ ObjectMonitor* ObjectSynchronizer::om_alloc(Thread* self) { temp[_BLOCKSIZE - 1].set_next_om((ObjectMonitor*)NULL); // Element [0] is reserved for global list linkage - temp[0].set_object(CHAINMARKER); + temp[0].set_allocation_state(ObjectMonitor::ChainMarker); // Consider carving out this thread's current request from the // block in hand. This avoids some lock traffic and redundant @@ -1604,7 +1570,7 @@ ObjectMonitor* ObjectSynchronizer::om_alloc(Thread* self) { void ObjectSynchronizer::om_release(Thread* self, ObjectMonitor* m, bool from_per_thread_alloc) { guarantee(m->header().value() == 0, "invariant"); - guarantee(m->object() == NULL, "invariant"); + guarantee(m->object_peek() == NULL, "invariant"); NoSafepointVerifier nsv; if ((m->is_busy() | m->_recursions) != 0) { @@ -1715,10 +1681,7 @@ void ObjectSynchronizer::om_release(Thread* self, ObjectMonitor* m, // // We currently call om_flush() from Threads::remove() before the // thread has been excised from the thread list and is no longer a -// mutator. In particular, this ensures that the thread's in-use -// monitors are scanned by a GC safepoint, either via Thread::oops_do() -// (before om_flush() is called) or via ObjectSynchronizer::oops_do() -// (after om_flush() is called). +// mutator. // // deflate_global_idle_monitors_using_JT() and // deflate_per_thread_idle_monitors_using_JT() (in another thread) can @@ -1762,13 +1725,24 @@ void ObjectSynchronizer::om_flush(Thread* self) { cur_om = unmarked_next(in_use_tail); continue; } - if (cur_om->object() == NULL) { - // cur_om was deflated and the object ref was cleared while it + if (cur_om->object_peek() == NULL) { + // Two reasons for object() to be NULL here: + // 1) cur_om was deflated and the object ref was cleared while it // was locked. We happened to see it just after it was unlocked - // (and added to the free list). Refetch the possibly changed - // next field and try again. - cur_om = unmarked_next(in_use_tail); - continue; + // (and added to the free list). + // 2) The object has been GC'ed so the association with object is + // already broken, but we don't want to do the deflation work now. + + // Refetch the possibly changed next field: + ObjectMonitor* in_use_next = unmarked_next(in_use_tail); + if (cur_om != in_use_next) { + // The NULL is because of async deflation so try again: + cur_om = in_use_next; + continue; + } + // Implied else: The NULL is because of GC, but we leave the + // node on the in-use list to be deflated after it has been + // moved to the global in-use list. } in_use_tail = cur_om; in_use_count++; @@ -1814,7 +1788,7 @@ void ObjectSynchronizer::om_flush(Thread* self) { } free_tail = s; free_count++; - guarantee(s->object() == NULL, "invariant"); + guarantee(s->object_peek() == NULL, "invariant"); if (s->is_busy()) { stringStream ss; fatal("must be !is_busy: %s", s->is_busy_to_string(&ss)); @@ -2134,38 +2108,47 @@ bool ObjectSynchronizer::deflate_monitor_using_JT(ObjectMonitor* mid, return false; } - // Set a NULL owner to DEFLATER_MARKER to force any contending thread - // through the slow path. This is just the first part of the async - // deflation dance. - if (mid->try_set_owner_from(NULL, DEFLATER_MARKER) != NULL) { - // The owner field is no longer NULL so we lost the race since the - // ObjectMonitor is now busy. - return false; - } + const oop obj = mid->object_peek(); - if (mid->contentions() > 0 || mid->_waiters != 0) { - // Another thread has raced to enter the ObjectMonitor after - // mid->is_busy() above or has already entered and waited on - // it which makes it busy so no deflation. Restore owner to - // NULL if it is still DEFLATER_MARKER. - if (mid->try_set_owner_from(DEFLATER_MARKER, NULL) != DEFLATER_MARKER) { - // Deferred decrement for the JT EnterI() that cancelled the async deflation. - mid->add_to_contentions(-1); + if (obj == NULL) { + // If the object died, we can recycle the monitor without racing with + // Java threads. The GC already broke the association with the object. + mid->set_owner_from(NULL, DEFLATER_MARKER); + mid->_contentions = -max_jint; + } else { + // Set a NULL owner to DEFLATER_MARKER to force any contending thread + // through the slow path. This is just the first part of the async + // deflation dance. + if (mid->try_set_owner_from(NULL, DEFLATER_MARKER) != NULL) { + // The owner field is no longer NULL so we lost the race since the + // ObjectMonitor is now busy. + return false; } - return false; - } - // Make a zero contentions field negative to force any contending threads - // to retry. This is the second part of the async deflation dance. - if (Atomic::cmpxchg(&mid->_contentions, (jint)0, -max_jint) != 0) { - // Contentions was no longer 0 so we lost the race since the - // ObjectMonitor is now busy. Restore owner to NULL if it is - // still DEFLATER_MARKER: - if (mid->try_set_owner_from(DEFLATER_MARKER, NULL) != DEFLATER_MARKER) { - // Deferred decrement for the JT EnterI() that cancelled the async deflation. - mid->add_to_contentions(-1); + if (mid->contentions() > 0 || mid->_waiters != 0) { + // Another thread has raced to enter the ObjectMonitor after + // mid->is_busy() above or has already entered and waited on + // it which makes it busy so no deflation. Restore owner to + // NULL if it is still DEFLATER_MARKER. + if (mid->try_set_owner_from(DEFLATER_MARKER, NULL) != DEFLATER_MARKER) { + // Deferred decrement for the JT EnterI() that cancelled the async deflation. + mid->add_to_contentions(-1); + } + return false; + } + + // Make a zero contentions field negative to force any contending threads + // to retry. This is the second part of the async deflation dance. + if (Atomic::cmpxchg(&mid->_contentions, (jint)0, -max_jint) != 0) { + // Contentions was no longer 0 so we lost the race since the + // ObjectMonitor is now busy. Restore owner to NULL if it is + // still DEFLATER_MARKER: + if (mid->try_set_owner_from(DEFLATER_MARKER, NULL) != DEFLATER_MARKER) { + // Deferred decrement for the JT EnterI() that cancelled the async deflation. + mid->add_to_contentions(-1); + } + return false; } - return false; } // Sanity checks for the races: @@ -2179,22 +2162,23 @@ bool ObjectSynchronizer::deflate_monitor_using_JT(ObjectMonitor* mid, "must be no entering threads: EntryList=" INTPTR_FORMAT, p2i(mid->_EntryList)); - const oop obj = mid->object(); - if (log_is_enabled(Trace, monitorinflation)) { - ResourceMark rm; - log_trace(monitorinflation)("deflate_monitor_using_JT: " - "object=" INTPTR_FORMAT ", mark=" - INTPTR_FORMAT ", type='%s'", - p2i(obj), obj->mark().value(), - obj->klass()->external_name()); - } + if (obj != NULL) { + if (log_is_enabled(Trace, monitorinflation)) { + ResourceMark rm; + log_trace(monitorinflation)("deflate_monitor_using_JT: " + "object=" INTPTR_FORMAT ", mark=" + INTPTR_FORMAT ", type='%s'", + p2i(obj), obj->mark().value(), + obj->klass()->external_name()); + } - // Install the old mark word if nobody else has already done it. - mid->install_displaced_markword_in_object(obj); + // Install the old mark word if nobody else has already done it. + mid->install_displaced_markword_in_object(obj); + } mid->clear_common(); - assert(mid->object() == NULL, "must be NULL: object=" INTPTR_FORMAT, - p2i(mid->object())); + assert(mid->object_peek() == NULL, "must be NULL: object=" INTPTR_FORMAT, + p2i(mid->object_peek())); assert(mid->is_free(), "must be free: allocation_state=%d", (int)mid->allocation_state()); @@ -2289,10 +2273,9 @@ int ObjectSynchronizer::deflate_monitor_list_using_JT(ObjectMonitor** list_p, next_next = unmarked_next(next); } - // Only try to deflate if there is an associated Java object and if - // mid is old (is not newly allocated and is not newly freed). - if (mid->object() != NULL && mid->is_old() && - deflate_monitor_using_JT(mid, free_head_p, free_tail_p)) { + // Only try to deflate if mid is old (is not newly allocated and + // is not newly freed). + if (mid->is_old() && deflate_monitor_using_JT(mid, free_head_p, free_tail_p)) { // Deflation succeeded and already updated free_head_p and // free_tail_p as needed. Finish the move to the local free list // by unlinking mid from the global or per-thread in-use list. @@ -2323,9 +2306,8 @@ int ObjectSynchronizer::deflate_monitor_list_using_JT(ObjectMonitor** list_p, mid = next; // mid keeps non-NULL next's locked state next = next_next; } else { - // mid is considered in-use if it does not have an associated - // Java object or mid is not old or deflation did not succeed. - // A mid->is_new() node can be seen here when it is freshly + // mid is considered in-use if mid is not old or deflation did not + // succeed. A mid->is_new() node can be seen here when it is freshly // returned by om_alloc() (and skips the deflation code path). // A mid->is_old() node can be seen here when deflation failed. // A mid->is_free() node can be seen here when a fresh node from @@ -2750,16 +2732,16 @@ void ObjectSynchronizer::chk_free_entry(JavaThread* jt, ObjectMonitor* n, *error_cnt_p = *error_cnt_p + 1; } } - if (n->object() != NULL) { + if (n->object_peek() != NULL) { if (jt != NULL) { out->print_cr("ERROR: jt=" INTPTR_FORMAT ", monitor=" INTPTR_FORMAT ": free per-thread monitor must have NULL _object " "field: _object=" INTPTR_FORMAT, p2i(jt), p2i(n), - p2i(n->object())); + p2i(n->object_peek())); } else { out->print_cr("ERROR: monitor=" INTPTR_FORMAT ": free global monitor " "must have NULL _object field: _object=" INTPTR_FORMAT, - p2i(n), p2i(n->object())); + p2i(n), p2i(n->object_peek())); } *error_cnt_p = *error_cnt_p + 1; } @@ -2889,48 +2871,39 @@ void ObjectSynchronizer::chk_in_use_entry(JavaThread* jt, ObjectMonitor* n, } *error_cnt_p = *error_cnt_p + 1; } - if (n->object() == NULL) { - if (jt != NULL) { - out->print_cr("ERROR: jt=" INTPTR_FORMAT ", monitor=" INTPTR_FORMAT - ": in-use per-thread monitor must have non-NULL _object " - "field.", p2i(jt), p2i(n)); - } else { - out->print_cr("ERROR: monitor=" INTPTR_FORMAT ": in-use global monitor " - "must have non-NULL _object field.", p2i(n)); - } - *error_cnt_p = *error_cnt_p + 1; - } - const oop obj = n->object(); - const markWord mark = obj->mark(); - if (!mark.has_monitor()) { - if (jt != NULL) { - out->print_cr("ERROR: jt=" INTPTR_FORMAT ", monitor=" INTPTR_FORMAT - ": in-use per-thread monitor's object does not think " - "it has a monitor: obj=" INTPTR_FORMAT ", mark=" - INTPTR_FORMAT, p2i(jt), p2i(n), p2i(obj), mark.value()); - } else { - out->print_cr("ERROR: monitor=" INTPTR_FORMAT ": in-use global " - "monitor's object does not think it has a monitor: obj=" - INTPTR_FORMAT ", mark=" INTPTR_FORMAT, p2i(n), - p2i(obj), mark.value()); + const oop obj = n->object_peek(); + if (obj != NULL) { + const markWord mark = obj->mark(); + if (!mark.has_monitor()) { + if (jt != NULL) { + out->print_cr("ERROR: jt=" INTPTR_FORMAT ", monitor=" INTPTR_FORMAT + ": in-use per-thread monitor's object does not think " + "it has a monitor: obj=" INTPTR_FORMAT ", mark=" + INTPTR_FORMAT, p2i(jt), p2i(n), p2i(obj), mark.value()); + } else { + out->print_cr("ERROR: monitor=" INTPTR_FORMAT ": in-use global " + "monitor's object does not think it has a monitor: obj=" + INTPTR_FORMAT ", mark=" INTPTR_FORMAT, p2i(n), + p2i(obj), mark.value()); + } + *error_cnt_p = *error_cnt_p + 1; } - *error_cnt_p = *error_cnt_p + 1; - } - ObjectMonitor* const obj_mon = mark.monitor(); - if (n != obj_mon) { - if (jt != NULL) { - out->print_cr("ERROR: jt=" INTPTR_FORMAT ", monitor=" INTPTR_FORMAT - ": in-use per-thread monitor's object does not refer " - "to the same monitor: obj=" INTPTR_FORMAT ", mark=" - INTPTR_FORMAT ", obj_mon=" INTPTR_FORMAT, p2i(jt), - p2i(n), p2i(obj), mark.value(), p2i(obj_mon)); - } else { - out->print_cr("ERROR: monitor=" INTPTR_FORMAT ": in-use global " - "monitor's object does not refer to the same monitor: obj=" - INTPTR_FORMAT ", mark=" INTPTR_FORMAT ", obj_mon=" - INTPTR_FORMAT, p2i(n), p2i(obj), mark.value(), p2i(obj_mon)); + ObjectMonitor* const obj_mon = mark.monitor(); + if (n != obj_mon) { + if (jt != NULL) { + out->print_cr("ERROR: jt=" INTPTR_FORMAT ", monitor=" INTPTR_FORMAT + ": in-use per-thread monitor's object does not refer " + "to the same monitor: obj=" INTPTR_FORMAT ", mark=" + INTPTR_FORMAT ", obj_mon=" INTPTR_FORMAT, p2i(jt), + p2i(n), p2i(obj), mark.value(), p2i(obj_mon)); + } else { + out->print_cr("ERROR: monitor=" INTPTR_FORMAT ": in-use global " + "monitor's object does not refer to the same monitor: obj=" + INTPTR_FORMAT ", mark=" INTPTR_FORMAT ", obj_mon=" + INTPTR_FORMAT, p2i(n), p2i(obj), mark.value(), p2i(obj_mon)); + } + *error_cnt_p = *error_cnt_p + 1; } - *error_cnt_p = *error_cnt_p + 1; } } @@ -3010,12 +2983,12 @@ void ObjectSynchronizer::log_in_use_monitor_details(outputStream * out) { if ((cur = get_list_head_locked(&om_list_globals._in_use_list)) != NULL) { // Marked the global in-use list head so process the list. while (true) { - const oop obj = cur->object(); + const oop obj = cur->object_peek(); const markWord mark = cur->header(); ResourceMark rm; out->print(INTPTR_FORMAT " %d%d%d " INTPTR_FORMAT " %s", p2i(cur), cur->is_busy() != 0, mark.hash() != 0, cur->owner() != NULL, - p2i(obj), obj->klass()->external_name()); + p2i(obj), obj == NULL ? "" : obj->klass()->external_name()); if (cur->is_busy() != 0) { out->print(" (%s)", cur->is_busy_to_string(&ss)); ss.reset(); @@ -3040,13 +3013,13 @@ void ObjectSynchronizer::log_in_use_monitor_details(outputStream * out) { if ((cur = get_list_head_locked(&jt->om_in_use_list)) != NULL) { // Marked the global in-use list head so process the list. while (true) { - const oop obj = cur->object(); + const oop obj = cur->object_peek(); const markWord mark = cur->header(); ResourceMark rm; out->print(INTPTR_FORMAT " " INTPTR_FORMAT " %d%d%d " INTPTR_FORMAT " %s", p2i(jt), p2i(cur), cur->is_busy() != 0, mark.hash() != 0, cur->owner() != NULL, p2i(obj), - obj->klass()->external_name()); + obj == NULL ? "" : obj->klass()->external_name()); if (cur->is_busy() != 0) { out->print(" (%s)", cur->is_busy_to_string(&ss)); ss.reset(); @@ -3102,7 +3075,7 @@ int ObjectSynchronizer::log_monitor_list_counts(outputStream * out) { int ObjectSynchronizer::verify_objmon_isinpool(ObjectMonitor *monitor) { PaddedObjectMonitor* block = Atomic::load(&g_block_list); while (block != NULL) { - assert(block->object() == CHAINMARKER, "must be a block header"); + assert(block->is_chainmarker(), "must be a block header"); if (monitor > &block[0] && monitor < &block[_BLOCKSIZE]) { address mon = (address)monitor; address blk = (address)block; diff --git a/src/hotspot/share/runtime/synchronizer.hpp b/src/hotspot/share/runtime/synchronizer.hpp index 70b3412d8da..528b811d50e 100644 --- a/src/hotspot/share/runtime/synchronizer.hpp +++ b/src/hotspot/share/runtime/synchronizer.hpp @@ -150,9 +150,6 @@ class ObjectSynchronizer : AllStatic { static bool request_deflate_idle_monitors(); // for whitebox test support and VM exit logging static void set_is_async_deflation_requested(bool new_value) { _is_async_deflation_requested = new_value; } static jlong time_since_last_async_deflation_ms(); - static void oops_do(OopClosure* f); - // Process oops in thread local used monitors - static void thread_local_used_oops_do(Thread* thread, OopClosure* f); // debugging static void audit_and_print_stats(bool on_exit); @@ -190,11 +187,6 @@ class ObjectSynchronizer : AllStatic { // Function to prepend new blocks to the appropriate lists: static void prepend_block_to_lists(PaddedObjectMonitor* new_blk); - // Process oops in all global used monitors (i.e. moribund thread's monitors) - static void global_used_oops_do(OopClosure* f); - // Process oops in monitors on the given list - static void list_oops_do(ObjectMonitor* list, OopClosure* f); - // Support for SynchronizerTest access to GVars fields: static u_char* get_gvars_addr(); static u_char* get_gvars_hc_sequence_addr(); diff --git a/src/hotspot/share/runtime/thread.cpp b/src/hotspot/share/runtime/thread.cpp index 3d03d7eed08..c278a42a0ff 100644 --- a/src/hotspot/share/runtime/thread.cpp +++ b/src/hotspot/share/runtime/thread.cpp @@ -69,8 +69,7 @@ #include "runtime/atomic.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/fieldDescriptor.inline.hpp" -#include "runtime/flags/jvmFlagConstraintList.hpp" -#include "runtime/flags/jvmFlagRangeList.hpp" +#include "runtime/flags/jvmFlagLimit.hpp" #include "runtime/deoptimization.hpp" #include "runtime/frame.inline.hpp" #include "runtime/handles.inline.hpp" @@ -257,8 +256,6 @@ Thread::Thread() { NOT_PRODUCT(_skip_gcalot = false;) _jvmti_env_iteration_count = 0; set_allocated_bytes(0); - _vm_operation_started_count = 0; - _vm_operation_completed_count = 0; _current_pending_monitor = NULL; _current_pending_monitor_is_from_java = true; _current_waiting_monitor = NULL; @@ -365,6 +362,10 @@ void Thread::record_stack_base_and_size() { void Thread::register_thread_stack_with_NMT() { MemTracker::record_thread_stack(stack_end(), stack_size()); } + +void Thread::unregister_thread_stack_with_NMT() { + MemTracker::release_thread_stack(stack_end(), stack_size()); +} #endif // INCLUDE_NMT void Thread::call_run() { @@ -430,19 +431,6 @@ Thread::~Thread() { barrier_set->on_thread_destroy(this); } - // stack_base can be NULL if the thread is never started or exited before - // record_stack_base_and_size called. Although, we would like to ensure - // that all started threads do call record_stack_base_and_size(), there is - // not proper way to enforce that. -#if INCLUDE_NMT - if (_stack_base != NULL) { - MemTracker::release_thread_stack(stack_end(), stack_size()); -#ifdef ASSERT - set_stack_base(NULL); -#endif - } -#endif // INCLUDE_NMT - // deallocate data structures delete resource_area(); // since the handle marks are using the handle area, we have to deallocated the root @@ -478,12 +466,11 @@ Thread::~Thread() { } #ifdef ASSERT -// A JavaThread is considered "dangling" if it is not the current -// thread, has been added the Threads list, the system is not at a -// safepoint and the Thread is not "protected". -// +// A JavaThread is considered dangling if it not handshake-safe with respect to +// the current thread, it is not on a ThreadsList, or not at safepoint. void Thread::check_for_dangling_thread_pointer(Thread *thread) { - assert(!thread->is_Java_thread() || Thread::current() == thread || + assert(!thread->is_Java_thread() || + thread->as_Java_thread()->is_handshake_safe_for(Thread::current()) || !thread->as_Java_thread()->on_thread_list() || SafepointSynchronize::is_at_safepoint() || ThreadsSMRSupport::is_a_protected_JavaThread_with_lock(thread->as_Java_thread()), @@ -848,7 +835,7 @@ bool JavaThread::wait_for_ext_suspend_completion(int retries, int delay, // bool JavaThread::is_thread_fully_suspended(bool wait_for_suspend, uint32_t *bits) { - if (this != JavaThread::current()) { + if (this != Thread::current()) { // "other" threads require special handling. if (wait_for_suspend) { // We are allowed to wait for the external suspend to complete @@ -890,10 +877,6 @@ void Thread::oops_do(OopClosure* f, CodeBlobClosure* cf) { // Do oop for ThreadShadow f->do_oop((oop*)&_pending_exception); handle_area()->oops_do(f); - - // We scan thread local monitor lists here, and the remaining global - // monitors in ObjectSynchronizer::oops_do(). - ObjectSynchronizer::thread_local_used_oops_do(this, f); } void Thread::metadata_handles_do(void f(Metadata*)) { @@ -953,13 +936,18 @@ void Thread::print_on_error(outputStream* st, char* buf, int buflen) const { st->print(" \"%s\"", name()); } - st->print(" [stack: " PTR_FORMAT "," PTR_FORMAT "]", - p2i(stack_end()), p2i(stack_base())); - - if (osthread()) { - st->print(" [id=%d]", osthread()->thread_id()); + OSThread* os_thr = osthread(); + if (os_thr != NULL) { + if (os_thr->get_state() != ZOMBIE) { + st->print(" [stack: " PTR_FORMAT "," PTR_FORMAT "]", + p2i(stack_end()), p2i(stack_base())); + st->print(" [id=%d]", osthread()->thread_id()); + } else { + st->print(" terminated"); + } + } else { + st->print(" unknown state (no osThread)"); } - ThreadsSMRSupport::print_info_on(this, st); } @@ -1346,8 +1334,10 @@ void NonJavaThread::pre_run() { void NonJavaThread::post_run() { JFR_ONLY(Jfr::on_thread_exit(this);) remove_from_the_list(); + unregister_thread_stack_with_NMT(); // Ensure thread-local-storage is cleared before termination. Thread::clear_thread_current(); + osthread()->set_state(ZOMBIE); } // NamedThread -- non-JavaThread subclasses with multiple @@ -1730,7 +1720,6 @@ void JavaThread::initialize() { _SleepEvent = ParkEvent::Allocate(this); // Setup safepoint state info for this thread ThreadSafepointState::create(this); - _handshake.set_handshakee(this); debug_only(_java_call_counter = 0); @@ -1748,7 +1737,7 @@ void JavaThread::initialize() { } JavaThread::JavaThread(bool is_attaching_via_jni) : - Thread() { + Thread(), _handshake(this) { initialize(); if (is_attaching_via_jni) { _jni_attach_state = _attaching_via_jni; @@ -1822,13 +1811,6 @@ bool JavaThread::reguard_stack(address cur_sp) { return true; // Stack already guarded or guard pages not needed. } - if (register_stack_overflow()) { - // For those architectures which have separate register and - // memory stacks, we must check the register stack to see if - // it has overflowed. - return false; - } - // Java code never executes within the yellow zone: the latter is only // there to provoke an exception during stack banging. If java code // is executing there, either StackShadowPages should be larger, or @@ -1870,7 +1852,7 @@ static void compiler_thread_entry(JavaThread* thread, TRAPS); static void sweeper_thread_entry(JavaThread* thread, TRAPS); JavaThread::JavaThread(ThreadFunction entry_point, size_t stack_sz) : - Thread() { + Thread(), _handshake(this) { initialize(); _jni_attach_state = _not_attaching_via_jni; set_entry_point(entry_point); @@ -1957,13 +1939,6 @@ void JavaThread::run() { // initialize thread-local alloc buffer related fields this->initialize_tlab(); - // Used to test validity of stack trace backs. - // This can't be moved into pre_run() else we invalidate - // the requirement that thread_main_inner is lower on - // the stack. Consequently all the initialization logic - // stays here in run() rather than pre_run(). - this->record_base_of_stack_pointer(); - this->create_stack_guard_pages(); this->cache_global_variables(); @@ -2020,6 +1995,7 @@ void JavaThread::thread_main_inner() { // Shared teardown for all JavaThreads void JavaThread::post_run() { this->exit(false); + this->unregister_thread_stack_with_NMT(); // Defer deletion to here to ensure 'this' is still referenceable in call_run // for any shared tear-down. this->smr_delete(); @@ -2219,11 +2195,6 @@ void JavaThread::exit(bool destroy_vm, ExitType exit_type) { thread_name = os::strdup(get_thread_name()); } - // We must flush any deferred card marks and other various GC barrier - // related buffers (e.g. G1 SATB buffer and G1 dirty card queue buffer) - // before removing a thread from the list of active threads. - BarrierSet::barrier_set()->on_thread_detach(this); - log_info(os, thread)("JavaThread %s (tid: " UINTX_FORMAT ").", exit_type == JavaThread::normal_exit ? "exiting" : "detaching", os::current_thread_id()); @@ -2271,8 +2242,6 @@ void JavaThread::cleanup_failed_attach_current_thread(bool is_daemon) { tlab().retire(); } - BarrierSet::barrier_set()->on_thread_detach(this); - Threads::remove(this, is_daemon); this->smr_delete(); } @@ -2329,8 +2298,6 @@ void JavaThread::remove_monitor_chunk(MonitorChunk* chunk) { // _thread_in_native_trans state (such as from // check_special_condition_for_native_trans()). void JavaThread::check_and_handle_async_exceptions(bool check_unsafe_error) { - // May be we are at method entry and requires to save do not unlock flag. - UnlockFlagSaver fs(this); if (has_last_Java_frame() && has_async_condition()) { // If we are at a polling page safepoint (not a poll return) // then we must defer async exception because live registers @@ -2393,21 +2360,26 @@ void JavaThread::check_and_handle_async_exceptions(bool check_unsafe_error) { if (check_unsafe_error && condition == _async_unsafe_access_error && !has_pending_exception()) { + // We may be at method entry which requires we save the do-not-unlock flag. + UnlockFlagSaver fs(this); condition = _no_async_condition; // done switch (thread_state()) { case _thread_in_vm: { JavaThread* THREAD = this; - THROW_MSG(vmSymbols::java_lang_InternalError(), "a fault occurred in an unsafe memory access operation"); + Exceptions::throw_unsafe_access_internal_error(THREAD, __FILE__, __LINE__, "a fault occurred in an unsafe memory access operation"); + return; } case _thread_in_native: { ThreadInVMfromNative tiv(this); JavaThread* THREAD = this; - THROW_MSG(vmSymbols::java_lang_InternalError(), "a fault occurred in an unsafe memory access operation"); + Exceptions::throw_unsafe_access_internal_error(THREAD, __FILE__, __LINE__, "a fault occurred in an unsafe memory access operation"); + return; } case _thread_in_Java: { ThreadInVMfromJava tiv(this); JavaThread* THREAD = this; - THROW_MSG(vmSymbols::java_lang_InternalError(), "a fault occurred in a recent unsafe memory access operation in compiled Java code"); + Exceptions::throw_unsafe_access_internal_error(THREAD, __FILE__, __LINE__, "a fault occurred in a recent unsafe memory access operation in compiled Java code"); + return; } default: ShouldNotReachHere(); @@ -2438,7 +2410,8 @@ void JavaThread::handle_special_runtime_exit_condition(bool check_asyncs) { void JavaThread::send_thread_stop(oop java_throwable) { ResourceMark rm; - assert(Thread::current()->is_VM_thread() || Thread::current() == this, "should be in the vm thread"); + assert(is_handshake_safe_for(Thread::current()), + "should be self or handshakee"); // Do not throw asynchronous exceptions against the compiler thread // (the compiler thread should not be a Java thread -- fix in 1.4.2) @@ -2595,20 +2568,22 @@ int JavaThread::java_suspend_self() { // Helper routine to set up the correct thread state before calling java_suspend_self. // This is called when regular thread-state transition helpers can't be used because // we can be in various states, in particular _thread_in_native_trans. -// Because this thread is external suspended the safepoint code will count it as at -// a safepoint, regardless of what its actual current thread-state is. But -// is_ext_suspend_completed() may be waiting to see a thread transition from -// _thread_in_native_trans to _thread_blocked. So we set the thread state directly -// to _thread_blocked. The problem with setting thread state directly is that a +// We have to set the thread state directly to _thread_blocked so that it will +// be seen to be safepoint/handshake safe whilst suspended. This is also +// necessary to allow a thread in is_ext_suspend_completed, that observed the +// _thread_in_native_trans state, to proceed. +// The problem with setting thread state directly is that a // safepoint could happen just after java_suspend_self() returns after being resumed, // and the VM thread will see the _thread_blocked state. So we must check for a safepoint // after restoring the state to make sure we won't leave while a safepoint is in progress. // However, not all initial-states are allowed when performing a safepoint check, as we -// should never be blocking at a safepoint whilst in those states. Of these 'bad' states +// should never be blocking at a safepoint whilst in those states(*). Of these 'bad' states // only _thread_in_native is possible when executing this code (based on our two callers). // A thread that is _thread_in_native is already safepoint-safe and so it doesn't matter // whether the VMThread sees the _thread_blocked state, or the _thread_in_native state, // and so we don't need the explicit safepoint check. +// (*) See switch statement in SafepointSynchronize::block() for thread states that are +// allowed when performing a safepoint check. void JavaThread::java_suspend_self_with_safepoint_check() { assert(this == Thread::current(), "invariant"); @@ -2812,7 +2787,6 @@ void JavaThread::enable_stack_reserved_zone() { } else { warning("Attempt to guard stack reserved zone failed."); } - enable_register_stack_guard(); } void JavaThread::disable_stack_reserved_zone() { @@ -2830,7 +2804,6 @@ void JavaThread::disable_stack_reserved_zone() { } else { warning("Attempt to unguard stack reserved zone failed."); } - disable_register_stack_guard(); } void JavaThread::enable_stack_yellow_reserved_zone() { @@ -2849,7 +2822,6 @@ void JavaThread::enable_stack_yellow_reserved_zone() { } else { warning("Attempt to guard stack yellow zone failed."); } - enable_register_stack_guard(); } void JavaThread::disable_stack_yellow_reserved_zone() { @@ -2868,7 +2840,6 @@ void JavaThread::disable_stack_yellow_reserved_zone() { } else { warning("Attempt to unguard stack yellow zone failed."); } - disable_register_stack_guard(); } void JavaThread::enable_stack_red_zone() { @@ -3841,12 +3812,12 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) { if (ergo_result != JNI_OK) return ergo_result; // Final check of all ranges after ergonomics which may change values. - if (!JVMFlagRangeList::check_ranges()) { + if (!JVMFlagLimit::check_all_ranges()) { return JNI_EINVAL; } // Final check of all 'AfterErgo' constraints after ergonomics which may change values. - bool constraint_result = JVMFlagConstraintList::check_constraints(JVMFlagConstraint::AfterErgo); + bool constraint_result = JVMFlagLimit::check_all_constraints(JVMFlagConstraintPhase::AfterErgo); if (!constraint_result) { return JNI_EINVAL; } @@ -4600,6 +4571,13 @@ void Threads::remove(JavaThread* p, bool is_daemon) { // Reclaim the ObjectMonitors from the om_in_use_list and om_free_list of the moribund thread. ObjectSynchronizer::om_flush(p); + // We must flush any deferred card marks and other various GC barrier + // related buffers (e.g. G1 SATB buffer and G1 dirty card queue buffer) + // before removing a thread from the list of active threads. + // This must be done after ObjectSynchronizer::om_flush(), as GC barriers + // are used in om_flush(). + BarrierSet::barrier_set()->on_thread_detach(p); + // Extra scope needed for Thread_lock, so we can check // that we do not remove thread without safepoint code notice { MonitorLocker ml(Threads_lock); diff --git a/src/hotspot/share/runtime/thread.hpp b/src/hotspot/share/runtime/thread.hpp index e54c36afcb9..897fcdef0b7 100644 --- a/src/hotspot/share/runtime/thread.hpp +++ b/src/hotspot/share/runtime/thread.hpp @@ -401,9 +401,6 @@ class Thread: public ThreadShadow { JFR_ONLY(DEFINE_THREAD_LOCAL_FIELD_JFR;) // Thread-local data for jfr - int _vm_operation_started_count; // VM_Operation support - int _vm_operation_completed_count; // VM_Operation support - ObjectMonitor* _current_pending_monitor; // ObjectMonitor this thread // is waiting to lock bool _current_pending_monitor_is_from_java; // locking is from Java code @@ -494,6 +491,7 @@ class Thread: public ThreadShadow { virtual bool is_ConcurrentGC_thread() const { return false; } virtual bool is_Named_thread() const { return false; } virtual bool is_Worker_thread() const { return false; } + virtual bool is_JfrSampler_thread() const { return false; } // Can this thread make Java upcalls virtual bool can_call_java() const { return false; } @@ -622,11 +620,6 @@ class Thread: public ThreadShadow { bool is_trace_suspend() { return (_suspend_flags & _trace_flag) != 0; } - // VM operation support - int vm_operation_ticket() { return ++_vm_operation_started_count; } - int vm_operation_completed_count() { return _vm_operation_completed_count; } - void increment_vm_operation_completed_count() { _vm_operation_completed_count++; } - // For tracking the heavyweight monitor the thread is pending on. ObjectMonitor* current_pending_monitor() { return _current_pending_monitor; @@ -767,6 +760,7 @@ class Thread: public ThreadShadow { address stack_end() const { return stack_base() - stack_size(); } void record_stack_base_and_size(); void register_thread_stack_with_NMT() NOT_NMT_RETURN; + void unregister_thread_stack_with_NMT() NOT_NMT_RETURN; int lgrp_id() const { return _lgrp_id; } void set_lgrp_id(int value) { _lgrp_id = value; } @@ -1356,24 +1350,12 @@ class JavaThread: public Thread { // Support for thread handshake operations HandshakeState _handshake; public: - void set_handshake_operation(HandshakeOperation* op) { - _handshake.set_operation(op); - } - - bool has_handshake() const { - return _handshake.has_operation(); - } - - void handshake_process_by_self() { - _handshake.process_by_self(); - } - - HandshakeState::ProcessResult handshake_try_process(HandshakeOperation* op) { - return _handshake.try_process(op); - } + HandshakeState* handshake_state() { return &_handshake; } - Thread* active_handshaker() const { - return _handshake.active_handshaker(); + // A JavaThread can always safely operate on it self and other threads + // can do it safely if they are the active handshaker. + bool is_handshake_safe_for(Thread* th) const { + return _handshake.active_handshaker() == th || this == th; } // Suspend/resume support for JavaThread diff --git a/src/hotspot/share/runtime/vmOperations.hpp b/src/hotspot/share/runtime/vmOperations.hpp index 7a054778efd..93477dcad0c 100644 --- a/src/hotspot/share/runtime/vmOperations.hpp +++ b/src/hotspot/share/runtime/vmOperations.hpp @@ -122,14 +122,12 @@ class VM_Operation : public StackObj { private: Thread* _calling_thread; - VM_Operation* _next; - VM_Operation* _prev; // The VM operation name array static const char* _names[]; public: - VM_Operation() : _calling_thread(NULL), _next(NULL), _prev(NULL) {} + VM_Operation() : _calling_thread(NULL) {} // VM operation support (used by VM thread) Thread* calling_thread() const { return _calling_thread; } @@ -149,12 +147,6 @@ class VM_Operation : public StackObj { virtual bool doit_prologue() { return true; }; virtual void doit_epilogue() {}; - // Linking - VM_Operation *next() const { return _next; } - VM_Operation *prev() const { return _prev; } - void set_next(VM_Operation *next) { _next = next; } - void set_prev(VM_Operation *prev) { _prev = prev; } - // Configuration. Override these appropriately in subclasses. virtual VMOp_Type type() const = 0; virtual bool allow_nested_vm_operations() const { return false; } diff --git a/src/hotspot/share/runtime/vmStructs.cpp b/src/hotspot/share/runtime/vmStructs.cpp index cfd62fdbd3d..0e0101902f9 100644 --- a/src/hotspot/share/runtime/vmStructs.cpp +++ b/src/hotspot/share/runtime/vmStructs.cpp @@ -1008,7 +1008,7 @@ typedef HashtableEntry<InstanceKlass*, mtClass> KlassHashtableEntry; /* -XX flags */ \ /*********************/ \ \ - nonstatic_field(JVMFlag, _type, const char*) \ + nonstatic_field(JVMFlag, _type, int) \ nonstatic_field(JVMFlag, _name, const char*) \ unchecked_nonstatic_field(JVMFlag, _addr, sizeof(void*)) /* NOTE: no type */ \ nonstatic_field(JVMFlag, _flags, JVMFlag::Flags) \ diff --git a/src/hotspot/share/runtime/vmThread.cpp b/src/hotspot/share/runtime/vmThread.cpp index f9eae673b36..57d2f1d7c70 100644 --- a/src/hotspot/share/runtime/vmThread.cpp +++ b/src/hotspot/share/runtime/vmThread.cpp @@ -24,7 +24,6 @@ #include "precompiled.hpp" #include "compiler/compileBroker.hpp" -#include "gc/shared/collectedHeap.hpp" #include "jfr/jfrEvents.hpp" #include "jfr/support/jfrThreadId.hpp" #include "logging/log.hpp" @@ -32,7 +31,6 @@ #include "logging/logConfiguration.hpp" #include "memory/resourceArea.hpp" #include "memory/universe.hpp" -#include "oops/method.hpp" #include "oops/oop.inline.hpp" #include "oops/verifyOopClosure.hpp" #include "runtime/atomic.hpp" @@ -43,101 +41,13 @@ #include "runtime/safepoint.hpp" #include "runtime/synchronizer.hpp" #include "runtime/thread.inline.hpp" +#include "runtime/timerTrace.hpp" #include "runtime/vmThread.hpp" #include "runtime/vmOperations.hpp" -#include "services/runtimeService.hpp" #include "utilities/dtrace.hpp" #include "utilities/events.hpp" #include "utilities/vmError.hpp" -#include "utilities/xmlstream.hpp" - -VM_QueueHead VMOperationQueue::_queue_head[VMOperationQueue::nof_priorities]; - -VMOperationQueue::VMOperationQueue() { - // The queue is a circular doubled-linked list, which always contains - // one element (i.e., one element means empty). - for(int i = 0; i < nof_priorities; i++) { - _queue_length[i] = 0; - _queue_counter = 0; - _queue[i] = &_queue_head[i]; - _queue[i]->set_next(_queue[i]); - _queue[i]->set_prev(_queue[i]); - } -} - - -bool VMOperationQueue::queue_empty(int prio) { - // It is empty if there is exactly one element - bool empty = (_queue[prio] == _queue[prio]->next()); - assert( (_queue_length[prio] == 0 && empty) || - (_queue_length[prio] > 0 && !empty), "sanity check"); - return _queue_length[prio] == 0; -} - -// Inserts an element to the right of the q element -void VMOperationQueue::insert(VM_Operation* q, VM_Operation* n) { - assert(q->next()->prev() == q && q->prev()->next() == q, "sanity check"); - n->set_prev(q); - n->set_next(q->next()); - q->next()->set_prev(n); - q->set_next(n); -} - -void VMOperationQueue::queue_add(int prio, VM_Operation *op) { - _queue_length[prio]++; - insert(_queue[prio]->prev(), op); -} - - -void VMOperationQueue::unlink(VM_Operation* q) { - assert(q->next()->prev() == q && q->prev()->next() == q, "sanity check"); - q->prev()->set_next(q->next()); - q->next()->set_prev(q->prev()); -} - -VM_Operation* VMOperationQueue::queue_remove_front(int prio) { - if (queue_empty(prio)) return NULL; - assert(_queue_length[prio] >= 0, "sanity check"); - _queue_length[prio]--; - VM_Operation* r = _queue[prio]->next(); - assert(r != _queue[prio], "cannot remove base element"); - unlink(r); - return r; -} - -//----------------------------------------------------------------- -// High-level interface -void VMOperationQueue::add(VM_Operation *op) { - - HOTSPOT_VMOPS_REQUEST( - (char *) op->name(), strlen(op->name()), - op->evaluate_at_safepoint() ? 0 : 1); - - // Encapsulates VM queue policy. Currently, that - // only involves putting them on the right list - queue_add(op->evaluate_at_safepoint() ? SafepointPriority : MediumPriority, op); -} - -VM_Operation* VMOperationQueue::remove_next() { - // Assuming VMOperation queue is two-level priority queue. If there are - // more than two priorities, we need a different scheduling algorithm. - assert(SafepointPriority == 0 && MediumPriority == 1 && nof_priorities == 2, - "current algorithm does not work"); - - // simple counter based scheduling to prevent starvation of lower priority - // queue. -- see 4390175 - int high_prio, low_prio; - if (_queue_counter++ < 10) { - high_prio = SafepointPriority; - low_prio = MediumPriority; - } else { - _queue_counter = 0; - high_prio = MediumPriority; - low_prio = SafepointPriority; - } - return queue_remove_front(queue_empty(high_prio) ? low_prio : high_prio); -} //------------------------------------------------------------------------------------------------------------------ // Timeout machinery @@ -169,12 +79,15 @@ void VMOperationTimeoutTask::disarm() { //------------------------------------------------------------------------------------------------------------------ // Implementation of VMThread stuff +static VM_None safepointALot_op("SafepointALot"); +static VM_Cleanup cleanup_op; + bool VMThread::_should_terminate = false; bool VMThread::_terminated = false; Monitor* VMThread::_terminate_lock = NULL; VMThread* VMThread::_vm_thread = NULL; VM_Operation* VMThread::_cur_vm_operation = NULL; -VMOperationQueue* VMThread::_vm_queue = NULL; +VM_Operation* VMThread::_next_vm_operation = &cleanup_op; // Prevent any thread from setting an operation until VM thread is ready. PerfCounter* VMThread::_perf_accumulated_vm_operation_time = NULL; VMOperationTimeoutTask* VMThread::_timeout_task = NULL; @@ -198,10 +111,6 @@ void VMThread::create() { assert(_timeout_task == NULL, "sanity"); } - // Create VM operation queue - _vm_queue = new VMOperationQueue(); - guarantee(_vm_queue != NULL, "just checking"); - _terminate_lock = new Monitor(Mutex::safepoint, "VMThread::_terminate_lock", true, Monitor::_safepoint_check_never); @@ -310,9 +219,10 @@ void VMThread::run() { // and wait until operation is performed. void VMThread::wait_for_vm_thread_exit() { assert(JavaThread::current()->is_terminated(), "Should be terminated"); - { MonitorLocker mu(VMOperationQueue_lock, Mutex::_no_safepoint_check_flag); + { + MonitorLocker mu(VMOperation_lock); _should_terminate = true; - mu.notify(); + mu.notify_all(); } // Note: VM thread leaves at Safepoint. We are not stopped by Safepoint @@ -324,8 +234,9 @@ void VMThread::wait_for_vm_thread_exit() { // Note: it should be OK to use Terminator_lock here. But this is called // at a very delicate time (VM shutdown) and we are operating in non- VM // thread at Safepoint. It's safer to not share lock with other threads. - { MonitorLocker ml(_terminate_lock, Mutex::_no_safepoint_check_flag); - while(!VMThread::is_terminated()) { + { + MonitorLocker ml(_terminate_lock, Mutex::_no_safepoint_check_flag); + while (!VMThread::is_terminated()) { ml.wait(); } } @@ -364,13 +275,8 @@ void VMThread::evaluate_operation(VM_Operation* op) { op->evaluate_at_safepoint() ? 0 : 1); } - // Mark as completed - op->calling_thread()->increment_vm_operation_completed_count(); } -static VM_None safepointALot_op("SafepointALot"); -static VM_Cleanup cleanup_op; - class HandshakeALotClosure : public HandshakeClosure { public: HandshakeALotClosure() : HandshakeClosure("HandshakeALot") {} @@ -381,119 +287,198 @@ class HandshakeALotClosure : public HandshakeClosure { } }; -VM_Operation* VMThread::no_op_safepoint() { - // Check for handshakes first since we may need to return a VMop. - if (HandshakeALot) { - HandshakeALotClosure hal_cl; - Handshake::execute(&hal_cl); +bool VMThread::handshake_alot() { + assert(_cur_vm_operation == NULL, "should not have an op yet"); + assert(_next_vm_operation == NULL, "should not have an op yet"); + if (!HandshakeALot) { + return false; } + static jlong last_halot_ms = 0; + jlong now_ms = nanos_to_millis(os::javaTimeNanos()); + // If only HandshakeALot is set, but GuaranteedSafepointInterval is 0, + // we emit a handshake if it's been more than a second since the last one. + jlong interval = GuaranteedSafepointInterval != 0 ? GuaranteedSafepointInterval : 1000; + jlong deadline_ms = interval + last_halot_ms; + if (now_ms > deadline_ms) { + last_halot_ms = now_ms; + return true; + } + return false; +} + +void VMThread::setup_periodic_safepoint_if_needed() { + assert(_cur_vm_operation == NULL, "Already have an op"); + assert(_next_vm_operation == NULL, "Already have an op"); // Check for a cleanup before SafepointALot to keep stats correct. long interval_ms = SafepointTracing::time_since_last_safepoint_ms(); bool max_time_exceeded = GuaranteedSafepointInterval != 0 && (interval_ms >= GuaranteedSafepointInterval); - if (max_time_exceeded && SafepointSynchronize::is_cleanup_needed()) { - return &cleanup_op; + if (!max_time_exceeded) { + return; } - if (SafepointALot) { - return &safepointALot_op; + if (SafepointSynchronize::is_cleanup_needed()) { + _next_vm_operation = &cleanup_op; + } else if (SafepointALot) { + _next_vm_operation = &safepointALot_op; } - // Nothing to be done. - return NULL; } -void VMThread::loop() { - assert(_cur_vm_operation == NULL, "no current one should be executing"); +bool VMThread::set_next_operation(VM_Operation *op) { + if (_next_vm_operation != NULL) { + return false; + } + log_debug(vmthread)("Adding VM operation: %s", op->name()); - SafepointSynchronize::init(_vm_thread); + _next_vm_operation = op; + + HOTSPOT_VMOPS_REQUEST( + (char *) op->name(), strlen(op->name()), + op->evaluate_at_safepoint() ? 0 : 1); + return true; +} - while(true) { - // - // Wait for VM operation - // - // use no_safepoint_check to get lock without attempting to "sneak" - { MonitorLocker mu_queue(VMOperationQueue_lock, - Mutex::_no_safepoint_check_flag); - - // Look for new operation - assert(_cur_vm_operation == NULL, "no current one should be executing"); - _cur_vm_operation = _vm_queue->remove_next(); - - while (!should_terminate() && _cur_vm_operation == NULL) { - // wait with a timeout to guarantee safepoints at regular intervals - // (if there is cleanup work to do) - (void)mu_queue.wait(GuaranteedSafepointInterval); - - // Support for self destruction - if ((SelfDestructTimer != 0) && !VMError::is_error_reported() && - (os::elapsedTime() > (double)SelfDestructTimer * 60.0)) { - tty->print_cr("VM self-destructed"); - exit(-1); - } - - // If the queue contains a safepoint VM op, - // clean up will be done so we can skip this part. - if (!_vm_queue->peek_at_safepoint_priority()) { - - // Have to unlock VMOperationQueue_lock just in case no_op_safepoint() - // has to do a handshake when HandshakeALot is enabled. - MutexUnlocker mul(VMOperationQueue_lock, Mutex::_no_safepoint_check_flag); - if ((_cur_vm_operation = VMThread::no_op_safepoint()) != NULL) { - // Force a safepoint since we have not had one for at least - // 'GuaranteedSafepointInterval' milliseconds and we need to clean - // something. This will run all the clean-up processing that needs - // to be done at a safepoint. - SafepointSynchronize::begin(); - SafepointSynchronize::end(); - _cur_vm_operation = NULL; - } - } - _cur_vm_operation = _vm_queue->remove_next(); +void VMThread::wait_until_executed(VM_Operation* op) { + MonitorLocker ml(VMOperation_lock, + Thread::current()->is_Java_thread() ? + Mutex::_safepoint_check_flag : + Mutex::_no_safepoint_check_flag); + { + TraceTime timer("Installing VM operation", TRACETIME_LOG(Trace, vmthread)); + while (true) { + if (VMThread::vm_thread()->set_next_operation(op)) { + ml.notify_all(); + break; } + // Wait to install this operation as the next operation in the VM Thread + log_trace(vmthread)("A VM operation already set, waiting"); + ml.wait(); + } + } + { + // Wait until the operation has been processed + TraceTime timer("Waiting for VM operation to be completed", TRACETIME_LOG(Trace, vmthread)); + // _next_vm_operation is cleared holding VMOperation_lock after it has been + // executed. We wait until _next_vm_operation is not our op. + while (_next_vm_operation == op) { + // VM Thread can process it once we unlock the mutex on wait. + ml.wait(); + } + } +} - if (should_terminate()) break; - } // Release mu_queue_lock +static void self_destruct_if_needed() { + // Support for self destruction + if ((SelfDestructTimer != 0) && !VMError::is_error_reported() && + (os::elapsedTime() > (double)SelfDestructTimer * 60.0)) { + tty->print_cr("VM self-destructed"); + exit(-1); + } +} - // - // Execute VM operation - // - { HandleMark hm(VMThread::vm_thread()); +void VMThread::inner_execute(VM_Operation* op) { + assert(Thread::current()->is_VM_thread(), "Must be the VM thread"); + + VM_Operation* prev_vm_operation = NULL; + if (_cur_vm_operation != NULL) { + // Check that the VM operation allows nested VM operation. + // This is normally not the case, e.g., the compiler + // does not allow nested scavenges or compiles. + if (!_cur_vm_operation->allow_nested_vm_operations()) { + fatal("Unexpected nested VM operation %s requested by operation %s", + op->name(), _cur_vm_operation->name()); + } + op->set_calling_thread(_cur_vm_operation->calling_thread()); + prev_vm_operation = _cur_vm_operation; + } - EventMark em("Executing VM operation: %s", vm_operation()->name()); - assert(_cur_vm_operation != NULL, "we should have found an operation to execute"); + _cur_vm_operation = op; - // If we are at a safepoint we will evaluate all the operations that - // follow that also require a safepoint - if (_cur_vm_operation->evaluate_at_safepoint()) { - log_debug(vmthread)("Evaluating safepoint VM operation: %s", _cur_vm_operation->name()); + HandleMark hm(VMThread::vm_thread()); + EventMark em("Executing %s VM operation: %s", prev_vm_operation != NULL ? "nested" : "", op->name()); - SafepointSynchronize::begin(); + log_debug(vmthread)("Evaluating %s %s VM operation: %s", + prev_vm_operation != NULL ? "nested" : "", + _cur_vm_operation->evaluate_at_safepoint() ? "safepoint" : "non-safepoint", + _cur_vm_operation->name()); - if (_timeout_task != NULL) { - _timeout_task->arm(); - } + bool end_safepoint = false; + if (_cur_vm_operation->evaluate_at_safepoint() && + !SafepointSynchronize::is_at_safepoint()) { + SafepointSynchronize::begin(); + if (_timeout_task != NULL) { + _timeout_task->arm(); + } + end_safepoint = true; + } - evaluate_operation(_cur_vm_operation); - _cur_vm_operation = NULL; + evaluate_operation(_cur_vm_operation); - if (_timeout_task != NULL) { - _timeout_task->disarm(); - } + if (end_safepoint) { + if (_timeout_task != NULL) { + _timeout_task->disarm(); + } + SafepointSynchronize::end(); + } - // Complete safepoint synchronization - SafepointSynchronize::end(); + _cur_vm_operation = prev_vm_operation; +} + +void VMThread::wait_for_operation() { + assert(Thread::current()->is_VM_thread(), "Must be the VM thread"); + MonitorLocker ml_op_lock(VMOperation_lock, Mutex::_no_safepoint_check_flag); + + // Clear previous operation. + // On first call this clears a dummy place-holder. + _next_vm_operation = NULL; + // Notify operation is done and notify a next operation can be installed. + ml_op_lock.notify_all(); - } else { // not a safepoint operation - log_debug(vmthread)("Evaluating non-safepoint VM operation: %s", _cur_vm_operation->name()); - evaluate_operation(_cur_vm_operation); - _cur_vm_operation = NULL; + while (!should_terminate()) { + self_destruct_if_needed(); + if (_next_vm_operation != NULL) { + return; + } + if (handshake_alot()) { + { + MutexUnlocker mul(VMOperation_lock); + HandshakeALotClosure hal_cl; + Handshake::execute(&hal_cl); + } + // When we unlocked above someone might have setup a new op. + if (_next_vm_operation != NULL) { + return; } } + assert(_next_vm_operation == NULL, "Must be"); + assert(_cur_vm_operation == NULL, "Must be"); - // - // Notify (potential) waiting Java thread(s) - { MonitorLocker mu(VMOperationRequest_lock, Mutex::_no_safepoint_check_flag); - mu.notify_all(); + setup_periodic_safepoint_if_needed(); + if (_next_vm_operation != NULL) { + return; } + + // We didn't find anything to execute, notify any waiter so they can install an op. + ml_op_lock.notify_all(); + ml_op_lock.wait(GuaranteedSafepointInterval); + } +} + +void VMThread::loop() { + assert(_cur_vm_operation == NULL, "no current one should be executing"); + + SafepointSynchronize::init(_vm_thread); + + // Need to set a calling thread for ops not passed + // via the normal way. + cleanup_op.set_calling_thread(_vm_thread); + safepointALot_op.set_calling_thread(_vm_thread); + + while (true) { + if (should_terminate()) break; + wait_for_operation(); + if (should_terminate()) break; + assert(_next_vm_operation != NULL, "Must have one"); + inner_execute(_next_vm_operation); } } @@ -525,71 +510,28 @@ class SkipGCALot : public StackObj { void VMThread::execute(VM_Operation* op) { Thread* t = Thread::current(); - if (!t->is_VM_thread()) { - SkipGCALot sgcalot(t); // avoid re-entrant attempts to gc-a-lot - // JavaThread or WatcherThread - t->check_for_valid_safepoint_state(); - - // New request from Java thread, evaluate prologue - if (!op->doit_prologue()) { - return; // op was cancelled - } - - // Setup VM_operations for execution + if (t->is_VM_thread()) { op->set_calling_thread(t); + ((VMThread*)t)->inner_execute(op); + return; + } - // Get ticket number for the VM operation - int ticket = t->vm_operation_ticket(); - - // Add VM operation to list of waiting threads. We are guaranteed not to block while holding the - // VMOperationQueue_lock, so we can block without a safepoint check. This allows vm operation requests - // to be queued up during a safepoint synchronization. - { - MonitorLocker ml(VMOperationQueue_lock, Mutex::_no_safepoint_check_flag); - log_debug(vmthread)("Adding VM operation: %s", op->name()); - _vm_queue->add(op); - ml.notify(); - } - { - // Wait for completion of request - // Note: only a JavaThread triggers the safepoint check when locking - MonitorLocker ml(VMOperationRequest_lock, - t->is_Java_thread() ? Mutex::_safepoint_check_flag : Mutex::_no_safepoint_check_flag); - while(t->vm_operation_completed_count() < ticket) { - ml.wait(); - } - } - op->doit_epilogue(); - } else { - // invoked by VM thread; usually nested VM operation - assert(t->is_VM_thread(), "must be a VM thread"); - VM_Operation* prev_vm_operation = vm_operation(); - if (prev_vm_operation != NULL) { - // Check the VM operation allows nested VM operation. This normally not the case, e.g., the compiler - // does not allow nested scavenges or compiles. - if (!prev_vm_operation->allow_nested_vm_operations()) { - fatal("Nested VM operation %s requested by operation %s", - op->name(), vm_operation()->name()); - } - op->set_calling_thread(prev_vm_operation->calling_thread()); - } + // Avoid re-entrant attempts to gc-a-lot + SkipGCALot sgcalot(t); - EventMark em("Executing %s VM operation: %s", prev_vm_operation ? "nested" : "", op->name()); + // JavaThread or WatcherThread + t->check_for_valid_safepoint_state(); - // Release all internal handles after operation is evaluated - HandleMark hm(t); - _cur_vm_operation = op; + // New request from Java thread, evaluate prologue + if (!op->doit_prologue()) { + return; // op was cancelled + } - if (op->evaluate_at_safepoint() && !SafepointSynchronize::is_at_safepoint()) { - SafepointSynchronize::begin(); - op->evaluate(); - SafepointSynchronize::end(); - } else { - op->evaluate(); - } + op->set_calling_thread(t); - _cur_vm_operation = prev_vm_operation; - } + wait_until_executed(op); + + op->doit_epilogue(); } void VMThread::verify() { diff --git a/src/hotspot/share/runtime/vmThread.hpp b/src/hotspot/share/runtime/vmThread.hpp index 0f14ae30ea3..c6188fd3ac1 100644 --- a/src/hotspot/share/runtime/vmThread.hpp +++ b/src/hotspot/share/runtime/vmThread.hpp @@ -30,53 +30,6 @@ #include "runtime/task.hpp" #include "runtime/vmOperations.hpp" -class VM_QueueHead : public VM_None { - public: - VM_QueueHead() : VM_None("QueueHead") {} -}; - -// -// Prioritized queue of VM operations. -// -// Encapsulates both queue management and -// and priority policy -// -class VMOperationQueue : public CHeapObj<mtInternal> { - private: - enum Priorities { - SafepointPriority, // Highest priority (operation executed at a safepoint) - MediumPriority, // Medium priority - nof_priorities - }; - - // We maintain a doubled linked list, with explicit count. - int _queue_length[nof_priorities]; - int _queue_counter; - VM_Operation* _queue [nof_priorities]; - - static VM_QueueHead _queue_head[nof_priorities]; - - // Double-linked non-empty list insert. - void insert(VM_Operation* q,VM_Operation* n); - void unlink(VM_Operation* q); - - // Basic queue manipulation - bool queue_empty (int prio); - void queue_add (int prio, VM_Operation *op); - VM_Operation* queue_remove_front(int prio); - // lock-free query: may return the wrong answer but must not break - bool queue_peek(int prio) { return _queue_length[prio] > 0; } - - public: - VMOperationQueue(); - - // Highlevel operations. Encapsulates policy - void add(VM_Operation *op); - VM_Operation* remove_next(); // Returns next or null - bool peek_at_safepoint_priority() { return queue_peek(SafepointPriority); } -}; - - // VM operation timeout handling: warn or abort the VM when VM operation takes // too long. Periodic tasks do not participate in safepoint protocol, and therefore // can fire when application threads are stopped. @@ -114,9 +67,12 @@ class VMThread: public NamedThread { static VMOperationTimeoutTask* _timeout_task; - static VM_Operation* no_op_safepoint(); + static bool handshake_alot(); + static void setup_periodic_safepoint_if_needed(); void evaluate_operation(VM_Operation* op); + void inner_execute(VM_Operation* op); + void wait_for_operation(); public: // Constructor @@ -143,8 +99,16 @@ class VMThread: public NamedThread { static void execute(VM_Operation* op); // Returns the current vm operation if any. - static VM_Operation* vm_operation() { return _cur_vm_operation; } - static VM_Operation::VMOp_Type vm_op_type() { return _cur_vm_operation->type(); } + static VM_Operation* vm_operation() { + assert(Thread::current()->is_VM_thread(), "Must be"); + return _cur_vm_operation; + } + + static VM_Operation::VMOp_Type vm_op_type() { + VM_Operation* op = vm_operation(); + assert(op != NULL, "sanity"); + return op->type(); + } // Returns the single instance of VMThread. static VMThread* vm_thread() { return _vm_thread; } @@ -152,7 +116,9 @@ class VMThread: public NamedThread { void verify(); // Performance measurement - static PerfCounter* perf_accumulated_vm_operation_time() { return _perf_accumulated_vm_operation_time; } + static PerfCounter* perf_accumulated_vm_operation_time() { + return _perf_accumulated_vm_operation_time; + } // Entry for starting vm thread virtual void run(); @@ -161,10 +127,14 @@ class VMThread: public NamedThread { static void create(); static void destroy(); + static void wait_until_executed(VM_Operation* op); + private: // VM_Operation support static VM_Operation* _cur_vm_operation; // Current VM operation - static VMOperationQueue* _vm_queue; // Queue (w/ policy) of VM operations + static VM_Operation* _next_vm_operation; // Next VM operation + + bool set_next_operation(VM_Operation *op); // Set the _next_vm_operation if possible. // Pointer to single-instance of VM thread static VMThread* _vm_thread; diff --git a/src/hotspot/share/services/heapDumper.cpp b/src/hotspot/share/services/heapDumper.cpp index 56b98e1ae7e..7e43772a9fc 100644 --- a/src/hotspot/share/services/heapDumper.cpp +++ b/src/hotspot/share/services/heapDumper.cpp @@ -1379,27 +1379,6 @@ void JNIGlobalsDumper::do_oop(oop* obj_p) { } }; - -// Support class used to generate HPROF_GC_ROOT_MONITOR_USED records - -class MonitorUsedDumper : public OopClosure { - private: - DumpWriter* _writer; - DumpWriter* writer() const { return _writer; } - public: - MonitorUsedDumper(DumpWriter* writer) { - _writer = writer; - } - void do_oop(oop* obj_p) { - u4 size = 1 + sizeof(address); - writer()->start_sub_record(HPROF_GC_ROOT_MONITOR_USED, size); - writer()->write_objectID(*obj_p); - writer()->end_sub_record(); - } - void do_oop(narrowOop* obj_p) { ShouldNotReachHere(); } -}; - - // Support class used to generate HPROF_GC_ROOT_STICKY_CLASS records class StickyClassDumper : public KlassClosure { @@ -1852,10 +1831,6 @@ void VM_HeapDumper::work(uint worker_id) { // HPROF_GC_ROOT_THREAD_OBJ + frames + jni locals do_threads(); - // HPROF_GC_ROOT_MONITOR_USED - MonitorUsedDumper mon_dumper(writer()); - ObjectSynchronizer::oops_do(&mon_dumper); - // HPROF_GC_ROOT_JNI_GLOBAL JNIGlobalsDumper jni_dumper(writer()); JNIHandles::oops_do(&jni_dumper); diff --git a/src/hotspot/share/services/mallocTracker.hpp b/src/hotspot/share/services/mallocTracker.hpp index bd3063e9407..acfaa3a880d 100644 --- a/src/hotspot/share/services/mallocTracker.hpp +++ b/src/hotspot/share/services/mallocTracker.hpp @@ -145,12 +145,6 @@ class MallocMemorySnapshot : public ResourceObj { return &_malloc[index]; } - inline MallocMemory* by_index(int index) { - assert(index >= 0, "Index out of bound"); - assert(index < mt_number_of_types, "Index out of bound"); - return &_malloc[index]; - } - inline MemoryCounter* malloc_overhead() { return &_tracking_header; } @@ -269,7 +263,7 @@ class MallocHeader { return; } - _flags = flags; + _flags = NMTUtil::flag_to_index(flags); set_size(size); if (level == NMT_detail) { size_t bucket_idx; diff --git a/src/hotspot/share/services/management.cpp b/src/hotspot/share/services/management.cpp index fa18c3093c4..92f086619d4 100644 --- a/src/hotspot/share/services/management.cpp +++ b/src/hotspot/share/services/management.cpp @@ -1408,7 +1408,7 @@ JVM_ENTRY(jobjectArray, jmm_GetVMGlobalNames(JNIEnv *env)) } // Exclude the locked (experimental, diagnostic) flags if (flag->is_unlocked() || flag->is_unlocker()) { - Handle s = java_lang_String::create_from_str(flag->_name, CHECK_NULL); + Handle s = java_lang_String::create_from_str(flag->name(), CHECK_NULL); flags_ah->obj_at_put(num_entries, s()); num_entries++; } @@ -1432,7 +1432,7 @@ JVM_END bool add_global_entry(Handle name, jmmVMGlobal *global, JVMFlag *flag, TRAPS) { Handle flag_name; if (name() == NULL) { - flag_name = java_lang_String::create_from_str(flag->_name, CHECK_false); + flag_name = java_lang_String::create_from_str(flag->name(), CHECK_false); } else { flag_name = name; } diff --git a/src/hotspot/share/services/memBaseline.cpp b/src/hotspot/share/services/memBaseline.cpp index 8fc191822d2..b390eaca4b8 100644 --- a/src/hotspot/share/services/memBaseline.cpp +++ b/src/hotspot/share/services/memBaseline.cpp @@ -64,7 +64,7 @@ int compare_malloc_site(const MallocSite& s1, const MallocSite& s2) { int compare_malloc_site_and_type(const MallocSite& s1, const MallocSite& s2) { int res = compare_malloc_site(s1, s2); if (res == 0) { - res = (int)(s1.flag() - s2.flag()); + res = (int)(NMTUtil::flag_to_index(s1.flag()) - NMTUtil::flag_to_index(s2.flag())); } return res; diff --git a/src/hotspot/share/services/memReporter.cpp b/src/hotspot/share/services/memReporter.cpp index 5bd5f7b0117..d0a8caa8ae8 100644 --- a/src/hotspot/share/services/memReporter.cpp +++ b/src/hotspot/share/services/memReporter.cpp @@ -261,7 +261,7 @@ void MemDetailReporter::report_malloc_sites() { stack->print_on(out); out->print("%29s", " "); MEMFLAGS flag = malloc_site->flag(); - assert((flag >= 0 && flag < (int)mt_number_of_types) && flag != mtNone, + assert(NMTUtil::flag_is_valid(flag) && flag != mtNone, "Must have a valid memory type"); print_malloc(malloc_site->size(), malloc_site->count(),flag); out->print_cr("\n"); diff --git a/src/hotspot/share/services/memoryPool.cpp b/src/hotspot/share/services/memoryPool.cpp index a60dcf6492e..e2159a12583 100644 --- a/src/hotspot/share/services/memoryPool.cpp +++ b/src/hotspot/share/services/memoryPool.cpp @@ -29,6 +29,7 @@ #include "memory/universe.hpp" #include "oops/oop.inline.hpp" #include "runtime/atomic.hpp" +#include "runtime/globals_extension.hpp" #include "runtime/handles.inline.hpp" #include "runtime/javaCalls.hpp" #include "services/lowMemoryDetector.hpp" diff --git a/src/hotspot/share/services/nmtCommon.hpp b/src/hotspot/share/services/nmtCommon.hpp index ea2f396fa8b..7d4f02f1217 100644 --- a/src/hotspot/share/services/nmtCommon.hpp +++ b/src/hotspot/share/services/nmtCommon.hpp @@ -47,11 +47,21 @@ const int NMT_TrackingStackDepth = 4; // A few common utilities for native memory tracking class NMTUtil : AllStatic { public: + // Check if index is a valid MEMFLAGS enum value (including mtNone) + static inline bool flag_index_is_valid(int index) { + return index >= 0 && index < mt_number_of_types; + } + + // Check if flag value is a valid MEMFLAGS enum value (including mtNone) + static inline bool flag_is_valid(MEMFLAGS flag) { + const int index = static_cast<int>(flag); + return flag_index_is_valid(index); + } + // Map memory type to index static inline int flag_to_index(MEMFLAGS flag) { - const int index = flag & 0xff; - assert(index >= 0 && index < (int)mt_number_of_types, "Index out of bounds"); - return index; + assert(flag_is_valid(flag), "Invalid flag"); + return static_cast<int>(flag); } // Map memory type to human readable name @@ -61,8 +71,8 @@ class NMTUtil : AllStatic { // Map an index to memory type static MEMFLAGS index_to_flag(int index) { - assert(index >= 0 && index < (int) mt_number_of_types, "Index out of bounds"); - return (MEMFLAGS)index; + assert(flag_index_is_valid(index), "Invalid flag"); + return static_cast<MEMFLAGS>(index); } // Memory size scale diff --git a/src/hotspot/share/services/virtualMemoryTracker.cpp b/src/hotspot/share/services/virtualMemoryTracker.cpp index 9b65f9e0b5b..4a3098f56ca 100644 --- a/src/hotspot/share/services/virtualMemoryTracker.cpp +++ b/src/hotspot/share/services/virtualMemoryTracker.cpp @@ -347,7 +347,11 @@ bool VirtualMemoryTracker::add_reserved_region(address base_addr, size_t size, VirtualMemorySummary::record_reserved_memory(size, flag); return _reserved_regions->add(rgn) != NULL; } else { - if (reserved_rgn->same_region(base_addr, size)) { + // Deal with recursive reservation + // os::reserve_memory() -> pd_reserve_memory() -> os::reserve_memory() + // See JDK-8198226. + if (reserved_rgn->same_region(base_addr, size) && + (reserved_rgn->flag() == flag || reserved_rgn->flag() == mtNone)) { reserved_rgn->set_call_stack(stack); reserved_rgn->set_flag(flag); return true; diff --git a/src/hotspot/share/services/virtualMemoryTracker.hpp b/src/hotspot/share/services/virtualMemoryTracker.hpp index f6eaf15ba72..a81a99a60ae 100644 --- a/src/hotspot/share/services/virtualMemoryTracker.hpp +++ b/src/hotspot/share/services/virtualMemoryTracker.hpp @@ -97,12 +97,6 @@ class VirtualMemorySnapshot : public ResourceObj { return &_virtual_memory[index]; } - inline VirtualMemory* by_index(int index) { - assert(index >= 0, "Index out of bound"); - assert(index < mt_number_of_types, "Index out of bound"); - return &_virtual_memory[index]; - } - inline size_t total_reserved() const { size_t amount = 0; for (int index = 0; index < mt_number_of_types; index ++) { diff --git a/src/hotspot/share/services/writeableFlags.cpp b/src/hotspot/share/services/writeableFlags.cpp index 84aa9edc578..e9d0e929ab5 100644 --- a/src/hotspot/share/services/writeableFlags.cpp +++ b/src/hotspot/share/services/writeableFlags.cpp @@ -27,7 +27,8 @@ #include "memory/allocation.inline.hpp" #include "runtime/arguments.hpp" #include "runtime/flags/jvmFlag.hpp" -#include "runtime/flags/jvmFlagRangeList.hpp" +#include "runtime/flags/jvmFlagAccess.hpp" +#include "runtime/flags/jvmFlagLimit.hpp" #include "runtime/java.hpp" #include "runtime/jniHandles.hpp" #include "services/writeableFlags.hpp" @@ -39,12 +40,11 @@ static void buffer_concat(char* buffer, const char* src) { } static void print_flag_error_message_bounds(const JVMFlag* flag, char* buffer) { - JVMFlagRangeChecker range = JVMFlagRangeList::find(flag); - if (range.exists()) { + if (JVMFlagLimit::get_range(flag) != NULL) { buffer_concat(buffer, "must have value in range "); stringStream stream; - range.print(&stream); + JVMFlagAccess::print_range(&stream, flag); const char* range_string = stream.as_string(); size_t j = strlen(buffer); for (size_t i=0; j<TEMP_BUF_SIZE-1; i++) { @@ -64,7 +64,7 @@ static void print_flag_error_message_if_needed(JVMFlag::Error error, const JVMFl return; } - const char* name = flag->_name; + const char* name = flag->name(); char buffer[TEMP_BUF_SIZE] = {'\0'}; if ((error != JVMFlag::MISSING_NAME) && (name != NULL)) { buffer_concat(buffer, name); @@ -109,7 +109,7 @@ JVMFlag::Error WriteableFlags::set_bool_flag(const char* name, const char* arg, JVMFlag::Error WriteableFlags::set_bool_flag(const char* name, bool value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) { JVMFlag* flag = JVMFlag::find_flag(name); - JVMFlag::Error err = JVMFlag::boolAtPut(flag, &value, origin); + JVMFlag::Error err = JVMFlagAccess::boolAtPut(flag, &value, origin); print_flag_error_message_if_needed(err, flag, err_msg); return err; } @@ -127,7 +127,7 @@ JVMFlag::Error WriteableFlags::set_int_flag(const char* name, const char* arg, J JVMFlag::Error WriteableFlags::set_int_flag(const char* name, int value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) { JVMFlag* flag = JVMFlag::find_flag(name); - JVMFlag::Error err = JVMFlag::intAtPut(flag, &value, origin); + JVMFlag::Error err = JVMFlagAccess::intAtPut(flag, &value, origin); print_flag_error_message_if_needed(err, flag, err_msg); return err; } @@ -145,7 +145,7 @@ JVMFlag::Error WriteableFlags::set_uint_flag(const char* name, const char* arg, JVMFlag::Error WriteableFlags::set_uint_flag(const char* name, uint value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) { JVMFlag* flag = JVMFlag::find_flag(name); - JVMFlag::Error err = JVMFlag::uintAtPut(flag, &value, origin); + JVMFlag::Error err = JVMFlagAccess::uintAtPut(flag, &value, origin); print_flag_error_message_if_needed(err, flag, err_msg); return err; } @@ -163,7 +163,7 @@ JVMFlag::Error WriteableFlags::set_intx_flag(const char* name, const char* arg, JVMFlag::Error WriteableFlags::set_intx_flag(const char* name, intx value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) { JVMFlag* flag = JVMFlag::find_flag(name); - JVMFlag::Error err = JVMFlag::intxAtPut(flag, &value, origin); + JVMFlag::Error err = JVMFlagAccess::intxAtPut(flag, &value, origin); print_flag_error_message_if_needed(err, flag, err_msg); return err; } @@ -181,7 +181,7 @@ JVMFlag::Error WriteableFlags::set_uintx_flag(const char* name, const char* arg, JVMFlag::Error WriteableFlags::set_uintx_flag(const char* name, uintx value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) { JVMFlag* flag = JVMFlag::find_flag(name); - JVMFlag::Error err = JVMFlag::uintxAtPut(flag, &value, origin); + JVMFlag::Error err = JVMFlagAccess::uintxAtPut(flag, &value, origin); print_flag_error_message_if_needed(err, flag, err_msg); return err; } @@ -199,7 +199,7 @@ JVMFlag::Error WriteableFlags::set_uint64_t_flag(const char* name, const char* a JVMFlag::Error WriteableFlags::set_uint64_t_flag(const char* name, uint64_t value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) { JVMFlag* flag = JVMFlag::find_flag(name); - JVMFlag::Error err = JVMFlag::uint64_tAtPut(flag, &value, origin); + JVMFlag::Error err = JVMFlagAccess::uint64_tAtPut(flag, &value, origin); print_flag_error_message_if_needed(err, flag, err_msg); return err; } @@ -217,7 +217,7 @@ JVMFlag::Error WriteableFlags::set_size_t_flag(const char* name, const char* arg JVMFlag::Error WriteableFlags::set_size_t_flag(const char* name, size_t value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) { JVMFlag* flag = JVMFlag::find_flag(name); - JVMFlag::Error err = JVMFlag::size_tAtPut(flag, &value, origin); + JVMFlag::Error err = JVMFlagAccess::size_tAtPut(flag, &value, origin); print_flag_error_message_if_needed(err, flag, err_msg); return err; } @@ -235,7 +235,7 @@ JVMFlag::Error WriteableFlags::set_double_flag(const char* name, const char* arg JVMFlag::Error WriteableFlags::set_double_flag(const char* name, double value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) { JVMFlag* flag = JVMFlag::find_flag(name); - JVMFlag::Error err = JVMFlag::doubleAtPut(flag, &value, origin); + JVMFlag::Error err = JVMFlagAccess::doubleAtPut(flag, &value, origin); print_flag_error_message_if_needed(err, flag, err_msg); return err; } @@ -243,7 +243,7 @@ JVMFlag::Error WriteableFlags::set_double_flag(const char* name, double value, J // set a string global flag using value from AttachOperation JVMFlag::Error WriteableFlags::set_ccstr_flag(const char* name, const char* value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) { JVMFlag* flag = JVMFlag::find_flag(name); - JVMFlag::Error err = JVMFlag::ccstrAtPut(flag, &value, origin); + JVMFlag::Error err = JVMFlagAccess::ccstrAtPut(flag, &value, origin); print_flag_error_message_if_needed(err, flag, err_msg); return err; } @@ -300,23 +300,23 @@ JVMFlag::Error WriteableFlags::set_flag_from_char(JVMFlag* f, const void* value, return JVMFlag::MISSING_VALUE; } if (f->is_bool()) { - return set_bool_flag(f->_name, flag_value, origin, err_msg); + return set_bool_flag(f->name(), flag_value, origin, err_msg); } else if (f->is_int()) { - return set_int_flag(f->_name, flag_value, origin, err_msg); + return set_int_flag(f->name(), flag_value, origin, err_msg); } else if (f->is_uint()) { - return set_uint_flag(f->_name, flag_value, origin, err_msg); + return set_uint_flag(f->name(), flag_value, origin, err_msg); } else if (f->is_intx()) { - return set_intx_flag(f->_name, flag_value, origin, err_msg); + return set_intx_flag(f->name(), flag_value, origin, err_msg); } else if (f->is_uintx()) { - return set_uintx_flag(f->_name, flag_value, origin, err_msg); + return set_uintx_flag(f->name(), flag_value, origin, err_msg); } else if (f->is_uint64_t()) { - return set_uint64_t_flag(f->_name, flag_value, origin, err_msg); + return set_uint64_t_flag(f->name(), flag_value, origin, err_msg); } else if (f->is_size_t()) { - return set_size_t_flag(f->_name, flag_value, origin, err_msg); + return set_size_t_flag(f->name(), flag_value, origin, err_msg); } else if (f->is_double()) { - return set_double_flag(f->_name, flag_value, origin, err_msg); + return set_double_flag(f->name(), flag_value, origin, err_msg); } else if (f->is_ccstr()) { - return set_ccstr_flag(f->_name, flag_value, origin, err_msg); + return set_ccstr_flag(f->name(), flag_value, origin, err_msg); } else { ShouldNotReachHere(); } @@ -329,28 +329,28 @@ JVMFlag::Error WriteableFlags::set_flag_from_jvalue(JVMFlag* f, const void* valu jvalue new_value = *(jvalue*)value; if (f->is_bool()) { bool bvalue = (new_value.z == JNI_TRUE ? true : false); - return set_bool_flag(f->_name, bvalue, origin, err_msg); + return set_bool_flag(f->name(), bvalue, origin, err_msg); } else if (f->is_int()) { int ivalue = (int)new_value.j; - return set_int_flag(f->_name, ivalue, origin, err_msg); + return set_int_flag(f->name(), ivalue, origin, err_msg); } else if (f->is_uint()) { uint uvalue = (uint)new_value.j; - return set_uint_flag(f->_name, uvalue, origin, err_msg); + return set_uint_flag(f->name(), uvalue, origin, err_msg); } else if (f->is_intx()) { intx ivalue = (intx)new_value.j; - return set_intx_flag(f->_name, ivalue, origin, err_msg); + return set_intx_flag(f->name(), ivalue, origin, err_msg); } else if (f->is_uintx()) { uintx uvalue = (uintx)new_value.j; - return set_uintx_flag(f->_name, uvalue, origin, err_msg); + return set_uintx_flag(f->name(), uvalue, origin, err_msg); } else if (f->is_uint64_t()) { uint64_t uvalue = (uint64_t)new_value.j; - return set_uint64_t_flag(f->_name, uvalue, origin, err_msg); + return set_uint64_t_flag(f->name(), uvalue, origin, err_msg); } else if (f->is_size_t()) { size_t svalue = (size_t)new_value.j; - return set_size_t_flag(f->_name, svalue, origin, err_msg); + return set_size_t_flag(f->name(), svalue, origin, err_msg); } else if (f->is_double()) { double dvalue = (double)new_value.d; - return set_double_flag(f->_name, dvalue, origin, err_msg); + return set_double_flag(f->name(), dvalue, origin, err_msg); } else if (f->is_ccstr()) { oop str = JNIHandles::resolve_external_guard(new_value.l); if (str == NULL) { @@ -358,7 +358,7 @@ JVMFlag::Error WriteableFlags::set_flag_from_jvalue(JVMFlag* f, const void* valu return JVMFlag::MISSING_VALUE; } ccstr svalue = java_lang_String::as_utf8_string(str); - JVMFlag::Error ret = WriteableFlags::set_ccstr_flag(f->_name, svalue, origin, err_msg); + JVMFlag::Error ret = WriteableFlags::set_ccstr_flag(f->name(), svalue, origin, err_msg); if (ret != JVMFlag::SUCCESS) { FREE_C_HEAP_ARRAY(char, svalue); } diff --git a/src/hotspot/share/utilities/breakpoint.hpp b/src/hotspot/share/utilities/breakpoint.hpp index f6f0fb2f301..784e0a90558 100644 --- a/src/hotspot/share/utilities/breakpoint.hpp +++ b/src/hotspot/share/utilities/breakpoint.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -25,17 +25,6 @@ #ifndef SHARE_UTILITIES_BREAKPOINT_HPP #define SHARE_UTILITIES_BREAKPOINT_HPP -// Provide BREAKPOINT macro for requesting stop in the debugger. - -// We presently only have one non-default definition, so it's not -// worth going through the COMPILER_HEADER() dispatch, with all -// non-visCPP files being empty. -#ifdef TARGET_COMPILER_visCPP -#ifndef _WIN64 -#define BREAKPOINT __asm { int 3 } -#endif // _WIN64 -#endif // TARGET_COMPILER_visCPP - // If no more specific definition provided, default to calling a // function that is defined per-platform. See also os::breakpoint(). #ifndef BREAKPOINT diff --git a/src/hotspot/share/utilities/debug.cpp b/src/hotspot/share/utilities/debug.cpp index 11c63fc2e74..a2f4a4ea38f 100644 --- a/src/hotspot/share/utilities/debug.cpp +++ b/src/hotspot/share/utilities/debug.cpp @@ -71,6 +71,9 @@ static intx g_asserting_thread = 0; static void* g_assertion_context = NULL; #endif // CAN_SHOW_REGISTERS_ON_ASSERT +// Set to suppress secondary error reporting. +bool Debugging = false; + #ifndef ASSERT # ifdef _DEBUG // NOTE: don't turn the lines below into a comment -- if you're getting @@ -367,9 +370,9 @@ class Command : public StackObj { } ~Command() { - tty->flush(); - Debugging = debug_save; - level--; + tty->flush(); + Debugging = debug_save; + level--; } }; diff --git a/src/hotspot/share/utilities/debug.hpp b/src/hotspot/share/utilities/debug.hpp index 6b5b0f63429..cd44aea2781 100644 --- a/src/hotspot/share/utilities/debug.hpp +++ b/src/hotspot/share/utilities/debug.hpp @@ -152,6 +152,10 @@ enum VMErrorType { OOM_MMAP_ERROR = 0xe0000002 }; +// Set to suppress secondary error reporting. +// Really should have a qualified name or something. +extern bool Debugging; + // error reporting helper functions void report_vm_error(const char* file, int line, const char* error_msg); void report_vm_error(const char* file, int line, const char* error_msg, diff --git a/src/hotspot/share/utilities/exceptions.cpp b/src/hotspot/share/utilities/exceptions.cpp index 818ce12af22..0fd035a7619 100644 --- a/src/hotspot/share/utilities/exceptions.cpp +++ b/src/hotspot/share/utilities/exceptions.cpp @@ -69,6 +69,16 @@ void ThreadShadow::clear_pending_exception() { _exception_file = NULL; _exception_line = 0; } + +void ThreadShadow::clear_pending_nonasync_exception() { + // Do not clear probable async exceptions. + if (!_pending_exception->is_a(SystemDictionary::ThreadDeath_klass()) && + (_pending_exception->klass() != SystemDictionary::InternalError_klass() || + java_lang_InternalError::during_unsafe_access(_pending_exception) != JNI_TRUE)) { + clear_pending_exception(); + } +} + // Implementation of Exceptions bool Exceptions::special_exception(Thread* thread, const char* file, int line, Handle h_exception) { @@ -240,6 +250,12 @@ void Exceptions::throw_stack_overflow_exception(Thread* THREAD, const char* file _throw(THREAD, file, line, exception); } +void Exceptions::throw_unsafe_access_internal_error(Thread* thread, const char* file, int line, const char* message) { + Handle h_exception = new_exception(thread, vmSymbols::java_lang_InternalError(), message); + java_lang_InternalError::set_during_unsafe_access(h_exception()); + _throw(thread, file, line, h_exception, message); +} + void Exceptions::fthrow(Thread* thread, const char* file, int line, Symbol* h_name, const char* format, ...) { const int max_msg_size = 1024; va_list ap; diff --git a/src/hotspot/share/utilities/exceptions.hpp b/src/hotspot/share/utilities/exceptions.hpp index 5c639bf116e..cf468e2472f 100644 --- a/src/hotspot/share/utilities/exceptions.hpp +++ b/src/hotspot/share/utilities/exceptions.hpp @@ -91,6 +91,9 @@ class ThreadShadow: public CHeapObj<mtThread> { // use CLEAR_PENDING_EXCEPTION whenever possible! void clear_pending_exception(); + // use CLEAR_PENDING_NONASYNC_EXCEPTION to clear probable nonasync exception. + void clear_pending_nonasync_exception(); + ThreadShadow() : _pending_exception(NULL), _exception_file(NULL), _exception_line(0) {} }; @@ -170,6 +173,8 @@ class Exceptions { static void throw_stack_overflow_exception(Thread* thread, const char* file, int line, const methodHandle& method); + static void throw_unsafe_access_internal_error(Thread* thread, const char* file, int line, const char* message); + static void wrap_dynamic_exception(bool is_indy, Thread* thread); // Exception counting for error files of interesting exceptions that may have @@ -226,6 +231,7 @@ class Exceptions { #define CHECK_false CHECK_(false) #define CHECK_JNI_ERR CHECK_(JNI_ERR) +// CAUTION: These macros clears all exceptions including async exceptions, use it with caution. #define CHECK_AND_CLEAR THREAD); if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; return; } (void)(0 #define CHECK_AND_CLEAR_(result) THREAD); if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; return result; } (void)(0 #define CHECK_AND_CLEAR_0 CHECK_AND_CLEAR_(0) @@ -233,6 +239,16 @@ class Exceptions { #define CHECK_AND_CLEAR_NULL CHECK_AND_CLEAR_(NULL) #define CHECK_AND_CLEAR_false CHECK_AND_CLEAR_(false) +// CAUTION: These macros clears all exceptions except probable async exceptions j.l.InternalError and j.l.ThreadDeath. +// So use it with caution. +#define CLEAR_PENDING_NONASYNC_EXCEPTION (((ThreadShadow*)THREAD)->clear_pending_nonasync_exception()) +#define CHECK_AND_CLEAR_NONASYNC THREAD); if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_NONASYNC_EXCEPTION; return; } (void)(0 +#define CHECK_AND_CLEAR_NONASYNC_(result) THREAD); if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_NONASYNC_EXCEPTION; return result; } (void)(0 +#define CHECK_AND_CLEAR_NONASYNC_0 CHECK_AND_CLEAR_NONASYNC_(0) +#define CHECK_AND_CLEAR_NONASYNC_NH CHECK_AND_CLEAR_NONASYNC_(Handle()) +#define CHECK_AND_CLEAR_NONASYNC_NULL CHECK_AND_CLEAR_NONASYNC_(NULL) +#define CHECK_AND_CLEAR_NONASYNC_false CHECK_AND_CLEAR_NONASYNC_(false) + // The THROW... macros should be used to throw an exception. They require a THREAD variable to be // visible within the scope containing the THROW. Usually this is achieved by declaring the function // with a TRAPS argument. diff --git a/src/hotspot/share/utilities/filterQueue.hpp b/src/hotspot/share/utilities/filterQueue.hpp new file mode 100644 index 00000000000..8567b351246 --- /dev/null +++ b/src/hotspot/share/utilities/filterQueue.hpp @@ -0,0 +1,86 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_UTILITIES_FILTERQUEUE_HPP +#define SHARE_UTILITIES_FILTERQUEUE_HPP + +#include "memory/allocation.hpp" +#include "runtime/atomic.hpp" + +// The FilterQueue is FIFO with the ability to skip over queued items. +// The skipping is controlled by using a filter when popping. +// It also supports lock free pushes, while popping (including contains()) +// needs to be externally serialized. +template <class E> +class FilterQueue { + private: + class Node : public CHeapObj<mtInternal> { + public: + Node(const E& e): _next(NULL), _data(e) { } + Node* _next; + E _data; + }; + + Node* _first; + Node* load_first() { + return Atomic::load_acquire(&_first); + } + + static bool match_all(E d) { return true; } + + public: + FilterQueue() : _first(NULL) { } + + bool is_empty() { + return load_first() == NULL; + } + + // Adds an item to the queue in a MT safe way, re-entrant. + void push(E data); + + // Applies the match_func to the items in the queue until match_func returns + // true and then returns true, or there is no more items and then returns + // false. Items pushed after execution starts will not have match_func + // applied. The method is not re-entrant and must be executed mutually + // exclusive to other contains and pops calls. + template <typename MATCH_FUNC> + bool contains(MATCH_FUNC& match_func); + + // Same as pop(MATCH_FUNC& match_func) but matches everything, thus returning + // the first inserted item. + E pop() { + return pop(match_all); + } + + // Applies the match_func to each item in the queue and returns the first + // inserted item for which match_func returns true. Returns false if there are + // no matches or the queue is empty. Any pushed item before execution is + // complete may or may not have match_func applied. The method is not + // re-entrant and must be executed mutual exclusive to other contains and pops + // calls. + template <typename MATCH_FUNC> + E pop(MATCH_FUNC& match_func); +}; + +#endif diff --git a/src/hotspot/share/utilities/filterQueue.inline.hpp b/src/hotspot/share/utilities/filterQueue.inline.hpp new file mode 100644 index 00000000000..f0f68b511dc --- /dev/null +++ b/src/hotspot/share/utilities/filterQueue.inline.hpp @@ -0,0 +1,114 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_UTILITIES_FILTERQUEUE_INLINE_HPP +#define SHARE_UTILITIES_FILTERQUEUE_INLINE_HPP + +#include "utilities/filterQueue.hpp" +#include "utilities/spinYield.hpp" + +template <class E> +void FilterQueue<E>::push(E data) { + Node* head; + Node* insnode = new Node(data); + SpinYield yield(SpinYield::default_spin_limit * 10); // Very unlikely with multiple failed CAS. + while (true){ + head = load_first(); + insnode->_next = head; + if (Atomic::cmpxchg(&_first, head, insnode) == head) { + break; + } + yield.wait(); + } +} + +// MT-Unsafe, external serialization needed. +template <class E> +template <typename MATCH_FUNC> +bool FilterQueue<E>::contains(MATCH_FUNC& match_func) { + Node* cur = load_first(); + if (cur == NULL) { + return false; + } + do { + if (match_func(cur->_data)) { + return true; + } + cur = cur->_next; + } while (cur != NULL); + return false; +} + +// MT-Unsafe, external serialization needed. +template <class E> +template <typename MATCH_FUNC> +E FilterQueue<E>::pop(MATCH_FUNC& match_func) { + Node* first = load_first(); + Node* cur = first; + Node* prev = NULL; + Node* match = NULL; + Node* match_prev = NULL; + + if (cur == NULL) { + return (E)NULL; + } + SpinYield yield(SpinYield::default_spin_limit * 10); // Very unlikely with multiple failed CAS. + do { + do { + if (match_func(cur->_data)) { + match = cur; + match_prev = prev; + } + prev = cur; + cur = cur->_next; + } while (cur != NULL); + + if (match == NULL) { + return (E)NULL; + } + + if (match_prev == NULL) { + // Working on first + if (Atomic::cmpxchg(&_first, match, match->_next) == match) { + E ret = match->_data; + delete match; + return ret; + } + yield.wait(); + // Failed, we need to restart to know the Node prior to the match. + first = load_first(); + cur = first; + prev = NULL; + match = NULL; + match_prev = NULL; + } else { + match_prev->_next = match->_next; + E ret = match->_data; + delete match; + return ret; + } + } while (true); +} + +#endif // SHARE_UTILITIES_FILTERQUEUE_INLINE_HPP diff --git a/src/hotspot/share/utilities/globalDefinitions_visCPP.hpp b/src/hotspot/share/utilities/globalDefinitions_visCPP.hpp index a929b989f2d..0cf4ae5c721 100644 --- a/src/hotspot/share/utilities/globalDefinitions_visCPP.hpp +++ b/src/hotspot/share/utilities/globalDefinitions_visCPP.hpp @@ -136,4 +136,8 @@ inline int g_isfinite(jdouble f) { return _finite(f); } // Alignment #define ATTRIBUTE_ALIGNED(x) __declspec(align(x)) +#ifdef _M_ARM64 +#define USE_VECTORED_EXCEPTION_HANDLING +#endif + #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_VISCPP_HPP diff --git a/src/hotspot/share/utilities/growableArray.hpp b/src/hotspot/share/utilities/growableArray.hpp index 6616d7e134f..f301935717a 100644 --- a/src/hotspot/share/utilities/growableArray.hpp +++ b/src/hotspot/share/utilities/growableArray.hpp @@ -298,8 +298,8 @@ class GrowableArrayView : public GrowableArrayBase { } void print() { - tty->print("Growable Array " INTPTR_FORMAT, this); - tty->print(": length %ld (_max %ld) { ", _len, _max); + tty->print("Growable Array " INTPTR_FORMAT, p2i(this)); + tty->print(": length %d (_max %d) { ", _len, _max); for (int i = 0; i < _len; i++) { tty->print(INTPTR_FORMAT " ", *(intptr_t*)&(_data[i])); } diff --git a/src/hotspot/share/utilities/hashtable.cpp b/src/hotspot/share/utilities/hashtable.cpp index 4ce5b306edb..a38057d9bf0 100644 --- a/src/hotspot/share/utilities/hashtable.cpp +++ b/src/hotspot/share/utilities/hashtable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -95,6 +95,10 @@ template <class T, MEMFLAGS F> HashtableEntry<T, F>* Hashtable<T, F>::new_entry( template <class T, MEMFLAGS F> HashtableEntry<T, F>* Hashtable<T, F>::allocate_new_entry(unsigned int hashValue, T obj) { HashtableEntry<T, F>* entry = (HashtableEntry<T, F>*) NEW_C_HEAP_ARRAY(char, this->entry_size(), F); + if (DumpSharedSpaces) { + // Avoid random bits in structure padding so we can have deterministic content in CDS archive + memset((void*)entry, 0, this->entry_size()); + } entry->set_hash(hashValue); entry->set_literal(obj); entry->set_next(NULL); diff --git a/src/hotspot/share/utilities/powerOfTwo.hpp b/src/hotspot/share/utilities/powerOfTwo.hpp index ec234af2547..d55c51bb557 100644 --- a/src/hotspot/share/utilities/powerOfTwo.hpp +++ b/src/hotspot/share/utilities/powerOfTwo.hpp @@ -34,6 +34,12 @@ // Power of two convenience library. +template <typename T, ENABLE_IF(std::is_integral<T>::value)> +constexpr T max_power_of_2() { + T max_val = std::numeric_limits<T>::max(); + return max_val - (max_val >> 1); +} + // Returns true iff there exists integer i such that (T(1) << i) == x. template <typename T, ENABLE_IF(std::is_integral<T>::value)> constexpr bool is_power_of_2(T x) { @@ -81,8 +87,7 @@ inline T round_down_power_of_2(T value) { template<typename T, ENABLE_IF(std::is_integral<T>::value)> inline T round_up_power_of_2(T value) { assert(value > 0, "Invalid value"); - const T max_value = std::numeric_limits<T>::max(); - assert(value <= (max_value - (max_value >> 1)), "Overflow"); + assert(value <= max_power_of_2<T>(), "Overflow"); if (is_power_of_2(value)) { return value; } diff --git a/src/hotspot/share/utilities/sizes.hpp b/src/hotspot/share/utilities/sizes.hpp index 0944c8280b2..97e28cd6082 100644 --- a/src/hotspot/share/utilities/sizes.hpp +++ b/src/hotspot/share/utilities/sizes.hpp @@ -32,22 +32,6 @@ // WordSize is used for sizes measured in machine words (i.e., 32bit or 64bit words // depending on platform). // -// The classes are defined with friend functions operating on them instead of member -// functions so that they (the classes) can be re-#define'd to int types in optimized -// mode. This allows full type checking and maximum safety in debug mode, and full -// optimizations (constant folding) and zero overhead (time and space wise) in the -// optimized build (some compilers do not optimize one-element value classes but -// instead create an object in memory - thus the overhead may be significant). -// -// Note: 1) DO NOT add new overloaded friend functions that do not have a unique function -// function name but require signature types for resolution. This will not work -// in optimized mode as both, ByteSize and WordSize are mapped to the same type -// and thus the distinction would not be possible anymore (=> compiler errors). -// -// 2) DO NOT add non-static member functions as they cannot be mapped so something -// compilable in the optimized build. Static member functions could be added -// but require a corresponding class definition in the optimized build. -// // These classes should help doing a transition from (currently) word-size based offsets // to byte-size based offsets in the VM (this will be important if we desire to pack // objects more densely in the VM for 64bit machines). Such a transition should proceed @@ -56,93 +40,19 @@ // a) first transition the whole VM into a form where all sizes are strongly typed // b) change all WordSize's to ByteSize's where desired and fix the compilation errors +enum class WordSize : int {}; -#ifdef ASSERT - -class ByteSize { - private: - int _size; - - // Note: This constructor must be private to avoid implicit conversions! - ByteSize(int size) { _size = size; } - - public: - // constructors - inline friend ByteSize in_ByteSize(int size); - - // accessors - inline friend int in_bytes(ByteSize x); - - // operators - friend ByteSize operator + (ByteSize x, ByteSize y) { return ByteSize(in_bytes(x) + in_bytes(y)); } - friend ByteSize operator - (ByteSize x, ByteSize y) { return ByteSize(in_bytes(x) - in_bytes(y)); } - friend ByteSize operator * (ByteSize x, int y) { return ByteSize(in_bytes(x) * y ); } - - // comparison - friend bool operator == (ByteSize x, ByteSize y) { return in_bytes(x) == in_bytes(y); } - friend bool operator != (ByteSize x, ByteSize y) { return in_bytes(x) != in_bytes(y); } - friend bool operator < (ByteSize x, ByteSize y) { return in_bytes(x) < in_bytes(y); } - friend bool operator <= (ByteSize x, ByteSize y) { return in_bytes(x) <= in_bytes(y); } - friend bool operator > (ByteSize x, ByteSize y) { return in_bytes(x) > in_bytes(y); } - friend bool operator >= (ByteSize x, ByteSize y) { return in_bytes(x) >= in_bytes(y); } -}; - -inline ByteSize in_ByteSize(int size) { return ByteSize(size); } -inline int in_bytes(ByteSize x) { return x._size; } - - -class WordSize { - private: - int _size; - - // Note: This constructor must be private to avoid implicit conversions! - WordSize(int size) { _size = size; } - - public: - // constructors - inline friend WordSize in_WordSize(int size); - - // accessors - inline friend int in_words(WordSize x); - - // operators - friend WordSize operator + (WordSize x, WordSize y) { return WordSize(in_words(x) + in_words(y)); } - friend WordSize operator - (WordSize x, WordSize y) { return WordSize(in_words(x) - in_words(y)); } - friend WordSize operator * (WordSize x, int y) { return WordSize(in_words(x) * y ); } - - // comparison - friend bool operator == (WordSize x, WordSize y) { return in_words(x) == in_words(y); } - friend bool operator != (WordSize x, WordSize y) { return in_words(x) != in_words(y); } - friend bool operator < (WordSize x, WordSize y) { return in_words(x) < in_words(y); } - friend bool operator <= (WordSize x, WordSize y) { return in_words(x) <= in_words(y); } - friend bool operator > (WordSize x, WordSize y) { return in_words(x) > in_words(y); } - friend bool operator >= (WordSize x, WordSize y) { return in_words(x) >= in_words(y); } -}; - -inline WordSize in_WordSize(int size) { return WordSize(size); } -inline int in_words(WordSize x) { return x._size; } - - -#else // ASSERT - -// The following definitions must match the corresponding friend declarations -// in the Byte/WordSize classes if they are typedef'ed to be int. This will -// be the case in optimized mode to ensure zero overhead for these types. -// -// Note: If a compiler does not inline these function calls away, one may -// want to use #define's to make sure full optimization (constant -// folding in particular) is possible. - -typedef int ByteSize; -inline ByteSize in_ByteSize(int size) { return size; } -inline int in_bytes (ByteSize x) { return x; } +constexpr WordSize in_WordSize(int size) { return static_cast<WordSize>(size); } +constexpr int in_words(WordSize x) { return static_cast<int>(x); } -typedef int WordSize; -inline WordSize in_WordSize(int size) { return size; } -inline int in_words (WordSize x) { return x; } +enum class ByteSize : int {}; -#endif // ASSERT +constexpr ByteSize in_ByteSize(int size) { return static_cast<ByteSize>(size); } +constexpr int in_bytes(ByteSize x) { return static_cast<int>(x); } +constexpr ByteSize operator + (ByteSize x, ByteSize y) { return in_ByteSize(in_bytes(x) + in_bytes(y)); } +constexpr ByteSize operator - (ByteSize x, ByteSize y) { return in_ByteSize(in_bytes(x) - in_bytes(y)); } +constexpr ByteSize operator * (ByteSize x, int y) { return in_ByteSize(in_bytes(x) * y ); } // Use the following #define to get C++ field member offsets diff --git a/src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1MemorySubSystemController.java b/src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1MemorySubSystemController.java index 6153d64efae..415ae930a93 100644 --- a/src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1MemorySubSystemController.java +++ b/src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1MemorySubSystemController.java @@ -28,6 +28,7 @@ public class CgroupV1MemorySubSystemController extends CgroupV1SubsystemController { private boolean hierarchical; + private boolean swapenabled; public CgroupV1MemorySubSystemController(String root, String mountPoint) { super(root, mountPoint); @@ -41,4 +42,11 @@ void setHierarchical(boolean hierarchical) { this.hierarchical = hierarchical; } -} \ No newline at end of file + boolean isSwapEnabled() { + return swapenabled; + } + + void setSwapEnabled(boolean swapenabled) { + this.swapenabled = swapenabled; + } +} diff --git a/src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1Subsystem.java b/src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1Subsystem.java index fd1867d5cf2..e1455e2799d 100644 --- a/src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1Subsystem.java +++ b/src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1Subsystem.java @@ -199,6 +199,8 @@ private static void setSubSystemControllerPath(CgroupV1Subsystem subsystem, Stri CgroupV1MemorySubSystemController memorySubSystem = (CgroupV1MemorySubSystemController)controller; boolean isHierarchial = getHierarchical(memorySubSystem); memorySubSystem.setHierarchical(isHierarchial); + boolean isSwapEnabled = getSwapEnabled(memorySubSystem); + memorySubSystem.setSwapEnabled(isSwapEnabled); } subsystem.setActiveSubSystems(); } @@ -208,6 +210,12 @@ private static void setSubSystemControllerPath(CgroupV1Subsystem subsystem, Stri } + private static boolean getSwapEnabled(CgroupV1MemorySubSystemController controller) { + long retval = getLongValue(controller, "memory.memsw.limit_in_bytes"); + return retval > 0; + } + + private static boolean getHierarchical(CgroupV1MemorySubSystemController controller) { long hierarchical = getLongValue(controller, "memory.use_hierarchy"); return hierarchical > 0; @@ -438,10 +446,16 @@ public long getTcpMemoryUsage() { } public long getMemoryAndSwapFailCount() { + if (!memory.isSwapEnabled()) { + return getMemoryFailCount(); + } return getLongValue(memory, "memory.memsw.failcnt"); } public long getMemoryAndSwapLimit() { + if (!memory.isSwapEnabled()) { + return getMemoryLimit(); + } long retval = getLongValue(memory, "memory.memsw.limit_in_bytes"); if (retval > CgroupV1SubsystemController.UNLIMITED_MIN) { if (memory.isHierarchical()) { @@ -457,10 +471,16 @@ public long getMemoryAndSwapLimit() { } public long getMemoryAndSwapMaxUsage() { + if (!memory.isSwapEnabled()) { + return getMemoryMaxUsage(); + } return getLongValue(memory, "memory.memsw.max_usage_in_bytes"); } public long getMemoryAndSwapUsage() { + if (!memory.isSwapEnabled()) { + return getMemoryUsage(); + } return getLongValue(memory, "memory.memsw.usage_in_bytes"); } diff --git a/src/java.base/linux/classes/jdk/internal/platform/cgroupv2/CgroupV2Subsystem.java b/src/java.base/linux/classes/jdk/internal/platform/cgroupv2/CgroupV2Subsystem.java index 15d5869794e..be97f7cdf44 100644 --- a/src/java.base/linux/classes/jdk/internal/platform/cgroupv2/CgroupV2Subsystem.java +++ b/src/java.base/linux/classes/jdk/internal/platform/cgroupv2/CgroupV2Subsystem.java @@ -274,20 +274,42 @@ public long getTcpMemoryUsage() { return CgroupV2SubsystemController.getLongEntry(unified, "memory.stat", "sock"); } + /** + * Note that for cgroups v2 the actual limits set for swap and + * memory live in two different files, memory.swap.max and memory.max + * respectively. In order to properly report a cgroup v1 like + * compound value we need to sum the two values. Setting a swap limit + * without also setting a memory limit is not allowed. + */ @Override public long getMemoryAndSwapLimit() { String strVal = CgroupSubsystemController.getStringValue(unified, "memory.swap.max"); - return limitFromString(strVal); + long swapLimit = limitFromString(strVal); + if (swapLimit >= 0) { + long memoryLimit = getMemoryLimit(); + assert memoryLimit >= 0; + return memoryLimit + swapLimit; + } + return swapLimit; } + /** + * Note that for cgroups v2 the actual values set for swap usage and + * memory usage live in two different files, memory.current and memory.swap.current + * respectively. In order to properly report a cgroup v1 like + * compound value we need to sum the two values. Setting a swap limit + * without also setting a memory limit is not allowed. + */ @Override public long getMemoryAndSwapUsage() { - return getLongVal("memory.swap.current"); + long swapUsage = getLongVal("memory.swap.current"); + long memoryUsage = getMemoryUsage(); + return memoryUsage + swapUsage; } @Override public long getMemorySoftLimit() { - String softLimitStr = CgroupSubsystemController.getStringValue(unified, "memory.high"); + String softLimitStr = CgroupSubsystemController.getStringValue(unified, "memory.low"); return limitFromString(softLimitStr); } diff --git a/src/java.base/share/classes/com/sun/crypto/provider/AESCrypt.java b/src/java.base/share/classes/com/sun/crypto/provider/AESCrypt.java index 6eadbd74306..828b217a83f 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/AESCrypt.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/AESCrypt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -40,7 +40,7 @@ import java.security.MessageDigest; import java.util.Arrays; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * Rijndael --pronounced Reindaal-- is a symmetric cipher with a 128-bit @@ -356,7 +356,7 @@ void encryptBlock(byte[] in, int inOffset, } // Encryption operation. Possibly replaced with a compiler intrinsic. - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private void implEncryptBlock(byte[] in, int inOffset, byte[] out, int outOffset) { @@ -435,7 +435,7 @@ void decryptBlock(byte[] in, int inOffset, } // Decrypt operation. Possibly replaced with a compiler intrinsic. - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private void implDecryptBlock(byte[] in, int inOffset, byte[] out, int outOffset) { diff --git a/src/java.base/share/classes/com/sun/crypto/provider/CipherBlockChaining.java b/src/java.base/share/classes/com/sun/crypto/provider/CipherBlockChaining.java index 91a6e647da7..4fc5a34b46b 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/CipherBlockChaining.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/CipherBlockChaining.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,7 +29,7 @@ import java.security.ProviderException; import java.util.Objects; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; import sun.security.util.ArrayUtil; @@ -153,7 +153,7 @@ int encrypt(byte[] plain, int plainOffset, int plainLen, cipher, cipherOffset); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private int implEncrypt(byte[] plain, int plainOffset, int plainLen, byte[] cipher, int cipherOffset) { @@ -203,7 +203,7 @@ int decrypt(byte[] cipher, int cipherOffset, int cipherLen, return implDecrypt(cipher, cipherOffset, cipherLen, plain, plainOffset); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private int implDecrypt(byte[] cipher, int cipherOffset, int cipherLen, byte[] plain, int plainOffset) { diff --git a/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java b/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java index 49d2139bd59..3f9c8bc4bda 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -27,7 +27,7 @@ import java.security.InvalidKeyException; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; import sun.security.util.ArrayUtil; /** @@ -182,7 +182,7 @@ private int crypt(byte[] in, int inOff, int len, byte[] out, int outOff) { } // Implementation of crpyt() method. Possibly replaced with a compiler intrinsic. - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private int implCrypt(byte[] in, int inOff, int len, byte[] out, int outOff) { int result = len; while (len-- > 0) { diff --git a/src/java.base/share/classes/com/sun/crypto/provider/ElectronicCodeBook.java b/src/java.base/share/classes/com/sun/crypto/provider/ElectronicCodeBook.java index 743240109e2..c2085816453 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/ElectronicCodeBook.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/ElectronicCodeBook.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,7 +29,7 @@ import java.security.ProviderException; import sun.security.util.ArrayUtil; import java.util.Objects; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * This class represents ciphers in electronic codebook (ECB) mode. @@ -97,7 +97,7 @@ void init(boolean decrypting, String algorithm, byte[] key, byte[] iv) embeddedCipher.init(decrypting, algorithm, key); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private int implECBEncrypt(byte [] in, int inOff, int len, byte[] out, int outOff) { for (int i = len; i >= blockSize; i -= blockSize) { embeddedCipher.encryptBlock(in, inOff, out, outOff); @@ -131,7 +131,7 @@ int encrypt(byte[] in, int inOff, int len, byte[] out, int outOff) { return implECBEncrypt(in, inOff, len, out, outOff); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private int implECBDecrypt(byte [] in, int inOff, int len, byte[] out, int outOff) { for (int i = len; i >= blockSize; i -= blockSize) { embeddedCipher.decryptBlock(in, inOff, out, outOff); diff --git a/src/java.base/share/classes/com/sun/crypto/provider/GHASH.java b/src/java.base/share/classes/com/sun/crypto/provider/GHASH.java index 3b7464580d7..7ee114624ee 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/GHASH.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/GHASH.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -31,7 +31,7 @@ import java.security.ProviderException; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * This class represents the GHASH function defined in NIST 800-38D @@ -229,7 +229,7 @@ private static void ghashRangeCheck(byte[] in, int inOfs, int inLen, long[] st, * the hotspot signature. This method and methods called by it, cannot * throw exceptions or allocate arrays as it will breaking intrinsics */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static void processBlocks(byte[] data, int inOfs, int blocks, long[] st, long[] subH) { int offset = inOfs; while (blocks > 0) { diff --git a/src/java.base/share/classes/java/lang/Boolean.java b/src/java.base/share/classes/java/lang/Boolean.java index 29516752c97..fc76dfe460f 100644 --- a/src/java.base/share/classes/java/lang/Boolean.java +++ b/src/java.base/share/classes/java/lang/Boolean.java @@ -25,7 +25,7 @@ package java.lang; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; import java.lang.constant.Constable; import java.lang.constant.ConstantDesc; @@ -148,7 +148,7 @@ public static boolean parseBoolean(String s) { * * @return the primitive {@code boolean} value of this object. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public boolean booleanValue() { return value; } @@ -167,7 +167,7 @@ public boolean booleanValue() { * @return a {@code Boolean} instance representing {@code b}. * @since 1.4 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static Boolean valueOf(boolean b) { return (b ? TRUE : FALSE); } diff --git a/src/java.base/share/classes/java/lang/Byte.java b/src/java.base/share/classes/java/lang/Byte.java index e71eba7b2d5..9b004bfae6d 100644 --- a/src/java.base/share/classes/java/lang/Byte.java +++ b/src/java.base/share/classes/java/lang/Byte.java @@ -25,8 +25,8 @@ package java.lang; -import jdk.internal.HotSpotIntrinsicCandidate; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; +import jdk.internal.vm.annotation.IntrinsicCandidate; import java.lang.constant.Constable; import java.lang.constant.DynamicConstantDesc; @@ -108,7 +108,7 @@ private ByteCache() {} final int size = -(-128) + 127 + 1; // Load and use the archived cache if it exists - VM.initializeFromArchive(ByteCache.class); + CDS.initializeFromArchive(ByteCache.class); if (archivedCache == null || archivedCache.length != size) { Byte[] c = new Byte[size]; byte value = (byte)-128; @@ -134,7 +134,7 @@ private ByteCache() {} * @return a {@code Byte} instance representing {@code b}. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static Byte valueOf(byte b) { final int offset = 128; return ByteCache.cache[(int)b + offset]; @@ -369,7 +369,7 @@ public Byte(String s) throws NumberFormatException { * Returns the value of this {@code Byte} as a * {@code byte}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public byte byteValue() { return value; } diff --git a/src/java.base/share/classes/java/lang/Character.java b/src/java.base/share/classes/java/lang/Character.java index dd69413f1b8..96238563354 100644 --- a/src/java.base/share/classes/java/lang/Character.java +++ b/src/java.base/share/classes/java/lang/Character.java @@ -25,8 +25,8 @@ package java.lang; -import jdk.internal.HotSpotIntrinsicCandidate; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; +import jdk.internal.vm.annotation.IntrinsicCandidate; import java.lang.constant.Constable; import java.lang.constant.DynamicConstantDesc; @@ -8516,7 +8516,7 @@ private CharacterCache(){} int size = 127 + 1; // Load and use the archived cache if it exists - VM.initializeFromArchive(CharacterCache.class); + CDS.initializeFromArchive(CharacterCache.class); if (archivedCache == null || archivedCache.length != size) { Character[] c = new Character[size]; for (int i = 0; i < size; i++) { @@ -8545,7 +8545,7 @@ private CharacterCache(){} * @return a {@code Character} instance representing {@code c}. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static Character valueOf(char c) { if (c <= 127) { // must cache return CharacterCache.cache[(int)c]; @@ -8558,7 +8558,7 @@ public static Character valueOf(char c) { * @return the primitive {@code char} value represented by * this object. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public char charValue() { return value; } @@ -11252,7 +11252,7 @@ static char[] toUpperCaseCharArray(int codePoint) { * the bytes in the specified {@code char} value. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static char reverseBytes(char ch) { return (char) (((ch & 0xFF00) >> 8) | (ch << 8)); } diff --git a/src/java.base/share/classes/java/lang/Class.java b/src/java.base/share/classes/java/lang/Class.java index c87507440ab..77a1118bfee 100644 --- a/src/java.base/share/classes/java/lang/Class.java +++ b/src/java.base/share/classes/java/lang/Class.java @@ -66,7 +66,6 @@ import java.util.Optional; import java.util.stream.Collectors; -import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.loader.BootLoader; import jdk.internal.loader.BuiltinClassLoader; import jdk.internal.misc.Unsafe; @@ -76,6 +75,7 @@ import jdk.internal.reflect.Reflection; import jdk.internal.reflect.ReflectionFactory; import jdk.internal.vm.annotation.ForceInline; +import jdk.internal.vm.annotation.IntrinsicCandidate; import sun.invoke.util.Wrapper; import sun.reflect.generics.factory.CoreReflectionFactory; import sun.reflect.generics.factory.GenericsFactory; @@ -866,7 +866,7 @@ public Void run() { * * @since 1.1 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native boolean isInstance(Object obj); @@ -895,7 +895,7 @@ public Void run() { * null. * @since 1.1 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native boolean isAssignableFrom(Class<?> cls); @@ -906,7 +906,7 @@ public Void run() { * @return {@code true} if this {@code Class} object represents an interface; * {@code false} otherwise. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native boolean isInterface(); @@ -917,7 +917,7 @@ public Void run() { * {@code false} otherwise. * @since 1.1 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native boolean isArray(); @@ -949,7 +949,7 @@ public Void run() { * @see java.lang.Void#TYPE * @since 1.1 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native boolean isPrimitive(); /** @@ -1168,7 +1168,7 @@ public TypeVariable<Class<T>>[] getTypeParameters() { * * @return the direct superclass of the class represented by this {@code Class} object */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native Class<? super T> getSuperclass(); @@ -1467,7 +1467,7 @@ private Class<?> elementType() { * @see java.lang.reflect.Modifier * @since 1.1 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native int getModifiers(); /** @@ -4002,7 +4002,7 @@ Map<String, T> enumConstantDirectory() { * @since 1.5 */ @SuppressWarnings("unchecked") - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public T cast(Object obj) { if (isInlineClass() && obj == null) throw new NullPointerException(getName() + " is an inline class"); @@ -4578,7 +4578,7 @@ public Optional<ClassDesc> describeConstable() { * @since 15 * @see MethodHandles.Lookup#defineHiddenClass */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native boolean isHidden(); /** diff --git a/src/java.base/share/classes/java/lang/ClassValue.java b/src/java.base/share/classes/java/lang/ClassValue.java index 1b4c114a8ac..beb07bb2782 100644 --- a/src/java.base/share/classes/java/lang/ClassValue.java +++ b/src/java.base/share/classes/java/lang/ClassValue.java @@ -29,6 +29,8 @@ import java.lang.ref.WeakReference; import java.util.concurrent.atomic.AtomicInteger; +import jdk.internal.misc.Unsafe; + import static java.lang.ClassValue.ClassValueMap.probeHomeLocation; import static java.lang.ClassValue.ClassValueMap.probeBackupLocations; @@ -369,12 +371,22 @@ private static ClassValueMap getMap(Class<?> type) { } private static final Object CRITICAL_SECTION = new Object(); + private static final Unsafe UNSAFE = Unsafe.getUnsafe(); private static ClassValueMap initializeMap(Class<?> type) { ClassValueMap map; synchronized (CRITICAL_SECTION) { // private object to avoid deadlocks // happens about once per type - if ((map = type.classValueMap) == null) - type.classValueMap = map = new ClassValueMap(); + if ((map = type.classValueMap) == null) { + map = new ClassValueMap(); + // Place a Store fence after construction and before publishing to emulate + // ClassValueMap containing final fields. This ensures it can be + // published safely in the non-volatile field Class.classValueMap, + // since stores to the fields of ClassValueMap will not be reordered + // to occur after the store to the field type.classValueMap + UNSAFE.storeFence(); + + type.classValueMap = map; + } } return map; } diff --git a/src/java.base/share/classes/java/lang/Double.java b/src/java.base/share/classes/java/lang/Double.java index eca7e892311..729adcf5b03 100644 --- a/src/java.base/share/classes/java/lang/Double.java +++ b/src/java.base/share/classes/java/lang/Double.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -32,7 +32,7 @@ import jdk.internal.math.FloatingDecimal; import jdk.internal.math.DoubleConsts; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * The {@code Double} class wraps a value of the primitive type @@ -525,7 +525,7 @@ public static Double valueOf(String s) throws NumberFormatException { * @return a {@code Double} instance representing {@code d}. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static Double valueOf(double d) { return new Double(d); } @@ -735,7 +735,7 @@ public float floatValue() { * * @return the {@code double} value represented by this object */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public double doubleValue() { return value; } @@ -856,7 +856,7 @@ public boolean equals(Object obj) { * @param value a {@code double} precision floating-point number. * @return the bits that represent the floating-point number. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static long doubleToLongBits(double value) { if (!isNaN(value)) { return doubleToRawLongBits(value); @@ -900,7 +900,7 @@ public static long doubleToLongBits(double value) { * @return the bits that represent the floating-point number. * @since 1.3 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native long doubleToRawLongBits(double value); /** @@ -964,7 +964,7 @@ public static long doubleToLongBits(double value) { * @return the {@code double} floating-point value with the same * bit pattern. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native double longBitsToDouble(long bits); /** diff --git a/src/java.base/share/classes/java/lang/Float.java b/src/java.base/share/classes/java/lang/Float.java index f21eca098cf..0cebe7848ac 100644 --- a/src/java.base/share/classes/java/lang/Float.java +++ b/src/java.base/share/classes/java/lang/Float.java @@ -31,7 +31,7 @@ import java.util.Optional; import jdk.internal.math.FloatingDecimal; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * The {@code Float} class wraps a value of primitive type @@ -438,7 +438,7 @@ public static Float valueOf(String s) throws NumberFormatException { * @return a {@code Float} instance representing {@code f}. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static Float valueOf(float f) { return new Float(f); } @@ -650,7 +650,7 @@ public long longValue() { * * @return the {@code float} value represented by this object */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public float floatValue() { return value; } @@ -768,7 +768,7 @@ public boolean equals(Object obj) { * @param value a floating-point number. * @return the bits that represent the floating-point number. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int floatToIntBits(float value) { if (!isNaN(value)) { return floatToRawIntBits(value); @@ -811,7 +811,7 @@ public static int floatToIntBits(float value) { * @return the bits that represent the floating-point number. * @since 1.3 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native int floatToRawIntBits(float value); /** @@ -873,7 +873,7 @@ public static int floatToIntBits(float value) { * @return the {@code float} floating-point value with the same bit * pattern. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native float intBitsToFloat(int bits); /** diff --git a/src/java.base/share/classes/java/lang/Integer.java b/src/java.base/share/classes/java/lang/Integer.java index cf67cc42d74..f75be73b307 100644 --- a/src/java.base/share/classes/java/lang/Integer.java +++ b/src/java.base/share/classes/java/lang/Integer.java @@ -32,8 +32,9 @@ import java.util.Objects; import java.util.Optional; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.misc.CDS; import jdk.internal.misc.VM; +import jdk.internal.vm.annotation.IntrinsicCandidate; import static java.lang.String.COMPACT_STRINGS; import static java.lang.String.LATIN1; @@ -433,7 +434,7 @@ private static void formatUnsignedIntUTF16(int val, int shift, byte[] buf, int l * @param i an integer to be converted. * @return a string representation of the argument in base 10. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static String toString(int i) { int size = stringSize(i); if (COMPACT_STRINGS) { @@ -1023,7 +1024,7 @@ private static class IntegerCache { high = h; // Load IntegerCache.archivedCache from archive, if possible - VM.initializeFromArchive(IntegerCache.class); + CDS.initializeFromArchive(IntegerCache.class); int size = (high - low) + 1; // Use the archived cache if it exists and is large enough @@ -1058,7 +1059,7 @@ private IntegerCache() {} * @return an {@code Integer} instance representing {@code i}. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static Integer valueOf(int i) { if (i >= IntegerCache.low && i <= IntegerCache.high) return IntegerCache.cache[i + (-IntegerCache.low)]; @@ -1133,7 +1134,7 @@ public short shortValue() { * Returns the value of this {@code Integer} as an * {@code int}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public int intValue() { return value; } @@ -1631,7 +1632,7 @@ public static int lowestOneBit(int i) { * is equal to zero. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int numberOfLeadingZeros(int i) { // HD, Count leading 0's if (i <= 0) @@ -1658,7 +1659,7 @@ public static int numberOfLeadingZeros(int i) { * to zero. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int numberOfTrailingZeros(int i) { // HD, Count trailing 0's i = ~i & (i - 1); @@ -1681,7 +1682,7 @@ public static int numberOfTrailingZeros(int i) { * representation of the specified {@code int} value. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int bitCount(int i) { // HD, Figure 5-2 i = i - ((i >>> 1) & 0x55555555); @@ -1782,7 +1783,7 @@ public static int signum(int i) { * {@code int} value. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int reverseBytes(int i) { return (i << 24) | ((i & 0xff00) << 8) | diff --git a/src/java.base/share/classes/java/lang/Long.java b/src/java.base/share/classes/java/lang/Long.java index 953f352a873..f3afb743e20 100644 --- a/src/java.base/share/classes/java/lang/Long.java +++ b/src/java.base/share/classes/java/lang/Long.java @@ -33,8 +33,8 @@ import java.util.Objects; import java.util.Optional; -import jdk.internal.HotSpotIntrinsicCandidate; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; +import jdk.internal.vm.annotation.IntrinsicCandidate; import static java.lang.String.COMPACT_STRINGS; import static java.lang.String.LATIN1; @@ -1169,7 +1169,7 @@ private LongCache() {} int size = -(-128) + 127 + 1; // Load and use the archived cache if it exists - VM.initializeFromArchive(LongCache.class); + CDS.initializeFromArchive(LongCache.class); if (archivedCache == null || archivedCache.length != size) { Long[] c = new Long[size]; long value = -128; @@ -1198,7 +1198,7 @@ private LongCache() {} * @return a {@code Long} instance representing {@code l}. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static Long valueOf(long l) { final int offset = 128; if (l >= -128 && l <= 127) { // will cache @@ -1375,7 +1375,7 @@ public int intValue() { * Returns the value of this {@code Long} as a * {@code long} value. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public long longValue() { return value; } @@ -1786,7 +1786,7 @@ public static long lowestOneBit(long i) { * is equal to zero. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int numberOfLeadingZeros(long i) { int x = (int)(i >>> 32); return x == 0 ? 32 + Integer.numberOfLeadingZeros((int)i) @@ -1807,7 +1807,7 @@ public static int numberOfLeadingZeros(long i) { * to zero. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int numberOfTrailingZeros(long i) { int x = (int)i; return x == 0 ? 32 + Integer.numberOfTrailingZeros((int)(i >>> 32)) @@ -1824,7 +1824,7 @@ public static int numberOfTrailingZeros(long i) { * representation of the specified {@code long} value. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int bitCount(long i) { // HD, Figure 5-2 i = i - ((i >>> 1) & 0x5555555555555555L); @@ -1926,7 +1926,7 @@ public static int signum(long i) { * {@code long} value. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static long reverseBytes(long i) { i = (i & 0x00ff00ff00ff00ffL) << 8 | (i >>> 8) & 0x00ff00ff00ff00ffL; return (i << 48) | ((i & 0xffff0000L) << 16) | diff --git a/src/java.base/share/classes/java/lang/Math.java b/src/java.base/share/classes/java/lang/Math.java index a25ad8e758c..03834741d12 100644 --- a/src/java.base/share/classes/java/lang/Math.java +++ b/src/java.base/share/classes/java/lang/Math.java @@ -29,7 +29,7 @@ import java.util.Random; import jdk.internal.math.FloatConsts; import jdk.internal.math.DoubleConsts; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * The class {@code Math} contains methods for performing basic @@ -149,7 +149,7 @@ private Math() {} * @param a an angle, in radians. * @return the sine of the argument. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double sin(double a) { return StrictMath.sin(a); // default impl. delegates to StrictMath } @@ -165,7 +165,7 @@ public static double sin(double a) { * @param a an angle, in radians. * @return the cosine of the argument. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double cos(double a) { return StrictMath.cos(a); // default impl. delegates to StrictMath } @@ -183,7 +183,7 @@ public static double cos(double a) { * @param a an angle, in radians. * @return the tangent of the argument. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double tan(double a) { return StrictMath.tan(a); // default impl. delegates to StrictMath } @@ -285,7 +285,7 @@ public static double toDegrees(double angrad) { * @return the value <i>e</i><sup>{@code a}</sup>, * where <i>e</i> is the base of the natural logarithms. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double exp(double a) { return StrictMath.exp(a); // default impl. delegates to StrictMath } @@ -307,7 +307,7 @@ public static double exp(double a) { * @return the value ln {@code a}, the natural logarithm of * {@code a}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double log(double a) { return StrictMath.log(a); // default impl. delegates to StrictMath } @@ -333,7 +333,7 @@ public static double log(double a) { * @return the base 10 logarithm of {@code a}. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double log10(double a) { return StrictMath.log10(a); // default impl. delegates to StrictMath } @@ -355,7 +355,7 @@ public static double log10(double a) { * @return the positive square root of {@code a}. * If the argument is NaN or less than zero, the result is NaN. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double sqrt(double a) { return StrictMath.sqrt(a); // default impl. delegates to StrictMath // Note that hardware sqrt instructions @@ -440,7 +440,7 @@ public static double IEEEremainder(double f1, double f2) { * floating-point value that is greater than or equal to * the argument and is equal to a mathematical integer. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double ceil(double a) { return StrictMath.ceil(a); // default impl. delegates to StrictMath } @@ -460,7 +460,7 @@ public static double ceil(double a) { * floating-point value that less than or equal to the argument * and is equal to a mathematical integer. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double floor(double a) { return StrictMath.floor(a); // default impl. delegates to StrictMath } @@ -480,7 +480,7 @@ public static double floor(double a) { * @return the closest floating-point value to {@code a} that is * equal to a mathematical integer. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double rint(double a) { return StrictMath.rint(a); // default impl. delegates to StrictMath } @@ -537,7 +537,7 @@ public static double rint(double a) { * in polar coordinates that corresponds to the point * (<i>x</i>, <i>y</i>) in Cartesian coordinates. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double atan2(double y, double x) { return StrictMath.atan2(y, x); // default impl. delegates to StrictMath } @@ -665,7 +665,7 @@ public static double atan2(double y, double x) { * @param b the exponent. * @return the value {@code a}<sup>{@code b}</sup>. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double pow(double a, double b) { return StrictMath.pow(a, b); // default impl. delegates to StrictMath } @@ -820,7 +820,7 @@ public static double random() { * @throws ArithmeticException if the result overflows an int * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int addExact(int x, int y) { int r = x + y; // HD 2-12 Overflow iff both arguments have the opposite sign of the result @@ -840,7 +840,7 @@ public static int addExact(int x, int y) { * @throws ArithmeticException if the result overflows a long * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static long addExact(long x, long y) { long r = x + y; // HD 2-12 Overflow iff both arguments have the opposite sign of the result @@ -860,7 +860,7 @@ public static long addExact(long x, long y) { * @throws ArithmeticException if the result overflows an int * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int subtractExact(int x, int y) { int r = x - y; // HD 2-12 Overflow iff the arguments have different signs and @@ -881,7 +881,7 @@ public static int subtractExact(int x, int y) { * @throws ArithmeticException if the result overflows a long * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static long subtractExact(long x, long y) { long r = x - y; // HD 2-12 Overflow iff the arguments have different signs and @@ -902,7 +902,7 @@ public static long subtractExact(long x, long y) { * @throws ArithmeticException if the result overflows an int * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int multiplyExact(int x, int y) { long r = (long)x * (long)y; if ((int)r != r) { @@ -935,7 +935,7 @@ public static long multiplyExact(long x, int y) { * @throws ArithmeticException if the result overflows a long * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static long multiplyExact(long x, long y) { long r = x * y; long ax = Math.abs(x); @@ -962,7 +962,7 @@ public static long multiplyExact(long x, long y) { * @throws ArithmeticException if the result overflows an int * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int incrementExact(int a) { if (a == Integer.MAX_VALUE) { throw new ArithmeticException("integer overflow"); @@ -981,7 +981,7 @@ public static int incrementExact(int a) { * @throws ArithmeticException if the result overflows a long * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static long incrementExact(long a) { if (a == Long.MAX_VALUE) { throw new ArithmeticException("long overflow"); @@ -1000,7 +1000,7 @@ public static long incrementExact(long a) { * @throws ArithmeticException if the result overflows an int * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int decrementExact(int a) { if (a == Integer.MIN_VALUE) { throw new ArithmeticException("integer overflow"); @@ -1019,7 +1019,7 @@ public static int decrementExact(int a) { * @throws ArithmeticException if the result overflows a long * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static long decrementExact(long a) { if (a == Long.MIN_VALUE) { throw new ArithmeticException("long overflow"); @@ -1038,7 +1038,7 @@ public static long decrementExact(long a) { * @throws ArithmeticException if the result overflows an int * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int negateExact(int a) { if (a == Integer.MIN_VALUE) { throw new ArithmeticException("integer overflow"); @@ -1057,7 +1057,7 @@ public static int negateExact(int a) { * @throws ArithmeticException if the result overflows a long * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static long negateExact(long a) { if (a == Long.MIN_VALUE) { throw new ArithmeticException("long overflow"); @@ -1103,7 +1103,7 @@ public static long multiplyFull(int x, int y) { * @return the result * @since 9 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static long multiplyHigh(long x, long y) { if (x < 0 || y < 0) { // Use technique from section 8-2 of Henry S. Warren, Jr., @@ -1365,7 +1365,7 @@ public static long floorMod(long x, long y) { * @return the absolute value of the argument. * @see Math#absExact(int) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int abs(int a) { return (a < 0) ? -a : a; } @@ -1411,7 +1411,7 @@ public static int absExact(int a) { * @return the absolute value of the argument. * @see Math#absExact(long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static long abs(long a) { return (a < 0) ? -a : a; } @@ -1462,7 +1462,7 @@ public static long absExact(long a) { * @param a the argument whose absolute value is to be determined * @return the absolute value of the argument. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static float abs(float a) { return (a <= 0.0F) ? 0.0F - a : a; } @@ -1487,7 +1487,7 @@ public static float abs(float a) { * @param a the argument whose absolute value is to be determined * @return the absolute value of the argument. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double abs(double a) { return (a <= 0.0D) ? 0.0D - a : a; } @@ -1502,7 +1502,7 @@ public static double abs(double a) { * @param b another argument. * @return the larger of {@code a} and {@code b}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int max(int a, int b) { return (a >= b) ? a : b; } @@ -1539,7 +1539,7 @@ public static long max(long a, long b) { * @param b another argument. * @return the larger of {@code a} and {@code b}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static float max(float a, float b) { if (a != a) return a; // a is NaN @@ -1566,7 +1566,7 @@ public static float max(float a, float b) { * @param b another argument. * @return the larger of {@code a} and {@code b}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double max(double a, double b) { if (a != a) return a; // a is NaN @@ -1589,7 +1589,7 @@ public static double max(double a, double b) { * @param b another argument. * @return the smaller of {@code a} and {@code b}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int min(int a, int b) { return (a <= b) ? a : b; } @@ -1622,7 +1622,7 @@ public static long min(long a, long b) { * @param b another argument. * @return the smaller of {@code a} and {@code b}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static float min(float a, float b) { if (a != a) return a; // a is NaN @@ -1649,7 +1649,7 @@ public static float min(float a, float b) { * @param b another argument. * @return the smaller of {@code a} and {@code b}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double min(double a, double b) { if (a != a) return a; // a is NaN @@ -1712,7 +1712,7 @@ public static double min(double a, double b) { * * @since 9 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double fma(double a, double b, double c) { /* * Infinity and NaN arithmetic is not quite the same with two @@ -1829,7 +1829,7 @@ public static double fma(double a, double b, double c) { * * @since 9 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static float fma(float a, float b, float c) { /* * Since the double format has more than twice the precision @@ -1977,7 +1977,7 @@ public static float ulp(float f) { * @author Joseph D. Darcy * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double signum(double d) { return (d == 0.0 || Double.isNaN(d))?d:copySign(1.0, d); } @@ -1999,7 +1999,7 @@ public static double signum(double d) { * @author Joseph D. Darcy * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static float signum(float f) { return (f == 0.0f || Float.isNaN(f))?f:copySign(1.0f, f); } @@ -2220,7 +2220,7 @@ public static double log1p(double x) { * and the sign of {@code sign}. * @since 1.6 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double copySign(double magnitude, double sign) { return Double.longBitsToDouble((Double.doubleToRawLongBits(sign) & (DoubleConsts.SIGN_BIT_MASK)) | @@ -2244,7 +2244,7 @@ public static double copySign(double magnitude, double sign) { * and the sign of {@code sign}. * @since 1.6 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static float copySign(float magnitude, float sign) { return Float.intBitsToFloat((Float.floatToRawIntBits(sign) & (FloatConsts.SIGN_BIT_MASK)) | diff --git a/src/java.base/share/classes/java/lang/Module.java b/src/java.base/share/classes/java/lang/Module.java index 3d5734f7a91..7d0a0d08888 100644 --- a/src/java.base/share/classes/java/lang/Module.java +++ b/src/java.base/share/classes/java/lang/Module.java @@ -55,6 +55,7 @@ import jdk.internal.loader.BuiltinClassLoader; import jdk.internal.loader.BootLoader; import jdk.internal.loader.ClassLoaders; +import jdk.internal.misc.CDS; import jdk.internal.misc.VM; import jdk.internal.module.IllegalAccessLogger; import jdk.internal.module.ModuleLoaderMap; @@ -277,7 +278,7 @@ static ArchivedData get() { } static { - VM.initializeFromArchive(ArchivedData.class); + CDS.initializeFromArchive(ArchivedData.class); } } diff --git a/src/java.base/share/classes/java/lang/Object.java b/src/java.base/share/classes/java/lang/Object.java index 1e2642532d9..6f293dc5300 100644 --- a/src/java.base/share/classes/java/lang/Object.java +++ b/src/java.base/share/classes/java/lang/Object.java @@ -25,7 +25,7 @@ package java.lang; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; import jdk.internal.access.SharedSecrets; import java.lang.invoke.ValueBootstrapMethods; @@ -48,7 +48,7 @@ public class Object { * @apiNote {@link Objects#newIdentity java.util.Objects.newIdentity()} * should be used instead of {@code new Object()}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public Object() {} /** @@ -70,7 +70,7 @@ public Object() {} * class of this object. * @jls 15.8.2 Class Literals */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native Class<?> getClass(); /** @@ -105,7 +105,7 @@ public Object() {} * @see java.lang.Object#equals(java.lang.Object) * @see java.lang.System#identityHashCode */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native int hashCode(); /** @@ -218,7 +218,7 @@ public boolean equals(Object obj) { * be cloned. * @see java.lang.Cloneable */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate protected native Object clone() throws CloneNotSupportedException; /** @@ -288,7 +288,7 @@ public String toString() { * @see java.lang.Object#notifyAll() * @see java.lang.Object#wait() */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native void notify(); /** @@ -313,7 +313,7 @@ public String toString() { * @see java.lang.Object#notify() * @see java.lang.Object#wait() */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native void notifyAll(); /** diff --git a/src/java.base/share/classes/java/lang/Short.java b/src/java.base/share/classes/java/lang/Short.java index 53ca694291d..4f293496579 100644 --- a/src/java.base/share/classes/java/lang/Short.java +++ b/src/java.base/share/classes/java/lang/Short.java @@ -25,8 +25,8 @@ package java.lang; -import jdk.internal.HotSpotIntrinsicCandidate; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; +import jdk.internal.vm.annotation.IntrinsicCandidate; import java.lang.constant.Constable; import java.lang.constant.DynamicConstantDesc; @@ -234,7 +234,7 @@ private ShortCache() {} int size = -(-128) + 127 + 1; // Load and use the archived cache if it exists - VM.initializeFromArchive(ShortCache.class); + CDS.initializeFromArchive(ShortCache.class); if (archivedCache == null || archivedCache.length != size) { Short[] c = new Short[size]; short value = -128; @@ -263,7 +263,7 @@ private ShortCache() {} * @return a {@code Short} instance representing {@code s}. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static Short valueOf(short s) { final int offset = 128; int sAsInt = s; @@ -383,7 +383,7 @@ public byte byteValue() { * Returns the value of this {@code Short} as a * {@code short}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public short shortValue() { return value; } @@ -553,7 +553,7 @@ public static int compareUnsigned(short x, short y) { * the bytes in the specified {@code short} value. * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static short reverseBytes(short i) { return (short) (((i & 0xFF00) >> 8) | (i << 8)); } diff --git a/src/java.base/share/classes/java/lang/StrictMath.java b/src/java.base/share/classes/java/lang/StrictMath.java index 4578146849b..d511847d9f6 100644 --- a/src/java.base/share/classes/java/lang/StrictMath.java +++ b/src/java.base/share/classes/java/lang/StrictMath.java @@ -27,7 +27,7 @@ import java.util.Random; import jdk.internal.math.DoubleConsts; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * The class {@code StrictMath} contains methods for performing basic @@ -283,7 +283,7 @@ public static double exp(double a) { * @param a a value. * @return the positive square root of {@code a}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native double sqrt(double a); /** @@ -1261,7 +1261,7 @@ public static double abs(double a) { * @param b another argument. * @return the larger of {@code a} and {@code b}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int max(int a, int b) { return Math.max(a, b); } @@ -1294,7 +1294,7 @@ public static long max(long a, long b) { * @param b another argument. * @return the larger of {@code a} and {@code b}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static float max(float a, float b) { return Math.max(a, b); } @@ -1313,7 +1313,7 @@ public static float max(float a, float b) { * @param b another argument. * @return the larger of {@code a} and {@code b}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double max(double a, double b) { return Math.max(a, b); } @@ -1328,7 +1328,7 @@ public static double max(double a, double b) { * @param b another argument. * @return the smaller of {@code a} and {@code b}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int min(int a, int b) { return Math.min(a, b); } @@ -1361,7 +1361,7 @@ public static long min(long a, long b) { * @param b another argument. * @return the smaller of {@code a} and {@code b.} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static float min(float a, float b) { return Math.min(a, b); } @@ -1380,7 +1380,7 @@ public static float min(float a, float b) { * @param b another argument. * @return the smaller of {@code a} and {@code b}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static double min(double a, double b) { return Math.min(a, b); } diff --git a/src/java.base/share/classes/java/lang/String.java b/src/java.base/share/classes/java/lang/String.java index 4d0ba2604f8..eb58eb7301e 100644 --- a/src/java.base/share/classes/java/lang/String.java +++ b/src/java.base/share/classes/java/lang/String.java @@ -49,7 +49,7 @@ import java.util.stream.IntStream; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; import jdk.internal.vm.annotation.Stable; import static java.util.function.Predicate.not; @@ -248,7 +248,7 @@ public String() { * @param original * A {@code String} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public String(String original) { this.value = original.value; this.coder = original.coder; @@ -3180,12 +3180,12 @@ public String translateEscapes() { * string. The function should expect a single String argument * and produce an {@code R} result. * <p> - * Any exception thrown by {@code f()} will be propagated to the + * Any exception thrown by {@code f.apply()} will be propagated to the * caller. * - * @param f functional interface to a apply + * @param f a function to apply * - * @param <R> class of the result + * @param <R> the type of the result * * @return the result of applying the function to this string * diff --git a/src/java.base/share/classes/java/lang/StringBuffer.java b/src/java.base/share/classes/java/lang/StringBuffer.java index 079c2158fc7..a4299192966 100644 --- a/src/java.base/share/classes/java/lang/StringBuffer.java +++ b/src/java.base/share/classes/java/lang/StringBuffer.java @@ -27,7 +27,7 @@ import java.io.IOException; import java.util.Arrays; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * A thread-safe, mutable sequence of characters. @@ -123,7 +123,7 @@ public final class StringBuffer * Constructs a string buffer with no characters in it and an * initial capacity of 16 characters. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public StringBuffer() { super(16); } @@ -136,7 +136,7 @@ public StringBuffer() { * @throws NegativeArraySizeException if the {@code capacity} * argument is less than {@code 0}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public StringBuffer(int capacity) { super(capacity); } @@ -148,7 +148,7 @@ public StringBuffer(int capacity) { * * @param str the initial contents of the buffer. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public StringBuffer(String str) { super(str); } @@ -302,7 +302,7 @@ public synchronized StringBuffer append(Object obj) { } @Override - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public synchronized StringBuffer append(String str) { toStringCache = null; super.append(str); @@ -414,7 +414,7 @@ public synchronized StringBuffer append(boolean b) { } @Override - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public synchronized StringBuffer append(char c) { toStringCache = null; super.append(c); @@ -422,7 +422,7 @@ public synchronized StringBuffer append(char c) { } @Override - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public synchronized StringBuffer append(int i) { toStringCache = null; super.append(i); @@ -704,7 +704,7 @@ public synchronized StringBuffer reverse() { } @Override - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public synchronized String toString() { if (toStringCache == null) { return toStringCache = diff --git a/src/java.base/share/classes/java/lang/StringBuilder.java b/src/java.base/share/classes/java/lang/StringBuilder.java index aa3bc4f07a7..e52da83fd26 100644 --- a/src/java.base/share/classes/java/lang/StringBuilder.java +++ b/src/java.base/share/classes/java/lang/StringBuilder.java @@ -25,7 +25,7 @@ package java.lang; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; import java.io.IOException; @@ -97,7 +97,7 @@ public final class StringBuilder * Constructs a string builder with no characters in it and an * initial capacity of 16 characters. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public StringBuilder() { super(16); } @@ -110,7 +110,7 @@ public StringBuilder() { * @throws NegativeArraySizeException if the {@code capacity} * argument is less than {@code 0}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public StringBuilder(int capacity) { super(capacity); } @@ -122,7 +122,7 @@ public StringBuilder(int capacity) { * * @param str the initial contents of the buffer. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public StringBuilder(String str) { super(str); } @@ -170,7 +170,7 @@ public StringBuilder append(Object obj) { } @Override - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public StringBuilder append(String str) { super.append(str); return this; @@ -237,14 +237,14 @@ public StringBuilder append(boolean b) { } @Override - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public StringBuilder append(char c) { super.append(c); return this; } @Override - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public StringBuilder append(int i) { super.append(i); return this; @@ -443,7 +443,7 @@ public StringBuilder reverse() { } @Override - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public String toString() { // Create a copy, don't share the array return isLatin1() ? StringLatin1.newString(value, 0, count) diff --git a/src/java.base/share/classes/java/lang/StringCoding.java b/src/java.base/share/classes/java/lang/StringCoding.java index 569bd9cb1c0..8c0911b169a 100644 --- a/src/java.base/share/classes/java/lang/StringCoding.java +++ b/src/java.base/share/classes/java/lang/StringCoding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -40,7 +40,7 @@ import java.nio.charset.UnmappableCharacterException; import java.nio.charset.UnsupportedCharsetException; import java.util.Arrays; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; import sun.nio.cs.HistoricallyNamedCharset; import sun.nio.cs.ArrayDecoder; import sun.nio.cs.ArrayEncoder; @@ -139,7 +139,7 @@ Result with(byte[] val, byte coder) { } } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static boolean hasNegatives(byte[] ba, int off, int len) { for (int i = off; i < off + len; i++) { if (ba[i] < 0) { @@ -590,7 +590,7 @@ private static Result decodeLatin1(byte[] ba, int off, int len) { } } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static int implEncodeISOArray(byte[] sa, int sp, byte[] da, int dp, int len) { int i = 0; diff --git a/src/java.base/share/classes/java/lang/StringLatin1.java b/src/java.base/share/classes/java/lang/StringLatin1.java index 5dabc4e92cd..b4e445d2d4e 100644 --- a/src/java.base/share/classes/java/lang/StringLatin1.java +++ b/src/java.base/share/classes/java/lang/StringLatin1.java @@ -34,8 +34,8 @@ import java.util.stream.IntStream; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.util.ArraysSupport; +import jdk.internal.vm.annotation.IntrinsicCandidate; import static java.lang.String.LATIN1; import static java.lang.String.UTF16; @@ -90,7 +90,7 @@ public static void getBytes(byte[] value, int srcBegin, int srcEnd, byte dst[], System.arraycopy(value, srcBegin, dst, dstBegin, srcEnd - srcBegin); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static boolean equals(byte[] value, byte[] other) { if (value.length == other.length) { for (int i = 0; i < value.length; i++) { @@ -103,7 +103,7 @@ public static boolean equals(byte[] value, byte[] other) { return false; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int compareTo(byte[] value, byte[] other) { int len1 = value.length; int len2 = other.length; @@ -120,7 +120,7 @@ public static int compareTo(byte[] value, byte[] other, int len1, int len2) { return len1 - len2; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int compareToUTF16(byte[] value, byte[] other) { int len1 = length(value); int len2 = StringUTF16.length(other); @@ -219,7 +219,7 @@ public static int indexOf(byte[] value, int ch, int fromIndex) { return -1; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int indexOf(byte[] value, byte[] str) { if (str.length == 0) { return 0; @@ -230,7 +230,7 @@ public static int indexOf(byte[] value, byte[] str) { return indexOf(value, value.length, str, str.length, 0); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int indexOf(byte[] value, int valueCount, byte[] str, int strCount, int fromIndex) { byte first = str[0]; int max = (valueCount - strCount); @@ -770,7 +770,7 @@ public static void fillNull(byte[] val, int index, int end) { } // inflatedCopy byte[] -> char[] - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static void inflate(byte[] src, int srcOff, char[] dst, int dstOff, int len) { for (int i = 0; i < len; i++) { dst[dstOff++] = (char)(src[srcOff++] & 0xff); @@ -778,7 +778,7 @@ public static void inflate(byte[] src, int srcOff, char[] dst, int dstOff, int l } // inflatedCopy byte[] -> byte[] - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static void inflate(byte[] src, int srcOff, byte[] dst, int dstOff, int len) { StringUTF16.inflate(src, srcOff, dst, dstOff, len); } diff --git a/src/java.base/share/classes/java/lang/StringUTF16.java b/src/java.base/share/classes/java/lang/StringUTF16.java index aea4de11628..bf4d2af4388 100644 --- a/src/java.base/share/classes/java/lang/StringUTF16.java +++ b/src/java.base/share/classes/java/lang/StringUTF16.java @@ -32,10 +32,10 @@ import java.util.function.IntConsumer; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.util.ArraysSupport; -import jdk.internal.vm.annotation.ForceInline; import jdk.internal.vm.annotation.DontInline; +import jdk.internal.vm.annotation.ForceInline; +import jdk.internal.vm.annotation.IntrinsicCandidate; import static java.lang.String.UTF16; import static java.lang.String.LATIN1; @@ -53,7 +53,7 @@ public static byte[] newBytesFor(int len) { return new byte[len << 1]; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate // intrinsic performs no bounds checks static void putChar(byte[] val, int index, int c) { assert index >= 0 && index < length(val) : "Trusted caller missed bounds check"; @@ -62,7 +62,7 @@ static void putChar(byte[] val, int index, int c) { val[index] = (byte)(c >> LO_BYTE_SHIFT); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate // intrinsic performs no bounds checks static char getChar(byte[] val, int index) { assert index >= 0 && index < length(val) : "Trusted caller missed bounds check"; @@ -147,7 +147,7 @@ public static char[] toChars(byte[] value) { return dst; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static byte[] toBytes(char[] value, int off, int len) { byte[] val = newBytesFor(len); for (int i = 0; i < len; i++) { @@ -174,7 +174,7 @@ public static byte[] compress(byte[] val, int off, int len) { } // compressedCopy char[] -> byte[] - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int compress(char[] src, int srcOff, byte[] dst, int dstOff, int len) { for (int i = 0; i < len; i++) { char c = src[srcOff]; @@ -190,7 +190,7 @@ public static int compress(char[] src, int srcOff, byte[] dst, int dstOff, int l } // compressedCopy byte[] -> byte[] - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int compress(byte[] src, int srcOff, byte[] dst, int dstOff, int len) { // We need a range check here because 'getChar' has no checks checkBoundsOffCount(srcOff, len, src); @@ -246,7 +246,7 @@ static byte[] toBytesSupplementary(int cp) { return result; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static void getChars(byte[] value, int srcBegin, int srcEnd, char dst[], int dstBegin) { // We need a range check here because 'getChar' has no checks if (srcBegin < srcEnd) { @@ -266,7 +266,7 @@ public static void getBytes(byte[] value, int srcBegin, int srcEnd, byte dst[], } } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static boolean equals(byte[] value, byte[] other) { if (value.length == other.length) { int len = value.length >> 1; @@ -280,7 +280,7 @@ public static boolean equals(byte[] value, byte[] other) { return false; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int compareTo(byte[] value, byte[] other) { int len1 = length(value); int len2 = length(other); @@ -309,7 +309,7 @@ private static int compareValues(byte[] value, byte[] other, int len1, int len2) return len1 - len2; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int compareToLatin1(byte[] value, byte[] other) { return -StringLatin1.compareToUTF16(other, value); } @@ -437,7 +437,7 @@ public static int indexOf(byte[] value, int ch, int fromIndex) { } } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int indexOf(byte[] value, byte[] str) { if (str.length == 0) { return 0; @@ -448,7 +448,7 @@ public static int indexOf(byte[] value, byte[] str) { return indexOfUnsafe(value, length(value), str, length(str), 0); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int indexOf(byte[] value, int valueCount, byte[] str, int strCount, int fromIndex) { checkBoundsBeginEnd(fromIndex, valueCount, value); checkBoundsBeginEnd(0, strCount, str); @@ -486,7 +486,7 @@ private static int indexOfUnsafe(byte[] value, int valueCount, byte[] str, int s /** * Handles indexOf Latin1 substring in UTF16 string. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int indexOfLatin1(byte[] value, byte[] str) { if (str.length == 0) { return 0; @@ -497,7 +497,7 @@ public static int indexOfLatin1(byte[] value, byte[] str) { return indexOfLatin1Unsafe(value, length(value), str, str.length, 0); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int indexOfLatin1(byte[] src, int srcCount, byte[] tgt, int tgtCount, int fromIndex) { checkBoundsBeginEnd(fromIndex, srcCount, src); String.checkBoundsBeginEnd(0, tgtCount, tgt.length); @@ -532,7 +532,7 @@ public static int indexOfLatin1Unsafe(byte[] src, int srcCount, byte[] tgt, int return -1; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static int indexOfChar(byte[] value, int ch, int fromIndex, int max) { checkBoundsBeginEnd(fromIndex, max, value); return indexOfCharUnsafe(value, ch, fromIndex, max); diff --git a/src/java.base/share/classes/java/lang/System.java b/src/java.base/share/classes/java/lang/System.java index 59fad502fd4..487c529b679 100644 --- a/src/java.base/share/classes/java/lang/System.java +++ b/src/java.base/share/classes/java/lang/System.java @@ -69,7 +69,6 @@ import jdk.internal.module.ServicesCatalog; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.Reflection; -import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.access.JavaLangAccess; import jdk.internal.access.SharedSecrets; import jdk.internal.misc.VM; @@ -77,6 +76,7 @@ import jdk.internal.logger.LazyLoggers; import jdk.internal.logger.LocalizedLoggerWrapper; import jdk.internal.util.SystemProps; +import jdk.internal.vm.annotation.IntrinsicCandidate; import jdk.internal.vm.annotation.Stable; import sun.nio.fs.DefaultFileSystemProvider; import sun.reflect.annotation.AnnotationType; @@ -427,7 +427,7 @@ public static SecurityManager getSecurityManager() { * the current time and midnight, January 1, 1970 UTC. * @see java.util.Date */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native long currentTimeMillis(); /** @@ -471,7 +471,7 @@ public static SecurityManager getSecurityManager() { * high-resolution time source, in nanoseconds * @since 1.5 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native long nanoTime(); /** @@ -566,7 +566,7 @@ public static SecurityManager getSecurityManager() { * @throws NullPointerException if either {@code src} or * {@code dest} is {@code null}. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native void arraycopy(Object src, int srcPos, Object dest, int destPos, int length); @@ -584,7 +584,7 @@ public static native void arraycopy(Object src, int srcPos, * @see Object#hashCode * @see java.util.Objects#hashCode(Object) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native int identityHashCode(Object x); /** diff --git a/src/java.base/share/classes/java/lang/Thread.java b/src/java.base/share/classes/java/lang/Thread.java index 8cbb9446f29..c1146379d6c 100644 --- a/src/java.base/share/classes/java/lang/Thread.java +++ b/src/java.base/share/classes/java/lang/Thread.java @@ -39,11 +39,11 @@ import java.util.concurrent.locks.LockSupport; import jdk.internal.misc.TerminatingThreadLocal; -import sun.nio.ch.Interruptible; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.Reflection; +import jdk.internal.vm.annotation.IntrinsicCandidate; +import sun.nio.ch.Interruptible; import sun.security.util.SecurityConstants; -import jdk.internal.HotSpotIntrinsicCandidate; /** * A <i>thread</i> is a thread of execution in a program. The Java @@ -257,7 +257,7 @@ static void blockedOn(Interruptible b) { * * @return the currently executing thread. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native Thread currentThread(); /** @@ -373,7 +373,7 @@ public static void sleep(long millis, int nanos) * * @since 9 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static void onSpinWait() {} /** diff --git a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java index b39e18f7c49..d3d5d115f38 100644 --- a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java +++ b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java @@ -59,6 +59,7 @@ private static final String METHOD_DESCRIPTOR_VOID = Type.getMethodDescriptor(Type.VOID_TYPE); private static final String JAVA_LANG_OBJECT = "java/lang/Object"; private static final String NAME_CTOR = "<init>"; + private static final String LAMBDA_INSTANCE_FIELD = "LAMBDA_INSTANCE$"; //Serialization support private static final String NAME_SERIALIZED_LAMBDA = "java/lang/invoke/SerializedLambda"; @@ -208,32 +209,42 @@ private static String lambdaClassName(Class<?> targetClass) { @Override CallSite buildCallSite() throws LambdaConversionException { final Class<?> innerClass = spinInnerClass(); - if (invokedType.parameterCount() == 0 && !disableEagerInitialization) { + if (invokedType.parameterCount() == 0) { // In the case of a non-capturing lambda, we optimize linkage by pre-computing a single instance, // unless we've suppressed eager initialization - final Constructor<?>[] ctrs = AccessController.doPrivileged( - new PrivilegedAction<>() { - @Override - public Constructor<?>[] run() { - Constructor<?>[] ctrs = innerClass.getDeclaredConstructors(); - if (ctrs.length == 1) { - // The lambda implementing inner class constructor is private, set - // it accessible (by us) before creating the constant sole instance - ctrs[0].setAccessible(true); - } - return ctrs; + if (disableEagerInitialization) { + try { + return new ConstantCallSite(caller.findStaticGetter(innerClass, LAMBDA_INSTANCE_FIELD, + invokedType.returnType())); + } catch (ReflectiveOperationException e) { + throw new LambdaConversionException( + "Exception finding " + LAMBDA_INSTANCE_FIELD + " static field", e); + } + } else { + final Constructor<?>[] ctrs = AccessController.doPrivileged( + new PrivilegedAction<>() { + @Override + public Constructor<?>[] run() { + Constructor<?>[] ctrs = innerClass.getDeclaredConstructors(); + if (ctrs.length == 1) { + // The lambda implementing inner class constructor is private, set + // it accessible (by us) before creating the constant sole instance + ctrs[0].setAccessible(true); + } + return ctrs; + } + }); + if (ctrs.length != 1) { + throw new LambdaConversionException("Expected one lambda constructor for " + + innerClass.getCanonicalName() + ", got " + ctrs.length); } - }); - if (ctrs.length != 1) { - throw new LambdaConversionException("Expected one lambda constructor for " - + innerClass.getCanonicalName() + ", got " + ctrs.length); - } - try { - Object inst = ctrs[0].newInstance(); - return new ConstantCallSite(MethodHandles.constant(samBase, inst)); - } catch (ReflectiveOperationException e) { - throw new LambdaConversionException("Exception instantiating lambda object", e); + try { + Object inst = ctrs[0].newInstance(); + return new ConstantCallSite(MethodHandles.constant(samBase, inst)); + } catch (ReflectiveOperationException e) { + throw new LambdaConversionException("Exception instantiating lambda object", e); + } } } else { try { @@ -333,6 +344,10 @@ private Class<?> generateInnerClass() throws LambdaConversionException { generateConstructor(); + if (invokedType.parameterCount() == 0 && disableEagerInitialization) { + generateClassInitializer(); + } + // Forward the SAM method MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, samMethodName, samMethodType.toMethodDescriptorString(), null, null); @@ -400,6 +415,32 @@ public Void run() { } } + /** + * Generate a static field and a static initializer that sets this field to an instance of the lambda + */ + private void generateClassInitializer() { + String lambdaTypeDescriptor = invokedType.returnType().descriptorString(); + + // Generate the static final field that holds the lambda singleton + FieldVisitor fv = cw.visitField(ACC_PRIVATE | ACC_STATIC | ACC_FINAL, + LAMBDA_INSTANCE_FIELD, lambdaTypeDescriptor, null, null); + fv.visitEnd(); + + // Instantiate the lambda and store it to the static final field + MethodVisitor clinit = cw.visitMethod(ACC_STATIC, "<clinit>", "()V", null, null); + clinit.visitCode(); + + clinit.visitTypeInsn(NEW, lambdaClassName); + clinit.visitInsn(Opcodes.DUP); + assert invokedType.parameterCount() == 0; + clinit.visitMethodInsn(INVOKESPECIAL, lambdaClassName, NAME_CTOR, constructorType.toMethodDescriptorString(), false); + clinit.visitFieldInsn(PUTSTATIC, lambdaClassName, LAMBDA_INSTANCE_FIELD, lambdaTypeDescriptor); + + clinit.visitInsn(RETURN); + clinit.visitMaxs(-1, -1); + clinit.visitEnd(); + } + /** * Generate the constructor for the class */ diff --git a/src/java.base/share/classes/java/lang/invoke/LambdaProxyClassArchive.java b/src/java.base/share/classes/java/lang/invoke/LambdaProxyClassArchive.java index bad015a5624..9ad06751108 100644 --- a/src/java.base/share/classes/java/lang/invoke/LambdaProxyClassArchive.java +++ b/src/java.base/share/classes/java/lang/invoke/LambdaProxyClassArchive.java @@ -26,15 +26,15 @@ package java.lang.invoke; import jdk.internal.loader.BuiltinClassLoader; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; final class LambdaProxyClassArchive { private static final boolean dumpArchive; private static final boolean sharingEnabled; static { - dumpArchive = VM.isCDSDumpingEnabled(); - sharingEnabled = VM.isCDSSharingEnabled(); + dumpArchive = CDS.isDynamicDumpingEnabled(); + sharingEnabled = CDS.isSharingEnabled(); } /** diff --git a/src/java.base/share/classes/java/lang/invoke/MethodHandle.java b/src/java.base/share/classes/java/lang/invoke/MethodHandle.java index 21796d730f7..383f3b8cab6 100644 --- a/src/java.base/share/classes/java/lang/invoke/MethodHandle.java +++ b/src/java.base/share/classes/java/lang/invoke/MethodHandle.java @@ -26,7 +26,7 @@ package java.lang.invoke; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; import java.lang.constant.ClassDesc; import java.lang.constant.Constable; @@ -499,7 +499,7 @@ public MethodType type() { * @throws WrongMethodTypeException if the target's type is not identical with the caller's symbolic type descriptor * @throws Throwable anything thrown by the underlying method propagates unchanged through the method handle call */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native @PolymorphicSignature Object invokeExact(Object... args) throws Throwable; /** @@ -537,7 +537,7 @@ public MethodType type() { * @throws ClassCastException if the target's type can be adjusted to the caller, but a reference cast fails * @throws Throwable anything thrown by the underlying method propagates unchanged through the method handle call */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native @PolymorphicSignature Object invoke(Object... args) throws Throwable; /** @@ -557,7 +557,7 @@ public MethodType type() { * @param args the signature-polymorphic parameter list, statically represented using varargs * @return the signature-polymorphic result, statically represented using {@code Object} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate /*non-public*/ final native @PolymorphicSignature Object invokeBasic(Object... args) throws Throwable; @@ -568,7 +568,7 @@ public MethodType type() { * @param args the signature-polymorphic parameter list, statically represented using varargs * @return the signature-polymorphic result, statically represented using {@code Object} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate /*non-public*/ static native @PolymorphicSignature Object linkToVirtual(Object... args) throws Throwable; @@ -579,7 +579,7 @@ public MethodType type() { * @param args the signature-polymorphic parameter list, statically represented using varargs * @return the signature-polymorphic result, statically represented using {@code Object} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate /*non-public*/ static native @PolymorphicSignature Object linkToStatic(Object... args) throws Throwable; @@ -590,7 +590,7 @@ public MethodType type() { * @param args the signature-polymorphic parameter list, statically represented using varargs * @return the signature-polymorphic result, statically represented using {@code Object} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate /*non-public*/ static native @PolymorphicSignature Object linkToSpecial(Object... args) throws Throwable; @@ -601,7 +601,7 @@ public MethodType type() { * @param args the signature-polymorphic parameter list, statically represented using varargs * @return the signature-polymorphic result, statically represented using {@code Object} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate /*non-public*/ static native @PolymorphicSignature Object linkToInterface(Object... args) throws Throwable; diff --git a/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java b/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java index 93d5b4a683a..e5c47b03451 100644 --- a/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java +++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -695,7 +695,7 @@ static MethodHandle selectAlternative(boolean testResult, MethodHandle target, M // Intrinsified by C2. Counters are used during parsing to calculate branch frequencies. @Hidden - @jdk.internal.HotSpotIntrinsicCandidate + @jdk.internal.vm.annotation.IntrinsicCandidate static boolean profileBoolean(boolean result, int[] counters) { // Profile is int[2] where [0] and [1] correspond to false and true occurrences respectively. int idx = result ? 1 : 0; @@ -710,7 +710,7 @@ static boolean profileBoolean(boolean result, int[] counters) { // Intrinsified by C2. Returns true if obj is a compile-time constant. @Hidden - @jdk.internal.HotSpotIntrinsicCandidate + @jdk.internal.vm.annotation.IntrinsicCandidate static boolean isCompileConstant(Object obj) { return false; } diff --git a/src/java.base/share/classes/java/lang/invoke/VarHandle.java b/src/java.base/share/classes/java/lang/invoke/VarHandle.java index 010e69da030..4f7d5a54db0 100644 --- a/src/java.base/share/classes/java/lang/invoke/VarHandle.java +++ b/src/java.base/share/classes/java/lang/invoke/VarHandle.java @@ -39,9 +39,9 @@ import java.util.function.BiFunction; import java.util.function.Function; -import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.util.Preconditions; import jdk.internal.vm.annotation.ForceInline; +import jdk.internal.vm.annotation.IntrinsicCandidate; import jdk.internal.vm.annotation.Stable; import static java.lang.invoke.MethodHandleStatics.UNSAFE; @@ -494,7 +494,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object get(Object... args); /** @@ -520,7 +520,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate void set(Object... args); @@ -552,7 +552,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getVolatile(Object... args); /** @@ -582,7 +582,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate void setVolatile(Object... args); @@ -612,7 +612,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getOpaque(Object... args); /** @@ -639,7 +639,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate void setOpaque(Object... args); @@ -676,7 +676,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAcquire(Object... args); /** @@ -707,7 +707,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate void setRelease(Object... args); @@ -743,7 +743,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate boolean compareAndSet(Object... args); /** @@ -778,7 +778,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object compareAndExchange(Object... args); /** @@ -813,7 +813,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object compareAndExchangeAcquire(Object... args); /** @@ -848,7 +848,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object compareAndExchangeRelease(Object... args); // Weak (spurious failures allowed) @@ -887,7 +887,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate boolean weakCompareAndSetPlain(Object... args); /** @@ -924,7 +924,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate boolean weakCompareAndSet(Object... args); /** @@ -962,7 +962,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate boolean weakCompareAndSetAcquire(Object... args); /** @@ -1000,7 +1000,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate boolean weakCompareAndSetRelease(Object... args); /** @@ -1033,7 +1033,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndSet(Object... args); /** @@ -1066,7 +1066,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndSetAcquire(Object... args); /** @@ -1099,7 +1099,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndSetRelease(Object... args); // Primitive adders @@ -1135,7 +1135,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndAdd(Object... args); /** @@ -1168,7 +1168,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndAddAcquire(Object... args); /** @@ -1201,7 +1201,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndAddRelease(Object... args); @@ -1242,7 +1242,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndBitwiseOr(Object... args); /** @@ -1279,7 +1279,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndBitwiseOrAcquire(Object... args); /** @@ -1316,7 +1316,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndBitwiseOrRelease(Object... args); /** @@ -1353,7 +1353,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndBitwiseAnd(Object... args); /** @@ -1390,7 +1390,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndBitwiseAndAcquire(Object... args); /** @@ -1427,7 +1427,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndBitwiseAndRelease(Object... args); /** @@ -1464,7 +1464,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndBitwiseXor(Object... args); /** @@ -1501,7 +1501,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndBitwiseXorAcquire(Object... args); /** @@ -1538,7 +1538,7 @@ VarHandle asDirect() { */ public final native @MethodHandle.PolymorphicSignature - @HotSpotIntrinsicCandidate + @IntrinsicCandidate Object getAndBitwiseXorRelease(Object... args); diff --git a/src/java.base/share/classes/java/lang/module/Configuration.java b/src/java.base/share/classes/java/lang/module/Configuration.java index 9a9cb533eee..e1b1f39cc32 100644 --- a/src/java.base/share/classes/java/lang/module/Configuration.java +++ b/src/java.base/share/classes/java/lang/module/Configuration.java @@ -41,7 +41,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; import jdk.internal.module.ModuleReferenceImpl; import jdk.internal.module.ModuleTarget; import jdk.internal.vm.annotation.Stable; @@ -110,7 +110,7 @@ public final class Configuration { static { // Initialize EMPTY_CONFIGURATION from the archive. - VM.initializeFromArchive(Configuration.class); + CDS.initializeFromArchive(Configuration.class); // Create a new empty Configuration if there is no archived version. if (EMPTY_CONFIGURATION == null) { EMPTY_CONFIGURATION = new Configuration(); diff --git a/src/java.base/share/classes/java/lang/ref/Reference.java b/src/java.base/share/classes/java/lang/ref/Reference.java index f1d66c747ad..fe680a54a83 100644 --- a/src/java.base/share/classes/java/lang/ref/Reference.java +++ b/src/java.base/share/classes/java/lang/ref/Reference.java @@ -26,7 +26,7 @@ package java.lang.ref; import jdk.internal.vm.annotation.ForceInline; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; import jdk.internal.access.JavaLangRefAccess; import jdk.internal.access.SharedSecrets; import jdk.internal.ref.Cleaner; @@ -328,7 +328,7 @@ public void runFinalization() { * @return The object to which this reference refers, or * {@code null} if this reference object has been cleared */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public T get() { return this.referent; } diff --git a/src/java.base/share/classes/java/lang/reflect/Array.java b/src/java.base/share/classes/java/lang/reflect/Array.java index 0beeb891103..f65942df6fb 100644 --- a/src/java.base/share/classes/java/lang/reflect/Array.java +++ b/src/java.base/share/classes/java/lang/reflect/Array.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -26,7 +26,7 @@ package java.lang.reflect; import java.util.Objects; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * The {@code Array} class provides static methods to dynamically create and @@ -123,7 +123,7 @@ public static Object newInstance(Class<?> componentType, int... dimensions) * @throws IllegalArgumentException if the object argument is not * an array */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native int getLength(Object array) throws IllegalArgumentException; @@ -502,7 +502,7 @@ public static native void setDouble(Object array, int index, double d) * Private */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static native Object newArray(Class<?> componentType, int length) throws NegativeArraySizeException; diff --git a/src/java.base/share/classes/java/lang/reflect/Method.java b/src/java.base/share/classes/java/lang/reflect/Method.java index 44ec634e29f..684c59bd33f 100644 --- a/src/java.base/share/classes/java/lang/reflect/Method.java +++ b/src/java.base/share/classes/java/lang/reflect/Method.java @@ -25,12 +25,12 @@ package java.lang.reflect; -import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.access.SharedSecrets; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.MethodAccessor; import jdk.internal.reflect.Reflection; import jdk.internal.vm.annotation.ForceInline; +import jdk.internal.vm.annotation.IntrinsicCandidate; import sun.reflect.annotation.ExceptionProxy; import sun.reflect.annotation.TypeNotPresentExceptionProxy; import sun.reflect.generics.repository.MethodRepository; @@ -547,7 +547,7 @@ void specificToGenericStringHeader(StringBuilder sb) { */ @CallerSensitive @ForceInline // to ensure Reflection.getCallerClass optimization - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public Object invoke(Object obj, Object... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException diff --git a/src/java.base/share/classes/java/math/BigDecimal.java b/src/java.base/share/classes/java/math/BigDecimal.java index dd9a7c1f97c..bb698a555b6 100644 --- a/src/java.base/share/classes/java/math/BigDecimal.java +++ b/src/java.base/share/classes/java/math/BigDecimal.java @@ -4208,7 +4208,9 @@ static void setIntValVolatile(BigDecimal bd, BigInteger val) { * Reconstitute the {@code BigDecimal} instance from a stream (that is, * deserialize it). * - * @param s the stream being read. + * @param s the stream being read. + * @throws IOException if an I/O error occurs + * @throws ClassNotFoundException if a serialized class cannot be loaded */ @java.io.Serial private void readObject(java.io.ObjectInputStream s) @@ -4227,7 +4229,8 @@ private void readObject(java.io.ObjectInputStream s) /** * Serialize this {@code BigDecimal} to the stream in question * - * @param s the stream to serialize to. + * @param s the stream to serialize to. + * @throws IOException if an I/O error occurs */ @java.io.Serial private void writeObject(java.io.ObjectOutputStream s) diff --git a/src/java.base/share/classes/java/math/BigInteger.java b/src/java.base/share/classes/java/math/BigInteger.java index 1a73abcf1b7..766e65a31bd 100644 --- a/src/java.base/share/classes/java/math/BigInteger.java +++ b/src/java.base/share/classes/java/math/BigInteger.java @@ -40,9 +40,9 @@ import jdk.internal.math.DoubleConsts; import jdk.internal.math.FloatConsts; -import jdk.internal.HotSpotIntrinsicCandidate; -import jdk.internal.vm.annotation.Stable; import jdk.internal.vm.annotation.ForceInline; +import jdk.internal.vm.annotation.IntrinsicCandidate; +import jdk.internal.vm.annotation.Stable; /** * Immutable arbitrary-precision integers. All operations behave as if @@ -1740,7 +1740,7 @@ private static int[] multiplyToLen(int[] x, int xlen, int[] y, int ylen, int[] z return implMultiplyToLen(x, xlen, y, ylen, z); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static int[] implMultiplyToLen(int[] x, int xlen, int[] y, int ylen, int[] z) { int xstart = xlen - 1; int ystart = ylen - 1; @@ -2133,7 +2133,7 @@ private static void implSquareToLenChecks(int[] x, int len, int[] z, int zlen) t /** * Java Runtime may use intrinsic for this method. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static final int[] implSquareToLen(int[] x, int len, int[] z, int zlen) { /* * The algorithm used here is adapted from Colin Plumb's C library. @@ -2836,13 +2836,13 @@ private static int[] materialize(int[] z, int len) { // These methods are intended to be replaced by virtual machine // intrinsics. - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static int[] implMontgomeryMultiply(int[] a, int[] b, int[] n, int len, long inv, int[] product) { product = multiplyToLen(a, len, b, len, product); return montReduce(product, n, len, (int)inv); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static int[] implMontgomerySquare(int[] a, int[] n, int len, long inv, int[] product) { product = squareToLen(a, len, product); @@ -3174,7 +3174,7 @@ private static void implMulAddCheck(int[] out, int[] in, int offset, int len, in /** * Java Runtime may use intrinsic for this method. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static int implMulAdd(int[] out, int[] in, int offset, int len, int k) { long kLong = k & LONG_MASK; long carry = 0; @@ -3355,7 +3355,7 @@ private static int[] shiftLeft(int[] mag, int n) { } @ForceInline - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static void shiftLeftImplWorker(int[] newArr, int[] oldArr, int newIdx, int shiftCount, int numIter) { int shiftCountRight = 32 - shiftCount; int oldIdx = 0; @@ -3440,7 +3440,7 @@ private BigInteger shiftRightImpl(int n) { } @ForceInline - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static void shiftRightImplWorker(int[] newArr, int[] oldArr, int newIdx, int shiftCount, int numIter) { int shiftCountLeft = 32 - shiftCount; int idx = numIter; @@ -4657,6 +4657,10 @@ private int firstNonzeroIntNum() { * marker value. Therefore, no explicit action to set these fields needs to * be taken in readObject because those fields already have a 0 value by * default since defaultReadObject is not being used. + * + * @param s the stream being read. + * @throws IOException if an I/O error occurs + * @throws ClassNotFoundException if a serialized class cannot be loaded */ @java.io.Serial private void readObject(java.io.ObjectInputStream s) @@ -4724,6 +4728,9 @@ static void putMag(BigInteger bi, int[] magnitude) { * {@code firstNonzeroByteNum}, respectively. These values are compatible * with older implementations, but will be ignored by current * implementations. + * + * @param s the stream to serialize to. + * @throws IOException if an I/O error occurs */ @java.io.Serial private void writeObject(ObjectOutputStream s) throws IOException { diff --git a/src/java.base/share/classes/java/math/MathContext.java b/src/java.base/share/classes/java/math/MathContext.java index 9d40482ee49..028ede34de6 100644 --- a/src/java.base/share/classes/java/math/MathContext.java +++ b/src/java.base/share/classes/java/math/MathContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -308,7 +308,9 @@ public java.lang.String toString() { * Reconstitute the {@code MathContext} instance from a stream (that is, * deserialize it). * - * @param s the stream being read. + * @param s the stream being read. + * @throws IOException if an I/O error occurs + * @throws ClassNotFoundException if a serialized class cannot be loaded */ @java.io.Serial private void readObject(java.io.ObjectInputStream s) diff --git a/src/java.base/share/classes/java/net/ProxySelector.java b/src/java.base/share/classes/java/net/ProxySelector.java index 94f236a1bfa..f31ef0aaa1d 100644 --- a/src/java.base/share/classes/java/net/ProxySelector.java +++ b/src/java.base/share/classes/java/net/ProxySelector.java @@ -65,7 +65,7 @@ public abstract class ProxySelector { * * @see #setDefault(ProxySelector) */ - private static ProxySelector theProxySelector; + private static volatile ProxySelector theProxySelector; static { try { diff --git a/src/java.base/share/classes/java/nio/Buffer.java b/src/java.base/share/classes/java/nio/Buffer.java index be074dcf301..b47b3d2b68a 100644 --- a/src/java.base/share/classes/java/nio/Buffer.java +++ b/src/java.base/share/classes/java/nio/Buffer.java @@ -25,7 +25,6 @@ package java.nio; -import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.access.JavaNioAccess; import jdk.internal.access.SharedSecrets; import jdk.internal.access.foreign.MemorySegmentProxy; @@ -33,6 +32,7 @@ import jdk.internal.misc.Unsafe; import jdk.internal.misc.VM.BufferPool; import jdk.internal.vm.annotation.ForceInline; +import jdk.internal.vm.annotation.IntrinsicCandidate; import java.io.FileDescriptor; import java.util.Spliterator; @@ -732,7 +732,7 @@ final int nextPutIndex(int nb) { // package-private * IndexOutOfBoundsException} if it is not smaller than the limit * or is smaller than zero. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate final int checkIndex(int i) { // package-private if ((i < 0) || (i >= limit)) throw new IndexOutOfBoundsException(); diff --git a/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template b/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template index a5f2cbe3f26..4d728d586b3 100644 --- a/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template +++ b/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -583,9 +583,7 @@ public abstract class Charset$Coder$ { CoderResult cr; try { cr = $code$Loop(in, out); - } catch (BufferUnderflowException x) { - throw new CoderMalfunctionError(x); - } catch (BufferOverflowException x) { + } catch (RuntimeException x) { throw new CoderMalfunctionError(x); } diff --git a/src/java.base/share/classes/java/security/KeyStore.java b/src/java.base/share/classes/java/security/KeyStore.java index bec6886b28d..1682f92c726 100644 --- a/src/java.base/share/classes/java/security/KeyStore.java +++ b/src/java.base/share/classes/java/security/KeyStore.java @@ -219,7 +219,7 @@ public class KeyStore { private KeyStoreSpi keyStoreSpi; // Has this keystore been initialized (loaded)? - private boolean initialized = false; + private boolean initialized; /** * A marker interface for {@code KeyStore} @@ -264,7 +264,7 @@ public static class PasswordProtection implements private final char[] password; private final String protectionAlgorithm; private final AlgorithmParameterSpec protectionParameters; - private volatile boolean destroyed = false; + private volatile boolean destroyed; /** * Creates a password parameter. diff --git a/src/java.base/share/classes/java/text/DecimalFormatSymbols.java b/src/java.base/share/classes/java/text/DecimalFormatSymbols.java index a5e3e8422c3..6741fd52667 100644 --- a/src/java.base/share/classes/java/text/DecimalFormatSymbols.java +++ b/src/java.base/share/classes/java/text/DecimalFormatSymbols.java @@ -760,7 +760,6 @@ public boolean equals(Object obj) { /** * Override hashCode. */ - private volatile int hashCode; @Override public int hashCode() { if (hashCode == 0) { @@ -1148,6 +1147,11 @@ private void readObject(ObjectInputStream stream) private transient Currency currency; private transient volatile boolean currencyInitialized; + /** + * Cached hash code. + */ + private transient volatile int hashCode; + // Proclaim JDK 1.1 FCS compatibility @java.io.Serial static final long serialVersionUID = 5772796243397350300L; diff --git a/src/java.base/share/classes/java/time/temporal/TemporalField.java b/src/java.base/share/classes/java/time/temporal/TemporalField.java index a93caa64351..54a523e64c3 100644 --- a/src/java.base/share/classes/java/time/temporal/TemporalField.java +++ b/src/java.base/share/classes/java/time/temporal/TemporalField.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -69,7 +69,7 @@ import java.util.Objects; /** - * A field of date-time, such as month-of-year or hour-of-minute. + * A field of date-time, such as month-of-year or minute-of-hour. * <p> * Date and time is expressed using fields which partition the time-line into something * meaningful for humans. Implementations of this interface represent those fields. diff --git a/src/java.base/share/classes/java/util/Arrays.java b/src/java.base/share/classes/java/util/Arrays.java index 0cc2d6f8766..1a8b27a4284 100644 --- a/src/java.base/share/classes/java/util/Arrays.java +++ b/src/java.base/share/classes/java/util/Arrays.java @@ -25,8 +25,8 @@ package java.util; -import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.util.ArraysSupport; +import jdk.internal.vm.annotation.IntrinsicCandidate; import java.io.Serializable; import java.lang.reflect.Array; @@ -2577,7 +2577,7 @@ public static boolean equals(short[] a, int aFromIndex, int aToIndex, * @param a2 the other array to be tested for equality * @return {@code true} if the two arrays are equal */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static boolean equals(char[] a, char[] a2) { if (a==a2) return true; @@ -2650,7 +2650,7 @@ public static boolean equals(char[] a, int aFromIndex, int aToIndex, * @param a2 the other array to be tested for equality * @return {@code true} if the two arrays are equal */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static boolean equals(byte[] a, byte[] a2) { if (a==a2) return true; @@ -3504,7 +3504,7 @@ public static <T> T[] copyOf(T[] original, int newLength) { * an array of class {@code newType} * @since 1.6 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static <T,U> T[] copyOf(U[] original, int newLength, Class<? extends T[]> newType) { @SuppressWarnings("unchecked") T[] copy = ((Object)newType == (Object)Object[].class) @@ -3774,7 +3774,7 @@ public static <T> T[] copyOfRange(T[] original, int from, int to) { * an array of class {@code newType}. * @since 1.6 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static <T,U> T[] copyOfRange(U[] original, int from, int to, Class<? extends T[]> newType) { int newLength = to - from; if (newLength < 0) diff --git a/src/java.base/share/classes/java/util/Base64.java b/src/java.base/share/classes/java/util/Base64.java index 34b39b18a54..a4a3f27522e 100644 --- a/src/java.base/share/classes/java/util/Base64.java +++ b/src/java.base/share/classes/java/util/Base64.java @@ -33,7 +33,7 @@ import sun.nio.cs.ISO_8859_1; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * This class consists exclusively of static methods for obtaining @@ -418,7 +418,7 @@ public Encoder withoutPadding() { return new Encoder(isURL, newline, linemax, false); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private void encodeBlock(byte[] src, int sp, int sl, byte[] dst, int dp, boolean isURL) { char[] base64 = isURL ? toBase64URL : toBase64; for (int sp0 = sp, dp0 = dp ; sp0 < sl; ) { diff --git a/src/java.base/share/classes/java/util/ImmutableCollections.java b/src/java.base/share/classes/java/util/ImmutableCollections.java index ccf92e2f421..63fdebee948 100644 --- a/src/java.base/share/classes/java/util/ImmutableCollections.java +++ b/src/java.base/share/classes/java/util/ImmutableCollections.java @@ -36,8 +36,9 @@ import java.util.function.Function; import java.util.function.Predicate; import java.util.function.UnaryOperator; +import jdk.internal.access.JavaUtilCollectionAccess; import jdk.internal.access.SharedSecrets; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; import jdk.internal.vm.annotation.Stable; /** @@ -76,7 +77,7 @@ class ImmutableCollections { // derived from the JVM build/version, so can we generate the exact same // CDS archive for the same JDK build. This makes it possible to verify the // consistency of the JDK build. - long seed = VM.getRandomSeedForCDSDump(); + long seed = CDS.getRandomSeedForDumping(); if (seed == 0) { seed = System.nanoTime(); } @@ -100,10 +101,10 @@ class ImmutableCollections { static final MapN<?,?> EMPTY_MAP; static { - VM.initializeFromArchive(ImmutableCollections.class); + CDS.initializeFromArchive(ImmutableCollections.class); if (archivedObjects == null) { EMPTY = new Object(); - EMPTY_LIST = new ListN<>(); + EMPTY_LIST = new ListN<>(new Object[0]); EMPTY_SET = new SetN<>(); EMPTY_MAP = new MapN<>(); archivedObjects = new Object[] { EMPTY, EMPTY_LIST, EMPTY_SET, EMPTY_MAP }; @@ -115,6 +116,16 @@ class ImmutableCollections { } } + static class Access { + static { + SharedSecrets.setJavaUtilCollectionAccess(new JavaUtilCollectionAccess() { + public <E> List<E> listFromTrustedArray(Object[] array) { + return ImmutableCollections.ListN.fromTrustedArray(array); + } + }); + } + } + /** No instances. */ private ImmutableCollections() { } @@ -521,15 +532,31 @@ static final class ListN<E> extends AbstractImmutableList<E> @Stable private final E[] elements; + private ListN(E[] array) { + elements = array; + } + + // creates a new internal array, and checks and rejects null elements @SafeVarargs - ListN(E... input) { + static <E> List<E> fromArray(E... input) { // copy and check manually to avoid TOCTOU @SuppressWarnings("unchecked") E[] tmp = (E[])new Object[input.length]; // implicit nullcheck of input for (int i = 0; i < input.length; i++) { tmp[i] = Objects.requireNonNull(input[i]); } - elements = tmp; + return new ListN<>(tmp); + } + + // Avoids creating a new array, but checks and rejects null elements. + // Declared with Object... arg so that varargs calls don't accidentally + // create an array of a subtype. + @SuppressWarnings("unchecked") + static <E> List<E> fromTrustedArray(Object... input) { + for (Object o : input) { + Objects.requireNonNull(o); + } + return new ListN<>((E[])input); } @Override diff --git a/src/java.base/share/classes/java/util/List.java b/src/java.base/share/classes/java/util/List.java index fc8453c5f78..2496ae6dc6d 100644 --- a/src/java.base/share/classes/java/util/List.java +++ b/src/java.base/share/classes/java/util/List.java @@ -842,7 +842,7 @@ static <E> List<E> of(E e1, E e2) { * @since 9 */ static <E> List<E> of(E e1, E e2, E e3) { - return new ImmutableCollections.ListN<>(e1, e2, e3); + return ImmutableCollections.ListN.fromTrustedArray(e1, e2, e3); } /** @@ -861,7 +861,7 @@ static <E> List<E> of(E e1, E e2, E e3) { * @since 9 */ static <E> List<E> of(E e1, E e2, E e3, E e4) { - return new ImmutableCollections.ListN<>(e1, e2, e3, e4); + return ImmutableCollections.ListN.fromTrustedArray(e1, e2, e3, e4); } /** @@ -881,7 +881,7 @@ static <E> List<E> of(E e1, E e2, E e3, E e4) { * @since 9 */ static <E> List<E> of(E e1, E e2, E e3, E e4, E e5) { - return new ImmutableCollections.ListN<>(e1, e2, e3, e4, e5); + return ImmutableCollections.ListN.fromTrustedArray(e1, e2, e3, e4, e5); } /** @@ -902,8 +902,8 @@ static <E> List<E> of(E e1, E e2, E e3, E e4, E e5) { * @since 9 */ static <E> List<E> of(E e1, E e2, E e3, E e4, E e5, E e6) { - return new ImmutableCollections.ListN<>(e1, e2, e3, e4, e5, - e6); + return ImmutableCollections.ListN.fromTrustedArray(e1, e2, e3, e4, e5, + e6); } /** @@ -925,8 +925,8 @@ static <E> List<E> of(E e1, E e2, E e3, E e4, E e5, E e6) { * @since 9 */ static <E> List<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7) { - return new ImmutableCollections.ListN<>(e1, e2, e3, e4, e5, - e6, e7); + return ImmutableCollections.ListN.fromTrustedArray(e1, e2, e3, e4, e5, + e6, e7); } /** @@ -949,8 +949,8 @@ static <E> List<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7) { * @since 9 */ static <E> List<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8) { - return new ImmutableCollections.ListN<>(e1, e2, e3, e4, e5, - e6, e7, e8); + return ImmutableCollections.ListN.fromTrustedArray(e1, e2, e3, e4, e5, + e6, e7, e8); } /** @@ -974,8 +974,8 @@ static <E> List<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8) { * @since 9 */ static <E> List<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9) { - return new ImmutableCollections.ListN<>(e1, e2, e3, e4, e5, - e6, e7, e8, e9); + return ImmutableCollections.ListN.fromTrustedArray(e1, e2, e3, e4, e5, + e6, e7, e8, e9); } /** @@ -1000,8 +1000,8 @@ static <E> List<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9) { * @since 9 */ static <E> List<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10) { - return new ImmutableCollections.ListN<>(e1, e2, e3, e4, e5, - e6, e7, e8, e9, e10); + return ImmutableCollections.ListN.fromTrustedArray(e1, e2, e3, e4, e5, + e6, e7, e8, e9, e10); } /** @@ -1042,7 +1042,7 @@ static <E> List<E> of(E... elements) { case 2: return new ImmutableCollections.List12<>(elements[0], elements[1]); default: - return new ImmutableCollections.ListN<>(elements); + return ImmutableCollections.ListN.fromArray(elements); } } diff --git a/src/java.base/share/classes/java/util/ListResourceBundle.java b/src/java.base/share/classes/java/util/ListResourceBundle.java index d2e4cd0e344..053d70b1cf7 100644 --- a/src/java.base/share/classes/java/util/ListResourceBundle.java +++ b/src/java.base/share/classes/java/util/ListResourceBundle.java @@ -206,5 +206,5 @@ private synchronized void loadLookup() { lookup = temp; } - private volatile Map<String,Object> lookup = null; + private volatile Map<String,Object> lookup; } diff --git a/src/java.base/share/classes/java/util/Locale.java b/src/java.base/share/classes/java/util/Locale.java index ca3cdb4c45d..a01e279b46a 100644 --- a/src/java.base/share/classes/java/util/Locale.java +++ b/src/java.base/share/classes/java/util/Locale.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -2187,7 +2187,7 @@ public boolean equals(Object obj) { /** * Return an array of the display names of the variant. - * @param bundle the ResourceBundle to use to get the display names + * @param inLocale The locale for which to retrieve the display variant. * @return an array of display names, possible of zero length. */ private String[] getDisplayVariantArray(Locale inLocale) { @@ -3335,8 +3335,7 @@ public boolean equals(Object obj) { return false; } LanguageRange other = (LanguageRange)obj; - return hash == other.hash - && range.equals(other.range) + return range.equals(other.range) && weight == other.weight; } diff --git a/src/java.base/share/classes/java/util/jar/Attributes.java b/src/java.base/share/classes/java/util/jar/Attributes.java index 79cb2fe1c47..d2cd77d5a3b 100644 --- a/src/java.base/share/classes/java/util/jar/Attributes.java +++ b/src/java.base/share/classes/java/util/jar/Attributes.java @@ -34,7 +34,7 @@ import java.util.Objects; import java.util.Set; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; import jdk.internal.vm.annotation.Stable; import sun.nio.cs.UTF_8; @@ -672,7 +672,7 @@ private static void addName(Map<String, Name> names, Name name) { static { - VM.initializeFromArchive(Attributes.Name.class); + CDS.initializeFromArchive(Attributes.Name.class); if (KNOWN_NAMES == null) { MANIFEST_VERSION = new Name("Manifest-Version"); diff --git a/src/java.base/share/classes/java/util/stream/Collectors.java b/src/java.base/share/classes/java/util/stream/Collectors.java index 29832411c79..a5a6d2f626d 100644 --- a/src/java.base/share/classes/java/util/stream/Collectors.java +++ b/src/java.base/share/classes/java/util/stream/Collectors.java @@ -56,6 +56,8 @@ import java.util.function.ToIntFunction; import java.util.function.ToLongFunction; +import jdk.internal.access.SharedSecrets; + /** * Implementations of {@link Collector} that implement various useful reduction * operations, such as accumulating elements into collections, summarizing @@ -296,7 +298,8 @@ public Set<Characteristics> characteristics() { Collector<T, ?, List<T>> toUnmodifiableList() { return new CollectorImpl<>((Supplier<List<T>>) ArrayList::new, List::add, (left, right) -> { left.addAll(right); return left; }, - list -> (List<T>)List.of(list.toArray()), + list -> (List<T>)SharedSecrets.getJavaUtilCollectionAccess() + .listFromTrustedArray(list.toArray()), CH_NOID); } diff --git a/src/java.base/share/classes/java/util/stream/Streams.java b/src/java.base/share/classes/java/util/stream/Streams.java index 0d2c23051ff..aa696c5ddb5 100644 --- a/src/java.base/share/classes/java/util/stream/Streams.java +++ b/src/java.base/share/classes/java/util/stream/Streams.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -31,7 +31,7 @@ import java.util.function.DoubleConsumer; import java.util.function.IntConsumer; import java.util.function.LongConsumer; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * Utility methods for operating on and creating streams. @@ -91,7 +91,7 @@ else if (last > 0) { } @Override - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public void forEachRemaining(IntConsumer consumer) { Objects.requireNonNull(consumer); diff --git a/src/java.base/share/classes/java/util/zip/Adler32.java b/src/java.base/share/classes/java/util/zip/Adler32.java index 850108be410..ee7c06e619d 100644 --- a/src/java.base/share/classes/java/util/zip/Adler32.java +++ b/src/java.base/share/classes/java/util/zip/Adler32.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -28,7 +28,7 @@ import java.nio.ByteBuffer; import sun.nio.ch.DirectBuffer; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * A class that can be used to compute the Adler-32 checksum of a data @@ -129,10 +129,10 @@ public long getValue() { private static native int update(int adler, int b); - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static native int updateBytes(int adler, byte[] b, int off, int len); - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static native int updateByteBuffer(int adler, long addr, int off, int len); diff --git a/src/java.base/share/classes/java/util/zip/CRC32.java b/src/java.base/share/classes/java/util/zip/CRC32.java index 727dc68292a..a70afb90e51 100644 --- a/src/java.base/share/classes/java/util/zip/CRC32.java +++ b/src/java.base/share/classes/java/util/zip/CRC32.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -29,7 +29,7 @@ import java.util.Objects; import sun.nio.ch.DirectBuffer; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * A class that can be used to compute the CRC-32 of a data stream. @@ -126,7 +126,7 @@ public long getValue() { return (long)crc & 0xffffffffL; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static native int update(int crc, int b); private static int updateBytes(int crc, byte[] b, int off, int len) { @@ -134,7 +134,7 @@ private static int updateBytes(int crc, byte[] b, int off, int len) { return updateBytes0(crc, b, off, len); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static native int updateBytes0(int crc, byte[] b, int off, int len); private static void updateBytesCheck(byte[] b, int off, int len) { @@ -160,7 +160,7 @@ private static int updateByteBuffer(int alder, long addr, return updateByteBuffer0(alder, addr, off, len); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static native int updateByteBuffer0(int alder, long addr, int off, int len); diff --git a/src/java.base/share/classes/java/util/zip/CRC32C.java b/src/java.base/share/classes/java/util/zip/CRC32C.java index 3b414954417..0359a798816 100644 --- a/src/java.base/share/classes/java/util/zip/CRC32C.java +++ b/src/java.base/share/classes/java/util/zip/CRC32C.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 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 @@ -27,8 +27,8 @@ import java.nio.ByteBuffer; import java.nio.ByteOrder; -import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.misc.Unsafe; +import jdk.internal.vm.annotation.IntrinsicCandidate; import sun.nio.ch.DirectBuffer; /** @@ -206,7 +206,7 @@ public long getValue() { /** * Updates the CRC-32C checksum with the specified array of bytes. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static int updateBytes(int crc, byte[] b, int off, int end) { // Do only byte reads for arrays so short they can't be aligned @@ -281,7 +281,7 @@ private static int updateBytes(int crc, byte[] b, int off, int end) { /** * Updates the CRC-32C checksum reading from the specified address. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static int updateDirectByteBuffer(int crc, long address, int off, int end) { diff --git a/src/java.base/share/classes/javax/security/auth/Subject.java b/src/java.base/share/classes/javax/security/auth/Subject.java index 84381b5c354..5be9d23f739 100644 --- a/src/java.base/share/classes/javax/security/auth/Subject.java +++ b/src/java.base/share/classes/javax/security/auth/Subject.java @@ -126,7 +126,7 @@ public final class Subject implements java.io.Serializable { * * @serial */ - private volatile boolean readOnly = false; + private volatile boolean readOnly; private static final int PRINCIPAL_SET = 1; private static final int PUB_CREDENTIAL_SET = 2; diff --git a/src/java.base/share/classes/jdk/internal/access/JavaUtilCollectionAccess.java b/src/java.base/share/classes/jdk/internal/access/JavaUtilCollectionAccess.java new file mode 100644 index 00000000000..137b2828299 --- /dev/null +++ b/src/java.base/share/classes/jdk/internal/access/JavaUtilCollectionAccess.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.internal.access; + +import java.util.List; + +public interface JavaUtilCollectionAccess { + <E> List<E> listFromTrustedArray(Object[] array); +} diff --git a/src/java.base/share/classes/jdk/internal/access/SharedSecrets.java b/src/java.base/share/classes/jdk/internal/access/SharedSecrets.java index 3dd7fc5586e..1111afcf883 100644 --- a/src/java.base/share/classes/jdk/internal/access/SharedSecrets.java +++ b/src/java.base/share/classes/jdk/internal/access/SharedSecrets.java @@ -70,6 +70,7 @@ public class SharedSecrets { private static JavaNetUriAccess javaNetUriAccess; private static JavaNetURLAccess javaNetURLAccess; private static JavaNioAccess javaNioAccess; + private static JavaUtilCollectionAccess javaUtilCollectionAccess; private static JavaUtilJarAccess javaUtilJarAccess; private static JavaUtilZipFileAccess javaUtilZipFileAccess; private static JavaUtilResourceBundleAccess javaUtilResourceBundleAccess; @@ -77,6 +78,19 @@ public class SharedSecrets { private static JavaSecuritySignatureAccess javaSecuritySignatureAccess; private static JavaxCryptoSealedObjectAccess javaxCryptoSealedObjectAccess; + public static void setJavaUtilCollectionAccess(JavaUtilCollectionAccess juca) { + javaUtilCollectionAccess = juca; + } + + public static JavaUtilCollectionAccess getJavaUtilCollectionAccess() { + if (javaUtilCollectionAccess == null) { + try { + Class.forName("java.util.ImmutableCollections$Access", true, null); + } catch (ClassNotFoundException e) {}; + } + return javaUtilCollectionAccess; + } + public static JavaUtilJarAccess javaUtilJarAccess() { if (javaUtilJarAccess == null) { // Ensure JarFile is initialized; we know that this class diff --git a/src/java.base/share/classes/jdk/internal/loader/ArchivedClassLoaders.java b/src/java.base/share/classes/jdk/internal/loader/ArchivedClassLoaders.java index 48cd4e2e6dc..7113b521f4d 100644 --- a/src/java.base/share/classes/jdk/internal/loader/ArchivedClassLoaders.java +++ b/src/java.base/share/classes/jdk/internal/loader/ArchivedClassLoaders.java @@ -25,7 +25,7 @@ package jdk.internal.loader; import java.util.Map; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; import jdk.internal.module.ServicesCatalog; /** @@ -91,6 +91,6 @@ static ArchivedClassLoaders get() { } static { - VM.initializeFromArchive(ArchivedClassLoaders.class); + CDS.initializeFromArchive(ArchivedClassLoaders.class); } } diff --git a/src/java.base/share/classes/jdk/internal/math/FDBigInteger.java b/src/java.base/share/classes/jdk/internal/math/FDBigInteger.java index b522d3121a0..f6d868dfcc2 100644 --- a/src/java.base/share/classes/jdk/internal/math/FDBigInteger.java +++ b/src/java.base/share/classes/jdk/internal/math/FDBigInteger.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -24,7 +24,7 @@ */ package jdk.internal.math; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; import java.math.BigInteger; import java.util.Arrays; @@ -84,7 +84,7 @@ // Initialize FDBigInteger cache of powers of 5. static { - VM.initializeFromArchive(FDBigInteger.class); + CDS.initializeFromArchive(FDBigInteger.class); Object[] caches = archivedCaches; if (caches == null) { long[] long5pow = { diff --git a/src/java.base/share/classes/jdk/internal/misc/CDS.java b/src/java.base/share/classes/jdk/internal/misc/CDS.java new file mode 100644 index 00000000000..0992e9599b5 --- /dev/null +++ b/src/java.base/share/classes/jdk/internal/misc/CDS.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.internal.misc; + +public class CDS { + /** + * Initialize archived static fields in the given Class using archived + * values from CDS dump time. Also initialize the classes of objects in + * the archived graph referenced by those fields. + * + * Those static fields remain as uninitialized if there is no mapped CDS + * java heap data or there is any error during initialization of the + * object class in the archived graph. + */ + public static native void initializeFromArchive(Class<?> c); + + /** + * Ensure that the native representation of all archived java.lang.Module objects + * are properly restored. + */ + public static native void defineArchivedModules(ClassLoader platformLoader, ClassLoader systemLoader); + + /** + * Returns a predictable "random" seed derived from the VM's build ID and version, + * to be used by java.util.ImmutableCollections to ensure that archived + * ImmutableCollections are always sorted the same order for the same VM build. + */ + public static native long getRandomSeedForDumping(); + + /** + * Check if dynamic dumping is enabled via the DynamicDumpSharedSpaces flag. + */ + public static native boolean isDynamicDumpingEnabled(); // will return false for static dumping. + + /** + * Check if sharing is enabled via the UseSharedSpaces flag. + */ + public static native boolean isSharingEnabled(); +} diff --git a/src/java.base/share/classes/jdk/internal/misc/Unsafe.java b/src/java.base/share/classes/jdk/internal/misc/Unsafe.java index 56455f3ad02..c338d9f1e81 100644 --- a/src/java.base/share/classes/jdk/internal/misc/Unsafe.java +++ b/src/java.base/share/classes/jdk/internal/misc/Unsafe.java @@ -25,9 +25,9 @@ package jdk.internal.misc; -import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.ref.Cleaner; import jdk.internal.vm.annotation.ForceInline; +import jdk.internal.vm.annotation.IntrinsicCandidate; import sun.nio.ch.DirectBuffer; import java.lang.reflect.Field; @@ -151,7 +151,7 @@ public static Unsafe getUnsafe() { * @throws RuntimeException No defined exceptions are thrown, not even * {@link NullPointerException} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native int getInt(Object o, long offset); /** @@ -174,7 +174,7 @@ public static Unsafe getUnsafe() { * @throws RuntimeException No defined exceptions are thrown, not even * {@link NullPointerException} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putInt(Object o, long offset, int x); private static final int JVM_ACC_FIELD_INLINED = 0x00008000; // HotSpot-specific bit @@ -198,7 +198,7 @@ public boolean isFlattened(Field f) { * * @see #getInt(Object, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native Object getReference(Object o, long offset); /** @@ -213,7 +213,7 @@ public boolean isFlattened(Field f) { * are updated. * @see #putInt(Object, long, int) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putReference(Object o, long offset, Object x); /** @@ -233,7 +233,7 @@ public boolean isFlattened(Field f) { * @throws RuntimeException No defined exceptions are thrown, not even * {@link NullPointerException} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native <V> V getValue(Object o, long offset, Class<?> vc); /** @@ -253,7 +253,7 @@ public boolean isFlattened(Field f) { * @throws RuntimeException No defined exceptions are thrown, not even * {@link NullPointerException} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native <V> void putValue(Object o, long offset, Class<?> vc, V v); /** @@ -296,7 +296,7 @@ public Object getReferenceVolatile(Object o, long offset, Class<?> vc) { * @param value a value instance * @param <V> the type of the given value instance */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native <V> V makePrivateBuffer(V value); /** @@ -305,7 +305,7 @@ public Object getReferenceVolatile(Object o, long offset, Class<?> vc) { * @param value a value instance * @param <V> the type of the given value instance */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native <V> V finishPrivateBuffer(V value); /** @@ -318,59 +318,59 @@ public Object getReferenceVolatile(Object o, long offset, Class<?> vc) { public native <V> long valueHeaderSize(Class<V> vc); /** @see #getInt(Object, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native boolean getBoolean(Object o, long offset); /** @see #putInt(Object, long, int) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putBoolean(Object o, long offset, boolean x); /** @see #getInt(Object, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native byte getByte(Object o, long offset); /** @see #putInt(Object, long, int) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putByte(Object o, long offset, byte x); /** @see #getInt(Object, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native short getShort(Object o, long offset); /** @see #putInt(Object, long, int) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putShort(Object o, long offset, short x); /** @see #getInt(Object, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native char getChar(Object o, long offset); /** @see #putInt(Object, long, int) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putChar(Object o, long offset, char x); /** @see #getInt(Object, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native long getLong(Object o, long offset); /** @see #putInt(Object, long, int) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putLong(Object o, long offset, long x); /** @see #getInt(Object, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native float getFloat(Object o, long offset); /** @see #putInt(Object, long, int) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putFloat(Object o, long offset, float x); /** @see #getInt(Object, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native double getDouble(Object o, long offset); /** @see #putInt(Object, long, int) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putDouble(Object o, long offset, double x); /** @@ -1136,19 +1136,19 @@ private void checkWritebackEnabled() { * @param address * the start address of the cache line to be written back */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private native void writeback0(long address); /** * Serialize writeback operations relative to preceding memory writes. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private native void writebackPreSync0(); /** * Serialize writeback operations relative to following memory writes. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private native void writebackPostSync0(); /// random queries @@ -1491,7 +1491,7 @@ public Class<?> defineAnonymousClass(Class<?> hostClass, byte[] data, Object[] c * Allocates an instance but does not run any constructor. * Initializes the class if it has not yet been. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native Object allocateInstance(Class<?> cls) throws InstantiationException; @@ -1533,7 +1533,7 @@ public Object allocateUninitializedArray(Class<?> componentType, int length) { return allocateUninitializedArray0(componentType, length); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private Object allocateUninitializedArray0(Class<?> componentType, int length) { // These fallbacks provide zeroed arrays, but intrinsic is not required to // return the zeroed arrays. @@ -1560,7 +1560,7 @@ private Object allocateUninitializedArray0(Class<?> componentType, int length) { * * @return {@code true} if successful */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native boolean compareAndSetReference(Object o, long offset, Object expected, Object x); @@ -1612,7 +1612,7 @@ public final <V> boolean compareAndSetValue(Object o, long offset, } } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native Object compareAndExchangeReference(Object o, long offset, Object expected, Object x); @@ -1648,7 +1648,7 @@ public final <V> Object compareAndExchangeValue(Object o, long offset, } } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final Object compareAndExchangeReferenceAcquire(Object o, long offset, Object expected, Object x) { @@ -1670,7 +1670,7 @@ public final <V> Object compareAndExchangeValueAcquire(Object o, long offset, return compareAndExchangeValue(o, offset, valueType, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final Object compareAndExchangeReferenceRelease(Object o, long offset, Object expected, Object x) { @@ -1692,7 +1692,7 @@ public final <V> Object compareAndExchangeValueRelease(Object o, long offset, return compareAndExchangeValue(o, offset, valueType, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetReferencePlain(Object o, long offset, Object expected, Object x) { @@ -1718,7 +1718,7 @@ public final <V> boolean weakCompareAndSetValuePlain(Object o, long offset, return compareAndSetValue(o, offset, valueType, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetReferenceAcquire(Object o, long offset, Object expected, Object x) { @@ -1744,7 +1744,7 @@ public final <V> boolean weakCompareAndSetValueAcquire(Object o, long offset, return compareAndSetValue(o, offset, valueType, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetReferenceRelease(Object o, long offset, Object expected, Object x) { @@ -1770,7 +1770,7 @@ public final <V> boolean weakCompareAndSetValueRelease(Object o, long offset, return compareAndSetValue(o, offset, valueType, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetReference(Object o, long offset, Object expected, Object x) { @@ -1805,59 +1805,59 @@ public final <V> boolean weakCompareAndSetValue(Object o, long offset, * * @return {@code true} if successful */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native boolean compareAndSetInt(Object o, long offset, int expected, int x); - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native int compareAndExchangeInt(Object o, long offset, int expected, int x); - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final int compareAndExchangeIntAcquire(Object o, long offset, int expected, int x) { return compareAndExchangeInt(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final int compareAndExchangeIntRelease(Object o, long offset, int expected, int x) { return compareAndExchangeInt(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetIntPlain(Object o, long offset, int expected, int x) { return compareAndSetInt(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetIntAcquire(Object o, long offset, int expected, int x) { return compareAndSetInt(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetIntRelease(Object o, long offset, int expected, int x) { return compareAndSetInt(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetInt(Object o, long offset, int expected, int x) { return compareAndSetInt(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final byte compareAndExchangeByte(Object o, long offset, byte expected, byte x) { @@ -1879,56 +1879,56 @@ public final byte compareAndExchangeByte(Object o, long offset, return expected; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean compareAndSetByte(Object o, long offset, byte expected, byte x) { return compareAndExchangeByte(o, offset, expected, x) == expected; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetByte(Object o, long offset, byte expected, byte x) { return compareAndSetByte(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetByteAcquire(Object o, long offset, byte expected, byte x) { return weakCompareAndSetByte(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetByteRelease(Object o, long offset, byte expected, byte x) { return weakCompareAndSetByte(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetBytePlain(Object o, long offset, byte expected, byte x) { return weakCompareAndSetByte(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final byte compareAndExchangeByteAcquire(Object o, long offset, byte expected, byte x) { return compareAndExchangeByte(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final byte compareAndExchangeByteRelease(Object o, long offset, byte expected, byte x) { return compareAndExchangeByte(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final short compareAndExchangeShort(Object o, long offset, short expected, short x) { @@ -1954,35 +1954,35 @@ public final short compareAndExchangeShort(Object o, long offset, return expected; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean compareAndSetShort(Object o, long offset, short expected, short x) { return compareAndExchangeShort(o, offset, expected, x) == expected; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetShort(Object o, long offset, short expected, short x) { return compareAndSetShort(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetShortAcquire(Object o, long offset, short expected, short x) { return weakCompareAndSetShort(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetShortRelease(Object o, long offset, short expected, short x) { return weakCompareAndSetShort(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetShortPlain(Object o, long offset, short expected, short x) { @@ -1990,14 +1990,14 @@ public final boolean weakCompareAndSetShortPlain(Object o, long offset, } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final short compareAndExchangeShortAcquire(Object o, long offset, short expected, short x) { return compareAndExchangeShort(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final short compareAndExchangeShortRelease(Object o, long offset, short expected, short x) { @@ -2352,52 +2352,52 @@ public final boolean weakCompareAndSetDouble(Object o, long offset, * * @return {@code true} if successful */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native boolean compareAndSetLong(Object o, long offset, long expected, long x); - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native long compareAndExchangeLong(Object o, long offset, long expected, long x); - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final long compareAndExchangeLongAcquire(Object o, long offset, long expected, long x) { return compareAndExchangeLong(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final long compareAndExchangeLongRelease(Object o, long offset, long expected, long x) { return compareAndExchangeLong(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetLongPlain(Object o, long offset, long expected, long x) { return compareAndSetLong(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetLongAcquire(Object o, long offset, long expected, long x) { return compareAndSetLong(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetLongRelease(Object o, long offset, long expected, long x) { return compareAndSetLong(o, offset, expected, x); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean weakCompareAndSetLong(Object o, long offset, long expected, long x) { @@ -2408,7 +2408,7 @@ public final boolean weakCompareAndSetLong(Object o, long offset, * Fetches a reference value from a given Java variable, with volatile * load semantics. Otherwise identical to {@link #getReference(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native Object getReferenceVolatile(Object o, long offset); /** @@ -2428,7 +2428,7 @@ public final <V> Object getValueVolatile(Object base, long offset, Class<?> valu * Stores a reference value into a given Java variable, with * volatile store semantics. Otherwise identical to {@link #putReference(Object, long, Object)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putReferenceVolatile(Object o, long offset, Object x); public final <V> void putValueVolatile(Object o, long offset, Class<?> valueType, V x) { @@ -2438,73 +2438,73 @@ public final <V> void putValueVolatile(Object o, long offset, Class<?> valueType } /** Volatile version of {@link #getInt(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native int getIntVolatile(Object o, long offset); /** Volatile version of {@link #putInt(Object, long, int)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putIntVolatile(Object o, long offset, int x); /** Volatile version of {@link #getBoolean(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native boolean getBooleanVolatile(Object o, long offset); /** Volatile version of {@link #putBoolean(Object, long, boolean)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putBooleanVolatile(Object o, long offset, boolean x); /** Volatile version of {@link #getByte(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native byte getByteVolatile(Object o, long offset); /** Volatile version of {@link #putByte(Object, long, byte)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putByteVolatile(Object o, long offset, byte x); /** Volatile version of {@link #getShort(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native short getShortVolatile(Object o, long offset); /** Volatile version of {@link #putShort(Object, long, short)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putShortVolatile(Object o, long offset, short x); /** Volatile version of {@link #getChar(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native char getCharVolatile(Object o, long offset); /** Volatile version of {@link #putChar(Object, long, char)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putCharVolatile(Object o, long offset, char x); /** Volatile version of {@link #getLong(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native long getLongVolatile(Object o, long offset); /** Volatile version of {@link #putLong(Object, long, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putLongVolatile(Object o, long offset, long x); /** Volatile version of {@link #getFloat(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native float getFloatVolatile(Object o, long offset); /** Volatile version of {@link #putFloat(Object, long, float)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putFloatVolatile(Object o, long offset, float x); /** Volatile version of {@link #getDouble(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native double getDoubleVolatile(Object o, long offset); /** Volatile version of {@link #putDouble(Object, long, double)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void putDoubleVolatile(Object o, long offset, double x); /** Acquire version of {@link #getReferenceVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final Object getReferenceAcquire(Object o, long offset) { return getReferenceVolatile(o, offset); } @@ -2514,49 +2514,49 @@ public final <V> Object getValueAcquire(Object base, long offset, Class<?> value } /** Acquire version of {@link #getBooleanVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean getBooleanAcquire(Object o, long offset) { return getBooleanVolatile(o, offset); } /** Acquire version of {@link #getByteVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final byte getByteAcquire(Object o, long offset) { return getByteVolatile(o, offset); } /** Acquire version of {@link #getShortVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final short getShortAcquire(Object o, long offset) { return getShortVolatile(o, offset); } /** Acquire version of {@link #getCharVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final char getCharAcquire(Object o, long offset) { return getCharVolatile(o, offset); } /** Acquire version of {@link #getIntVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final int getIntAcquire(Object o, long offset) { return getIntVolatile(o, offset); } /** Acquire version of {@link #getFloatVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final float getFloatAcquire(Object o, long offset) { return getFloatVolatile(o, offset); } /** Acquire version of {@link #getLongVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final long getLongAcquire(Object o, long offset) { return getLongVolatile(o, offset); } /** Acquire version of {@link #getDoubleVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final double getDoubleAcquire(Object o, long offset) { return getDoubleVolatile(o, offset); } @@ -2572,7 +2572,7 @@ public final double getDoubleAcquire(Object o, long offset) { */ /** Release version of {@link #putReferenceVolatile(Object, long, Object)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putReferenceRelease(Object o, long offset, Object x) { putReferenceVolatile(o, offset, x); } @@ -2582,49 +2582,49 @@ public final <V> void putValueRelease(Object o, long offset, Class<?> valueType, } /** Release version of {@link #putBooleanVolatile(Object, long, boolean)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putBooleanRelease(Object o, long offset, boolean x) { putBooleanVolatile(o, offset, x); } /** Release version of {@link #putByteVolatile(Object, long, byte)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putByteRelease(Object o, long offset, byte x) { putByteVolatile(o, offset, x); } /** Release version of {@link #putShortVolatile(Object, long, short)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putShortRelease(Object o, long offset, short x) { putShortVolatile(o, offset, x); } /** Release version of {@link #putCharVolatile(Object, long, char)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putCharRelease(Object o, long offset, char x) { putCharVolatile(o, offset, x); } /** Release version of {@link #putIntVolatile(Object, long, int)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putIntRelease(Object o, long offset, int x) { putIntVolatile(o, offset, x); } /** Release version of {@link #putFloatVolatile(Object, long, float)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putFloatRelease(Object o, long offset, float x) { putFloatVolatile(o, offset, x); } /** Release version of {@link #putLongVolatile(Object, long, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putLongRelease(Object o, long offset, long x) { putLongVolatile(o, offset, x); } /** Release version of {@link #putDoubleVolatile(Object, long, double)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putDoubleRelease(Object o, long offset, double x) { putDoubleVolatile(o, offset, x); } @@ -2632,7 +2632,7 @@ public final void putDoubleRelease(Object o, long offset, double x) { // ------------------------------ Opaque -------------------------------------- /** Opaque version of {@link #getReferenceVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final Object getReferenceOpaque(Object o, long offset) { return getReferenceVolatile(o, offset); } @@ -2642,55 +2642,55 @@ public final <V> Object getValueOpaque(Object base, long offset, Class<?> valueT } /** Opaque version of {@link #getBooleanVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final boolean getBooleanOpaque(Object o, long offset) { return getBooleanVolatile(o, offset); } /** Opaque version of {@link #getByteVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final byte getByteOpaque(Object o, long offset) { return getByteVolatile(o, offset); } /** Opaque version of {@link #getShortVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final short getShortOpaque(Object o, long offset) { return getShortVolatile(o, offset); } /** Opaque version of {@link #getCharVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final char getCharOpaque(Object o, long offset) { return getCharVolatile(o, offset); } /** Opaque version of {@link #getIntVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final int getIntOpaque(Object o, long offset) { return getIntVolatile(o, offset); } /** Opaque version of {@link #getFloatVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final float getFloatOpaque(Object o, long offset) { return getFloatVolatile(o, offset); } /** Opaque version of {@link #getLongVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final long getLongOpaque(Object o, long offset) { return getLongVolatile(o, offset); } /** Opaque version of {@link #getDoubleVolatile(Object, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final double getDoubleOpaque(Object o, long offset) { return getDoubleVolatile(o, offset); } /** Opaque version of {@link #putReferenceVolatile(Object, long, Object)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putReferenceOpaque(Object o, long offset, Object x) { putReferenceVolatile(o, offset, x); } @@ -2700,49 +2700,49 @@ public final <V> void putValueOpaque(Object o, long offset, Class<?> valueType, } /** Opaque version of {@link #putBooleanVolatile(Object, long, boolean)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putBooleanOpaque(Object o, long offset, boolean x) { putBooleanVolatile(o, offset, x); } /** Opaque version of {@link #putByteVolatile(Object, long, byte)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putByteOpaque(Object o, long offset, byte x) { putByteVolatile(o, offset, x); } /** Opaque version of {@link #putShortVolatile(Object, long, short)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putShortOpaque(Object o, long offset, short x) { putShortVolatile(o, offset, x); } /** Opaque version of {@link #putCharVolatile(Object, long, char)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putCharOpaque(Object o, long offset, char x) { putCharVolatile(o, offset, x); } /** Opaque version of {@link #putIntVolatile(Object, long, int)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putIntOpaque(Object o, long offset, int x) { putIntVolatile(o, offset, x); } /** Opaque version of {@link #putFloatVolatile(Object, long, float)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putFloatOpaque(Object o, long offset, float x) { putFloatVolatile(o, offset, x); } /** Opaque version of {@link #putLongVolatile(Object, long, long)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putLongOpaque(Object o, long offset, long x) { putLongVolatile(o, offset, x); } /** Opaque version of {@link #putDoubleVolatile(Object, long, double)} */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putDoubleOpaque(Object o, long offset, double x) { putDoubleVolatile(o, offset, x); } @@ -2759,7 +2759,7 @@ public final void putDoubleOpaque(Object o, long offset, double x) { * * @param thread the thread to unpark. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void unpark(Object thread); /** @@ -2773,7 +2773,7 @@ public final void putDoubleOpaque(Object o, long offset, double x) { * because {@code unpark} is, so it would be strange to place it * elsewhere. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void park(boolean isAbsolute, long time); /** @@ -2813,7 +2813,7 @@ public int getLoadAverage(double[] loadavg, int nelems) { * @return the previous value * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final int getAndAddInt(Object o, long offset, int delta) { int v; do { @@ -2851,7 +2851,7 @@ public final int getAndAddIntAcquire(Object o, long offset, int delta) { * @return the previous value * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final long getAndAddLong(Object o, long offset, long delta) { long v; do { @@ -2878,7 +2878,7 @@ public final long getAndAddLongAcquire(Object o, long offset, long delta) { return v; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final byte getAndAddByte(Object o, long offset, byte delta) { byte v; do { @@ -2905,7 +2905,7 @@ public final byte getAndAddByteAcquire(Object o, long offset, byte delta) { return v; } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final short getAndAddShort(Object o, long offset, short delta) { short v; do { @@ -3048,7 +3048,7 @@ public final double getAndAddDoubleAcquire(Object o, long offset, double delta) * @return the previous value * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final int getAndSetInt(Object o, long offset, int newValue) { int v; do { @@ -3086,7 +3086,7 @@ public final int getAndSetIntAcquire(Object o, long offset, int newValue) { * @return the previous value * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final long getAndSetLong(Object o, long offset, long newValue) { long v; do { @@ -3124,7 +3124,7 @@ public final long getAndSetLongAcquire(Object o, long offset, long newValue) { * @return the previous value * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final Object getAndSetReference(Object o, long offset, Object newValue) { Object v; do { @@ -3170,7 +3170,7 @@ public final <V> Object getAndSetValueAcquire(Object o, long offset, Class<?> va return getAndSetValue(o, offset, valueType, newValue); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final byte getAndSetByte(Object o, long offset, byte newValue) { byte v; do { @@ -3212,7 +3212,7 @@ public final boolean getAndSetBooleanAcquire(Object o, long offset, boolean newV return byte2bool(getAndSetByteAcquire(o, offset, bool2byte(newValue))); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final short getAndSetShort(Object o, long offset, short newValue) { short v; do { @@ -3785,7 +3785,7 @@ public final long getAndBitwiseXorLongAcquire(Object o, long offset, long mask) * * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void loadFence(); /** @@ -3800,7 +3800,7 @@ public final long getAndBitwiseXorLongAcquire(Object o, long offset, long mask) * * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void storeFence(); /** @@ -3812,7 +3812,7 @@ public final long getAndBitwiseXorLongAcquire(Object o, long offset, long mask) * Corresponds to C11 atomic_thread_fence(memory_order_seq_cst). * @since 1.8 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native void fullFence(); /** @@ -3905,7 +3905,7 @@ private static void throwNoSuchMethodError() { * {@link NullPointerException} * @since 9 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final long getLongUnaligned(Object o, long offset) { if ((offset & 7) == 0) { return getLong(o, offset); @@ -3944,7 +3944,7 @@ public final long getLongUnaligned(Object o, long offset, boolean bigEndian) { } /** @see #getLongUnaligned(Object, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final int getIntUnaligned(Object o, long offset) { if ((offset & 3) == 0) { return getInt(o, offset); @@ -3964,7 +3964,7 @@ public final int getIntUnaligned(Object o, long offset, boolean bigEndian) { } /** @see #getLongUnaligned(Object, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final short getShortUnaligned(Object o, long offset) { if ((offset & 1) == 0) { return getShort(o, offset); @@ -3979,7 +3979,7 @@ public final short getShortUnaligned(Object o, long offset, boolean bigEndian) { } /** @see #getLongUnaligned(Object, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final char getCharUnaligned(Object o, long offset) { if ((offset & 1) == 0) { return getChar(o, offset); @@ -4022,7 +4022,7 @@ public final char getCharUnaligned(Object o, long offset, boolean bigEndian) { * {@link NullPointerException} * @since 9 */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putLongUnaligned(Object o, long offset, long x) { if ((offset & 7) == 0) { putLong(o, offset, x); @@ -4065,7 +4065,7 @@ public final void putLongUnaligned(Object o, long offset, long x, boolean bigEnd } /** @see #putLongUnaligned(Object, long, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putIntUnaligned(Object o, long offset, int x) { if ((offset & 3) == 0) { putInt(o, offset, x); @@ -4087,7 +4087,7 @@ public final void putIntUnaligned(Object o, long offset, int x, boolean bigEndia } /** @see #putLongUnaligned(Object, long, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putShortUnaligned(Object o, long offset, short x) { if ((offset & 1) == 0) { putShort(o, offset, x); @@ -4103,7 +4103,7 @@ public final void putShortUnaligned(Object o, long offset, short x, boolean bigE } /** @see #putLongUnaligned(Object, long, long) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final void putCharUnaligned(Object o, long offset, char x) { putShortUnaligned(o, offset, (short)x); } @@ -4212,7 +4212,7 @@ private void putShortParts(Object o, long offset, byte i0, byte i1) { private native long reallocateMemory0(long address, long bytes); private native void freeMemory0(long address); private native void setMemory0(Object o, long offset, long bytes, byte value); - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private native void copyMemory0(Object srcBase, long srcOffset, Object destBase, long destOffset, long bytes); private native void copySwapMemory0(Object srcBase, long srcOffset, Object destBase, long destOffset, long bytes, long elemSize); private native long objectFieldOffset0(Field f); diff --git a/src/java.base/share/classes/jdk/internal/misc/VM.java b/src/java.base/share/classes/jdk/internal/misc/VM.java index 5681a79558f..f0b32c30f6e 100644 --- a/src/java.base/share/classes/jdk/internal/misc/VM.java +++ b/src/java.base/share/classes/jdk/internal/misc/VM.java @@ -457,31 +457,6 @@ public static boolean isSetUID() { } private static native void initialize(); - /** - * Initialize archived static fields in the given Class using archived - * values from CDS dump time. Also initialize the classes of objects in - * the archived graph referenced by those fields. - * - * Those static fields remain as uninitialized if there is no mapped CDS - * java heap data or there is any error during initialization of the - * object class in the archived graph. - */ - public static native void initializeFromArchive(Class<?> c); - - public static native void defineArchivedModules(ClassLoader platformLoader, ClassLoader systemLoader); - - public static native long getRandomSeedForCDSDump(); - - /** - * Check if CDS dynamic dumping is enabled via the DynamicDumpSharedSpaces flag. - */ - public static native boolean isCDSDumpingEnabled(); - - /** - * Check if CDS sharing is enabled by via the UseSharedSpaces flag. - */ - public static native boolean isCDSSharingEnabled(); - /** * Provides access to information on buffer usage. */ diff --git a/src/java.base/share/classes/jdk/internal/module/ArchivedBootLayer.java b/src/java.base/share/classes/jdk/internal/module/ArchivedBootLayer.java index 90bd5eaa51e..decf27e8cb7 100644 --- a/src/java.base/share/classes/jdk/internal/module/ArchivedBootLayer.java +++ b/src/java.base/share/classes/jdk/internal/module/ArchivedBootLayer.java @@ -24,7 +24,7 @@ */ package jdk.internal.module; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; /** * Used by ModuleBootstrap for archiving the boot layer and the builder needed to @@ -59,6 +59,6 @@ static void archive(ModuleLayer layer, IllegalAccessLogger.Builder builder) { } static { - VM.initializeFromArchive(ArchivedBootLayer.class); + CDS.initializeFromArchive(ArchivedBootLayer.class); } } diff --git a/src/java.base/share/classes/jdk/internal/module/ArchivedModuleGraph.java b/src/java.base/share/classes/jdk/internal/module/ArchivedModuleGraph.java index 6b038238eb1..4d9f5eb7f62 100644 --- a/src/java.base/share/classes/jdk/internal/module/ArchivedModuleGraph.java +++ b/src/java.base/share/classes/jdk/internal/module/ArchivedModuleGraph.java @@ -29,7 +29,7 @@ import java.util.function.Function; import java.lang.module.Configuration; import java.lang.module.ModuleFinder; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; /** * Used by ModuleBootstrap for archiving the configuration for the boot layer, @@ -123,6 +123,6 @@ static void archive(boolean hasSplitPackages, } static { - VM.initializeFromArchive(ArchivedModuleGraph.class); + CDS.initializeFromArchive(ArchivedModuleGraph.class); } } diff --git a/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java b/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java index bc872c44917..9d999a80e9b 100644 --- a/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java +++ b/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java @@ -54,7 +54,7 @@ import jdk.internal.loader.BootLoader; import jdk.internal.loader.BuiltinClassLoader; import jdk.internal.loader.ClassLoaders; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; import jdk.internal.perf.PerfCounter; /** @@ -167,7 +167,7 @@ public static ModuleLayer boot() { assert canUseArchivedBootLayer(); bootLayer = archivedBootLayer.bootLayer(); BootLoader.getUnnamedModule(); // trigger <clinit> of BootLoader. - VM.defineArchivedModules(ClassLoaders.platformClassLoader(), ClassLoaders.appClassLoader()); + CDS.defineArchivedModules(ClassLoaders.platformClassLoader(), ClassLoaders.appClassLoader()); // assume boot layer has at least one module providing a service // that is mapped to the application class loader. diff --git a/src/java.base/share/classes/jdk/internal/reflect/Reflection.java b/src/java.base/share/classes/jdk/internal/reflect/Reflection.java index 410297cac0b..f97793aa531 100644 --- a/src/java.base/share/classes/jdk/internal/reflect/Reflection.java +++ b/src/java.base/share/classes/jdk/internal/reflect/Reflection.java @@ -30,9 +30,9 @@ import java.util.Map; import java.util.Objects; import java.util.Set; -import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.access.SharedSecrets; import jdk.internal.misc.VM; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** Common utility routines used by both java.lang and java.lang.reflect */ @@ -67,7 +67,7 @@ public class Reflection { ignoring frames associated with java.lang.reflect.Method.invoke() and its implementation. */ @CallerSensitive - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native Class<?> getCallerClass(); /** Retrieves the access flags written to the class file. For @@ -78,7 +78,7 @@ public class Reflection { to compatibility reasons; see 4471811. Only the values of the low 13 bits (i.e., a mask of 0x1FFF) are guaranteed to be valid. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native int getClassAccessFlags(Class<?> c); diff --git a/src/java.base/share/classes/jdk/internal/util/ArraysSupport.java b/src/java.base/share/classes/jdk/internal/util/ArraysSupport.java index 8f79bdc6e6f..e7ffb7a0ed8 100644 --- a/src/java.base/share/classes/jdk/internal/util/ArraysSupport.java +++ b/src/java.base/share/classes/jdk/internal/util/ArraysSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -24,8 +24,8 @@ */ package jdk.internal.util; -import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.misc.Unsafe; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * Utility methods to work with arrays. This includes a set of methods @@ -108,7 +108,7 @@ private ArraysSupport() {} * compliment of the number of remaining pairs of elements to be checked in * the tail of the two arrays. */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static int vectorizedMismatch(Object a, long aOffset, Object b, long bOffset, int length, diff --git a/src/java.base/share/classes/jdk/internal/util/Preconditions.java b/src/java.base/share/classes/jdk/internal/util/Preconditions.java index d25354fdfbb..2854b157431 100644 --- a/src/java.base/share/classes/jdk/internal/util/Preconditions.java +++ b/src/java.base/share/classes/jdk/internal/util/Preconditions.java @@ -24,7 +24,7 @@ */ package jdk.internal.util; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; import java.util.List; import java.util.function.BiFunction; @@ -240,7 +240,7 @@ private static String outOfBoundsMessage(String checkKind, List<Integer> args) { * length is a non-negative value (such as that of an array length or from * the upper bound of a loop) */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static <X extends RuntimeException> int checkIndex(int index, int length, BiFunction<String, List<Integer>, X> oobef) { diff --git a/src/java.base/share/classes/jdk/internal/HotSpotIntrinsicCandidate.java b/src/java.base/share/classes/jdk/internal/vm/annotation/IntrinsicCandidate.java similarity index 88% rename from src/java.base/share/classes/jdk/internal/HotSpotIntrinsicCandidate.java rename to src/java.base/share/classes/jdk/internal/vm/annotation/IntrinsicCandidate.java index 8f3661fbfa3..72484a856ac 100644 --- a/src/java.base/share/classes/jdk/internal/HotSpotIntrinsicCandidate.java +++ b/src/java.base/share/classes/jdk/internal/vm/annotation/IntrinsicCandidate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -23,25 +23,25 @@ * questions. */ -package jdk.internal; +package jdk.internal.vm.annotation; import java.lang.annotation.*; /** - * The {@code @HotSpotIntrinsicCandidate} annotation is specific to the + * The {@code @IntrinsicCandidate} annotation is specific to the * HotSpot Virtual Machine. It indicates that an annotated method * may be (but is not guaranteed to be) intrinsified by the HotSpot VM. A method * is intrinsified if the HotSpot VM replaces the annotated method with hand-written * assembly and/or hand-written compiler IR -- a compiler intrinsic -- to improve - * performance. The {@code @HotSpotIntrinsicCandidate} annotation is internal to the + * performance. The {@code @IntrinsicCandidate} annotation is internal to the * Java libraries and is therefore not supposed to have any relevance for application * code. * * Maintainers of the Java libraries must consider the following when - * modifying methods annotated with {@code @HotSpotIntrinsicCandidate}. + * modifying methods annotated with {@code @IntrinsicCandidate}. * * <ul> - * <li>When modifying a method annotated with {@code @HotSpotIntrinsicCandidate}, + * <li>When modifying a method annotated with {@code @IntrinsicCandidate}, * the corresponding intrinsic code in the HotSpot VM implementation must be * updated to match the semantics of the annotated method.</li> * <li>For some annotated methods, the corresponding intrinsic may omit some low-level @@ -92,7 +92,7 @@ * * <ul> * <li>When adding a new intrinsic, make sure that the corresponding method - * in the Java libraries is annotated with {@code @HotSpotIntrinsicCandidate} + * in the Java libraries is annotated with {@code @IntrinsicCandidate} * and that all possible call sequences that result in calling the intrinsic contain * the checks omitted by the intrinsic (if any).</li> * <li>When modifying an existing intrinsic, the Java libraries must be updated @@ -102,24 +102,24 @@ * * Persons not directly involved with maintaining the Java libraries or the * HotSpot VM can safely ignore the fact that a method is annotated with - * {@code @HotSpotIntrinsicCandidate}. + * {@code @IntrinsicCandidate}. * * The HotSpot VM defines (internally) a list of intrinsics. Not all intrinsic * are available on all platforms supported by the HotSpot VM. Furthermore, * the availability of an intrinsic on a given platform depends on the * configuration of the HotSpot VM (e.g., the set of VM flags enabled). - * Therefore, annotating a method with {@code @HotSpotIntrinsicCandidate} does + * Therefore, annotating a method with {@code @IntrinsicCandidate} does * not guarantee that the marked method is intrinsified by the HotSpot VM. * * If the {@code CheckIntrinsics} VM flag is enabled, the HotSpot VM checks * (when loading a class) that (1) all methods of that class that are also on - * the VM's list of intrinsics are annotated with {@code @HotSpotIntrinsicCandidate} + * the VM's list of intrinsics are annotated with {@code @IntrinsicCandidate} * and that (2) for all methods of that class annotated with - * {@code @HotSpotIntrinsicCandidate} there is an intrinsic in the list. + * {@code @IntrinsicCandidate} there is an intrinsic in the list. * - * @since 9 + * @since 16 */ @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) @Retention(RetentionPolicy.RUNTIME) -public @interface HotSpotIntrinsicCandidate { +public @interface IntrinsicCandidate { } diff --git a/src/java.base/share/classes/module-info.java b/src/java.base/share/classes/module-info.java index 885421f002e..011bae25d10 100644 --- a/src/java.base/share/classes/module-info.java +++ b/src/java.base/share/classes/module-info.java @@ -139,7 +139,6 @@ java.security.sasl; exports jdk.internal to java.compiler, - jdk.jfr, jdk.compiler, jdk.jshell; exports jdk.internal.access to @@ -229,6 +228,7 @@ exports jdk.internal.vm.annotation to jdk.internal.vm.ci, jdk.incubator.foreign, + jdk.jfr, jdk.unsupported; exports jdk.internal.util to jdk.incubator.foreign; diff --git a/src/java.base/share/classes/sun/nio/cs/ISO_8859_1.java b/src/java.base/share/classes/sun/nio/cs/ISO_8859_1.java index 9aa0d5c6204..09d1f8c9db9 100644 --- a/src/java.base/share/classes/sun/nio/cs/ISO_8859_1.java +++ b/src/java.base/share/classes/sun/nio/cs/ISO_8859_1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -33,7 +33,7 @@ import java.nio.charset.CoderResult; import java.util.Objects; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; public class ISO_8859_1 extends Charset @@ -151,7 +151,7 @@ private static int encodeISOArray(char[] sa, int sp, return implEncodeISOArray(sa, sp, da, dp, len); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private static int implEncodeISOArray(char[] sa, int sp, byte[] da, int dp, int len) { diff --git a/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java b/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java index 860d5ff12c9..5c7356fca81 100644 --- a/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java +++ b/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java @@ -301,11 +301,12 @@ private static <D extends GenericDeclaration> AnnotatedType[] parseAnnotatedBoun l.add(t); } } + TypeAnnotation[] typeAnnotations = l.toArray(EMPTY_TYPE_ANNOTATION_ARRAY); res[i] = AnnotatedTypeFactory.buildAnnotatedType(bounds[i], AnnotatedTypeFactory.nestingForType(bounds[i], loc), - l.toArray(EMPTY_TYPE_ANNOTATION_ARRAY), - candidates.toArray(EMPTY_TYPE_ANNOTATION_ARRAY), - (AnnotatedElement)decl); + typeAnnotations, + typeAnnotations, + decl); } return res; } diff --git a/src/java.base/share/classes/sun/security/provider/AbstractDrbg.java b/src/java.base/share/classes/sun/security/provider/AbstractDrbg.java index 8cd264789b7..88faf0d9c9d 100644 --- a/src/java.base/share/classes/sun/security/provider/AbstractDrbg.java +++ b/src/java.base/share/classes/sun/security/provider/AbstractDrbg.java @@ -71,7 +71,7 @@ public abstract class AbstractDrbg { // Common working status - private boolean instantiated = false; + private boolean instantiated; /** * Reseed counter of a DRBG instance. A mechanism should increment it @@ -80,7 +80,7 @@ public abstract class AbstractDrbg { * * Volatile, will be used in a double checked locking. */ - protected volatile int reseedCounter = 0; + protected volatile int reseedCounter; // Mech features. If not same as below, must be redefined in constructor. diff --git a/src/java.base/share/classes/sun/security/provider/DigestBase.java b/src/java.base/share/classes/sun/security/provider/DigestBase.java index 26fd6672eeb..6cbb5860077 100644 --- a/src/java.base/share/classes/sun/security/provider/DigestBase.java +++ b/src/java.base/share/classes/sun/security/provider/DigestBase.java @@ -31,7 +31,7 @@ import java.util.Arrays; import java.util.Objects; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * Common base message digest implementation for the Sun provider. @@ -144,7 +144,7 @@ private int implCompressMultiBlock(byte[] b, int ofs, int limit) { return implCompressMultiBlock0(b, ofs, limit); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private int implCompressMultiBlock0(byte[] b, int ofs, int limit) { for (; ofs <= limit; ofs += blockSize) { implCompress(b, ofs); diff --git a/src/java.base/share/classes/sun/security/provider/MD5.java b/src/java.base/share/classes/sun/security/provider/MD5.java index 497e0286cf5..ca480e8de10 100644 --- a/src/java.base/share/classes/sun/security/provider/MD5.java +++ b/src/java.base/share/classes/sun/security/provider/MD5.java @@ -29,7 +29,7 @@ import java.util.Objects; import static sun.security.provider.ByteArrayAccess.*; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * The MD5 class is used to compute an MD5 message digest over a given @@ -168,7 +168,7 @@ private void implCompressCheck(byte[] buf, int ofs) { // that operates directly on the array 'buf' (starting from // offset 'ofs') and not on array 'x', therefore 'buf' and 'ofs' // must be passed as parameter to the method. - @HotSpotIntrinsicCandidate + @IntrinsicCandidate void implCompress0(byte[] buf, int ofs) { int a = state[0]; int b = state[1]; diff --git a/src/java.base/share/classes/sun/security/provider/SHA.java b/src/java.base/share/classes/sun/security/provider/SHA.java index 1dbbb45f131..886eddac569 100644 --- a/src/java.base/share/classes/sun/security/provider/SHA.java +++ b/src/java.base/share/classes/sun/security/provider/SHA.java @@ -29,7 +29,7 @@ import java.util.Objects; import static sun.security.provider.ByteArrayAccess.*; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * This class implements the Secure Hash Algorithm (SHA) developed by @@ -144,7 +144,7 @@ private void implCompressCheck(byte[] buf, int ofs) { // that operates directly on the array 'buf' (starting from // offset 'ofs') and not on array 'W', therefore 'buf' and 'ofs' // must be passed as parameter to the method. - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private void implCompress0(byte[] buf, int ofs) { // The first 16 ints have the byte stream, compute the rest of // the buffer diff --git a/src/java.base/share/classes/sun/security/provider/SHA2.java b/src/java.base/share/classes/sun/security/provider/SHA2.java index 5c293e5ac17..530d0124c3c 100644 --- a/src/java.base/share/classes/sun/security/provider/SHA2.java +++ b/src/java.base/share/classes/sun/security/provider/SHA2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -28,7 +28,7 @@ import java.util.Arrays; import java.util.Objects; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; import static sun.security.provider.ByteArrayAccess.*; /** @@ -214,7 +214,7 @@ private void implCompressCheck(byte[] buf, int ofs) { // that operates directly on the array 'buf' (starting from // offset 'ofs') and not on array 'W', therefore 'buf' and 'ofs' // must be passed as parameter to the method. - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private void implCompress0(byte[] buf, int ofs) { // The first 16 ints are from the byte stream, compute the rest of // the W[]'s diff --git a/src/java.base/share/classes/sun/security/provider/SHA5.java b/src/java.base/share/classes/sun/security/provider/SHA5.java index 22af8436027..b2cb790df5a 100644 --- a/src/java.base/share/classes/sun/security/provider/SHA5.java +++ b/src/java.base/share/classes/sun/security/provider/SHA5.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -28,7 +28,7 @@ import java.util.Arrays; import java.util.Objects; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; import static sun.security.provider.ByteArrayAccess.*; /** @@ -237,7 +237,7 @@ private void implCompressCheck(byte[] buf, int ofs) { // that operates directly on the array 'buf' (starting from // offset 'ofs') and not on array 'W', therefore 'buf' and 'ofs' // must be passed as parameter to the method. - @HotSpotIntrinsicCandidate + @IntrinsicCandidate private final void implCompress0(byte[] buf, int ofs) { // The first 16 longs are from the byte stream, compute the rest of // the W[]'s diff --git a/src/java.base/share/classes/sun/security/ssl/DTLSOutputRecord.java b/src/java.base/share/classes/sun/security/ssl/DTLSOutputRecord.java index 38338624a92..3cf2ca277d2 100644 --- a/src/java.base/share/classes/sun/security/ssl/DTLSOutputRecord.java +++ b/src/java.base/share/classes/sun/security/ssl/DTLSOutputRecord.java @@ -36,7 +36,7 @@ */ final class DTLSOutputRecord extends OutputRecord implements DTLSRecord { - private DTLSFragmenter fragmenter = null; + private DTLSFragmenter fragmenter; int writeEpoch; @@ -44,7 +44,7 @@ final class DTLSOutputRecord extends OutputRecord implements DTLSRecord { Authenticator prevWriteAuthenticator; SSLWriteCipher prevWriteCipher; - private volatile boolean isCloseWaiting = false; + private volatile boolean isCloseWaiting; DTLSOutputRecord(HandshakeHash handshakeHash) { super(handshakeHash, SSLWriteCipher.nullDTlsWriteCipher()); diff --git a/src/java.base/share/classes/sun/security/ssl/HandshakeContext.java b/src/java.base/share/classes/sun/security/ssl/HandshakeContext.java index bcbd76dab83..50ee421bae2 100644 --- a/src/java.base/share/classes/sun/security/ssl/HandshakeContext.java +++ b/src/java.base/share/classes/sun/security/ssl/HandshakeContext.java @@ -102,11 +102,11 @@ abstract class HandshakeContext implements ConnectionContext { boolean isResumption; SSLSessionImpl resumingSession; // Session is using stateless resumption - boolean statelessResumption = false; + boolean statelessResumption; final Queue<Map.Entry<Byte, ByteBuffer>> delegatedActions; - volatile boolean taskDelegated = false; - volatile Exception delegatedThrown = null; + volatile boolean taskDelegated; + volatile Exception delegatedThrown; ProtocolVersion negotiatedProtocol; CipherSuite negotiatedCipherSuite; diff --git a/src/java.base/share/classes/sun/security/ssl/SSLEngineOutputRecord.java b/src/java.base/share/classes/sun/security/ssl/SSLEngineOutputRecord.java index 52d2f27102d..67a0f393359 100644 --- a/src/java.base/share/classes/sun/security/ssl/SSLEngineOutputRecord.java +++ b/src/java.base/share/classes/sun/security/ssl/SSLEngineOutputRecord.java @@ -37,11 +37,11 @@ */ final class SSLEngineOutputRecord extends OutputRecord implements SSLRecord { - private HandshakeFragment fragmenter = null; - private boolean isTalkingToV2 = false; // SSLv2Hello - private ByteBuffer v2ClientHello = null; // SSLv2Hello + private HandshakeFragment fragmenter; + private boolean isTalkingToV2; // SSLv2Hello + private ByteBuffer v2ClientHello; // SSLv2Hello - private volatile boolean isCloseWaiting = false; + private volatile boolean isCloseWaiting; SSLEngineOutputRecord(HandshakeHash handshakeHash) { super(handshakeHash, SSLWriteCipher.nullTlsWriteCipher()); diff --git a/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java b/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java index 3a3b8ad8b8a..0412d4f3eda 100644 --- a/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java +++ b/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java @@ -83,8 +83,8 @@ public final class SSLSocketImpl private String peerHost; private boolean autoClose; - private boolean isConnected = false; - private volatile boolean tlsIsClosed = false; + private boolean isConnected; + private volatile boolean tlsIsClosed; private final ReentrantLock socketLock = new ReentrantLock(); private final ReentrantLock handshakeLock = new ReentrantLock(); diff --git a/src/java.base/share/classes/sun/security/util/CurveDB.java b/src/java.base/share/classes/sun/security/util/CurveDB.java index 4cf268fa8ae..e16e5238fd1 100644 --- a/src/java.base/share/classes/sun/security/util/CurveDB.java +++ b/src/java.base/share/classes/sun/security/util/CurveDB.java @@ -53,11 +53,6 @@ public class CurveDB { private static Collection<? extends NamedCurve> specCollection; - // Used by SunECEntries - public static Collection<? extends NamedCurve>getSupportedCurves() { - return specCollection; - } - // Return a NamedCurve for the specified OID/name or null if unknown. public static NamedCurve lookup(String name) { NamedCurve spec = oidMap.get(name); diff --git a/src/java.base/share/classes/sun/security/util/DerIndefLenConverter.java b/src/java.base/share/classes/sun/security/util/DerIndefLenConverter.java index 56e1c630fb2..de8c2e5fb22 100644 --- a/src/java.base/share/classes/sun/security/util/DerIndefLenConverter.java +++ b/src/java.base/share/classes/sun/security/util/DerIndefLenConverter.java @@ -372,19 +372,18 @@ byte[] convertBytes(byte[] indefData) throws IOException { * This may block. * * @param in the input stream with tag and lenByte already read - * @param lenByte the length of the length field to remember * @param tag the tag to remember * @return a DER byte array * @throws IOException if not all indef len BER * can be resolved or another I/O error happens */ - public static byte[] convertStream(InputStream in, byte lenByte, byte tag) + public static byte[] convertStream(InputStream in, byte tag) throws IOException { int offset = 2; // for tag and length bytes int readLen = in.available(); byte[] indefData = new byte[readLen + offset]; indefData[0] = tag; - indefData[1] = lenByte; + indefData[1] = (byte)0x80; while (true) { int bytesRead = in.readNBytes(indefData, offset, readLen); if (bytesRead != readLen) { diff --git a/src/java.base/share/classes/sun/security/util/DerInputBuffer.java b/src/java.base/share/classes/sun/security/util/DerInputBuffer.java deleted file mode 100644 index a5cf8fdaafc..00000000000 --- a/src/java.base/share/classes/sun/security/util/DerInputBuffer.java +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Copyright (c) 1996, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package sun.security.util; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.math.BigInteger; -import java.util.Date; -import sun.util.calendar.CalendarDate; -import sun.util.calendar.CalendarSystem; - -/** - * DER input buffer ... this is the main abstraction in the DER library - * which actively works with the "untyped byte stream" abstraction. It - * does so with impunity, since it's not intended to be exposed to - * anyone who could violate the "typed value stream" DER model and hence - * corrupt the input stream of DER values. - * - * @author David Brownell - */ -class DerInputBuffer extends ByteArrayInputStream implements Cloneable { - - boolean allowBER = true; - - // used by sun/security/util/DerInputBuffer/DerInputBufferEqualsHashCode.java - DerInputBuffer(byte[] buf) { - this(buf, true); - } - - DerInputBuffer(byte[] buf, boolean allowBER) { - super(buf); - this.allowBER = allowBER; - } - - DerInputBuffer(byte[] buf, int offset, int len, boolean allowBER) { - super(buf, offset, len); - this.allowBER = allowBER; - } - - DerInputBuffer dup() { - try { - DerInputBuffer retval = (DerInputBuffer)clone(); - retval.mark(Integer.MAX_VALUE); - return retval; - } catch (CloneNotSupportedException e) { - throw new IllegalArgumentException(e.toString()); - } - } - - byte[] toByteArray() { - int len = available(); - if (len <= 0) - return null; - byte[] retval = new byte[len]; - - System.arraycopy(buf, pos, retval, 0, len); - return retval; - } - - int peek() throws IOException { - if (pos >= count) - throw new IOException("out of data"); - else - return buf[pos]; - } - - /** - * Compares this DerInputBuffer for equality with the specified - * object. - */ - public boolean equals(Object other) { - if (other instanceof DerInputBuffer) - return equals((DerInputBuffer)other); - else - return false; - } - - boolean equals(DerInputBuffer other) { - if (this == other) - return true; - - int max = this.available(); - if (other.available() != max) - return false; - for (int i = 0; i < max; i++) { - if (this.buf[this.pos + i] != other.buf[other.pos + i]) { - return false; - } - } - return true; - } - - /** - * Returns a hashcode for this DerInputBuffer. - * - * @return a hashcode for this DerInputBuffer. - */ - public int hashCode() { - int retval = 0; - - int len = available(); - int p = pos; - - for (int i = 0; i < len; i++) - retval += buf[p + i] * i; - return retval; - } - - void truncate(int len) throws IOException { - if (len > available()) - throw new IOException("insufficient data"); - count = pos + len; - } - - /** - * Returns the integer which takes up the specified number - * of bytes in this buffer as a BigInteger. - * @param len the number of bytes to use. - * @param makePositive whether to always return a positive value, - * irrespective of actual encoding - * @return the integer as a BigInteger. - */ - BigInteger getBigInteger(int len, boolean makePositive) throws IOException { - if (len > available()) - throw new IOException("short read of integer"); - - if (len == 0) { - throw new IOException("Invalid encoding: zero length Int value"); - } - - byte[] bytes = new byte[len]; - - System.arraycopy(buf, pos, bytes, 0, len); - skip(len); - - // BER allows leading 0s but DER does not - if (!allowBER && (len >= 2 && (bytes[0] == 0) && (bytes[1] >= 0))) { - throw new IOException("Invalid encoding: redundant leading 0s"); - } - - if (makePositive) { - return new BigInteger(1, bytes); - } else { - return new BigInteger(bytes); - } - } - - /** - * Returns the integer which takes up the specified number - * of bytes in this buffer. - * @throws IOException if the result is not within the valid - * range for integer, i.e. between Integer.MIN_VALUE and - * Integer.MAX_VALUE. - * @param len the number of bytes to use. - * @return the integer. - */ - public int getInteger(int len) throws IOException { - - BigInteger result = getBigInteger(len, false); - if (result.compareTo(BigInteger.valueOf(Integer.MIN_VALUE)) < 0) { - throw new IOException("Integer below minimum valid value"); - } - if (result.compareTo(BigInteger.valueOf(Integer.MAX_VALUE)) > 0) { - throw new IOException("Integer exceeds maximum valid value"); - } - return result.intValue(); - } - - /** - * Returns the bit string which takes up the specified - * number of bytes in this buffer. - */ - public byte[] getBitString(int len) throws IOException { - if (len > available()) - throw new IOException("short read of bit string"); - - if (len == 0) { - throw new IOException("Invalid encoding: zero length bit string"); - } - - int numOfPadBits = buf[pos]; - if ((numOfPadBits < 0) || (numOfPadBits > 7)) { - throw new IOException("Invalid number of padding bits"); - } - // minus the first byte which indicates the number of padding bits - byte[] retval = new byte[len - 1]; - System.arraycopy(buf, pos + 1, retval, 0, len - 1); - if (numOfPadBits != 0) { - // get rid of the padding bits - retval[len - 2] &= (0xff << numOfPadBits); - } - skip(len); - return retval; - } - - /** - * Returns the bit string which takes up the rest of this buffer. - */ - byte[] getBitString() throws IOException { - return getBitString(available()); - } - - /** - * Returns the bit string which takes up the rest of this buffer. - * The bit string need not be byte-aligned. - */ - BitArray getUnalignedBitString() throws IOException { - if (pos >= count) - return null; - /* - * Just copy the data into an aligned, padded octet buffer, - * and consume the rest of the buffer. - */ - int len = available(); - int unusedBits = buf[pos] & 0xff; - if (unusedBits > 7 ) { - throw new IOException("Invalid value for unused bits: " + unusedBits); - } - byte[] bits = new byte[len - 1]; - // number of valid bits - int length = (bits.length == 0) ? 0 : bits.length * 8 - unusedBits; - - System.arraycopy(buf, pos + 1, bits, 0, len - 1); - - BitArray bitArray = new BitArray(length, bits); - pos = count; - return bitArray; - } - - /** - * Returns the UTC Time value that takes up the specified number - * of bytes in this buffer. - * @param len the number of bytes to use - */ - public Date getUTCTime(int len) throws IOException { - if (len > available()) - throw new IOException("short read of DER UTC Time"); - - if (len < 11 || len > 17) - throw new IOException("DER UTC Time length error"); - - return getTime(len, false); - } - - /** - * Returns the Generalized Time value that takes up the specified - * number of bytes in this buffer. - * @param len the number of bytes to use - */ - public Date getGeneralizedTime(int len) throws IOException { - if (len > available()) - throw new IOException("short read of DER Generalized Time"); - - if (len < 13) - throw new IOException("DER Generalized Time length error"); - - return getTime(len, true); - - } - - /** - * Private helper routine to extract time from the der value. - * @param len the number of bytes to use - * @param generalized true if Generalized Time is to be read, false - * if UTC Time is to be read. - */ - private Date getTime(int len, boolean generalized) throws IOException { - - /* - * UTC time encoded as ASCII chars: - * YYMMDDhhmmZ - * YYMMDDhhmmssZ - * YYMMDDhhmm+hhmm - * YYMMDDhhmm-hhmm - * YYMMDDhhmmss+hhmm - * YYMMDDhhmmss-hhmm - * UTC Time is broken in storing only two digits of year. - * If YY < 50, we assume 20YY; - * if YY >= 50, we assume 19YY, as per RFC 5280. - * - * Generalized time has a four-digit year and allows any - * precision specified in ISO 8601. However, for our purposes, - * we will only allow the same format as UTC time, except that - * fractional seconds (millisecond precision) are supported. - */ - - int year, month, day, hour, minute, second, millis; - String type = null; - - if (generalized) { - type = "Generalized"; - year = 1000 * toDigit(buf[pos++], type); - year += 100 * toDigit(buf[pos++], type); - year += 10 * toDigit(buf[pos++], type); - year += toDigit(buf[pos++], type); - len -= 2; // For the two extra YY - } else { - type = "UTC"; - year = 10 * toDigit(buf[pos++], type); - year += toDigit(buf[pos++], type); - - if (year < 50) // origin 2000 - year += 2000; - else - year += 1900; // origin 1900 - } - - month = 10 * toDigit(buf[pos++], type); - month += toDigit(buf[pos++], type); - - day = 10 * toDigit(buf[pos++], type); - day += toDigit(buf[pos++], type); - - hour = 10 * toDigit(buf[pos++], type); - hour += toDigit(buf[pos++], type); - - minute = 10 * toDigit(buf[pos++], type); - minute += toDigit(buf[pos++], type); - - len -= 10; // YYMMDDhhmm - - /* - * We allow for non-encoded seconds, even though the - * IETF-PKIX specification says that the seconds should - * always be encoded even if it is zero. - */ - - millis = 0; - if (len > 2) { - second = 10 * toDigit(buf[pos++], type); - second += toDigit(buf[pos++], type); - len -= 2; - // handle fractional seconds (if present) - if (generalized && (buf[pos] == '.' || buf[pos] == ',')) { - len --; - if (len == 0) { - throw new IOException("Parse " + type + - " time, empty fractional part"); - } - pos++; - int precision = 0; - while (buf[pos] != 'Z' && - buf[pos] != '+' && - buf[pos] != '-') { - // Validate all digits in the fractional part but - // store millisecond precision only - int thisDigit = toDigit(buf[pos], type); - precision++; - len--; - if (len == 0) { - throw new IOException("Parse " + type + - " time, invalid fractional part"); - } - pos++; - switch (precision) { - case 1: - millis += 100 * thisDigit; - break; - case 2: - millis += 10 * thisDigit; - break; - case 3: - millis += thisDigit; - break; - } - } - if (precision == 0) { - throw new IOException("Parse " + type + - " time, empty fractional part"); - } - } - } else - second = 0; - - if (month == 0 || day == 0 - || month > 12 || day > 31 - || hour >= 24 || minute >= 60 || second >= 60) - throw new IOException("Parse " + type + " time, invalid format"); - - /* - * Generalized time can theoretically allow any precision, - * but we're not supporting that. - */ - CalendarSystem gcal = CalendarSystem.getGregorianCalendar(); - CalendarDate date = gcal.newCalendarDate(null); // no time zone - date.setDate(year, month, day); - date.setTimeOfDay(hour, minute, second, millis); - long time = gcal.getTime(date); - - /* - * Finally, "Z" or "+hhmm" or "-hhmm" ... offsets change hhmm - */ - if (! (len == 1 || len == 5)) - throw new IOException("Parse " + type + " time, invalid offset"); - - int hr, min; - - switch (buf[pos++]) { - case '+': - if (len != 5) { - throw new IOException("Parse " + type + " time, invalid offset"); - } - hr = 10 * toDigit(buf[pos++], type); - hr += toDigit(buf[pos++], type); - min = 10 * toDigit(buf[pos++], type); - min += toDigit(buf[pos++], type); - - if (hr >= 24 || min >= 60) - throw new IOException("Parse " + type + " time, +hhmm"); - - time -= ((hr * 60) + min) * 60 * 1000; - break; - - case '-': - if (len != 5) { - throw new IOException("Parse " + type + " time, invalid offset"); - } - hr = 10 * toDigit(buf[pos++], type); - hr += toDigit(buf[pos++], type); - min = 10 * toDigit(buf[pos++], type); - min += toDigit(buf[pos++], type); - - if (hr >= 24 || min >= 60) - throw new IOException("Parse " + type + " time, -hhmm"); - - time += ((hr * 60) + min) * 60 * 1000; - break; - - case 'Z': - if (len != 1) { - throw new IOException("Parse " + type + " time, invalid format"); - } - break; - - default: - throw new IOException("Parse " + type + " time, garbage offset"); - } - return new Date(time); - } - - /** - * Converts byte (represented as a char) to int. - * @throws IOException if integer is not a valid digit in the specified - * radix (10) - */ - private static int toDigit(byte b, String type) throws IOException { - if (b < '0' || b > '9') { - throw new IOException("Parse " + type + " time, invalid format"); - } - return b - '0'; - } -} diff --git a/src/java.base/share/classes/sun/security/util/DerInputStream.java b/src/java.base/share/classes/sun/security/util/DerInputStream.java index 0c50d0da4fc..d937cf1ec2b 100644 --- a/src/java.base/share/classes/sun/security/util/DerInputStream.java +++ b/src/java.base/share/classes/sun/security/util/DerInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -28,11 +28,8 @@ import java.io.InputStream; import java.io.IOException; import java.math.BigInteger; -import java.nio.charset.Charset; +import java.util.Arrays; import java.util.Date; -import java.util.Vector; - -import static java.nio.charset.StandardCharsets.*; /** * A DER input stream, used for parsing ASN.1 DER-encoded data such as @@ -59,549 +56,200 @@ public class DerInputStream { - /* - * This version only supports fully buffered DER. This is easy to - * work with, though if large objects are manipulated DER becomes - * awkward to deal with. That's where BER is useful, since BER - * handles streaming data relatively well. - */ - DerInputBuffer buffer; + // The static part + final byte[] data; + final int start; // inclusive + final int end; // exclusive + final boolean allowBER; - /** The DER tag of the value; one of the tag_ constants. */ - public byte tag; + // The moving part + int pos; + int mark; /** - * Create a DER input stream from a data buffer. The buffer is not - * copied, it is shared. Accordingly, the buffer should be treated - * as read-only. + * Constructs a DerInputStream by assigning all its fields. * - * @param data the buffer from which to create the string (CONSUMED) + * No checking on arguments since all callers are internal. + * {@code data} should never be null even if length is 0. */ - public DerInputStream(byte[] data) throws IOException { - init(data, 0, data.length, true); + public DerInputStream(byte[] data, int start, int length, boolean allowBER) { + this.data = data; + this.start = start; + this.end = start + length; + this.allowBER = allowBER; + this.pos = start; + this.mark = start; } - /** - * Create a DER input stream from part of a data buffer with - * additional arg to control whether DER checks are enforced. - * The buffer is not copied, it is shared. Accordingly, the - * buffer should be treated as read-only. - * - * @param data the buffer from which to create the string (CONSUMED) - * @param offset the first index of <em>data</em> which will - * be read as DER input in the new stream - * @param len how long a chunk of the buffer to use, - * starting at "offset" - * @param allowBER whether to allow constructed indefinite-length - * encoding as well as tolerate leading 0s - */ - public DerInputStream(byte[] data, int offset, int len, - boolean allowBER) throws IOException { - init(data, offset, len, allowBER); + public DerInputStream(byte[] data) throws IOException { + this(data, 0, data.length, true); } - /** - * Create a DER input stream from part of a data buffer. - * The buffer is not copied, it is shared. Accordingly, the - * buffer should be treated as read-only. - * - * @param data the buffer from which to create the string (CONSUMED) - * @param offset the first index of <em>data</em> which will - * be read as DER input in the new stream - * @param len how long a chunk of the buffer to use, - * starting at "offset" - */ public DerInputStream(byte[] data, int offset, int len) throws IOException { - init(data, offset, len, true); + this(data, offset, len, true); } - /* - * private helper routine + /** + * Returns the remaining unread bytes, or, all bytes if none read yet. */ - private void init(byte[] data, int offset, int len, boolean allowBER) throws IOException { - if ((offset+2 > data.length) || (offset+len > data.length)) { - throw new IOException("Encoding bytes too short"); - } - // check for indefinite length encoding - if (DerIndefLenConverter.isIndefinite(data[offset+1])) { - if (!allowBER) { - throw new IOException("Indefinite length BER encoding found"); - } else { - byte[] inData = new byte[len]; - System.arraycopy(data, offset, inData, 0, len); - - DerIndefLenConverter derIn = new DerIndefLenConverter(); - byte[] result = derIn.convertBytes(inData); - if (result == null) { - throw new IOException("not all indef len BER resolved"); - } else { - buffer = new DerInputBuffer(result, allowBER); - } - } - } else { - buffer = new DerInputBuffer(data, offset, len, allowBER); - } - buffer.mark(Integer.MAX_VALUE); - } - - DerInputStream(DerInputBuffer buf) { - buffer = buf; - buffer.mark(Integer.MAX_VALUE); + public byte[] toByteArray() { + return Arrays.copyOfRange(data, pos, end); } /** - * Creates a new DER input stream from part of this input stream. + * Reads a DerValue from this stream. After the call, the data pointer + * is right after this DerValue so that the next call will read the + * next DerValue. * - * @param len how long a chunk of the current input stream to use, - * starting at the current position. - * @param do_skip true if the existing data in the input stream should - * be skipped. If this value is false, the next data read - * on this stream and the newly created stream will be the - * same. + * @return the read DerValue. + * @throws IOException if a DerValue cannot be constructed starting from + * this position because of byte shortage or encoding error. */ - public DerInputStream subStream(int len, boolean do_skip) - throws IOException { - DerInputBuffer newbuf = buffer.dup(); - - newbuf.truncate(len); - if (do_skip) { - buffer.skip(len); + public DerValue getDerValue() throws IOException { + DerValue result = new DerValue( + this.data, this.pos, this.end - this.pos, this.allowBER, true); + if (result.buffer != this.data) { + // Indefinite length observed. Unused bytes in data are appended + // to the end of return value by DerIndefLenConverter::convertBytes + // and stay inside result.buffer. + int unused = result.buffer.length - result.end; + this.pos = this.data.length - unused; + } else { + this.pos = result.end; } - return new DerInputStream(newbuf); - } - - /** - * Return what has been written to this DerInputStream - * as a byte array. Useful for debugging. - */ - public byte[] toByteArray() { - return buffer.toByteArray(); + return result; } - /* - * PRIMITIVES -- these are "universal" ASN.1 simple types. - * - * INTEGER, ENUMERATED, BIT STRING, OCTET STRING, NULL - * OBJECT IDENTIFIER, SEQUENCE (OF), SET (OF) - * UTF8String, PrintableString, T61String, IA5String, UTCTime, - * GeneralizedTime, BMPString. - * Note: UniversalString not supported till encoder is available. - */ + // The following getXyz methods are mostly shorthands for getDerValue().getXyz(). - /** - * Get an integer from the input stream as an integer. - * - * @return the integer held in this DER input stream. - */ public int getInteger() throws IOException { - if (buffer.read() != DerValue.tag_Integer) { - throw new IOException("DER input, Integer tag error"); - } - return buffer.getInteger(getDefiniteLength(buffer)); + return getDerValue().getInteger(); } - /** - * Get a integer from the input stream as a BigInteger object. - * - * @return the integer held in this DER input stream. - */ public BigInteger getBigInteger() throws IOException { - if (buffer.read() != DerValue.tag_Integer) { - throw new IOException("DER input, Integer tag error"); - } - return buffer.getBigInteger(getDefiniteLength(buffer), false); + return getDerValue().getBigInteger(); } - /** - * Returns an ASN.1 INTEGER value as a positive BigInteger. - * This is just to deal with implementations that incorrectly encode - * some values as negative. - * - * @return the integer held in this DER value as a BigInteger. - */ public BigInteger getPositiveBigInteger() throws IOException { - if (buffer.read() != DerValue.tag_Integer) { - throw new IOException("DER input, Integer tag error"); - } - return buffer.getBigInteger(getDefiniteLength(buffer), true); + return getDerValue().getPositiveBigInteger(); } - /** - * Get an enumerated from the input stream. - * - * @return the integer held in this DER input stream. - */ public int getEnumerated() throws IOException { - if (buffer.read() != DerValue.tag_Enumerated) { - throw new IOException("DER input, Enumerated tag error"); - } - return buffer.getInteger(getDefiniteLength(buffer)); + return getDerValue().getEnumerated(); } - /** - * Get a bit string from the input stream. Padded bits (if any) - * will be stripped off before the bit string is returned. - */ public byte[] getBitString() throws IOException { - if (buffer.read() != DerValue.tag_BitString) - throw new IOException("DER input not an bit string"); - - return buffer.getBitString(getDefiniteLength(buffer)); + return getDerValue().getBitString(); } - /** - * Get a bit string from the input stream. The bit string need - * not be byte-aligned. - */ public BitArray getUnalignedBitString() throws IOException { - if (buffer.read() != DerValue.tag_BitString) { - throw new IOException("DER input not a bit string"); - } - - int length = getDefiniteLength(buffer); - - if (length == 0) { - return new BitArray(0); - } - - /* - * First byte = number of excess bits in the last octet of the - * representation. - */ - length--; - int excessBits = buffer.read(); - if (excessBits < 0) { - throw new IOException("Unused bits of bit string invalid"); - } - int validBits = length*8 - excessBits; - if (validBits < 0) { - throw new IOException("Valid bits of bit string invalid"); - } - - byte[] repn = new byte[length]; - - if ((length != 0) && (buffer.read(repn) != length)) { - throw new IOException("Short read of DER bit string"); - } - - return new BitArray(validBits, repn); + return getDerValue().getUnalignedBitString(); } - /** - * Returns an ASN.1 OCTET STRING from the input stream. - */ public byte[] getOctetString() throws IOException { - if (buffer.read() != DerValue.tag_OctetString) + // Not identical to DerValue::getOctetString. This method + // does not accept constructed OCTET STRING. + DerValue v = getDerValue(); + if (v.tag != DerValue.tag_OctetString) { throw new IOException("DER input not an octet string"); - - int length = getDefiniteLength(buffer); - byte[] retval = new byte[length]; - if ((length != 0) && (buffer.read(retval) != length)) - throw new IOException("Short read of DER octet string"); - - return retval; - } - - /** - * Returns the asked number of bytes from the input stream. - */ - public void getBytes(byte[] val) throws IOException { - if ((val.length != 0) && (buffer.read(val) != val.length)) { - throw new IOException("Short read of DER octet string"); } + return v.getOctetString(); } - /** - * Reads an encoded null value from the input stream. - */ public void getNull() throws IOException { - if (buffer.read() != DerValue.tag_Null || buffer.read() != 0) - throw new IOException("getNull, bad data"); + getDerValue().getNull(); } - /** - * Reads an X.200 style Object Identifier from the stream. - */ public ObjectIdentifier getOID() throws IOException { - return new ObjectIdentifier(this); - } - - /** - * Return a sequence of encoded entities. ASN.1 sequences are - * ordered, and they are often used, like a "struct" in C or C++, - * to group data values. They may have optional or context - * specific values. - * - * @param startLen guess about how long the sequence will be - * (used to initialize an auto-growing data structure) - * @return array of the values in the sequence - */ - public DerValue[] getSequence(int startLen) throws IOException { - tag = (byte)buffer.read(); - if (tag != DerValue.tag_Sequence) - throw new IOException("Sequence tag error"); - return readVector(startLen); + return getDerValue().getOID(); } - /** - * Return a set of encoded entities. ASN.1 sets are unordered, - * though DER may specify an order for some kinds of sets (such - * as the attributes in an X.500 relative distinguished name) - * to facilitate binary comparisons of encoded values. - * - * @param startLen guess about how large the set will be - * (used to initialize an auto-growing data structure) - * @return array of the values in the sequence - */ - public DerValue[] getSet(int startLen) throws IOException { - tag = (byte)buffer.read(); - if (tag != DerValue.tag_Set) - throw new IOException("Set tag error"); - return readVector(startLen); - } - - /** - * Return a set of encoded entities. ASN.1 sets are unordered, - * though DER may specify an order for some kinds of sets (such - * as the attributes in an X.500 relative distinguished name) - * to facilitate binary comparisons of encoded values. - * - * @param startLen guess about how large the set will be - * (used to initialize an auto-growing data structure) - * @param implicit if true tag is assumed implicit. - * @return array of the values in the sequence - */ - public DerValue[] getSet(int startLen, boolean implicit) - throws IOException { - tag = (byte)buffer.read(); - if (!implicit) { - if (tag != DerValue.tag_Set) { - throw new IOException("Set tag error"); - } - } - return (readVector(startLen)); - } - - /* - * Read a "vector" of values ... set or sequence have the - * same encoding, except for the initial tag, so both use - * this same helper routine. - */ - protected DerValue[] readVector(int startLen) throws IOException { - DerInputStream newstr; - - byte lenByte = (byte)buffer.read(); - int len = getLength(lenByte, buffer); - - if (len == -1) { - // indefinite length encoding found - buffer = new DerInputBuffer( - DerIndefLenConverter.convertStream(buffer, lenByte, tag), - buffer.allowBER); - - if (tag != buffer.read()) - throw new IOException("Indefinite length encoding" + - " not supported"); - len = DerInputStream.getDefiniteLength(buffer); - } - - if (len == 0) - // return empty array instead of null, which should be - // used only for missing optionals - return new DerValue[0]; - - /* - * Create a temporary stream from which to read the data, - * unless it's not really needed. - */ - if (buffer.available() == len) - newstr = this; - else - newstr = subStream(len, true); - - /* - * Pull values out of the stream. - */ - Vector<DerValue> vec = new Vector<>(startLen); - DerValue value; - - do { - value = new DerValue(newstr.buffer, buffer.allowBER); - vec.addElement(value); - } while (newstr.available() > 0); - - if (newstr.available() != 0) - throw new IOException("Extra data at end of vector"); - - /* - * Now stick them into the array we're returning. - */ - int i, max = vec.size(); - DerValue[] retval = new DerValue[max]; - - for (i = 0; i < max; i++) - retval[i] = vec.elementAt(i); - - return retval; - } - - /** - * Get a single DER-encoded value from the input stream. - * It can often be useful to pull a value from the stream - * and defer parsing it. For example, you can pull a nested - * sequence out with one call, and only examine its elements - * later when you really need to. - */ - public DerValue getDerValue() throws IOException { - return new DerValue(buffer); - } - - /** - * Read a string that was encoded as a UTF8String DER value. - */ public String getUTF8String() throws IOException { - return readString(DerValue.tag_UTF8String, "UTF-8", UTF_8); + return getDerValue().getUTF8String(); } - /** - * Read a string that was encoded as a PrintableString DER value. - */ public String getPrintableString() throws IOException { - return readString(DerValue.tag_PrintableString, "Printable", - US_ASCII); + return getDerValue().getPrintableString(); } - /** - * Read a string that was encoded as a T61String DER value. - */ public String getT61String() throws IOException { - /* - * Works for common characters between T61 and ASCII. - */ - return readString(DerValue.tag_T61String, "T61", ISO_8859_1); + return getDerValue().getT61String(); } - /** - * Read a string that was encoded as a IA5String DER value. - */ - public String getIA5String() throws IOException { - return readString(DerValue.tag_IA5String, "IA5", US_ASCII); - } - - /** - * Read a string that was encoded as a BMPString DER value. - */ public String getBMPString() throws IOException { - return readString(DerValue.tag_BMPString, "BMP", UTF_16BE); + return getDerValue().getBMPString(); } - /** - * Read a string that was encoded as a GeneralString DER value. - */ - public String getGeneralString() throws IOException { - return readString(DerValue.tag_GeneralString, "General", - US_ASCII); + public String getIA5String() throws IOException { + return getDerValue().getIA5String(); } - /** - * Private helper routine to read an encoded string from the input - * stream. - * @param stringTag the tag for the type of string to read - * @param stringName a name to display in error messages - * @param enc the encoder to use to interpret the data. Should - * correspond to the stringTag above. - */ - private String readString(byte stringTag, String stringName, - Charset charset) throws IOException { - - if (buffer.read() != stringTag) - throw new IOException("DER input not a " + - stringName + " string"); - - int length = getDefiniteLength(buffer); - byte[] retval = new byte[length]; - if ((length != 0) && (buffer.read(retval) != length)) - throw new IOException("Short read of DER " + - stringName + " string"); - - return new String(retval, charset); + public String getGeneralString() throws IOException { + return getDerValue().getGeneralString(); } - /** - * Get a UTC encoded time value from the input stream. - */ public Date getUTCTime() throws IOException { - if (buffer.read() != DerValue.tag_UtcTime) - throw new IOException("DER input, UTCtime tag invalid "); - return buffer.getUTCTime(getDefiniteLength(buffer)); + return getDerValue().getUTCTime(); } - /** - * Get a Generalized encoded time value from the input stream. - */ public Date getGeneralizedTime() throws IOException { - if (buffer.read() != DerValue.tag_GeneralizedTime) - throw new IOException("DER input, GeneralizedTime tag invalid "); - return buffer.getGeneralizedTime(getDefiniteLength(buffer)); + return getDerValue().getGeneralizedTime(); } - /* - * Get a byte from the input stream. - */ - // package private - int getByte() throws IOException { - return (0x00ff & buffer.read()); + // Read a series of DerValue objects which is the sub-elements + // of a SEQUENCE and SET. + + public DerValue[] getSequence(int startLen) throws IOException { + return getDerValue().subs(DerValue.tag_Sequence, startLen); } - public int peekByte() throws IOException { - return buffer.peek(); + public DerValue[] getSet(int startLen) throws IOException { + return getDerValue().subs(DerValue.tag_Set, startLen); } - // package private - int getLength() throws IOException { - return getLength(buffer); + public DerValue[] getSet(int startLen, boolean implicit) throws IOException { + if (implicit) { + return getDerValue().subs((byte) 0, startLen); + } else { + return getSet(startLen); + } } - /* - * Get a length from the input stream, allowing for at most 32 bits of - * encoding to be used. (Not the same as getting a tagged integer!) - * - * @return the length or -1 if indefinite length found. - * @exception IOException on parsing error or unsupported lengths. - */ - static int getLength(InputStream in) throws IOException { - return getLength(in.read(), in); + public int peekByte() throws IOException { + if (pos == end) { + throw new IOException("At end"); + } + return data[pos]; } - /* + /** * Get a length from the input stream, allowing for at most 32 bits of * encoding to be used. (Not the same as getting a tagged integer!) * * @return the length or -1 if indefinite length found. * @exception IOException on parsing error or unsupported lengths. */ - static int getLength(int lenByte, InputStream in) throws IOException { - int value, tmp; + static int getLength(InputStream in) throws IOException { + int lenByte = in.read(); if (lenByte == -1) { throw new IOException("Short read of DER length"); } + if (lenByte == 0x80) { + return -1; + } + int value, tmp; String mdName = "DerInputStream.getLength(): "; tmp = lenByte; if ((tmp & 0x080) == 0x00) { // short form, 1 byte datum value = tmp; - } else { // long form or indefinite + } else { // long form tmp &= 0x07f; - /* - * NOTE: tmp == 0 indicates indefinite length encoded data. - * tmp > 4 indicates more than 4Gb of data. - */ - if (tmp == 0) - return -1; - if (tmp < 0 || tmp > 4) - throw new IOException(mdName + "lengthTag=" + tmp + ", " - + ((tmp < 0) ? "incorrect DER encoding." : "too big.")); + // tmp > 4 indicates more than 4Gb of data. + if (tmp > 4) { + throw new IOException(mdName + "lengthTag=" + tmp + ", too big."); + } value = 0x0ff & in.read(); tmp--; @@ -622,12 +270,8 @@ static int getLength(int lenByte, InputStream in) throws IOException { return value; } - int getDefiniteLength() throws IOException { - return getDefiniteLength(buffer); - } - /* - * Get a length from the input stream. + * Get a definite length from the input stream. * * @return the length * @exception IOException on parsing error or if indefinite length found. @@ -643,22 +287,22 @@ static int getDefiniteLength(InputStream in) throws IOException { /** * Mark the current position in the buffer, so that * a later call to <code>reset</code> will return here. + * The {@code readAheadLimit} is useless here because + * all data is available and we can go to anywhere at will. */ - public void mark(int value) { buffer.mark(value); } - + public void mark(int readAheadLimit) { mark = pos; } /** * Return to the position of the last <code>mark</code> * call. A mark is implicitly set at the beginning of * the stream when it is created. */ - public void reset() { buffer.reset(); } - + public void reset() { pos = mark; } /** * Returns the number of bytes available for reading. * This is most useful for testing whether the stream is * empty. */ - public int available() { return buffer.available(); } + public int available() { return end - pos; } } diff --git a/src/java.base/share/classes/sun/security/util/DerValue.java b/src/java.base/share/classes/sun/security/util/DerValue.java index cbd19575eaa..05fc77ac5d3 100644 --- a/src/java.base/share/classes/sun/security/util/DerValue.java +++ b/src/java.base/share/classes/sun/security/util/DerValue.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -25,12 +25,14 @@ package sun.security.util; +import sun.nio.cs.UTF_32BE; +import sun.util.calendar.CalendarDate; +import sun.util.calendar.CalendarSystem; + import java.io.*; import java.math.BigInteger; import java.nio.charset.Charset; -import java.nio.charset.IllegalCharsetNameException; -import java.nio.charset.UnsupportedCharsetException; -import java.util.Date; +import java.util.*; import static java.nio.charset.StandardCharsets.*; @@ -58,24 +60,13 @@ * @author Hemma Prafullchandra */ public class DerValue { + /** The tag class types */ public static final byte TAG_UNIVERSAL = (byte)0x000; public static final byte TAG_APPLICATION = (byte)0x040; public static final byte TAG_CONTEXT = (byte)0x080; public static final byte TAG_PRIVATE = (byte)0x0c0; - /** The DER tag of the value; one of the tag_ constants. */ - public byte tag; - - protected DerInputBuffer buffer; - - /** - * The DER-encoded data of the value, never null - */ - public final DerInputStream data; - - private int length; - /* * The type starts at the first byte of the encoding, and * is one of these tag_* values. That may be all the type @@ -161,6 +152,26 @@ public class DerValue { */ public static final byte tag_SetOf = 0x31; + // This class is mostly immutable except that: + // + // 1. resetTag() modifies the tag + // 2. the data field is mutable + // + // For compatibility, data, getData() and resetTag() are preserved. + // A modern caller should call withTag() or data() instead. + // + // Also, some constructors have not cloned buffer, so the data could + // be modified externally. + + public /*final*/ byte tag; + final byte[] buffer; + private final int start; + final int end; + private final boolean allowBER; + + // Unsafe. Legacy. Never null. + final public DerInputStream data; + /* * These values are the high order bits for the other kinds of tags. */ @@ -207,18 +218,32 @@ public boolean isConstructed(byte constructedTag) { } /** - * Creates a PrintableString or UTF8string DER value from a string + * Creates a new DerValue by specifying all its fields. + */ + DerValue(byte tag, byte[] buffer, int start, int end, boolean allowBER) { + this.tag = tag; + this.buffer = buffer; + this.start = start; + this.end = end; + this.allowBER = allowBER; + this.data = data(); + } + + /** + * Creates a PrintableString or UTF8string DER value from a string. */ public DerValue(String value) { - boolean isPrintableString = true; + this(isPrintableString(value) ? tag_PrintableString : tag_UTF8String, + value); + } + + private static boolean isPrintableString(String value) { for (int i = 0; i < value.length(); i++) { if (!isPrintableStringChar(value.charAt(i))) { - isPrintableString = false; - break; + return false; } } - - data = init(isPrintableString ? tag_PrintableString : tag_UTF8String, value); + return true; } /** @@ -227,113 +252,180 @@ public DerValue(String value) { * @param value the String object to use for the DER value */ public DerValue(byte stringTag, String value) { - data = init(stringTag, value); + this(stringTag, string2bytes(stringTag, value), false); } - // Creates a DerValue from a tag and some DER-encoded data w/ additional - // arg to control whether DER checks are enforced. - DerValue(byte tag, byte[] data, boolean allowBER) { - this.tag = tag; - buffer = new DerInputBuffer(data.clone(), allowBER); - length = data.length; - this.data = new DerInputStream(buffer); - this.data.mark(Integer.MAX_VALUE); + private static byte[] string2bytes(byte stringTag, String value) { + Charset charset = switch (stringTag) { + case tag_PrintableString, tag_IA5String, tag_GeneralString -> US_ASCII; + case tag_T61String -> ISO_8859_1; + case tag_BMPString -> UTF_16BE; + case tag_UTF8String -> UTF_8; + case tag_UniversalString -> Charset.forName("UTF_32BE"); + default -> throw new IllegalArgumentException("Unsupported DER string type"); + }; + return value.getBytes(charset); + } + + DerValue(byte tag, byte[] buffer, boolean allowBER) { + this(tag, buffer, 0, buffer.length, allowBER); } /** * Creates a DerValue from a tag and some DER-encoded data. * + * This is a public constructor. + * * @param tag the DER type tag - * @param data the DER-encoded data + * @param buffer the DER-encoded data */ - public DerValue(byte tag, byte[] data) { - this(tag, data, true); - } - - /* - * package private - */ - DerValue(DerInputBuffer in) throws IOException { - - // XXX must also parse BER-encoded constructed - // values such as sequences, sets... - tag = (byte)in.read(); - byte lenByte = (byte)in.read(); - length = DerInputStream.getLength(lenByte, in); - if (length == -1) { // indefinite length encoding found - DerInputBuffer inbuf = in.dup(); - inbuf = new DerInputBuffer( - DerIndefLenConverter.convertStream(inbuf, lenByte, tag), - in.allowBER); - if (tag != inbuf.read()) - throw new IOException - ("Indefinite length encoding not supported"); - length = DerInputStream.getDefiniteLength(inbuf); - buffer = inbuf.dup(); - buffer.truncate(length); - data = new DerInputStream(buffer); - // indefinite form is encoded by sending a length field with a - // length of 0. - i.e. [1000|0000]. - // the object is ended by sending two zero bytes. - in.skip(length + 2); - } else { - - buffer = in.dup(); - buffer.truncate(length); - data = new DerInputStream(buffer); - - in.skip(length); - } - } - - // Get an ASN.1/DER encoded datum from a buffer w/ additional - // arg to control whether DER checks are enforced. - DerValue(byte[] buf, boolean allowBER) throws IOException { - data = init(true, new ByteArrayInputStream(buf), allowBER); + public DerValue(byte tag, byte[] buffer) { + this(tag, buffer.clone(), true); } /** - * Get an ASN.1/DER encoded datum from a buffer. The - * entire buffer must hold exactly one datum, including - * its tag and length. + * Parse an ASN.1/BER encoded datum. The entire encoding must hold exactly + * one datum, including its tag and length. * - * @param buf buffer holding a single DER-encoded datum. + * This is a public constructor. */ - public DerValue(byte[] buf) throws IOException { - this(buf, true); - } - - // Get an ASN.1/DER encoded datum from part of a buffer w/ additional - // arg to control whether DER checks are enforced. - DerValue(byte[] buf, int offset, int len, boolean allowBER) - throws IOException { - data = init(true, new ByteArrayInputStream(buf, offset, len), allowBER); + public DerValue(byte[] encoding) throws IOException { + this(encoding.clone(), 0, encoding.length, true, false); } /** - * Get an ASN.1/DER encoded datum from part of a buffer. - * That part of the buffer must hold exactly one datum, including - * its tag and length. + * Parse an ASN.1 encoded datum from a byte array. + * + * @param buf the byte array containing the DER-encoded datum + * @param offset where the encoded datum starts inside {@code buf} + * @param len length of bytes to parse inside {@code buf} + * @param allowBER whether BER is allowed + * @param allowMore whether extra bytes are allowed after the encoded datum. + * If true, {@code len} can be bigger than the length of + * the encoded datum. * - * @param buf the buffer - * @param offset start point of the single DER-encoded dataum - * @param len how many bytes are in the encoded datum + * @throws IOException if it's an invalid encoding or there are extra bytes + * after the encoded datum and {@code allowMore} is false. */ - public DerValue(byte[] buf, int offset, int len) throws IOException { - this(buf, offset, len, true); + DerValue(byte[] buf, int offset, int len, boolean allowBER, boolean allowMore) + throws IOException { + + if (len < 2) { + throw new IOException("Too short"); + } + int pos = offset; + tag = buf[pos++]; + int lenByte = buf[pos++]; + + int length; + if (lenByte == (byte) 0x80) { // indefinite length + if (!allowBER) { + throw new IOException("Indefinite length encoding " + + "not supported with DER"); + } + if (!isConstructed()) { + throw new IOException("Indefinite length encoding " + + "not supported with non-constructed data"); + } + + // Reconstruct data source + buf = DerIndefLenConverter.convertStream( + new ByteArrayInputStream(buf, pos, len - (pos - offset)), tag); + offset = 0; + len = buf.length; + pos = 2; + + if (tag != buf[0]) { + throw new IOException("Indefinite length encoding not supported"); + } + lenByte = buf[1]; + if (lenByte == (byte) 0x80) { + throw new IOException("Indefinite len conversion failed"); + } + } + + if ((lenByte & 0x080) == 0x00) { // short form, 1 byte datum + length = lenByte; + } else { // long form + lenByte &= 0x07f; + if (lenByte > 4) { + throw new IOException("Invalid lenByte"); + } + if (len < 2 + lenByte) { + throw new IOException("Not enough length bytes"); + } + length = 0x0ff & buf[pos++]; + lenByte--; + if (length == 0 && !allowBER) { + // DER requires length value be encoded in minimum number of bytes + throw new IOException("Redundant length bytes found"); + } + while (lenByte-- > 0) { + length <<= 8; + length += 0x0ff & buf[pos++]; + } + if (length < 0) { + throw new IOException("Invalid length bytes"); + } else if (length <= 127 && !allowBER) { + throw new IOException("Should use short form for length"); + } + } + // pos is now at the beginning of the content + if (len - length < pos - offset) { + throw new EOFException("not enough content"); + } + if (len - length > pos - offset && !allowMore) { + throw new IOException("extra data at the end"); + } + this.buffer = buf; + this.start = pos; + this.end = pos + length; + this.allowBER = allowBER; + this.data = data(); } // Get an ASN1/DER encoded datum from an input stream w/ additional // arg to control whether DER checks are enforced. DerValue(InputStream in, boolean allowBER) throws IOException { - data = init(false, in, allowBER); + this.tag = (byte)in.read(); + int length = DerInputStream.getLength(in); + if (length == -1) { // indefinite length encoding found + if (!allowBER) { + throw new IOException("Indefinite length encoding " + + "not supported with DER"); + } + if (!isConstructed()) { + throw new IOException("Indefinite length encoding " + + "not supported with non-constructed data"); + } + this.buffer = DerIndefLenConverter.convertStream(in, tag); + ByteArrayInputStream bin = new ByteArrayInputStream(this.buffer); + if (tag != bin.read()) { + throw new IOException + ("Indefinite length encoding not supported"); + } + length = DerInputStream.getDefiniteLength(bin); + this.start = this.buffer.length - bin.available(); + this.end = this.start + length; + // position of in is undetermined. Precisely, it might be n-bytes + // after DerValue, and these n bytes are at the end of this.buffer + // after this.end. + } else { + this.buffer = IOUtils.readExactlyNBytes(in, length); + this.start = 0; + this.end = length; + // position of in is right after the DerValue + } + this.allowBER = allowBER; + this.data = data(); } /** * Get an ASN1/DER encoded datum from an input stream. The * stream may have additional data following the encoded datum. * In case of indefinite length encoded datum, the input stream - * must hold only one datum. + * must hold only one datum, i.e. all bytes in the stream might + * be consumed. Otherwise, only one DerValue will be consumed. * * @param in the input stream holding a single DER datum, * which may be followed by additional data @@ -342,89 +434,32 @@ public DerValue(InputStream in) throws IOException { this(in, true); } - private DerInputStream init(byte stringTag, String value) { - final Charset charset; - - tag = stringTag; - - switch (stringTag) { - case tag_PrintableString: - case tag_IA5String: - case tag_GeneralString: - charset = US_ASCII; - break; - case tag_T61String: - charset = ISO_8859_1; - break; - case tag_BMPString: - charset = UTF_16BE; - break; - case tag_UTF8String: - charset = UTF_8; - break; - case tag_UniversalString: - charset = Charset.forName("UTF_32BE"); - break; - default: - throw new IllegalArgumentException("Unsupported DER string type"); - } - - byte[] buf = value.getBytes(charset); - length = buf.length; - buffer = new DerInputBuffer(buf, true); - DerInputStream result = new DerInputStream(buffer); - result.mark(Integer.MAX_VALUE); - return result; - } - - /* - * helper routine + /** + * Encode an ASN1/DER encoded datum onto a DER output stream. */ - private DerInputStream init(boolean fullyBuffered, InputStream in, - boolean allowBER) throws IOException { - - tag = (byte)in.read(); - byte lenByte = (byte)in.read(); - length = DerInputStream.getLength(lenByte, in); - if (length == -1) { // indefinite length encoding found - in = new ByteArrayInputStream( - DerIndefLenConverter.convertStream(in, lenByte, tag)); - if (tag != in.read()) - throw new IOException - ("Indefinite length encoding not supported"); - length = DerInputStream.getDefiniteLength(in); - } - - if (fullyBuffered && in.available() != length) - throw new IOException("extra data given to DerValue constructor"); - - byte[] bytes = IOUtils.readExactlyNBytes(in, length); - - buffer = new DerInputBuffer(bytes, allowBER); - return new DerInputStream(buffer); + public void encode(DerOutputStream out) throws IOException { + out.write(tag); + out.putLength(end - start); + out.write(buffer, start, end - start); + data.pos = data.end; // Compatibility. Reach end. } /** - * Encode an ASN1/DER encoded datum onto a DER output stream. + * Returns a new DerInputStream pointing at the start of this + * DerValue's content. + * + * @return the new DerInputStream value */ - public void encode(DerOutputStream out) - throws IOException { - out.write(tag); - out.putLength(length); - // XXX yeech, excess copies ... DerInputBuffer.write(OutStream) - if (length > 0) { - byte[] value = new byte[length]; - // always synchronized on data - synchronized (data) { - buffer.reset(); - if (buffer.read(value) != length) { - throw new IOException("short DER value read (encode)"); - } - out.write(value); - } - } + public final DerInputStream data() { + return new DerInputStream(buffer, start, end - start, allowBER); } + /** + * Returns the data field inside this class directly. + * + * Both this method and the {@link #data} field should be avoided. + * Consider using {@link #data()} instead. + */ public final DerInputStream getData() { return data; } @@ -442,14 +477,12 @@ public boolean getBoolean() throws IOException { if (tag != tag_Boolean) { throw new IOException("DerValue.getBoolean, not a BOOLEAN " + tag); } - if (length != 1) { + if (end - start != 1) { throw new IOException("DerValue.getBoolean, invalid length " - + length); - } - if (buffer.read() != 0) { - return true; + + (end - start)); } - return false; + data.pos = data.end; // Compatibility. Reach end. + return buffer[start] != 0; } /** @@ -458,20 +491,11 @@ public boolean getBoolean() throws IOException { * @return the OID held in this DER value */ public ObjectIdentifier getOID() throws IOException { - if (tag != tag_ObjectId) + if (tag != tag_ObjectId) { throw new IOException("DerValue.getOID, not an OID " + tag); - return new ObjectIdentifier(buffer); - } - - private byte[] append(byte[] a, byte[] b) { - if (a == null) - return b; - - byte[] ret = new byte[a.length + b.length]; - System.arraycopy(a, 0, ret, 0, a.length); - System.arraycopy(b, 0, ret, a.length, b.length); - - return ret; + } + data.pos = data.end; // Compatibility. Reach end. + return new ObjectIdentifier(Arrays.copyOfRange(buffer, start, end)); } /** @@ -487,29 +511,21 @@ public byte[] getOctetString() throws IOException { } // Note: do not attempt to call buffer.read(bytes) at all. There's a // known bug that it returns -1 instead of 0. - if (length == 0) { + if (end - start == 0) { return new byte[0]; } - // Only allocate the array if there are enough bytes available. - // This only works for ByteArrayInputStream. - // The assignment below ensures that buffer has the required type. - ByteArrayInputStream arrayInput = buffer; - if (arrayInput.available() < length) { - throw new IOException("short read on DerValue buffer"); - } - byte[] bytes = new byte[length]; - arrayInput.read(bytes); - - if (isConstructed()) { - DerInputStream in = new DerInputStream(bytes, 0, bytes.length, - buffer.allowBER); - bytes = null; - while (in.available() != 0) { - bytes = append(bytes, in.getOctetString()); + data.pos = data.end; // Compatibility. Reach end. + if (!isConstructed()) { + return Arrays.copyOfRange(buffer, start, end); + } else { + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + DerInputStream dis = data(); + while (dis.available() > 0) { + bout.write(dis.getDerValue().getOctetString()); } + return bout.toByteArray(); } - return bytes; } /** @@ -518,10 +534,18 @@ public byte[] getOctetString() throws IOException { * @return the integer held in this DER value. */ public int getInteger() throws IOException { - if (tag != tag_Integer) { - throw new IOException("DerValue.getInteger, not an int " + tag); + return getIntegerInternal(tag_Integer); + } + + private int getIntegerInternal(byte expectedTag) throws IOException { + BigInteger result = getBigIntegerInternal(expectedTag, false); + if (result.compareTo(BigInteger.valueOf(Integer.MIN_VALUE)) < 0) { + throw new IOException("Integer below minimum valid value"); + } + if (result.compareTo(BigInteger.valueOf(Integer.MAX_VALUE)) > 0) { + throw new IOException("Integer exceeds maximum valid value"); } - return buffer.getInteger(data.available()); + return result.intValue(); } /** @@ -530,9 +554,7 @@ public int getInteger() throws IOException { * @return the integer held in this DER value as a BigInteger. */ public BigInteger getBigInteger() throws IOException { - if (tag != tag_Integer) - throw new IOException("DerValue.getBigInteger, not an int " + tag); - return buffer.getBigInteger(data.available(), false); + return getBigIntegerInternal(tag_Integer, false); } /** @@ -543,9 +565,30 @@ public BigInteger getBigInteger() throws IOException { * @return the integer held in this DER value as a BigInteger. */ public BigInteger getPositiveBigInteger() throws IOException { - if (tag != tag_Integer) - throw new IOException("DerValue.getBigInteger, not an int " + tag); - return buffer.getBigInteger(data.available(), true); + return getBigIntegerInternal(tag_Integer, true); + } + + /** + * Returns a BigInteger value + * + * @param makePositive whether to always return a positive value, + * irrespective of actual encoding + * @return the integer as a BigInteger. + */ + private BigInteger getBigIntegerInternal(byte expectedTag, boolean makePositive) throws IOException { + if (tag != expectedTag) { + throw new IOException("DerValue.getBigIntegerInternal, not expected " + tag); + } + if (end == start) { + throw new IOException("Invalid encoding: zero length Int value"); + } + data.pos = data.end; // Compatibility. Reach end. + if (!allowBER && (end - start >= 2 && (buffer[start] == 0) && (buffer[start + 1] >= 0))) { + throw new IOException("Invalid encoding: redundant leading 0s"); + } + return makePositive + ? new BigInteger(1, buffer, start, end - start) + : new BigInteger(buffer, start, end - start); } /** @@ -554,11 +597,7 @@ public BigInteger getPositiveBigInteger() throws IOException { * @return the integer held in this DER value. */ public int getEnumerated() throws IOException { - if (tag != tag_Enumerated) { - throw new IOException("DerValue.getEnumerated, incorrect tag: " - + tag); - } - return buffer.getInteger(data.available()); + return getIntegerInternal(tag_Enumerated); } /** @@ -567,11 +606,7 @@ public int getEnumerated() throws IOException { * @return the bit string held in this value */ public byte[] getBitString() throws IOException { - if (tag != tag_BitString) - throw new IOException( - "DerValue.getBitString, not a bit string " + tag); - - return buffer.getBitString(); + return getBitString(false); } /** @@ -580,11 +615,7 @@ public byte[] getBitString() throws IOException { * @return a BitArray representing the bit string held in this value */ public BitArray getUnalignedBitString() throws IOException { - if (tag != tag_BitString) - throw new IOException( - "DerValue.getBitString, not a bit string " + tag); - - return buffer.getUnalignedBitString(); + return getUnalignedBitString(false); } /** @@ -593,22 +624,16 @@ public BitArray getUnalignedBitString() throws IOException { */ // TBD: Need encoder for UniversalString before it can be handled. public String getAsString() throws IOException { - if (tag == tag_UTF8String) - return getUTF8String(); - else if (tag == tag_PrintableString) - return getPrintableString(); - else if (tag == tag_T61String) - return getT61String(); - else if (tag == tag_IA5String) - return getIA5String(); - else if (tag == tag_UniversalString) - return getUniversalString(); - else if (tag == tag_BMPString) - return getBMPString(); - else if (tag == tag_GeneralString) - return getGeneralString(); - else - return null; + return switch (tag) { + case tag_UTF8String -> getUTF8String(); + case tag_PrintableString -> getPrintableString(); + case tag_T61String -> getT61String(); + case tag_IA5String -> getIA5String(); + case tag_UniversalString -> getUniversalString(); + case tag_BMPString -> getBMPString(); + case tag_GeneralString -> getGeneralString(); + default -> null; + }; } /** @@ -620,11 +645,26 @@ else if (tag == tag_GeneralString) */ public byte[] getBitString(boolean tagImplicit) throws IOException { if (!tagImplicit) { - if (tag != tag_BitString) + if (tag != tag_BitString) { throw new IOException("DerValue.getBitString, not a bit string " - + tag); + + tag); } - return buffer.getBitString(); + } + if (end == start) { + throw new IOException("Invalid encoding: zero length bit string"); + } + int numOfPadBits = buffer[start]; + if ((numOfPadBits < 0) || (numOfPadBits > 7)) { + throw new IOException("Invalid number of padding bits"); + } + // minus the first byte which indicates the number of padding bits + byte[] retval = Arrays.copyOfRange(buffer, start + 1, end); + if (numOfPadBits != 0) { + // get rid of the padding bits + retval[end - start - 2] &= (0xff << numOfPadBits); + } + data.pos = data.end; // Compatibility. Reach end. + return retval; } /** @@ -635,13 +675,27 @@ public byte[] getBitString(boolean tagImplicit) throws IOException { * @return the bit string held in this value */ public BitArray getUnalignedBitString(boolean tagImplicit) - throws IOException { + throws IOException { if (!tagImplicit) { - if (tag != tag_BitString) + if (tag != tag_BitString) { throw new IOException("DerValue.getBitString, not a bit string " - + tag); + + tag); } - return buffer.getUnalignedBitString(); + } + if (end == start) { + throw new IOException("Invalid encoding: zero length bit string"); + } + data.pos = data.end; // Compatibility. Reach end. + int numOfPadBits = buffer[start]; + if ((numOfPadBits < 0) || (numOfPadBits > 7)) { + throw new IOException("Invalid number of padding bits"); + } + if (end == start + 1) { + return new BitArray(0); + } else { + return new BitArray(((end - start - 1) << 3) - numOfPadBits, + Arrays.copyOfRange(buffer, start + 1, end)); + } } /** @@ -649,12 +703,16 @@ public BitArray getUnalignedBitString(boolean tagImplicit) * DerInputStream associated with this object. */ public byte[] getDataBytes() throws IOException { - byte[] retVal = new byte[length]; - synchronized (data) { - data.reset(); - data.getBytes(retVal); + data.pos = data.end; // Compatibility. Reach end. + return Arrays.copyOfRange(buffer, start, end); + } + + private String readStringInternal(byte expectedTag, Charset cs) throws IOException { + if (tag != expectedTag) { + throw new IOException("Incorrect string type " + tag + " is not " + expectedTag); } - return retVal; + data.pos = data.end; // Compatibility. Reach end. + return new String(buffer, start, end - start, cs); } /** @@ -662,13 +720,8 @@ public byte[] getDataBytes() throws IOException { * * @return the printable string held in this value */ - public String getPrintableString() - throws IOException { - if (tag != tag_PrintableString) - throw new IOException( - "DerValue.getPrintableString, not a string " + tag); - - return new String(getDataBytes(), US_ASCII); + public String getPrintableString() throws IOException { + return readStringInternal(tag_PrintableString, US_ASCII); } /** @@ -677,11 +730,7 @@ public String getPrintableString() * @return the teletype string held in this value */ public String getT61String() throws IOException { - if (tag != tag_T61String) - throw new IOException( - "DerValue.getT61String, not T61 " + tag); - - return new String(getDataBytes(), ISO_8859_1); + return readStringInternal(tag_T61String, ISO_8859_1); } /** @@ -690,11 +739,7 @@ public String getT61String() throws IOException { * @return the ASCII string held in this value */ public String getIA5String() throws IOException { - if (tag != tag_IA5String) - throw new IOException( - "DerValue.getIA5String, not IA5 " + tag); - - return new String(getDataBytes(), US_ASCII); + return readStringInternal(tag_IA5String, US_ASCII); } /** @@ -704,13 +749,8 @@ public String getIA5String() throws IOException { * this value */ public String getBMPString() throws IOException { - if (tag != tag_BMPString) - throw new IOException( - "DerValue.getBMPString, not BMP " + tag); - - // BMPString is the same as Unicode in big endian, unmarked - // format. - return new String(getDataBytes(), UTF_16BE); + // BMPString is the same as Unicode in big endian, unmarked format. + return readStringInternal(tag_BMPString, UTF_16BE); } /** @@ -720,11 +760,7 @@ public String getBMPString() throws IOException { * this value */ public String getUTF8String() throws IOException { - if (tag != tag_UTF8String) - throw new IOException( - "DerValue.getUTF8String, not UTF-8 " + tag); - - return new String(getDataBytes(), UTF_8); + return readStringInternal(tag_UTF8String, UTF_8); } /** @@ -734,32 +770,223 @@ public String getUTF8String() throws IOException { * this value */ public String getGeneralString() throws IOException { - if (tag != tag_GeneralString) - throw new IOException( - "DerValue.getGeneralString, not GeneralString " + tag); - - return new String(getDataBytes(), US_ASCII); + return readStringInternal(tag_GeneralString, US_ASCII); } /** * Returns the ASN.1 UNIVERSAL (UTF-32) STRING value as a Java String. * * @return a string corresponding to the encoded UniversalString held in - * this value or an empty string if UTF_32BE is not a supported character - * set. + * this value */ public String getUniversalString() throws IOException { - if (tag != tag_UniversalString) - throw new IOException( - "DerValue.getUniversalString, not UniversalString " + tag); - try { - Charset cset = Charset.forName("UTF_32BE"); - return new String(getDataBytes(), cset); - } catch (IllegalCharsetNameException | UnsupportedCharsetException e) { - return ""; + return readStringInternal(tag_UniversalString, new UTF_32BE()); + } + + /** + * Reads the ASN.1 NULL value + */ + public void getNull() throws IOException { + if (tag != tag_Null) { + throw new IOException("DerValue.getNull, not NULL: " + tag); + } + if (end != start) { + throw new IOException("NULL should contain no data"); } } + /** + * Private helper routine to extract time from the der value. + * @param generalized true if Generalized Time is to be read, false + * if UTC Time is to be read. + */ + private Date getTimeInternal(boolean generalized) throws IOException { + + /* + * UTC time encoded as ASCII chars: + * YYMMDDhhmmZ + * YYMMDDhhmmssZ + * YYMMDDhhmm+hhmm + * YYMMDDhhmm-hhmm + * YYMMDDhhmmss+hhmm + * YYMMDDhhmmss-hhmm + * UTC Time is broken in storing only two digits of year. + * If YY < 50, we assume 20YY; + * if YY >= 50, we assume 19YY, as per RFC 5280. + * + * Generalized time has a four-digit year and allows any + * precision specified in ISO 8601. However, for our purposes, + * we will only allow the same format as UTC time, except that + * fractional seconds (millisecond precision) are supported. + */ + + int year, month, day, hour, minute, second, millis; + String type; + int pos = start; + int len = end - start; + + if (generalized) { + type = "Generalized"; + year = 1000 * toDigit(buffer[pos++], type); + year += 100 * toDigit(buffer[pos++], type); + year += 10 * toDigit(buffer[pos++], type); + year += toDigit(buffer[pos++], type); + len -= 2; // For the two extra YY + } else { + type = "UTC"; + year = 10 * toDigit(buffer[pos++], type); + year += toDigit(buffer[pos++], type); + + if (year < 50) { // origin 2000 + year += 2000; + } else { + year += 1900; // origin 1900 + } + } + + month = 10 * toDigit(buffer[pos++], type); + month += toDigit(buffer[pos++], type); + + day = 10 * toDigit(buffer[pos++], type); + day += toDigit(buffer[pos++], type); + + hour = 10 * toDigit(buffer[pos++], type); + hour += toDigit(buffer[pos++], type); + + minute = 10 * toDigit(buffer[pos++], type); + minute += toDigit(buffer[pos++], type); + + len -= 10; // YYMMDDhhmm + + /* + * We allow for non-encoded seconds, even though the + * IETF-PKIX specification says that the seconds should + * always be encoded even if it is zero. + */ + + millis = 0; + if (len > 2) { + second = 10 * toDigit(buffer[pos++], type); + second += toDigit(buffer[pos++], type); + len -= 2; + // handle fractional seconds (if present) + if (generalized && (buffer[pos] == '.' || buffer[pos] == ',')) { + len --; + if (len == 0) { + throw new IOException("Parse " + type + + " time, empty fractional part"); + } + pos++; + int precision = 0; + while (buffer[pos] != 'Z' && + buffer[pos] != '+' && + buffer[pos] != '-') { + // Validate all digits in the fractional part but + // store millisecond precision only + int thisDigit = toDigit(buffer[pos], type); + precision++; + len--; + if (len == 0) { + throw new IOException("Parse " + type + + " time, invalid fractional part"); + } + pos++; + switch (precision) { + case 1 -> millis += 100 * thisDigit; + case 2 -> millis += 10 * thisDigit; + case 3 -> millis += thisDigit; + } + } + if (precision == 0) { + throw new IOException("Parse " + type + + " time, empty fractional part"); + } + } + } else + second = 0; + + if (month == 0 || day == 0 + || month > 12 || day > 31 + || hour >= 24 || minute >= 60 || second >= 60) { + throw new IOException("Parse " + type + " time, invalid format"); + } + + /* + * Generalized time can theoretically allow any precision, + * but we're not supporting that. + */ + CalendarSystem gcal = CalendarSystem.getGregorianCalendar(); + CalendarDate date = gcal.newCalendarDate(null); // no time zone + date.setDate(year, month, day); + date.setTimeOfDay(hour, minute, second, millis); + long time = gcal.getTime(date); + + /* + * Finally, "Z" or "+hhmm" or "-hhmm" ... offsets change hhmm + */ + if (! (len == 1 || len == 5)) { + throw new IOException("Parse " + type + " time, invalid offset"); + } + + int hr, min; + + switch (buffer[pos++]) { + case '+': + if (len != 5) { + throw new IOException("Parse " + type + " time, invalid offset"); + } + hr = 10 * toDigit(buffer[pos++], type); + hr += toDigit(buffer[pos++], type); + min = 10 * toDigit(buffer[pos++], type); + min += toDigit(buffer[pos++], type); + + if (hr >= 24 || min >= 60) { + throw new IOException("Parse " + type + " time, +hhmm"); + } + + time -= ((hr * 60) + min) * 60 * 1000; + break; + + case '-': + if (len != 5) { + throw new IOException("Parse " + type + " time, invalid offset"); + } + hr = 10 * toDigit(buffer[pos++], type); + hr += toDigit(buffer[pos++], type); + min = 10 * toDigit(buffer[pos++], type); + min += toDigit(buffer[pos++], type); + + if (hr >= 24 || min >= 60) { + throw new IOException("Parse " + type + " time, -hhmm"); + } + + time += ((hr * 60) + min) * 60 * 1000; + break; + + case 'Z': + if (len != 1) { + throw new IOException("Parse " + type + " time, invalid format"); + } + break; + + default: + throw new IOException("Parse " + type + " time, garbage offset"); + } + return new Date(time); + } + + /** + * Converts byte (represented as a char) to int. + * @throws IOException if integer is not a valid digit in the specified + * radix (10) + */ + private static int toDigit(byte b, String type) throws IOException { + if (b < '0' || b > '9') { + throw new IOException("Parse " + type + " time, invalid format"); + } + return b - '0'; + } + /** * Returns a Date if the DerValue is UtcTime. * @@ -769,7 +996,11 @@ public Date getUTCTime() throws IOException { if (tag != tag_UtcTime) { throw new IOException("DerValue.getUTCTime, not a UtcTime: " + tag); } - return buffer.getUTCTime(data.available()); + if (end - start < 11 || end - start > 17) + throw new IOException("DER UTC Time length error"); + + data.pos = data.end; // Compatibility. Reach end. + return getTimeInternal(false); } /** @@ -782,7 +1013,11 @@ public Date getGeneralizedTime() throws IOException { throw new IOException( "DerValue.getGeneralizedTime, not a GeneralizedTime: " + tag); } - return buffer.getGeneralizedTime(data.available()); + if (end - start < 13) + throw new IOException("DER Generalized Time length error"); + + data.pos = data.end; // Compatibility. Reach end. + return getTimeInternal(true); } /** @@ -804,28 +1039,10 @@ public boolean equals(Object o) { if (tag != other.tag) { return false; } - if (data == other.data) { + if (buffer == other.buffer && start == other.start && end == other.end) { return true; } - - // make sure the order of lock is always consistent to avoid a deadlock - return (System.identityHashCode(this.data) - > System.identityHashCode(other.data)) ? - doEquals(this, other): - doEquals(other, this); - } - - /** - * Helper for public method equals() - */ - private static boolean doEquals(DerValue d1, DerValue d2) { - synchronized (d1.data) { - synchronized (d2.data) { - d1.data.reset(); - d2.data.reset(); - return d1.buffer.equals(d2.buffer); - } - } + return Arrays.equals(buffer, start, end, other.buffer, other.start, other.end); } /** @@ -835,23 +1052,8 @@ private static boolean doEquals(DerValue d1, DerValue d2) { */ @Override public String toString() { - try { - - String str = getAsString(); - if (str != null) - return "\"" + str + "\""; - if (tag == tag_Null) - return "[DerValue, null]"; - if (tag == tag_ObjectId) - return "OID." + getOID(); - - // integers - else - return "[DerValue, tag = " + tag - + ", length = " + length + "]"; - } catch (IOException e) { - throw new IllegalArgumentException("misformatted DER value"); - } + return String.format("DerValue(%02x, %s, %d, %d)", + 0xff & tag, buffer, start, end); } /** @@ -862,9 +1064,8 @@ public String toString() { */ public byte[] toByteArray() throws IOException { DerOutputStream out = new DerOutputStream(); - encode(out); - data.reset(); + data.pos = data.start; // encode go last, should go back return out.toByteArray(); } @@ -876,7 +1077,7 @@ public byte[] toByteArray() throws IOException { */ public DerInputStream toDerInputStream() throws IOException { if (tag == tag_Sequence || tag == tag_Set) - return new DerInputStream(buffer); + return data; throw new IOException("toDerInputStream rejects tag type " + tag); } @@ -884,7 +1085,7 @@ public DerInputStream toDerInputStream() throws IOException { * Get the length of the encoded value. */ public int length() { - return length; + return end - start; } /** @@ -950,12 +1151,26 @@ public static byte createTag(byte tagClass, boolean form, byte val) { * Set the tag of the attribute. Commonly used to reset the * tag value used for IMPLICIT encodings. * + * This method should be avoided, consider using withTag() instead. + * * @param tag the tag value */ public void resetTag(byte tag) { this.tag = tag; } + /** + * Returns a new DerValue with a different tag. This method is used + * to convert a DerValue decoded from an IMPLICIT encoding to its real + * tag. The content is not checked against the tag in this method. + * + * @param newTag the new tag + * @return a new DerValue + */ + public DerValue withTag(byte newTag) { + return new DerValue(newTag, buffer, start, end, allowBER); + } + /** * Returns a hashcode for this DerValue. * @@ -963,6 +1178,30 @@ public void resetTag(byte tag) { */ @Override public int hashCode() { - return toString().hashCode(); + int result = tag; + for (int i = start; i < end; i++) { + result = 31 * result + buffer[i]; + } + return result; + } + + /** + * Reads the sub-values in a constructed DerValue. + * + * @param expectedTag the expected tag, or zero if we don't check. + * This is useful when this DerValue is IMPLICIT. + * @param startLen estimated number of sub-values + * @return the sub-values in an array + */ + DerValue[] subs(byte expectedTag, int startLen) throws IOException { + if (expectedTag != 0 && expectedTag != tag) { + throw new IOException("Not the correct tag"); + } + List<DerValue> result = new ArrayList<>(startLen); + DerInputStream dis = data(); + while (dis.available() > 0) { + result.add(dis.getDerValue()); + } + return result.toArray(new DerValue[0]); } } diff --git a/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java b/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java index 37cb3825be0..9c7bfafa139 100644 --- a/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java +++ b/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java @@ -138,12 +138,13 @@ private void readObject(ObjectInputStream is) componentLen = comp.length; } - // Check the estimated size before it is too later. + // Check the estimated size before it is too late. The check + // will be performed again in init(). checkOidSize(componentLen); - init(comp, componentLen); } else { checkOidSize(encoding.length); + check(encoding); } } @@ -244,64 +245,20 @@ private ObjectIdentifier(String oid) throws IOException { } } - /** - * Constructor, from an ASN.1 encoded input stream. - * Validity check NOT included. - * The encoding of the ID in the stream uses "DER", a BER/1 subset. - * In this case, that means a triple { typeId, length, data }. - * - * <P><STRONG>NOTE:</STRONG> When an exception is thrown, the - * input stream has not been returned to its "initial" state. - * - * @param in DER-encoded data holding an object ID - * @exception IOException indicates a decoding error - */ - public ObjectIdentifier(DerInputStream in) throws IOException { - byte type_id; - int bufferEnd; - - /* - * Object IDs are a "universal" type, and their tag needs only - * one byte of encoding. Verify that the tag of this datum - * is that of an object ID. - * - * Then get and check the length of the ID's encoding. We set - * up so that we can use in.available() to check for the end of - * this value in the data stream. - */ - type_id = (byte)in.getByte(); - if (type_id != DerValue.tag_ObjectId) - throw new IOException ( - "ObjectIdentifier() -- data isn't an object ID" - + " (tag = " + type_id + ")" - ); - - int len = in.getDefiniteLength(); - checkOidSize(len); - if (len > in.available()) { - throw new IOException("ObjectIdentifier length exceeds " + - "data available. Length: " + len + ", Available: " + - in.available()); - } - - encoding = new byte[len]; - in.getBytes(encoding); + // Called by DerValue::getOID. No need to clone input. + ObjectIdentifier(byte[] encoding) throws IOException { + checkOidSize(encoding.length); check(encoding); + this.encoding = encoding; } - /* - * Constructor, from the rest of a DER input buffer; - * the tag and length have been removed/verified - * Validity check NOT included. + /** + * Reads an ObjectIdentifier from a DerInputStream. + * @param in the input stream + * @throws IOException if there is an encoding error */ - ObjectIdentifier(DerInputBuffer buf) throws IOException { - DerInputStream in = new DerInputStream(buf); - int len = in.available(); - checkOidSize(len); - - encoding = new byte[len]; - in.getBytes(encoding); - check(encoding); + public ObjectIdentifier(DerInputStream in) throws IOException { + encoding = in.getDerValue().getOID().encoding; } private void init(int[] components, int length) throws IOException { diff --git a/src/java.base/share/classes/sun/security/x509/AlgorithmId.java b/src/java.base/share/classes/sun/security/x509/AlgorithmId.java index b9b96b31c91..d9e46d98907 100644 --- a/src/java.base/share/classes/sun/security/x509/AlgorithmId.java +++ b/src/java.base/share/classes/sun/security/x509/AlgorithmId.java @@ -207,9 +207,20 @@ public void derEncode (OutputStream out) throws IOException { bytes.putNull(); }*/ if (algid.equals(RSASSA_PSS_oid) || algid.equals(ed448_oid) - || algid.equals(ed25519_oid)) { + || algid.equals(ed25519_oid) + || algid.equals(x448_oid) + || algid.equals(x25519_oid) + || algid.equals(SHA224withECDSA_oid) + || algid.equals(SHA256withECDSA_oid) + || algid.equals(SHA384withECDSA_oid) + || algid.equals(SHA512withECDSA_oid)) { // RFC 4055 3.3: when an RSASSA-PSS key does not require // parameter validation, field is absent. + // RFC 8410 3: for id-X25519, id-X448, id-Ed25519, and + // id-Ed448, the parameters must be absent. + // RFC 5758 3.2: the encoding must omit the parameters field + // for ecdsa-with-SHA224, ecdsa-with-SHA256, ecdsa-with-SHA384 + // and ecdsa-with-SHA512. } else { bytes.putNull(); } @@ -644,6 +655,20 @@ private static ConcurrentHashMap<String, String> collectOIDAliases() { public static final ObjectIdentifier ed448_oid = ObjectIdentifier.of(KnownOIDs.Ed448); + public static final ObjectIdentifier x25519_oid = + ObjectIdentifier.of(KnownOIDs.X25519); + public static final ObjectIdentifier x448_oid = + ObjectIdentifier.of(KnownOIDs.X448); + + public static final ObjectIdentifier SHA224withECDSA_oid = + ObjectIdentifier.of(KnownOIDs.SHA224withECDSA); + public static final ObjectIdentifier SHA256withECDSA_oid = + ObjectIdentifier.of(KnownOIDs.SHA256withECDSA); + public static final ObjectIdentifier SHA384withECDSA_oid = + ObjectIdentifier.of(KnownOIDs.SHA384withECDSA); + public static final ObjectIdentifier SHA512withECDSA_oid = + ObjectIdentifier.of(KnownOIDs.SHA512withECDSA); + /** * Creates a signature algorithm name from a digest algorithm * name and a encryption algorithm name. diff --git a/src/java.base/share/classes/sun/util/locale/BaseLocale.java b/src/java.base/share/classes/sun/util/locale/BaseLocale.java index 27ad70001a1..b520771f20a 100644 --- a/src/java.base/share/classes/sun/util/locale/BaseLocale.java +++ b/src/java.base/share/classes/sun/util/locale/BaseLocale.java @@ -32,7 +32,7 @@ package sun.util.locale; -import jdk.internal.misc.VM; +import jdk.internal.misc.CDS; import jdk.internal.vm.annotation.Stable; import java.lang.ref.SoftReference; @@ -62,7 +62,7 @@ public final class BaseLocale { ROOT = 18, NUM_CONSTANTS = 19; static { - VM.initializeFromArchive(BaseLocale.class); + CDS.initializeFromArchive(BaseLocale.class); BaseLocale[] baseLocales = constantBaseLocales; if (baseLocales == null) { baseLocales = new BaseLocale[NUM_CONSTANTS]; diff --git a/src/java.base/share/conf/security/java.security b/src/java.base/share/conf/security/java.security index b87bf271cce..b84a9d3e0cc 100644 --- a/src/java.base/share/conf/security/java.security +++ b/src/java.base/share/conf/security/java.security @@ -495,16 +495,7 @@ sun.security.krb5.maxReferrals=5 # in the jdk.[tls|certpath|jar].disabledAlgorithms properties. To include this # list in any of the disabledAlgorithms properties, add the property name as # an entry. -jdk.disabled.namedCurves = secp112r1, secp112r2, secp128r1, secp128r2, \ - secp160k1, secp160r1, secp160r2, secp192k1, secp192r1, secp224k1, \ - secp224r1, secp256k1, sect113r1, sect113r2, sect131r1, sect131r2, \ - sect163k1, sect163r1, sect163r2, sect193r1, sect193r2, sect233k1, \ - sect233r1, sect239k1, sect283k1, sect283r1, sect409k1, sect409r1, \ - sect571k1, sect571r1, X9.62 c2tnb191v1, X9.62 c2tnb191v2, \ - X9.62 c2tnb191v3, X9.62 c2tnb239v1, X9.62 c2tnb239v2, X9.62 c2tnb239v3, \ - X9.62 c2tnb359v1, X9.62 c2tnb431r1, X9.62 prime192v2, X9.62 prime192v3, \ - X9.62 prime239v1, X9.62 prime239v2, X9.62 prime239v3, brainpoolP256r1, \ - brainpoolP320r1, brainpoolP384r1, brainpoolP512r1 +#jdk.disabled.namedCurves= # # Algorithm restrictions for certification path (CertPath) processing @@ -642,8 +633,7 @@ jdk.disabled.namedCurves = secp112r1, secp112r2, secp128r1, secp128r2, \ # # jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & usage TLSServer, \ - RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224, \ - include jdk.disabled.namedCurves + RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224 # # Legacy algorithms for certification path (CertPath) processing and @@ -707,7 +697,7 @@ jdk.security.legacyAlgorithms=SHA1, \ # See "jdk.certpath.disabledAlgorithms" for syntax descriptions. # jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \ - DSA keySize < 1024, include jdk.disabled.namedCurves + DSA keySize < 1024 # # Algorithm restrictions for Secure Socket Layer/Transport Layer Security @@ -742,8 +732,7 @@ jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \ # jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048, \ # rsa_pkcs1_sha1, secp224r1 jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, DH keySize < 1024, \ - EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \ - include jdk.disabled.namedCurves + EC keySize < 224, 3DES_EDE_CBC, anon, NULL # # Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS) diff --git a/src/java.base/share/native/libjava/CDS.c b/src/java.base/share/native/libjava/CDS.c new file mode 100644 index 00000000000..9cad87ead44 --- /dev/null +++ b/src/java.base/share/native/libjava/CDS.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include "jvm.h" +#include "jdk_internal_misc_CDS.h" + +JNIEXPORT void JNICALL +Java_jdk_internal_misc_CDS_initializeFromArchive(JNIEnv *env, jclass ignore, + jclass c) { + JVM_InitializeFromArchive(env, c); +} + +JNIEXPORT void JNICALL +Java_jdk_internal_misc_CDS_defineArchivedModules(JNIEnv *env, jclass ignore, + jobject platform_loader, + jobject system_loader) { + JVM_DefineArchivedModules(env, platform_loader, system_loader); +} + +JNIEXPORT jlong JNICALL +Java_jdk_internal_misc_CDS_getRandomSeedForDumping(JNIEnv *env, jclass ignore) { + return JVM_GetRandomSeedForDumping(); +} + +JNIEXPORT jboolean JNICALL +Java_jdk_internal_misc_CDS_isDynamicDumpingEnabled(JNIEnv *env, jclass jcls) { + return JVM_IsDynamicDumpingEnabled(env); +} + +JNIEXPORT jboolean JNICALL +Java_jdk_internal_misc_CDS_isSharingEnabled(JNIEnv *env, jclass jcls) { + return JVM_IsSharingEnabled(env); +} diff --git a/src/java.base/share/native/libjava/ClassLoader.c b/src/java.base/share/native/libjava/ClassLoader.c index 31b3d814337..021a5a191eb 100644 --- a/src/java.base/share/native/libjava/ClassLoader.c +++ b/src/java.base/share/native/libjava/ClassLoader.c @@ -260,7 +260,7 @@ Java_java_lang_ClassLoader_defineClass0(JNIEnv *env, utfName = NULL; } - return JVM_LookupDefineClass(env, lookup, utfName, body, length, pd, initialize, flags, classData); + result = JVM_LookupDefineClass(env, lookup, utfName, body, length, pd, initialize, flags, classData); free_body: free(body); diff --git a/src/java.base/share/native/libjava/VM.c b/src/java.base/share/native/libjava/VM.c index ffc7e680014..099ad46fff1 100644 --- a/src/java.base/share/native/libjava/VM.c +++ b/src/java.base/share/native/libjava/VM.c @@ -55,31 +55,3 @@ JNIEXPORT jobjectArray JNICALL Java_jdk_internal_misc_VM_getRuntimeArguments(JNIEnv *env, jclass cls) { return JVM_GetVmArguments(env); } - -JNIEXPORT void JNICALL -Java_jdk_internal_misc_VM_initializeFromArchive(JNIEnv *env, jclass ignore, - jclass c) { - JVM_InitializeFromArchive(env, c); -} - -JNIEXPORT void JNICALL -Java_jdk_internal_misc_VM_defineArchivedModules(JNIEnv *env, jclass ignore, - jobject platform_loader, - jobject system_loader) { - JVM_DefineArchivedModules(env, platform_loader, system_loader); -} - -JNIEXPORT jlong JNICALL -Java_jdk_internal_misc_VM_getRandomSeedForCDSDump(JNIEnv *env, jclass ignore) { - return JVM_GetRandomSeedForCDSDump(); -} - -JNIEXPORT jboolean JNICALL -Java_jdk_internal_misc_VM_isCDSDumpingEnabled(JNIEnv *env, jclass jcls) { - return JVM_IsCDSDumpingEnabled(env); -} - -JNIEXPORT jboolean JNICALL -Java_jdk_internal_misc_VM_isCDSSharingEnabled(JNIEnv *env, jclass jcls) { - return JVM_IsCDSSharingEnabled(env); -} diff --git a/src/java.base/share/native/libjimage/imageFile.cpp b/src/java.base/share/native/libjimage/imageFile.cpp index 95479894977..001d7d8fcf3 100644 --- a/src/java.base/share/native/libjimage/imageFile.cpp +++ b/src/java.base/share/native/libjimage/imageFile.cpp @@ -348,7 +348,8 @@ ImageFileReader* ImageFileReader::id_to_reader(u8 id) { } // Constructor intializes to a closed state. -ImageFileReader::ImageFileReader(const char* name, bool big_endian) { +ImageFileReader::ImageFileReader(const char* name, bool big_endian) : + _module_data(NULL) { // Copy the image file name. int len = (int) strlen(name) + 1; _name = new char[len]; @@ -369,6 +370,10 @@ ImageFileReader::~ImageFileReader() { delete[] _name; _name = NULL; } + + if (_module_data != NULL) { + delete _module_data; + } } // Open image file for read access. @@ -419,9 +424,9 @@ bool ImageFileReader::open() { _string_bytes = _index_data + string_bytes_offset; // Initialize the module data - module_data = new ImageModuleData(this); + _module_data = new ImageModuleData(this); // Successful open (if memory allocation succeeded). - return module_data != NULL; + return _module_data != NULL; } // Close image file. @@ -436,6 +441,11 @@ void ImageFileReader::close() { osSupport::close(_fd); _fd = -1; } + + if (_module_data != NULL) { + delete _module_data; + _module_data = NULL; + } } // Read directly from the file. @@ -568,5 +578,5 @@ void ImageFileReader::get_resource(ImageLocation& location, u1* uncompressed_dat // Return the ImageModuleData for this image ImageModuleData * ImageFileReader::get_image_module_data() { - return module_data; + return _module_data; } diff --git a/src/java.base/share/native/libjimage/imageFile.hpp b/src/java.base/share/native/libjimage/imageFile.hpp index 2e080295ca8..b3cfd9a2b86 100644 --- a/src/java.base/share/native/libjimage/imageFile.hpp +++ b/src/java.base/share/native/libjimage/imageFile.hpp @@ -423,7 +423,7 @@ friend class ImageFileReaderTable; u4* _offsets_table; // Location offset table u1* _location_bytes; // Location attributes u1* _string_bytes; // String table - ImageModuleData *module_data; // The ImageModuleData for this image + ImageModuleData *_module_data; // The ImageModuleData for this image ImageFileReader(const char* name, bool big_endian); ~ImageFileReader(); diff --git a/src/java.base/share/native/libzip/Deflater.c b/src/java.base/share/native/libzip/Deflater.c index 204396f52ee..1ed1994d471 100644 --- a/src/java.base/share/native/libzip/Deflater.c +++ b/src/java.base/share/native/libzip/Deflater.c @@ -105,7 +105,7 @@ Java_java_util_zip_Deflater_setDictionary(JNIEnv *env, jclass cls, jlong addr, Bytef *buf = (*env)->GetPrimitiveArrayCritical(env, b, 0); if (buf == NULL) /* out of memory */ return; - res = deflateSetDictionary(jlong_to_ptr(addr), buf, len); + res = deflateSetDictionary(jlong_to_ptr(addr), buf + off, len); (*env)->ReleasePrimitiveArrayCritical(env, b, buf, 0); checkSetDictionaryResult(env, addr, res); } diff --git a/src/java.base/windows/native/libjava/java_props_md.c b/src/java.base/windows/native/libjava/java_props_md.c index 96599034c15..5f7dd4ea423 100644 --- a/src/java.base/windows/native/libjava/java_props_md.c +++ b/src/java.base/windows/native/libjava/java_props_md.c @@ -569,6 +569,8 @@ GetJavaProperties(JNIEnv* env) sprops.os_arch = "amd64"; #elif defined(_X86_) sprops.os_arch = "x86"; +#elif defined(_M_ARM64) + sprops.os_arch = "aarch64"; #else sprops.os_arch = "unknown"; #endif diff --git a/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java b/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java index cd4be6e85d7..e6164131f59 100644 --- a/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java +++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -224,7 +224,7 @@ protected void uninstallListeners(final AbstractButton b) { b.removeAncestorListener(listener); } uninstallHierListener(b); - AquaUtilControlSize.addSizePropertyListener(b); + AquaUtilControlSize.removeSizePropertyListener(b); } protected void uninstallDefaults(final AbstractButton b) { diff --git a/src/java.desktop/macosx/classes/com/apple/laf/AquaSpinnerUI.java b/src/java.desktop/macosx/classes/com/apple/laf/AquaSpinnerUI.java index 892a048048b..ff179f0705f 100644 --- a/src/java.desktop/macosx/classes/com/apple/laf/AquaSpinnerUI.java +++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaSpinnerUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -141,7 +141,7 @@ public void uninstallUI(final JComponent c) { protected void installListeners() { spinner.addPropertyChangeListener(getPropertyChangeListener()); JComponent editor = spinner.getEditor(); - if (editor != null && editor instanceof JSpinner.DefaultEditor) { + if (editor instanceof DefaultEditor) { JTextField tf = ((JSpinner.DefaultEditor)editor).getTextField(); if (tf != null) { tf.addFocusListener(getNextButtonHandler()); @@ -151,6 +151,14 @@ protected void installListeners() { } protected void uninstallListeners() { + JComponent editor = spinner.getEditor(); + if (editor instanceof DefaultEditor) { + JTextField tf = ((JSpinner.DefaultEditor) editor).getTextField(); + if (tf != null) { + tf.removeFocusListener(getNextButtonHandler()); + tf.removeFocusListener(getPreviousButtonHandler()); + } + } spinner.removePropertyChangeListener(getPropertyChangeListener()); } diff --git a/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java b/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java index 56408796f47..b8767716aea 100644 --- a/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java +++ b/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -491,12 +491,6 @@ public void updateIconImages() { getPlatformWindow().updateIconImages(); } - @Override - public void setBackground(final Color c) { - super.setBackground(c); - updateOpaque(); - } - @Override public void setOpacity(float opacity) { getPlatformWindow().setOpacity(opacity); diff --git a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java index 06516e8adb4..17ab015b11e 100644 --- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java +++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java @@ -30,6 +30,7 @@ import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.awt.print.*; +import java.net.URI; import java.security.AccessController; import java.security.PrivilegedAction; @@ -37,6 +38,7 @@ import javax.print.attribute.PrintRequestAttributeSet; import javax.print.attribute.HashPrintRequestAttributeSet; import javax.print.attribute.standard.Copies; +import javax.print.attribute.standard.Destination; import javax.print.attribute.standard.Media; import javax.print.attribute.standard.MediaPrintableArea; import javax.print.attribute.standard.MediaSize; @@ -251,6 +253,21 @@ private void setPrintToFile(boolean printToFile) { isPrintToFile = printToFile; } + private void setDestinationFile(String dest) { + if (attributes != null && dest != null) { + try { + URI destURI = new URI(dest); + attributes.add(new Destination(destURI)); + destinationAttr = "" + destURI.getSchemeSpecificPart(); + } catch (Exception e) { + } + } + } + + private String getDestinationFile() { + return destinationAttr; + } + @Override public void print(PrintRequestAttributeSet attributes) throws PrinterException { // NOTE: Some of this code is copied from RasterPrinterJob. diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m index 5247d12f652..e995da67dcb 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m @@ -316,21 +316,25 @@ static void nsPrintInfoToJavaPrinterJob(JNIEnv* env, NSPrintInfo* src, jobject d static JNF_MEMBER_CACHE(jm_setCollated, sjc_CPrinterJob, "setCollated", "(Z)V"); static JNF_MEMBER_CACHE(jm_setPageRangeAttribute, sjc_CPrinterJob, "setPageRangeAttribute", "(IIZ)V"); static JNF_MEMBER_CACHE(jm_setPrintToFile, sjc_CPrinterJob, "setPrintToFile", "(Z)V"); - - if (src.jobDisposition == NSPrintSaveJob) { - JNFCallVoidMethod(env, dstPrinterJob, jm_setPrintToFile, true); - } else { - JNFCallVoidMethod(env, dstPrinterJob, jm_setPrintToFile, false); - } + static JNF_MEMBER_CACHE(jm_setDestinationFile, sjc_CPrinterJob, "setDestinationFile", "(Ljava/lang/String;)V"); // get the selected printer's name, and set the appropriate PrintService on the Java side NSString *name = [[src printer] name]; jstring printerName = JNFNSToJavaString(env, name); JNFCallVoidMethod(env, dstPrinterJob, jm_setService, printerName); - NSMutableDictionary* printingDictionary = [src dictionary]; + if (src.jobDisposition == NSPrintSaveJob) { + JNFCallVoidMethod(env, dstPrinterJob, jm_setPrintToFile, true); + NSURL *url = [printingDictionary objectForKey:NSPrintJobSavingURL]; + NSString *nsStr = [url absoluteString]; + jstring str = JNFNSToJavaString(env, nsStr); + JNFCallVoidMethod(env, dstPrinterJob, jm_setDestinationFile, str); + } else { + JNFCallVoidMethod(env, dstPrinterJob, jm_setPrintToFile, false); + } + NSNumber* nsCopies = [printingDictionary objectForKey:NSPrintCopies]; if ([nsCopies respondsToSelector:@selector(integerValue)]) { @@ -384,6 +388,8 @@ static void javaPrinterJobToNSPrintInfo(JNIEnv* env, jobject srcPrinterJob, jobj static JNF_MEMBER_CACHE(jm_getSelectAttrib, sjc_CPrinterJob, "getSelectAttrib", "()I"); static JNF_MEMBER_CACHE(jm_getNumberOfPages, jc_Pageable, "getNumberOfPages", "()I"); static JNF_MEMBER_CACHE(jm_getPageFormat, sjc_CPrinterJob, "getPageFormatFromAttributes", "()Ljava/awt/print/PageFormat;"); + static JNF_MEMBER_CACHE(jm_getDestinationFile, sjc_CPrinterJob, + "getDestinationFile", "()Ljava/lang/String;"); NSMutableDictionary* printingDictionary = [dst dictionary]; @@ -423,6 +429,16 @@ static void javaPrinterJobToNSPrintInfo(JNIEnv* env, jobject srcPrinterJob, jobj if (page != NULL) { javaPageFormatToNSPrintInfo(env, NULL, page, dst); } + + jstring dest = JNFCallObjectMethod(env, srcPrinterJob, jm_getDestinationFile); + if (dest != NULL) { + [dst setJobDisposition:NSPrintSaveJob]; + NSString *nsDestStr = JNFJavaToNSString(env, dest); + NSURL *nsURL = [NSURL fileURLWithPath:nsDestStr isDirectory:NO]; + [printingDictionary setObject:nsURL forKey:NSPrintJobSavingURL]; + } else { + [dst setJobDisposition:NSPrintSpoolJob]; + } } /* diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/CSystemColors.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/CSystemColors.m index d437d6d9697..5591a56d246 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/CSystemColors.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/CSystemColors.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -126,7 +126,7 @@ + (void)reloadColors { + (NSColor*)getColor:(NSUInteger)colorIndex useAppleColor:(BOOL)useAppleColor { NSColor* result = nil; - if (colorIndex < (useAppleColor) ? sun_lwawt_macosx_LWCToolkit_NUM_APPLE_COLORS : java_awt_SystemColor_NUM_COLORS) { + if (colorIndex < ((useAppleColor) ? sun_lwawt_macosx_LWCToolkit_NUM_APPLE_COLORS : java_awt_SystemColor_NUM_COLORS)) { result = (useAppleColor ? appleColors : sColors)[colorIndex]; } else { diff --git a/src/java.desktop/share/classes/java/applet/Applet.java b/src/java.desktop/share/classes/java/applet/Applet.java index b38f25e16f8..f45ed443619 100644 --- a/src/java.desktop/share/classes/java/applet/Applet.java +++ b/src/java.desktop/share/classes/java/applet/Applet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -99,7 +99,10 @@ public Applet() throws HeadlessException { /** * Read an applet from an object input stream. * - * @param s an object input stream + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} * returns {@code true} * @serial @@ -578,6 +581,11 @@ protected class AccessibleApplet extends AccessibleAWTPanel { */ private static final long serialVersionUID = 8127374778187708896L; + /** + * Constructs an {@code AccessibleApplet}. + */ + protected AccessibleApplet() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/java/awt/AWTEvent.java b/src/java.desktop/share/classes/java/awt/AWTEvent.java index f1eef09a2c3..b708d3b4618 100644 --- a/src/java.desktop/share/classes/java/awt/AWTEvent.java +++ b/src/java.desktop/share/classes/java/awt/AWTEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -87,6 +87,9 @@ */ public abstract class AWTEvent extends EventObject { + /** + * The private data. + */ private byte[] bdata; /** diff --git a/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java b/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java index 2328b110a9e..44c4abc426d 100644 --- a/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java +++ b/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -22,18 +22,20 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; -import java.awt.event.KeyEvent; -import sun.awt.AppContext; import java.awt.event.InputEvent; +import java.awt.event.KeyEvent; +import java.io.Serializable; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.StringTokenizer; -import java.io.Serializable; -import java.lang.reflect.Modifier; -import java.lang.reflect.Field; + +import sun.awt.AppContext; import sun.swing.SwingAccessor; /** @@ -77,9 +79,25 @@ public class AWTKeyStroke implements Serializable { //A key withing the cache private static AWTKeyStroke APP_CONTEXT_KEYSTROKE_KEY = new AWTKeyStroke(); + /** + * The character value for a keyboard key. + */ private char keyChar = KeyEvent.CHAR_UNDEFINED; + + /** + * The key code for this {@code AWTKeyStroke}. + */ private int keyCode = KeyEvent.VK_UNDEFINED; + + /** + * The bitwise-ored combination of any modifiers. + */ private int modifiers; + + /** + * {@code true} if this {@code AWTKeyStroke} corresponds to a key release; + * {@code false} otherwise. + */ private boolean onKeyRelease; static { diff --git a/src/java.desktop/share/classes/java/awt/Button.java b/src/java.desktop/share/classes/java/awt/Button.java index 415a0495909..25c024ece89 100644 --- a/src/java.desktop/share/classes/java/awt/Button.java +++ b/src/java.desktop/share/classes/java/awt/Button.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -25,14 +25,20 @@ package java.awt; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.awt.peer.ButtonPeer; import java.beans.BeanProperty; -import java.util.EventListener; -import java.awt.event.*; -import java.io.ObjectOutputStream; -import java.io.ObjectInputStream; import java.io.IOException; -import javax.accessibility.*; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.EventListener; + +import javax.accessibility.Accessible; +import javax.accessibility.AccessibleAction; +import javax.accessibility.AccessibleContext; +import javax.accessibility.AccessibleRole; +import javax.accessibility.AccessibleValue; /** * This class creates a labeled button. The application can cause @@ -428,9 +434,8 @@ protected String paramString() { /* Serialization support. */ - - /* - * Button Serial Data Version. + /** + * Serialized data version. * @serial */ private int buttonSerializedDataVersion = 1; @@ -449,7 +454,8 @@ protected String paramString() { * {@code actionListenerK} indicating an * {@code ActionListener} object * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#actionListenerK * @see #readObject(ObjectInputStream) @@ -469,10 +475,12 @@ private void writeObject(ObjectOutputStream s) * receive action events fired by the button. * Unrecognized keys or values will be ignored. * - * @param s the {@code ObjectInputStream} to read - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless} returns - * {@code true} + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @serial * @see #removeActionListener(ActionListener) * @see #addActionListener(ActionListener) @@ -537,6 +545,11 @@ protected class AccessibleAWTButton extends AccessibleAWTComponent */ private static final long serialVersionUID = -5932203980244017102L; + /** + * Constructs an {@code AccessibleAWTButton}. + */ + protected AccessibleAWTButton() {} + /** * Get the accessible name of this object. * diff --git a/src/java.desktop/share/classes/java/awt/Canvas.java b/src/java.desktop/share/classes/java/awt/Canvas.java index 9d1762f0674..079487097fa 100644 --- a/src/java.desktop/share/classes/java/awt/Canvas.java +++ b/src/java.desktop/share/classes/java/awt/Canvas.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -240,6 +240,11 @@ protected class AccessibleAWTCanvas extends AccessibleAWTComponent { private static final long serialVersionUID = -6325592262103146699L; + /** + * Constructs an {@code AccessibleAWTCanvas}. + */ + protected AccessibleAWTCanvas() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/java/awt/CardLayout.java b/src/java.desktop/share/classes/java/awt/CardLayout.java index e7523e1921e..fa38057ab0d 100644 --- a/src/java.desktop/share/classes/java/awt/CardLayout.java +++ b/src/java.desktop/share/classes/java/awt/CardLayout.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -25,15 +25,14 @@ package java.awt; -import java.util.Hashtable; -import java.util.Vector; -import java.util.Enumeration; - -import java.io.Serializable; +import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.ObjectStreamField; -import java.io.IOException; +import java.io.Serializable; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.Vector; /** * A {@code CardLayout} object is a layout manager for a @@ -68,8 +67,8 @@ public class CardLayout implements LayoutManager2, */ Vector<Card> vector = new Vector<>(); - /* - * A pair of Component and String that represents its name. + /** + * A pair of component and string that represents its name. */ class Card implements Serializable { static final long serialVersionUID = 6640330810709497518L; @@ -110,10 +109,10 @@ public Card(String cardName, Component cardComponent) { /** * @serialField tab Hashtable * deprecated, for forward compatibility only - * @serialField hgap int - * @serialField vgap int - * @serialField vector Vector - * @serialField currentCard int + * @serialField hgap int the horizontal Layout gap + * @serialField vgap int the vertical Layout gap + * @serialField vector Vector the pairs of components and their names + * @serialField currentCard int the index of Component currently displayed */ private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField("tab", Hashtable.class), @@ -559,6 +558,11 @@ public String toString() { /** * Reads serializable fields from stream. + * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs */ @SuppressWarnings("unchecked") private void readObject(ObjectInputStream s) @@ -591,6 +595,9 @@ private void readObject(ObjectInputStream s) /** * Writes serializable fields to stream. + * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs */ private void writeObject(ObjectOutputStream s) throws IOException diff --git a/src/java.desktop/share/classes/java/awt/Checkbox.java b/src/java.desktop/share/classes/java/awt/Checkbox.java index c766bf4b458..32ef83a670d 100644 --- a/src/java.desktop/share/classes/java/awt/Checkbox.java +++ b/src/java.desktop/share/classes/java/awt/Checkbox.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -22,16 +22,24 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; import java.awt.peer.CheckboxPeer; -import java.awt.event.*; -import java.util.EventListener; -import java.io.ObjectOutputStream; -import java.io.ObjectInputStream; import java.io.IOException; -import javax.accessibility.*; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.EventListener; +import javax.accessibility.Accessible; +import javax.accessibility.AccessibleAction; +import javax.accessibility.AccessibleContext; +import javax.accessibility.AccessibleRole; +import javax.accessibility.AccessibleState; +import javax.accessibility.AccessibleStateSet; +import javax.accessibility.AccessibleValue; /** * A check box is a graphical component that can be in either an @@ -602,8 +610,8 @@ protected String paramString() { /* Serialization support. */ - /* - * Serialized data version + /** + * Serialized data version. * @serial */ private int checkboxSerializedDataVersion = 1; @@ -615,7 +623,8 @@ protected String paramString() { * {@code ItemListeners} are detected and * no attempt is made to serialize them. * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData {@code null} terminated sequence of 0 * or more pairs; the pair consists of a {@code String} * and an {@code Object}; the {@code String} indicates @@ -642,10 +651,12 @@ private void writeObject(ObjectOutputStream s) * item events fired by the {@code Checkbox}. * Unrecognized keys or values will be ignored. * - * @param s the {@code ObjectInputStream} to read - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless} returns - * {@code true} + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @serial * @see #removeItemListener(ItemListener) * @see #addItemListener(ItemListener) diff --git a/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java b/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java index 24116f59f6d..35eca6c5378 100644 --- a/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java +++ b/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -25,6 +25,7 @@ package java.awt; +import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.peer.CheckboxMenuItemPeer; @@ -426,8 +427,8 @@ public String paramString() { /* Serialization support. */ - /* - * Serial Data Version + /** + * Serialized data version. * @serial */ private int checkboxMenuItemSerializedDataVersion = 1; @@ -439,7 +440,8 @@ public String paramString() { * {@code ItemListeners} are detected and * no attempt is made to serialize them. * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData {@code null} terminated sequence of * 0 or more pairs; the pair consists of a {@code String} * and an {@code Object}; the {@code String} indicates @@ -460,17 +462,20 @@ private void writeObject(ObjectOutputStream s) s.writeObject(null); } - /* + /** * Reads the {@code ObjectInputStream} and if it * isn't {@code null} adds a listener to receive * item events fired by the {@code Checkbox} menu item. * Unrecognized keys or values will be ignored. * - * @param s the {@code ObjectInputStream} to read + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs * @serial - * @see removeActionListener() - * @see addActionListener() - * @see #writeObject + * @see #removeActionListener(ActionListener) + * @see #addActionListener(ActionListener) + * @see #writeObject(ObjectOutputStream) */ private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException @@ -536,6 +541,11 @@ protected class AccessibleAWTCheckboxMenuItem extends AccessibleAWTMenuItem */ private static final long serialVersionUID = -1122642964303476L; + /** + * Constructs an {@code AccessibleAWTCheckboxMenuItem}. + */ + protected AccessibleAWTCheckboxMenuItem() {} + /** * Get the AccessibleAction associated with this object. In the * implementation of the Java Accessibility API for this class, diff --git a/src/java.desktop/share/classes/java/awt/Choice.java b/src/java.desktop/share/classes/java/awt/Choice.java index fd4b7d55b32..dd03cd02193 100644 --- a/src/java.desktop/share/classes/java/awt/Choice.java +++ b/src/java.desktop/share/classes/java/awt/Choice.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -22,18 +22,22 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; -import java.util.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; import java.awt.peer.ChoicePeer; -import java.awt.event.*; -import java.util.EventListener; -import java.io.ObjectOutputStream; -import java.io.ObjectInputStream; import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.EventListener; +import java.util.Vector; -import javax.accessibility.*; - +import javax.accessibility.Accessible; +import javax.accessibility.AccessibleAction; +import javax.accessibility.AccessibleContext; +import javax.accessibility.AccessibleRole; /** * The {@code Choice} class presents a pop-up menu of choices. @@ -654,8 +658,8 @@ protected String paramString() { /* Serialization support. */ - /* - * Choice Serial Data Version. + /** + * Serialized data version. * @serial */ private int choiceSerializedDataVersion = 1; @@ -667,7 +671,8 @@ protected String paramString() { * {@code ItemListeners} are detected and * no attempt is made to serialize them. * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData {@code null} terminated sequence of 0 * or more pairs; the pair consists of a {@code String} * and an {@code Object}; the {@code String} indicates @@ -694,10 +699,12 @@ private void writeObject(ObjectOutputStream s) * item events fired by the {@code Choice} item. * Unrecognized keys or values will be ignored. * - * @param s the {@code ObjectInputStream} to read - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless} returns - * {@code true} + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @serial * @see #removeItemListener(ItemListener) * @see #addItemListener(ItemListener) diff --git a/src/java.desktop/share/classes/java/awt/Component.java b/src/java.desktop/share/classes/java/awt/Component.java index b89eb4005bf..ad19383cd58 100644 --- a/src/java.desktop/share/classes/java/awt/Component.java +++ b/src/java.desktop/share/classes/java/awt/Component.java @@ -716,6 +716,9 @@ final AccessControlContext getAccessControlContext() { return acc; } + /** + * Whether the component is packed or not; + */ boolean isPacked = false; /** @@ -8328,7 +8331,7 @@ public boolean isFocusOwner() { return hasFocus(); } - /* + /** * Used to disallow auto-focus-transfer on disposal of the focus owner * in the process of disposing its parent container. */ @@ -8903,7 +8906,8 @@ private void doSwingSerialization() { * The non-serializable listeners are detected and * no attempt is made to serialize them. * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData {@code null} terminated sequence of * 0 or more pairs; the pair consists of a {@code String} * and an {@code Object}; the {@code String} indicates @@ -8974,7 +8978,10 @@ private void writeObject(ObjectOutputStream s) * of events fired by the component. * Unrecognized keys or values will be ignored. * - * @param s the {@code ObjectInputStream} to read + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs * @see #writeObject(ObjectOutputStream) */ private void readObject(ObjectInputStream s) @@ -9341,6 +9348,11 @@ protected AccessibleAWTComponent() { protected class AccessibleAWTComponentHandler implements ComponentListener, Serializable { private static final long serialVersionUID = -1009684107426231869L; + /** + * Constructs an {@code AccessibleAWTComponentHandler}. + */ + protected AccessibleAWTComponentHandler() {} + public void componentHidden(ComponentEvent e) { if (accessibleContext != null) { accessibleContext.firePropertyChange( @@ -9373,6 +9385,11 @@ public void componentResized(ComponentEvent e) { protected class AccessibleAWTFocusHandler implements FocusListener, Serializable { private static final long serialVersionUID = 3150908257351582233L; + /** + * Constructs an {@code AccessibleAWTFocusHandler}. + */ + protected AccessibleAWTFocusHandler() {} + public void focusGained(FocusEvent event) { if (accessibleContext != null) { accessibleContext.firePropertyChange( diff --git a/src/java.desktop/share/classes/java/awt/ComponentOrientation.java b/src/java.desktop/share/classes/java/awt/ComponentOrientation.java index 4df1846a5da..7e09c8019e8 100644 --- a/src/java.desktop/share/classes/java/awt/ComponentOrientation.java +++ b/src/java.desktop/share/classes/java/awt/ComponentOrientation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -201,6 +201,9 @@ public static ComponentOrientation getOrientation(ResourceBundle bdl) return result; } + /** + * The bitwise-ored combination of flags. + */ private int orientation; private ComponentOrientation(int value) diff --git a/src/java.desktop/share/classes/java/awt/Container.java b/src/java.desktop/share/classes/java/awt/Container.java index 7a0e4fdeb57..ee754201f5e 100644 --- a/src/java.desktop/share/classes/java/awt/Container.java +++ b/src/java.desktop/share/classes/java/awt/Container.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -26,15 +26,20 @@ package java.awt; import java.awt.dnd.DropTarget; - -import java.awt.event.*; - -import java.awt.peer.ContainerPeer; +import java.awt.event.AWTEventListener; +import java.awt.event.ComponentEvent; +import java.awt.event.ContainerEvent; +import java.awt.event.ContainerListener; +import java.awt.event.FocusEvent; +import java.awt.event.HierarchyEvent; +import java.awt.event.InputEvent; +import java.awt.event.KeyEvent; +import java.awt.event.MouseEvent; +import java.awt.event.MouseWheelEvent; import java.awt.peer.ComponentPeer; +import java.awt.peer.ContainerPeer; import java.awt.peer.LightweightPeer; - import java.beans.PropertyChangeListener; - import java.io.IOException; import java.io.InvalidObjectException; import java.io.ObjectInputStream; @@ -43,30 +48,26 @@ import java.io.PrintStream; import java.io.PrintWriter; import java.io.Serializable; - import java.lang.ref.WeakReference; import java.security.AccessController; - import java.util.ArrayList; import java.util.EventListener; import java.util.HashSet; import java.util.Set; -import javax.accessibility.*; +import javax.accessibility.Accessible; +import javax.accessibility.AccessibleComponent; +import javax.accessibility.AccessibleContext; -import sun.util.logging.PlatformLogger; - -import sun.awt.AppContext; import sun.awt.AWTAccessor; import sun.awt.AWTAccessor.MouseEventAccessor; +import sun.awt.AppContext; import sun.awt.PeerEvent; import sun.awt.SunToolkit; - import sun.awt.dnd.SunDropTargetEvent; - import sun.java2d.pipe.Region; - import sun.security.action.GetBooleanAction; +import sun.util.logging.PlatformLogger; /** * A generic Abstract Window Toolkit(AWT) container object is a component @@ -3666,7 +3667,8 @@ public void addPropertyChangeListener(String propertyName, * is Serializable; otherwise, {@code null} is written.</li> * </ul> * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData {@code null} terminated sequence of 0 or more pairs; * the pair consists of a {@code String} and {@code Object}; * the {@code String} indicates the type of object and @@ -3713,7 +3715,10 @@ private void writeObject(ObjectOutputStream s) throws IOException { * as optional data.</li> * </ul> * - * @param s the {@code ObjectInputStream} to read + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs * @serial * @see #addContainerListener * @see #writeObject(ObjectOutputStream) @@ -3806,6 +3811,11 @@ protected class AccessibleAWTContainer extends AccessibleAWTComponent { */ private static final long serialVersionUID = 5081320404842566097L; + /** + * Constructs an {@code AccessibleAWTContainer}. + */ + protected AccessibleAWTContainer() {} + /** * Returns the number of accessible children in the object. If all * of the children of this object implement {@code Accessible}, @@ -3863,6 +3873,11 @@ protected class AccessibleContainerHandler implements ContainerListener, Serializable { private static final long serialVersionUID = -480855353991814677L; + /** + * Constructs an {@code AccessibleContainerHandler}. + */ + protected AccessibleContainerHandler() {} + public void componentAdded(ContainerEvent e) { Component c = e.getChild(); if (c != null && c instanceof Accessible) { diff --git a/src/java.desktop/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java b/src/java.desktop/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java index ec1c734a4d9..ce1a313499d 100644 --- a/src/java.desktop/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java +++ b/src/java.desktop/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java @@ -22,10 +22,12 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; -import java.util.List; import java.util.ArrayList; +import java.util.List; + import sun.util.logging.PlatformLogger; /** @@ -62,7 +64,14 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy { private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.ContainerOrderFocusTraversalPolicy"); + /** + * This constant is used when the forward focus traversal order is active. + */ private final int FORWARD_TRAVERSAL = 0; + + /** + * This constant is used when the backward focus traversal order is active. + */ private final int BACKWARD_TRAVERSAL = 1; /* @@ -70,6 +79,10 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy */ private static final long serialVersionUID = 486933713763926351L; + /** + * Whether this {@code ContainerOrderFocusTraversalPolicy} transfers focus + * down-cycle implicitly. + */ private boolean implicitDownCycleTraversal = true; /** diff --git a/src/java.desktop/share/classes/java/awt/Dialog.java b/src/java.desktop/share/classes/java/awt/Dialog.java index 79e66b54798..2c2734fd85c 100644 --- a/src/java.desktop/share/classes/java/awt/Dialog.java +++ b/src/java.desktop/share/classes/java/awt/Dialog.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -22,23 +22,32 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; +import java.awt.event.ComponentEvent; +import java.awt.event.HierarchyEvent; +import java.awt.event.InvocationEvent; +import java.awt.event.WindowEvent; import java.awt.peer.DialogPeer; -import java.awt.event.*; -import java.io.ObjectInputStream; import java.io.IOException; -import java.util.Iterator; -import java.util.concurrent.atomic.AtomicLong; +import java.io.ObjectInputStream; +import java.security.AccessControlException; import java.security.AccessController; import java.security.PrivilegedAction; -import javax.accessibility.*; -import sun.awt.AppContext; +import java.util.Iterator; +import java.util.concurrent.atomic.AtomicLong; + +import javax.accessibility.AccessibleContext; +import javax.accessibility.AccessibleRole; +import javax.accessibility.AccessibleState; +import javax.accessibility.AccessibleStateSet; + import sun.awt.AWTPermissions; +import sun.awt.AppContext; import sun.awt.SunToolkit; import sun.awt.util.IdentityArrayList; import sun.awt.util.IdentityLinkedList; -import java.security.AccessControlException; /** * A Dialog is a top-level window with a title and a border @@ -1587,6 +1596,16 @@ private void checkModalityPermission(ModalityType mt) { } } + /** + * Reads serializable fields from stream. + * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} + */ private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException, HeadlessException { @@ -1658,6 +1677,11 @@ protected class AccessibleAWTDialog extends AccessibleAWTWindow */ private static final long serialVersionUID = 4837230331833941201L; + /** + * Constructs an {@code AccessibleAWTDialog}. + */ + protected AccessibleAWTDialog() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/java/awt/FileDialog.java b/src/java.desktop/share/classes/java/awt/FileDialog.java index a384ff8436b..26433b36dce 100644 --- a/src/java.desktop/share/classes/java/awt/FileDialog.java +++ b/src/java.desktop/share/classes/java/awt/FileDialog.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -22,13 +22,15 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; import java.awt.peer.FileDialogPeer; +import java.io.File; import java.io.FilenameFilter; import java.io.IOException; import java.io.ObjectInputStream; -import java.io.File; + import sun.awt.AWTAccessor; /** @@ -60,38 +62,38 @@ public class FileDialog extends Dialog { */ public static final int SAVE = 1; - /* + /** * There are two {@code FileDialog} modes: {@code LOAD} and * {@code SAVE}. * This integer will represent one or the other. * If the mode is not specified it will default to {@code LOAD}. * * @serial - * @see getMode() - * @see setMode() + * @see #getMode + * @see #setMode * @see java.awt.FileDialog#LOAD * @see java.awt.FileDialog#SAVE */ int mode; - /* + /** * The string specifying the directory to display * in the file dialog. This variable may be {@code null}. * * @serial - * @see getDirectory() - * @see setDirectory() + * @see #getDirectory + * @see #setDirectory */ String dir; - /* + /** * The string specifying the initial value of the * filename text field in the file dialog. * This variable may be {@code null}. * * @serial - * @see getFile() - * @see setFile() + * @see #getFile + * @see #setFile */ String file; @@ -114,16 +116,16 @@ public class FileDialog extends Dialog { */ private boolean multipleMode = false; - /* + /** * The filter used as the file dialog's filename filter. * The file dialog will only be displaying files whose * names are accepted by this filter. * This variable may be {@code null}. * * @serial - * @see #getFilenameFilter() - * @see #setFilenameFilter() - * @see FileNameFilter + * @see #getFilenameFilter + * @see #setFilenameFilter + * @see FilenameFilter */ @SuppressWarnings("serial") // Not statically typed as Serializable FilenameFilter filter; @@ -598,7 +600,10 @@ public synchronized void setFilenameFilter(FilenameFilter filter) { * either a {@code dir} or a {@code file} * equal to an empty string to {@code null}. * - * @param s the {@code ObjectInputStream} to read + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs */ private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException diff --git a/src/java.desktop/share/classes/java/awt/FlowLayout.java b/src/java.desktop/share/classes/java/awt/FlowLayout.java index 56b0b9f02d2..1cc55d78f87 100644 --- a/src/java.desktop/share/classes/java/awt/FlowLayout.java +++ b/src/java.desktop/share/classes/java/awt/FlowLayout.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -22,10 +22,11 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; -import java.io.ObjectInputStream; import java.io.IOException; +import java.io.ObjectInputStream; /** * A flow layout arranges components in a directional flow, much @@ -662,6 +663,11 @@ public void layoutContainer(Container target) { * Reads this object out of a serialization stream, handling * objects written by older versions of the class that didn't contain all * of the fields we use now.. + * + * @param stream the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs */ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException diff --git a/src/java.desktop/share/classes/java/awt/Font.java b/src/java.desktop/share/classes/java/awt/Font.java index 9724523862a..357f7617fd4 100644 --- a/src/java.desktop/share/classes/java/awt/Font.java +++ b/src/java.desktop/share/classes/java/awt/Font.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -34,7 +34,13 @@ import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.awt.peer.FontPeer; -import java.io.*; +import java.io.File; +import java.io.FileOutputStream; +import java.io.FilePermission; +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectOutputStream; +import java.io.OutputStream; import java.lang.ref.SoftReference; import java.nio.file.Files; import java.security.AccessController; @@ -47,24 +53,45 @@ import java.util.Map; import sun.awt.ComponentFactory; -import sun.font.StandardGlyphVector; - import sun.font.AttributeMap; import sun.font.AttributeValues; import sun.font.CompositeFont; +import sun.font.CoreMetrics; import sun.font.CreatedFontTracker; import sun.font.Font2D; import sun.font.Font2DHandle; import sun.font.FontAccess; import sun.font.FontDesignMetrics; +import sun.font.FontLineMetrics; import sun.font.FontManager; import sun.font.FontManagerFactory; import sun.font.FontUtilities; import sun.font.GlyphLayout; -import sun.font.FontLineMetrics; -import sun.font.CoreMetrics; +import sun.font.StandardGlyphVector; -import static sun.font.EAttribute.*; +import static sun.font.EAttribute.EBACKGROUND; +import static sun.font.EAttribute.EBIDI_EMBEDDING; +import static sun.font.EAttribute.ECHAR_REPLACEMENT; +import static sun.font.EAttribute.EFAMILY; +import static sun.font.EAttribute.EFONT; +import static sun.font.EAttribute.EFOREGROUND; +import static sun.font.EAttribute.EINPUT_METHOD_HIGHLIGHT; +import static sun.font.EAttribute.EINPUT_METHOD_UNDERLINE; +import static sun.font.EAttribute.EJUSTIFICATION; +import static sun.font.EAttribute.EKERNING; +import static sun.font.EAttribute.ELIGATURES; +import static sun.font.EAttribute.ENUMERIC_SHAPING; +import static sun.font.EAttribute.EPOSTURE; +import static sun.font.EAttribute.ERUN_DIRECTION; +import static sun.font.EAttribute.ESIZE; +import static sun.font.EAttribute.ESTRIKETHROUGH; +import static sun.font.EAttribute.ESUPERSCRIPT; +import static sun.font.EAttribute.ESWAP_COLORS; +import static sun.font.EAttribute.ETRACKING; +import static sun.font.EAttribute.ETRANSFORM; +import static sun.font.EAttribute.EUNDERLINE; +import static sun.font.EAttribute.EWEIGHT; +import static sun.font.EAttribute.EWIDTH; /** * The {@code Font} class represents fonts, which are used to @@ -1884,7 +1911,8 @@ public String toString() { /** * Writes default serializable fields to a stream. * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see #readObject(java.io.ObjectInputStream) */ @@ -1907,7 +1935,10 @@ private void writeObject(java.io.ObjectOutputStream s) * Reads the {@code ObjectInputStream}. * Unrecognized keys or values will be ignored. * - * @param s the {@code ObjectInputStream} to read + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs * @serial * @see #writeObject(java.io.ObjectOutputStream) */ diff --git a/src/java.desktop/share/classes/java/awt/Frame.java b/src/java.desktop/share/classes/java/awt/Frame.java index ce384f095db..0e2aa8bbee5 100644 --- a/src/java.desktop/share/classes/java/awt/Frame.java +++ b/src/java.desktop/share/classes/java/awt/Frame.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -22,6 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; import java.awt.event.KeyEvent; @@ -38,7 +39,6 @@ import javax.accessibility.AccessibleRole; import javax.accessibility.AccessibleState; import javax.accessibility.AccessibleStateSet; -import javax.swing.WindowConstants; import sun.awt.AWTAccessor; import sun.awt.SunToolkit; @@ -345,11 +345,14 @@ public class Frame extends Window implements MenuContainer { */ boolean mbManagement = false; /* used only by the Motif impl. */ + /** + * The bitwise mask of frame state constants. + */ // XXX: uwe: abuse old field for now // will need to take care of serialization private int state = NORMAL; - /* + /** * The Windows owned by the Frame. * Note: in 1.2 this has been superseded by Window.ownedWindowList * @@ -1176,7 +1179,8 @@ public static Frame[] getFrames() { * an optional serializable icon {@code Image}, which is * available as of 1.4. * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData an optional icon {@code Image} * @see java.awt.Image * @see #getIconImage @@ -1206,13 +1210,13 @@ private void writeObject(ObjectOutputStream s) * will be thrown. * Unrecognized keys or values will be ignored. * - * @param s the {@code ObjectInputStream} to read - * @exception java.io.OptionalDataException if an icon {@code Image} - * is not available, but anything other than an EOF - * is detected - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless} returns - * {@code true} + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws java.io.OptionalDataException if an icon {@code Image} is not + * available, but anything other than an EOF is detected + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless() * @see java.awt.Image * @see #getIconImage @@ -1297,6 +1301,11 @@ protected class AccessibleAWTFrame extends AccessibleAWTWindow */ private static final long serialVersionUID = -6172960752956030250L; + /** + * Constructs an {@code AccessibleAWTFrame}. + */ + protected AccessibleAWTFrame() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/java/awt/GridBagLayoutInfo.java b/src/java.desktop/share/classes/java/awt/GridBagLayoutInfo.java index 5b06c91c2a5..e160d066867 100644 --- a/src/java.desktop/share/classes/java/awt/GridBagLayoutInfo.java +++ b/src/java.desktop/share/classes/java/awt/GridBagLayoutInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -35,27 +35,65 @@ * @since 1.6 */ public class GridBagLayoutInfo implements java.io.Serializable { + /* * serialVersionUID */ private static final long serialVersionUID = -4899416460737170217L; - int width, height; /* number of cells: horizontal and vertical */ - int startx, starty; /* starting point for layout */ - int[] minWidth; /* largest minWidth in each column */ - int[] minHeight; /* largest minHeight in each row */ - double[] weightX; /* largest weight in each column */ - double[] weightY; /* largest weight in each row */ - boolean hasBaseline; /* Whether or not baseline layout has been - * requested and one of the components - * has a valid baseline. */ + /** + * The number of cells: horizontal and vertical. + */ + int width, height; + + /** + * The starting point for layout. + */ + int startx, starty; + + /** + * The largest minWidth in each column. + */ + int[] minWidth; + + /** + * The largest minHeight in each row. + */ + int[] minHeight; + + /** + * The largest weight in each column. + */ + double[] weightX; + + /** + * The largest weight in each row. + */ + double[] weightY; + + /** + * Whether or not baseline layout has been requested and one of the + * components has a valid baseline. + */ + boolean hasBaseline; + // These are only valid if hasBaseline is true and are indexed by // row. - short[] baselineType; /* The type of baseline for a particular - * row. A mix of the BaselineResizeBehavior - * constants (1 << ordinal()) */ - int[] maxAscent; /* Max ascent (baseline). */ - int[] maxDescent; /* Max descent (height - baseline) */ + /** + * The type of baseline for a particular row. A mix of the + * BaselineResizeBehavior constants {@code (1 << ordinal())} + */ + short[] baselineType; + + /** + * Max ascent (baseline). + */ + int[] maxAscent; + + /** + * Max descent (height - baseline) + */ + int[] maxDescent; /** * Creates an instance of GridBagLayoutInfo representing {@code GridBagLayout} diff --git a/src/java.desktop/share/classes/java/awt/Image.java b/src/java.desktop/share/classes/java/awt/Image.java index b2ab082aa2c..7e627323269 100644 --- a/src/java.desktop/share/classes/java/awt/Image.java +++ b/src/java.desktop/share/classes/java/awt/Image.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -45,6 +45,11 @@ */ public abstract class Image { + /** + * Constructor for subclasses to call. + */ + protected Image() {} + /** * convenience object; we can use this single static object for * all images that do not create their own image caps; it holds the diff --git a/src/java.desktop/share/classes/java/awt/Label.java b/src/java.desktop/share/classes/java/awt/Label.java index b97b7008a59..c3a534b43e0 100644 --- a/src/java.desktop/share/classes/java/awt/Label.java +++ b/src/java.desktop/share/classes/java/awt/Label.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -22,12 +22,16 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; import java.awt.peer.LabelPeer; import java.io.IOException; import java.io.ObjectInputStream; -import javax.accessibility.*; + +import javax.accessibility.Accessible; +import javax.accessibility.AccessibleContext; +import javax.accessibility.AccessibleRole; /** * A {@code Label} object is a component for placing text in a @@ -153,12 +157,16 @@ public Label(String text, int alignment) throws HeadlessException { /** * Read a label from an object input stream. - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless()} returns - * {@code true} + * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @serial - * @since 1.4 * @see java.awt.GraphicsEnvironment#isHeadless + * @since 1.4 */ private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException, HeadlessException { diff --git a/src/java.desktop/share/classes/java/awt/List.java b/src/java.desktop/share/classes/java/awt/List.java index 1f905519979..672216f723e 100644 --- a/src/java.desktop/share/classes/java/awt/List.java +++ b/src/java.desktop/share/classes/java/awt/List.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -22,18 +22,28 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; -import java.util.Vector; -import java.util.Locale; -import java.util.EventListener; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.FocusListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; import java.awt.peer.ListPeer; -import java.awt.event.*; -import java.io.ObjectOutputStream; -import java.io.ObjectInputStream; import java.io.IOException; -import javax.accessibility.*; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.EventListener; +import java.util.Locale; +import java.util.Vector; +import javax.accessibility.Accessible; +import javax.accessibility.AccessibleContext; +import javax.accessibility.AccessibleRole; +import javax.accessibility.AccessibleSelection; +import javax.accessibility.AccessibleState; +import javax.accessibility.AccessibleStateSet; /** * The {@code List} component presents the user with a @@ -1234,7 +1244,8 @@ public synchronized void delItems(int start, int end) { * {@code actionListenerK} indicating an * {@code ActionListener} object * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#itemListenerK * @see java.awt.Component#actionListenerK @@ -1264,10 +1275,12 @@ private void writeObject(ObjectOutputStream s) * {@code List}. * Unrecognized keys or values will be ignored. * - * @param s the {@code ObjectInputStream} to write - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless} returns - * {@code true} + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @see #removeItemListener(ItemListener) * @see #addItemListener(ItemListener) * @see java.awt.GraphicsEnvironment#isHeadless @@ -1532,8 +1545,15 @@ protected class AccessibleAWTListChild extends AccessibleAWTComponent // [[[FIXME]]] need to finish implementing this!!! - private List parent; - private int indexInParent; + /** + * The parent {@code List}. + */ + private List parent; + + /** + * The index in the parent. + */ + private int indexInParent; /** * Constructs new {@code AccessibleAWTListChild} with the given diff --git a/src/java.desktop/share/classes/java/awt/MediaTracker.java b/src/java.desktop/share/classes/java/awt/MediaTracker.java index 07863e442bd..f2373845b6d 100644 --- a/src/java.desktop/share/classes/java/awt/MediaTracker.java +++ b/src/java.desktop/share/classes/java/awt/MediaTracker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -25,9 +25,8 @@ package java.awt; -import java.awt.Component; -import java.awt.Image; import java.awt.image.ImageObserver; + import sun.awt.image.MultiResolutionToolkitImage; /** @@ -923,6 +922,10 @@ void setStatus(int flag) { } } +/** + * The entry of the list of {@code Images} that is being tracked by the + * {@code MediaTracker}. + */ @SuppressWarnings("serial") // MediaEntry does not have a no-arg ctor class ImageMediaEntry extends MediaEntry implements ImageObserver, java.io.Serializable { diff --git a/src/java.desktop/share/classes/java/awt/Menu.java b/src/java.desktop/share/classes/java/awt/Menu.java index acadfeb414e..82b3472680d 100644 --- a/src/java.desktop/share/classes/java/awt/Menu.java +++ b/src/java.desktop/share/classes/java/awt/Menu.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -526,7 +526,8 @@ void deleteShortcut(MenuShortcut s) { /** * Writes default serializable fields to stream. * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see #readObject(ObjectInputStream) */ @@ -540,10 +541,12 @@ private void writeObject(java.io.ObjectOutputStream s) * Reads the {@code ObjectInputStream}. * Unrecognized keys or values will be ignored. * - * @param s the {@code ObjectInputStream} to read - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless} returns - * {@code true} + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless * @see #writeObject(ObjectOutputStream) */ @@ -624,6 +627,11 @@ protected class AccessibleAWTMenu extends AccessibleAWTMenuItem */ private static final long serialVersionUID = 5228160894980069094L; + /** + * Constructs an {@code AccessibleAWTMenu}. + */ + protected AccessibleAWTMenu() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/java/awt/MenuBar.java b/src/java.desktop/share/classes/java/awt/MenuBar.java index 19507f287cb..7eadd10a130 100644 --- a/src/java.desktop/share/classes/java/awt/MenuBar.java +++ b/src/java.desktop/share/classes/java/awt/MenuBar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -427,7 +427,8 @@ public void deleteShortcut(MenuShortcut s) { /** * Writes default serializable fields to stream. * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see #readObject(java.io.ObjectInputStream) */ @@ -441,10 +442,12 @@ private void writeObject(java.io.ObjectOutputStream s) * Reads the {@code ObjectInputStream}. * Unrecognized keys or values will be ignored. * - * @param s the {@code ObjectInputStream} to read - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless} returns - * {@code true} + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless * @see #writeObject(java.io.ObjectOutputStream) */ @@ -511,6 +514,11 @@ protected class AccessibleAWTMenuBar extends AccessibleAWTMenuComponent */ private static final long serialVersionUID = -8577604491830083815L; + /** + * Constructs an {@code AccessibleAWTMenuBar}. + */ + protected AccessibleAWTMenuBar() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/java/awt/MenuComponent.java b/src/java.desktop/share/classes/java/awt/MenuComponent.java index 17f0950c068..cc7dc563124 100644 --- a/src/java.desktop/share/classes/java/awt/MenuComponent.java +++ b/src/java.desktop/share/classes/java/awt/MenuComponent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -438,10 +438,12 @@ protected final Object getTreeLock() { /** * Reads the menu component from an object input stream. * - * @param s the {@code ObjectInputStream} to read - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless} returns - * {@code true} + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @serial * @see java.awt.GraphicsEnvironment#isHeadless */ @@ -465,10 +467,11 @@ private void readObject(ObjectInputStream s) /* * --- Accessibility Support --- - * - * MenuComponent will contain all of the methods in interface Accessible, - * though it won't actually implement the interface - that will be up - * to the individual objects which extend MenuComponent. + */ + /** + * MenuComponent will contain all of the methods in interface Accessible, + * though it won't actually implement the interface - that will be up + * to the individual objects which extend MenuComponent. */ @SuppressWarnings("serial") // Not statically typed as Serializable AccessibleContext accessibleContext = null; diff --git a/src/java.desktop/share/classes/java/awt/MenuItem.java b/src/java.desktop/share/classes/java/awt/MenuItem.java index f4986d3dd6e..b3b191c3592 100644 --- a/src/java.desktop/share/classes/java/awt/MenuItem.java +++ b/src/java.desktop/share/classes/java/awt/MenuItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -725,7 +725,8 @@ public String paramString() { * as optional data. The non-serializable listeners are * detected and no attempt is made to serialize them. * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData {@code null} terminated sequence of 0 * or more pairs; the pair consists of a {@code String} * and an {@code Object}; the {@code String} @@ -751,10 +752,12 @@ private void writeObject(ObjectOutputStream s) * action events fired by the {@code Menu} Item. * Unrecognized keys or values will be ignored. * - * @param s the {@code ObjectInputStream} to read - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless} returns - * {@code true} + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @see #removeActionListener(ActionListener) * @see #addActionListener(ActionListener) * @see #writeObject(ObjectOutputStream) @@ -823,6 +826,11 @@ protected class AccessibleAWTMenuItem extends AccessibleAWTMenuComponent */ private static final long serialVersionUID = -217847831945965825L; + /** + * Constructs an {@code AccessibleAWTMenuItem}. + */ + protected AccessibleAWTMenuItem() {} + /** * Get the accessible name of this object. * diff --git a/src/java.desktop/share/classes/java/awt/Panel.java b/src/java.desktop/share/classes/java/awt/Panel.java index 345db85f793..036ca64028b 100644 --- a/src/java.desktop/share/classes/java/awt/Panel.java +++ b/src/java.desktop/share/classes/java/awt/Panel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -119,6 +119,11 @@ protected class AccessibleAWTPanel extends AccessibleAWTContainer { private static final long serialVersionUID = -6409552226660031050L; + /** + * Constructs an {@code AccessibleAWTPanel}. + */ + protected AccessibleAWTPanel() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/java/awt/PopupMenu.java b/src/java.desktop/share/classes/java/awt/PopupMenu.java index 7e8737a8310..40f1904399a 100644 --- a/src/java.desktop/share/classes/java/awt/PopupMenu.java +++ b/src/java.desktop/share/classes/java/awt/PopupMenu.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -228,6 +228,11 @@ protected class AccessibleAWTPopupMenu extends AccessibleAWTMenu */ private static final long serialVersionUID = -4282044795947239955L; + /** + * Constructs an {@code AccessibleAWTPopupMenu}. + */ + protected AccessibleAWTPopupMenu() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/java/awt/PrintJob.java b/src/java.desktop/share/classes/java/awt/PrintJob.java index 9012608584f..a9e2bd8bea2 100644 --- a/src/java.desktop/share/classes/java/awt/PrintJob.java +++ b/src/java.desktop/share/classes/java/awt/PrintJob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -36,6 +36,11 @@ */ public abstract class PrintJob { + /** + * Constructor for subclasses to call. + */ + protected PrintJob() {} + /** * Gets a Graphics object that will draw to the next page. * The page is sent to the printer when the graphics diff --git a/src/java.desktop/share/classes/java/awt/ScrollPane.java b/src/java.desktop/share/classes/java/awt/ScrollPane.java index 8ae391daa89..e1e2ed45909 100644 --- a/src/java.desktop/share/classes/java/awt/ScrollPane.java +++ b/src/java.desktop/share/classes/java/awt/ScrollPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -22,19 +22,26 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; +import java.awt.event.AdjustmentEvent; +import java.awt.event.AdjustmentListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseWheelEvent; import java.awt.peer.ScrollPanePeer; -import java.awt.event.*; -import javax.accessibility.*; -import sun.awt.ScrollPaneWheelScroller; -import sun.awt.SunToolkit; - import java.beans.ConstructorProperties; import java.beans.Transient; +import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import java.io.IOException; + +import javax.accessibility.Accessible; +import javax.accessibility.AccessibleContext; +import javax.accessibility.AccessibleRole; + +import sun.awt.ScrollPaneWheelScroller; +import sun.awt.SunToolkit; /** * A container class which implements automatic horizontal and/or @@ -672,6 +679,9 @@ public boolean isWheelScrollingEnabled() { /** * Writes default serializable fields to stream. + * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs */ private void writeObject(ObjectOutputStream s) throws IOException { // 4352819: We only need this degenerate writeObject to make @@ -682,9 +692,13 @@ private void writeObject(ObjectOutputStream s) throws IOException { /** * Reads default serializable fields to stream. - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless()} returns - * {@code true} + * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless */ private void readObject(ObjectInputStream s) @@ -719,6 +733,9 @@ private void readObject(ObjectInputStream s) // } } + /** + * Invoked when the value of the adjustable has changed. + */ class PeerFixer implements AdjustmentListener, java.io.Serializable { private static final long serialVersionUID = 1043664721353696630L; @@ -791,6 +808,11 @@ protected class AccessibleAWTScrollPane extends AccessibleAWTContainer */ private static final long serialVersionUID = 6100703663886637L; + /** + * Constructs an {@code AccessibleAWTScrollPane}. + */ + protected AccessibleAWTScrollPane() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/java/awt/ScrollPaneAdjustable.java b/src/java.desktop/share/classes/java/awt/ScrollPaneAdjustable.java index 5a122891d76..08098f76f70 100644 --- a/src/java.desktop/share/classes/java/awt/ScrollPaneAdjustable.java +++ b/src/java.desktop/share/classes/java/awt/ScrollPaneAdjustable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -22,15 +22,15 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package java.awt; -import sun.awt.AWTAccessor; +package java.awt; import java.awt.event.AdjustmentEvent; import java.awt.event.AdjustmentListener; import java.awt.peer.ScrollPanePeer; import java.io.Serializable; +import sun.awt.AWTAccessor; /** * This class represents the state of a horizontal or vertical @@ -138,6 +138,10 @@ public class ScrollPaneAdjustable implements Adjustable, Serializable { */ private int blockIncrement = 1; + /** + * Specified adjustment listener to receive adjustment events from this + * {@code ScrollPaneAdjustable}. + */ @SuppressWarnings("serial") // Not statically typed as Serializable private AdjustmentListener adjustmentListener; diff --git a/src/java.desktop/share/classes/java/awt/Scrollbar.java b/src/java.desktop/share/classes/java/awt/Scrollbar.java index f42c96f4abd..1158b9ba0a6 100644 --- a/src/java.desktop/share/classes/java/awt/Scrollbar.java +++ b/src/java.desktop/share/classes/java/awt/Scrollbar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -22,16 +22,23 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; +import java.awt.event.AdjustmentEvent; +import java.awt.event.AdjustmentListener; import java.awt.peer.ScrollbarPeer; -import java.awt.event.*; -import java.util.EventListener; -import java.io.ObjectOutputStream; -import java.io.ObjectInputStream; import java.io.IOException; -import javax.accessibility.*; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.EventListener; +import javax.accessibility.Accessible; +import javax.accessibility.AccessibleContext; +import javax.accessibility.AccessibleRole; +import javax.accessibility.AccessibleState; +import javax.accessibility.AccessibleStateSet; +import javax.accessibility.AccessibleValue; /** * The {@code Scrollbar} class embodies a scroll bar, a @@ -1171,7 +1178,8 @@ protected String paramString() { * as optional data. The non-serializable listeners are * detected and no attempt is made to serialize them. * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData {@code null} terminated sequence of 0 * or more pairs; the pair consists of a {@code String} * and an {@code Object}; the {@code String} indicates @@ -1199,10 +1207,12 @@ private void writeObject(ObjectOutputStream s) * {@code Scrollbar}. * Unrecognized keys or values will be ignored. * - * @param s the {@code ObjectInputStream} to read - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless} returns - * {@code true} + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless * @see #writeObject(ObjectOutputStream) */ @@ -1262,6 +1272,11 @@ protected class AccessibleAWTScrollBar extends AccessibleAWTComponent */ private static final long serialVersionUID = -344337268523697807L; + /** + * Constructs an {@code AccessibleAWTScrollBar}. + */ + protected AccessibleAWTScrollBar() {} + /** * Get the state set of this object. * diff --git a/src/java.desktop/share/classes/java/awt/SystemColor.java b/src/java.desktop/share/classes/java/awt/SystemColor.java index e107dfdd1e8..14df736bfeb 100644 --- a/src/java.desktop/share/classes/java/awt/SystemColor.java +++ b/src/java.desktop/share/classes/java/awt/SystemColor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -22,14 +22,14 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package java.awt; -import sun.awt.AWTAccessor; +package java.awt; import java.io.ObjectStreamException; - import java.lang.annotation.Native; +import sun.awt.AWTAccessor; + /** * A class to encapsulate symbolic colors representing the color of * native GUI objects on a system. For systems which support the dynamic @@ -536,6 +536,8 @@ private Object readResolve() { * each {@code SystemColor} object. * @return a proxy {@code SystemColor} object with its value * replaced by the corresponding system color index. + * @throws ObjectStreamException if a new object replacing this object could + * not be created */ private Object writeReplace() throws ObjectStreamException { diff --git a/src/java.desktop/share/classes/java/awt/TextArea.java b/src/java.desktop/share/classes/java/awt/TextArea.java index 8daee279313..7367f8bd138 100644 --- a/src/java.desktop/share/classes/java/awt/TextArea.java +++ b/src/java.desktop/share/classes/java/awt/TextArea.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -22,6 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; import java.awt.peer.TextAreaPeer; @@ -649,9 +650,13 @@ protected String paramString() { /** * Read the ObjectInputStream. - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless()} returns - * {@code true} + * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless */ private void readObject(ObjectInputStream s) @@ -719,6 +724,11 @@ protected class AccessibleAWTTextArea extends AccessibleAWTTextComponent */ private static final long serialVersionUID = 3472827823632144419L; + /** + * Constructs an {@code AccessibleAWTTextArea}. + */ + protected AccessibleAWTTextArea() {} + /** * Gets the state set of this object. * diff --git a/src/java.desktop/share/classes/java/awt/TextComponent.java b/src/java.desktop/share/classes/java/awt/TextComponent.java index ad1bad93e12..ff4001472ef 100644 --- a/src/java.desktop/share/classes/java/awt/TextComponent.java +++ b/src/java.desktop/share/classes/java/awt/TextComponent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -22,18 +22,27 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; +import java.awt.event.TextEvent; +import java.awt.event.TextListener; +import java.awt.im.InputMethodRequests; import java.awt.peer.TextComponentPeer; -import java.awt.event.*; -import java.util.EventListener; -import java.io.ObjectOutputStream; -import java.io.ObjectInputStream; import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.text.BreakIterator; +import java.util.EventListener; + +import javax.accessibility.Accessible; +import javax.accessibility.AccessibleContext; +import javax.accessibility.AccessibleRole; +import javax.accessibility.AccessibleState; +import javax.accessibility.AccessibleStateSet; +import javax.accessibility.AccessibleText; import javax.swing.text.AttributeSet; -import javax.accessibility.*; -import java.awt.im.InputMethodRequests; + import sun.awt.AWTPermissions; import sun.awt.InputMethodSupport; @@ -102,9 +111,11 @@ public class TextComponent extends Component implements Accessible { */ int selectionEnd; - // A flag used to tell whether the background has been set by - // developer code (as opposed to AWT code). Used to determine - // the background color of non-editable TextComponents. + /** + * A flag used to tell whether the background has been set by + * developer code (as opposed to AWT code). Used to determine + * the background color of non-editable TextComponents. + */ boolean backgroundSetByClientCode = false; /** @@ -766,6 +777,8 @@ private boolean canAccessClipboard() { * is one of the following : * textListenerK indicating and TextListener object. * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#textListenerK */ @@ -794,9 +807,12 @@ private void writeObject(java.io.ObjectOutputStream s) * TextComponent. Unrecognized keys or values will be * ignored. * - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless()} returns - * {@code true} + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @see #removeTextListener * @see #addTextListener * @see java.awt.GraphicsEnvironment#isHeadless @@ -1199,5 +1215,8 @@ public String getBeforeIndex(int part, int index) { } } // end of AccessibleAWTTextComponent + /** + * Whether support of input methods should be checked or not. + */ private boolean checkForEnableIM = true; } diff --git a/src/java.desktop/share/classes/java/awt/TextField.java b/src/java.desktop/share/classes/java/awt/TextField.java index 308c2a6ed05..cacbce2baae 100644 --- a/src/java.desktop/share/classes/java/awt/TextField.java +++ b/src/java.desktop/share/classes/java/awt/TextField.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -22,16 +22,20 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.awt; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.awt.peer.TextFieldPeer; -import java.awt.event.*; -import java.util.EventListener; -import java.io.ObjectOutputStream; -import java.io.ObjectInputStream; import java.io.IOException; -import javax.accessibility.*; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.EventListener; +import javax.accessibility.AccessibleContext; +import javax.accessibility.AccessibleState; +import javax.accessibility.AccessibleStateSet; /** * A {@code TextField} object is a text component @@ -701,6 +705,8 @@ protected String paramString() { * is one of the following : * ActionListenerK indicating and ActionListener object. * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#actionListenerK */ @@ -719,9 +725,12 @@ private void writeObject(ObjectOutputStream s) * TextField. Unrecognized keys or values will be * ignored. * - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless()} returns - * {@code true} + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @see #removeActionListener(ActionListener) * @see #addActionListener(ActionListener) * @see java.awt.GraphicsEnvironment#isHeadless @@ -788,6 +797,11 @@ protected class AccessibleAWTTextField extends AccessibleAWTTextComponent */ private static final long serialVersionUID = 6219164359235943158L; + /** + * Constructs an {@code AccessibleAWTTextField}. + */ + protected AccessibleAWTTextField() {} + /** * Gets the state set of this object. * diff --git a/src/java.desktop/share/classes/java/awt/Toolkit.java b/src/java.desktop/share/classes/java/awt/Toolkit.java index ef2c8728e50..ef2b677175e 100644 --- a/src/java.desktop/share/classes/java/awt/Toolkit.java +++ b/src/java.desktop/share/classes/java/awt/Toolkit.java @@ -2211,6 +2211,9 @@ private static PropertyChangeSupport createPropertyChangeSupport(Toolkit toolkit } } + /** + * This is a utility class to support desktop properties. + */ @SuppressWarnings("serial") private static class DesktopPropertyChangeSupport extends PropertyChangeSupport { diff --git a/src/java.desktop/share/classes/java/awt/Window.java b/src/java.desktop/share/classes/java/awt/Window.java index 622464c0e92..86addf2506f 100644 --- a/src/java.desktop/share/classes/java/awt/Window.java +++ b/src/java.desktop/share/classes/java/awt/Window.java @@ -241,7 +241,11 @@ public static enum Type { private transient Component temporaryLostComponent; static boolean systemSyncLWRequests = false; - boolean syncLWRequests = false; + + /** + * Focus transfers should be synchronous for lightweight component requests. + */ + boolean syncLWRequests = false; transient boolean beforeFirstShow = true; private transient boolean disposing = false; transient WindowDisposerRecord disposerRecord = null; @@ -2936,7 +2940,8 @@ public Type getType() { * Writes a list of child windows as optional data. * Writes a list of icon images as optional data * - * @param s the {@code ObjectOutputStream} to write + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData {@code null} terminated sequence of * 0 or more pairs; the pair consists of a {@code String} * and {@code Object}; the {@code String} @@ -3091,10 +3096,12 @@ private void deserializeResources(ObjectInputStream s) * (possibly {@code null}) child windows. * Unrecognized keys or values will be ignored. * - * @param s the {@code ObjectInputStream} to read - * @exception HeadlessException if - * {@code GraphicsEnvironment.isHeadless} returns - * {@code true} + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()} + * returns {@code true} * @see java.awt.GraphicsEnvironment#isHeadless * @see #writeObject */ @@ -3163,6 +3170,11 @@ protected class AccessibleAWTWindow extends AccessibleAWTContainer */ private static final long serialVersionUID = 4215068635060671780L; + /** + * Constructs an {@code AccessibleAWTWindow}. + */ + protected AccessibleAWTWindow() {} + /** * Get the role of this object. * @@ -3422,6 +3434,10 @@ boolean canContainFocusOwner(Component focusOwnerCandidate) { return super.canContainFocusOwner(focusOwnerCandidate) && isFocusableWindow(); } + /** + * {@code true} if this Window should appear at the default location, + * {@code false} if at the current location. + */ private volatile boolean locationByPlatform = locationByPlatformProp; diff --git a/src/java.desktop/share/classes/java/awt/color/ColorSpace.java b/src/java.desktop/share/classes/java/awt/color/ColorSpace.java index 297d08d163d..24978e1917f 100644 --- a/src/java.desktop/share/classes/java/awt/color/ColorSpace.java +++ b/src/java.desktop/share/classes/java/awt/color/ColorSpace.java @@ -99,7 +99,14 @@ public abstract class ColorSpace implements Serializable { */ private static final long serialVersionUID = -409452704308689724L; + /** + * One of the {@code ColorSpace} type constants. + */ private int type; + + /** + * The number of components in the color space. + */ private int numComponents; private transient String [] compName = null; diff --git a/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java b/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java index 4cea4092e07..6b399f66723 100644 --- a/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java +++ b/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java @@ -35,6 +35,8 @@ package java.awt.color; +import java.io.IOException; + import sun.java2d.cmm.CMSManager; import sun.java2d.cmm.ColorTransform; import sun.java2d.cmm.PCMM; @@ -82,11 +84,34 @@ public class ICC_ColorSpace extends ColorSpace { */ private static final long serialVersionUID = 3455889114070431483L; - private ICC_Profile thisProfile; + /** + * The specified {@code ICC_Profile} object. + */ + private ICC_Profile thisProfile; + + /** + * The maximum normalized component values. + */ private float[] minVal; + + /** + * The minimum normalized component values. + */ private float[] maxVal; + + /** + * Difference between min and max values. + */ private float[] diffMinMax; + + /** + * Inverted value of the difference between min and max values. + */ private float[] invDiffMinMax; + + /** + * Whether the values should be scaled or not. + */ private boolean needScaleInit = true; // {to,from}{RGB,CIEXYZ} methods create and cache these when needed @@ -123,7 +148,12 @@ public ICC_ColorSpace (ICC_Profile profile) { } /** - * Validate an ICC_ColorSpace read from an object input stream + * Validate an ICC_ColorSpace read from an object input stream. + * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs */ private void readObject(java.io.ObjectInputStream s) throws ClassNotFoundException, java.io.IOException { diff --git a/src/java.desktop/share/classes/java/awt/dnd/DragGestureEvent.java b/src/java.desktop/share/classes/java/awt/dnd/DragGestureEvent.java index b87b709feb2..8e6994a3f93 100644 --- a/src/java.desktop/share/classes/java/awt/dnd/DragGestureEvent.java +++ b/src/java.desktop/share/classes/java/awt/dnd/DragGestureEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -23,30 +23,22 @@ * questions. */ - package java.awt.dnd; import java.awt.Component; import java.awt.Cursor; - import java.awt.Image; import java.awt.Point; - -import java.awt.event.InputEvent; - import java.awt.datatransfer.Transferable; - -import java.io.InvalidObjectException; -import java.util.EventObject; - -import java.util.Collections; -import java.util.List; -import java.util.Iterator; - +import java.awt.event.InputEvent; import java.io.IOException; +import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; - +import java.util.Collections; +import java.util.EventObject; +import java.util.Iterator; +import java.util.List; /** * A {@code DragGestureEvent} is passed @@ -300,6 +292,8 @@ public void startDrag(Cursor dragCursor, Image dragImage, Point imageOffset, Tra * {@code DragGestureEvent} created from the resulting deserialized * stream will contain an empty {@code List} of gesture events. * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData The default serializable fields, in alphabetical order, * followed by either a {@code List} instance, or * {@code null}. @@ -323,6 +317,10 @@ private void writeObject(ObjectOutputStream s) throws IOException { * {@code null}, this object's {@code List} of gesture events * is set to an empty {@code List}. * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs * @since 1.4 */ private void readObject(ObjectInputStream s) diff --git a/src/java.desktop/share/classes/java/awt/dnd/DragGestureRecognizer.java b/src/java.desktop/share/classes/java/awt/dnd/DragGestureRecognizer.java index 0a64aa5c62f..0f65ecbffeb 100644 --- a/src/java.desktop/share/classes/java/awt/dnd/DragGestureRecognizer.java +++ b/src/java.desktop/share/classes/java/awt/dnd/DragGestureRecognizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -25,19 +25,16 @@ package java.awt.dnd; -import java.awt.event.InputEvent; import java.awt.Component; import java.awt.Point; - -import java.io.InvalidObjectException; -import java.util.Collections; -import java.util.TooManyListenersException; -import java.util.ArrayList; - +import java.awt.event.InputEvent; import java.io.IOException; +import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; +import java.util.ArrayList; +import java.util.TooManyListenersException; /** * The {@code DragGestureRecognizer} is an @@ -393,6 +390,8 @@ protected synchronized void appendEvent(InputEvent awtie) { * {@code DragGestureListener} is written out if and only if it can be * serialized. If not, {@code null} is written instead. * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData The default serializable fields, in alphabetical order, * followed by either a {@code DragGestureListener}, or * {@code null}. @@ -411,6 +410,10 @@ private void writeObject(ObjectOutputStream s) throws IOException { * fields. This object's {@code DragGestureListener} is then * deserialized as well by using the next object in the stream. * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs * @since 1.4 */ @SuppressWarnings("unchecked") diff --git a/src/java.desktop/share/classes/java/awt/dnd/DragSource.java b/src/java.desktop/share/classes/java/awt/dnd/DragSource.java index cb028a399a8..95f0559adaf 100644 --- a/src/java.desktop/share/classes/java/awt/dnd/DragSource.java +++ b/src/java.desktop/share/classes/java/awt/dnd/DragSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -47,7 +47,6 @@ import sun.awt.dnd.SunDragSourceContextPeer; import sun.security.action.GetIntegerAction; - /** * The {@code DragSource} is the entity responsible * for the initiation of the Drag @@ -803,6 +802,8 @@ void processDragMouseMoved(DragSourceDragEvent dsde) { * {@code DragSourceMotionListener} object. * </ul> * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData Either a {@code FlavorMap} instance, or * {@code null}, followed by a {@code null}-terminated * sequence of 0 or more pairs; the pair consists of a @@ -849,6 +850,10 @@ private void writeObject(ObjectOutputStream s) throws IOException { * <li>Otherwise, the key/value pair is skipped. * </ul> * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs * @see java.awt.datatransfer.SystemFlavorMap#getDefaultFlavorMap * @since 1.4 */ diff --git a/src/java.desktop/share/classes/java/awt/dnd/DragSourceContext.java b/src/java.desktop/share/classes/java/awt/dnd/DragSourceContext.java index 1de393a51cb..8ded4061570 100644 --- a/src/java.desktop/share/classes/java/awt/dnd/DragSourceContext.java +++ b/src/java.desktop/share/classes/java/awt/dnd/DragSourceContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -544,6 +544,8 @@ private void setCursorImpl(Cursor c) { * {@code DragSourceListener} is written out if and only if it can be * serialized. If not, {@code null} is written instead. * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData The default serializable fields, in alphabetical order, * followed by either a {@code Transferable} instance, or * {@code null}, followed by either a @@ -570,6 +572,10 @@ private void writeObject(ObjectOutputStream s) throws IOException { * {@code Transferable} is set to a dummy {@code Transferable} * which supports no {@code DataFlavor}s. * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs * @since 1.4 */ private void readObject(ObjectInputStream s) diff --git a/src/java.desktop/share/classes/java/awt/dnd/DropTarget.java b/src/java.desktop/share/classes/java/awt/dnd/DropTarget.java index bd8e54e1f34..a7e5c8b71bf 100644 --- a/src/java.desktop/share/classes/java/awt/dnd/DropTarget.java +++ b/src/java.desktop/share/classes/java/awt/dnd/DropTarget.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,13 +25,6 @@ package java.awt.dnd; -import java.util.TooManyListenersException; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; - import java.awt.Component; import java.awt.Dimension; import java.awt.GraphicsEnvironment; @@ -40,19 +33,24 @@ import java.awt.Point; import java.awt.Rectangle; import java.awt.Toolkit; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.awt.datatransfer.FlavorMap; import java.awt.datatransfer.SystemFlavorMap; -import javax.swing.Timer; +import java.awt.dnd.peer.DropTargetPeer; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.awt.peer.ComponentPeer; import java.awt.peer.LightweightPeer; -import java.awt.dnd.peer.DropTargetPeer; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.util.TooManyListenersException; + +import javax.swing.Timer; import sun.awt.AWTAccessor; import sun.awt.AWTAccessor.ComponentAccessor; - /** * The {@code DropTarget} is associated * with a {@code Component} when that {@code Component} @@ -576,6 +574,8 @@ protected DropTargetContext createDropTargetContext() { * only if it can be serialized. If not, {@code null} is written * instead. * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData The default serializable fields, in alphabetical order, * followed by either a {@code DropTargetListener} * instance, or {@code null}. @@ -598,6 +598,10 @@ private void writeObject(ObjectOutputStream s) throws IOException { * {@code DropTargetListener}. If this fails, the next object in the * stream is used instead. * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs * @since 1.4 */ private void readObject(ObjectInputStream s) diff --git a/src/java.desktop/share/classes/java/awt/event/FocusEvent.java b/src/java.desktop/share/classes/java/awt/event/FocusEvent.java index 63f6085b538..96696463f0a 100644 --- a/src/java.desktop/share/classes/java/awt/event/FocusEvent.java +++ b/src/java.desktop/share/classes/java/awt/event/FocusEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -381,6 +381,9 @@ public final Cause getCause() { * {@link Cause#UNKNOWN} and its other fields have the same values as in * this {@code FocusEvent} instance. * + * @return a newly created object from deserialized data + * @throws ObjectStreamException if a new object replacing this object could + * not be created * @serial * @see #cause * @since 9 diff --git a/src/java.desktop/share/classes/java/awt/event/HierarchyEvent.java b/src/java.desktop/share/classes/java/awt/event/HierarchyEvent.java index c6cde2b5f0c..eb6ee6b26d4 100644 --- a/src/java.desktop/share/classes/java/awt/event/HierarchyEvent.java +++ b/src/java.desktop/share/classes/java/awt/event/HierarchyEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -162,9 +162,23 @@ public class HierarchyEvent extends AWTEvent { */ public static final int SHOWING_CHANGED = 0x4; + /** + * The {@code Component} at the top of the hierarchy which was changed. + */ Component changed; + + /** + * The parent of the {@code changed} component. This may be the parent + * before or after the change, depending on the type of change. + */ Container changedParent; - long changeFlags; + + /** + * A bitmask which indicates the type(s) of the {@code HIERARCHY_CHANGED} + * events represented in this event object. For information on allowable + * values, see the class description for {@link HierarchyEvent} + */ + long changeFlags; /** * Constructs an {@code HierarchyEvent} object to identify a diff --git a/src/java.desktop/share/classes/java/awt/event/InputMethodEvent.java b/src/java.desktop/share/classes/java/awt/event/InputMethodEvent.java index 00e6413fea1..c20fcece5ae 100644 --- a/src/java.desktop/share/classes/java/awt/event/InputMethodEvent.java +++ b/src/java.desktop/share/classes/java/awt/event/InputMethodEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,19 +25,19 @@ package java.awt.event; -import sun.awt.AWTAccessor; -import sun.awt.AppContext; -import sun.awt.SunToolkit; - import java.awt.AWTEvent; import java.awt.Component; import java.awt.EventQueue; import java.awt.font.TextHitInfo; import java.io.IOException; import java.io.ObjectInputStream; +import java.lang.annotation.Native; import java.text.AttributedCharacterIterator; import java.text.CharacterIterator; -import java.lang.annotation.Native; + +import sun.awt.AWTAccessor; +import sun.awt.AppContext; +import sun.awt.SunToolkit; /** * Input method events contain information about text that is being @@ -414,6 +414,11 @@ public String paramString() { * Initializes the {@code when} field if it is not present in the * object input stream. In that case, the field will be initialized by * invoking {@link java.awt.EventQueue#getMostRecentEventTime()}. + * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs */ private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException { s.defaultReadObject(); diff --git a/src/java.desktop/share/classes/java/awt/event/KeyEvent.java b/src/java.desktop/share/classes/java/awt/event/KeyEvent.java index 02b0b0a6df3..50d5e29c438 100644 --- a/src/java.desktop/share/classes/java/awt/event/KeyEvent.java +++ b/src/java.desktop/share/classes/java/awt/event/KeyEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -30,6 +30,7 @@ import java.awt.Toolkit; import java.io.IOException; import java.io.ObjectInputStream; + import sun.awt.AWTAccessor; /** @@ -1878,6 +1879,11 @@ private void setOldModifiers() { /** * Sets new modifiers by the old ones. The key modifiers * override overlapping mouse modifiers. + * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs * @serial */ @SuppressWarnings("deprecation") diff --git a/src/java.desktop/share/classes/java/awt/event/MouseEvent.java b/src/java.desktop/share/classes/java/awt/event/MouseEvent.java index 7a7f00bb367..92555e68a43 100644 --- a/src/java.desktop/share/classes/java/awt/event/MouseEvent.java +++ b/src/java.desktop/share/classes/java/awt/event/MouseEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -27,12 +27,11 @@ import java.awt.Component; import java.awt.GraphicsEnvironment; +import java.awt.IllegalComponentStateException; import java.awt.Point; import java.awt.Toolkit; import java.io.IOException; import java.io.ObjectInputStream; -import java.awt.IllegalComponentStateException; -import java.awt.MouseInfo; import sun.awt.AWTAccessor; import sun.awt.SunToolkit; @@ -1188,6 +1187,11 @@ private void setOldModifiers() { /** * Sets new modifiers by the old ones. + * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs * @serial */ @SuppressWarnings("deprecation") diff --git a/src/java.desktop/share/classes/java/awt/event/WindowEvent.java b/src/java.desktop/share/classes/java/awt/event/WindowEvent.java index d74429ff242..5a74333e16e 100644 --- a/src/java.desktop/share/classes/java/awt/event/WindowEvent.java +++ b/src/java.desktop/share/classes/java/awt/event/WindowEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -27,6 +27,7 @@ import java.awt.Window; import java.lang.annotation.Native; + import sun.awt.AppContext; import sun.awt.SunToolkit; @@ -163,11 +164,14 @@ public class WindowEvent extends ComponentEvent { transient Window opposite; /** - * TBS + * Previous state of the window for window state change event. */ int oldState; - int newState; + /** + * New state of the window for window state change event. + */ + int newState; /* * JDK 1.1 serialVersionUID diff --git a/src/java.desktop/share/classes/java/awt/font/GlyphVector.java b/src/java.desktop/share/classes/java/awt/font/GlyphVector.java index c507766cee7..1db1168ed1e 100644 --- a/src/java.desktop/share/classes/java/awt/font/GlyphVector.java +++ b/src/java.desktop/share/classes/java/awt/font/GlyphVector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -108,6 +108,11 @@ public abstract class GlyphVector implements Cloneable { + /** + * Constructor for subclasses to call. + */ + protected GlyphVector() {} + // // methods associated with creation-time state // diff --git a/src/java.desktop/share/classes/java/awt/font/LayoutPath.java b/src/java.desktop/share/classes/java/awt/font/LayoutPath.java index 60bc6f2896a..820dcce24ac 100644 --- a/src/java.desktop/share/classes/java/awt/font/LayoutPath.java +++ b/src/java.desktop/share/classes/java/awt/font/LayoutPath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -41,6 +41,12 @@ * @since 1.6 */ public abstract class LayoutPath { + + /** + * Constructor for subclasses to call. + */ + protected LayoutPath() {} + /** * Convert a point in user space to a location relative to the * path. The location is chosen so as to minimize the distance diff --git a/src/java.desktop/share/classes/java/awt/font/LineMetrics.java b/src/java.desktop/share/classes/java/awt/font/LineMetrics.java index f5665591400..0002699148a 100644 --- a/src/java.desktop/share/classes/java/awt/font/LineMetrics.java +++ b/src/java.desktop/share/classes/java/awt/font/LineMetrics.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -43,6 +43,10 @@ public abstract class LineMetrics { + /** + * Constructor for subclasses to call. + */ + protected LineMetrics() {} /** * Returns the number of characters ({@code char} values) in the text whose diff --git a/src/java.desktop/share/classes/java/awt/font/TransformAttribute.java b/src/java.desktop/share/classes/java/awt/font/TransformAttribute.java index 967df455c15..c2efdeb7763 100644 --- a/src/java.desktop/share/classes/java/awt/font/TransformAttribute.java +++ b/src/java.desktop/share/classes/java/awt/font/TransformAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -41,8 +41,9 @@ package java.awt.font; import java.awt.geom.AffineTransform; -import java.io.Serializable; +import java.io.IOException; import java.io.ObjectStreamException; +import java.io.Serializable; /** * The {@code TransformAttribute} class provides an immutable @@ -99,6 +100,12 @@ public boolean isIdentity() { */ public static final TransformAttribute IDENTITY = new TransformAttribute(null); + /** + * Writes default serializable fields to stream. + * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs + */ private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { @@ -109,7 +116,12 @@ private void writeObject(java.io.ObjectOutputStream s) s.defaultWriteObject(); } - /* + /** + * Resolves a {@code TransformAttribute} object after serialization. + * + * @return a newly created object from deserialized data + * @throws ObjectStreamException if a new object replacing this object could + * not be created * @since 1.6 */ private Object readResolve() throws ObjectStreamException { diff --git a/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java b/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java index 5939f65e6be..380e72abc88 100644 --- a/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java +++ b/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -27,6 +27,7 @@ import java.awt.Shape; import java.beans.ConstructorProperties; +import java.io.IOException; /** * The {@code AffineTransform} class represents a 2D affine transform @@ -3942,12 +3943,26 @@ public boolean equals(Object obj) { */ private static final long serialVersionUID = 1330973210523860834L; + /** + * Writes default serializable fields to stream. + * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs + */ private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { s.defaultWriteObject(); } + /** + * Reads the {@code ObjectInputStream}. + * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + */ private void readObject(java.io.ObjectInputStream s) throws java.lang.ClassNotFoundException, java.io.IOException { diff --git a/src/java.desktop/share/classes/java/awt/geom/Arc2D.java b/src/java.desktop/share/classes/java/awt/geom/Arc2D.java index 00e553bbbbb..23c6eee65e0 100644 --- a/src/java.desktop/share/classes/java/awt/geom/Arc2D.java +++ b/src/java.desktop/share/classes/java/awt/geom/Arc2D.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,6 +25,7 @@ package java.awt.geom; +import java.io.IOException; import java.io.Serializable; /** @@ -330,6 +331,8 @@ protected Rectangle2D makeBounds(double x, double y, * indicating the arc type of this {@code Arc2D} * instance. * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData * <ol> * <li>The default serializable fields. @@ -352,6 +355,10 @@ private void writeObject(java.io.ObjectOutputStream s) * indicating the arc type of this {@code Arc2D} * instance. * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object + * could not be found + * @throws IOException if an I/O error occurs * @serialData * <ol> * <li>The default serializable fields. @@ -622,6 +629,8 @@ protected Rectangle2D makeBounds(double x, double y, * indicating the arc type of this {@code Arc2D} * instance. * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData * <ol> * <li>The default serializable fields. @@ -644,6 +653,10 @@ private void writeObject(java.io.ObjectOutputStream s) * indicating the arc type of this {@code Arc2D} * instance. * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object + * could not be found + * @throws IOException if an I/O error occurs * @serialData * <ol> * <li>The default serializable fields. diff --git a/src/java.desktop/share/classes/java/awt/geom/Path2D.java b/src/java.desktop/share/classes/java/awt/geom/Path2D.java index 60fd57e6afd..bc4ce207849 100644 --- a/src/java.desktop/share/classes/java/awt/geom/Path2D.java +++ b/src/java.desktop/share/classes/java/awt/geom/Path2D.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -27,6 +27,7 @@ import java.awt.Rectangle; import java.awt.Shape; +import java.io.IOException; import java.io.Serializable; import java.io.StreamCorruptedException; import java.util.Arrays; @@ -857,6 +858,8 @@ public final Object clone() { * serialization of the path segments stored in this * path. * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData * <ol> * <li>The default serializable fields. @@ -994,6 +997,10 @@ private void writeObject(java.io.ObjectOutputStream s) * The serial data for this object is described in the * writeObject method. * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object + * could not be found + * @throws IOException if an I/O error occurs * @since 1.6 */ private void readObject(java.io.ObjectInputStream s) @@ -1632,6 +1639,8 @@ public final Object clone() { * serialization of the path segments stored in this * path. * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData * <ol> * <li>The default serializable fields. @@ -1768,6 +1777,10 @@ private void writeObject(java.io.ObjectOutputStream s) * The serial data for this object is described in the * writeObject method. * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object + * could not be found + * @throws IOException if an I/O error occurs * * @since 1.6 */ private void readObject(java.io.ObjectInputStream s) diff --git a/src/java.desktop/share/classes/java/awt/image/AbstractMultiResolutionImage.java b/src/java.desktop/share/classes/java/awt/image/AbstractMultiResolutionImage.java index aa105ccea75..15f3ef61b0f 100644 --- a/src/java.desktop/share/classes/java/awt/image/AbstractMultiResolutionImage.java +++ b/src/java.desktop/share/classes/java/awt/image/AbstractMultiResolutionImage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -65,6 +65,11 @@ public abstract class AbstractMultiResolutionImage extends java.awt.Image implements MultiResolutionImage { + /** + * Constructor for subclasses to call. + */ + protected AbstractMultiResolutionImage() {} + /** * This method simply delegates to the same method on the base image and * it is equivalent to: {@code getBaseImage().getWidth(observer)}. diff --git a/src/java.desktop/share/classes/java/awt/image/BufferStrategy.java b/src/java.desktop/share/classes/java/awt/image/BufferStrategy.java index 587e19e0102..1403bc04636 100644 --- a/src/java.desktop/share/classes/java/awt/image/BufferStrategy.java +++ b/src/java.desktop/share/classes/java/awt/image/BufferStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -134,6 +134,11 @@ */ public abstract class BufferStrategy { + /** + * Constructor for subclasses to call. + */ + protected BufferStrategy() {} + /** * Returns the {@code BufferCapabilities} for this * {@code BufferStrategy}. diff --git a/src/java.desktop/share/classes/java/awt/image/ImageFilter.java b/src/java.desktop/share/classes/java/awt/image/ImageFilter.java index b1f87e75d16..d136e16fc6b 100644 --- a/src/java.desktop/share/classes/java/awt/image/ImageFilter.java +++ b/src/java.desktop/share/classes/java/awt/image/ImageFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -43,6 +43,12 @@ * @author Jim Graham */ public class ImageFilter implements ImageConsumer, Cloneable { + + /** + * Constructs an {@code ImageFilter}. + */ + public ImageFilter() {} + /** * The consumer of the particular image data stream for which this * instance of the ImageFilter is filtering data. It is not diff --git a/src/java.desktop/share/classes/java/awt/image/RGBImageFilter.java b/src/java.desktop/share/classes/java/awt/image/RGBImageFilter.java index a368a36d217..44302923d17 100644 --- a/src/java.desktop/share/classes/java/awt/image/RGBImageFilter.java +++ b/src/java.desktop/share/classes/java/awt/image/RGBImageFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -66,6 +66,11 @@ */ public abstract class RGBImageFilter extends ImageFilter { + /** + * Constructor for subclasses to call. + */ + protected RGBImageFilter() {} + /** * The {@code ColorModel} to be replaced by * {@code newmodel} when the user calls diff --git a/src/java.desktop/share/classes/java/awt/image/VolatileImage.java b/src/java.desktop/share/classes/java/awt/image/VolatileImage.java index f88c5d00bd6..0d838c8ff25 100644 --- a/src/java.desktop/share/classes/java/awt/image/VolatileImage.java +++ b/src/java.desktop/share/classes/java/awt/image/VolatileImage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -133,6 +133,11 @@ public abstract class VolatileImage extends Image implements Transparency { + /** + * Constructor for subclasses to call. + */ + protected VolatileImage() {} + // Return codes for validate() method /** diff --git a/src/java.desktop/share/classes/java/beans/IndexedPropertyChangeEvent.java b/src/java.desktop/share/classes/java/beans/IndexedPropertyChangeEvent.java index 6a96d7dc996..29eca6280ad 100644 --- a/src/java.desktop/share/classes/java/beans/IndexedPropertyChangeEvent.java +++ b/src/java.desktop/share/classes/java/beans/IndexedPropertyChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -22,6 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.beans; /** @@ -41,8 +42,12 @@ * @author Mark Davidson */ public class IndexedPropertyChangeEvent extends PropertyChangeEvent { + private static final long serialVersionUID = -320227448495806870L; + /** + * The index of the property element that was changed. + */ private int index; /** diff --git a/src/java.desktop/share/classes/java/beans/PropertyChangeSupport.java b/src/java.desktop/share/classes/java/beans/PropertyChangeSupport.java index 0a1a0377dbe..bcd83297217 100644 --- a/src/java.desktop/share/classes/java/beans/PropertyChangeSupport.java +++ b/src/java.desktop/share/classes/java/beans/PropertyChangeSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -22,13 +22,14 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.beans; -import java.io.Serializable; -import java.io.ObjectStreamField; -import java.io.ObjectOutputStream; -import java.io.ObjectInputStream; import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.ObjectStreamField; +import java.io.Serializable; import java.util.Hashtable; import java.util.Map.Entry; @@ -423,6 +424,10 @@ public boolean hasListeners(String propertyName) { } /** + * Writes serializable fields to stream. + * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData Null terminated list of {@code PropertyChangeListeners}. * <p> * At serialization time we skip non-serializable listeners and @@ -462,6 +467,14 @@ private void writeObject(ObjectOutputStream s) throws IOException { s.writeObject(null); } + /** + * Reads the {@code ObjectInputStream}. + * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + */ private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException { this.map = new PropertyChangeListenerMap(); @@ -491,9 +504,13 @@ private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOEx private Object source; /** - * @serialField children Hashtable - * @serialField source Object + * @serialField children Hashtable + * The list of {@code PropertyChangeListeners} + * @serialField source Object + * The object to be provided as the "source" for any generated + * events * @serialField propertyChangeSupportSerializedDataVersion int + * The version */ private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField("children", Hashtable.class), diff --git a/src/java.desktop/share/classes/java/beans/VetoableChangeSupport.java b/src/java.desktop/share/classes/java/beans/VetoableChangeSupport.java index cca3458e518..15dc1ab0410 100644 --- a/src/java.desktop/share/classes/java/beans/VetoableChangeSupport.java +++ b/src/java.desktop/share/classes/java/beans/VetoableChangeSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -22,13 +22,14 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package java.beans; -import java.io.Serializable; -import java.io.ObjectStreamField; -import java.io.ObjectOutputStream; -import java.io.ObjectInputStream; import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.ObjectStreamField; +import java.io.Serializable; import java.util.Hashtable; import java.util.Map.Entry; @@ -412,6 +413,10 @@ public boolean hasListeners(String propertyName) { } /** + * Writes serializable fields to stream. + * + * @param s the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs * @serialData Null terminated list of {@code VetoableChangeListeners}. * <p> * At serialization time we skip non-serializable listeners and @@ -451,6 +456,14 @@ private void writeObject(ObjectOutputStream s) throws IOException { s.writeObject(null); } + /** + * Reads the {@code ObjectInputStream}. + * + * @param s the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs + */ private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException { this.map = new VetoableChangeListenerMap(); @@ -480,9 +493,13 @@ private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOEx private Object source; /** - * @serialField children Hashtable - * @serialField source Object + * @serialField children Hashtable + * The list of {@code PropertyChangeListeners} + * @serialField source Object + * The object to be provided as the "source" for any generated + * events * @serialField vetoableChangeSupportSerializedDataVersion int + * The version */ private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField("children", Hashtable.class), diff --git a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextChildSupport.java b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextChildSupport.java index 83ccbfe3a75..ad1c8c410f5 100644 --- a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextChildSupport.java +++ b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextChildSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -28,12 +28,9 @@ import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; - +import java.beans.PropertyVetoException; import java.beans.VetoableChangeListener; import java.beans.VetoableChangeSupport; - -import java.beans.PropertyVetoException; - import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -312,8 +309,10 @@ protected void initializeBeanContextResources() { /** * Write the persistence state of the object. + * + * @param oos the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs */ - private void writeObject(ObjectOutputStream oos) throws IOException { /* @@ -332,10 +331,13 @@ private void writeObject(ObjectOutputStream oos) throws IOException { /** * Restore a persistent object, must wait for subsequent setBeanContext() - * to fully restore any resources obtained from the new nesting - * BeanContext + * to fully restore any resources obtained from the new nesting BeanContext. + * + * @param ois the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs */ - private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { ois.defaultReadObject(); } diff --git a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextServiceRevokedEvent.java b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextServiceRevokedEvent.java index abdf8247679..9a355c3168c 100644 --- a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextServiceRevokedEvent.java +++ b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextServiceRevokedEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -25,10 +25,6 @@ package java.beans.beancontext; -import java.beans.beancontext.BeanContextEvent; - -import java.beans.beancontext.BeanContextServices; - /** * <p> * This event type is used by the @@ -94,6 +90,10 @@ public boolean isServiceClass(Class<?> service) { /** * A {@code Class} reference to the service that is being revoked. */ - protected Class<?> serviceClass; - private boolean invalidateRefs; + protected Class<?> serviceClass; + + /** + * {@code true} if current service is being forcibly revoked. + */ + private boolean invalidateRefs; } diff --git a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextServicesSupport.java b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextServicesSupport.java index 55b4d62f74d..08f0da4dc23 100644 --- a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextServicesSupport.java +++ b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextServicesSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -25,23 +25,19 @@ package java.beans.beancontext; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; +import java.util.Locale; import java.util.Map; -import java.util.Map.Entry; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; - import java.util.TooManyListenersException; -import java.util.Locale; - /** * <p> * This helper class provides a utility implementation of the @@ -1209,9 +1205,11 @@ protected synchronized void bcsPreDeserializationHook(ObjectInputStream ois) thr } /** - * serialize the instance + * Serialize the instance. + * + * @param oos the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs */ - private synchronized void writeObject(ObjectOutputStream oos) throws IOException { oos.defaultWriteObject(); @@ -1219,9 +1217,13 @@ private synchronized void writeObject(ObjectOutputStream oos) throws IOException } /** - * deserialize the instance + * Deserialize the instance. + * + * @param ois the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs */ - private synchronized void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { ois.defaultReadObject(); diff --git a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextSupport.java b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextSupport.java index e36c05bbebd..2331f6391ec 100644 --- a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextSupport.java +++ b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -27,30 +27,18 @@ import java.awt.Component; import java.awt.Container; - import java.beans.Beans; -import java.beans.AppletInitializer; - -import java.beans.DesignMode; - import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; -import java.beans.PropertyChangeSupport; - -import java.beans.VetoableChangeListener; -import java.beans.VetoableChangeSupport; import java.beans.PropertyVetoException; - +import java.beans.VetoableChangeListener; import java.beans.Visibility; - import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; - import java.net.URL; - import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -58,7 +46,6 @@ import java.util.Locale; import java.util.Map; - /** * This helper class provides a utility implementation of the * java.beans.beancontext.BeanContext interface. @@ -338,8 +325,16 @@ protected class BCSChild implements Serializable { */ + /** + * The child. + */ @SuppressWarnings("serial") // Not statically typed as Serializable - private Object child; + private Object child; + + /** + * The peer if the child and the peer are related by an implementation + * of BeanContextProxy + */ @SuppressWarnings("serial") // Not statically typed as Serializable private Object proxyPeer; @@ -997,9 +992,9 @@ public final void writeChildren(ObjectOutputStream oos) throws IOException { * it should always call writeObject() followed by writeChildren() and * readObject() followed by readChildren(). * - * @param oos the ObjectOutputStream + * @param oos the {@code ObjectOutputStream} to write + * @throws IOException if an I/O error occurs */ - private synchronized void writeObject(ObjectOutputStream oos) throws IOException { serializing = true; @@ -1065,8 +1060,12 @@ public final void readChildren(ObjectInputStream ois) throws IOException, ClassN * deserialize contents ... if this instance has a distinct peer the * children are *not* serialized here, the peer's readObject() must call * readChildren() after deserializing this instance. + * + * @param ois the {@code ObjectInputStream} to read + * @throws ClassNotFoundException if the class of a serialized object could + * not be found + * @throws IOException if an I/O error occurs */ - private synchronized void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { synchronized(BeanContext.globalHierarchyLock) { @@ -1372,7 +1371,10 @@ protected static final boolean classEquals(Class<?> first, Class<?> second) { */ protected transient HashMap<Object, BCSChild> children; - private int serializable = 0; // children serializable + /** + * Currently serializable children. + */ + private int serializable = 0; // children serializable /** * all accesses to the {@code protected ArrayList bcmListeners} field diff --git a/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java b/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java index 9c0d4b50c15..cff4dd05d26 100644 --- a/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java +++ b/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -79,6 +79,11 @@ @JavaBean(description = "Minimal information that all accessible objects return") public abstract class AccessibleContext { + /** + * Constructor for subclasses to call. + */ + protected AccessibleContext() {} + /** * The {@code AppContext} that should be used to dispatch events for this * {@code AccessibleContext}. diff --git a/src/java.desktop/share/classes/javax/accessibility/AccessibleHyperlink.java b/src/java.desktop/share/classes/javax/accessibility/AccessibleHyperlink.java index 2df088b13d4..0d6cf2532c1 100644 --- a/src/java.desktop/share/classes/javax/accessibility/AccessibleHyperlink.java +++ b/src/java.desktop/share/classes/javax/accessibility/AccessibleHyperlink.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -38,6 +38,11 @@ */ public abstract class AccessibleHyperlink implements AccessibleAction { + /** + * Constructor for subclasses to call. + */ + protected AccessibleHyperlink() {} + /** * Since the document a link is associated with may have changed, this * method returns whether or not this Link is still valid (with respect to diff --git a/src/java.desktop/share/classes/javax/accessibility/AccessibleResourceBundle.java b/src/java.desktop/share/classes/javax/accessibility/AccessibleResourceBundle.java index 80a78967dd3..3da4a46f465 100644 --- a/src/java.desktop/share/classes/javax/accessibility/AccessibleResourceBundle.java +++ b/src/java.desktop/share/classes/javax/accessibility/AccessibleResourceBundle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -38,6 +38,11 @@ @Deprecated public class AccessibleResourceBundle extends ListResourceBundle { + /** + * Constructs an {@code AccessibleResourceBundle}. + */ + public AccessibleResourceBundle() {} + /** * Returns the mapping between the programmatic keys and the localized * display strings. diff --git a/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataNode.java b/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataNode.java index ca2f1713147..08d4f288269 100644 --- a/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataNode.java +++ b/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -30,16 +30,19 @@ import java.util.List; import org.w3c.dom.Attr; +import org.w3c.dom.DOMException; import org.w3c.dom.Document; import org.w3c.dom.Element; -import org.w3c.dom.DOMException; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.TypeInfo; import org.w3c.dom.UserDataHandler; - +/** + * An {@code IIODOMException} is thrown by the {@code IIOMetadataNode} in + * "exceptional" circumstances. + */ class IIODOMException extends DOMException { private static final long serialVersionUID = -4369510142067447468L; diff --git a/src/java.desktop/share/classes/javax/imageio/stream/MemoryCache.java b/src/java.desktop/share/classes/javax/imageio/stream/MemoryCache.java index 04d32e6d959..2b0fdd98d60 100644 --- a/src/java.desktop/share/classes/javax/imageio/stream/MemoryCache.java +++ b/src/java.desktop/share/classes/javax/imageio/stream/MemoryCache.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -333,7 +333,7 @@ public void read(byte[] b, int off, int len, long pos) } long index = pos/BUFFER_LENGTH; - int offset = (int)pos % BUFFER_LENGTH; + int offset = (int)(pos % BUFFER_LENGTH); while (len > 0) { int nbytes = Math.min(len, BUFFER_LENGTH - offset); byte[] buf = getCacheBlock(index++); diff --git a/src/java.desktop/share/classes/javax/print/PrintServiceLookup.java b/src/java.desktop/share/classes/javax/print/PrintServiceLookup.java index 52b3fd507fe..90d80622b1d 100644 --- a/src/java.desktop/share/classes/javax/print/PrintServiceLookup.java +++ b/src/java.desktop/share/classes/javax/print/PrintServiceLookup.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -65,6 +65,11 @@ */ public abstract class PrintServiceLookup { + /** + * Constructor for subclasses to call. + */ + protected PrintServiceLookup() {} + /** * Contains a lists of services. */ diff --git a/src/java.desktop/share/classes/javax/print/ServiceUI.java b/src/java.desktop/share/classes/javax/print/ServiceUI.java index 3990ba6c942..873d4448ffc 100644 --- a/src/java.desktop/share/classes/javax/print/ServiceUI.java +++ b/src/java.desktop/share/classes/javax/print/ServiceUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -65,6 +65,11 @@ */ public class ServiceUI { + /** + * Constructs a {@code ServiceUI}. + */ + public ServiceUI() {} + /** * Presents a dialog to the user for selecting a print service (printer). It * is displayed at the location specified by the application and is modal. diff --git a/src/java.desktop/share/classes/javax/print/ServiceUIFactory.java b/src/java.desktop/share/classes/javax/print/ServiceUIFactory.java index 918cf0155ff..87d81017322 100644 --- a/src/java.desktop/share/classes/javax/print/ServiceUIFactory.java +++ b/src/java.desktop/share/classes/javax/print/ServiceUIFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -56,6 +56,11 @@ */ public abstract class ServiceUIFactory { + /** + * Constructor for subclasses to call. + */ + protected ServiceUIFactory() {} + /** * Denotes a UI implemented as a Swing component. The value of the string is * the fully qualified classname : "javax.swing.JComponent". diff --git a/src/java.desktop/share/classes/javax/print/StreamPrintServiceFactory.java b/src/java.desktop/share/classes/javax/print/StreamPrintServiceFactory.java index 58a1ae7bb23..a5ea0447b28 100644 --- a/src/java.desktop/share/classes/javax/print/StreamPrintServiceFactory.java +++ b/src/java.desktop/share/classes/javax/print/StreamPrintServiceFactory.java @@ -52,6 +52,11 @@ */ public abstract class StreamPrintServiceFactory { + /** + * Constructor for subclasses to call. + */ + protected StreamPrintServiceFactory() {} + /** * Contains a list of factories. */ diff --git a/src/java.desktop/share/classes/javax/print/attribute/standard/DialogOwner.java b/src/java.desktop/share/classes/javax/print/attribute/standard/DialogOwner.java index 6e966c1ed0d..27e8390b37f 100644 --- a/src/java.desktop/share/classes/javax/print/attribute/standard/DialogOwner.java +++ b/src/java.desktop/share/classes/javax/print/attribute/standard/DialogOwner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 @@ -26,8 +26,10 @@ package javax.print.attribute.standard; import java.awt.Window; + import javax.print.attribute.Attribute; import javax.print.attribute.PrintRequestAttribute; + import sun.print.DialogOwnerAccessor; /** @@ -59,6 +61,9 @@ public long getOwnerID(DialogOwner owner) { private static final long serialVersionUID = -1901909867156076547L; + /** + * The owner of the dialog. + */ private Window owner; private transient long id; diff --git a/src/java.desktop/share/classes/javax/print/event/PrintJobAdapter.java b/src/java.desktop/share/classes/javax/print/event/PrintJobAdapter.java index 989f275b383..f063fb7a8e0 100644 --- a/src/java.desktop/share/classes/javax/print/event/PrintJobAdapter.java +++ b/src/java.desktop/share/classes/javax/print/event/PrintJobAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -36,6 +36,11 @@ */ public abstract class PrintJobAdapter implements PrintJobListener { + /** + * Constructor for subclasses to call. + */ + protected PrintJobAdapter() {} + /** * Called to notify the client that data has been successfully transferred * to the print service, and the client may free local resources allocated diff --git a/src/java.desktop/share/classes/javax/sound/midi/spi/MidiDeviceProvider.java b/src/java.desktop/share/classes/javax/sound/midi/spi/MidiDeviceProvider.java index c79f5916a30..ae3d005c7cd 100644 --- a/src/java.desktop/share/classes/javax/sound/midi/spi/MidiDeviceProvider.java +++ b/src/java.desktop/share/classes/javax/sound/midi/spi/MidiDeviceProvider.java @@ -39,7 +39,7 @@ public abstract class MidiDeviceProvider { /** - * Constructs a {@code MidiDeviceProvider}. + * Constructor for subclasses to call. */ protected MidiDeviceProvider() {} diff --git a/src/java.desktop/share/classes/javax/sound/midi/spi/MidiFileReader.java b/src/java.desktop/share/classes/javax/sound/midi/spi/MidiFileReader.java index 6694456c877..243251ef7ec 100644 --- a/src/java.desktop/share/classes/javax/sound/midi/spi/MidiFileReader.java +++ b/src/java.desktop/share/classes/javax/sound/midi/spi/MidiFileReader.java @@ -46,7 +46,7 @@ public abstract class MidiFileReader { /** - * Constructs a {@code MidiFileReader}. + * Constructor for subclasses to call. */ protected MidiFileReader() {} diff --git a/src/java.desktop/share/classes/javax/sound/midi/spi/MidiFileWriter.java b/src/java.desktop/share/classes/javax/sound/midi/spi/MidiFileWriter.java index 672da99f32a..98b45702d18 100644 --- a/src/java.desktop/share/classes/javax/sound/midi/spi/MidiFileWriter.java +++ b/src/java.desktop/share/classes/javax/sound/midi/spi/MidiFileWriter.java @@ -43,7 +43,7 @@ public abstract class MidiFileWriter { /** - * Constructs a {@code MidiFileWriter}. + * Constructor for subclasses to call. */ protected MidiFileWriter() {} diff --git a/src/java.desktop/share/classes/javax/sound/midi/spi/SoundbankReader.java b/src/java.desktop/share/classes/javax/sound/midi/spi/SoundbankReader.java index b34c4622374..23dcb3ece79 100644 --- a/src/java.desktop/share/classes/javax/sound/midi/spi/SoundbankReader.java +++ b/src/java.desktop/share/classes/javax/sound/midi/spi/SoundbankReader.java @@ -45,7 +45,7 @@ public abstract class SoundbankReader { /** - * Constructs a {@code SoundbankReader}. + * Constructor for subclasses to call. */ protected SoundbankReader() {} diff --git a/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileReader.java b/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileReader.java index 39475fad07e..8ff88af3316 100644 --- a/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileReader.java +++ b/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileReader.java @@ -45,7 +45,7 @@ public abstract class AudioFileReader { /** - * Constructs an {@code AudioFileReader}. + * Constructor for subclasses to call. */ protected AudioFileReader() {} diff --git a/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileWriter.java b/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileWriter.java index 25f3140f57c..787cfc5ef12 100644 --- a/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileWriter.java +++ b/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileWriter.java @@ -46,7 +46,7 @@ public abstract class AudioFileWriter { /** - * Constructs an {@code AudioFileWriter}. + * Constructor for subclasses to call. */ protected AudioFileWriter() {} diff --git a/src/java.desktop/share/classes/javax/sound/sampled/spi/FormatConversionProvider.java b/src/java.desktop/share/classes/javax/sound/sampled/spi/FormatConversionProvider.java index 803f7a2c554..e7058fc6273 100644 --- a/src/java.desktop/share/classes/javax/sound/sampled/spi/FormatConversionProvider.java +++ b/src/java.desktop/share/classes/javax/sound/sampled/spi/FormatConversionProvider.java @@ -52,7 +52,7 @@ public abstract class FormatConversionProvider { /** - * Constructs a {@code FormatConversionProvider}. + * Constructor for subclasses to call. */ protected FormatConversionProvider() {} diff --git a/src/java.desktop/share/classes/javax/sound/sampled/spi/MixerProvider.java b/src/java.desktop/share/classes/javax/sound/sampled/spi/MixerProvider.java index 4360d90d65b..13610d1ae3c 100644 --- a/src/java.desktop/share/classes/javax/sound/sampled/spi/MixerProvider.java +++ b/src/java.desktop/share/classes/javax/sound/sampled/spi/MixerProvider.java @@ -40,7 +40,7 @@ public abstract class MixerProvider { /** - * Constructs a {@code MixerProvider}. + * Constructor for subclasses to call. */ protected MixerProvider() {} diff --git a/src/java.desktop/share/classes/javax/swing/AbstractButton.java b/src/java.desktop/share/classes/javax/swing/AbstractButton.java index ab3c1a6e935..56ff09c2c49 100644 --- a/src/java.desktop/share/classes/javax/swing/AbstractButton.java +++ b/src/java.desktop/share/classes/javax/swing/AbstractButton.java @@ -2356,6 +2356,11 @@ protected abstract class AccessibleAbstractButton extends AccessibleJComponent implements AccessibleAction, AccessibleValue, AccessibleText, AccessibleExtendedComponent { + /** + * Constructor for subclasses to call. + */ + protected AccessibleAbstractButton() {} + /** * Returns the accessible name of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/ArrayTable.java b/src/java.desktop/share/classes/javax/swing/ArrayTable.java index 53cf7129582..7c38f9fb577 100644 --- a/src/java.desktop/share/classes/javax/swing/ArrayTable.java +++ b/src/java.desktop/share/classes/javax/swing/ArrayTable.java @@ -255,17 +255,19 @@ public void clear() { */ public Object clone() { ArrayTable newArrayTable = new ArrayTable(); - if (isArray()) { - Object[] array = (Object[])table; - for (int i = 0 ;i < array.length-1 ; i+=2) { - newArrayTable.put(array[i], array[i+1]); - } - } else { - Hashtable<?,?> tmp = (Hashtable)table; - Enumeration<?> keys = tmp.keys(); - while (keys.hasMoreElements()) { - Object o = keys.nextElement(); - newArrayTable.put(o,tmp.get(o)); + if (table != null) { + if (isArray()) { + Object[] array = (Object[]) table; + for (int i = 0; i < array.length - 1; i += 2) { + newArrayTable.put(array[i], array[i + 1]); + } + } else { + Hashtable<?, ?> tmp = (Hashtable) table; + Enumeration<?> keys = tmp.keys(); + while (keys.hasMoreElements()) { + Object o = keys.nextElement(); + newArrayTable.put(o, tmp.get(o)); + } } } return newArrayTable; diff --git a/src/java.desktop/share/classes/javax/swing/Box.java b/src/java.desktop/share/classes/javax/swing/Box.java index 85983abddc1..1fd81249a95 100644 --- a/src/java.desktop/share/classes/javax/swing/Box.java +++ b/src/java.desktop/share/classes/javax/swing/Box.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -384,6 +384,12 @@ public AccessibleContext getAccessibleContext() { */ @SuppressWarnings("serial") protected class AccessibleBoxFiller extends AccessibleAWTComponent { + + /** + * Constructs an {@code AccessibleBoxFiller}. + */ + protected AccessibleBoxFiller() {} + // AccessibleContext methods // /** @@ -426,6 +432,12 @@ public AccessibleContext getAccessibleContext() { */ @SuppressWarnings("serial") protected class AccessibleBox extends AccessibleAWTContainer { + + /** + * Constructs an {@code AccessibleBox}. + */ + protected AccessibleBox() {} + // AccessibleContext methods // /** diff --git a/src/java.desktop/share/classes/javax/swing/CellRendererPane.java b/src/java.desktop/share/classes/javax/swing/CellRendererPane.java index f53a1e89b87..67e8b59ccd1 100644 --- a/src/java.desktop/share/classes/javax/swing/CellRendererPane.java +++ b/src/java.desktop/share/classes/javax/swing/CellRendererPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -244,6 +244,12 @@ public AccessibleContext getAccessibleContext() { * <code>CellRendererPane</code> class. */ protected class AccessibleCellRendererPane extends AccessibleAWTContainer { + + /** + * Constructs an {@code AccessibleCellRendererPane}. + */ + protected AccessibleCellRendererPane() {} + // AccessibleContext methods // /** diff --git a/src/java.desktop/share/classes/javax/swing/DefaultCellEditor.java b/src/java.desktop/share/classes/javax/swing/DefaultCellEditor.java index d8d9af91b9c..0001dfa6c29 100644 --- a/src/java.desktop/share/classes/javax/swing/DefaultCellEditor.java +++ b/src/java.desktop/share/classes/javax/swing/DefaultCellEditor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -303,6 +303,11 @@ protected class EditorDelegate implements ActionListener, ItemListener, Serializ /** The value of this cell. */ protected Object value; + /** + * Constructs an {@code EditorDelegate}. + */ + protected EditorDelegate() {} + /** * Returns the value of this cell. * @return the value of this cell diff --git a/src/java.desktop/share/classes/javax/swing/ImageIcon.java b/src/java.desktop/share/classes/javax/swing/ImageIcon.java index fd0387c5ff4..c790a5f35e4 100644 --- a/src/java.desktop/share/classes/javax/swing/ImageIcon.java +++ b/src/java.desktop/share/classes/javax/swing/ImageIcon.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -596,6 +596,11 @@ public AccessibleContext getAccessibleContext() { protected class AccessibleImageIcon extends AccessibleContext implements AccessibleIcon, Serializable { + /** + * Constructs an {@code AccessibleImageIcon}. + */ + protected AccessibleImageIcon() {} + /* * AccessibleContest implementation ----------------- */ diff --git a/src/java.desktop/share/classes/javax/swing/JApplet.java b/src/java.desktop/share/classes/javax/swing/JApplet.java index 8d9e1b21d2b..59adfba696d 100644 --- a/src/java.desktop/share/classes/javax/swing/JApplet.java +++ b/src/java.desktop/share/classes/javax/swing/JApplet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -566,6 +566,12 @@ public AccessibleContext getAccessibleContext() { * <code>JApplet</code> class. */ protected class AccessibleJApplet extends AccessibleApplet { + + /** + * Constructs an {@code AccessibleJApplet}. + */ + protected AccessibleJApplet() {} + // everything moved to new parent, AccessibleApplet } } diff --git a/src/java.desktop/share/classes/javax/swing/JButton.java b/src/java.desktop/share/classes/javax/swing/JButton.java index f2008407610..0a5c2e2cadc 100644 --- a/src/java.desktop/share/classes/javax/swing/JButton.java +++ b/src/java.desktop/share/classes/javax/swing/JButton.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -301,6 +301,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") protected class AccessibleJButton extends AccessibleAbstractButton { + /** + * Constructs an {@code AccessibleJButton}. + */ + protected AccessibleJButton() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JCheckBox.java b/src/java.desktop/share/classes/javax/swing/JCheckBox.java index 3d2eefd1937..44112936a2b 100644 --- a/src/java.desktop/share/classes/javax/swing/JCheckBox.java +++ b/src/java.desktop/share/classes/javax/swing/JCheckBox.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -332,6 +332,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJCheckBox extends AccessibleJToggleButton { + /** + * Constructs an {@code AccessibleJCheckBox}. + */ + protected AccessibleJCheckBox() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JCheckBoxMenuItem.java b/src/java.desktop/share/classes/javax/swing/JCheckBoxMenuItem.java index 4bc65f8eb86..6604e2cbc7d 100644 --- a/src/java.desktop/share/classes/javax/swing/JCheckBoxMenuItem.java +++ b/src/java.desktop/share/classes/javax/swing/JCheckBoxMenuItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -304,6 +304,12 @@ public AccessibleContext getAccessibleContext() { */ @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJCheckBoxMenuItem extends AccessibleJMenuItem { + + /** + * Constructs an {@code AccessibleJCheckBoxMenuItem}. + */ + protected AccessibleJCheckBoxMenuItem() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JColorChooser.java b/src/java.desktop/share/classes/javax/swing/JColorChooser.java index 53eea9edd06..ae352e25ce9 100644 --- a/src/java.desktop/share/classes/javax/swing/JColorChooser.java +++ b/src/java.desktop/share/classes/javax/swing/JColorChooser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -599,6 +599,11 @@ public AccessibleContext getAccessibleContext() { */ protected class AccessibleJColorChooser extends AccessibleJComponent { + /** + * Constructs an {@code AccessibleJColorChooser}. + */ + protected AccessibleJColorChooser() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JComponent.java b/src/java.desktop/share/classes/javax/swing/JComponent.java index c130afd6603..45190d33199 100644 --- a/src/java.desktop/share/classes/javax/swing/JComponent.java +++ b/src/java.desktop/share/classes/javax/swing/JComponent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -3710,6 +3710,11 @@ protected AccessibleJComponent() { */ protected class AccessibleContainerHandler implements ContainerListener { + + /** + * Constructs an {@code AccessibleContainerHandler}. + */ + protected AccessibleContainerHandler() {} public void componentAdded(ContainerEvent e) { Component c = e.getChild(); if (c != null && c instanceof Accessible) { @@ -3738,6 +3743,10 @@ public void componentRemoved(ContainerEvent e) { */ @Deprecated protected class AccessibleFocusHandler implements FocusListener { + /** + * Constructs an {@code AccessibleFocusHandler}. + */ + protected AccessibleFocusHandler() {} public void focusGained(FocusEvent event) { if (accessibleContext != null) { accessibleContext.firePropertyChange( diff --git a/src/java.desktop/share/classes/javax/swing/JDesktopPane.java b/src/java.desktop/share/classes/javax/swing/JDesktopPane.java index 6bf5d5e4814..df9f5d19f71 100644 --- a/src/java.desktop/share/classes/javax/swing/JDesktopPane.java +++ b/src/java.desktop/share/classes/javax/swing/JDesktopPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -627,6 +627,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJDesktopPane extends AccessibleJComponent { + /** + * Constructs an {@code AccessibleJDesktopPane}. + */ + protected AccessibleJDesktopPane() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JDialog.java b/src/java.desktop/share/classes/javax/swing/JDialog.java index 0cf46f45430..522c8dae0a0 100644 --- a/src/java.desktop/share/classes/javax/swing/JDialog.java +++ b/src/java.desktop/share/classes/javax/swing/JDialog.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -1238,6 +1238,11 @@ public AccessibleContext getAccessibleContext() { */ protected class AccessibleJDialog extends AccessibleAWTDialog { + /** + * Constructs an {@code AccessibleJDialog}. + */ + protected AccessibleJDialog() {} + // AccessibleContext methods // /** diff --git a/src/java.desktop/share/classes/javax/swing/JEditorPane.java b/src/java.desktop/share/classes/javax/swing/JEditorPane.java index 3facbcbf0c9..ff965f7dd8f 100644 --- a/src/java.desktop/share/classes/javax/swing/JEditorPane.java +++ b/src/java.desktop/share/classes/javax/swing/JEditorPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -1659,6 +1659,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJEditorPane extends AccessibleJTextComponent { + /** + * Constructs an {@code AccessibleJEditorPane}. + */ + protected AccessibleJEditorPane() {} + /** * Gets the accessibleDescription property of this object. If this * property isn't set, returns the content type of this diff --git a/src/java.desktop/share/classes/javax/swing/JFileChooser.java b/src/java.desktop/share/classes/javax/swing/JFileChooser.java index 65069d39456..56a456b9779 100644 --- a/src/java.desktop/share/classes/javax/swing/JFileChooser.java +++ b/src/java.desktop/share/classes/javax/swing/JFileChooser.java @@ -2041,6 +2041,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") // Superclass is not serializable across versions protected class AccessibleJFileChooser extends AccessibleJComponent { + /** + * Constructs an {@code AccessibleJFileChooser}. + */ + protected AccessibleJFileChooser() {} + /** * Gets the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JFrame.java b/src/java.desktop/share/classes/javax/swing/JFrame.java index dc24e577001..a87f10ec9b7 100644 --- a/src/java.desktop/share/classes/javax/swing/JFrame.java +++ b/src/java.desktop/share/classes/javax/swing/JFrame.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -882,6 +882,11 @@ public AccessibleContext getAccessibleContext() { */ protected class AccessibleJFrame extends AccessibleAWTFrame { + /** + * Constructs an {@code AccessibleJFrame}. + */ + protected AccessibleJFrame() {} + // AccessibleContext methods /** * Get the accessible name of this object. diff --git a/src/java.desktop/share/classes/javax/swing/JInternalFrame.java b/src/java.desktop/share/classes/javax/swing/JInternalFrame.java index 51cefb0c499..8ab38c3b6bf 100644 --- a/src/java.desktop/share/classes/javax/swing/JInternalFrame.java +++ b/src/java.desktop/share/classes/javax/swing/JInternalFrame.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -2011,6 +2011,11 @@ public AccessibleContext getAccessibleContext() { protected class AccessibleJInternalFrame extends AccessibleJComponent implements AccessibleValue { + /** + * Constructs an {@code AccessibleJInternalFrame}. + */ + protected AccessibleJInternalFrame() {} + /** * Get the accessible name of this object. * @@ -2302,6 +2307,11 @@ public AccessibleContext getAccessibleContext() { protected class AccessibleJDesktopIcon extends AccessibleJComponent implements AccessibleValue { + /** + * Constructs an {@code AccessibleJDesktopIcon}. + */ + protected AccessibleJDesktopIcon() {} + /** * Gets the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JLabel.java b/src/java.desktop/share/classes/javax/swing/JLabel.java index 0bef45440fa..7be241df4b0 100644 --- a/src/java.desktop/share/classes/javax/swing/JLabel.java +++ b/src/java.desktop/share/classes/javax/swing/JLabel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -1043,6 +1043,11 @@ public AccessibleContext getAccessibleContext() { protected class AccessibleJLabel extends AccessibleJComponent implements AccessibleText, AccessibleExtendedComponent { + /** + * Constructs an {@code AccessibleJLabel}. + */ + protected AccessibleJLabel() {} + /** * Get the accessible name of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JLayeredPane.java b/src/java.desktop/share/classes/javax/swing/JLayeredPane.java index 94f409b4ba5..4e4f0215f3e 100644 --- a/src/java.desktop/share/classes/javax/swing/JLayeredPane.java +++ b/src/java.desktop/share/classes/javax/swing/JLayeredPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -766,6 +766,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") protected class AccessibleJLayeredPane extends AccessibleJComponent { + /** + * Constructs an {@code AccessibleJLayeredPane}. + */ + protected AccessibleJLayeredPane() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JMenu.java b/src/java.desktop/share/classes/javax/swing/JMenu.java index 58c244b6710..c3e91e54049 100644 --- a/src/java.desktop/share/classes/javax/swing/JMenu.java +++ b/src/java.desktop/share/classes/javax/swing/JMenu.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -1395,6 +1395,11 @@ public AccessibleContext getAccessibleContext() { protected class AccessibleJMenu extends AccessibleJMenuItem implements AccessibleSelection { + /** + * Constructs an {@code AccessibleJMenu}. + */ + protected AccessibleJMenu() {} + /** * Returns the number of accessible children in the object. If all * of the children of this object implement Accessible, than this diff --git a/src/java.desktop/share/classes/javax/swing/JMenuBar.java b/src/java.desktop/share/classes/javax/swing/JMenuBar.java index 81f1fb2b559..4a42d061b16 100644 --- a/src/java.desktop/share/classes/javax/swing/JMenuBar.java +++ b/src/java.desktop/share/classes/javax/swing/JMenuBar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -510,6 +510,11 @@ public AccessibleContext getAccessibleContext() { protected class AccessibleJMenuBar extends AccessibleJComponent implements AccessibleSelection { + /** + * Constructs an {@code AccessibleJMenuBar}. + */ + protected AccessibleJMenuBar() {} + /** * Get the accessible state set of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JOptionPane.java b/src/java.desktop/share/classes/javax/swing/JOptionPane.java index 666e2a05119..861d3b6ee6d 100644 --- a/src/java.desktop/share/classes/javax/swing/JOptionPane.java +++ b/src/java.desktop/share/classes/javax/swing/JOptionPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -2547,6 +2547,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJOptionPane extends AccessibleJComponent { + /** + * Constructs an {@code AccessibleJOptionPane}. + */ + protected AccessibleJOptionPane() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JPanel.java b/src/java.desktop/share/classes/javax/swing/JPanel.java index 9fe307c30db..89fd8a56665 100644 --- a/src/java.desktop/share/classes/javax/swing/JPanel.java +++ b/src/java.desktop/share/classes/javax/swing/JPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -233,6 +233,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJPanel extends AccessibleJComponent { + /** + * Constructs an {@code AccessibleJPanel}. + */ + protected AccessibleJPanel() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JPasswordField.java b/src/java.desktop/share/classes/javax/swing/JPasswordField.java index 4d81295b6c5..ae90708b72b 100644 --- a/src/java.desktop/share/classes/javax/swing/JPasswordField.java +++ b/src/java.desktop/share/classes/javax/swing/JPasswordField.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -406,6 +406,11 @@ public AccessibleContext getAccessibleContext() { */ protected class AccessibleJPasswordField extends AccessibleJTextField { + /** + * Constructs an {@code AccessibleJPasswordField}. + */ + protected AccessibleJPasswordField() {} + /** * Gets the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JProgressBar.java b/src/java.desktop/share/classes/javax/swing/JProgressBar.java index 7d391288569..499a110ec3e 100644 --- a/src/java.desktop/share/classes/javax/swing/JProgressBar.java +++ b/src/java.desktop/share/classes/javax/swing/JProgressBar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -1011,6 +1011,11 @@ public AccessibleContext getAccessibleContext() { protected class AccessibleJProgressBar extends AccessibleJComponent implements AccessibleValue { + /** + * Constructs an {@code AccessibleJProgressBar}. + */ + protected AccessibleJProgressBar() {} + /** * Gets the state set of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JRadioButton.java b/src/java.desktop/share/classes/javax/swing/JRadioButton.java index c85573c87ec..d007a761ddc 100644 --- a/src/java.desktop/share/classes/javax/swing/JRadioButton.java +++ b/src/java.desktop/share/classes/javax/swing/JRadioButton.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -285,6 +285,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJRadioButton extends AccessibleJToggleButton { + /** + * Constructs an {@code AccessibleJRadioButton}. + */ + protected AccessibleJRadioButton() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JRadioButtonMenuItem.java b/src/java.desktop/share/classes/javax/swing/JRadioButtonMenuItem.java index 13953db6b48..44c44a4e4bf 100644 --- a/src/java.desktop/share/classes/javax/swing/JRadioButtonMenuItem.java +++ b/src/java.desktop/share/classes/javax/swing/JRadioButtonMenuItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -278,6 +278,12 @@ public AccessibleContext getAccessibleContext() { */ @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJRadioButtonMenuItem extends AccessibleJMenuItem { + + /** + * Constructs an {@code AccessibleJRadioButtonMenuItem}. + */ + protected AccessibleJRadioButtonMenuItem() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JRootPane.java b/src/java.desktop/share/classes/javax/swing/JRootPane.java index 6275219a101..e191cc6d405 100644 --- a/src/java.desktop/share/classes/javax/swing/JRootPane.java +++ b/src/java.desktop/share/classes/javax/swing/JRootPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -847,6 +847,11 @@ && getComponent(0) != glassPane) { @SuppressWarnings("serial") protected class RootLayout implements LayoutManager2, Serializable { + /** + * Constructs a {@code RootLayout}. + */ + protected RootLayout() {} + /** * Returns the amount of space the layout would like to have. * @@ -1012,6 +1017,12 @@ public AccessibleContext getAccessibleContext() { */ @SuppressWarnings("serial") protected class AccessibleJRootPane extends AccessibleJComponent { + + /** + * Constructs an {@code AccessibleJRootPane}. + */ + protected AccessibleJRootPane() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JScrollBar.java b/src/java.desktop/share/classes/javax/swing/JScrollBar.java index 6fb1f3df50f..d1051765eec 100644 --- a/src/java.desktop/share/classes/javax/swing/JScrollBar.java +++ b/src/java.desktop/share/classes/javax/swing/JScrollBar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -855,6 +855,11 @@ public AccessibleContext getAccessibleContext() { protected class AccessibleJScrollBar extends AccessibleJComponent implements AccessibleValue { + /** + * Constructs an {@code AccessibleJScrollBar}. + */ + protected AccessibleJScrollBar() {} + /** * Get the state set of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JSeparator.java b/src/java.desktop/share/classes/javax/swing/JSeparator.java index 4b44496d624..e554823b7c4 100644 --- a/src/java.desktop/share/classes/javax/swing/JSeparator.java +++ b/src/java.desktop/share/classes/javax/swing/JSeparator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -277,6 +277,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") protected class AccessibleJSeparator extends AccessibleJComponent { + /** + * Constructs an {@code AccessibleJSeparator}. + */ + protected AccessibleJSeparator() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JSplitPane.java b/src/java.desktop/share/classes/javax/swing/JSplitPane.java index 517562fa817..2ff7722f458 100644 --- a/src/java.desktop/share/classes/javax/swing/JSplitPane.java +++ b/src/java.desktop/share/classes/javax/swing/JSplitPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -1135,6 +1135,12 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJSplitPane extends AccessibleJComponent implements AccessibleValue { + + /** + * Constructs an {@code AccessibleJSplitPane}. + */ + protected AccessibleJSplitPane() {} + /** * Gets the state set of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JTabbedPane.java b/src/java.desktop/share/classes/javax/swing/JTabbedPane.java index c1810554845..cffa9e784f4 100644 --- a/src/java.desktop/share/classes/javax/swing/JTabbedPane.java +++ b/src/java.desktop/share/classes/javax/swing/JTabbedPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -289,6 +289,12 @@ public String getUIClassID() { * the tabbedpane (instead of the model itself) as the event source. */ protected class ModelListener implements ChangeListener, Serializable { + + /** + * Constructs a {@code ModelListener}. + */ + protected ModelListener() {} + public void stateChanged(ChangeEvent e) { fireStateChanged(); } diff --git a/src/java.desktop/share/classes/javax/swing/JTextArea.java b/src/java.desktop/share/classes/javax/swing/JTextArea.java index 4b9ba807e63..57b62e71535 100644 --- a/src/java.desktop/share/classes/javax/swing/JTextArea.java +++ b/src/java.desktop/share/classes/javax/swing/JTextArea.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -783,6 +783,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJTextArea extends AccessibleJTextComponent { + /** + * Constructs an {@code AccessibleJTextArea}. + */ + protected AccessibleJTextArea() {} + /** * Gets the state set of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JTextField.java b/src/java.desktop/share/classes/javax/swing/JTextField.java index c54cef64217..f4fb65d6898 100644 --- a/src/java.desktop/share/classes/javax/swing/JTextField.java +++ b/src/java.desktop/share/classes/javax/swing/JTextField.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -950,6 +950,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJTextField extends AccessibleJTextComponent { + /** + * Constructs an {@code AccessibleJTextField}. + */ + protected AccessibleJTextField() {} + /** * Gets the state set of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JToolBar.java b/src/java.desktop/share/classes/javax/swing/JToolBar.java index e503e0788aa..b8bbdbb6179 100644 --- a/src/java.desktop/share/classes/javax/swing/JToolBar.java +++ b/src/java.desktop/share/classes/javax/swing/JToolBar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -831,6 +831,11 @@ public AccessibleContext getAccessibleContext() { */ protected class AccessibleJToolBar extends AccessibleJComponent { + /** + * Constructs an {@code AccessibleJToolBar}. + */ + protected AccessibleJToolBar() {} + /** * Get the state of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JToolTip.java b/src/java.desktop/share/classes/javax/swing/JToolTip.java index 3ae2d100e89..d22c7ba8884 100644 --- a/src/java.desktop/share/classes/javax/swing/JToolTip.java +++ b/src/java.desktop/share/classes/javax/swing/JToolTip.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -261,6 +261,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") protected class AccessibleJToolTip extends AccessibleJComponent { + /** + * Constructs an {@code AccessibleJToolTip}. + */ + protected AccessibleJToolTip() {} + /** * Get the accessible description of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JTree.java b/src/java.desktop/share/classes/javax/swing/JTree.java index 1548ecc6e59..43112a781a4 100644 --- a/src/java.desktop/share/classes/javax/swing/JTree.java +++ b/src/java.desktop/share/classes/javax/swing/JTree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -3320,6 +3320,11 @@ private TreePath getPathForIndexs(int[] indexs) { protected static class EmptySelectionModel extends DefaultTreeSelectionModel { + /** + * Constructs an {@code EmptySelectionModel}. + */ + protected EmptySelectionModel() {} + /** * The single instance of {@code EmptySelectionModel}. */ @@ -3442,6 +3447,11 @@ public void removePropertyChangeListener( protected class TreeSelectionRedirector implements Serializable, TreeSelectionListener { + /** + * Constructs a {@code TreeSelectionRedirector}. + */ + protected TreeSelectionRedirector() {} + /** * Invoked by the <code>TreeSelectionModel</code> when the * selection changes. @@ -3863,6 +3873,12 @@ void removeDescendantSelectedPaths(TreeModelEvent e) { * accordingly when nodes are removed, or changed. */ protected class TreeModelHandler implements TreeModelListener { + + /** + * Constructs a {@code TreeModelHandler}. + */ + protected TreeModelHandler() {} + public void treeNodesChanged(TreeModelEvent e) { } public void treeNodesInserted(TreeModelEvent e) { } diff --git a/src/java.desktop/share/classes/javax/swing/JViewport.java b/src/java.desktop/share/classes/javax/swing/JViewport.java index 14fdf3b57d1..26549bfb286 100644 --- a/src/java.desktop/share/classes/javax/swing/JViewport.java +++ b/src/java.desktop/share/classes/javax/swing/JViewport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -1405,6 +1405,11 @@ public void setExtentSize(Dimension newExtent) { @SuppressWarnings("serial") // Same-version serialization only protected class ViewListener extends ComponentAdapter implements Serializable { + /** + * Constructs a {@code ViewListener}. + */ + protected ViewListener() {} + public void componentResized(ComponentEvent e) { fireStateChanged(); revalidate(); @@ -1875,6 +1880,12 @@ public AccessibleContext getAccessibleContext() { */ @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJViewport extends AccessibleJComponent { + + /** + * Constructs an {@code AccessibleJViewport}. + */ + protected AccessibleJViewport() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/JWindow.java b/src/java.desktop/share/classes/javax/swing/JWindow.java index 7db6227dca4..69269c9f284 100644 --- a/src/java.desktop/share/classes/javax/swing/JWindow.java +++ b/src/java.desktop/share/classes/javax/swing/JWindow.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -654,6 +654,10 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") protected class AccessibleJWindow extends AccessibleAWTWindow { // everything is in the new parent, AccessibleAWTWindow + /** + * Constructs an {@code AccessibleJWindow}. + */ + protected AccessibleJWindow() {} } } diff --git a/src/java.desktop/share/classes/javax/swing/SpinnerListModel.java b/src/java.desktop/share/classes/javax/swing/SpinnerListModel.java index acd00365003..9f33772d400 100644 --- a/src/java.desktop/share/classes/javax/swing/SpinnerListModel.java +++ b/src/java.desktop/share/classes/javax/swing/SpinnerListModel.java @@ -236,10 +236,12 @@ Object findNextMatch(String substring) { do { Object value = list.get(counter); - String string = value.toString(); + if (value != null) { + String string = value.toString(); - if (string != null && string.startsWith(substring)) { - return value; + if (string != null && string.startsWith(substring)) { + return value; + } } counter = (counter + 1) % max; } while (counter != index); diff --git a/src/java.desktop/share/classes/javax/swing/ToolTipManager.java b/src/java.desktop/share/classes/javax/swing/ToolTipManager.java index 19664c584b6..bb37b05e906 100644 --- a/src/java.desktop/share/classes/javax/swing/ToolTipManager.java +++ b/src/java.desktop/share/classes/javax/swing/ToolTipManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -677,6 +677,12 @@ private void checkForTipChange(MouseEvent event) { * Inside timer action. */ protected class insideTimerAction implements ActionListener { + + /** + * Constructs an {@code insideTimerAction}. + */ + protected insideTimerAction() {} + /** * {@inheritDoc} */ @@ -707,6 +713,12 @@ public void actionPerformed(ActionEvent e) { * Outside timer action. */ protected class outsideTimerAction implements ActionListener { + + /** + * Constructs an {@code outsideTimerAction}. + */ + protected outsideTimerAction() {} + /** * {@inheritDoc} */ @@ -719,6 +731,12 @@ public void actionPerformed(ActionEvent e) { * Still inside timer action. */ protected class stillInsideTimerAction implements ActionListener { + + /** + * Constructs a {@code stillInsideTimerAction}. + */ + protected stillInsideTimerAction() {} + /** * {@inheritDoc} */ diff --git a/src/java.desktop/share/classes/javax/swing/TransferHandler.java b/src/java.desktop/share/classes/javax/swing/TransferHandler.java index 1713ba3850e..4119aef2721 100644 --- a/src/java.desktop/share/classes/javax/swing/TransferHandler.java +++ b/src/java.desktop/share/classes/javax/swing/TransferHandler.java @@ -379,7 +379,7 @@ public DropLocation getDropLocation() { * for the transfer - which must represent a drop. This is applicable to * those components that automatically * show the drop location when appropriate during a drag and drop - * operation). By default, the drop location is shown only when the + * operation. By default, the drop location is shown only when the * {@code TransferHandler} has said it can accept the import represented * by this {@code TransferSupport}. With this method you can force the * drop location to always be shown, or always not be shown. diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicBorders.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicBorders.java index 949c3e35f4a..4bb0bf9e0d1 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicBorders.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicBorders.java @@ -47,6 +47,11 @@ public class BasicBorders { + /** + * Constructs a {@code BasicBorders}. + */ + public BasicBorders() {} + /** * Returns a border instance for a {@code JButton}. * @@ -473,6 +478,11 @@ public Insets getBorderInsets(Component c, Insets insets) { */ @SuppressWarnings("serial") // Superclass is not serializable across versions public static class MarginBorder extends AbstractBorder implements UIResource { + /** + * Constructs a {@code MarginBorder}. + */ + public MarginBorder() {} + public Insets getBorderInsets(Component c, Insets insets) { Insets margin = null; // diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java index 9347298350d..4d73309869f 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java @@ -76,6 +76,11 @@ public class BasicButtonUI extends ButtonUI{ // ******************************** // Create PLAF // ******************************** + /** + * Constructs a {@code BasicButtonUI}. + */ + public BasicButtonUI() {} + /** * Returns an instance of {@code BasicButtonUI}. * diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java index aa816d431b0..ccf7d2f5d34 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java @@ -39,6 +39,11 @@ */ public class BasicCheckBoxMenuItemUI extends BasicMenuItemUI { + /** + * Constructs a {@code BasicCheckBoxMenuItemUI}. + */ + public BasicCheckBoxMenuItemUI() {} + /** * Constructs a new instance of {@code BasicCheckBoxMenuItemUI}. * diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java index 11b94fddab5..a1bd07282c1 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java @@ -60,6 +60,11 @@ public class BasicCheckBoxUI extends BasicRadioButtonUI { // Create PLAF // ******************************** + /** + * Constructs a {@code BasicCheckBoxUI}. + */ + public BasicCheckBoxUI() {} + /** * Returns an instance of {@code BasicCheckBoxUI}. * diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java index 7ad582a0792..2259281dd8c 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicColorChooserUI.java @@ -77,6 +77,11 @@ public class BasicColorChooserUI extends ColorChooserUI protected PropertyChangeListener propertyChangeListener; private Handler handler; + /** + * Constructs a {@code BasicColorChooserUI}. + */ + public BasicColorChooserUI() {} + /** * Returns a new instance of {@code BasicColorChooserUI}. * @@ -383,6 +388,11 @@ else if (prop == "componentOrientation") { * Instantiate it only within subclasses of {@code BasicColorChooserUI}. */ public class PropertyHandler implements PropertyChangeListener { + /** + * Constructs a {@code PropertyHandler}. + */ + public PropertyHandler() {} + public void propertyChange(PropertyChangeEvent e) { getHandler().propertyChange(e); } diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java index 157c1dde4f7..0e5eab8285b 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java @@ -176,5 +176,9 @@ public void setBorder(Border b) { @SuppressWarnings("serial") // Same-version serialization only public static class UIResource extends BasicComboBoxEditor implements javax.swing.plaf.UIResource { + /** + * Constructs a {@code UIResource}. + */ + public UIResource() {} } } diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java index 23899e72bc4..7b47386946c 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java @@ -145,5 +145,9 @@ public Component getListCellRendererComponent(JList<?> list, */ @SuppressWarnings("serial") // Same-version serialization only public static class UIResource extends BasicComboBoxRenderer implements javax.swing.plaf.UIResource { + /** + * Constructs a {@code UIResource}. + */ + public UIResource() {} } } diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java index 4041f9793cb..ff3a1596fbd 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java @@ -232,6 +232,11 @@ public class BasicComboBoxUI extends ComboBoxUI { */ protected Insets padding; + /** + * Constructs a {@code BasicComboBoxUI}. + */ + public BasicComboBoxUI() {} + // Used for calculating the default size. private static ListCellRenderer<Object> getDefaultListCellRenderer() { @SuppressWarnings("unchecked") @@ -592,6 +597,11 @@ private Handler getHandler() { * <code>BasicComboBoxUI</code>. */ public class KeyHandler extends KeyAdapter { + /** + * Constructs a {@code KeyHandler}. + */ + public KeyHandler() {} + @Override public void keyPressed( KeyEvent e ) { getHandler().keyPressed(e); @@ -607,6 +617,11 @@ public void keyPressed( KeyEvent e ) { * <code>BasicComboBoxUI</code>. */ public class FocusHandler implements FocusListener { + /** + * Constructs a {@code FocusHandler}. + */ + public FocusHandler() {} + public void focusGained( FocusEvent e ) { getHandler().focusGained(e); } @@ -627,6 +642,11 @@ public void focusLost( FocusEvent e ) { * @see #createListDataListener */ public class ListDataHandler implements ListDataListener { + /** + * Constructs a {@code ListDataHandler}. + */ + public ListDataHandler() {} + public void contentsChanged( ListDataEvent e ) { getHandler().contentsChanged(e); } @@ -651,6 +671,11 @@ public void intervalRemoved( ListDataEvent e ) { * @see #createItemListener */ public class ItemHandler implements ItemListener { + /** + * Constructs a {@code ItemHandler}. + */ + public ItemHandler() {} + // This class used to implement behavior which is now redundant. public void itemStateChanged(ItemEvent e) {} } @@ -670,6 +695,11 @@ public void itemStateChanged(ItemEvent e) {} * @see #createPropertyChangeListener */ public class PropertyChangeHandler implements PropertyChangeListener { + /** + * Constructs a {@code PropertyChangeHandler}. + */ + public PropertyChangeHandler() {} + public void propertyChange(PropertyChangeEvent e) { getHandler().propertyChange(e); } @@ -697,6 +727,11 @@ private void updateToolTipTextForChildren() { * <code>BasicComboBoxUI</code>. */ public class ComboBoxLayoutManager implements LayoutManager { + /** + * Constructs a {@code ComboBoxLayoutManager}. + */ + public ComboBoxLayoutManager() {} + public void addLayoutComponent(String name, Component comp) {} public void removeLayoutComponent(Component comp) {} diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java index ef779a7642e..050f27e72b4 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java @@ -733,6 +733,11 @@ public void actionPerformed(ActionEvent e){ * @see BasicComboPopup#createMouseListener */ protected class InvocationMouseHandler extends MouseAdapter { + /** + * Constructs an {@code InvocationMouseHandler}. + */ + protected InvocationMouseHandler() {} + /** * Responds to mouse-pressed events on the combo box. * @@ -758,6 +763,11 @@ public void mouseReleased( MouseEvent e ) { * list if it is dragging over the list. */ protected class InvocationMouseMotionHandler extends MouseMotionAdapter { + /** + * Constructs an {@code InvocationMouseMotionHandler}. + */ + protected InvocationMouseMotionHandler() {} + public void mouseDragged( MouseEvent e ) { getHandler().mouseDragged(e); } @@ -771,6 +781,10 @@ public void mouseDragged( MouseEvent e ) { * BasicComboBoxUI ActionMap/InputMap methods. */ public class InvocationKeyHandler extends KeyAdapter { + /** + * Constructs an {@code InvocationKeyHandler}. + */ + public InvocationKeyHandler() {} public void keyReleased( KeyEvent e ) {} } @@ -780,6 +794,10 @@ public void keyReleased( KeyEvent e ) {} * override. */ protected class ListSelectionHandler implements ListSelectionListener { + /** + * Constructs a {@code ListSelectionHandler}. + */ + protected ListSelectionHandler() {} public void valueChanged( ListSelectionEvent e ) {} } @@ -793,6 +811,10 @@ public void valueChanged( ListSelectionEvent e ) {} * @see #createItemListener */ public class ListDataHandler implements ListDataListener { + /** + * Constructs a {@code ListDataHandler}. + */ + public ListDataHandler() {} public void contentsChanged( ListDataEvent e ) {} public void intervalAdded( ListDataEvent e ) { @@ -806,6 +828,10 @@ public void intervalRemoved( ListDataEvent e ) { * This listener hides the popup when the mouse is released in the list. */ protected class ListMouseHandler extends MouseAdapter { + /** + * Constructs a {@code ListMouseHandler}. + */ + protected ListMouseHandler() {} public void mousePressed( MouseEvent e ) { } public void mouseReleased(MouseEvent anEvent) { @@ -818,6 +844,11 @@ public void mouseReleased(MouseEvent anEvent) { * The selection change is not committed to the model, this is for user feedback only. */ protected class ListMouseMotionHandler extends MouseMotionAdapter { + /** + * Constructs a {@code ListMouseMotionHandler}. + */ + protected ListMouseMotionHandler() {} + public void mouseMoved( MouseEvent anEvent ) { getHandler().mouseMoved(anEvent); } @@ -828,6 +859,10 @@ public void mouseMoved( MouseEvent anEvent ) { * combo box. */ protected class ItemHandler implements ItemListener { + /** + * Constructs an {@code ItemHandler}. + */ + protected ItemHandler() {} public void itemStateChanged( ItemEvent e ) { getHandler().itemStateChanged(e); } @@ -844,6 +879,10 @@ public void itemStateChanged( ItemEvent e ) { * @see #createPropertyChangeListener */ protected class PropertyChangeHandler implements PropertyChangeListener { + /** + * Constructs a {@code PropertyChangeHandler}. + */ + protected PropertyChangeHandler() {} public void propertyChange( PropertyChangeEvent e ) { getHandler().propertyChange(e); } diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java index 262f36ee7d8..681ec227ccc 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java @@ -243,6 +243,11 @@ public class MouseInputHandler extends MouseInputAdapter int __x, __y; Rectangle startingBounds; + /** + * Constructs a {@code MouseInputHandler}. + */ + public MouseInputHandler() {} + public void mouseReleased(MouseEvent e) { _x = 0; _y = 0; diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java index e784d2d4b2a..894e2b07d1a 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java @@ -678,6 +678,10 @@ public boolean accept(Object sender) { */ @SuppressWarnings("serial") // Superclass is not serializable across versions protected class OpenAction extends AbstractAction { + /** + * Constructs an {@code OpenAction}. + */ + protected OpenAction() {} public void actionPerformed(ActionEvent evt) { JDesktopPane dp = (JDesktopPane)evt.getSource(); SHARED_ACTION.setState(dp, Actions.RESTORE); @@ -693,6 +697,10 @@ public boolean isEnabled() { */ @SuppressWarnings("serial") // Superclass is not serializable across versions protected class CloseAction extends AbstractAction { + /** + * Constructs a {@code CloseAction}. + */ + protected CloseAction() {} public void actionPerformed(ActionEvent evt) { JDesktopPane dp = (JDesktopPane)evt.getSource(); SHARED_ACTION.setState(dp, Actions.CLOSE); @@ -712,6 +720,10 @@ public boolean isEnabled() { */ @SuppressWarnings("serial") // Superclass is not serializable across versions protected class MinimizeAction extends AbstractAction { + /** + * Constructs a {@code MinimizeAction}. + */ + protected MinimizeAction() {} public void actionPerformed(ActionEvent evt) { JDesktopPane dp = (JDesktopPane)evt.getSource(); SHARED_ACTION.setState(dp, Actions.MINIMIZE); @@ -731,6 +743,10 @@ public boolean isEnabled() { */ @SuppressWarnings("serial") // Superclass is not serializable across versions protected class MaximizeAction extends AbstractAction { + /** + * Constructs a {@code MaximizeAction}. + */ + protected MaximizeAction() {} public void actionPerformed(ActionEvent evt) { JDesktopPane dp = (JDesktopPane)evt.getSource(); SHARED_ACTION.setState(dp, Actions.MAXIMIZE); @@ -750,6 +766,10 @@ public boolean isEnabled() { */ @SuppressWarnings("serial") // Superclass is not serializable across versions protected class NavigateAction extends AbstractAction { + /** + * Constructs a {@code NavigateAction}. + */ + protected NavigateAction() {} public void actionPerformed(ActionEvent evt) { JDesktopPane dp = (JDesktopPane)evt.getSource(); dp.selectFrame(true); diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java index 8ed05e07861..18f94db3040 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java @@ -757,6 +757,12 @@ protected class SelectionListener implements ListSelectionListener { // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + + /** + * Constructs a {@code SelectionListener}. + */ + protected SelectionListener() {} + /** {@inheritDoc} */ public void valueChanged(ListSelectionEvent e) { getHandler().valueChanged(e); @@ -1325,6 +1331,11 @@ public String getDescription() { */ @SuppressWarnings("serial") // Superclass is not serializable across versions protected class CancelSelectionAction extends AbstractAction { + /** + * Constructs a {@code CancelSelectionAction}. + */ + protected CancelSelectionAction() {} + /** {@inheritDoc} */ public void actionPerformed(ActionEvent e) { getFileChooser().cancelSelection(); @@ -1336,6 +1347,11 @@ public void actionPerformed(ActionEvent e) { */ @SuppressWarnings("serial") // Superclass is not serializable across versions protected class UpdateAction extends AbstractAction { + /** + * Constructs an {@code UpdateAction}. + */ + protected UpdateAction() {} + /** {@inheritDoc} */ public void actionPerformed(ActionEvent e) { JFileChooser fc = getFileChooser(); diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java index 690a7001692..35560bf558c 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java @@ -34,6 +34,11 @@ * @since 1.4 */ public class BasicFormattedTextFieldUI extends BasicTextFieldUI { + /** + * Constructs a {@code BasicFormattedTextFieldUI}. + */ + public BasicFormattedTextFieldUI() {} + /** * Creates a UI for a JFormattedTextField. * diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java index 26c4b6f73fe..e7febd97f09 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java @@ -51,6 +51,11 @@ public class BasicGraphicsUtils private static final Insets GROOVE_INSETS = new Insets(2, 2, 2, 2); private static final Insets ETCHED_INSETS = new Insets(2, 2, 2, 2); + /** + * Constructs a {@code BasicGraphicsUtils}. + */ + public BasicGraphicsUtils() {} + /** * Draws an etched rectangle. * diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java index 85304d92e34..3e1108fb25b 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java @@ -46,6 +46,11 @@ */ public class BasicHTML { + /** + * Constructs a {@code BasicHTML}. + */ + public BasicHTML() {} + /** * Create an html renderer for the given component and * string of html. diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicIconFactory.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicIconFactory.java index b8c0465b329..8b38a29e1ed 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicIconFactory.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicIconFactory.java @@ -61,6 +61,11 @@ public class BasicIconFactory implements Serializable private static Icon menuItemArrowIcon; private static Icon menuArrowIcon; + /** + * Constructs a {@code BasicIconFactory}. + */ + public BasicIconFactory() {} + /** * Returns a menu item check icon. * diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java index 72b2d8be536..1a21268d74c 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java @@ -723,6 +723,11 @@ public void layoutContainer(Container c) { * Instantiate it only within subclasses of <code>Foo</code>. */ public class PropertyChangeHandler implements PropertyChangeListener { + /** + * Constructs a {@code PropertyChangeHandler}. + */ + public PropertyChangeHandler() {} + // NOTE: This class exists only for backward compatibility. All // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this @@ -741,6 +746,11 @@ public class TitlePaneLayout implements LayoutManager { // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code TitlePaneLayout}. + */ + public TitlePaneLayout() {} + public void addLayoutComponent(String name, Component c) { getHandler().addLayoutComponent(name, c); } @@ -930,6 +940,10 @@ public void actionPerformed(ActionEvent e) { */ @SuppressWarnings("deprecation") public class SystemMenuBar extends JMenuBar { + /** + * Constructs a {@code SystemMenuBar}. + */ + public SystemMenuBar() {} public boolean isFocusTraversable() { return false; } public void requestFocus() {} public void paint(Graphics g) { diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java index 86d6686e41a..603dd896fde 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java @@ -646,6 +646,10 @@ public class InternalFramePropertyChangeListener implements // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs an {@code InternalFramePropertyChangeListener}. + */ + public InternalFramePropertyChangeListener() {} /** * Detects changes in state from the JInternalFrame and handles * actions. @@ -663,6 +667,11 @@ public class InternalFrameLayout implements LayoutManager { // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs an {@code InternalFrameLayout}. + */ + public InternalFrameLayout() {} + /** * {@inheritDoc} */ @@ -842,6 +851,11 @@ protected class BorderListener extends MouseInputAdapter implements SwingConstan int resizeCornerSize = 16; + /** + * Constructs a {@code BorderListener}. + */ + protected BorderListener() {} + public void mouseClicked(MouseEvent e) { if(e.getClickCount() > 1 && e.getSource() == getNorthPane()) { if(frame.isIconifiable() && frame.isIcon()) { @@ -1305,6 +1319,11 @@ protected class ComponentHandler implements ComponentListener { // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code ComponentHandler}. + */ + protected ComponentHandler() {} + /** Invoked when a JInternalFrame's parent's size changes. */ public void componentResized(ComponentEvent e) { getHandler().componentResized(e); @@ -1347,6 +1366,11 @@ protected class GlassPaneDispatcher implements MouseInputListener { // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code GlassPaneDispatcher}. + */ + protected GlassPaneDispatcher() {} + /** * {@inheritDoc} */ @@ -1414,6 +1438,11 @@ protected class BasicInternalFrameListener implements InternalFrameListener // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code BasicInternalFrameListener}. + */ + protected BasicInternalFrameListener() {} + /** * {@inheritDoc} */ diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java index 3d036358e6d..be0487d3893 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java @@ -928,6 +928,11 @@ protected class MouseInputHandler implements MouseInputListener { // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code MouseInputHandler}. + */ + protected MouseInputHandler() {} + /** {@inheritDoc} */ public void mouseClicked(MouseEvent e) { getHandler().mouseClicked(e); diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java index ba60b557d82..33699871a18 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuUI.java @@ -370,6 +370,11 @@ protected class MouseInputHandler implements MouseInputListener { // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code MouseInputHandler}. + */ + protected MouseInputHandler() {} + public void mouseClicked(MouseEvent e) { getHandler().mouseClicked(e); } diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java index b63274d4836..afb2d58b885 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java @@ -1176,6 +1176,11 @@ public boolean getSupportsAbsolutePositioning() { * A listener to listen for model changes. */ protected class ModelListener implements ChangeListener { + /** + * Constructs a {@code ModelListener}. + */ + protected ModelListener() {} + public void stateChanged(ChangeEvent e) { if (!useCachedValue) { scrollBarValue = scrollbar.getValue(); @@ -1200,6 +1205,11 @@ protected class TrackListener protected transient int currentMouseY; private transient int direction = +1; + /** + * Constructs a {@code TrackListener}. + */ + protected TrackListener() {} + /** {@inheritDoc} */ public void mouseReleased(MouseEvent e) { @@ -1498,6 +1508,11 @@ protected class ArrowButtonListener extends MouseAdapter // (keyfocus on scrollbars causes action without mousePress boolean handledEvent; + /** + * Constructs an {@code ArrowButtonListener}. + */ + protected ArrowButtonListener() {} + public void mousePressed(MouseEvent e) { if(!scrollbar.isEnabled()) { return; } // not an unmodified left mouse button diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java index 7f80f4e51fa..f99afb35282 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java @@ -623,6 +623,11 @@ protected class MouseWheelHandler implements MouseWheelListener { // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code MouseWheelHandler}. + */ + protected MouseWheelHandler() {} + /** * Called when the mouse wheel is rotated while over a * JScrollPane. diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java index b8054b750fd..c5ce2a64f9c 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java @@ -552,6 +552,11 @@ protected void finishDraggingTo(int location) { protected class MouseHandler extends MouseAdapter implements MouseMotionListener { + /** + * Constructs a {@code MouseHandler}. + */ + protected MouseHandler() {} + /** * Starts the dragging session by creating the appropriate instance * of DragController. @@ -955,6 +960,11 @@ protected int positionForMouseEvent(MouseEvent e) { */ protected class DividerLayout implements LayoutManager { + /** + * Constructs a {@code DividerLayout}. + */ + protected DividerLayout() {} + public void layoutContainer(Container c) { if (leftButton != null && rightButton != null && c == BasicSplitPaneDivider.this) { diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java index 643c5419f74..24b2fa873f1 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java @@ -714,6 +714,11 @@ int getKeyboardMoveIncrement() { */ public class PropertyHandler implements PropertyChangeListener { + /** + * Constructs a {@code PropertyHandler}. + */ + public PropertyHandler() {} + // NOTE: This class exists only for backward compatibility. All // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this @@ -766,6 +771,11 @@ public void focusLost(FocusEvent ev) { */ public class KeyboardUpLeftHandler implements ActionListener { + /** + * Constructs a {@code KeyboardUpLeftHandler}. + */ + public KeyboardUpLeftHandler() {} + public void actionPerformed(ActionEvent ev) { if (dividerKeyboardResize) { splitPane.setDividerLocation(Math.max(0,getDividerLocation @@ -861,6 +871,11 @@ public void actionPerformed(ActionEvent ev) { */ public class KeyboardResizeToggleHandler implements ActionListener { + /** + * Constructs a {@code KeyboardResizeToggleHandler}. + */ + public KeyboardResizeToggleHandler() {} + public void actionPerformed(ActionEvent ev) { if (!dividerKeyboardResize) { splitPane.requestFocus(); diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java index a81e3f06a83..8446354fe14 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java @@ -210,6 +210,11 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants { // UI creation + /** + * Constructs a {@code BasicTabbedPaneUI}. + */ + public BasicTabbedPaneUI() {} + /** * Create a UI. * @param c a component @@ -2657,6 +2662,10 @@ else if (key == SCROLL_BACKWARD) { * Instantiate it only within subclasses of BasicTabbedPaneUI. */ public class TabbedPaneLayout implements LayoutManager { + /** + * Constructs a {@code TabbedPaneLayout}. + */ + public TabbedPaneLayout() {} public void addLayoutComponent(String name, Component comp) {} @@ -4195,6 +4204,11 @@ public void componentRemoved(ContainerEvent e) { * Instantiate it only within subclasses of BasicTabbedPaneUI. */ public class PropertyChangeHandler implements PropertyChangeListener { + /** + * Constructs a {@code PropertyChangeHandler}. + */ + public PropertyChangeHandler() {} + // NOTE: This class exists only for backward compatibility. All // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this @@ -4209,6 +4223,11 @@ public void propertyChange(PropertyChangeEvent e) { * Instantiate it only within subclasses of BasicTabbedPaneUI. */ public class TabSelectionHandler implements ChangeListener { + /** + * Constructs a {@code TabSelectionHandler}. + */ + public TabSelectionHandler() {} + // NOTE: This class exists only for backward compatibility. All // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this @@ -4223,6 +4242,11 @@ public void stateChanged(ChangeEvent e) { * Instantiate it only within subclasses of BasicTabbedPaneUI. */ public class MouseHandler extends MouseAdapter { + /** + * Constructs a {@code MouseHandler}. + */ + public MouseHandler() {} + // NOTE: This class exists only for backward compatibility. All // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this @@ -4241,6 +4265,11 @@ public class FocusHandler extends FocusAdapter { // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code FocusHandler}. + */ + public FocusHandler() {} + public void focusGained(FocusEvent e) { getHandler().focusGained(e); } diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableHeaderUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableHeaderUI.java index a02d25f293b..721fcbda9b7 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableHeaderUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableHeaderUI.java @@ -70,6 +70,11 @@ public class BasicTableHeaderUI extends TableHeaderUI { // The column that should be highlighted when the table header has the focus. private int selectedColumnIndex = 0; // Read ONLY via getSelectedColumnIndex! + /** + * Constructs a {@code BasicTableHeaderUI}. + */ + public BasicTableHeaderUI() {} + private static FocusListener focusListener = new FocusListener() { public void focusGained(FocusEvent e) { repaintHeader(e.getSource()); @@ -104,6 +109,11 @@ public class MouseInputHandler implements MouseInputListener { private int mouseXOffset; private Cursor otherCursor = resizeCursor; + /** + * Constructs a {@code MouseInputHandler}. + */ + public MouseInputHandler() {} + public void mouseClicked(MouseEvent e) { if (!header.isEnabled()) { return; diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java index d38de7e51c0..2ee4f1fa26d 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java @@ -96,6 +96,11 @@ public class BasicTableUI extends TableUI */ private boolean isFileList = false; + /** + * Constructs a {@code BasicTableUI}. + */ + public BasicTableUI() {} + // // Helper class for keyboard actions // @@ -760,6 +765,11 @@ public class KeyHandler implements KeyListener { // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code KeyHandler}. + */ + public KeyHandler() {} + public void keyPressed(KeyEvent e) { getHandler().keyPressed(e); } @@ -786,6 +796,11 @@ public class FocusHandler implements FocusListener { // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code FocusHandler}. + */ + public FocusHandler() {} + public void focusGained(FocusEvent e) { getHandler().focusGained(e); } @@ -808,6 +823,11 @@ public class MouseInputHandler implements MouseInputListener { // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code MouseInputHandler}. + */ + public MouseInputHandler() {} + public void mouseClicked(MouseEvent e) { getHandler().mouseClicked(e); } diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java index b52d365dd76..88decfc241a 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java @@ -1371,12 +1371,22 @@ public View create(Element elem, int p0, int p1) { /** * Default implementation of the interface {@code Caret}. */ - public static class BasicCaret extends DefaultCaret implements UIResource {} + public static class BasicCaret extends DefaultCaret implements UIResource { + /** + * Constructs a {@code BasicCaret}. + */ + public BasicCaret() {} + } /** * Default implementation of the interface {@code Highlighter}. */ - public static class BasicHighlighter extends DefaultHighlighter implements UIResource {} + public static class BasicHighlighter extends DefaultHighlighter implements UIResource { + /** + * Constructs a {@code BasicHighlighter}. + */ + public BasicHighlighter() {} + } static class BasicCursor extends Cursor implements UIResource { BasicCursor(int type) { diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java index 605a86ed088..bbe35ec526d 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java @@ -52,6 +52,11 @@ public class BasicToggleButtonUI extends BasicButtonUI { // Create PLAF // ******************************** + /** + * Constructs a {@code BasicToggleButtonUI}. + */ + public BasicToggleButtonUI() {} + /** * Returns an instance of {@code BasicToggleButtonUI}. * diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java index 4a5dd209df0..d26cec557aa 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java @@ -45,6 +45,11 @@ public class BasicToolBarSeparatorUI extends BasicSeparatorUI { + /** + * Constructs a {@code BasicToolBarSeparatorUI}. + */ + public BasicToolBarSeparatorUI() {} + /** * Returns a new instance of {@code BasicToolBarSeparatorUI}. * diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java index 3f5dad6dba9..480588eba2d 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java @@ -166,6 +166,11 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants private static String FOCUSED_COMP_INDEX = "JToolBar.focusedCompIndex"; + /** + * Constructs a {@code BasicToolBarUI}. + */ + public BasicToolBarUI() {} + /** * Constructs a new instance of {@code BasicToolBarUI}. * @@ -1408,6 +1413,11 @@ public void propertyChange(PropertyChangeEvent evt) { * The class listens for window events. */ protected class FrameListener extends WindowAdapter { + /** + * Constructs a {@code FrameListener}. + */ + protected FrameListener() {} + public void windowClosing(WindowEvent w) { if (toolBar.isFloatable()) { if (dragWindow != null) @@ -1450,6 +1460,11 @@ protected class ToolBarContListener implements ContainerListener { // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code ToolBarContListener}. + */ + protected ToolBarContListener() {} + public void componentAdded( ContainerEvent e ) { getHandler().componentAdded(e); } @@ -1468,6 +1483,11 @@ protected class ToolBarFocusListener implements FocusListener { // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code ToolBarFocusListener}. + */ + protected ToolBarFocusListener() {} + public void focusGained( FocusEvent e ) { getHandler().focusGained(e); } @@ -1485,6 +1505,11 @@ protected class PropertyListener implements PropertyChangeListener { // its functionality has been moved into Handler. If you need to add // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code PropertyListener}. + */ + protected PropertyListener() {} + public void propertyChange( PropertyChangeEvent e ) { getHandler().propertyChange(e); } diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java index 3ff0fa34bc2..6d1d85df643 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java @@ -2904,6 +2904,11 @@ public class TreeExpansionHandler implements TreeExpansionListener { // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code TreeExpansionHandler}. + */ + public TreeExpansionHandler() {} + /** * Called whenever an item in the tree has been expanded. */ @@ -2931,6 +2936,11 @@ public class ComponentHandler extends ComponentAdapter implements /** ScrollBar that is being adjusted. */ protected JScrollBar scrollBar; + /** + * Constructs a {@code ComponentHandler}. + */ + public ComponentHandler() {} + public void componentMoved(ComponentEvent e) { if(timer == null) { JScrollPane scrollPane = getScrollPane(); @@ -3008,6 +3018,11 @@ public class TreeModelHandler implements TreeModelListener { // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code TreeModelHandler}. + */ + public TreeModelHandler() {} + public void treeNodesChanged(TreeModelEvent e) { getHandler().treeNodesChanged(e); } @@ -3037,6 +3052,11 @@ public class TreeSelectionHandler implements TreeSelectionListener { // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code TreeSelectionHandler}. + */ + public TreeSelectionHandler() {} + /** * Messaged when the selection changes in the tree we're displaying * for. Stops editing, messages super and displays the changed paths. @@ -3058,6 +3078,11 @@ public class CellEditorHandler implements CellEditorListener { // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code CellEditorHandler}. + */ + public CellEditorHandler() {} + /** Messaged when editing has stopped in the tree. */ public void editingStopped(ChangeEvent e) { getHandler().editingStopped(e); @@ -3091,6 +3116,11 @@ public class KeyHandler extends KeyAdapter { /** Set to true while keyPressed is active. */ protected boolean isKeyDown; + /** + * Constructs a {@code KeyHandler}. + */ + public KeyHandler() {} + /** * Invoked when a key has been typed. * @@ -3123,6 +3153,11 @@ public class FocusHandler implements FocusListener { // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code FocusHandler}. + */ + public FocusHandler() {} + /** * Invoked when focus is activated on the tree we're in, redraws the * lead row. @@ -3149,6 +3184,11 @@ public void focusLost(FocusEvent e) { // This returns locations that don't include any Insets. public class NodeDimensionsHandler extends AbstractLayoutCache.NodeDimensions { + /** + * Constructs a {@code NodeDimensionsHandler}. + */ + public NodeDimensionsHandler() {} + /** * Responsible for getting the size of a particular node. */ @@ -3229,6 +3269,11 @@ public class MouseHandler extends MouseAdapter implements MouseMotionListener // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code MouseHandler}. + */ + public MouseHandler() {} + /** * Invoked when a mouse button has been pressed on a component. */ @@ -3267,6 +3312,11 @@ public class PropertyChangeHandler implements // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code PropertyChangeHandler}. + */ + public PropertyChangeHandler() {} + public void propertyChange(PropertyChangeEvent event) { getHandler().propertyChange(event); } @@ -3285,6 +3335,11 @@ public class SelectionModelPropertyChangeHandler implements // new functionality add it to the Handler, but make sure this // class calls into the Handler. + /** + * Constructs a {@code SelectionModelPropertyChangeHandler}. + */ + public SelectionModelPropertyChangeHandler() {} + public void propertyChange(PropertyChangeEvent event) { getHandler().propertyChange(event); } diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicViewportUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicViewportUI.java index 3620bdbcff8..6326d2ea957 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicViewportUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicViewportUI.java @@ -43,6 +43,11 @@ public class BasicViewportUI extends ViewportUI { // Shared UI object private static ViewportUI viewportUI; + /** + * Constructs a {@code BasicViewportUI}. + */ + public BasicViewportUI() {} + /** * Returns an instance of {@code BasicViewportUI}. * diff --git a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java index f4c418fa948..895379c1864 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java @@ -586,6 +586,10 @@ public SingleClickListener(JList<?> list) { @Deprecated(since = "9") @SuppressWarnings("serial") // Superclass is not serializable across versions protected class FileRenderer extends DefaultListCellRenderer { + /** + * Constructs a {@code FileRenderer}. + */ + protected FileRenderer() {} } public void uninstallUI(JComponent c) { diff --git a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalSliderUI.java b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalSliderUI.java index bd1d2e6b41b..d79bfee81b7 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalSliderUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalSliderUI.java @@ -180,6 +180,11 @@ protected PropertyChangeListener createPropertyChangeListener( JSlider slider ) * {@code PropertyListener} for {@code JSlider.isFilled}. */ protected class MetalPropertyListener extends BasicSliderUI.PropertyChangeHandler { + /** + * Constructs a {@code MetalPropertyListener}. + */ + protected MetalPropertyListener() {} + public void propertyChange( PropertyChangeEvent e ) { // listen for slider fill super.propertyChange( e ); diff --git a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java index 15c9fd8eb13..1f89cd88ec0 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java @@ -85,6 +85,11 @@ public class MetalToolBarUI extends BasicToolBarUI */ private JMenuBar lastMenuBar; + /** + * Constructs a {@code MetalToolBarUI}. + */ + public MetalToolBarUI() {} + /** * Registers the specified component. */ @@ -361,13 +366,23 @@ private void setLastMenuBar(JMenuBar lastMenuBar) { * No longer used. The class cannot be removed for compatibility reasons. */ protected class MetalContainerListener - extends BasicToolBarUI.ToolBarContListener {} + extends BasicToolBarUI.ToolBarContListener { + /** + * Constructs a {@code MetalContainerListener}. + */ + protected MetalContainerListener() {} + } /** * No longer used. The class cannot be removed for compatibility reasons. */ protected class MetalRolloverListener - extends BasicToolBarUI.PropertyListener {} + extends BasicToolBarUI.PropertyListener { + /** + * Constructs a {@code MetalRolloverListener}. + */ + protected MetalRolloverListener() {} + } /** * {@code DockingListener} for {@code MetalToolBarUI}. diff --git a/src/java.desktop/share/classes/javax/swing/plaf/synth/Region.java b/src/java.desktop/share/classes/javax/swing/plaf/synth/Region.java index ea6e264b51e..5a59f3bb98d 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/synth/Region.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/Region.java @@ -237,7 +237,7 @@ public class Region { public static final Region RADIO_BUTTON = new Region("RadioButton", false); /** - * RegionButtonMenuItem region. To bind a style to this <code>Region</code> + * RadioButtonMenuItem region. To bind a style to this <code>Region</code> * use the name <code>RadioButtonMenuItem</code>. */ public static final Region RADIO_BUTTON_MENU_ITEM = new Region("RadioButtonMenuItem", false); diff --git a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthDesktopPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthDesktopPaneUI.java index 0c643c9e494..ad87a90fb71 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthDesktopPaneUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthDesktopPaneUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -25,13 +25,34 @@ package javax.swing.plaf.synth; -import javax.swing.*; -import javax.swing.border.*; -import javax.swing.plaf.*; +import java.awt.Color; +import java.awt.Component; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Graphics; +import java.awt.Insets; +import java.awt.Rectangle; +import java.awt.event.ComponentEvent; +import java.awt.event.ComponentListener; +import java.awt.event.ContainerEvent; +import java.awt.event.ContainerListener; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.beans.PropertyVetoException; + +import javax.swing.DefaultDesktopManager; +import javax.swing.DesktopManager; +import javax.swing.JComponent; +import javax.swing.JDesktopPane; +import javax.swing.JInternalFrame; +import javax.swing.JLayeredPane; +import javax.swing.JPanel; +import javax.swing.UIManager; +import javax.swing.border.BevelBorder; +import javax.swing.plaf.ComponentUI; +import javax.swing.plaf.UIResource; import javax.swing.plaf.basic.BasicDesktopPaneUI; -import java.beans.*; -import java.awt.event.*; -import java.awt.*; /** * Provides the Synth L&F UI delegate for @@ -198,6 +219,9 @@ protected void uninstallDesktopManager() { super.uninstallDesktopManager(); } + /** + * The {@code TaskBar} installed by the UI. + */ @SuppressWarnings("serial") // Same-version serialization only and // internal anonymous classes static class TaskBar extends JPanel implements ComponentListener, ContainerListener { @@ -327,6 +351,9 @@ public void componentRemoved(ContainerEvent e) { } } + /** + * The default {@code DesktopManager} installed by the UI. + */ @SuppressWarnings("serial") // Same-version serialization only class SynthDesktopManager extends DefaultDesktopManager implements UIResource { diff --git a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthInternalFrameTitlePane.java b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthInternalFrameTitlePane.java index a7413a5577d..f6eab4a5a5b 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthInternalFrameTitlePane.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthInternalFrameTitlePane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -25,14 +25,33 @@ package javax.swing.plaf.synth; -import java.awt.*; -import java.awt.event.*; -import javax.swing.*; -import javax.swing.plaf.*; -import javax.swing.plaf.basic.BasicInternalFrameTitlePane; -import java.beans.PropertyChangeListener; +import java.awt.Component; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.Insets; +import java.awt.LayoutManager; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; import java.beans.PropertyVetoException; + +import javax.swing.Icon; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JInternalFrame; +import javax.swing.JMenuItem; +import javax.swing.JPopupMenu; +import javax.swing.JSeparator; +import javax.swing.SwingConstants; +import javax.swing.UIManager; +import javax.swing.plaf.UIResource; +import javax.swing.plaf.basic.BasicInternalFrameTitlePane; + import sun.swing.SwingUtilities2; /** @@ -157,6 +176,9 @@ protected void uninstallDefaults() { super.uninstallDefaults(); } + /** + * A subclass of {@code JPopupMenu} that implements {@code UIResource}. + */ @SuppressWarnings("serial") // Superclass is not serializable across versions private static class JPopupMenuUIResource extends JPopupMenu implements UIResource { } diff --git a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthListUI.java b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthListUI.java index 08d74b00ea9..6ae44c766a8 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthListUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthListUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -25,13 +25,19 @@ package javax.swing.plaf.synth; -import javax.swing.*; -import javax.swing.border.*; -import javax.swing.plaf.*; -import javax.swing.plaf.basic.*; -import java.awt.*; -import java.beans.PropertyChangeListener; +import java.awt.Color; +import java.awt.Component; +import java.awt.Graphics; import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; + +import javax.swing.DefaultListCellRenderer; +import javax.swing.JComponent; +import javax.swing.JList; +import javax.swing.border.Border; +import javax.swing.plaf.ComponentUI; +import javax.swing.plaf.UIResource; +import javax.swing.plaf.basic.BasicListUI; /** * Provides the Synth L&F UI delegate for @@ -198,6 +204,9 @@ private int getComponentState(JComponent c) { return SynthLookAndFeel.getComponentState(c); } + /** + * The {@code DefaultListCellRenderer} installed by the UI. + */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class SynthListCellRenderer extends DefaultListCellRenderer.UIResource { @Override public String getName() { diff --git a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthScrollPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthScrollPaneUI.java index 11c0e7f3847..96541d51f67 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthScrollPaneUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthScrollPaneUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -25,20 +25,27 @@ package javax.swing.plaf.synth; -import javax.swing.*; -import javax.swing.text.JTextComponent; -import javax.swing.border.*; -import javax.swing.plaf.*; -import javax.swing.plaf.basic.*; - -import java.beans.PropertyChangeListener; -import java.beans.PropertyChangeEvent; - -import java.awt.*; -import java.awt.event.ContainerListener; +import java.awt.Component; +import java.awt.Graphics; +import java.awt.Insets; +import java.awt.Rectangle; import java.awt.event.ContainerEvent; -import java.awt.event.FocusListener; +import java.awt.event.ContainerListener; import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; + +import javax.swing.JComponent; +import javax.swing.JScrollPane; +import javax.swing.JViewport; +import javax.swing.UIManager; +import javax.swing.border.AbstractBorder; +import javax.swing.border.Border; +import javax.swing.plaf.ComponentUI; +import javax.swing.plaf.UIResource; +import javax.swing.plaf.basic.BasicScrollPaneUI; +import javax.swing.text.JTextComponent; /** * Provides the Synth L&F UI delegate for @@ -230,7 +237,9 @@ public void propertyChange(PropertyChangeEvent e) { } } - + /** + * A subclass of {@code AbstractBorder} that implements {@code UIResource}. + */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class ViewportBorder extends AbstractBorder implements UIResource { private Insets insets; diff --git a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java index eefd3d7a0a3..953efdbe42d 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -25,15 +25,31 @@ package javax.swing.plaf.synth; -import javax.swing.*; -import javax.swing.plaf.*; -import javax.swing.plaf.basic.*; +import java.awt.Component; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Insets; +import java.awt.LayoutManager; +import java.awt.Rectangle; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; + +import javax.swing.BorderFactory; +import javax.swing.Icon; +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JTabbedPane; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import javax.swing.plaf.ComponentUI; +import javax.swing.plaf.UIResource; +import javax.swing.plaf.basic.BasicTabbedPaneUI; import javax.swing.text.View; -import java.awt.*; -import java.awt.event.*; -import java.beans.PropertyChangeListener; -import java.beans.PropertyChangeEvent; import sun.swing.SwingUtilities2; /** @@ -912,6 +928,10 @@ public void calculateLayoutInfo() { } } + /** + * A subclass of {@code SynthArrowButton} that implements + * {@code UIResource}. + */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class SynthScrollableTabButton extends SynthArrowButton implements UIResource { diff --git a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTableHeaderUI.java b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTableHeaderUI.java index 1518a2d193c..72d74223266 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTableHeaderUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTableHeaderUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -25,14 +25,23 @@ package javax.swing.plaf.synth; -import java.awt.*; -import java.beans.*; -import javax.swing.*; -import javax.swing.border.*; -import javax.swing.plaf.*; -import javax.swing.plaf.basic.*; -import javax.swing.table.*; -import sun.swing.table.*; +import java.awt.Component; +import java.awt.Graphics; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; + +import javax.swing.JComponent; +import javax.swing.JLabel; +import javax.swing.JTable; +import javax.swing.RowSorter; +import javax.swing.border.Border; +import javax.swing.plaf.ComponentUI; +import javax.swing.plaf.UIResource; +import javax.swing.plaf.basic.BasicTableHeaderUI; +import javax.swing.table.JTableHeader; +import javax.swing.table.TableCellRenderer; + +import sun.swing.table.DefaultTableCellHeaderRenderer; /** * Provides the Synth L&F UI delegate for @@ -217,6 +226,9 @@ public void propertyChange(PropertyChangeEvent evt) { } } + /** + * The {@code DefaultTableCellHeaderRenderer} installed by the UI. + */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class HeaderRenderer extends DefaultTableCellHeaderRenderer { HeaderRenderer() { diff --git a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTableUI.java b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTableUI.java index 036a391554f..8a863f41e00 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTableUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTableUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -37,6 +37,7 @@ import java.text.Format; import java.text.NumberFormat; import java.util.Date; + import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JCheckBox; @@ -45,7 +46,9 @@ import javax.swing.JTable; import javax.swing.LookAndFeel; import javax.swing.border.Border; -import javax.swing.plaf.*; +import javax.swing.plaf.ColorUIResource; +import javax.swing.plaf.ComponentUI; +import javax.swing.plaf.UIResource; import javax.swing.plaf.basic.BasicTableUI; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.JTableHeader; @@ -706,6 +709,9 @@ public void propertyChange(PropertyChangeEvent event) { } } + /** + * The renderer installed by the UI to render the boolean data. + */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class SynthBooleanTableCellRenderer extends JCheckBox implements TableCellRenderer { @@ -745,6 +751,9 @@ public boolean isOpaque() { } } + /** + * The {@code DefaultTableCellRenderer} installed by the UI. + */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class SynthTableCellRenderer extends DefaultTableCellRenderer { private Object numberFormat; diff --git a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTreeUI.java b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTreeUI.java index 13402a42905..d7cf0aa99f8 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTreeUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTreeUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -22,6 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package javax.swing.plaf.synth; import java.awt.Color; @@ -32,6 +33,7 @@ import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.Enumeration; + import javax.swing.DefaultCellEditor; import javax.swing.Icon; import javax.swing.JComponent; @@ -680,6 +682,10 @@ protected int getRowX(int row, int depth) { return super.getRowX(row, depth) + padding; } + /** + * A subclass of {@code DefaultTreeCellRenderer} that implements + * {@code UIResource}. + */ @SuppressWarnings("serial") // Superclass is not serializable across versions private class SynthTreeCellRenderer extends DefaultTreeCellRenderer implements UIResource { diff --git a/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java b/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java index 942d2cc30dc..7b80dd876f1 100644 --- a/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java +++ b/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -808,6 +808,11 @@ public AccessibleContext getAccessibleContext() { @SuppressWarnings("serial") // Same-version serialization only protected class AccessibleJTableHeader extends AccessibleJComponent { + /** + * Constructs an {@code AccessibleJTableHeader}. + */ + protected AccessibleJTableHeader() {} + /** * Get the role of this object. * diff --git a/src/java.desktop/share/classes/javax/swing/text/GapContent.java b/src/java.desktop/share/classes/javax/swing/text/GapContent.java index 282e08f78b2..a5673b52540 100644 --- a/src/java.desktop/share/classes/javax/swing/text/GapContent.java +++ b/src/java.desktop/share/classes/javax/swing/text/GapContent.java @@ -39,7 +39,7 @@ /** * An implementation of the AbstractDocument.Content interface * implemented using a gapped buffer similar to that used by emacs. - * The underlying storage is a array of unicode characters with + * The underlying storage is an array of Unicode characters with * a gap somewhere. The gap is moved to the location of changes * to take advantage of common behavior where most changes are * in the same location. Changes that occur at a gap boundary are @@ -49,8 +49,8 @@ * The positions tracking change are also generally cheap to * maintain. The Position implementations (marks) store the array * index and can easily calculate the sequential position from - * the current gap location. Changes only require update to the - * the marks between the old and new gap boundaries when the gap + * the current gap location. Changes only require updating the + * marks between the old and new gap boundaries when the gap * is moved, so generally updating the marks is pretty cheap. * The marks are stored sorted so they can be located quickly * with a binary search. This increases the cost of adding a @@ -320,7 +320,7 @@ public String toString() { /** * Record used for searching for the place to - * start updating mark indexs when the gap + * start updating mark indexes when the gap * boundaries are moved. */ private transient MarkData search; diff --git a/src/java.desktop/share/classes/javax/swing/text/GapVector.java b/src/java.desktop/share/classes/javax/swing/text/GapVector.java index 34d36abe70f..2b0a2f76ad9 100644 --- a/src/java.desktop/share/classes/javax/swing/text/GapVector.java +++ b/src/java.desktop/share/classes/javax/swing/text/GapVector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -22,11 +22,10 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package javax.swing.text; -import java.util.Vector; import java.io.Serializable; -import javax.swing.undo.UndoableEdit; /** * An implementation of a gapped buffer similar to that used by @@ -67,17 +66,24 @@ public GapVector(int initialLength) { /** * Allocate an array to store items of the type * appropriate (which is determined by the subclass). + * + * @param len the length of the array + * @return the java array of some type */ protected abstract Object allocateArray(int len); /** - * Get the length of the allocated array + * Get the length of the allocated array. + * + * @return the length of the array */ protected abstract int getArrayLength(); /** * Access to the array. The actual type * of the array is known only by the subclass. + * + * @return the java array of some type */ protected final Object getArray() { return array; @@ -85,6 +91,8 @@ protected final Object getArray() { /** * Access to the start of the gap. + * + * @return the start of the gap */ protected final int getGapStart() { return g0; @@ -92,6 +100,8 @@ protected final int getGapStart() { /** * Access to the end of the gap. + * + * @return the end of the gap */ protected final int getGapEnd() { return g1; @@ -128,6 +138,7 @@ protected final int getGapEnd() { * the location in the contiguous space being modeled. * @param rmSize the number of items to remove * @param addItems the new items to place in storage. + * @param addSize the number of items to add */ protected void replace(int position, int rmSize, Object addItems, int addSize) { int addOffset = 0; @@ -219,7 +230,9 @@ void resize(int nsize) { /** * Make the gap bigger, moving any necessary data and updating - * the appropriate marks + * the appropriate marks. + * + * @param newSize the new capacity */ protected void shiftEnd(int newSize) { int oldSize = getArrayLength(); @@ -251,6 +264,8 @@ int getNewArraySize(int reqSize) { * without changing the size of the gap. This * moves the data in the array and updates the * marks accordingly. + * + * @param newGapStart the new start of the gap */ protected void shiftGap(int newGapStart) { if (newGapStart == g0) { @@ -280,6 +295,8 @@ protected void shiftGap(int newGapStart) { * gap start down to the new gap start are squeezed * to the end of the gap (their location has been * removed). + * + * @param newGapStart the new start of the gap */ protected void shiftGapStartDown(int newGapStart) { g0 = newGapStart; @@ -292,6 +309,8 @@ protected void shiftGapStartDown(int newGapStart) { * gap end up to the new gap end are squeezed * to the end of the gap (their location has been * removed). + * + * @param newGapEnd the new end of the gap */ protected void shiftGapEndUp(int newGapEnd) { g1 = newGapEnd; diff --git a/src/java.desktop/share/classes/javax/swing/text/html/FormView.java b/src/java.desktop/share/classes/javax/swing/text/html/FormView.java index a7d85bf8122..467651a9d98 100644 --- a/src/java.desktop/share/classes/javax/swing/text/html/FormView.java +++ b/src/java.desktop/share/classes/javax/swing/text/html/FormView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -552,6 +552,11 @@ private void storePostData(HTMLDocument doc, String target, String data) { */ protected class MouseEventListener extends MouseAdapter { + /** + * Constructs a {@code MouseEventListener}. + */ + protected MouseEventListener() {} + public void mouseReleased(MouseEvent evt) { String imageData = getImageData(evt.getPoint()); imageSubmit(imageData); diff --git a/src/java.desktop/share/classes/javax/swing/tree/TreeModel.java b/src/java.desktop/share/classes/javax/swing/tree/TreeModel.java index febb23c6726..79baae9e89d 100644 --- a/src/java.desktop/share/classes/javax/swing/tree/TreeModel.java +++ b/src/java.desktop/share/classes/javax/swing/tree/TreeModel.java @@ -33,7 +33,7 @@ * <code>TreePath</code>s for identifying nodes in the <code>TreeModel</code>. * If a <code>TreeModel</code> returns the same object, as compared by * <code>equals</code>, at two different indices under the same parent - * than the resulting <code>TreePath</code> objects will be considered equal + * then the resulting <code>TreePath</code> objects will be considered equal * as well. Some implementations may assume that if two * <code>TreePath</code>s are equal, they identify the same node. If this * condition is not met, painting problems and other oddities may result. diff --git a/src/java.desktop/share/classes/sun/awt/AWTAccessor.java b/src/java.desktop/share/classes/sun/awt/AWTAccessor.java index b66740a85a9..8ae9b35850b 100644 --- a/src/java.desktop/share/classes/sun/awt/AWTAccessor.java +++ b/src/java.desktop/share/classes/sun/awt/AWTAccessor.java @@ -41,7 +41,7 @@ import java.awt.peer.ComponentPeer; import java.awt.peer.MenuComponentPeer; -import java.lang.invoke.MethodHandles;; +import java.lang.invoke.MethodHandles; import java.lang.reflect.InvocationTargetException; import java.security.AccessControlContext; diff --git a/src/java.desktop/share/classes/sun/font/Type1Font.java b/src/java.desktop/share/classes/sun/font/Type1Font.java index e4806761881..879e31a703d 100644 --- a/src/java.desktop/share/classes/sun/font/Type1Font.java +++ b/src/java.desktop/share/classes/sun/font/Type1Font.java @@ -34,7 +34,6 @@ import java.lang.ref.WeakReference; import java.nio.ByteBuffer; import java.nio.ByteOrder; -import java.nio.MappedByteBuffer; import java.nio.BufferUnderflowException; import java.nio.channels.ClosedChannelException; import java.nio.channels.FileChannel; @@ -98,7 +97,7 @@ public Object run() { } } - WeakReference<Object> bufferRef = new WeakReference<>(null); + WeakReference<ByteBuffer> bufferRef = new WeakReference<>(null); private String psName = null; @@ -185,8 +184,8 @@ public Type1Font(String platname, Object nativeNames, boolean createdCopy) } private synchronized ByteBuffer getBuffer() throws FontFormatException { - MappedByteBuffer mapBuf = (MappedByteBuffer)bufferRef.get(); - if (mapBuf == null) { + ByteBuffer bbuf = bufferRef.get(); + if (bbuf == null) { //System.out.println("open T1 " + platName); try { RandomAccessFile raf = (RandomAccessFile) @@ -202,9 +201,10 @@ public Object run() { }); FileChannel fc = raf.getChannel(); fileSize = (int)fc.size(); - mapBuf = fc.map(FileChannel.MapMode.READ_ONLY, 0, fileSize); - mapBuf.position(0); - bufferRef = new WeakReference<>(mapBuf); + bbuf = ByteBuffer.allocate(fileSize); + fc.read(bbuf); + bbuf.position(0); + bufferRef = new WeakReference<>(bbuf); fc.close(); } catch (NullPointerException e) { throw new FontFormatException(e.toString()); @@ -218,7 +218,7 @@ public Object run() { throw new FontFormatException(e.toString()); } } - return mapBuf; + return bbuf; } protected void close() { @@ -268,14 +268,14 @@ public Object run() { } public synchronized ByteBuffer readBlock(int offset, int length) { - ByteBuffer mappedBuf = null; + ByteBuffer bbuf = null; try { - mappedBuf = getBuffer(); + bbuf = getBuffer(); if (offset > fileSize) { offset = fileSize; } - mappedBuf.position(offset); - return mappedBuf.slice(); + bbuf.position(offset); + return bbuf.slice(); } catch (FontFormatException e) { return null; } diff --git a/src/java.desktop/share/classes/sun/java2d/pipe/DrawImage.java b/src/java.desktop/share/classes/sun/java2d/pipe/DrawImage.java index e49db4e91b9..7275a01ce06 100644 --- a/src/java.desktop/share/classes/sun/java2d/pipe/DrawImage.java +++ b/src/java.desktop/share/classes/sun/java2d/pipe/DrawImage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -28,6 +28,7 @@ import java.awt.AlphaComposite; import java.awt.Color; import java.awt.Image; +import java.awt.Rectangle; import java.awt.Transparency; import java.awt.geom.AffineTransform; import java.awt.geom.NoninvertibleTransformException; @@ -40,6 +41,7 @@ import java.awt.image.IndexColorModel; import java.awt.image.Raster; import java.awt.image.VolatileImage; + import sun.awt.SunHints; import sun.awt.image.ImageRepresentation; import sun.awt.image.SurfaceManager; @@ -49,11 +51,11 @@ import sun.java2d.SurfaceData; import sun.java2d.loops.Blit; import sun.java2d.loops.BlitBg; -import sun.java2d.loops.TransformHelper; -import sun.java2d.loops.MaskBlit; import sun.java2d.loops.CompositeType; +import sun.java2d.loops.MaskBlit; import sun.java2d.loops.ScaledBlit; import sun.java2d.loops.SurfaceType; +import sun.java2d.loops.TransformHelper; public class DrawImage implements DrawImagePipe { @@ -578,10 +580,7 @@ protected boolean renderImageCopy(SunGraphics2D sg, Image img, } try { - SurfaceType srcType = srcData.getSurfaceType(); - SurfaceType dstType = dstData.getSurfaceType(); - blitSurfaceData(sg, clip, - srcData, dstData, srcType, dstType, + blitSurfaceData(sg, clip, srcData, dstData, sx, sy, dx, dy, w, h, bgColor); return true; } catch (NullPointerException e) { @@ -924,35 +923,12 @@ else if (needTrans && cm.getTransparency() == Transparency.OPAQUE) { return dstCM; } - protected void blitSurfaceData(SunGraphics2D sg, - Region clipRegion, - SurfaceData srcData, - SurfaceData dstData, - SurfaceType srcType, - SurfaceType dstType, - int sx, int sy, int dx, int dy, - int w, int h, - Color bgColor) + private static void blitSurfaceData(SunGraphics2D sg, Region clip, + SurfaceData srcData, + SurfaceData dstData, + int sx, int sy, int dx, int dy, + int w, int h, Color bgColor) { - if (w <= 0 || h <= 0) { - /* - * Fix for bugid 4783274 - BlitBg throws an exception for - * a particular set of anomalous parameters. - * REMIND: The native loops do proper clipping and would - * detect this situation themselves, but the Java loops - * all seem to trust their parameters a little too well - * to the point where they will try to process a negative - * area of pixels and throw exceptions. The real fix is - * to modify the Java loops to do proper clipping so that - * they can deal with negative dimensions as well as - * improperly large dimensions, but that fix is too risky - * to integrate for Mantis at this point. In the meantime - * eliminating the negative or zero dimensions here is - * "correct" and saves them from some nasty exceptional - * conditions, one of which is the test case of 4783274. - */ - return; - } CompositeType comp = sg.imageComp; if (CompositeType.SrcOverNoEa.equals(comp) && (srcData.getTransparency() == Transparency.OPAQUE || @@ -967,14 +943,52 @@ protected void blitSurfaceData(SunGraphics2D sg, // it will be noop. return; } + // The next optimization should be used by all our pipelines but for now + // some of the native pipelines "ogl", "d3d", "gdi", "xrender" relies to + // much on the native driver, which does not apply it automatically. + // At some point, we should remove it from here, since it affects the + // performance of the software loops, and move to the appropriate place. + Rectangle dst = + new Rectangle(dx, dy, w, h).intersection(dstData.getBounds()); + if (dst.isEmpty()) { + // The check above also includes: + // if (w <= 0 || h <= 0) { + /* + * Fix for bugid 4783274 - BlitBg throws an exception for + * a particular set of anomalous parameters. + * REMIND: The native loops do proper clipping and would + * detect this situation themselves, but the Java loops + * all seem to trust their parameters a little too well + * to the point where they will try to process a negative + * area of pixels and throw exceptions. The real fix is + * to modify the Java loops to do proper clipping so that + * they can deal with negative dimensions as well as + * improperly large dimensions, but that fix is too risky + * to integrate for Mantis at this point. In the meantime + * eliminating the negative or zero dimensions here is + * "correct" and saves them from some nasty exceptional + * conditions, one of which is the test case of 4783274. + */ + // return; + // } + return; + } + // Adjust final src(x,y) based on the dst. The logic is that, when dst + // limits drawing on the destination, corresponding pixels from the src + // should be skipped. + sx += dst.x - dx; + sy += dst.y - dy; + + SurfaceType srcType = srcData.getSurfaceType(); + SurfaceType dstType = dstData.getSurfaceType(); if (!isBgOperation(srcData, bgColor)) { Blit blit = Blit.getFromCache(srcType, comp, dstType); - blit.Blit(srcData, dstData, sg.composite, clipRegion, - sx, sy, dx, dy, w, h); + blit.Blit(srcData, dstData, sg.composite, clip, + sx, sy, dst.x, dst.y, dst.width, dst.height); } else { BlitBg blit = BlitBg.getFromCache(srcType, comp, dstType); - blit.BlitBg(srcData, dstData, sg.composite, clipRegion, - bgColor.getRGB(), sx, sy, dx, dy, w, h); + blit.BlitBg(srcData, dstData, sg.composite, clip, bgColor.getRGB(), + sx, sy, dst.x, dst.y, dst.width, dst.height); } } diff --git a/src/java.management/share/classes/java/lang/management/ClassLoadingMXBean.java b/src/java.management/share/classes/java/lang/management/ClassLoadingMXBean.java index 30497cce51a..0525d552b7b 100644 --- a/src/java.management/share/classes/java/lang/management/ClassLoadingMXBean.java +++ b/src/java.management/share/classes/java/lang/management/ClassLoadingMXBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -105,9 +105,9 @@ public interface ClassLoadingMXBean extends PlatformManagedObject { * @param value {@code true} to enable the verbose output; * {@code false} to disable. * - * @exception java.lang.SecurityException if a security manager - * exists and the caller does not have - * ManagementPermission("control"). + * @throws java.lang.SecurityException if a security manager + * exists and the caller does not have + * ManagementPermission("control"). */ public void setVerbose(boolean value); diff --git a/src/java.management/share/classes/java/lang/management/ManagementFactory.java b/src/java.management/share/classes/java/lang/management/ManagementFactory.java index 0ef7c9dadca..a105ae79431 100644 --- a/src/java.management/share/classes/java/lang/management/ManagementFactory.java +++ b/src/java.management/share/classes/java/lang/management/ManagementFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -465,7 +465,7 @@ public static List<GarbageCollectorMXBean> getGarbageCollectorMXBeans() { * MXBeans are registered into the platform {@code MBeanServer} * at the first time this method is called. * - * @exception SecurityException if there is a security manager + * @throws SecurityException if there is a security manager * and the caller does not have the permission required by * {@link javax.management.MBeanServerFactory#createMBeanServer}. * diff --git a/src/java.management/share/classes/java/lang/management/MemoryMXBean.java b/src/java.management/share/classes/java/lang/management/MemoryMXBean.java index 81dbd3abd6e..716d2bcefca 100644 --- a/src/java.management/share/classes/java/lang/management/MemoryMXBean.java +++ b/src/java.management/share/classes/java/lang/management/MemoryMXBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -283,9 +283,9 @@ public interface MemoryMXBean extends PlatformManagedObject { * @param value {@code true} to enable verbose output; * {@code false} to disable. * - * @exception java.lang.SecurityException if a security manager - * exists and the caller does not have - * ManagementPermission("control"). + * @throws java.lang.SecurityException if a security manager + * exists and the caller does not have + * ManagementPermission("control"). */ public void setVerbose(boolean value); diff --git a/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java b/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java index b4c956946f5..6d0580c96de 100644 --- a/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java +++ b/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java @@ -46,9 +46,17 @@ import java.lang.reflect.InvocationTargetException; import java.security.AccessController; import java.security.PrivilegedAction; +import java.security.cert.Certificate; +import java.security.cert.X509Certificate; import java.util.Arrays; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; import javax.net.SocketFactory; import javax.net.ssl.SSLParameters; +import javax.net.ssl.HandshakeCompletedEvent; +import javax.net.ssl.HandshakeCompletedListener; +import javax.net.ssl.SSLPeerUnverifiedException; +import javax.security.sasl.SaslException; /** * A thread that creates a connection to an LDAP server. @@ -109,7 +117,7 @@ * @author Rosanna Lee * @author Jagane Sundar */ -public final class Connection implements Runnable { +public final class Connection implements Runnable, HandshakeCompletedListener { private static final boolean debug = false; private static final int dump = 0; // > 0 r, > 1 rw @@ -342,6 +350,7 @@ private Socket createSocket(String host, int port, String socketFactory, param.setEndpointIdentificationAlgorithm("LDAPS"); sslSocket.setSSLParameters(param); } + sslSocket.addHandshakeCompletedListener(this); if (connectTimeout > 0) { int socketTimeout = sslSocket.getSoTimeout(); sslSocket.setSoTimeout(connectTimeout); // reuse full timeout value @@ -637,6 +646,15 @@ void cleanup(Control[] reqCtls, boolean notifyParent) { ldr = ldr.next; } } + if (isTlsConnection()) { + if (closureReason != null) { + CommunicationException ce = new CommunicationException(); + ce.setRootCause(closureReason); + tlsHandshakeCompleted.completeExceptionally(ce); + } else { + tlsHandshakeCompleted.cancel(false); + } + } sock = null; } nparent = notifyParent; @@ -972,4 +990,46 @@ private static byte[] readFully(InputStream is, int length) } return buf; } + + private final CompletableFuture<X509Certificate> tlsHandshakeCompleted = + new CompletableFuture<>(); + + @Override + public void handshakeCompleted(HandshakeCompletedEvent event) { + try { + X509Certificate tlsServerCert = null; + Certificate[] certs; + if (event.getSocket().getUseClientMode()) { + certs = event.getPeerCertificates(); + } else { + certs = event.getLocalCertificates(); + } + if (certs != null && certs.length > 0 && + certs[0] instanceof X509Certificate) { + tlsServerCert = (X509Certificate) certs[0]; + } + tlsHandshakeCompleted.complete(tlsServerCert); + } catch (SSLPeerUnverifiedException ex) { + CommunicationException ce = new CommunicationException(); + ce.setRootCause(closureReason); + tlsHandshakeCompleted.completeExceptionally(ex); + } + } + + public boolean isTlsConnection() { + return sock instanceof SSLSocket; + } + + public X509Certificate getTlsServerCertificate() + throws SaslException { + try { + if (isTlsConnection()) + return tlsHandshakeCompleted.get(); + } catch (InterruptedException iex) { + throw new SaslException("TLS Handshake Exception ", iex); + } catch (ExecutionException eex) { + throw new SaslException("TLS Handshake Exception ", eex.getCause()); + } + return null; + } } diff --git a/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/LdapSasl.java b/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/LdapSasl.java index ee85dd7bf66..ce44770d359 100644 --- a/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/LdapSasl.java +++ b/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/LdapSasl.java @@ -26,6 +26,7 @@ package com.sun.jndi.ldap.sasl; import java.io.*; +import java.security.cert.X509Certificate; import java.util.Vector; import java.util.Hashtable; import java.util.StringTokenizer; @@ -41,6 +42,7 @@ import com.sun.jndi.ldap.Connection; import com.sun.jndi.ldap.LdapClient; import com.sun.jndi.ldap.LdapResult; +import com.sun.jndi.ldap.sasl.TlsChannelBinding.TlsChannelBindingType; /** * Handles SASL support. @@ -110,10 +112,38 @@ public static LdapResult saslBind(LdapClient clnt, Connection conn, String authzId = (env != null) ? (String)env.get(SASL_AUTHZ_ID) : null; String[] mechs = getSaslMechanismNames(authMech); + // Internal TLS Channel Binding property cannot be set explicitly + if (env.get(TlsChannelBinding.CHANNEL_BINDING) != null) { + throw new NamingException(TlsChannelBinding.CHANNEL_BINDING + + " property cannot be set explicitly"); + } + + Hashtable<String, Object> envProps = (Hashtable<String, Object>) env; + try { + // Prepare TLS Channel Binding data + if (conn.isTlsConnection()) { + TlsChannelBindingType cbType = + TlsChannelBinding.parseType( + (String)env.get(TlsChannelBinding.CHANNEL_BINDING_TYPE)); + if (cbType == TlsChannelBindingType.TLS_SERVER_END_POINT) { + // set tls-server-end-point channel binding + X509Certificate cert = conn.getTlsServerCertificate(); + if (cert != null) { + TlsChannelBinding tlsCB = + TlsChannelBinding.create(cert); + envProps = (Hashtable<String, Object>) env.clone(); + envProps.put(TlsChannelBinding.CHANNEL_BINDING, tlsCB.getData()); + } else { + throw new SaslException("No suitable certificate to generate " + + "TLS Channel Binding data"); + } + } + } + // Create SASL client to use using SASL package saslClnt = Sasl.createSaslClient( - mechs, authzId, "ldap", server, (Hashtable<String, ?>)env, cbh); + mechs, authzId, "ldap", server, envProps, cbh); if (saslClnt == null) { throw new AuthenticationNotSupportedException(authMech); diff --git a/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/TlsChannelBinding.java b/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/TlsChannelBinding.java new file mode 100644 index 00000000000..36f6c989822 --- /dev/null +++ b/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/TlsChannelBinding.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2020, Azul Systems, Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.sun.jndi.ldap.sasl; + +import javax.naming.NamingException; +import javax.security.sasl.SaslException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateEncodingException; +import java.security.cert.X509Certificate; +import java.util.Arrays; +import java.util.Hashtable; + +/** + * This class implements the Channel Binding for TLS as defined in + * <a href="https://www.ietf.org/rfc/rfc5929.txt"> + * Channel Bindings for TLS</a> + * + * Format of the Channel Binding data is also defined in + * <a href="https://www.ietf.org/rfc/rfc5056.txt"> + * On the Use of Channel Bindings to Secure Channels</a> + * section 2.1. + * + */ + +public class TlsChannelBinding { + + // TLS channel binding type property + public static final String CHANNEL_BINDING_TYPE = + "com.sun.jndi.ldap.tls.cbtype"; + + // internal TLS channel binding property + public static final String CHANNEL_BINDING = + "jdk.internal.sasl.tlschannelbinding"; + + public enum TlsChannelBindingType { + + /** + * Channel binding on the basis of TLS Finished message. + * TLS_UNIQUE is defined by RFC 5929 but is not supported + * by the current LDAP stack. + */ + TLS_UNIQUE("tls-unique"), + + /** + * Channel binding on the basis of TLS server certificate. + */ + TLS_SERVER_END_POINT("tls-server-end-point"); + + public String getName() { + return name; + } + + final private String name; + TlsChannelBindingType(String name) { + this.name = name; + } + } + + /** + * Parse value of "com.sun.jndi.ldap.tls.cbtype" property + * @param cbType + * @return TLS Channel Binding type or null if + * "com.sun.jndi.ldap.tls.cbtype" property has not been set. + * @throws NamingException + */ + public static TlsChannelBindingType parseType(String cbType) throws NamingException { + if (cbType != null) { + if (cbType.equals(TlsChannelBindingType.TLS_SERVER_END_POINT.getName())) { + return TlsChannelBindingType.TLS_SERVER_END_POINT; + } else { + throw new NamingException("Illegal value for " + + CHANNEL_BINDING_TYPE + " property."); + } + } + return null; + } + + final private TlsChannelBindingType cbType; + final private byte[] cbData; + + /** + * Construct tls-server-end-point Channel Binding data + * @param serverCertificate + * @throws SaslException + */ + public static TlsChannelBinding create(X509Certificate serverCertificate) throws SaslException { + try { + final byte[] prefix = + TlsChannelBindingType.TLS_SERVER_END_POINT.getName().concat(":").getBytes(); + String hashAlg = serverCertificate.getSigAlgName(). + replace("SHA", "SHA-").toUpperCase(); + int ind = hashAlg.indexOf("WITH"); + if (ind > 0) { + hashAlg = hashAlg.substring(0, ind); + if (hashAlg.equals("MD5") || hashAlg.equals("SHA-1")) { + hashAlg = "SHA-256"; + } + } else { + hashAlg = "SHA-256"; + } + MessageDigest md = MessageDigest.getInstance(hashAlg); + byte[] hash = md.digest(serverCertificate.getEncoded()); + byte[] cbData = Arrays.copyOf(prefix, prefix.length + hash.length ); + System.arraycopy(hash, 0, cbData, prefix.length, hash.length); + return new TlsChannelBinding(TlsChannelBindingType.TLS_SERVER_END_POINT, cbData); + } catch (NoSuchAlgorithmException | CertificateEncodingException e) { + throw new SaslException("Cannot create TLS channel binding data", e); + } + } + + private TlsChannelBinding(TlsChannelBindingType cbType, byte[] cbData) { + this.cbType = cbType; + this.cbData = cbData; + } + + public TlsChannelBindingType getType() { + return cbType; + } + + public byte[] getData() { + return cbData; + } +} diff --git a/src/java.naming/share/classes/javax/naming/CompositeName.java b/src/java.naming/share/classes/javax/naming/CompositeName.java index 4d4e6365908..99f5deb7c6a 100644 --- a/src/java.naming/share/classes/javax/naming/CompositeName.java +++ b/src/java.naming/share/classes/javax/naming/CompositeName.java @@ -231,7 +231,7 @@ protected CompositeName(Enumeration<String> comps) { * description. * * @param n The non-null string to parse. - * @exception InvalidNameException If n has invalid composite name syntax. + * @throws InvalidNameException If n has invalid composite name syntax. */ public CompositeName(String n) throws InvalidNameException { impl = new NameImpl(null, n); // null means use default syntax @@ -321,7 +321,7 @@ public int hashCode() { * * @return a negative integer, zero, or a positive integer as this Name * is less than, equal to, or greater than the given Object. - * @exception ClassCastException if obj is not a CompositeName. + * @throws ClassCastException if obj is not a CompositeName. */ public int compareTo(Object obj) { if (!(obj instanceof CompositeName)) { @@ -380,7 +380,7 @@ public Enumeration<String> getAll() { * @param posn The 0-based index of the component to retrieve. * Must be in the range [0,size()). * @return The non-null component at index posn. - * @exception ArrayIndexOutOfBoundsException if posn is outside the + * @throws ArrayIndexOutOfBoundsException if posn is outside the * specified range. */ public String get(int posn) { @@ -396,7 +396,7 @@ public String get(int posn) { * Must be in the range [0,size()]. * @return A composite name consisting of the components at indexes in * the range [0,posn). - * @exception ArrayIndexOutOfBoundsException + * @throws ArrayIndexOutOfBoundsException * If posn is outside the specified range. */ public Name getPrefix(int posn) { @@ -414,7 +414,7 @@ public Name getPrefix(int posn) { * @return A composite name consisting of the components at indexes in * the range [posn,size()). If posn is equal to * size(), an empty composite name is returned. - * @exception ArrayIndexOutOfBoundsException + * @throws ArrayIndexOutOfBoundsException * If posn is outside the specified range. */ public Name getSuffix(int posn) { @@ -465,7 +465,7 @@ public boolean endsWith(Name n) { * * @param suffix The non-null components to add. * @return The updated CompositeName, not a new one. Cannot be null. - * @exception InvalidNameException If suffix is not a composite name. + * @throws InvalidNameException If suffix is not a composite name. */ public Name addAll(Name suffix) throws InvalidNameException @@ -490,8 +490,8 @@ public Name addAll(Name suffix) * @param posn The index in this name at which to add the new * components. Must be in the range [0,size()]. * @return The updated CompositeName, not a new one. Cannot be null. - * @exception InvalidNameException If n is not a composite name. - * @exception ArrayIndexOutOfBoundsException + * @throws InvalidNameException If n is not a composite name. + * @throws ArrayIndexOutOfBoundsException * If posn is outside the specified range. */ public Name addAll(int posn, Name n) @@ -511,8 +511,8 @@ public Name addAll(int posn, Name n) * * @param comp The non-null component to add. * @return The updated CompositeName, not a new one. Cannot be null. - * @exception InvalidNameException If adding comp at end of the name - * would violate the name's syntax. + * @throws InvalidNameException If adding comp at end of the name + * would violate the name's syntax. */ public Name add(String comp) throws InvalidNameException { impl.add(comp); @@ -530,10 +530,10 @@ public Name add(String comp) throws InvalidNameException { * @param posn The index at which to add the new component. * Must be in the range [0,size()]. * @return The updated CompositeName, not a new one. Cannot be null. - * @exception ArrayIndexOutOfBoundsException + * @throws ArrayIndexOutOfBoundsException * If posn is outside the specified range. - * @exception InvalidNameException If adding comp at the specified position - * would violate the name's syntax. + * @throws InvalidNameException If adding comp at the specified position + * would violate the name's syntax. */ public Name add(int posn, String comp) throws InvalidNameException @@ -551,11 +551,11 @@ public Name add(int posn, String comp) * @param posn The index of the component to delete. * Must be in the range [0,size()). * @return The component removed (a String). - * @exception ArrayIndexOutOfBoundsException + * @throws ArrayIndexOutOfBoundsException * If posn is outside the specified range (includes case where * composite name is empty). - * @exception InvalidNameException If deleting the component - * would violate the name's syntax. + * @throws InvalidNameException If deleting the component + * would violate the name's syntax. */ public Object remove(int posn) throws InvalidNameException{ return impl.remove(posn); diff --git a/src/java.naming/share/classes/javax/naming/CompoundName.java b/src/java.naming/share/classes/javax/naming/CompoundName.java index 55ae838a646..1949db5f457 100644 --- a/src/java.naming/share/classes/javax/naming/CompoundName.java +++ b/src/java.naming/share/classes/javax/naming/CompoundName.java @@ -192,7 +192,7 @@ protected CompoundName(Enumeration<String> comps, Properties syntax) { * @param syntax A non-null list of properties that specify the syntax of * this compound name. See class description for * contents of properties. - * @exception InvalidNameException If 'n' violates the syntax specified + * @throws InvalidNameException If 'n' violates the syntax specified * by {@code syntax}. */ public CompoundName(String n, Properties syntax) throws InvalidNameException { @@ -304,7 +304,7 @@ public Object clone() { * @param obj The non-null object to compare against. * @return a negative integer, zero, or a positive integer as this Name * is less than, equal to, or greater than the given Object. - * @exception ClassCastException if obj is not a CompoundName. + * @throws ClassCastException if obj is not a CompoundName. * @see #equals(java.lang.Object) */ public int compareTo(Object obj) { @@ -352,7 +352,7 @@ public Enumeration<String> getAll() { * @param posn The 0-based index of the component to retrieve. * Must be in the range [0,size()). * @return The component at index posn. - * @exception ArrayIndexOutOfBoundsException if posn is outside the + * @throws ArrayIndexOutOfBoundsException if posn is outside the * specified range. */ public String get(int posn) { @@ -371,7 +371,7 @@ public String get(int posn) { * Must be in the range [0,size()]. * @return A compound name consisting of the components at indexes in * the range [0,posn). - * @exception ArrayIndexOutOfBoundsException + * @throws ArrayIndexOutOfBoundsException * If posn is outside the specified range. */ public Name getPrefix(int posn) { @@ -391,7 +391,7 @@ public Name getPrefix(int posn) { * @return A compound name consisting of the components at indexes in * the range [posn,size()). If posn is equal to * size(), an empty compound name is returned. - * @exception ArrayIndexOutOfBoundsException + * @throws ArrayIndexOutOfBoundsException * If posn is outside the specified range. */ public Name getSuffix(int posn) { @@ -449,9 +449,9 @@ public boolean endsWith(Name n) { * is not used or checked. They might be in the future. * @param suffix The non-null components to add. * @return The updated CompoundName, not a new one. Cannot be null. - * @exception InvalidNameException If suffix is not a compound name, - * or if the addition of the components violates the syntax - * of this compound name (e.g. exceeding number of components). + * @throws InvalidNameException If suffix is not a compound name, + * or if the addition of the components violates the syntax + * of this compound name (e.g. exceeding number of components). */ public Name addAll(Name suffix) throws InvalidNameException { if (suffix instanceof CompoundName) { @@ -477,11 +477,11 @@ public Name addAll(Name suffix) throws InvalidNameException { * @param posn The index in this name at which to add the new * components. Must be in the range [0,size()]. * @return The updated CompoundName, not a new one. Cannot be null. - * @exception ArrayIndexOutOfBoundsException + * @throws ArrayIndexOutOfBoundsException * If posn is outside the specified range. - * @exception InvalidNameException If n is not a compound name, - * or if the addition of the components violates the syntax - * of this compound name (e.g. exceeding number of components). + * @throws InvalidNameException If n is not a compound name, + * or if the addition of the components violates the syntax + * of this compound name (e.g. exceeding number of components). */ public Name addAll(int posn, Name n) throws InvalidNameException { if (n instanceof CompoundName) { @@ -498,8 +498,8 @@ public Name addAll(int posn, Name n) throws InvalidNameException { * * @param comp The non-null component to add. * @return The updated CompoundName, not a new one. Cannot be null. - * @exception InvalidNameException If adding comp at end of the name - * would violate the compound name's syntax. + * @throws InvalidNameException If adding comp at end of the name + * would violate the compound name's syntax. */ public Name add(String comp) throws InvalidNameException{ impl.add(comp); @@ -516,11 +516,11 @@ public Name add(String comp) throws InvalidNameException{ * @param comp The non-null component to add. * @param posn The index at which to add the new component. * Must be in the range [0,size()]. - * @exception ArrayIndexOutOfBoundsException + * @throws ArrayIndexOutOfBoundsException * If posn is outside the specified range. * @return The updated CompoundName, not a new one. Cannot be null. - * @exception InvalidNameException If adding comp at the specified position - * would violate the compound name's syntax. + * @throws InvalidNameException If adding comp at the specified position + * would violate the compound name's syntax. */ public Name add(int posn, String comp) throws InvalidNameException{ impl.add(posn, comp); @@ -536,11 +536,11 @@ public Name add(int posn, String comp) throws InvalidNameException{ * @param posn The index of the component to delete. * Must be in the range [0,size()). * @return The component removed (a String). - * @exception ArrayIndexOutOfBoundsException + * @throws ArrayIndexOutOfBoundsException * If posn is outside the specified range (includes case where * compound name is empty). - * @exception InvalidNameException If deleting the component - * would violate the compound name's syntax. + * @throws InvalidNameException If deleting the component + * would violate the compound name's syntax. */ public Object remove(int posn) throws InvalidNameException { return impl.remove(posn); diff --git a/src/java.naming/share/classes/javax/naming/InitialContext.java b/src/java.naming/share/classes/javax/naming/InitialContext.java index 0e2d35d9e53..b1e8576aaa4 100644 --- a/src/java.naming/share/classes/javax/naming/InitialContext.java +++ b/src/java.naming/share/classes/javax/naming/InitialContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -297,8 +297,8 @@ private static String getURLScheme(String str) { * and cache it in defaultInitCtx. * Set <code>gotDefault</code> so that we know we've tried this before. * @return The non-null cached initial context. - * @exception NoInitialContextException If cannot find an initial context. - * @exception NamingException If a naming exception was encountered. + * @throws NoInitialContextException If cannot find an initial context. + * @throws NamingException If a naming exception was encountered. */ protected Context getDefaultInitCtx() throws NamingException{ if (!gotDefault) { @@ -323,8 +323,8 @@ protected Context getDefaultInitCtx() throws NamingException{ * @param name The non-null name for which to get the context. * @return A URL context for <code>name</code> or the cached * initial context. The result cannot be null. - * @exception NoInitialContextException If cannot find an initial context. - * @exception NamingException In a naming exception is encountered. + * @throws NoInitialContextException If cannot find an initial context. + * @throws NamingException In a naming exception is encountered. * @see javax.naming.spi.NamingManager#getURLContext */ protected Context getURLOrDefaultInitCtx(String name) @@ -379,8 +379,8 @@ protected Context getURLOrDefaultInitCtx(String name) * @param name The non-null name for which to get the context. * @return A URL context for <code>name</code> or the cached * initial context. The result cannot be null. - * @exception NoInitialContextException If cannot find an initial context. - * @exception NamingException In a naming exception is encountered. + * @throws NoInitialContextException If cannot find an initial context. + * @throws NamingException In a naming exception is encountered. * * @see javax.naming.spi.NamingManager#getURLContext */ diff --git a/src/java.naming/share/classes/javax/naming/LinkRef.java b/src/java.naming/share/classes/javax/naming/LinkRef.java index 0f32b608965..0a4fee25016 100644 --- a/src/java.naming/share/classes/javax/naming/LinkRef.java +++ b/src/java.naming/share/classes/javax/naming/LinkRef.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -97,8 +97,8 @@ public LinkRef(String linkName) { * Retrieves the name of this link. * * @return The non-null name of this link. - * @exception MalformedLinkException If a link name could not be extracted - * @exception NamingException If a naming exception was encountered. + * @throws MalformedLinkException If a link name could not be extracted + * @throws NamingException If a naming exception was encountered. */ public String getLinkName() throws NamingException { if (className != null && className.equals(linkClassName)) { diff --git a/src/java.naming/share/classes/javax/naming/NameParser.java b/src/java.naming/share/classes/javax/naming/NameParser.java index c98eeac6ed2..c3823227fe7 100644 --- a/src/java.naming/share/classes/javax/naming/NameParser.java +++ b/src/java.naming/share/classes/javax/naming/NameParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -49,9 +49,9 @@ public interface NameParser { * @param name The non-null string name to parse. * @return A non-null parsed form of the name using the naming convention * of this parser. - * @exception InvalidNameException If name does not conform to + * @throws InvalidNameException If name does not conform to * syntax defined for the namespace. - * @exception NamingException If a naming exception was encountered. + * @throws NamingException If a naming exception was encountered. */ Name parse(String name) throws NamingException; } diff --git a/src/java.naming/share/classes/javax/naming/NamingEnumeration.java b/src/java.naming/share/classes/javax/naming/NamingEnumeration.java index b05260b2a1f..0ea48036d12 100644 --- a/src/java.naming/share/classes/javax/naming/NamingEnumeration.java +++ b/src/java.naming/share/classes/javax/naming/NamingEnumeration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -96,10 +96,10 @@ public interface NamingEnumeration<T> extends Enumeration<T> { * null is only valid for enumerations that can return * null (e.g. Attribute.getAll() returns an enumeration of * attribute values, and an attribute value can be null). - * @exception NamingException If a naming exception is encountered while attempting + * @throws NamingException If a naming exception is encountered while attempting * to retrieve the next element. See NamingException * and its subclasses for the possible naming exceptions. - * @exception java.util.NoSuchElementException If attempting to get the next element when none is available. + * @throws java.util.NoSuchElementException If attempting to get the next element when none is available. * @see java.util.Enumeration#nextElement */ public T next() throws NamingException; @@ -111,7 +111,7 @@ public interface NamingEnumeration<T> extends Enumeration<T> { * by the application. * * @return true if there is more in the enumeration ; false otherwise. - * @exception NamingException + * @throws NamingException * If a naming exception is encountered while attempting * to determine whether there is another element * in the enumeration. See NamingException @@ -139,7 +139,7 @@ public interface NamingEnumeration<T> extends Enumeration<T> { * Implementations are encouraged to use appropriate algorithms to * manage their resources when client omits the {@code close()} calls. * - * @exception NamingException If a naming exception is encountered + * @throws NamingException If a naming exception is encountered * while closing the enumeration. * @since 1.3 */ diff --git a/src/java.naming/share/classes/javax/naming/Reference.java b/src/java.naming/share/classes/javax/naming/Reference.java index f1bc1c8c0cc..cd473074eee 100644 --- a/src/java.naming/share/classes/javax/naming/Reference.java +++ b/src/java.naming/share/classes/javax/naming/Reference.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -237,7 +237,7 @@ public RefAddr get(String addrType) { * @param posn The index of the address to retrieve. * @return The address at the 0-based index posn. It must be in the * range [0,getAddressCount()). - * @exception ArrayIndexOutOfBoundsException If posn not in the specified + * @throws ArrayIndexOutOfBoundsException If posn not in the specified * range. */ public RefAddr get(int posn) { @@ -283,7 +283,7 @@ public void add(RefAddr addr) { * * @param posn The 0-based index of the list to insert addr. * @param addr The non-null address to add. - * @exception ArrayIndexOutOfBoundsException If posn not in the specified + * @throws ArrayIndexOutOfBoundsException If posn not in the specified * range. */ public void add(int posn, RefAddr addr) { @@ -297,7 +297,7 @@ public void add(int posn, RefAddr addr) { * * @param posn The 0-based index of in address to delete. * @return The address removed. - * @exception ArrayIndexOutOfBoundsException If posn not in the specified + * @throws ArrayIndexOutOfBoundsException If posn not in the specified * range. */ public Object remove(int posn) { diff --git a/src/java.naming/share/classes/javax/naming/Referenceable.java b/src/java.naming/share/classes/javax/naming/Referenceable.java index 1bb6d8176d4..424f135a981 100644 --- a/src/java.naming/share/classes/javax/naming/Referenceable.java +++ b/src/java.naming/share/classes/javax/naming/Referenceable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -51,7 +51,7 @@ public interface Referenceable { * Retrieves the Reference of this object. * * @return The non-null Reference of this object. - * @exception NamingException If a naming exception was encountered + * @throws NamingException If a naming exception was encountered * while retrieving the reference. */ Reference getReference() throws NamingException; diff --git a/src/java.naming/share/classes/javax/naming/ReferralException.java b/src/java.naming/share/classes/javax/naming/ReferralException.java index c19a8a4d0f2..eef2cca59b2 100644 --- a/src/java.naming/share/classes/javax/naming/ReferralException.java +++ b/src/java.naming/share/classes/javax/naming/ReferralException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -113,7 +113,7 @@ protected ReferralException() { * the method using the same arguments as the original invocation. * * @return The non-null context at which to continue the method. - * @exception NamingException If a naming exception was encountered. + * @throws NamingException If a naming exception was encountered. * Call either {@code retryReferral()} or {@code skipReferral()} * to continue processing referrals. */ @@ -142,7 +142,7 @@ protected ReferralException() { * referral context. If null, no environment properties will be used. * * @return The non-null context at which to continue the method. - * @exception NamingException If a naming exception was encountered. + * @throws NamingException If a naming exception was encountered. * Call either {@code retryReferral()} or {@code skipReferral()} * to continue processing referrals. */ diff --git a/src/java.naming/share/classes/javax/naming/event/EventContext.java b/src/java.naming/share/classes/javax/naming/event/EventContext.java index 8722b0fef7e..f95b6598950 100644 --- a/src/java.naming/share/classes/javax/naming/event/EventContext.java +++ b/src/java.naming/share/classes/javax/naming/event/EventContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -193,7 +193,7 @@ public interface EventContext extends Context { * @param scope One of {@code OBJECT_SCOPE}, {@code ONELEVEL_SCOPE}, or * {@code SUBTREE_SCOPE}. * @param l The nonnull listener. - * @exception NamingException If a problem was encountered while + * @throws NamingException If a problem was encountered while * adding the listener. * @see #removeNamingListener */ @@ -211,7 +211,7 @@ void addNamingListener(Name target, int scope, NamingListener l) * @param scope One of {@code OBJECT_SCOPE}, {@code ONELEVEL_SCOPE}, or * {@code SUBTREE_SCOPE}. * @param l The nonnull listener. - * @exception NamingException If a problem was encountered while + * @throws NamingException If a problem was encountered while * adding the listener. * @see #removeNamingListener */ @@ -231,7 +231,7 @@ void addNamingListener(String target, int scope, NamingListener l) * this {@code EventContext} instance, this method does not do anything. * * @param l The nonnull listener. - * @exception NamingException If a problem was encountered while + * @throws NamingException If a problem was encountered while * removing the listener. * @see #addNamingListener */ @@ -242,7 +242,7 @@ void addNamingListener(String target, int scope, NamingListener l) * that does not exist. * * @return true if the target must exist; false if the target need not exist. - * @exception NamingException If the context's behavior in this regard cannot + * @throws NamingException If the context's behavior in this regard cannot * be determined. */ boolean targetMustExist() throws NamingException; diff --git a/src/java.naming/share/classes/javax/naming/event/EventDirContext.java b/src/java.naming/share/classes/javax/naming/event/EventDirContext.java index 8be88144157..aecc55ce93e 100644 --- a/src/java.naming/share/classes/javax/naming/event/EventDirContext.java +++ b/src/java.naming/share/classes/javax/naming/event/EventDirContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -81,7 +81,7 @@ public interface EventDirContext extends EventContext, DirContext { * @param ctls The possibly null search controls. If null, the default * search controls are used. * @param l The nonnull listener. - * @exception NamingException If a problem was encountered while + * @throws NamingException If a problem was encountered while * adding the listener. * @see EventContext#removeNamingListener * @see javax.naming.directory.DirContext#search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls) @@ -101,7 +101,7 @@ void addNamingListener(Name target, String filter, SearchControls ctls, * @param ctls The possibly null search controls. If null, the default * search controls is used. * @param l The nonnull listener. - * @exception NamingException If a problem was encountered while + * @throws NamingException If a problem was encountered while * adding the listener. * @see EventContext#removeNamingListener * @see javax.naming.directory.DirContext#search(java.lang.String, java.lang.String, javax.naming.directory.SearchControls) @@ -128,7 +128,7 @@ void addNamingListener(String target, String filter, SearchControls ctls, * @param ctls The possibly null search controls. If null, the default * search controls are used. * @param l The nonnull listener. - * @exception NamingException If a problem was encountered while + * @throws NamingException If a problem was encountered while * adding the listener. * @see EventContext#removeNamingListener * @see javax.naming.directory.DirContext#search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) @@ -150,7 +150,7 @@ void addNamingListener(Name target, String filter, Object[] filterArgs, * @param ctls The possibly null search controls. If null, the default * search controls is used. * @param l The nonnull listener. - * @exception NamingException If a problem was encountered while + * @throws NamingException If a problem was encountered while * adding the listener. * @see EventContext#removeNamingListener * @see javax.naming.directory.DirContext#search(java.lang.String, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) */ diff --git a/src/java.naming/share/classes/javax/naming/ldap/ControlFactory.java b/src/java.naming/share/classes/javax/naming/ldap/ControlFactory.java index 49b63e6539f..7bbdf311afc 100644 --- a/src/java.naming/share/classes/javax/naming/ldap/ControlFactory.java +++ b/src/java.naming/share/classes/javax/naming/ldap/ControlFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -87,7 +87,7 @@ protected ControlFactory() { * @param ctl A non-null control. * * @return A possibly null Control. - * @exception NamingException If {@code ctl} contains invalid data that prevents it + * @throws NamingException If {@code ctl} contains invalid data that prevents it * from being used to create a control. A factory should only throw * an exception if it knows how to produce the control (identified by the OID) * but is unable to because of, for example invalid BER data. @@ -126,7 +126,7 @@ protected ControlFactory() { * @return A control object created using {@code ctl}; or * {@code ctl} if a control object cannot be created using * the algorithm described above. - * @exception NamingException if a naming exception was encountered + * @throws NamingException if a naming exception was encountered * while attempting to create the control object. * If one of the factories accessed throws an * exception, it is propagated up to the caller. diff --git a/src/java.naming/share/classes/javax/naming/ldap/ExtendedRequest.java b/src/java.naming/share/classes/javax/naming/ldap/ExtendedRequest.java index b37b65f1275..3a81a2f6998 100644 --- a/src/java.naming/share/classes/javax/naming/ldap/ExtendedRequest.java +++ b/src/java.naming/share/classes/javax/naming/ldap/ExtendedRequest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -106,7 +106,7 @@ public interface ExtendedRequest extends java.io.Serializable { * @return A possibly null byte array representing the ASN.1 BER encoded * contents of the LDAP {@code ExtendedRequest.requestValue} * component. - * @exception IllegalStateException If the encoded value cannot be retrieved + * @throws IllegalStateException If the encoded value cannot be retrieved * because the request contains insufficient or invalid data/state. */ public byte[] getEncodedValue(); @@ -137,7 +137,7 @@ public interface ExtendedRequest extends java.io.Serializable { * @param length The number of bytes in berValue to use. * * @return A non-null object. - * @exception NamingException if cannot create extended response + * @throws NamingException if cannot create extended response * due to an error. * @see ExtendedResponse */ diff --git a/src/java.naming/share/classes/javax/naming/ldap/LdapContext.java b/src/java.naming/share/classes/javax/naming/ldap/LdapContext.java index 413ef48974d..ec7a3938bb6 100644 --- a/src/java.naming/share/classes/javax/naming/ldap/LdapContext.java +++ b/src/java.naming/share/classes/javax/naming/ldap/LdapContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -208,7 +208,7 @@ public ExtendedResponse extendedOperation(ExtendedRequest request) * If null, the context is initialized with no request controls. * * @return A non-null {@code LdapContext} instance. - * @exception NamingException If an error occurred while creating + * @throws NamingException If an error occurred while creating * the new instance. * @see InitialLdapContext */ @@ -239,7 +239,7 @@ public LdapContext newInstance(Control[] requestControls) * in the class description for implementation details. * @param connCtls The possibly null controls to use. If null, no * controls are used. - * @exception NamingException If an error occurred while reconnecting. + * @throws NamingException If an error occurred while reconnecting. * @see #getConnectControls * @see #newInstance */ @@ -253,7 +253,7 @@ public LdapContext newInstance(Control[] requestControls) * * @return A possibly-null array of controls. null means no connect controls * have been set for this context. - * @exception NamingException If an error occurred while getting the request + * @throws NamingException If an error occurred while getting the request * controls. */ public Control[] getConnectControls() throws NamingException; @@ -279,7 +279,7 @@ public LdapContext newInstance(Control[] requestControls) * {@code getRequestControls()}. * @param requestControls The possibly null controls to use. If null, no * controls are used. - * @exception NamingException If an error occurred while setting the + * @throws NamingException If an error occurred while setting the * request controls. * @see #getRequestControls */ diff --git a/src/java.naming/share/classes/javax/naming/ldap/LdapReferralException.java b/src/java.naming/share/classes/javax/naming/ldap/LdapReferralException.java index 2ece32f1da1..95a1ca7df0e 100644 --- a/src/java.naming/share/classes/javax/naming/ldap/LdapReferralException.java +++ b/src/java.naming/share/classes/javax/naming/ldap/LdapReferralException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -85,7 +85,7 @@ protected LdapReferralException() { * See {@code ReferralException} for how to use this method. * * @return The non-null context at which to continue the method. - * @exception NamingException If a naming exception was encountered. + * @throws NamingException If a naming exception was encountered. * Call either {@code retryReferral()} or {@code skipReferral()} * to continue processing referrals. */ @@ -109,7 +109,7 @@ protected LdapReferralException() { * referral context. If null, no environment properties will be used. * * @return The non-null context at which to continue the method. - * @exception NamingException If a naming exception was encountered. + * @throws NamingException If a naming exception was encountered. * Call either {@code retryReferral()} or {@code skipReferral()} * to continue processing referrals. */ @@ -149,7 +149,7 @@ protected LdapReferralException() { * for the new context. If null, the context is initialized with no environment * properties. * @return The non-null context at which to continue the method. - * @exception NamingException If a naming exception was encountered. + * @throws NamingException If a naming exception was encountered. * Call either {@code retryReferral()} or {@code skipReferral()} * to continue processing referrals. */ diff --git a/src/java.naming/share/classes/javax/naming/ldap/PagedResultsControl.java b/src/java.naming/share/classes/javax/naming/ldap/PagedResultsControl.java index 26a4cfac35b..74e1558ef20 100644 --- a/src/java.naming/share/classes/javax/naming/ldap/PagedResultsControl.java +++ b/src/java.naming/share/classes/javax/naming/ldap/PagedResultsControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -132,7 +132,7 @@ final public class PagedResultsControl extends BasicControl { * pageSize or refuse to perform the search. * If false, then the server need not honor the * control. - * @exception IOException If an error was encountered while encoding the + * @throws IOException If an error was encountered while encoding the * supplied arguments into a control. */ public PagedResultsControl(int pageSize, boolean criticality) @@ -158,7 +158,7 @@ public PagedResultsControl(int pageSize, boolean criticality) * pageSize or refuse to perform the search. * If false, then the server need not honor the * control. - * @exception IOException If an error was encountered while encoding the + * @throws IOException If an error was encountered while encoding the * supplied arguments into a control. */ public PagedResultsControl(int pageSize, byte[] cookie, @@ -171,7 +171,7 @@ public PagedResultsControl(int pageSize, byte[] cookie, value = setEncodedValue(pageSize, cookie); } - /* + /** * Encodes the paged-results control's value using ASN.1 BER. * The result includes the BER tag and length for the control's value but * does not include the control's object identifier and criticality setting. @@ -180,7 +180,7 @@ public PagedResultsControl(int pageSize, byte[] cookie, * @param cookie A non-null server-generated cookie. * @return A possibly null byte array representing the ASN.1 BER encoded * value of the LDAP paged-results control. - * @exception IOException If a BER encoding error occurs. + * @throws IOException If a BER encoding error occurs. */ private byte[] setEncodedValue(int pageSize, byte[] cookie) throws IOException { diff --git a/src/java.naming/share/classes/javax/naming/ldap/PagedResultsResponseControl.java b/src/java.naming/share/classes/javax/naming/ldap/PagedResultsResponseControl.java index 8206aff48f2..e692a1f798e 100644 --- a/src/java.naming/share/classes/javax/naming/ldap/PagedResultsResponseControl.java +++ b/src/java.naming/share/classes/javax/naming/ldap/PagedResultsResponseControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -90,7 +90,7 @@ final public class PagedResultsResponseControl extends BasicControl { * @param value The control's ASN.1 BER encoded value. * It is not cloned - any changes to value * will affect the contents of the control. - * @exception IOException If an error was encountered while decoding + * @throws IOException If an error was encountered while decoding * the control's value. */ public PagedResultsResponseControl(String id, boolean criticality, diff --git a/src/java.naming/share/classes/javax/naming/ldap/Rdn.java b/src/java.naming/share/classes/javax/naming/ldap/Rdn.java index a9ca22859b3..a24bd14b683 100644 --- a/src/java.naming/share/classes/javax/naming/ldap/Rdn.java +++ b/src/java.naming/share/classes/javax/naming/ldap/Rdn.java @@ -315,7 +315,7 @@ public String toString() { * @param obj The non-null object to compare against. * @return A negative integer, zero, or a positive integer as this Rdn * is less than, equal to, or greater than the given Object. - * @exception ClassCastException if obj is null or not a Rdn. + * @throws ClassCastException if obj is null or not a Rdn. */ public int compareTo(Object obj) { if (!(obj instanceof Rdn)) { diff --git a/src/java.naming/share/classes/javax/naming/ldap/SortControl.java b/src/java.naming/share/classes/javax/naming/ldap/SortControl.java index aaeb7a17ad9..3f394d5003b 100644 --- a/src/java.naming/share/classes/javax/naming/ldap/SortControl.java +++ b/src/java.naming/share/classes/javax/naming/ldap/SortControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -127,8 +127,8 @@ final public class SortControl extends BasicControl { * requested or refuse to perform the search. * If false, then the server need not honor the * control. - * @exception IOException If an error was encountered while encoding the - * supplied arguments into a control. + * @throws IOException If an error was encountered while encoding the + * supplied arguments into a control. */ public SortControl(String sortBy, boolean criticality) throws IOException { @@ -149,8 +149,8 @@ public SortControl(String sortBy, boolean criticality) throws IOException { * requested or refuse to perform the search. * If false, then the server need not honor the * control. - * @exception IOException If an error was encountered while encoding the - * supplied arguments into a control. + * @throws IOException If an error was encountered while encoding the + * supplied arguments into a control. */ public SortControl(String[] sortBy, boolean criticality) throws IOException { @@ -175,8 +175,8 @@ public SortControl(String[] sortBy, boolean criticality) * requested or refuse to perform the search. * If false, then the server need not honor the * control. - * @exception IOException If an error was encountered while encoding the - * supplied arguments into a control. + * @throws IOException If an error was encountered while encoding the + * supplied arguments into a control. */ public SortControl(SortKey[] sortBy, boolean criticality) throws IOException { @@ -185,7 +185,7 @@ public SortControl(SortKey[] sortBy, boolean criticality) super.value = setEncodedValue(sortBy); } - /* + /** * Encodes the sort control's value using ASN.1 BER. * The result includes the BER tag and length for the control's value but * does not include the control's object identifier and criticality setting. @@ -193,7 +193,7 @@ public SortControl(SortKey[] sortBy, boolean criticality) * @param sortKeys A non-null list of keys to sort by. * @return A possibly null byte array representing the ASN.1 BER encoded * value of the sort control. - * @exception IOException If a BER encoding error occurs. + * @throws IOException If a BER encoding error occurs. */ private byte[] setEncodedValue(SortKey[] sortKeys) throws IOException { diff --git a/src/java.naming/share/classes/javax/naming/ldap/SortResponseControl.java b/src/java.naming/share/classes/javax/naming/ldap/SortResponseControl.java index 5cd264b01e8..c23cce7aa08 100644 --- a/src/java.naming/share/classes/javax/naming/ldap/SortResponseControl.java +++ b/src/java.naming/share/classes/javax/naming/ldap/SortResponseControl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -109,7 +109,7 @@ final public class SortResponseControl extends BasicControl { * @param value The control's ASN.1 BER encoded value. * It is not cloned - any changes to value * will affect the contents of the control. - * @exception IOException if an error is encountered + * @throws IOException if an error is encountered * while decoding the control's value. */ public SortResponseControl(String id, boolean criticality, byte[] value) diff --git a/src/java.naming/share/classes/javax/naming/ldap/StartTlsRequest.java b/src/java.naming/share/classes/javax/naming/ldap/StartTlsRequest.java index bbe3915dbae..37a7452a237 100644 --- a/src/java.naming/share/classes/javax/naming/ldap/StartTlsRequest.java +++ b/src/java.naming/share/classes/javax/naming/ldap/StartTlsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -165,7 +165,7 @@ public byte[] getEncodedValue() { * Its value is ignored because a Start TLS response * is not expected to contain any response value. * @return The StartTLS extended response object. - * @exception NamingException If a naming exception was encountered + * @throws NamingException If a naming exception was encountered * while creating the StartTLS extended response object. */ public ExtendedResponse createExtendedResponse(String id, byte[] berValue, diff --git a/src/java.naming/share/classes/javax/naming/spi/DirObjectFactory.java b/src/java.naming/share/classes/javax/naming/spi/DirObjectFactory.java index 41bdcf4fe15..8e41830a973 100644 --- a/src/java.naming/share/classes/javax/naming/spi/DirObjectFactory.java +++ b/src/java.naming/share/classes/javax/naming/spi/DirObjectFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -118,7 +118,7 @@ public interface DirObjectFactory extends ObjectFactory { * to get it, either using {@code obj}, or {@code name} and {@code nameCtx}. * The factory must not modify attrs. * @return The object created; null if an object cannot be created. - * @exception Exception If this object factory encountered an exception + * @throws Exception If this object factory encountered an exception * while attempting to create an object, and no other object factories are * to be tried. * diff --git a/src/java.naming/share/classes/javax/naming/spi/DirStateFactory.java b/src/java.naming/share/classes/javax/naming/spi/DirStateFactory.java index 3339d412764..c4bf94f05f9 100644 --- a/src/java.naming/share/classes/javax/naming/spi/DirStateFactory.java +++ b/src/java.naming/share/classes/javax/naming/spi/DirStateFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -133,7 +133,7 @@ public interface DirStateFactory extends StateFactory { * @return A {@code Result} containing the object's state for binding * and the corresponding * attributes to be bound; null if the object don't use this factory. - * @exception NamingException If this factory encountered an exception + * @throws NamingException If this factory encountered an exception * while attempting to get the object's state, and no other factories are * to be tried. * diff --git a/src/java.naming/share/classes/javax/naming/spi/DirectoryManager.java b/src/java.naming/share/classes/javax/naming/spi/DirectoryManager.java index 0cd2a4dd76c..d421970015f 100644 --- a/src/java.naming/share/classes/javax/naming/spi/DirectoryManager.java +++ b/src/java.naming/share/classes/javax/naming/spi/DirectoryManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -80,7 +80,7 @@ public class DirectoryManager extends NamingManager { * @param cpe * The non-null exception that triggered this continuation. * @return A non-null {@code DirContext} object for continuing the operation. - * @exception NamingException If a naming exception occurred. + * @throws NamingException If a naming exception occurred. * * @see NamingManager#getContinuationContext(CannotProceedException) */ @@ -136,10 +136,10 @@ public static DirContext getContinuationDirContext( * @return An object created using {@code refInfo} and {@code attrs}; or * {@code refInfo} if an object cannot be created by * a factory. - * @exception NamingException If a naming exception was encountered + * @throws NamingException If a naming exception was encountered * while attempting to get a URL context, or if one of the * factories accessed throws a NamingException. - * @exception Exception If one of the factories accessed throws an + * @throws Exception If one of the factories accessed throws an * exception, or if an error was encountered while loading * and instantiating the factory and object classes. * A factory should only throw an exception if it does not want @@ -289,7 +289,7 @@ private static Object createObjectFromFactories(Object obj, Name name, * the object and attributes to be bound. * If no state factory returns a non-null answer, the result will contain * the object ({@code obj}) itself with the original attributes. - * @exception NamingException If a naming exception was encountered + * @throws NamingException If a naming exception was encountered * while using the factories. * A factory should only throw an exception if it does not want * other factories to be used in an attempt to create an object. diff --git a/src/java.naming/share/classes/javax/naming/spi/InitialContextFactory.java b/src/java.naming/share/classes/javax/naming/spi/InitialContextFactory.java index 6786710c20a..192f81aa3ce 100644 --- a/src/java.naming/share/classes/javax/naming/spi/InitialContextFactory.java +++ b/src/java.naming/share/classes/javax/naming/spi/InitialContextFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -65,7 +65,7 @@ public interface InitialContextFactory { * of the initial context. * @return A non-null initial context object that implements the Context * interface. - * @exception NamingException If cannot create an initial context. + * @throws NamingException If cannot create an initial context. */ public Context getInitialContext(Hashtable<?,?> environment) throws NamingException; diff --git a/src/java.naming/share/classes/javax/naming/spi/InitialContextFactoryBuilder.java b/src/java.naming/share/classes/javax/naming/spi/InitialContextFactoryBuilder.java index 089b10c3477..ae7f3169978 100644 --- a/src/java.naming/share/classes/javax/naming/spi/InitialContextFactoryBuilder.java +++ b/src/java.naming/share/classes/javax/naming/spi/InitialContextFactoryBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -63,7 +63,7 @@ public interface InitialContextFactoryBuilder { * @param environment Environment used in creating an initial * context implementation. Can be null. * @return A non-null initial context factory. - * @exception NamingException If an initial context factory could not be created. + * @throws NamingException If an initial context factory could not be created. */ public InitialContextFactory createInitialContextFactory(Hashtable<?,?> environment) diff --git a/src/java.naming/share/classes/javax/naming/spi/NamingManager.java b/src/java.naming/share/classes/javax/naming/spi/NamingManager.java index ae886097957..9a6501b7a96 100644 --- a/src/java.naming/share/classes/javax/naming/spi/NamingManager.java +++ b/src/java.naming/share/classes/javax/naming/spi/NamingManager.java @@ -99,11 +99,11 @@ public class NamingManager { * * @param builder The factory builder to install. If null, no builder * is installed. - * @exception SecurityException builder cannot be installed - * for security reasons. - * @exception NamingException builder cannot be installed for + * @throws SecurityException builder cannot be installed + * for security reasons. + * @throws NamingException builder cannot be installed for * a non-security-related reason. - * @exception IllegalStateException If a factory has already been installed. + * @throws IllegalStateException If a factory has already been installed. * @see #getObjectInstance * @see ObjectFactory * @see ObjectFactoryBuilder @@ -280,10 +280,10 @@ private static String getURLScheme(String str) { * @return An object created using {@code refInfo}; or * {@code refInfo} if an object cannot be created using * the algorithm described above. - * @exception NamingException if a naming exception was encountered + * @throws NamingException if a naming exception was encountered * while attempting to get a URL context, or if one of the * factories accessed throws a NamingException. - * @exception Exception if one of the factories accessed throws an + * @throws Exception if one of the factories accessed throws an * exception, or if an error was encountered while loading * and instantiating the factory and object classes. * A factory should only throw an exception if it does not want @@ -547,8 +547,8 @@ static Resolver getResolver(Object obj, Name name, Context nameCtx, * scheme id {@code scheme}; * {@code null} if the factory for creating the * context is not found. - * @exception NamingException If a naming exception occurs while creating - * the context. + * @throws NamingException If a naming exception occurs while creating + * the context. * @see #getObjectInstance * @see ObjectFactory#getObjectInstance */ @@ -665,13 +665,13 @@ private static Object getURLObject(String scheme, Object urlInfo, * @param env The possibly null environment properties used when * creating the context. * @return A non-null initial context. - * @exception NoInitialContextException If the + * @throws NoInitialContextException If the * {@code Context.INITIAL_CONTEXT_FACTORY} property * is not found or names a nonexistent * class or a class that cannot be instantiated, * or if the initial context could not be created for some other * reason. - * @exception NamingException If some other naming exception was encountered. + * @throws NamingException If some other naming exception was encountered. * @see javax.naming.InitialContext * @see javax.naming.directory.InitialDirContext */ @@ -766,11 +766,11 @@ private static InitialContextFactory getFactory(String className) { * be replaced. * @param builder The initial context factory builder to install. If null, * no builder is set. - * @exception SecurityException builder cannot be installed for security - * reasons. - * @exception NamingException builder cannot be installed for + * @throws SecurityException builder cannot be installed for security + * reasons. + * @throws NamingException builder cannot be installed for * a non-security-related reason. - * @exception IllegalStateException If a builder was previous installed. + * @throws IllegalStateException If a builder was previous installed. * @see #hasInitialContextFactoryBuilder * @see java.lang.SecurityManager#checkSetFactory */ @@ -841,7 +841,7 @@ public static boolean hasInitialContextFactoryBuilder() { * @param cpe * The non-null exception that triggered this continuation. * @return A non-null Context object for continuing the operation. - * @exception NamingException If a naming exception occurred. + * @throws NamingException If a naming exception occurred. */ @SuppressWarnings("unchecked") public static Context getContinuationContext(CannotProceedException cpe) @@ -913,7 +913,7 @@ public static Context getContinuationContext(CannotProceedException cpe) * the object's state. * @return The non-null object representing {@code obj}'s state for * binding. It could be the object ({@code obj}) itself. - * @exception NamingException If one of the factories accessed throws an + * @throws NamingException If one of the factories accessed throws an * exception, or if an error was encountered while loading * and instantiating the factory and object classes. * A factory should only throw an exception if it does not want diff --git a/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java b/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java index e18e73096bc..10eacda70b0 100644 --- a/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java +++ b/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -163,7 +163,7 @@ public interface ObjectFactory { * @param environment The possibly null environment that is used in * creating the object. * @return The object created; null if an object cannot be created. - * @exception Exception if this object factory encountered an exception + * @throws Exception if this object factory encountered an exception * while attempting to create an object, and no other object factories are * to be tried. * diff --git a/src/java.naming/share/classes/javax/naming/spi/ObjectFactoryBuilder.java b/src/java.naming/share/classes/javax/naming/spi/ObjectFactoryBuilder.java index 8e8c6161c01..eb950e9ee47 100644 --- a/src/java.naming/share/classes/javax/naming/spi/ObjectFactoryBuilder.java +++ b/src/java.naming/share/classes/javax/naming/spi/ObjectFactoryBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -66,7 +66,7 @@ public interface ObjectFactoryBuilder { * @param environment Environment to use when creating the factory. * Can be null. * @return A non-null new instance of an ObjectFactory. - * @exception NamingException If an object factory cannot be created. + * @throws NamingException If an object factory cannot be created. * */ public ObjectFactory createObjectFactory(Object obj, diff --git a/src/java.naming/share/classes/javax/naming/spi/StateFactory.java b/src/java.naming/share/classes/javax/naming/spi/StateFactory.java index bf8273ecab7..b4f1be36a44 100644 --- a/src/java.naming/share/classes/javax/naming/spi/StateFactory.java +++ b/src/java.naming/share/classes/javax/naming/spi/StateFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -128,7 +128,7 @@ public interface StateFactory { * be used in the creation of the object's state. * @return The object's state for binding; * null if the factory is not returning any changes. - * @exception NamingException if this factory encountered an exception + * @throws NamingException if this factory encountered an exception * while attempting to get the object's state, and no other factories are * to be tried. * diff --git a/src/java.naming/share/classes/module-info.java b/src/java.naming/share/classes/module-info.java index f56a5dff438..4b89b55d3a3 100644 --- a/src/java.naming/share/classes/module-info.java +++ b/src/java.naming/share/classes/module-info.java @@ -59,6 +59,20 @@ * <br>If this property is not specified, the default is to wait * for the response until it is received. * </li> + * <li>{@code com.sun.jndi.ldap.tls.cbtype}: + * <br>The value of this property is the string representing the TLS + * Channel Binding type required for an LDAP connection over SSL/TLS. + * Possible value is : + * <ul> + * <li>"tls-server-end-point" - Channel Binding data is created on + * the basis of the TLS server certificate. + * </li> + * </ul> + * <br>"tls-unique" TLS Channel Binding type is specified in RFC-5929 + * but not supported. + * <br>If this property is not specified, the client does not send + * channel binding information to the server. + * </li> * </ul> * * @provides javax.naming.ldap.spi.LdapDnsProvider diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java b/src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java index f7e6117c7c0..554e35449b9 100644 --- a/src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java +++ b/src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java @@ -33,7 +33,6 @@ import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.util.Iterator; -import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; @@ -41,6 +40,7 @@ import java.util.concurrent.CompletableFuture; import java.util.ArrayList; import java.util.Objects; +import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.Flow; @@ -248,7 +248,7 @@ void markPrefaceSent() { //------------------------------------- final HttpConnection connection; private final Http2ClientImpl client2; - private final Map<Integer,Stream<?>> streams = new ConcurrentHashMap<>(); + private final ConcurrentMap<Integer,Stream<?>> streams = new ConcurrentHashMap<>(); private int nextstreamid; private int nextPushStream = 2; // actual stream ids are not allocated until the Headers frame is ready @@ -700,8 +700,7 @@ void shutdown(Throwable t) { Throwable initialCause = this.cause; if (initialCause == null) this.cause = t; client2.deleteConnection(this); - List<Stream<?>> c = new LinkedList<>(streams.values()); - for (Stream<?> s : c) { + for (Stream<?> s : streams.values()) { try { s.connectionClosing(t); } catch (Throwable e) { diff --git a/src/java.rmi/share/classes/java/rmi/activation/Activatable.java b/src/java.rmi/share/classes/java/rmi/activation/Activatable.java index 78c3f097727..175b469995a 100644 --- a/src/java.rmi/share/classes/java/rmi/activation/Activatable.java +++ b/src/java.rmi/share/classes/java/rmi/activation/Activatable.java @@ -94,11 +94,11 @@ public abstract class Activatable extends RemoteServer { * activated on demand. Specifying <code>restart</code> to be * <code>true</code> does not force an initial immediate activation of * a newly registered object; initial activation is lazy. - * @exception ActivationException if object registration fails. - * @exception RemoteException if either of the following fails: + * @throws ActivationException if object registration fails. + * @throws RemoteException if either of the following fails: * a) registering the object with the activation system or b) exporting * the object to the RMI runtime. - * @exception UnsupportedOperationException if and only if activation is + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation. * @since 1.2 **/ @@ -146,11 +146,11 @@ protected Activatable(String location, * @param csf the client-side socket factory for making calls to the * remote object * @param ssf the server-side socket factory for receiving remote calls - * @exception ActivationException if object registration fails. - * @exception RemoteException if either of the following fails: + * @throws ActivationException if object registration fails. + * @throws RemoteException if either of the following fails: * a) registering the object with the activation system or b) exporting * the object to the RMI runtime. - * @exception UnsupportedOperationException if and only if activation is + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation. * @since 1.2 **/ @@ -182,9 +182,9 @@ protected Activatable(String location, * * @param id activation identifier for the object * @param port the port number on which the object is exported - * @exception RemoteException if exporting the object to the RMI + * @throws RemoteException if exporting the object to the RMI * runtime fails - * @exception UnsupportedOperationException if and only if activation is + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 */ @@ -215,9 +215,9 @@ protected Activatable(ActivationID id, int port) * @param csf the client-side socket factory for making calls to the * remote object * @param ssf the server-side socket factory for receiving remote calls - * @exception RemoteException if exporting the object to the RMI + * @throws RemoteException if exporting the object to the RMI * runtime fails - * @exception UnsupportedOperationException if and only if activation is + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 */ @@ -248,11 +248,11 @@ protected ActivationID getID() { * * @param desc the object's descriptor * @return the stub for the activatable remote object - * @exception UnknownGroupException if group id in <code>desc</code> + * @throws UnknownGroupException if group id in <code>desc</code> * is not registered with the activation system - * @exception ActivationException if activation system is not running - * @exception RemoteException if remote call fails - * @exception UnsupportedOperationException if and only if activation is + * @throws ActivationException if activation system is not running + * @throws RemoteException if remote call fails + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 */ @@ -284,11 +284,11 @@ public static Remote register(ActivationDesc desc) * either already unexported or is currently exported and has no * pending/executing calls); false is returned if the object has * pending/executing calls in which case it cannot be deactivated - * @exception UnknownObjectException if object is not known (it may + * @throws UnknownObjectException if object is not known (it may * already be inactive) - * @exception ActivationException if group is not active - * @exception RemoteException if call informing monitor fails - * @exception UnsupportedOperationException if and only if activation is + * @throws ActivationException if group is not active + * @throws RemoteException if call informing monitor fails + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 */ @@ -304,10 +304,10 @@ public static boolean inactive(ActivationID id) * activated via that <code>id</code>. * * @param id the object's activation identifier - * @exception UnknownObjectException if object (<code>id</code>) is unknown - * @exception ActivationException if activation system is not running - * @exception RemoteException if remote call to activation system fails - * @exception UnsupportedOperationException if and only if activation is + * @throws UnknownObjectException if object (<code>id</code>) is unknown + * @throws ActivationException if activation system is not running + * @throws RemoteException if remote call to activation system fails + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 */ @@ -351,9 +351,9 @@ public static void unregister(ActivationID id) * @return the activation identifier obtained from registering the * descriptor, <code>desc</code>, with the activation system * the wrong group - * @exception ActivationException if activation group is not active - * @exception RemoteException if object registration or export fails - * @exception UnsupportedOperationException if and only if activation is + * @throws ActivationException if activation group is not active + * @throws RemoteException if object registration or export fails + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 **/ @@ -426,9 +426,9 @@ public static ActivationID exportObject(Remote obj, * @param ssf the server-side socket factory for receiving remote calls * @return the activation identifier obtained from registering the * descriptor with the activation system - * @exception ActivationException if activation group is not active - * @exception RemoteException if object registration or export fails - * @exception UnsupportedOperationException if and only if activation is + * @throws ActivationException if activation group is not active + * @throws RemoteException if object registration or export fails + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 **/ @@ -495,8 +495,8 @@ public static ActivationID exportObject(Remote obj, * @param id the object's activation identifier * @param port the port on which the object is exported (an anonymous * port is used if port=0) - * @exception RemoteException if object export fails - * @exception UnsupportedOperationException if and only if activation is + * @throws RemoteException if object export fails + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 */ @@ -527,8 +527,8 @@ public static Remote exportObject(Remote obj, * @param csf the client-side socket factory for making calls to the * remote object * @param ssf the server-side socket factory for receiving remote calls - * @exception RemoteException if object export fails - * @exception UnsupportedOperationException if and only if activation is + * @throws RemoteException if object export fails + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 */ @@ -556,9 +556,9 @@ public static Remote exportObject(Remote obj, * pending or in-progress calls; if false, only unexports the object * if there are no pending or in-progress calls * @return true if operation is successful, false otherwise - * @exception NoSuchObjectException if the remote object is not + * @throws NoSuchObjectException if the remote object is not * currently exported - * @exception UnsupportedOperationException if and only if activation is + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 */ diff --git a/src/java.rmi/share/classes/java/rmi/activation/ActivationDesc.java b/src/java.rmi/share/classes/java/rmi/activation/ActivationDesc.java index 31922cb17f9..d62f4af1fe8 100644 --- a/src/java.rmi/share/classes/java/rmi/activation/ActivationDesc.java +++ b/src/java.rmi/share/classes/java/rmi/activation/ActivationDesc.java @@ -109,8 +109,8 @@ public final class ActivationDesc implements Serializable { * loaded) * @param data the object's initialization (activation) data contained * in marshalled form. - * @exception ActivationException if the current group is nonexistent - * @exception UnsupportedOperationException if and only if activation is + * @throws ActivationException if the current group is nonexistent + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 */ @@ -148,8 +148,8 @@ public ActivationDesc(String className, * activated on demand. Specifying <code>restart</code> to be * <code>true</code> does not force an initial immediate activation of * a newly registered object; initial activation is lazy. - * @exception ActivationException if the current group is nonexistent - * @exception UnsupportedOperationException if and only if activation is + * @throws ActivationException if the current group is nonexistent + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 */ @@ -184,8 +184,8 @@ public ActivationDesc(String className, * loaded) * @param data the object's initialization (activation) data contained * in marshalled form. - * @exception IllegalArgumentException if <code>groupID</code> is null - * @exception UnsupportedOperationException if and only if activation is + * @throws IllegalArgumentException if <code>groupID</code> is null + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 */ @@ -218,8 +218,8 @@ public ActivationDesc(ActivationGroupID groupID, * activated on demand. Specifying <code>restart</code> to be * <code>true</code> does not force an initial immediate activation of * a newly registered object; initial activation is lazy. - * @exception IllegalArgumentException if <code>groupID</code> is null - * @exception UnsupportedOperationException if and only if activation is + * @throws IllegalArgumentException if <code>groupID</code> is null + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @since 1.2 */ diff --git a/src/java.rmi/share/classes/java/rmi/activation/ActivationGroup.java b/src/java.rmi/share/classes/java/rmi/activation/ActivationGroup.java index dc8e1aacf19..bcfe3e336ad 100644 --- a/src/java.rmi/share/classes/java/rmi/activation/ActivationGroup.java +++ b/src/java.rmi/share/classes/java/rmi/activation/ActivationGroup.java @@ -183,10 +183,10 @@ protected ActivationGroup(ActivationGroupID groupID) * @param id the object's activation identifier * @return true if the object was successfully deactivated; otherwise * returns false. - * @exception UnknownObjectException if object is unknown (may already + * @throws UnknownObjectException if object is unknown (may already * be inactive) - * @exception RemoteException if call informing monitor fails - * @exception ActivationException if group is inactive + * @throws RemoteException if call informing monitor fails + * @throws ActivationException if group is inactive * @since 1.2 */ public boolean inactiveObject(ActivationID id) @@ -207,9 +207,9 @@ public boolean inactiveObject(ActivationID id) * * @param id the object's identifier * @param obj the remote object implementation - * @exception UnknownObjectException if object is not registered - * @exception RemoteException if call informing monitor fails - * @exception ActivationException if group is inactive + * @throws UnknownObjectException if object is not registered + * @throws RemoteException if call informing monitor fails + * @throws ActivationException if group is inactive * @since 1.2 */ public abstract void activeObject(ActivationID id, Remote obj) @@ -269,13 +269,13 @@ public abstract void activeObject(ActivationID id, Remote obj) * @param incarnation the group's incarnation number (zero on group's * initial creation) * @return the activation group for the VM - * @exception ActivationException if group already exists or if error + * @throws ActivationException if group already exists or if error * occurs during group creation - * @exception SecurityException if permission to create group is denied. + * @throws SecurityException if permission to create group is denied. * (Note: The default implementation of the security manager * <code>checkSetFactory</code> * method requires the RuntimePermission "setFactory") - * @exception UnsupportedOperationException if and only if activation is + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @see SecurityManager#checkSetFactory * @since 1.2 @@ -355,7 +355,7 @@ ActivationGroup createGroup(ActivationGroupID id, /** * Returns the current activation group's identifier. Returns null * if no group is currently active for this VM. - * @exception UnsupportedOperationException if and only if activation is + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @return the activation group's identifier * @since 1.2 @@ -371,7 +371,7 @@ public static synchronized ActivationGroupID currentGroupID() { * so if a group has already become active and deactivated. * * @return the activation group identifier - * @exception ActivationException if error occurs during group + * @throws ActivationException if error occurs during group * creation, if security manager is not set, or if the group * has already been created and deactivated. */ @@ -401,12 +401,12 @@ static synchronized ActivationGroupID internalCurrentGroupID() * This could result in a SecurityException. * * @param system remote reference to the <code>ActivationSystem</code> - * @exception ActivationException if activation system is already set - * @exception SecurityException if permission to set the activation system is denied. + * @throws ActivationException if activation system is already set + * @throws SecurityException if permission to set the activation system is denied. * (Note: The default implementation of the security manager * <code>checkSetFactory</code> * method requires the RuntimePermission "setFactory") - * @exception UnsupportedOperationException if and only if activation is + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @see #getSystem * @see SecurityManager#checkSetFactory @@ -439,10 +439,10 @@ public static synchronized void setSystem(ActivationSystem system) * <code>java.rmi.activation.port</code>. * * @return the activation system for the VM/group - * @exception ActivationException if activation system cannot be + * @throws ActivationException if activation system cannot be * obtained or is not bound * (means that it is not running) - * @exception UnsupportedOperationException if and only if activation is + * @throws UnsupportedOperationException if and only if activation is * not supported by this implementation * @see #setSystem * @since 1.2 @@ -473,9 +473,9 @@ public static synchronized ActivationSystem getSystem() * * @param id the object's identifier * @param mobj a marshalled object containing the remote object's stub - * @exception UnknownObjectException if object is not registered - * @exception RemoteException if call informing monitor fails - * @exception ActivationException if an activation error occurs + * @throws UnknownObjectException if object is not registered + * @throws RemoteException if call informing monitor fails + * @throws ActivationException if an activation error occurs * @since 1.2 */ protected void activeObject(ActivationID id, @@ -492,8 +492,8 @@ protected void activeObject(ActivationID id, * <code>ActivationMonitor</code>. Also, the current group * for the VM is set to null. * - * @exception UnknownGroupException if group is not registered - * @exception RemoteException if call informing monitor fails + * @throws UnknownGroupException if group is not registered + * @throws RemoteException if call informing monitor fails * @since 1.2 */ protected void inactiveGroup() @@ -529,7 +529,7 @@ private static synchronized void destroyGroup() { /** * Returns the current group for the VM. - * @exception ActivationException if current group is null (not active) + * @throws ActivationException if current group is null (not active) */ static synchronized ActivationGroup currentGroup() throws ActivationException diff --git a/src/java.rmi/share/classes/java/rmi/activation/ActivationID.java b/src/java.rmi/share/classes/java/rmi/activation/ActivationID.java index 994d76f55fb..832c40fbbbf 100644 --- a/src/java.rmi/share/classes/java/rmi/activation/ActivationID.java +++ b/src/java.rmi/share/classes/java/rmi/activation/ActivationID.java @@ -125,9 +125,9 @@ public ActivationID(Activator activator) { * when activating the object (instead of returning a cached reference); * if false, returning a cached value is acceptable. * @return the reference to the active remote object - * @exception ActivationException if activation fails - * @exception UnknownObjectException if the object is unknown - * @exception RemoteException if remote call fails + * @throws ActivationException if activation fails + * @throws UnknownObjectException if the object is unknown + * @throws RemoteException if remote call fails * @since 1.2 */ public Remote activate(boolean force) diff --git a/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java b/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java index 33741cc0278..9c2c6f43538 100644 --- a/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java +++ b/src/java.rmi/share/classes/java/rmi/activation/ActivationInstantiator.java @@ -84,8 +84,8 @@ public interface ActivationInstantiator extends Remote { * @param desc the object's descriptor * @return a marshalled object containing the serialized * representation of remote object's stub - * @exception ActivationException if object activation fails - * @exception RemoteException if remote call fails + * @throws ActivationException if object activation fails + * @throws RemoteException if remote call fails * @since 1.2 */ public MarshalledObject<? extends Remote> newInstance(ActivationID id, diff --git a/src/java.rmi/share/classes/java/rmi/activation/ActivationMonitor.java b/src/java.rmi/share/classes/java/rmi/activation/ActivationMonitor.java index 4b00e3606d1..f9e8385a2ac 100644 --- a/src/java.rmi/share/classes/java/rmi/activation/ActivationMonitor.java +++ b/src/java.rmi/share/classes/java/rmi/activation/ActivationMonitor.java @@ -71,8 +71,8 @@ public interface ActivationMonitor extends Remote { * results in re-activating the remote object. * * @param id the object's activation identifier - * @exception UnknownObjectException if object is unknown - * @exception RemoteException if remote call fails + * @throws UnknownObjectException if object is unknown + * @throws RemoteException if remote call fails * @since 1.2 */ public void inactiveObject(ActivationID id) @@ -86,8 +86,8 @@ public void inactiveObject(ActivationID id) * * @param id the active object's id * @param obj the marshalled form of the object's stub - * @exception UnknownObjectException if object is unknown - * @exception RemoteException if remote call fails + * @throws UnknownObjectException if object is unknown + * @throws RemoteException if remote call fails * @since 1.2 */ public void activeObject(ActivationID id, @@ -102,8 +102,8 @@ public void activeObject(ActivationID id, * * @param id the group's id * @param incarnation the group's incarnation number - * @exception UnknownGroupException if group is unknown - * @exception RemoteException if remote call fails + * @throws UnknownGroupException if group is unknown + * @throws RemoteException if remote call fails * @since 1.2 */ public void inactiveGroup(ActivationGroupID id, diff --git a/src/java.rmi/share/classes/java/rmi/activation/ActivationSystem.java b/src/java.rmi/share/classes/java/rmi/activation/ActivationSystem.java index 96cf0c43ed1..2a7da67ab3c 100644 --- a/src/java.rmi/share/classes/java/rmi/activation/ActivationSystem.java +++ b/src/java.rmi/share/classes/java/rmi/activation/ActivationSystem.java @@ -70,11 +70,11 @@ public interface ActivationSystem extends Remote { * * @param desc the object's activation descriptor * @return the activation id that can be used to activate the object - * @exception ActivationException if registration fails (e.g., database + * @throws ActivationException if registration fails (e.g., database * update failure, etc). - * @exception UnknownGroupException if group referred to in + * @throws UnknownGroupException if group referred to in * <code>desc</code> is not registered with this system - * @exception RemoteException if remote call fails + * @throws RemoteException if remote call fails * @since 1.2 */ public ActivationID registerObject(ActivationDesc desc) @@ -86,10 +86,10 @@ public ActivationID registerObject(ActivationDesc desc) * can no longer be activated via the object's activation id. * * @param id the object's activation id (from previous registration) - * @exception ActivationException if unregister fails (e.g., database + * @throws ActivationException if unregister fails (e.g., database * update failure, etc). - * @exception UnknownObjectException if object is unknown (not registered) - * @exception RemoteException if remote call fails + * @throws UnknownObjectException if object is unknown (not registered) + * @throws RemoteException if remote call fails * @since 1.2 */ public void unregisterObject(ActivationID id) @@ -102,8 +102,8 @@ public void unregisterObject(ActivationID id) * * @param desc the group's descriptor * @return an identifier for the group - * @exception ActivationException if group registration fails - * @exception RemoteException if remote call fails + * @throws ActivationException if group registration fails + * @throws RemoteException if remote call fails * @since 1.2 */ public ActivationGroupID registerGroup(ActivationGroupDesc desc) @@ -120,12 +120,12 @@ public ActivationGroupID registerGroup(ActivationGroupDesc desc) * @param group the group's instantiator * @param incarnation the group's incarnation number * @return monitor for activation group - * @exception UnknownGroupException if group is not registered - * @exception ActivationException if a group for the specified + * @throws UnknownGroupException if group is not registered + * @throws ActivationException if a group for the specified * <code>id</code> is already active and that group is not equal * to the specified <code>group</code> or that group has a different * <code>incarnation</code> than the specified <code>group</code> - * @exception RemoteException if remote call fails + * @throws RemoteException if remote call fails * @since 1.2 */ public ActivationMonitor activeGroup(ActivationGroupID id, @@ -141,10 +141,10 @@ public ActivationMonitor activeGroup(ActivationGroupID id, * group and its associated objects is removed from the system. * * @param id the activation group's identifier - * @exception ActivationException if unregister fails (e.g., database + * @throws ActivationException if unregister fails (e.g., database * update failure, etc). - * @exception UnknownGroupException if group is not registered - * @exception RemoteException if remote call fails + * @throws UnknownGroupException if group is not registered + * @throws RemoteException if remote call fails * @since 1.2 */ public void unregisterGroup(ActivationGroupID id) @@ -153,7 +153,7 @@ public void unregisterGroup(ActivationGroupID id) /** * Shutdown the activation system. Destroys all groups spawned by * the activation daemon and exits the activation daemon. - * @exception RemoteException if failed to contact/shutdown the activation + * @throws RemoteException if failed to contact/shutdown the activation * daemon * @since 1.2 */ @@ -166,13 +166,13 @@ public void unregisterGroup(ActivationGroupID id) * * @param id the activation identifier for the activatable object * @param desc the activation descriptor for the activatable object - * @exception UnknownGroupException the group associated with + * @throws UnknownGroupException the group associated with * <code>desc</code> is not a registered group - * @exception UnknownObjectException the activation <code>id</code> + * @throws UnknownObjectException the activation <code>id</code> * is not registered - * @exception ActivationException for general failure (e.g., unable + * @throws ActivationException for general failure (e.g., unable * to update log) - * @exception RemoteException if remote call fails + * @throws RemoteException if remote call fails * @return the previous value of the activation descriptor * @see #getActivationDesc * @since 1.2 @@ -189,11 +189,11 @@ public ActivationDesc setActivationDesc(ActivationID id, * * @param id the activation group identifier for the activation group * @param desc the activation group descriptor for the activation group - * @exception UnknownGroupException the group associated with + * @throws UnknownGroupException the group associated with * <code>id</code> is not a registered group - * @exception ActivationException for general failure (e.g., unable + * @throws ActivationException for general failure (e.g., unable * to update log) - * @exception RemoteException if remote call fails + * @throws RemoteException if remote call fails * @return the previous value of the activation group descriptor * @see #getActivationGroupDesc * @since 1.2 @@ -207,9 +207,9 @@ public ActivationGroupDesc setActivationGroupDesc(ActivationGroupID id, * identifier, <code>id</code>. * * @param id the activation identifier for the activatable object - * @exception UnknownObjectException if <code>id</code> is not registered - * @exception ActivationException for general failure - * @exception RemoteException if remote call fails + * @throws UnknownObjectException if <code>id</code> is not registered + * @throws ActivationException for general failure + * @throws RemoteException if remote call fails * @return the activation descriptor * @see #setActivationDesc * @since 1.2 @@ -222,9 +222,9 @@ public ActivationDesc getActivationDesc(ActivationID id) * with the activation group identifier, <code>id</code>. * * @param id the activation group identifier for the group - * @exception UnknownGroupException if <code>id</code> is not registered - * @exception ActivationException for general failure - * @exception RemoteException if remote call fails + * @throws UnknownGroupException if <code>id</code> is not registered + * @throws ActivationException for general failure + * @throws RemoteException if remote call fails * @return the activation group descriptor * @see #setActivationGroupDesc * @since 1.2 diff --git a/src/java.rmi/share/classes/java/rmi/activation/Activator.java b/src/java.rmi/share/classes/java/rmi/activation/Activator.java index 78cd5ac839e..b80ee6fa7b0 100644 --- a/src/java.rmi/share/classes/java/rmi/activation/Activator.java +++ b/src/java.rmi/share/classes/java/rmi/activation/Activator.java @@ -107,9 +107,9 @@ public interface Activator extends Remote { * the remote object's reference; if false, returning the cached value * is allowed. * @return the remote object (a stub) in a marshalled form - * @exception ActivationException if object activation fails - * @exception UnknownObjectException if object is unknown (not registered) - * @exception RemoteException if remote call fails + * @throws ActivationException if object activation fails + * @throws UnknownObjectException if object is unknown (not registered) + * @throws RemoteException if remote call fails * @since 1.2 */ public MarshalledObject<? extends Remote> activate(ActivationID id, diff --git a/src/java.rmi/share/classes/java/rmi/registry/LocateRegistry.java b/src/java.rmi/share/classes/java/rmi/registry/LocateRegistry.java index e881556f939..79f1baf5e34 100644 --- a/src/java.rmi/share/classes/java/rmi/registry/LocateRegistry.java +++ b/src/java.rmi/share/classes/java/rmi/registry/LocateRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -66,7 +66,7 @@ private LocateRegistry() {} * the local host on the default registry port of 1099. * * @return reference (a stub) to the remote object registry - * @exception RemoteException if the reference could not be created + * @throws RemoteException if the reference could not be created * @since 1.1 */ public static Registry getRegistry() @@ -81,7 +81,7 @@ public static Registry getRegistry() * * @param port port on which the registry accepts requests * @return reference (a stub) to the remote object registry - * @exception RemoteException if the reference could not be created + * @throws RemoteException if the reference could not be created * @since 1.1 */ public static Registry getRegistry(int port) @@ -97,7 +97,7 @@ public static Registry getRegistry(int port) * * @param host host for the remote registry * @return reference (a stub) to the remote object registry - * @exception RemoteException if the reference could not be created + * @throws RemoteException if the reference could not be created * @since 1.1 */ public static Registry getRegistry(String host) @@ -114,7 +114,7 @@ public static Registry getRegistry(String host) * @param host host for the remote registry * @param port port on which the registry accepts requests * @return reference (a stub) to the remote object registry - * @exception RemoteException if the reference could not be created + * @throws RemoteException if the reference could not be created * @since 1.1 */ public static Registry getRegistry(String host, int port) @@ -138,7 +138,7 @@ public static Registry getRegistry(String host, int port) * is null, then the default client-side <code>Socket</code> * factory will be used in the registry stub. * @return reference (a stub) to the remote registry - * @exception RemoteException if the reference could not be created + * @throws RemoteException if the reference could not be created * @since 1.2 */ public static Registry getRegistry(String host, int port, @@ -196,7 +196,7 @@ public static Registry getRegistry(String host, int port, * * @param port the port on which the registry accepts requests * @return the registry - * @exception RemoteException if the registry could not be exported + * @throws RemoteException if the registry could not be exported * @since 1.1 **/ public static Registry createRegistry(int port) throws RemoteException { @@ -228,7 +228,7 @@ public static Registry createRegistry(int port) throws RemoteException { * @param ssf server-side <code>ServerSocket</code> factory * used to accept connections to the registry * @return the registry - * @exception RemoteException if the registry could not be exported + * @throws RemoteException if the registry could not be exported * @since 1.2 **/ public static Registry createRegistry(int port, diff --git a/src/java.rmi/share/classes/java/rmi/server/LoaderHandler.java b/src/java.rmi/share/classes/java/rmi/server/LoaderHandler.java index e15a68de8b9..1955583741b 100644 --- a/src/java.rmi/share/classes/java/rmi/server/LoaderHandler.java +++ b/src/java.rmi/share/classes/java/rmi/server/LoaderHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -50,12 +50,12 @@ public interface LoaderHandler { * * @param name the name of the class to load * @return the <code>Class</code> object representing the loaded class - * @exception MalformedURLException - * if the system property <b>java.rmi.server.codebase</b> - * contains an invalid URL - * @exception ClassNotFoundException - * if a definition for the class could not - * be found at the codebase location. + * @throws MalformedURLException + * if the system property <b>java.rmi.server.codebase</b> + * contains an invalid URL + * @throws ClassNotFoundException + * if a definition for the class could not + * be found at the codebase location. * @since 1.1 * @deprecated no replacement */ @@ -69,12 +69,12 @@ Class<?> loadClass(String name) * @param codebase the URL from which to load the class * @param name the name of the class to load * @return the <code>Class</code> object representing the loaded class - * @exception MalformedURLException - * if the <code>codebase</code> paramater - * contains an invalid URL - * @exception ClassNotFoundException - * if a definition for the class could not - * be found at the specified URL + * @throws MalformedURLException + * if the <code>codebase</code> paramater + * contains an invalid URL + * @throws ClassNotFoundException + * if a definition for the class could not + * be found at the specified URL * @since 1.1 * @deprecated no replacement */ diff --git a/src/java.rmi/share/classes/java/rmi/server/RMIClientSocketFactory.java b/src/java.rmi/share/classes/java/rmi/server/RMIClientSocketFactory.java index d4e2131565b..4616fad9eac 100644 --- a/src/java.rmi/share/classes/java/rmi/server/RMIClientSocketFactory.java +++ b/src/java.rmi/share/classes/java/rmi/server/RMIClientSocketFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -66,7 +66,7 @@ public interface RMIClientSocketFactory { * @param host the host name * @param port the port number * @return a socket connected to the specified host and port. - * @exception IOException if an I/O error occurs during socket creation + * @throws IOException if an I/O error occurs during socket creation * @since 1.2 */ public Socket createSocket(String host, int port) diff --git a/src/java.rmi/share/classes/java/rmi/server/RMIServerSocketFactory.java b/src/java.rmi/share/classes/java/rmi/server/RMIServerSocketFactory.java index daea1e1dbeb..9cadf5501fb 100644 --- a/src/java.rmi/share/classes/java/rmi/server/RMIServerSocketFactory.java +++ b/src/java.rmi/share/classes/java/rmi/server/RMIServerSocketFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -65,7 +65,7 @@ public interface RMIServerSocketFactory { * an anonymous port). * @param port the port number * @return the server socket on the specified port - * @exception IOException if an I/O error occurs during server socket + * @throws IOException if an I/O error occurs during server socket * creation * @since 1.2 */ diff --git a/src/java.rmi/share/classes/java/rmi/server/RMISocketFactory.java b/src/java.rmi/share/classes/java/rmi/server/RMISocketFactory.java index 876d0a80954..98b1d322ccd 100644 --- a/src/java.rmi/share/classes/java/rmi/server/RMISocketFactory.java +++ b/src/java.rmi/share/classes/java/rmi/server/RMISocketFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -98,7 +98,7 @@ public RMISocketFactory() { * @param host the host name * @param port the port number * @return a socket connected to the specified host and port. - * @exception IOException if an I/O error occurs during socket creation + * @throws IOException if an I/O error occurs during socket creation * @since 1.1 */ public abstract Socket createSocket(String host, int port) @@ -109,7 +109,7 @@ public abstract Socket createSocket(String host, int port) * an anonymous port). * @param port the port number * @return the server socket on the specified port - * @exception IOException if an I/O error occurs during server socket + * @throws IOException if an I/O error occurs during server socket * creation * @since 1.1 */ @@ -124,9 +124,9 @@ public abstract ServerSocket createServerSocket(int port) * setting a socket factory; if disallowed, a SecurityException will be * thrown. * @param fac the socket factory - * @exception IOException if the RMI socket factory is already set - * @exception SecurityException if a security manager exists and its - * <code>checkSetFactory</code> method doesn't allow the operation. + * @throws IOException if the RMI socket factory is already set + * @throws SecurityException if a security manager exists and its + * <code>checkSetFactory</code> method doesn't allow the operation. * @see #getSocketFactory * @see java.lang.SecurityManager#checkSetFactory() * @since 1.1 diff --git a/src/java.rmi/share/classes/java/rmi/server/RemoteCall.java b/src/java.rmi/share/classes/java/rmi/server/RemoteCall.java index 67b5494af5e..4790b786e91 100644 --- a/src/java.rmi/share/classes/java/rmi/server/RemoteCall.java +++ b/src/java.rmi/share/classes/java/rmi/server/RemoteCall.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -51,7 +51,7 @@ public interface RemoteCall { * into. * * @return output stream for arguments/results - * @exception java.io.IOException if an I/O error occurs. + * @throws java.io.IOException if an I/O error occurs. * @since 1.1 * @deprecated no replacement */ @@ -62,7 +62,7 @@ public interface RemoteCall { * Release the output stream; in some transports this would release * the stream. * - * @exception java.io.IOException if an I/O error occurs. + * @throws java.io.IOException if an I/O error occurs. * @since 1.1 * @deprecated no replacement */ @@ -74,7 +74,7 @@ public interface RemoteCall { * results/arguments from. * * @return input stream for reading arguments/results - * @exception java.io.IOException if an I/O error occurs. + * @throws java.io.IOException if an I/O error occurs. * @since 1.1 * @deprecated no replacement */ @@ -86,7 +86,7 @@ public interface RemoteCall { * Release the input stream. This would allow some transports to release * the channel early. * - * @exception java.io.IOException if an I/O error occurs. + * @throws java.io.IOException if an I/O error occurs. * @since 1.1 * @deprecated no replacement */ @@ -101,8 +101,8 @@ public interface RemoteCall { * @param success If true, indicates normal return, else indicates * exceptional return. * @return output stream for writing call result - * @exception java.io.IOException if an I/O error occurs. - * @exception java.io.StreamCorruptedException If already been called. + * @throws java.io.IOException if an I/O error occurs. + * @throws java.io.StreamCorruptedException If already been called. * @since 1.1 * @deprecated no replacement */ @@ -113,7 +113,7 @@ ObjectOutput getResultStream(boolean success) throws IOException, /** * Do whatever it takes to execute the call. * - * @exception java.lang.Exception if a general exception occurs. + * @throws java.lang.Exception if a general exception occurs. * @since 1.1 * @deprecated no replacement */ @@ -123,7 +123,7 @@ ObjectOutput getResultStream(boolean success) throws IOException, /** * Allow cleanup after the remote call has completed. * - * @exception java.io.IOException if an I/O error occurs. + * @throws java.io.IOException if an I/O error occurs. * @since 1.1 * @deprecated no replacement */ diff --git a/src/java.rmi/share/classes/java/rmi/server/RemoteObject.java b/src/java.rmi/share/classes/java/rmi/server/RemoteObject.java index b10fb77c4d2..98df3e716c4 100644 --- a/src/java.rmi/share/classes/java/rmi/server/RemoteObject.java +++ b/src/java.rmi/share/classes/java/rmi/server/RemoteObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -92,7 +92,7 @@ public RemoteRef getRef() { * the object has been exported. * @param obj the remote object whose stub is needed * @return the stub for the remote object, <code>obj</code>. - * @exception NoSuchObjectException if the stub for the + * @throws NoSuchObjectException if the stub for the * remote object could not be found. * @since 1.2 */ diff --git a/src/java.rmi/share/classes/java/rmi/server/RemoteRef.java b/src/java.rmi/share/classes/java/rmi/server/RemoteRef.java index 55a4c5f6091..6a059cb6e3d 100644 --- a/src/java.rmi/share/classes/java/rmi/server/RemoteRef.java +++ b/src/java.rmi/share/classes/java/rmi/server/RemoteRef.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -73,7 +73,7 @@ public interface RemoteRef extends java.io.Externalizable { * @param params the parameter list * @param opnum a hash that may be used to represent the method * @return result of remote method invocation - * @exception Exception if any exception occurs during remote method + * @throws Exception if any exception occurs during remote method * invocation * @since 1.2 */ diff --git a/src/java.rmi/share/classes/java/rmi/server/ServerRef.java b/src/java.rmi/share/classes/java/rmi/server/ServerRef.java index 22657cc9095..1562f67fe7a 100644 --- a/src/java.rmi/share/classes/java/rmi/server/ServerRef.java +++ b/src/java.rmi/share/classes/java/rmi/server/ServerRef.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -54,7 +54,7 @@ public interface ServerRef extends RemoteRef { * @param obj the remote object implementation * @param data information necessary to export the object * @return the stub for the remote object - * @exception RemoteException if an exception occurs attempting + * @throws RemoteException if an exception occurs attempting * to export the object (e.g., stub class could not be found) * @since 1.1 */ @@ -66,7 +66,7 @@ RemoteStub exportObject(Remote obj, Object data) * thread actively handling a remote method invocation the * hostname of the client is returned. * @return the client's host name - * @exception ServerNotActiveException if called outside of servicing + * @throws ServerNotActiveException if called outside of servicing * a remote method invocation * @since 1.1 */ diff --git a/src/java.rmi/share/classes/java/rmi/server/Skeleton.java b/src/java.rmi/share/classes/java/rmi/server/Skeleton.java index 9f2daafb864..af382d43102 100644 --- a/src/java.rmi/share/classes/java/rmi/server/Skeleton.java +++ b/src/java.rmi/share/classes/java/rmi/server/Skeleton.java @@ -49,7 +49,7 @@ public interface Skeleton { * @param theCall object representing remote call * @param opnum operation number * @param hash stub/skeleton interface hash - * @exception java.lang.Exception if a general exception occurs. + * @throws java.lang.Exception if a general exception occurs. * @since 1.1 * @deprecated no replacement */ diff --git a/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java b/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java index ebc77780568..8d6472a0e27 100644 --- a/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java +++ b/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java @@ -279,7 +279,7 @@ private void readObject(java.io.ObjectInputStream in) * Returns a clone of the remote object that is distinct from * the original. * - * @exception CloneNotSupportedException if clone failed due to + * @throws CloneNotSupportedException if clone failed due to * a RemoteException. * @return the new remote object * @since 1.1 @@ -319,7 +319,7 @@ private void reexport() throws RemoteException * * @param obj the remote object to be exported * @return remote object stub - * @exception RemoteException if export fails + * @throws RemoteException if export fails * @since 1.1 * @deprecated This method is deprecated because it supports only static stubs. * Use {@link #exportObject(Remote, int) exportObject(Remote, port)} or @@ -351,7 +351,7 @@ public static RemoteStub exportObject(Remote obj) * @param obj the remote object to be exported * @param port the port to export the object on * @return remote object stub - * @exception RemoteException if export fails + * @throws RemoteException if export fails * @since 1.2 */ public static Remote exportObject(Remote obj, int port) @@ -374,7 +374,7 @@ public static Remote exportObject(Remote obj, int port) * remote object * @param ssf the server-side socket factory for receiving remote calls * @return remote object stub - * @exception RemoteException if export fails + * @throws RemoteException if export fails * @since 1.2 */ public static Remote exportObject(Remote obj, int port, @@ -399,7 +399,7 @@ public static Remote exportObject(Remote obj, int port, * @param filter an ObjectInputFilter applied when deserializing invocation arguments; * may be {@code null} * @return remote object stub - * @exception RemoteException if export fails + * @throws RemoteException if export fails * @since 9 */ public static Remote exportObject(Remote obj, int port, @@ -426,7 +426,7 @@ public static Remote exportObject(Remote obj, int port, * @param filter an ObjectInputFilter applied when deserializing invocation arguments; * may be {@code null} * @return remote object stub - * @exception RemoteException if export fails + * @throws RemoteException if export fails * @since 9 */ public static Remote exportObject(Remote obj, int port, @@ -452,7 +452,7 @@ public static Remote exportObject(Remote obj, int port, * pending or in-progress calls; if false, only unexports the object * if there are no pending or in-progress calls * @return true if operation is successful, false otherwise - * @exception NoSuchObjectException if the remote object is not + * @throws NoSuchObjectException if the remote object is not * currently exported * @since 1.2 */ diff --git a/src/java.security.jgss/share/classes/module-info.java b/src/java.security.jgss/share/classes/module-info.java index 3b59cfe96d8..d9ad7ad4919 100644 --- a/src/java.security.jgss/share/classes/module-info.java +++ b/src/java.security.jgss/share/classes/module-info.java @@ -41,6 +41,8 @@ jdk.security.jgss; exports sun.security.jgss.krb5 to jdk.security.auth; + exports sun.security.jgss.krb5.internal to + jdk.security.jgss; exports sun.security.krb5 to jdk.security.auth; exports sun.security.krb5.internal to diff --git a/src/java.security.jgss/share/classes/sun/security/jgss/krb5/InitialToken.java b/src/java.security.jgss/share/classes/sun/security/jgss/krb5/InitialToken.java index e5b66bed48d..f491aecfe2f 100644 --- a/src/java.security.jgss/share/classes/sun/security/jgss/krb5/InitialToken.java +++ b/src/java.security.jgss/share/classes/sun/security/jgss/krb5/InitialToken.java @@ -36,6 +36,7 @@ import java.util.Arrays; import sun.security.krb5.*; import sun.security.krb5.internal.Krb5; +import sun.security.jgss.krb5.internal.TlsChannelBindingImpl; abstract class InitialToken extends Krb5Token { @@ -57,6 +58,7 @@ abstract class InitialToken extends Krb5Token { private final byte[] CHECKSUM_FIRST_BYTES = {(byte)0x10, (byte)0x00, (byte)0x00, (byte)0x00}; + private static final int CHANNEL_BINDING_AF_UNSPEC = 0; private static final int CHANNEL_BINDING_AF_INET = 2; private static final int CHANNEL_BINDING_AF_INET6 = 24; private static final int CHANNEL_BINDING_AF_NULL_ADDR = 255; @@ -333,8 +335,8 @@ public void setContextFlags(Krb5Context context) { } } - private int getAddrType(InetAddress addr) { - int addressType = CHANNEL_BINDING_AF_NULL_ADDR; + private int getAddrType(InetAddress addr, int defValue) { + int addressType = defValue; if (addr instanceof Inet4Address) addressType = CHANNEL_BINDING_AF_INET; @@ -344,7 +346,7 @@ else if (addr instanceof Inet6Address) } private byte[] getAddrBytes(InetAddress addr) throws GSSException { - int addressType = getAddrType(addr); + int addressType = getAddrType(addr, CHANNEL_BINDING_AF_NULL_ADDR); byte[] addressBytes = addr.getAddress(); if (addressBytes != null) { switch (addressType) { @@ -375,8 +377,16 @@ private byte[] computeChannelBinding(ChannelBinding channelBinding) InetAddress acceptorAddress = channelBinding.getAcceptorAddress(); int size = 5*4; - int initiatorAddressType = getAddrType(initiatorAddress); - int acceptorAddressType = getAddrType(acceptorAddress); + // LDAP TLS Channel Binding requires CHANNEL_BINDING_AF_UNSPEC address type + // for unspecified initiator and acceptor addresses. + // CHANNEL_BINDING_AF_NULL_ADDR value should be used for unspecified address + // in all other cases. + int initiatorAddressType = getAddrType(initiatorAddress, + (channelBinding instanceof TlsChannelBindingImpl) ? + CHANNEL_BINDING_AF_UNSPEC : CHANNEL_BINDING_AF_NULL_ADDR); + int acceptorAddressType = getAddrType(acceptorAddress, + (channelBinding instanceof TlsChannelBindingImpl) ? + CHANNEL_BINDING_AF_UNSPEC : CHANNEL_BINDING_AF_NULL_ADDR); byte[] initiatorAddressBytes = null; if (initiatorAddress != null) { diff --git a/test/hotspot/jtreg/gc/stress/jfr/TestStressBigAllocationGCEventsWithG1.java b/src/java.security.jgss/share/classes/sun/security/jgss/krb5/internal/TlsChannelBindingImpl.java similarity index 54% rename from test/hotspot/jtreg/gc/stress/jfr/TestStressBigAllocationGCEventsWithG1.java rename to src/java.security.jgss/share/classes/sun/security/jgss/krb5/internal/TlsChannelBindingImpl.java index a271adba13b..e1da3acbc7c 100644 --- a/test/hotspot/jtreg/gc/stress/jfr/TestStressBigAllocationGCEventsWithG1.java +++ b/src/java.security.jgss/share/classes/sun/security/jgss/krb5/internal/TlsChannelBindingImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, Azul Systems, 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 @@ -22,25 +22,16 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package jdk.jfr.event.gc.detailed; +package sun.security.jgss.krb5.internal; + +import org.ietf.jgss.ChannelBinding; /** - * @test - * @key randomness - * @summary Test allocates humongous objects with G1 GC. Objects - * considered humongous when it allocates equals or more than one region. As - * we're passing the size of byte array we need adjust it that entire structure - * fits exactly to one region, if not - G1 will allocate another almost empty - * region as a continue of humongous. Thus we will exhaust memory very fast and - * test will fail with OOME. - * @requires vm.hasJFR - * @requires vm.gc == "null" | vm.gc == "G1" - * @library /test/lib /test/jdk - * @run main/othervm -XX:+UseG1GC -XX:MaxNewSize=5m -Xmx256m -XX:G1HeapRegionSize=1048576 jdk.jfr.event.gc.detailed.TestStressBigAllocationGCEventsWithG1 1048544 + * TLS Channel Binding wrapper class to determine internal + * tls channel binding implementation. */ -public class TestStressBigAllocationGCEventsWithG1 { - - public static void main(String[] args) throws Exception { - new StressAllocationGCEvents().run(args); +public class TlsChannelBindingImpl extends ChannelBinding { + public TlsChannelBindingImpl(byte[] appData) { + super(appData); } } diff --git a/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c b/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c index 68938249848..d6e1712a24f 100644 --- a/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c +++ b/src/java.security.jgss/share/native/libj2gss/GSSLibStub.c @@ -34,6 +34,8 @@ const int TYPE_CRED_NAME = 10; const int TYPE_CRED_TIME = 11; const int TYPE_CRED_USAGE = 12; +static jclass tlsCBCl = NULL; + /* * Class: sun_security_jgss_wrapper_GSSLibStub * Method: init @@ -69,6 +71,17 @@ Java_sun_security_jgss_wrapper_GSSLibStub_init(JNIEnv *env, failed = loadNative(libName); (*env)->ReleaseStringUTFChars(env, jlibName, libName); + if (tlsCBCl == NULL) { + + /* initialize TLS Channel Binding class wrapper */ + jclass cl = (*env)->FindClass(env, + "sun/security/jgss/krb5/internal/TlsChannelBindingImpl"); + if (cl == NULL) { /* exception thrown */ + return JNI_FALSE; + } + tlsCBCl = (*env)->NewGlobalRef(env, cl); + } + if (!failed) { return JNI_TRUE; } else { @@ -154,11 +167,13 @@ void deleteGSSCB(gss_channel_bindings_t cb) { if (cb == GSS_C_NO_CHANNEL_BINDINGS) return; /* release initiator address */ - if (cb->initiator_addrtype != GSS_C_AF_NULLADDR) { + if (cb->initiator_addrtype != GSS_C_AF_NULLADDR && + cb->initiator_addrtype != GSS_C_AF_UNSPEC) { resetGSSBuffer(&(cb->initiator_address)); } /* release acceptor address */ - if (cb->acceptor_addrtype != GSS_C_AF_NULLADDR) { + if (cb->acceptor_addrtype != GSS_C_AF_NULLADDR && + cb->acceptor_addrtype != GSS_C_AF_UNSPEC) { resetGSSBuffer(&(cb->acceptor_address)); } /* release application data */ @@ -189,9 +204,19 @@ gss_channel_bindings_t newGSSCB(JNIEnv *env, jobject jcb) { } // initialize addrtype in CB first - cb->initiator_addrtype = GSS_C_AF_NULLADDR; - cb->acceptor_addrtype = GSS_C_AF_NULLADDR; - + // LDAP TLS Channel Binding requires GSS_C_AF_UNSPEC address type + // for unspecified initiator and acceptor addresses. + // GSS_C_AF_NULLADDR value should be used for unspecified address + // in all other cases. + + if ((*env)->IsInstanceOf(env, jcb, tlsCBCl)) { + // TLS Channel Binding requires unspecified addrtype=0 + cb->initiator_addrtype = GSS_C_AF_UNSPEC; + cb->acceptor_addrtype = GSS_C_AF_UNSPEC; + } else { + cb->initiator_addrtype = GSS_C_AF_NULLADDR; + cb->acceptor_addrtype = GSS_C_AF_NULLADDR; + } // addresses needs to be initialized to empty memset(&cb->initiator_address, 0, sizeof(cb->initiator_address)); memset(&cb->acceptor_address, 0, sizeof(cb->acceptor_address)); diff --git a/src/java.security.jgss/windows/native/libsspi_bridge/sspi.cpp b/src/java.security.jgss/windows/native/libsspi_bridge/sspi.cpp index 0b3e107d46e..2f359a84e7b 100644 --- a/src/java.security.jgss/windows/native/libsspi_bridge/sspi.cpp +++ b/src/java.security.jgss/windows/native/libsspi_bridge/sspi.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 @@ -465,7 +465,7 @@ gss_compare_name(OM_uint32 *minor_status, } if (l1 < l2 && l1 != r2 - || l2 < l1 && l2 != l1) { + || l2 < l1 && l2 != r1) { return GSS_S_COMPLETE; // different } diff --git a/src/java.sql/share/classes/java/sql/Array.java b/src/java.sql/share/classes/java/sql/Array.java index e2067312b1d..ef635d33730 100644 --- a/src/java.sql/share/classes/java/sql/Array.java +++ b/src/java.sql/share/classes/java/sql/Array.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -80,9 +80,9 @@ public interface Array { * @return a <code>String</code> that is the database-specific * name for a built-in base type; or the fully-qualified SQL type * name for a base type that is a UDT - * @exception SQLException if an error occurs while attempting + * @throws SQLException if an error occurs while attempting * to access the type name - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -95,9 +95,9 @@ public interface Array { * @return a constant from the class {@link java.sql.Types} that is * the type code for the elements in the array designated by this * <code>Array</code> object - * @exception SQLException if an error occurs while attempting + * @throws SQLException if an error occurs while attempting * to access the base type - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -119,9 +119,9 @@ public interface Array { * @return an array in the Java programming language that contains * the ordered elements of the SQL <code>ARRAY</code> value * designated by this <code>Array</code> object - * @exception SQLException if an error occurs while attempting to + * @throws SQLException if an error occurs while attempting to * access the array - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -147,9 +147,9 @@ public interface Array { * of SQL type names to classes in the Java programming language * @return an array in the Java programming language that contains the ordered * elements of the SQL array designated by this object - * @exception SQLException if an error occurs while attempting to - * access the array - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if an error occurs while attempting to + * access the array + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -172,9 +172,9 @@ public interface Array { * @param count the number of successive SQL array elements to retrieve * @return an array containing up to <code>count</code> consecutive elements * of the SQL array, beginning with element <code>index</code> - * @exception SQLException if an error occurs while attempting to + * @throws SQLException if an error occurs while attempting to * access the array - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -210,9 +210,9 @@ public interface Array { * consecutive elements of the SQL <code>ARRAY</code> value designated by this * <code>Array</code> object, beginning with element * <code>index</code> - * @exception SQLException if an error occurs while attempting to + * @throws SQLException if an error occurs while attempting to * access the array - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -236,9 +236,9 @@ Object getArray(long index, int count, java.util.Map<String,Class<?>> map) * @return a {@link ResultSet} object containing one row for each * of the elements in the array designated by this <code>Array</code> * object, with the rows in ascending order based on the indices. - * @exception SQLException if an error occurs while attempting to + * @throws SQLException if an error occurs while attempting to * access the array - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -267,9 +267,9 @@ Object getArray(long index, int count, java.util.Map<String,Class<?>> map) * @return a <code>ResultSet</code> object containing one row for each * of the elements in the array designated by this <code>Array</code> * object, with the rows in ascending order based on the indices. - * @exception SQLException if an error occurs while attempting to + * @throws SQLException if an error occurs while attempting to * access the array - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -298,9 +298,9 @@ Object getArray(long index, int count, java.util.Map<String,Class<?>> map) * <code>count</code> consecutive elements of the SQL array * designated by this <code>Array</code> object, starting at * index <code>index</code>. - * @exception SQLException if an error occurs while attempting to + * @throws SQLException if an error occurs while attempting to * access the array - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -335,9 +335,9 @@ Object getArray(long index, int count, java.util.Map<String,Class<?>> map) * <code>count</code> consecutive elements of the SQL array * designated by this <code>Array</code> object, starting at * index <code>index</code>. - * @exception SQLException if an error occurs while attempting to + * @throws SQLException if an error occurs while attempting to * access the array - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -356,7 +356,7 @@ ResultSet getResultSet (long index, int count, * * @throws SQLException if an error occurs releasing * the Array's resources - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ diff --git a/src/java.sql/share/classes/java/sql/Blob.java b/src/java.sql/share/classes/java/sql/Blob.java index 2eae5cb21aa..5bf9cfcb7ad 100644 --- a/src/java.sql/share/classes/java/sql/Blob.java +++ b/src/java.sql/share/classes/java/sql/Blob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -63,10 +63,10 @@ public interface Blob { * designated by this {@code Blob} object. * * @return length of the {@code BLOB} in bytes - * @exception SQLException if there is an error accessing the - * length of the {@code BLOB} - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * length of the {@code BLOB} + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.2 */ long length() throws SQLException; @@ -86,11 +86,11 @@ public interface Blob { * consecutive bytes from the {@code BLOB} value designated * by this {@code Blob} object, starting with the * byte at position {@code pos} - * @exception SQLException if there is an error accessing the - * {@code BLOB} value; if pos is less than 1 or length is - * less than 0 - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code BLOB} value; if pos is less than 1 or length is + * less than 0 + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @see #setBytes * @since 1.2 */ @@ -101,10 +101,10 @@ public interface Blob { * {@code Blob} instance as a stream. * * @return a stream containing the {@code BLOB} data - * @exception SQLException if there is an error accessing the - * {@code BLOB} value - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code BLOB} value + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @see #setBinaryStream * @since 1.2 */ @@ -121,10 +121,10 @@ public interface Blob { * @param start the position at which to begin searching; the * first position is 1 * @return the position at which the pattern appears, else -1 - * @exception SQLException if there is an error accessing the - * {@code BLOB} or if start is less than 1 - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code BLOB} or if start is less than 1 + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.2 */ long position(byte pattern[], long start) throws SQLException; @@ -140,10 +140,10 @@ public interface Blob { * @param start the position in the {@code BLOB} value * at which to begin searching; the first position is 1 * @return the position at which the pattern begins, else -1 - * @exception SQLException if there is an error accessing the - * {@code BLOB} value or if start is less than 1 - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code BLOB} value or if start is less than 1 + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.2 */ long position(Blob pattern, long start) throws SQLException; @@ -171,10 +171,10 @@ public interface Blob { * @param bytes the array of bytes to be written to the {@code BLOB} * value that this {@code Blob} object represents * @return the number of bytes written - * @exception SQLException if there is an error accessing the - * {@code BLOB} value or if pos is less than 1 - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code BLOB} value or if pos is less than 1 + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @see #getBytes * @since 1.4 */ @@ -207,10 +207,10 @@ public interface Blob { * @param len the number of bytes to be written to the {@code BLOB} * value from the array of bytes {@code bytes} * @return the number of bytes written - * @exception SQLException if there is an error accessing the - * {@code BLOB} value or if pos is less than 1 - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code BLOB} value or if pos is less than 1 + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @see #getBytes * @since 1.4 */ @@ -236,10 +236,10 @@ public interface Blob { * to start writing; the first position is 1 * @return a {@code java.io.OutputStream} object to which data can * be written - * @exception SQLException if there is an error accessing the - * {@code BLOB} value or if pos is less than 1 - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code BLOB} value or if pos is less than 1 + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @see #getBinaryStream * @since 1.4 */ @@ -257,10 +257,10 @@ public interface Blob { * * @param len the length, in bytes, to which the {@code BLOB} value * that this {@code Blob} object represents should be truncated - * @exception SQLException if there is an error accessing the - * {@code BLOB} value or if len is less than 0 - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code BLOB} value or if len is less than 0 + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.4 */ void truncate(long len) throws SQLException; @@ -277,8 +277,8 @@ public interface Blob { * * @throws SQLException if an error occurs releasing * the Blob's resources - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.6 */ void free() throws SQLException; @@ -298,8 +298,8 @@ public interface Blob { * pos + length is greater than the number of bytes * in the {@code Blob} * - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.6 */ InputStream getBinaryStream(long pos, long length) throws SQLException; diff --git a/src/java.sql/share/classes/java/sql/CallableStatement.java b/src/java.sql/share/classes/java/sql/CallableStatement.java index eaafccefdd4..c46ea844960 100644 --- a/src/java.sql/share/classes/java/sql/CallableStatement.java +++ b/src/java.sql/share/classes/java/sql/CallableStatement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -88,15 +88,15 @@ public interface CallableStatement extends PreparedStatement { * <code>registerOutParameter</code> that accepts a scale value * should be used. * - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is - * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>, - * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>, - * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>, - * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code> - * or <code>STRUCT</code> data type and the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if {@code sqlType} is + * a {@code ARRAY}, {@code BLOB}, {@code CLOB}, + * {@code DATALINK}, {@code JAVA_OBJECT}, {@code NCHAR}, + * {@code NCLOB}, {@code NVARCHAR}, {@code LONGNVARCHAR}, + * {@code REF}, {@code ROWID}, {@code SQLXML} + * or {@code STRUCT} data type and the JDBC driver does not support * this data type * @see Types */ @@ -122,15 +122,15 @@ void registerOutParameter(int parameterIndex, int sqlType) * @param sqlType the SQL type code defined by <code>java.sql.Types</code>. * @param scale the desired number of digits to the right of the * decimal point. It must be greater than or equal to zero. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is - * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>, - * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>, - * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>, - * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code> - * or <code>STRUCT</code> data type and the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if {@code sqlType} is + * a {@code ARRAY}, {@code BLOB}, {@code CLOB}, + * {@code DATALINK}, {@code JAVA_OBJECT}, {@code NCHAR}, + * {@code NCLOB}, {@code NVARCHAR}, {@code LONGNVARCHAR}, + * {@code REF}, {@code ROWID}, {@code SQLXML} + * or {@code STRUCT} data type and the JDBC driver does not support * this data type * @see Types */ @@ -145,8 +145,8 @@ void registerOutParameter(int parameterIndex, int sqlType, int scale) * * @return <code>true</code> if the last parameter read was SQL * <code>NULL</code>; <code>false</code> otherwise - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} */ boolean wasNull() throws SQLException; @@ -166,9 +166,9 @@ void registerOutParameter(int parameterIndex, int sqlType, int scale) * @return the parameter value. If the value is SQL <code>NULL</code>, * the result * is <code>null</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setString */ String getString(int parameterIndex) throws SQLException; @@ -182,9 +182,9 @@ void registerOutParameter(int parameterIndex, int sqlType, int scale) * and so on * @return the parameter value. If the value is SQL <code>NULL</code>, * the result is <code>false</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setBoolean */ boolean getBoolean(int parameterIndex) throws SQLException; @@ -197,9 +197,9 @@ void registerOutParameter(int parameterIndex, int sqlType, int scale) * and so on * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>0</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setByte */ byte getByte(int parameterIndex) throws SQLException; @@ -212,9 +212,9 @@ void registerOutParameter(int parameterIndex, int sqlType, int scale) * and so on * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>0</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setShort */ short getShort(int parameterIndex) throws SQLException; @@ -227,9 +227,9 @@ void registerOutParameter(int parameterIndex, int sqlType, int scale) * and so on * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>0</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setInt */ int getInt(int parameterIndex) throws SQLException; @@ -242,9 +242,9 @@ void registerOutParameter(int parameterIndex, int sqlType, int scale) * and so on * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>0</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setLong */ long getLong(int parameterIndex) throws SQLException; @@ -257,9 +257,9 @@ void registerOutParameter(int parameterIndex, int sqlType, int scale) * and so on * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>0</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setFloat */ float getFloat(int parameterIndex) throws SQLException; @@ -271,9 +271,9 @@ void registerOutParameter(int parameterIndex, int sqlType, int scale) * and so on * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>0</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setDouble */ double getDouble(int parameterIndex) throws SQLException; @@ -287,13 +287,13 @@ void registerOutParameter(int parameterIndex, int sqlType, int scale) * @param scale the number of digits to the right of the decimal point * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>null</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method - * @deprecated use <code>getBigDecimal(int parameterIndex)</code> - * or <code>getBigDecimal(String parameterName)</code> + * @deprecated use {@code getBigDecimal(int parameterIndex)} + * or {@code getBigDecimal(String parameterName)} * @see #setBigDecimal */ @Deprecated(since="1.2") @@ -308,9 +308,9 @@ BigDecimal getBigDecimal(int parameterIndex, int scale) * and so on * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>null</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setBytes */ byte[] getBytes(int parameterIndex) throws SQLException; @@ -322,9 +322,9 @@ BigDecimal getBigDecimal(int parameterIndex, int scale) * and so on * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>null</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setDate */ java.sql.Date getDate(int parameterIndex) throws SQLException; @@ -337,9 +337,9 @@ BigDecimal getBigDecimal(int parameterIndex, int scale) * and so on * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>null</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setTime */ java.sql.Time getTime(int parameterIndex) throws SQLException; @@ -352,9 +352,9 @@ BigDecimal getBigDecimal(int parameterIndex, int scale) * and so on * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>null</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setTimestamp */ java.sql.Timestamp getTimestamp(int parameterIndex) @@ -378,9 +378,9 @@ java.sql.Timestamp getTimestamp(int parameterIndex) * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @return A <code>java.lang.Object</code> holding the OUT parameter value - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see Types * @see #setObject */ @@ -397,9 +397,9 @@ java.sql.Timestamp getTimestamp(int parameterIndex) * and so on * @return the parameter value in full precision. If the value is * SQL <code>NULL</code>, the result is <code>null</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setBigDecimal * @since 1.2 */ @@ -418,10 +418,10 @@ java.sql.Timestamp getTimestamp(int parameterIndex) * @param parameterIndex the first parameter is 1, the second is 2, and so on * @param map the mapping from SQL type names to Java classes * @return a <code>java.lang.Object</code> holding the OUT parameter value - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setObject * @since 1.2 @@ -437,10 +437,10 @@ Object getObject(int parameterIndex, java.util.Map<String,Class<?>> map) * @return the parameter value as a <code>Ref</code> object in the * Java programming language. If the value was SQL <code>NULL</code>, the value * <code>null</code> is returned. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -453,10 +453,10 @@ Object getObject(int parameterIndex, java.util.Map<String,Class<?>> map) * @return the parameter value as a <code>Blob</code> object in the * Java programming language. If the value was SQL <code>NULL</code>, the value * <code>null</code> is returned. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -470,10 +470,10 @@ Object getObject(int parameterIndex, java.util.Map<String,Class<?>> map) * @return the parameter value as a <code>Clob</code> object in the * Java programming language. If the value was SQL <code>NULL</code>, the * value <code>null</code> is returned. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -488,10 +488,10 @@ Object getObject(int parameterIndex, java.util.Map<String,Class<?>> map) * @return the parameter value as an <code>Array</code> object in * the Java programming language. If the value was SQL <code>NULL</code>, the * value <code>null</code> is returned. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -513,9 +513,9 @@ Object getObject(int parameterIndex, java.util.Map<String,Class<?>> map) * to construct the date * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>null</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setDate * @since 1.2 */ @@ -538,9 +538,9 @@ java.sql.Date getDate(int parameterIndex, Calendar cal) * to construct the time * @return the parameter value; if the value is SQL <code>NULL</code>, the result * is <code>null</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setTime * @since 1.2 */ @@ -564,9 +564,9 @@ java.sql.Time getTime(int parameterIndex, Calendar cal) * to construct the timestamp * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>null</code>. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #setTimestamp * @since 1.2 */ @@ -604,15 +604,15 @@ java.sql.Timestamp getTimestamp(int parameterIndex, Calendar cal) * @param parameterIndex the first parameter is 1, the second is 2,... * @param sqlType a value from {@link java.sql.Types} * @param typeName the fully-qualified name of an SQL structured type - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is - * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>, - * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>, - * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>, - * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code> - * or <code>STRUCT</code> data type and the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if {@code sqlType} is + * a {@code ARRAY}, {@code BLOB}, {@code CLOB}, + * {@code DATALINK}, {@code JAVA_OBJECT}, {@code NCHAR}, + * {@code NCLOB}, {@code NVARCHAR}, {@code LONGNVARCHAR}, + * {@code REF}, {@code ROWID}, {@code SQLXML} + * or {@code STRUCT} data type and the JDBC driver does not support * this data type * @see Types * @since 1.2 @@ -642,15 +642,15 @@ void registerOutParameter (int parameterIndex, int sqlType, String typeName) * or <code>DECIMAL</code>, the version of * <code>registerOutParameter</code> that accepts a scale value * should be used. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is - * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>, - * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>, - * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>, - * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code> - * or <code>STRUCT</code> data type and the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if {@code sqlType} is + * a {@code ARRAY}, {@code BLOB}, {@code CLOB}, + * {@code DATALINK}, {@code JAVA_OBJECT}, {@code NCHAR}, + * {@code NCLOB}, {@code NVARCHAR}, {@code LONGNVARCHAR}, + * {@code REF}, {@code ROWID}, {@code SQLXML} + * or {@code STRUCT} data type and the JDBC driver does not support * this data type or if the JDBC driver does not support * this method * @since 1.4 @@ -677,15 +677,15 @@ void registerOutParameter(String parameterName, int sqlType) * @param sqlType SQL type code defined by <code>java.sql.Types</code>. * @param scale the desired number of digits to the right of the * decimal point. It must be greater than or equal to zero. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is - * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>, - * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>, - * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>, - * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code> - * or <code>STRUCT</code> data type and the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if {@code sqlType} is + * a {@code ARRAY}, {@code BLOB}, {@code CLOB}, + * {@code DATALINK}, {@code JAVA_OBJECT}, {@code NCHAR}, + * {@code NCLOB}, {@code NVARCHAR}, {@code LONGNVARCHAR}, + * {@code REF}, {@code ROWID}, {@code SQLXML} + * or {@code STRUCT} data type and the JDBC driver does not support * this data type or if the JDBC driver does not support * this method * @since 1.4 @@ -724,15 +724,15 @@ void registerOutParameter(String parameterName, int sqlType, int scale) * @param parameterName the name of the parameter * @param sqlType a value from {@link java.sql.Types} * @param typeName the fully-qualified name of an SQL structured type - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is - * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>, - * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>, - * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>, - * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code> - * or <code>STRUCT</code> data type and the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if {@code sqlType} is + * a {@code ARRAY}, {@code BLOB}, {@code CLOB}, + * {@code DATALINK}, {@code JAVA_OBJECT}, {@code NCHAR}, + * {@code NCLOB}, {@code NVARCHAR}, {@code LONGNVARCHAR}, + * {@code REF}, {@code ROWID}, {@code SQLXML} + * or {@code STRUCT} data type and the JDBC driver does not support * this data type or if the JDBC driver does not support * this method * @see Types @@ -749,12 +749,12 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * @return a <code>java.net.URL</code> object that represents the * JDBC <code>DATALINK</code> value used as the designated * parameter - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs, - * this method is called on a closed <code>CallableStatement</code>, + * this method is called on a closed {@code CallableStatement}, * or if the URL being returned is * not a valid URL on the Java platform - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setURL * @since 1.4 @@ -768,11 +768,11 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param val the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs; - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * or if a URL is malformed - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getURL * @since 1.4 @@ -786,10 +786,10 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param sqlType the SQL type code defined in <code>java.sql.Types</code> - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -802,11 +802,11 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @see #getBoolean - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -819,10 +819,10 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getByte * @since 1.4 @@ -836,10 +836,10 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getShort * @since 1.4 @@ -853,10 +853,10 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getInt * @since 1.4 @@ -870,10 +870,10 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getLong * @since 1.4 @@ -887,10 +887,10 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getFloat * @since 1.4 @@ -904,10 +904,10 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getDouble * @since 1.4 @@ -922,10 +922,10 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getBigDecimal * @since 1.4 @@ -942,10 +942,10 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getString * @since 1.4 @@ -961,10 +961,10 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getBytes * @since 1.4 @@ -980,10 +980,10 @@ void registerOutParameter (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getDate * @since 1.4 @@ -998,10 +998,10 @@ void setDate(String parameterName, java.sql.Date x) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTime * @since 1.4 @@ -1017,10 +1017,10 @@ void setTime(String parameterName, java.sql.Time x) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTimestamp * @since 1.4 @@ -1044,10 +1044,10 @@ void setTimestamp(String parameterName, java.sql.Timestamp x) * @param parameterName the name of the parameter * @param x the Java input stream that contains the ASCII parameter value * @param length the number of bytes in the stream - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -1069,10 +1069,10 @@ void setAsciiStream(String parameterName, java.io.InputStream x, int length) * @param parameterName the name of the parameter * @param x the java input stream which contains the binary parameter value * @param length the number of bytes in the stream - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -1105,10 +1105,10 @@ void setBinaryStream(String parameterName, java.io.InputStream x, * @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, * this is the number of digits after the decimal point. For all other * types, this value will be ignored. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified targetSqlType * @see Types * @see #getObject @@ -1128,10 +1128,10 @@ void setObject(String parameterName, Object x, int targetSqlType, int scale) * @param x the object containing the input parameter value * @param targetSqlType the SQL type (as defined in java.sql.Types) to be * sent to the database - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified targetSqlType * @see #getObject * @since 1.4 @@ -1170,11 +1170,11 @@ void setObject(String parameterName, Object x, int targetSqlType) * * @param parameterName the name of the parameter * @param x the object containing the input parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs, - * this method is called on a closed <code>CallableStatement</code> or if the given - * <code>Object</code> parameter is ambiguous - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} or if the given + * {@code Object} parameter is ambiguous + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getObject * @since 1.4 @@ -1199,10 +1199,10 @@ void setObject(String parameterName, Object x, int targetSqlType) * @param reader the <code>java.io.Reader</code> object that * contains the UNICODE data used as the designated parameter * @param length the number of characters in the stream - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -1224,10 +1224,10 @@ void setCharacterStream(String parameterName, * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the date - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getDate * @since 1.4 @@ -1249,10 +1249,10 @@ void setDate(String parameterName, java.sql.Date x, Calendar cal) * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the time - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTime * @since 1.4 @@ -1274,10 +1274,10 @@ void setTime(String parameterName, java.sql.Time x, Calendar cal) * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the timestamp - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTimestamp * @since 1.4 @@ -1309,10 +1309,10 @@ void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal) * @param typeName the fully-qualified name of an SQL user-defined type; * ignored if the parameter is not a user-defined type or * SQL <code>REF</code> value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -1332,10 +1332,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>null</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setString * @since 1.4 @@ -1349,10 +1349,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>false</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setBoolean * @since 1.4 @@ -1365,10 +1365,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>0</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setByte * @since 1.4 @@ -1381,10 +1381,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>0</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setShort * @since 1.4 @@ -1398,10 +1398,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL <code>NULL</code>, * the result is <code>0</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setInt * @since 1.4 @@ -1415,10 +1415,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL <code>NULL</code>, * the result is <code>0</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setLong * @since 1.4 @@ -1431,10 +1431,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL <code>NULL</code>, * the result is <code>0</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setFloat * @since 1.4 @@ -1447,10 +1447,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL <code>NULL</code>, * the result is <code>0</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setDouble * @since 1.4 @@ -1464,10 +1464,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL <code>NULL</code>, the result is * <code>null</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setBytes * @since 1.4 @@ -1480,10 +1480,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>null</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setDate * @since 1.4 @@ -1496,10 +1496,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>null</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setTime * @since 1.4 @@ -1512,10 +1512,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>null</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setTimestamp * @since 1.4 @@ -1534,10 +1534,10 @@ void setNull (String parameterName, int sqlType, String typeName) * to read database-specific abstract data types. * @param parameterName the name of the parameter * @return A <code>java.lang.Object</code> holding the OUT parameter value. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see Types * @see #setObject @@ -1552,10 +1552,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @return the parameter value in full precision. If the value is * SQL <code>NULL</code>, the result is <code>null</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setBigDecimal * @since 1.4 @@ -1575,10 +1575,10 @@ void setNull (String parameterName, int sqlType, String typeName) * @param parameterName the name of the parameter * @param map the mapping from SQL type names to Java classes * @return a <code>java.lang.Object</code> holding the OUT parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setObject * @since 1.4 @@ -1594,10 +1594,10 @@ Object getObject(String parameterName, java.util.Map<String,Class<?>> map) * @return the parameter value as a <code>Ref</code> object in the * Java programming language. If the value was SQL <code>NULL</code>, * the value <code>null</code> is returned. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -1611,10 +1611,10 @@ Object getObject(String parameterName, java.util.Map<String,Class<?>> map) * @return the parameter value as a <code>Blob</code> object in the * Java programming language. If the value was SQL <code>NULL</code>, * the value <code>null</code> is returned. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -1627,10 +1627,10 @@ Object getObject(String parameterName, java.util.Map<String,Class<?>> map) * @return the parameter value as a <code>Clob</code> object in the * Java programming language. If the value was SQL <code>NULL</code>, * the value <code>null</code> is returned. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -1644,10 +1644,10 @@ Object getObject(String parameterName, java.util.Map<String,Class<?>> map) * @return the parameter value as an <code>Array</code> object in * Java programming language. If the value was SQL <code>NULL</code>, * the value <code>null</code> is returned. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -1668,10 +1668,10 @@ Object getObject(String parameterName, java.util.Map<String,Class<?>> map) * to construct the date * @return the parameter value. If the value is SQL <code>NULL</code>, * the result is <code>null</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setDate * @since 1.4 @@ -1694,10 +1694,10 @@ java.sql.Date getDate(String parameterName, Calendar cal) * to construct the time * @return the parameter value; if the value is SQL <code>NULL</code>, the result is * <code>null</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setTime * @since 1.4 @@ -1721,10 +1721,10 @@ java.sql.Time getTime(String parameterName, Calendar cal) * to construct the timestamp * @return the parameter value. If the value is SQL <code>NULL</code>, the result is * <code>null</code>. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setTimestamp * @since 1.4 @@ -1740,11 +1740,11 @@ java.sql.Timestamp getTimestamp(String parameterName, Calendar cal) * @return the parameter value as a <code>java.net.URL</code> object in the * Java programming language. If the value was SQL <code>NULL</code>, the * value <code>null</code> is returned. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs, - * this method is called on a closed <code>CallableStatement</code>, + * this method is called on a closed {@code CallableStatement}, * or if there is a problem with the URL - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setURL * @since 1.4 @@ -1764,7 +1764,7 @@ java.sql.Timestamp getTimestamp(String parameterName, Calendar cal) * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -1781,7 +1781,7 @@ java.sql.Timestamp getTimestamp(String parameterName, Calendar cal) * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -1797,7 +1797,7 @@ java.sql.Timestamp getTimestamp(String parameterName, Calendar cal) * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -1814,7 +1814,7 @@ java.sql.Timestamp getTimestamp(String parameterName, Calendar cal) * character sets; if the driver can detect that a data conversion * error could occur; if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -1834,7 +1834,7 @@ void setNString(String parameterName, String value) * character sets; if the driver can detect that a data conversion * error could occur; if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -1852,7 +1852,7 @@ void setNCharacterStream(String parameterName, Reader value, long length) * character sets; if the driver can detect that a data conversion * error could occur; if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -1874,7 +1874,7 @@ void setNCharacterStream(String parameterName, Reader value, long length) * parameter; if the length specified is less than zero; * a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * * @since 1.6 @@ -1904,7 +1904,7 @@ void setClob(String parameterName, Reader reader, long length) * is less than zero; if the number of bytes in the {@code InputStream} * does not match the specified length; if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * * @since 1.6 @@ -1930,7 +1930,7 @@ void setBlob(String parameterName, InputStream inputStream, long length) * character sets; if the driver can detect that a data conversion * error could occur; if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -1946,12 +1946,12 @@ void setNClob(String parameterName, Reader reader, long length) * @return the parameter value as a <code>NClob</code> object in the * Java programming language. If the value was SQL <code>NULL</code>, the * value <code>null</code> is returned. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if the driver does not support national * character sets; if the driver can detect that a data conversion * error could occur; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -1965,12 +1965,12 @@ void setNClob(String parameterName, Reader reader, long length) * @return the parameter value as a <code>NClob</code> object in the * Java programming language. If the value was SQL <code>NULL</code>, * the value <code>null</code> is returned. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if the driver does not support national * character sets; if the driver can detect that a data conversion * error could occur; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -1987,7 +1987,7 @@ void setNClob(String parameterName, Reader reader, long length) * this method is called on a closed <code>CallableStatement</code> or * the <code>java.xml.transform.Result</code>, * <code>Writer</code> or <code>OutputStream</code> has not been closed for the <code>SQLXML</code> object - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * * @since 1.6 @@ -2002,7 +2002,7 @@ void setNClob(String parameterName, Reader reader, long length) * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -2016,7 +2016,7 @@ void setNClob(String parameterName, Reader reader, long length) * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -2037,10 +2037,10 @@ void setNClob(String parameterName, Reader reader, long length) * @param parameterIndex index of the first parameter is 1, the second is 2, ... * @return a <code>String</code> object that maps an * <code>NCHAR</code>, <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 * @see #setNString @@ -2063,11 +2063,11 @@ void setNClob(String parameterName, Reader reader, long length) * @param parameterName the name of the parameter * @return a <code>String</code> object that maps an * <code>NCHAR</code>, <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 * @see #setNString @@ -2085,10 +2085,10 @@ void setNClob(String parameterName, Reader reader, long length) * value; if the value is SQL <code>NULL</code>, the value returned is * <code>null</code> in the Java programming language. * @param parameterIndex the first parameter is 1, the second is 2, ... - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -2105,10 +2105,10 @@ void setNClob(String parameterName, Reader reader, long length) * @return a <code>java.io.Reader</code> object that contains the parameter * value; if the value is SQL <code>NULL</code>, the value returned is * <code>null</code> in the Java programming language - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -2122,8 +2122,8 @@ void setNClob(String parameterName, Reader reader, long length) * value; if the value is SQL <code>NULL</code>, the value returned is * <code>null</code> in the Java programming language. * @param parameterIndex the first parameter is 1, the second is 2, ... - * @exception SQLException if the parameterIndex is not valid; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * @throws SQLException if the parameterIndex is not valid; if a database access error occurs or + * this method is called on a closed {@code CallableStatement} * @since 1.6 */ java.io.Reader getCharacterStream(int parameterIndex) throws SQLException; @@ -2136,10 +2136,10 @@ void setNClob(String parameterName, Reader reader, long length) * @return a <code>java.io.Reader</code> object that contains the parameter * value; if the value is SQL <code>NULL</code>, the value returned is * <code>null</code> in the Java programming language - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -2152,10 +2152,10 @@ void setNClob(String parameterName, Reader reader, long length) * * @param parameterName the name of the parameter * @param x a <code>Blob</code> object that maps an SQL <code>BLOB</code> value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -2168,10 +2168,10 @@ void setNClob(String parameterName, Reader reader, long length) * * @param parameterName the name of the parameter * @param x a <code>Clob</code> object that maps an SQL <code>CLOB</code> value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -2192,10 +2192,10 @@ void setNClob(String parameterName, Reader reader, long length) * @param parameterName the name of the parameter * @param x the Java input stream that contains the ASCII parameter value * @param length the number of bytes in the stream - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -2217,10 +2217,10 @@ void setAsciiStream(String parameterName, java.io.InputStream x, long length) * @param parameterName the name of the parameter * @param x the java input stream which contains the binary parameter value * @param length the number of bytes in the stream - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -2243,10 +2243,10 @@ void setBinaryStream(String parameterName, java.io.InputStream x, * @param reader the <code>java.io.Reader</code> object that * contains the UNICODE data used as the designated parameter * @param length the number of characters in the stream - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -2271,9 +2271,9 @@ void setCharacterStream(String parameterName, * * @param parameterName the name of the parameter * @param x the Java input stream that contains the ASCII parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ @@ -2295,9 +2295,9 @@ void setAsciiStream(String parameterName, java.io.InputStream x) * * @param parameterName the name of the parameter * @param x the java input stream which contains the binary parameter value - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ @@ -2322,9 +2322,9 @@ void setBinaryStream(String parameterName, java.io.InputStream x) * @param parameterName the name of the parameter * @param reader the <code>java.io.Reader</code> object that contains the * Unicode data - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * this method is called on a closed {@code CallableStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ @@ -2531,13 +2531,13 @@ void setNClob(String parameterName, Reader reader) * this is the length * of the data in the stream or reader. For all other types, * this value will be ignored. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs * or this method is called on a closed {@code CallableStatement} or * if the Java Object specified by x is an InputStream * or Reader object and the value of the scale parameter is less * than zero - * @exception SQLFeatureNotSupportedException if + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified targetSqlType * @see JDBCType * @see SQLType @@ -2560,10 +2560,10 @@ default void setObject(String parameterName, Object x, SQLType targetSqlType, * @param parameterName the name of the parameter * @param x the object containing the input parameter value * @param targetSqlType the SQL type to be sent to the database - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs * or this method is called on a closed {@code CallableStatement} - * @exception SQLFeatureNotSupportedException if + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified targetSqlType * @see JDBCType * @see SQLType @@ -2601,10 +2601,10 @@ default void setObject(String parameterName, Object x, SQLType targetSqlType) * {@code registerOutParameter} that accepts a scale value * should be used. * - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or * this method is called on a closed {@code CallableStatement} - * @exception SQLFeatureNotSupportedException if + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified sqlType * @see JDBCType * @see SQLType @@ -2637,10 +2637,10 @@ default void registerOutParameter(int parameterIndex, SQLType sqlType) * register the OUT Parameter. * @param scale the desired number of digits to the right of the * decimal point. It must be greater than or equal to zero. - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or * this method is called on a closed {@code CallableStatement} - * @exception SQLFeatureNotSupportedException if + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified sqlType * @see JDBCType * @see SQLType @@ -2684,10 +2684,10 @@ default void registerOutParameter(int parameterIndex, SQLType sqlType, * @param sqlType the JDBC type code defined by {@code SQLType} to use to * register the OUT Parameter. * @param typeName the fully-qualified name of an SQL structured type - * @exception SQLException if the parameterIndex is not valid; + * @throws SQLException if the parameterIndex is not valid; * if a database access error occurs or * this method is called on a closed {@code CallableStatement} - * @exception SQLFeatureNotSupportedException if + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified sqlType * @see JDBCType * @see SQLType @@ -2723,10 +2723,10 @@ default void registerOutParameter (int parameterIndex, SQLType sqlType, * or {@code JDBCType.DECIMAL}, the version of * {@code registerOutParameter} that accepts a scale value * should be used. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or * this method is called on a closed {@code CallableStatement} - * @exception SQLFeatureNotSupportedException if + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified sqlType * or if the JDBC driver does not support * this method @@ -2760,10 +2760,10 @@ default void registerOutParameter(String parameterName, SQLType sqlType) * register the OUT Parameter. * @param scale the desired number of digits to the right of the * decimal point. It must be greater than or equal to zero. - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or * this method is called on a closed {@code CallableStatement} - * @exception SQLFeatureNotSupportedException if + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified sqlType * or if the JDBC driver does not support * this method @@ -2809,10 +2809,10 @@ default void registerOutParameter(String parameterName, SQLType sqlType, * @param sqlType the JDBC type code defined by {@code SQLType} to use to * register the OUT Parameter. * @param typeName the fully-qualified name of an SQL structured type - * @exception SQLException if parameterName does not correspond to a named + * @throws SQLException if parameterName does not correspond to a named * parameter; if a database access error occurs or * this method is called on a closed {@code CallableStatement} - * @exception SQLFeatureNotSupportedException if + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified sqlType * or if the JDBC driver does not support this method * @see JDBCType diff --git a/src/java.sql/share/classes/java/sql/Clob.java b/src/java.sql/share/classes/java/sql/Clob.java index f57c001e382..15e6897f711 100644 --- a/src/java.sql/share/classes/java/sql/Clob.java +++ b/src/java.sql/share/classes/java/sql/Clob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -63,10 +63,10 @@ public interface Clob { * designated by this {@code Clob} object. * * @return length of the {@code CLOB} in characters - * @exception SQLException if there is an error accessing the - * length of the {@code CLOB} value - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * length of the {@code CLOB} value + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.2 */ long length() throws SQLException; @@ -85,11 +85,11 @@ public interface Clob { * the value for length must be 0 or greater * @return a {@code String} that is the specified substring in * the {@code CLOB} value designated by this {@code Clob} object - * @exception SQLException if there is an error accessing the - * {@code CLOB} value; if pos is less than 1 or length is - * less than 0 - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code CLOB} value; if pos is less than 1 or length is + * less than 0 + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.2 */ String getSubString(long pos, int length) throws SQLException; @@ -101,10 +101,10 @@ public interface Clob { * * @return a {@code java.io.Reader} object containing the * {@code CLOB} data - * @exception SQLException if there is an error accessing the - * {@code CLOB} value - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code CLOB} value + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @see #setCharacterStream * @since 1.2 */ @@ -116,10 +116,10 @@ public interface Clob { * * @return a {@code java.io.InputStream} object containing the * {@code CLOB} data - * @exception SQLException if there is an error accessing the - * {@code CLOB} value - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code CLOB} value + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @see #setAsciiStream * @since 1.2 */ @@ -136,10 +136,10 @@ public interface Clob { * the first position is 1 * @return the position at which the substring appears or -1 if it is not * present; the first position is 1 - * @exception SQLException if there is an error accessing the - * {@code CLOB} value or if pos is less than 1 - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code CLOB} value or if pos is less than 1 + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.2 */ long position(String searchstr, long start) throws SQLException; @@ -155,10 +155,10 @@ public interface Clob { * position is 1 * @return the position at which the {@code Clob} object appears * or -1 if it is not present; the first position is 1 - * @exception SQLException if there is an error accessing the - * {@code CLOB} value or if start is less than 1 - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code CLOB} value or if start is less than 1 + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.2 */ long position(Clob searchstr, long start) throws SQLException; @@ -186,11 +186,11 @@ public interface Clob { * @param str the string to be written to the {@code CLOB} * value that this {@code Clob} designates * @return the number of characters written - * @exception SQLException if there is an error accessing the - * {@code CLOB} value or if pos is less than 1 + * @throws SQLException if there is an error accessing the + * {@code CLOB} value or if pos is less than 1 * - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.4 */ int setString(long pos, String str) throws SQLException; @@ -219,11 +219,11 @@ public interface Clob { * the characters to be written * @param len the number of characters to be written * @return the number of characters written - * @exception SQLException if there is an error accessing the - * {@code CLOB} value or if pos is less than 1 + * @throws SQLException if there is an error accessing the + * {@code CLOB} value or if pos is less than 1 * - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.4 */ int setString(long pos, String str, int offset, int len) throws SQLException; @@ -247,10 +247,10 @@ public interface Clob { * @param pos the position at which to start writing to this * {@code CLOB} object; The first position is 1 * @return the stream to which ASCII encoded characters can be written - * @exception SQLException if there is an error accessing the - * {@code CLOB} value or if pos is less than 1 - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code CLOB} value or if pos is less than 1 + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @see #getAsciiStream * * @since 1.4 @@ -277,10 +277,10 @@ public interface Clob { * {@code CLOB} value; The first position is 1 * * @return a stream to which Unicode encoded characters can be written - * @exception SQLException if there is an error accessing the - * {@code CLOB} value or if pos is less than 1 - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLException if there is an error accessing the + * {@code CLOB} value or if pos is less than 1 + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @see #getCharacterStream * * @since 1.4 @@ -300,11 +300,11 @@ public interface Clob { * * @param len the length, in characters, to which the {@code CLOB} value * should be truncated - * @exception SQLException if there is an error accessing the - * {@code CLOB} value or if len is less than 0 + * @throws SQLException if there is an error accessing the + * {@code CLOB} value or if len is less than 0 * - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.4 */ void truncate(long len) throws SQLException; @@ -322,8 +322,8 @@ public interface Clob { * @throws SQLException if an error occurs releasing * the Clob's resources * - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.6 */ void free() throws SQLException; @@ -344,8 +344,8 @@ public interface Clob { * or if pos + length is greater than the number of * characters in the {@code Clob} * - * @exception SQLFeatureNotSupportedException if the JDBC driver - * does not support this method + * @throws SQLFeatureNotSupportedException if the JDBC driver + * does not support this method * @since 1.6 */ Reader getCharacterStream(long pos, long length) throws SQLException; diff --git a/src/java.sql/share/classes/java/sql/Connection.java b/src/java.sql/share/classes/java/sql/Connection.java index f3a6da0caa5..1b9df392e11 100644 --- a/src/java.sql/share/classes/java/sql/Connection.java +++ b/src/java.sql/share/classes/java/sql/Connection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -99,7 +99,7 @@ public interface Connection extends Wrapper, AutoCloseable { * calling {@link #getHoldability}. * * @return a new default <code>Statement</code> object - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection */ Statement createStatement() throws SQLException; @@ -133,7 +133,7 @@ public interface Connection extends Wrapper, AutoCloseable { * parameter placeholders * @return a new default <code>PreparedStatement</code> object containing the * pre-compiled SQL statement - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection */ PreparedStatement prepareStatement(String sql) @@ -166,7 +166,7 @@ PreparedStatement prepareStatement(String sql) * call escape syntax. * @return a new default <code>CallableStatement</code> object containing the * pre-compiled SQL statement - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection */ CallableStatement prepareCall(String sql) throws SQLException; @@ -180,7 +180,7 @@ PreparedStatement prepareStatement(String sql) * @param sql an SQL statement that may contain one or more '?' * parameter placeholders * @return the native form of this statement - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection */ String nativeSQL(String sql) throws SQLException; @@ -215,7 +215,7 @@ PreparedStatement prepareStatement(String sql) * * @param autoCommit <code>true</code> to enable auto-commit mode; * <code>false</code> to disable it - * @exception SQLException if a database access error occurs, + * @throws SQLException if a database access error occurs, * setAutoCommit(true) is called while participating in a distributed transaction, * or this method is called on a closed connection * @see #getAutoCommit @@ -228,7 +228,7 @@ PreparedStatement prepareStatement(String sql) * * @return the current state of this <code>Connection</code> object's * auto-commit mode - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection * @see #setAutoCommit */ @@ -241,10 +241,10 @@ PreparedStatement prepareStatement(String sql) * This method should be * used only when auto-commit mode has been disabled. * - * @exception SQLException if a database access error occurs, + * @throws SQLException if a database access error occurs, * this method is called while participating in a distributed transaction, * if this method is called on a closed connection or this - * <code>Connection</code> object is in auto-commit mode + * {@code Connection} object is in auto-commit mode * @see #setAutoCommit */ void commit() throws SQLException; @@ -255,10 +255,10 @@ PreparedStatement prepareStatement(String sql) * by this <code>Connection</code> object. This method should be * used only when auto-commit mode has been disabled. * - * @exception SQLException if a database access error occurs, + * @throws SQLException if a database access error occurs, * this method is called while participating in a distributed transaction, * this method is called on a closed connection or this - * <code>Connection</code> object is in auto-commit mode + * {@code Connection} object is in auto-commit mode * @see #setAutoCommit */ void rollback() throws SQLException; @@ -275,7 +275,7 @@ PreparedStatement prepareStatement(String sql) * <code>close</code> method. If the <code>close</code> method is called * and there is an active transaction, the results are implementation-defined. * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void close() throws SQLException; @@ -294,7 +294,7 @@ PreparedStatement prepareStatement(String sql) * * @return <code>true</code> if this <code>Connection</code> object * is closed; <code>false</code> if it is still open - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean isClosed() throws SQLException; @@ -311,7 +311,7 @@ PreparedStatement prepareStatement(String sql) * * @return a <code>DatabaseMetaData</code> object for this * <code>Connection</code> object - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection */ DatabaseMetaData getMetaData() throws SQLException; @@ -324,7 +324,7 @@ PreparedStatement prepareStatement(String sql) * * @param readOnly <code>true</code> enables read-only mode; * <code>false</code> disables it - * @exception SQLException if a database access error occurs, this + * @throws SQLException if a database access error occurs, this * method is called on a closed connection or this * method is called during a transaction */ @@ -336,7 +336,7 @@ PreparedStatement prepareStatement(String sql) * * @return <code>true</code> if this <code>Connection</code> object * is read-only; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection */ boolean isReadOnly() throws SQLException; @@ -358,7 +358,7 @@ PreparedStatement prepareStatement(String sql) * * @param catalog the name of a catalog (subspace in this * <code>Connection</code> object's database) in which to work - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection * @see #getCatalog */ @@ -368,7 +368,7 @@ PreparedStatement prepareStatement(String sql) * Retrieves this <code>Connection</code> object's current catalog name. * * @return the current catalog name or <code>null</code> if there is none - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection * @see #setCatalog */ @@ -438,9 +438,9 @@ PreparedStatement prepareStatement(String sql) * <code>Connection.TRANSACTION_SERIALIZABLE</code>. * (Note that <code>Connection.TRANSACTION_NONE</code> cannot be used * because it specifies that transactions are not supported.) - * @exception SQLException if a database access error occurs, this + * @throws SQLException if a database access error occurs, this * method is called on a closed connection - * or the given parameter is not one of the <code>Connection</code> + * or the given parameter is not one of the {@code Connection} * constants * @see DatabaseMetaData#supportsTransactionIsolationLevel * @see #getTransactionIsolation @@ -458,7 +458,7 @@ PreparedStatement prepareStatement(String sql) * <code>Connection.TRANSACTION_REPEATABLE_READ</code>, * <code>Connection.TRANSACTION_SERIALIZABLE</code>, or * <code>Connection.TRANSACTION_NONE</code>. - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection * @see #setTransactionIsolation */ @@ -481,8 +481,8 @@ PreparedStatement prepareStatement(String sql) * * @return the first <code>SQLWarning</code> object or <code>null</code> * if there are none - * @exception SQLException if a database access error occurs or - * this method is called on a closed connection + * @throws SQLException if a database access error occurs or + * this method is called on a closed connection * @see SQLWarning */ SQLWarning getWarnings() throws SQLException; @@ -493,7 +493,7 @@ PreparedStatement prepareStatement(String sql) * returns <code>null</code> until a new warning is * reported for this <code>Connection</code> object. * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection */ void clearWarnings() throws SQLException; @@ -520,11 +520,11 @@ PreparedStatement prepareStatement(String sql) * @return a new <code>Statement</code> object that will generate * <code>ResultSet</code> objects with the given type and * concurrency - * @exception SQLException if a database access error occurs, this + * @throws SQLException if a database access error occurs, this * method is called on a closed connection - * or the given parameters are not <code>ResultSet</code> + * or the given parameters are not {@code ResultSet} * constants indicating type and concurrency - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method or this method is not supported for the specified result * set type and result set concurrency. * @since 1.2 @@ -555,11 +555,11 @@ Statement createStatement(int resultSetType, int resultSetConcurrency) * @return a new PreparedStatement object containing the * pre-compiled SQL statement that will produce <code>ResultSet</code> * objects with the given type and concurrency - * @exception SQLException if a database access error occurs, this + * @throws SQLException if a database access error occurs, this * method is called on a closed connection - * or the given parameters are not <code>ResultSet</code> + * or the given parameters are not {@code ResultSet} * constants indicating type and concurrency - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method or this method is not supported for the specified result * set type and result set concurrency. * @since 1.2 @@ -589,11 +589,11 @@ PreparedStatement prepareStatement(String sql, int resultSetType, * @return a new <code>CallableStatement</code> object containing the * pre-compiled SQL statement that will produce <code>ResultSet</code> * objects with the given type and concurrency - * @exception SQLException if a database access error occurs, this method + * @throws SQLException if a database access error occurs, this method * is called on a closed connection - * or the given parameters are not <code>ResultSet</code> + * or the given parameters are not {@code ResultSet} * constants indicating type and concurrency - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method or this method is not supported for the specified result * set type and result set concurrency. * @since 1.2 @@ -619,9 +619,9 @@ CallableStatement prepareCall(String sql, int resultSetType, * </pre> * @return the <code>java.util.Map</code> object associated * with this <code>Connection</code> object - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 * @see #setTypeMap @@ -645,11 +645,11 @@ CallableStatement prepareCall(String sql, int resultSetType, * @param map the <code>java.util.Map</code> object to install * as the replacement for this <code>Connection</code> * object's default type map - * @exception SQLException if a database access error occurs, this + * @throws SQLException if a database access error occurs, this * method is called on a closed connection or - * the given parameter is not a <code>java.util.Map</code> + * the given parameter is not a {@code java.util.Map} * object - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 * @see #getTypeMap @@ -672,7 +672,7 @@ CallableStatement prepareCall(String sql, int resultSetType, * @throws SQLException if a database access occurs, this method is called * on a closed connection, or the given parameter * is not a <code>ResultSet</code> constant indicating holdability - * @exception SQLFeatureNotSupportedException if the given holdability is not supported + * @throws SQLFeatureNotSupportedException if the given holdability is not supported * @see #getHoldability * @see DatabaseMetaData#getResultSetHoldability * @see ResultSet @@ -704,12 +704,12 @@ CallableStatement prepareCall(String sql, int resultSetType, *savepoint. * * @return the new <code>Savepoint</code> object - * @exception SQLException if a database access error occurs, + * @throws SQLException if a database access error occurs, * this method is called while participating in a distributed transaction, * this method is called on a closed connection - * or this <code>Connection</code> object is currently in + * or this {@code Connection} object is currently in * auto-commit mode - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see Savepoint * @since 1.4 @@ -725,12 +725,12 @@ CallableStatement prepareCall(String sql, int resultSetType, * * @param name a <code>String</code> containing the name of the savepoint * @return the new <code>Savepoint</code> object - * @exception SQLException if a database access error occurs, + * @throws SQLException if a database access error occurs, * this method is called while participating in a distributed transaction, * this method is called on a closed connection - * or this <code>Connection</code> object is currently in + * or this {@code Connection} object is currently in * auto-commit mode - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see Savepoint * @since 1.4 @@ -744,13 +744,13 @@ CallableStatement prepareCall(String sql, int resultSetType, * This method should be used only when auto-commit has been disabled. * * @param savepoint the <code>Savepoint</code> object to roll back to - * @exception SQLException if a database access error occurs, + * @throws SQLException if a database access error occurs, * this method is called while participating in a distributed transaction, * this method is called on a closed connection, - * the <code>Savepoint</code> object is no longer valid, - * or this <code>Connection</code> object is currently in + * the {@code Savepoint} object is no longer valid, + * or this {@code Connection} object is currently in * auto-commit mode - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see Savepoint * @see #rollback @@ -764,11 +764,11 @@ CallableStatement prepareCall(String sql, int resultSetType, * will cause an <code>SQLException</code> to be thrown. * * @param savepoint the <code>Savepoint</code> object to be removed - * @exception SQLException if a database access error occurs, this + * @throws SQLException if a database access error occurs, this * method is called on a closed connection or - * the given <code>Savepoint</code> object is not a valid + * the given {@code Savepoint} object is not a valid * savepoint in the current transaction - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -798,11 +798,11 @@ CallableStatement prepareCall(String sql, int resultSetType, * @return a new <code>Statement</code> object that will generate * <code>ResultSet</code> objects with the given type, * concurrency, and holdability - * @exception SQLException if a database access error occurs, this + * @throws SQLException if a database access error occurs, this * method is called on a closed connection - * or the given parameters are not <code>ResultSet</code> + * or the given parameters are not {@code ResultSet} * constants indicating type, concurrency, and holdability - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method or this method is not supported for the specified result * set type, result set holdability and result set concurrency. * @see ResultSet @@ -840,11 +840,11 @@ Statement createStatement(int resultSetType, int resultSetConcurrency, * pre-compiled SQL statement, that will generate * <code>ResultSet</code> objects with the given type, * concurrency, and holdability - * @exception SQLException if a database access error occurs, this + * @throws SQLException if a database access error occurs, this * method is called on a closed connection - * or the given parameters are not <code>ResultSet</code> + * or the given parameters are not {@code ResultSet} * constants indicating type, concurrency, and holdability - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method or this method is not supported for the specified result * set type, result set holdability and result set concurrency. * @see ResultSet @@ -880,11 +880,11 @@ PreparedStatement prepareStatement(String sql, int resultSetType, * pre-compiled SQL statement, that will generate * <code>ResultSet</code> objects with the given type, * concurrency, and holdability - * @exception SQLException if a database access error occurs, this + * @throws SQLException if a database access error occurs, this * method is called on a closed connection - * or the given parameters are not <code>ResultSet</code> + * or the given parameters are not {@code ResultSet} * constants indicating type, concurrency, and holdability - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method or this method is not supported for the specified result * set type, result set holdability and result set concurrency. * @see ResultSet @@ -928,12 +928,12 @@ CallableStatement prepareCall(String sql, int resultSetType, * @return a new <code>PreparedStatement</code> object, containing the * pre-compiled SQL statement, that will have the capability of * returning auto-generated keys - * @exception SQLException if a database access error occurs, this + * @throws SQLException if a database access error occurs, this * method is called on a closed connection - * or the given parameter is not a <code>Statement</code> + * or the given parameter is not a {@code Statement} * constant indicating whether auto-generated keys should be * returned - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method with a constant of Statement.RETURN_GENERATED_KEYS * @since 1.4 */ @@ -978,9 +978,9 @@ PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) * pre-compiled statement, that is capable of returning the * auto-generated keys designated by the given array of column * indexes - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * * @since 1.4 @@ -1026,9 +1026,9 @@ PreparedStatement prepareStatement(String sql, int columnIndexes[]) * pre-compiled statement, that is capable of returning the * auto-generated keys designated by the given array of column * names - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * * @since 1.4 @@ -1045,7 +1045,7 @@ PreparedStatement prepareStatement(String sql, String columnNames[]) * @throws SQLException if an object that implements the * <code>Clob</code> interface can not be constructed, this method is * called on a closed connection or a database access error occurs. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this data type * * @since 1.6 @@ -1061,7 +1061,7 @@ PreparedStatement prepareStatement(String sql, String columnNames[]) * @throws SQLException if an object that implements the * <code>Blob</code> interface can not be constructed, this method is * called on a closed connection or a database access error occurs. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this data type * * @since 1.6 @@ -1077,7 +1077,7 @@ PreparedStatement prepareStatement(String sql, String columnNames[]) * @throws SQLException if an object that implements the * <code>NClob</code> interface can not be constructed, this method is * called on a closed connection or a database access error occurs. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this data type * * @since 1.6 @@ -1093,7 +1093,7 @@ PreparedStatement prepareStatement(String sql, String columnNames[]) * @throws SQLException if an object that implements the <code>SQLXML</code> interface can not * be constructed, this method is * called on a closed connection or a database access error occurs. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this data type * @since 1.6 */ @@ -1116,7 +1116,7 @@ PreparedStatement prepareStatement(String sql, String columnNames[]) * database operation. * * @return true if the connection is valid, false otherwise - * @exception SQLException if the value supplied for <code>timeout</code> + * @throws SQLException if the value supplied for {@code timeout} * is less than 0 * @since 1.6 * @@ -1318,7 +1318,7 @@ Struct createStruct(String typeName, Object[] attributes) * {@code Statement} is created or prepared. * * @param schema the name of a schema in which to work - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection * @see #getSchema * @since 1.7 @@ -1329,7 +1329,7 @@ Struct createStruct(String typeName, Object[] attributes) * Retrieves this <code>Connection</code> object's current schema name. * * @return the current schema name or <code>null</code> if there is none - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed connection * @see #setSchema * @since 1.7 @@ -1455,7 +1455,7 @@ Struct createStruct(String typeName, Object[] attributes) * @throws java.lang.SecurityException if a security manager exists and its * <code>checkPermission</code> method denies calling * <code>setNetworkTimeout</code>. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see SecurityManager#checkPermission * @see Statement#setQueryTimeout @@ -1477,7 +1477,7 @@ Struct createStruct(String typeName, Object[] attributes) * no limit * @throws SQLException if a database access error occurs or * this method is called on a closed <code>Connection</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #setNetworkTimeout * @since 1.7 diff --git a/src/java.sql/share/classes/java/sql/DatabaseMetaData.java b/src/java.sql/share/classes/java/sql/DatabaseMetaData.java index 98c6ff902c9..553ea1fc4cc 100644 --- a/src/java.sql/share/classes/java/sql/DatabaseMetaData.java +++ b/src/java.sql/share/classes/java/sql/DatabaseMetaData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -80,7 +80,7 @@ public interface DatabaseMetaData extends Wrapper { * returned by the method <code>getProcedures</code>. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean allProceduresAreCallable() throws SQLException; @@ -90,7 +90,7 @@ public interface DatabaseMetaData extends Wrapper { * statement. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean allTablesAreSelectable() throws SQLException; @@ -99,7 +99,7 @@ public interface DatabaseMetaData extends Wrapper { * * @return the URL for this DBMS or <code>null</code> if it cannot be * generated - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getURL() throws SQLException; @@ -107,7 +107,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves the user name as known to this database. * * @return the database user name - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getUserName() throws SQLException; @@ -115,7 +115,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether this database is in read-only mode. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean isReadOnly() throws SQLException; @@ -129,7 +129,7 @@ public interface DatabaseMetaData extends Wrapper { * are sorted at the end regardless of sort order. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean nullsAreSortedHigh() throws SQLException; @@ -143,7 +143,7 @@ public interface DatabaseMetaData extends Wrapper { * are sorted at the beginning regardless of sort order. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean nullsAreSortedLow() throws SQLException; @@ -152,7 +152,7 @@ public interface DatabaseMetaData extends Wrapper { * of sort order. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean nullsAreSortedAtStart() throws SQLException; @@ -161,7 +161,7 @@ public interface DatabaseMetaData extends Wrapper { * sort order. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean nullsAreSortedAtEnd() throws SQLException; @@ -169,7 +169,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves the name of this database product. * * @return database product name - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getDatabaseProductName() throws SQLException; @@ -177,7 +177,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves the version number of this database product. * * @return database version number - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getDatabaseProductVersion() throws SQLException; @@ -185,7 +185,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves the name of this JDBC driver. * * @return JDBC driver name - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getDriverName() throws SQLException; @@ -193,7 +193,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves the version number of this JDBC driver as a <code>String</code>. * * @return JDBC driver version - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getDriverVersion() throws SQLException; @@ -215,7 +215,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether this database stores tables in a local file. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean usesLocalFiles() throws SQLException; @@ -224,7 +224,7 @@ public interface DatabaseMetaData extends Wrapper { * * @return <code>true</code> if this database uses a local file for each table; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean usesLocalFilePerTable() throws SQLException; @@ -233,7 +233,7 @@ public interface DatabaseMetaData extends Wrapper { * case sensitive and as a result stores them in mixed case. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsMixedCaseIdentifiers() throws SQLException; @@ -242,7 +242,7 @@ public interface DatabaseMetaData extends Wrapper { * case insensitive and stores them in upper case. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean storesUpperCaseIdentifiers() throws SQLException; @@ -251,7 +251,7 @@ public interface DatabaseMetaData extends Wrapper { * case insensitive and stores them in lower case. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean storesLowerCaseIdentifiers() throws SQLException; @@ -260,7 +260,7 @@ public interface DatabaseMetaData extends Wrapper { * case insensitive and stores them in mixed case. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean storesMixedCaseIdentifiers() throws SQLException; @@ -269,7 +269,7 @@ public interface DatabaseMetaData extends Wrapper { * case sensitive and as a result stores them in mixed case. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsMixedCaseQuotedIdentifiers() throws SQLException; @@ -278,7 +278,7 @@ public interface DatabaseMetaData extends Wrapper { * case insensitive and stores them in upper case. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean storesUpperCaseQuotedIdentifiers() throws SQLException; @@ -287,7 +287,7 @@ public interface DatabaseMetaData extends Wrapper { * case insensitive and stores them in lower case. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean storesLowerCaseQuotedIdentifiers() throws SQLException; @@ -296,7 +296,7 @@ public interface DatabaseMetaData extends Wrapper { * case insensitive and stores them in mixed case. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean storesMixedCaseQuotedIdentifiers() throws SQLException; @@ -305,7 +305,7 @@ public interface DatabaseMetaData extends Wrapper { * This method returns a space " " if identifier quoting is not supported. * * @return the quoting string or a space if quoting is not supported - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getIdentifierQuoteString() throws SQLException; @@ -315,7 +315,7 @@ public interface DatabaseMetaData extends Wrapper { * * @return the list of this database's keywords that are not also * SQL:2003 keywords - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getSQLKeywords() throws SQLException; @@ -325,7 +325,7 @@ public interface DatabaseMetaData extends Wrapper { * the JDBC function escape clause. * * @return the list of math functions supported by this database - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getNumericFunctions() throws SQLException; @@ -335,7 +335,7 @@ public interface DatabaseMetaData extends Wrapper { * in the JDBC function escape clause. * * @return the list of string functions supported by this database - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getStringFunctions() throws SQLException; @@ -345,7 +345,7 @@ public interface DatabaseMetaData extends Wrapper { * in the JDBC function escape clause. * * @return a list of system functions supported by this database - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getSystemFunctions() throws SQLException; @@ -354,7 +354,7 @@ public interface DatabaseMetaData extends Wrapper { * with this database. * * @return the list of time and date functions supported by this database - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getTimeDateFunctions() throws SQLException; @@ -369,7 +369,7 @@ public interface DatabaseMetaData extends Wrapper { * more characters. * * @return the string used to escape wildcard characters - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getSearchStringEscape() throws SQLException; @@ -378,7 +378,7 @@ public interface DatabaseMetaData extends Wrapper { * identifier names (those beyond a-z, A-Z, 0-9 and _). * * @return the string containing the extra characters - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getExtraNameCharacters() throws SQLException; @@ -390,7 +390,7 @@ public interface DatabaseMetaData extends Wrapper { * with add column. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsAlterTableWithAddColumn() throws SQLException; @@ -399,7 +399,7 @@ public interface DatabaseMetaData extends Wrapper { * with drop column. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsAlterTableWithDropColumn() throws SQLException; @@ -411,7 +411,7 @@ public interface DatabaseMetaData extends Wrapper { * required. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsColumnAliasing() throws SQLException; @@ -421,7 +421,7 @@ public interface DatabaseMetaData extends Wrapper { * <code>NULL</code>. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean nullPlusNonNullIsNull() throws SQLException; @@ -432,7 +432,7 @@ public interface DatabaseMetaData extends Wrapper { * in <code>java.sql.Types</code>. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsConvert() throws SQLException; @@ -447,7 +447,7 @@ public interface DatabaseMetaData extends Wrapper { * @param toType the type to convert to; one of the type codes from * the class <code>java.sql.Types</code> * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see Types */ boolean supportsConvert(int fromType, int toType) throws SQLException; @@ -456,7 +456,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether this database supports table correlation names. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsTableCorrelationNames() throws SQLException; @@ -465,7 +465,7 @@ public interface DatabaseMetaData extends Wrapper { * are restricted to being different from the names of the tables. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsDifferentTableCorrelationNames() throws SQLException; @@ -474,7 +474,7 @@ public interface DatabaseMetaData extends Wrapper { * <code>ORDER BY</code> lists. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsExpressionsInOrderBy() throws SQLException; @@ -484,7 +484,7 @@ public interface DatabaseMetaData extends Wrapper { * <code>ORDER BY</code> clause. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsOrderByUnrelated() throws SQLException; @@ -493,7 +493,7 @@ public interface DatabaseMetaData extends Wrapper { * <code>GROUP BY</code> clause. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsGroupBy() throws SQLException; @@ -503,7 +503,7 @@ public interface DatabaseMetaData extends Wrapper { * <code>GROUP BY</code> clause. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsGroupByUnrelated() throws SQLException; @@ -514,7 +514,7 @@ public interface DatabaseMetaData extends Wrapper { * are included in the <code>GROUP BY</code> clause. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsGroupByBeyondSelect() throws SQLException; @@ -523,7 +523,7 @@ public interface DatabaseMetaData extends Wrapper { * <code>LIKE</code> escape clause. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsLikeEscapeClause() throws SQLException; @@ -533,7 +533,7 @@ public interface DatabaseMetaData extends Wrapper { * method <code>execute</code>. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsMultipleResultSets() throws SQLException; @@ -542,7 +542,7 @@ public interface DatabaseMetaData extends Wrapper { * transactions open at once (on different connections). * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsMultipleTransactions() throws SQLException; @@ -550,7 +550,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether columns in this database may be defined as non-nullable. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsNonNullableColumns() throws SQLException; @@ -558,7 +558,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether this database supports the ODBC Minimum SQL grammar. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsMinimumSQLGrammar() throws SQLException; @@ -566,7 +566,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether this database supports the ODBC Core SQL grammar. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsCoreSQLGrammar() throws SQLException; @@ -574,7 +574,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether this database supports the ODBC Extended SQL grammar. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsExtendedSQLGrammar() throws SQLException; @@ -583,7 +583,7 @@ public interface DatabaseMetaData extends Wrapper { * grammar. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsANSI92EntryLevelSQL() throws SQLException; @@ -591,7 +591,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether this database supports the ANSI92 intermediate SQL grammar supported. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsANSI92IntermediateSQL() throws SQLException; @@ -599,7 +599,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether this database supports the ANSI92 full SQL grammar supported. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsANSI92FullSQL() throws SQLException; @@ -608,7 +608,7 @@ public interface DatabaseMetaData extends Wrapper { * Enhancement Facility. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsIntegrityEnhancementFacility() throws SQLException; @@ -616,7 +616,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether this database supports some form of outer join. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsOuterJoins() throws SQLException; @@ -624,7 +624,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether this database supports full nested outer joins. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsFullOuterJoins() throws SQLException; @@ -634,7 +634,7 @@ public interface DatabaseMetaData extends Wrapper { * <code>supportsFullOuterJoins</code> returns <code>true</code>). * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsLimitedOuterJoins() throws SQLException; @@ -642,7 +642,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves the database vendor's preferred term for "schema". * * @return the vendor term for "schema" - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getSchemaTerm() throws SQLException; @@ -650,7 +650,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves the database vendor's preferred term for "procedure". * * @return the vendor term for "procedure" - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getProcedureTerm() throws SQLException; @@ -658,7 +658,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves the database vendor's preferred term for "catalog". * * @return the vendor term for "catalog" - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getCatalogTerm() throws SQLException; @@ -668,7 +668,7 @@ public interface DatabaseMetaData extends Wrapper { * * @return <code>true</code> if the catalog name appears at the beginning * of a fully qualified table name; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean isCatalogAtStart() throws SQLException; @@ -677,7 +677,7 @@ public interface DatabaseMetaData extends Wrapper { * separator between a catalog and table name. * * @return the separator string - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getCatalogSeparator() throws SQLException; @@ -685,7 +685,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether a schema name can be used in a data manipulation statement. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsSchemasInDataManipulation() throws SQLException; @@ -693,7 +693,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether a schema name can be used in a procedure call statement. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsSchemasInProcedureCalls() throws SQLException; @@ -701,7 +701,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether a schema name can be used in a table definition statement. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsSchemasInTableDefinitions() throws SQLException; @@ -709,7 +709,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether a schema name can be used in an index definition statement. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsSchemasInIndexDefinitions() throws SQLException; @@ -717,7 +717,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether a schema name can be used in a privilege definition statement. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsSchemasInPrivilegeDefinitions() throws SQLException; @@ -725,7 +725,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether a catalog name can be used in a data manipulation statement. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsCatalogsInDataManipulation() throws SQLException; @@ -733,7 +733,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether a catalog name can be used in a procedure call statement. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsCatalogsInProcedureCalls() throws SQLException; @@ -741,7 +741,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether a catalog name can be used in a table definition statement. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsCatalogsInTableDefinitions() throws SQLException; @@ -749,7 +749,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether a catalog name can be used in an index definition statement. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsCatalogsInIndexDefinitions() throws SQLException; @@ -757,7 +757,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether a catalog name can be used in a privilege definition statement. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException; @@ -767,7 +767,7 @@ public interface DatabaseMetaData extends Wrapper { * statements. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsPositionedDelete() throws SQLException; @@ -776,7 +776,7 @@ public interface DatabaseMetaData extends Wrapper { * statements. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsPositionedUpdate() throws SQLException; @@ -785,7 +785,7 @@ public interface DatabaseMetaData extends Wrapper { * statements. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsSelectForUpdate() throws SQLException; @@ -794,7 +794,7 @@ public interface DatabaseMetaData extends Wrapper { * that use the stored procedure escape syntax. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsStoredProcedures() throws SQLException; @@ -803,7 +803,7 @@ public interface DatabaseMetaData extends Wrapper { * expressions. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsSubqueriesInComparisons() throws SQLException; @@ -812,7 +812,7 @@ public interface DatabaseMetaData extends Wrapper { * <code>EXISTS</code> expressions. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsSubqueriesInExists() throws SQLException; @@ -821,7 +821,7 @@ public interface DatabaseMetaData extends Wrapper { * <code>IN</code> expressions. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsSubqueriesInIns() throws SQLException; @@ -830,7 +830,7 @@ public interface DatabaseMetaData extends Wrapper { * expressions. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsSubqueriesInQuantifieds() throws SQLException; @@ -838,7 +838,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether this database supports correlated subqueries. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsCorrelatedSubqueries() throws SQLException; @@ -846,7 +846,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether this database supports SQL <code>UNION</code>. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsUnion() throws SQLException; @@ -854,7 +854,7 @@ public interface DatabaseMetaData extends Wrapper { * Retrieves whether this database supports SQL <code>UNION ALL</code>. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsUnionAll() throws SQLException; @@ -864,7 +864,7 @@ public interface DatabaseMetaData extends Wrapper { * * @return <code>true</code> if cursors always remain open; * <code>false</code> if they might not remain open - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsOpenCursorsAcrossCommit() throws SQLException; @@ -874,7 +874,7 @@ public interface DatabaseMetaData extends Wrapper { * * @return <code>true</code> if cursors always remain open; * <code>false</code> if they might not remain open - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsOpenCursorsAcrossRollback() throws SQLException; @@ -884,7 +884,7 @@ public interface DatabaseMetaData extends Wrapper { * * @return <code>true</code> if statements always remain open; * <code>false</code> if they might not remain open - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsOpenStatementsAcrossCommit() throws SQLException; @@ -894,7 +894,7 @@ public interface DatabaseMetaData extends Wrapper { * * @return <code>true</code> if statements always remain open; * <code>false</code> if they might not remain open - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsOpenStatementsAcrossRollback() throws SQLException; @@ -913,7 +913,7 @@ public interface DatabaseMetaData extends Wrapper { * @return max the maximum length (in hex characters) for a binary literal; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxBinaryLiteralLength() throws SQLException; @@ -924,7 +924,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of characters allowed for a character literal; * a result of zero means that there is no limit or the limit is * not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxCharLiteralLength() throws SQLException; @@ -935,7 +935,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of characters allowed for a column name; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxColumnNameLength() throws SQLException; @@ -946,7 +946,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of columns allowed; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxColumnsInGroupBy() throws SQLException; @@ -956,7 +956,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of columns allowed; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxColumnsInIndex() throws SQLException; @@ -967,7 +967,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of columns allowed; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxColumnsInOrderBy() throws SQLException; @@ -978,7 +978,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of columns allowed; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxColumnsInSelect() throws SQLException; @@ -988,7 +988,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of columns allowed; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxColumnsInTable() throws SQLException; @@ -999,7 +999,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of active connections possible at one time; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxConnections() throws SQLException; @@ -1010,7 +1010,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of characters allowed in a cursor name; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxCursorNameLength() throws SQLException; @@ -1022,7 +1022,7 @@ public interface DatabaseMetaData extends Wrapper { * composite of all the constituent parts of the index; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxIndexLength() throws SQLException; @@ -1033,7 +1033,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of characters allowed in a schema name; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxSchemaNameLength() throws SQLException; @@ -1044,7 +1044,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of characters allowed in a procedure name; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxProcedureNameLength() throws SQLException; @@ -1055,7 +1055,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of characters allowed in a catalog name; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxCatalogNameLength() throws SQLException; @@ -1065,7 +1065,7 @@ public interface DatabaseMetaData extends Wrapper { * * @return the maximum number of bytes allowed for a row; a result of * zero means that there is no limit or the limit is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxRowSize() throws SQLException; @@ -1075,7 +1075,7 @@ public interface DatabaseMetaData extends Wrapper { * <code>LONGVARCHAR</code> and <code>LONGVARBINARY</code>. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean doesMaxRowSizeIncludeBlobs() throws SQLException; @@ -1086,7 +1086,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of characters allowed for an SQL statement; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxStatementLength() throws SQLException; @@ -1097,7 +1097,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of statements that can be open at one time; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxStatements() throws SQLException; @@ -1108,7 +1108,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of characters allowed for a table name; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxTableNameLength() throws SQLException; @@ -1119,7 +1119,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of tables allowed in a <code>SELECT</code> * statement; a result of zero means that there is no limit or * the limit is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxTablesInSelect() throws SQLException; @@ -1130,7 +1130,7 @@ public interface DatabaseMetaData extends Wrapper { * @return the maximum number of characters allowed for a user name; * a result of zero means that there is no limit or the limit * is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getMaxUserNameLength() throws SQLException; @@ -1141,7 +1141,7 @@ public interface DatabaseMetaData extends Wrapper { * possible values are defined in <code>java.sql.Connection</code>. * * @return the default isolation level - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see Connection */ int getDefaultTransactionIsolation() throws SQLException; @@ -1153,7 +1153,7 @@ public interface DatabaseMetaData extends Wrapper { * * @return <code>true</code> if transactions are supported; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsTransactions() throws SQLException; @@ -1163,7 +1163,7 @@ public interface DatabaseMetaData extends Wrapper { * @param level one of the transaction isolation levels defined in * <code>java.sql.Connection</code> * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see Connection */ boolean supportsTransactionIsolationLevel(int level) @@ -1174,7 +1174,7 @@ boolean supportsTransactionIsolationLevel(int level) * data manipulation statements within a transaction. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException; @@ -1183,7 +1183,7 @@ boolean supportsDataDefinitionAndDataManipulationTransactions() * statements within a transaction. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean supportsDataManipulationTransactionsOnly() throws SQLException; @@ -1193,7 +1193,7 @@ boolean supportsDataManipulationTransactionsOnly() * the transaction to commit. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean dataDefinitionCausesTransactionCommit() throws SQLException; @@ -1203,7 +1203,7 @@ boolean dataDefinitionCausesTransactionCommit() * within a transaction. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean dataDefinitionIgnoredInTransactions() throws SQLException; @@ -1251,7 +1251,7 @@ boolean dataDefinitionIgnoredInTransactions() * @param procedureNamePattern a procedure name pattern; must match the * procedure name as it is stored in the database * @return <code>ResultSet</code> - each row is a procedure description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getSearchStringEscape */ ResultSet getProcedures(String catalog, String schemaPattern, @@ -1374,7 +1374,7 @@ ResultSet getProcedures(String catalog, String schemaPattern, * as it is stored in the database * @return <code>ResultSet</code> - each row describes a stored procedure parameter or * column - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getSearchStringEscape */ ResultSet getProcedureColumns(String catalog, @@ -1516,7 +1516,7 @@ ResultSet getProcedureColumns(String catalog, * returned from {@link #getTableTypes},to include; <code>null</code> returns * all types * @return <code>ResultSet</code> - each row is a table description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getSearchStringEscape */ ResultSet getTables(String catalog, String schemaPattern, @@ -1535,7 +1535,7 @@ ResultSet getTables(String catalog, String schemaPattern, * * @return a <code>ResultSet</code> object in which each row is a * schema description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * */ ResultSet getSchemas() throws SQLException; @@ -1551,7 +1551,7 @@ ResultSet getTables(String catalog, String schemaPattern, * * @return a <code>ResultSet</code> object in which each row has a * single <code>String</code> column that is a catalog name - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ ResultSet getCatalogs() throws SQLException; @@ -1568,7 +1568,7 @@ ResultSet getTables(String catalog, String schemaPattern, * * @return a <code>ResultSet</code> object in which each row has a * single <code>String</code> column that is a table type - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ ResultSet getTableTypes() throws SQLException; @@ -1659,7 +1659,7 @@ ResultSet getTables(String catalog, String schemaPattern, * @param columnNamePattern a column name pattern; must match the column * name as it is stored in the database * @return <code>ResultSet</code> - each row is a column description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getSearchStringEscape */ ResultSet getColumns(String catalog, String schemaPattern, @@ -1729,7 +1729,7 @@ ResultSet getColumns(String catalog, String schemaPattern, * @param columnNamePattern a column name pattern; must match the column * name as it is stored in the database * @return <code>ResultSet</code> - each row is a column privilege description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getSearchStringEscape */ ResultSet getColumnPrivileges(String catalog, String schema, @@ -1772,7 +1772,7 @@ ResultSet getColumnPrivileges(String catalog, String schema, * @param tableNamePattern a table name pattern; must match the * table name as it is stored in the database * @return <code>ResultSet</code> - each row is a table privilege description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getSearchStringEscape */ ResultSet getTablePrivileges(String catalog, String schemaPattern, @@ -1827,7 +1827,7 @@ ResultSet getTablePrivileges(String catalog, String schemaPattern, * @param scope the scope of interest; use same values as SCOPE * @param nullable include columns that are nullable. * @return <code>ResultSet</code> - each row is a column description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException; @@ -1938,7 +1938,7 @@ ResultSet getBestRowIdentifier(String catalog, String schema, * in the database * @return a <code>ResultSet</code> object in which each row is a * column description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException; @@ -2000,7 +2000,7 @@ ResultSet getVersionColumns(String catalog, String schema, * @param table a table name; must match the table name as it is stored * in the database * @return <code>ResultSet</code> - each row is a primary key column description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException; @@ -2077,7 +2077,7 @@ ResultSet getPrimaryKeys(String catalog, String schema, * @param table a table name; must match the table name as it is stored * in the database * @return <code>ResultSet</code> - each row is a primary key column description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getExportedKeys */ ResultSet getImportedKeys(String catalog, String schema, @@ -2261,7 +2261,7 @@ ResultSet getImportedKeys(String catalog, String schema, * in this database * @return a <code>ResultSet</code> object in which each row is a * foreign key column description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getImportedKeys */ ResultSet getExportedKeys(String catalog, String schema, @@ -2347,7 +2347,7 @@ ResultSet getExportedKeys(String catalog, String schema, * @param foreignTable the name of the table that imports the key; must match * the table name as it is stored in the database * @return <code>ResultSet</code> - each row is a foreign key column description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getImportedKeys */ ResultSet getCrossReference( @@ -2416,7 +2416,7 @@ ResultSet getCrossReference( * * @return a <code>ResultSet</code> object in which each row is an SQL * type description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ ResultSet getTypeInfo() throws SQLException; @@ -2548,7 +2548,7 @@ ResultSet getCrossReference( * or out of data values; when false, results are requested to be * accurate * @return <code>ResultSet</code> - each row is an index column description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) @@ -2600,7 +2600,7 @@ ResultSet getIndexInfo(String catalog, String schema, String table, * * @param type defined in <code>java.sql.ResultSet</code> * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see Connection * @since 1.2 */ @@ -2613,7 +2613,7 @@ ResultSet getIndexInfo(String catalog, String schema, String table, * @param type defined in <code>java.sql.ResultSet</code> * @param concurrency type defined in <code>java.sql.ResultSet</code> * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see Connection * @since 1.2 */ @@ -2631,7 +2631,7 @@ boolean supportsResultSetConcurrency(int type, int concurrency) * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> * @return <code>true</code> if updates are visible for the given result set type; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.2 */ boolean ownUpdatesAreVisible(int type) throws SQLException; @@ -2645,7 +2645,7 @@ boolean supportsResultSetConcurrency(int type, int concurrency) * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> * @return <code>true</code> if deletes are visible for the given result set type; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.2 */ boolean ownDeletesAreVisible(int type) throws SQLException; @@ -2659,7 +2659,7 @@ boolean supportsResultSetConcurrency(int type, int concurrency) * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> * @return <code>true</code> if inserts are visible for the given result set type; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.2 */ boolean ownInsertsAreVisible(int type) throws SQLException; @@ -2674,7 +2674,7 @@ boolean supportsResultSetConcurrency(int type, int concurrency) * @return <code>true</code> if updates made by others * are visible for the given result set type; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.2 */ boolean othersUpdatesAreVisible(int type) throws SQLException; @@ -2689,7 +2689,7 @@ boolean supportsResultSetConcurrency(int type, int concurrency) * @return <code>true</code> if deletes made by others * are visible for the given result set type; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.2 */ boolean othersDeletesAreVisible(int type) throws SQLException; @@ -2704,7 +2704,7 @@ boolean supportsResultSetConcurrency(int type, int concurrency) * @return <code>true</code> if inserts made by others * are visible for the given result set type; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.2 */ boolean othersInsertsAreVisible(int type) throws SQLException; @@ -2719,7 +2719,7 @@ boolean supportsResultSetConcurrency(int type, int concurrency) * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> * @return <code>true</code> if changes are detected by the result set type; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.2 */ boolean updatesAreDetected(int type) throws SQLException; @@ -2736,7 +2736,7 @@ boolean supportsResultSetConcurrency(int type, int concurrency) * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> * @return <code>true</code> if deletes are detected by the given result set type; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.2 */ boolean deletesAreDetected(int type) throws SQLException; @@ -2751,7 +2751,7 @@ boolean supportsResultSetConcurrency(int type, int concurrency) * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> * @return <code>true</code> if changes are detected by the specified result * set type; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.2 */ boolean insertsAreDetected(int type) throws SQLException; @@ -2761,7 +2761,7 @@ boolean supportsResultSetConcurrency(int type, int concurrency) * * @return <code>true</code> if this database supports batch updates; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.2 */ boolean supportsBatchUpdates() throws SQLException; @@ -2811,7 +2811,7 @@ boolean supportsResultSetConcurrency(int type, int concurrency) * @param types a list of user-defined types (JAVA_OBJECT, * STRUCT, or DISTINCT) to include; <code>null</code> returns all types * @return <code>ResultSet</code> object in which each row describes a UDT - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getSearchStringEscape * @since 1.2 */ @@ -2823,7 +2823,7 @@ ResultSet getUDTs(String catalog, String schemaPattern, * Retrieves the connection that produced this metadata object. * * @return the connection that produced this metadata object - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.2 */ Connection getConnection() throws SQLException; @@ -2835,7 +2835,7 @@ ResultSet getUDTs(String catalog, String schemaPattern, * * @return <code>true</code> if savepoints are supported; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ boolean supportsSavepoints() throws SQLException; @@ -2846,7 +2846,7 @@ ResultSet getUDTs(String catalog, String schemaPattern, * * @return <code>true</code> if named parameters are supported; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ boolean supportsNamedParameters() throws SQLException; @@ -2859,7 +2859,7 @@ ResultSet getUDTs(String catalog, String schemaPattern, * @return <code>true</code> if a <code>CallableStatement</code> object * can return multiple <code>ResultSet</code> objects * simultaneously; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ boolean supportsMultipleOpenResults() throws SQLException; @@ -2873,7 +2873,7 @@ ResultSet getUDTs(String catalog, String schemaPattern, * <p>If <code>true</code> is returned, the JDBC driver must support the * returning of auto-generated keys for at least SQL INSERT statements * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ boolean supportsGetGeneratedKeys() throws SQLException; @@ -3061,7 +3061,7 @@ ResultSet getSuperTables(String catalog, String schemaPattern, * name as it is declared in the database * @return a <code>ResultSet</code> object in which each row is an * attribute description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getSearchStringEscape * @since 1.4 */ @@ -3076,7 +3076,7 @@ ResultSet getAttributes(String catalog, String schemaPattern, * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code> * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see Connection * @since 1.4 */ @@ -3089,7 +3089,7 @@ ResultSet getAttributes(String catalog, String schemaPattern, * @return the default holdability; either * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code> - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ int getResultSetHoldability() throws SQLException; @@ -3098,7 +3098,7 @@ ResultSet getAttributes(String catalog, String schemaPattern, * Retrieves the major version number of the underlying database. * * @return the underlying database's major version - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ int getDatabaseMajorVersion() throws SQLException; @@ -3107,7 +3107,7 @@ ResultSet getAttributes(String catalog, String schemaPattern, * Retrieves the minor version number of the underlying database. * * @return underlying database's minor version - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ int getDatabaseMinorVersion() throws SQLException; @@ -3117,7 +3117,7 @@ ResultSet getAttributes(String catalog, String schemaPattern, * driver. * * @return JDBC version major number - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ int getJDBCMajorVersion() throws SQLException; @@ -3127,7 +3127,7 @@ ResultSet getAttributes(String catalog, String schemaPattern, * driver. * * @return JDBC version minor number - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ int getJDBCMinorVersion() throws SQLException; @@ -3228,7 +3228,7 @@ ResultSet getAttributes(String catalog, String schemaPattern, * schema name should not be used to narrow down the search. * @return a <code>ResultSet</code> object in which each row is a * schema description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getSearchStringEscape * @since 1.6 */ @@ -3239,7 +3239,7 @@ ResultSet getAttributes(String catalog, String schemaPattern, * using the stored procedure escape syntax. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.6 */ boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException; @@ -3252,7 +3252,7 @@ ResultSet getAttributes(String catalog, String schemaPattern, * is in whether or not holdable ResultSets are closed. * * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.6 */ boolean autoCommitFailureClosesAllResultSets() throws SQLException; @@ -3274,7 +3274,7 @@ ResultSet getAttributes(String catalog, String schemaPattern, * @return A <code>ResultSet</code> object; each row is a supported client info * property * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * * @since 1.6 */ @@ -3325,7 +3325,7 @@ ResultSet getClientInfoProperties() * @param functionNamePattern a function name pattern; must match the * function name as it is stored in the database * @return <code>ResultSet</code> - each row is a function description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getSearchStringEscape * @since 1.6 */ @@ -3421,7 +3421,7 @@ ResultSet getFunctions(String catalog, String schemaPattern, * @return <code>ResultSet</code> - each row describes a * user function parameter, column or return type * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getSearchStringEscape * @since 1.6 */ @@ -3621,7 +3621,7 @@ ResultSet getFunctionColumns(String catalog, * @param columnNamePattern a column name pattern; must match the column * name as it is stored in the database * @return <code>ResultSet</code> - each row is a column description - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see PseudoColumnUsage * @since 1.7 */ @@ -3636,7 +3636,7 @@ ResultSet getPseudoColumns(String catalog, String schemaPattern, * may not be based on the column(s) for the auto generated key. * Consult your JDBC driver documentation for additional details. * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.7 */ boolean generatedKeyAlwaysReturned() throws SQLException; @@ -3652,7 +3652,7 @@ ResultSet getPseudoColumns(String catalog, String schemaPattern, * * @return the maximum number of bytes allowed; a result of zero * means that there is no limit or the limit is not known - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.8 */ default long getMaxLogicalLobSize() throws SQLException { @@ -3666,7 +3666,7 @@ default long getMaxLogicalLobSize() throws SQLException { * * @return {@code true} if this database supports REF CURSOR; * {@code false} otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.8 */ default boolean supportsRefCursors() throws SQLException{ @@ -3682,7 +3682,7 @@ default boolean supportsRefCursors() throws SQLException{ * * @return {@code true} if this database supports sharding; * {@code false} otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 9 */ default boolean supportsSharding() throws SQLException { diff --git a/src/java.sql/share/classes/java/sql/Date.java b/src/java.sql/share/classes/java/sql/Date.java index f8da3e7f94b..1512ea8b684 100644 --- a/src/java.sql/share/classes/java/sql/Date.java +++ b/src/java.sql/share/classes/java/sql/Date.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -194,7 +194,7 @@ static void formatDecimalInt(int val, char[] buf, int offset, int len) { * values do not have a time component. * * @deprecated - * @exception java.lang.IllegalArgumentException if this method is invoked + * @throws java.lang.IllegalArgumentException if this method is invoked * @see #setHours */ @Deprecated(since="1.2") @@ -207,7 +207,7 @@ public int getHours() { * values do not have a time component. * * @deprecated - * @exception java.lang.IllegalArgumentException if this method is invoked + * @throws java.lang.IllegalArgumentException if this method is invoked * @see #setMinutes */ @Deprecated(since="1.2") @@ -220,7 +220,7 @@ public int getMinutes() { * values do not have a time component. * * @deprecated - * @exception java.lang.IllegalArgumentException if this method is invoked + * @throws java.lang.IllegalArgumentException if this method is invoked * @see #setSeconds */ @Deprecated(since="1.2") @@ -233,7 +233,7 @@ public int getSeconds() { * values do not have a time component. * * @deprecated - * @exception java.lang.IllegalArgumentException if this method is invoked + * @throws java.lang.IllegalArgumentException if this method is invoked * @see #getHours */ @Deprecated(since="1.2") @@ -246,7 +246,7 @@ public void setHours(int i) { * values do not have a time component. * * @deprecated - * @exception java.lang.IllegalArgumentException if this method is invoked + * @throws java.lang.IllegalArgumentException if this method is invoked * @see #getMinutes */ @Deprecated(since="1.2") @@ -259,7 +259,7 @@ public void setMinutes(int i) { * values do not have a time component. * * @deprecated - * @exception java.lang.IllegalArgumentException if this method is invoked + * @throws java.lang.IllegalArgumentException if this method is invoked * @see #getSeconds */ @Deprecated(since="1.2") @@ -283,7 +283,7 @@ public void setSeconds(int i) { * * @param date a {@code LocalDate} to convert * @return a {@code Date} object - * @exception NullPointerException if {@code date} is null + * @throws NullPointerException if {@code date} is null * @since 1.8 */ @SuppressWarnings("deprecation") @@ -309,7 +309,7 @@ public LocalDate toLocalDate() { * not be used because SQL {@code Date} values do not have a time * component. * - * @exception java.lang.UnsupportedOperationException if this method is invoked + * @throws java.lang.UnsupportedOperationException if this method is invoked */ @Override public Instant toInstant() { diff --git a/src/java.sql/share/classes/java/sql/Driver.java b/src/java.sql/share/classes/java/sql/Driver.java index d690dd408b8..69d4f6362db 100644 --- a/src/java.sql/share/classes/java/sql/Driver.java +++ b/src/java.sql/share/classes/java/sql/Driver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -85,7 +85,7 @@ public interface Driver { * "password" property should be included. * @return a <code>Connection</code> object that represents a * connection to the URL - * @exception SQLException if a database access error occurs or the url is + * @throws SQLException if a database access error occurs or the url is * {@code null} */ Connection connect(String url, java.util.Properties info) @@ -100,7 +100,7 @@ Connection connect(String url, java.util.Properties info) * @param url the URL of the database * @return <code>true</code> if this driver understands the given URL; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs or the url is + * @throws SQLException if a database access error occurs or the url is * {@code null} */ boolean acceptsURL(String url) throws SQLException; @@ -123,7 +123,7 @@ Connection connect(String url, java.util.Properties info) * @return an array of <code>DriverPropertyInfo</code> objects describing * possible properties. This array may be an empty array if * no properties are required. - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ DriverPropertyInfo[] getPropertyInfo(String url, java.util.Properties info) throws SQLException; diff --git a/src/java.sql/share/classes/java/sql/DriverManager.java b/src/java.sql/share/classes/java/sql/DriverManager.java index bb106a84d31..db4a08321cc 100644 --- a/src/java.sql/share/classes/java/sql/DriverManager.java +++ b/src/java.sql/share/classes/java/sql/DriverManager.java @@ -175,7 +175,7 @@ public static void setLogWriter(java.io.PrintWriter out) { * connection arguments; normally at least a "user" and * "password" property should be included * @return a Connection to the URL - * @exception SQLException if a database access error occurs or the url is + * @throws SQLException if a database access error occurs or the url is * {@code null} * @throws SQLTimeoutException when the driver has determined that the * timeout value specified by the {@code setLoginTimeout} method @@ -206,7 +206,7 @@ public static Connection getConnection(String url, * made * @param password the user's password * @return a connection to the URL - * @exception SQLException if a database access error occurs or the url is + * @throws SQLException if a database access error occurs or the url is * {@code null} * @throws SQLTimeoutException when the driver has determined that the * timeout value specified by the {@code setLoginTimeout} method @@ -236,7 +236,7 @@ public static Connection getConnection(String url, * @param url a database url of the form * <code> jdbc:<em>subprotocol</em>:<em>subname</em></code> * @return a connection to the URL - * @exception SQLException if a database access error occurs or the url is + * @throws SQLException if a database access error occurs or the url is * {@code null} * @throws SQLTimeoutException when the driver has determined that the * timeout value specified by the {@code setLoginTimeout} method @@ -260,7 +260,7 @@ public static Connection getConnection(String url) * <code>jdbc:<em>subprotocol</em>:<em>subname</em></code> * @return a <code>Driver</code> object representing a driver * that can connect to the given URL - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ @CallerSensitive public static Driver getDriver(String url) @@ -308,8 +308,8 @@ public static Driver getDriver(String url) * * @param driver the new JDBC Driver that is to be registered with the * {@code DriverManager} - * @exception SQLException if a database access error occurs - * @exception NullPointerException if {@code driver} is null + * @throws SQLException if a database access error occurs + * @throws NullPointerException if {@code driver} is null */ public static void registerDriver(java.sql.Driver driver) throws SQLException { @@ -328,8 +328,8 @@ public static void registerDriver(java.sql.Driver driver) * {@code DriverManager} * @param da the {@code DriverAction} implementation to be used when * {@code DriverManager#deregisterDriver} is called - * @exception SQLException if a database access error occurs - * @exception NullPointerException if {@code driver} is null + * @throws SQLException if a database access error occurs + * @throws NullPointerException if {@code driver} is null * @since 1.8 */ public static void registerDriver(java.sql.Driver driver, @@ -368,7 +368,7 @@ public static void registerDriver(java.sql.Driver driver, * prior to the driver being removed from the list of registered drivers. * * @param driver the JDBC Driver to remove - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @throws SecurityException if a security manager exists and its * {@code checkPermission} method denies permission to deregister a driver. * diff --git a/src/java.sql/share/classes/java/sql/ParameterMetaData.java b/src/java.sql/share/classes/java/sql/ParameterMetaData.java index 84eafdca532..e0a1ce28ca5 100644 --- a/src/java.sql/share/classes/java/sql/ParameterMetaData.java +++ b/src/java.sql/share/classes/java/sql/ParameterMetaData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -48,7 +48,7 @@ public interface ParameterMetaData extends Wrapper { * information. * * @return the number of parameters - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ int getParameterCount() throws SQLException; @@ -61,7 +61,7 @@ public interface ParameterMetaData extends Wrapper { * <code>ParameterMetaData.parameterNoNulls</code>, * <code>ParameterMetaData.parameterNullable</code>, or * <code>ParameterMetaData.parameterNullableUnknown</code> - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ int isNullable(int param) throws SQLException; @@ -89,7 +89,7 @@ public interface ParameterMetaData extends Wrapper { * * @param param the first parameter is 1, the second is 2, ... * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ boolean isSigned(int param) throws SQLException; @@ -106,7 +106,7 @@ public interface ParameterMetaData extends Wrapper { * * @param param the first parameter is 1, the second is 2, ... * @return precision - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ int getPrecision(int param) throws SQLException; @@ -117,7 +117,7 @@ public interface ParameterMetaData extends Wrapper { * * @param param the first parameter is 1, the second is 2, ... * @return scale - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ int getScale(int param) throws SQLException; @@ -127,7 +127,7 @@ public interface ParameterMetaData extends Wrapper { * * @param param the first parameter is 1, the second is 2, ... * @return SQL type from <code>java.sql.Types</code> - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 * @see Types */ @@ -139,7 +139,7 @@ public interface ParameterMetaData extends Wrapper { * @param param the first parameter is 1, the second is 2, ... * @return type the name used by the database. If the parameter type is * a user-defined type, then a fully-qualified type name is returned. - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ String getParameterTypeName(int param) throws SQLException; @@ -155,7 +155,7 @@ public interface ParameterMetaData extends Wrapper { * <code>PreparedStatement.setObject</code> to set the value * in the specified parameter. This is the class name used * for custom mapping. - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ String getParameterClassName(int param) throws SQLException; @@ -189,7 +189,7 @@ public interface ParameterMetaData extends Wrapper { * <code>ParameterMetaData.parameterModeOut</code>, or * <code>ParameterMetaData.parameterModeInOut</code> * <code>ParameterMetaData.parameterModeUnknown</code>. - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.4 */ int getParameterMode(int param) throws SQLException; diff --git a/src/java.sql/share/classes/java/sql/PreparedStatement.java b/src/java.sql/share/classes/java/sql/PreparedStatement.java index 20099093aad..f55ed4e4a71 100644 --- a/src/java.sql/share/classes/java/sql/PreparedStatement.java +++ b/src/java.sql/share/classes/java/sql/PreparedStatement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -68,9 +68,9 @@ public interface PreparedStatement extends Statement { * * @return a <code>ResultSet</code> object that contains the data produced by the * query; never <code>null</code> - * @exception SQLException if a database access error occurs; - * this method is called on a closed <code>PreparedStatement</code> or the SQL - * statement does not return a <code>ResultSet</code> object + * @throws SQLException if a database access error occurs; + * this method is called on a closed {@code PreparedStatement} or the SQL + * statement does not return a {@code ResultSet} object * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} * method has been exceeded and has at least attempted to cancel @@ -86,9 +86,9 @@ public interface PreparedStatement extends Statement { * * @return either (1) the row count for SQL Data Manipulation Language (DML) statements * or (2) 0 for SQL statements that return nothing - * @exception SQLException if a database access error occurs; - * this method is called on a closed <code>PreparedStatement</code> - * or the SQL statement returns a <code>ResultSet</code> object + * @throws SQLException if a database access error occurs; + * this method is called on a closed {@code PreparedStatement} + * or the SQL statement returns a {@code ResultSet} object * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} * method has been exceeded and has at least attempted to cancel @@ -103,15 +103,15 @@ public interface PreparedStatement extends Statement { * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param sqlType the SQL type code defined in <code>java.sql.Types</code> - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> - * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is - * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>, - * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>, - * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>, - * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code> - * or <code>STRUCT</code> data type and the JDBC driver does not support + * this method is called on a closed {@code PreparedStatement} + * @throws SQLFeatureNotSupportedException if {@code sqlType} is + * a {@code ARRAY}, {@code BLOB}, {@code CLOB}, + * {@code DATALINK}, {@code JAVA_OBJECT}, {@code NCHAR}, + * {@code NCLOB}, {@code NVARCHAR}, {@code LONGNVARCHAR}, + * {@code REF}, {@code ROWID}, {@code SQLXML} + * or {@code STRUCT} data type and the JDBC driver does not support * this data type */ void setNull(int parameterIndex, int sqlType) throws SQLException; @@ -123,10 +123,10 @@ public interface PreparedStatement extends Statement { * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; * if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setBoolean(int parameterIndex, boolean x) throws SQLException; @@ -137,9 +137,9 @@ public interface PreparedStatement extends Statement { * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setByte(int parameterIndex, byte x) throws SQLException; @@ -150,9 +150,9 @@ public interface PreparedStatement extends Statement { * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setShort(int parameterIndex, short x) throws SQLException; @@ -163,9 +163,9 @@ public interface PreparedStatement extends Statement { * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setInt(int parameterIndex, int x) throws SQLException; @@ -176,9 +176,9 @@ public interface PreparedStatement extends Statement { * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setLong(int parameterIndex, long x) throws SQLException; @@ -189,9 +189,9 @@ public interface PreparedStatement extends Statement { * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setFloat(int parameterIndex, float x) throws SQLException; @@ -202,9 +202,9 @@ public interface PreparedStatement extends Statement { * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setDouble(int parameterIndex, double x) throws SQLException; @@ -215,9 +215,9 @@ public interface PreparedStatement extends Statement { * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException; @@ -231,9 +231,9 @@ public interface PreparedStatement extends Statement { * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setString(int parameterIndex, String x) throws SQLException; @@ -245,9 +245,9 @@ public interface PreparedStatement extends Statement { * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setBytes(int parameterIndex, byte x[]) throws SQLException; @@ -260,9 +260,9 @@ public interface PreparedStatement extends Statement { * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setDate(int parameterIndex, java.sql.Date x) throws SQLException; @@ -274,9 +274,9 @@ void setDate(int parameterIndex, java.sql.Date x) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setTime(int parameterIndex, java.sql.Time x) throws SQLException; @@ -289,9 +289,9 @@ void setTime(int parameterIndex, java.sql.Time x) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> */ + * this method is called on a closed {@code PreparedStatement} */ void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws SQLException; @@ -311,9 +311,9 @@ void setTimestamp(int parameterIndex, java.sql.Timestamp x) * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the Java input stream that contains the ASCII parameter value * @param length the number of bytes in the stream - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException; @@ -339,10 +339,10 @@ void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) * @param x a <code>java.io.InputStream</code> object that contains the * Unicode parameter value * @param length the number of bytes in the stream - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * this method is called on a closed {@code PreparedStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @deprecated Use {@code setCharacterStream} */ @@ -365,9 +365,9 @@ void setUnicodeStream(int parameterIndex, java.io.InputStream x, * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the java input stream which contains the binary parameter value * @param length the number of bytes in the stream - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} */ void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException; @@ -380,8 +380,8 @@ void setBinaryStream(int parameterIndex, java.io.InputStream x, * release the resources used by the current parameter values; this can * be done by calling the method <code>clearParameters</code>. * - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code PreparedStatement} */ void clearParameters() throws SQLException; @@ -399,10 +399,10 @@ void setBinaryStream(int parameterIndex, java.io.InputStream x, * @param x the object containing the input parameter value * @param targetSqlType the SQL type (as defined in java.sql.Types) to be * sent to the database - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or this * method is called on a closed PreparedStatement - * @exception SQLFeatureNotSupportedException if + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified targetSqlType * @see Types */ @@ -441,9 +441,9 @@ void setObject(int parameterIndex, Object x, int targetSqlType) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the object containing the input parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs; - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * or the type of the given object is ambiguous */ void setObject(int parameterIndex, Object x) throws SQLException; @@ -465,8 +465,8 @@ void setObject(int parameterIndex, Object x, int targetSqlType) * @return <code>true</code> if the first result is a <code>ResultSet</code> * object; <code>false</code> if the first result is an update * count or there is no result - * @exception SQLException if a database access error occurs; - * this method is called on a closed <code>PreparedStatement</code> + * @throws SQLException if a database access error occurs; + * this method is called on a closed {@code PreparedStatement} * or an argument is supplied to this method * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} @@ -486,8 +486,8 @@ void setObject(int parameterIndex, Object x, int targetSqlType) * Adds a set of parameters to this <code>PreparedStatement</code> * object's batch of commands. * - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code PreparedStatement} * @see Statement#addBatch * @since 1.2 */ @@ -510,9 +510,9 @@ void setObject(int parameterIndex, Object x, int targetSqlType) * @param reader the <code>java.io.Reader</code> object that contains the * Unicode data * @param length the number of characters in the stream - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @since 1.2 */ void setCharacterStream(int parameterIndex, @@ -527,9 +527,9 @@ void setCharacterStream(int parameterIndex, * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x an SQL <code>REF</code> value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.2 */ @@ -542,9 +542,9 @@ void setCharacterStream(int parameterIndex, * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x a <code>Blob</code> object that maps an SQL <code>BLOB</code> value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.2 */ @@ -557,9 +557,9 @@ void setCharacterStream(int parameterIndex, * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x a <code>Clob</code> object that maps an SQL <code>CLOB</code> value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.2 */ @@ -572,9 +572,9 @@ void setCharacterStream(int parameterIndex, * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x an <code>Array</code> object that maps an SQL <code>ARRAY</code> value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.2 */ @@ -600,9 +600,9 @@ void setCharacterStream(int parameterIndex, * @return the description of a <code>ResultSet</code> object's columns or * <code>null</code> if the driver cannot return a * <code>ResultSetMetaData</code> object - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code PreparedStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -622,9 +622,9 @@ void setCharacterStream(int parameterIndex, * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the date - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @since 1.2 */ void setDate(int parameterIndex, java.sql.Date x, Calendar cal) @@ -644,9 +644,9 @@ void setDate(int parameterIndex, java.sql.Date x, Calendar cal) * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the time - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @since 1.2 */ void setTime(int parameterIndex, java.sql.Time x, Calendar cal) @@ -666,9 +666,9 @@ void setTime(int parameterIndex, java.sql.Time x, Calendar cal) * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the timestamp - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @since 1.2 */ void setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal) @@ -699,15 +699,15 @@ void setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal) * @param sqlType a value from <code>java.sql.Types</code> * @param typeName the fully-qualified name of an SQL user-defined type; * ignored if the parameter is not a user-defined type or REF - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> - * @exception SQLFeatureNotSupportedException if <code>sqlType</code> is - * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>, - * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>, - * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>, - * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code> - * or <code>STRUCT</code> data type and the JDBC driver does not support + * this method is called on a closed {@code PreparedStatement} + * @throws SQLFeatureNotSupportedException if {@code sqlType} is + * a {@code ARRAY}, {@code BLOB}, {@code CLOB}, + * {@code DATALINK}, {@code JAVA_OBJECT}, {@code NCHAR}, + * {@code NCLOB}, {@code NVARCHAR}, {@code LONGNVARCHAR}, + * {@code REF}, {@code ROWID}, {@code SQLXML} + * or {@code STRUCT} data type and the JDBC driver does not support * this data type or if the JDBC driver does not support this method * @since 1.2 */ @@ -723,9 +723,9 @@ void setNull (int parameterIndex, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the <code>java.net.URL</code> object to be set - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.4 */ @@ -738,8 +738,8 @@ void setNull (int parameterIndex, int sqlType, String typeName) * @return a <code>ParameterMetaData</code> object that contains information * about the number, types and properties for each * parameter marker of this <code>PreparedStatement</code> object - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code PreparedStatement} * @see ParameterMetaData * @since 1.4 */ @@ -946,13 +946,13 @@ void setNClob(int parameterIndex, Reader reader, long length) * this is the length * of the data in the stream or reader. For all other types, * this value will be ignored. - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs; - * this method is called on a closed <code>PreparedStatement</code> or + * this method is called on a closed {@code PreparedStatement} or * if the Java Object specified by x is an InputStream * or Reader object and the value of the scale parameter is less * than zero - * @exception SQLFeatureNotSupportedException if + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified targetSqlType * @see Types * @@ -975,9 +975,9 @@ void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLengt * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the Java input stream that contains the ASCII parameter value * @param length the number of bytes in the stream - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @since 1.6 */ void setAsciiStream(int parameterIndex, java.io.InputStream x, long length) @@ -997,9 +997,9 @@ void setAsciiStream(int parameterIndex, java.io.InputStream x, long length) * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the java input stream which contains the binary parameter value * @param length the number of bytes in the stream - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @since 1.6 */ void setBinaryStream(int parameterIndex, java.io.InputStream x, @@ -1021,9 +1021,9 @@ void setBinaryStream(int parameterIndex, java.io.InputStream x, * @param reader the <code>java.io.Reader</code> object that contains the * Unicode data * @param length the number of characters in the stream - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @since 1.6 */ void setCharacterStream(int parameterIndex, @@ -1047,9 +1047,9 @@ void setCharacterStream(int parameterIndex, * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the Java input stream that contains the ASCII parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ @@ -1071,9 +1071,9 @@ void setAsciiStream(int parameterIndex, java.io.InputStream x) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the java input stream which contains the binary parameter value - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ @@ -1098,9 +1098,9 @@ void setBinaryStream(int parameterIndex, java.io.InputStream x) * @param parameterIndex the first parameter is 1, the second is 2, ... * @param reader the <code>java.io.Reader</code> object that contains the * Unicode data - * @exception SQLException if parameterIndex does not correspond to a parameter + * @throws SQLException if parameterIndex does not correspond to a parameter * marker in the SQL statement; if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * this method is called on a closed {@code PreparedStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ @@ -1250,13 +1250,13 @@ void setNClob(int parameterIndex, Reader reader) * this is the length * of the data in the stream or reader. For all other types, * this value will be ignored. - * @exception SQLException if parameterIndex does not correspond to a + * @throws SQLException if parameterIndex does not correspond to a * parameter marker in the SQL statement; if a database access error occurs * or this method is called on a closed {@code PreparedStatement} or * if the Java Object specified by x is an InputStream * or Reader object and the value of the scale parameter is less * than zero - * @exception SQLFeatureNotSupportedException if + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified targetSqlType * @see JDBCType * @see SQLType @@ -1279,10 +1279,10 @@ default void setObject(int parameterIndex, Object x, SQLType targetSqlType, * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the object containing the input parameter value * @param targetSqlType the SQL type to be sent to the database - * @exception SQLException if parameterIndex does not correspond to a + * @throws SQLException if parameterIndex does not correspond to a * parameter marker in the SQL statement; if a database access error occurs * or this method is called on a closed {@code PreparedStatement} - * @exception SQLFeatureNotSupportedException if + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support the specified targetSqlType * @see JDBCType * @see SQLType @@ -1307,9 +1307,9 @@ default void setObject(int parameterIndex, Object x, SQLType targetSqlType) * * @return either (1) the row count for SQL Data Manipulation Language * (DML) statements or (2) 0 for SQL statements that return nothing - * @exception SQLException if a database access error occurs; - * this method is called on a closed <code>PreparedStatement</code> - * or the SQL statement returns a <code>ResultSet</code> object + * @throws SQLException if a database access error occurs; + * this method is called on a closed {@code PreparedStatement} + * or the SQL statement returns a {@code ResultSet} object * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} * method has been exceeded and has at least attempted to cancel diff --git a/src/java.sql/share/classes/java/sql/Ref.java b/src/java.sql/share/classes/java/sql/Ref.java index 5918dd9d95b..1eda6e888a0 100644 --- a/src/java.sql/share/classes/java/sql/Ref.java +++ b/src/java.sql/share/classes/java/sql/Ref.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -58,8 +58,8 @@ public interface Ref { * this <code>Ref</code> object references. * * @return the fully-qualified SQL name of the referenced SQL structured type - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -77,8 +77,8 @@ public interface Ref { * @return a Java <code>Object</code> that is the custom mapping for * the SQL structured type to which this <code>Ref</code> * object refers - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 * @see #setObject @@ -96,8 +96,8 @@ public interface Ref { * @return a Java <code>Object</code> that is the mapping for * the SQL structured type to which this <code>Ref</code> * object refers - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 * @see #setObject @@ -113,8 +113,8 @@ public interface Ref { * @param value an <code>Object</code> representing the SQL * structured type instance that this * <code>Ref</code> object will reference - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 * @see #getObject() diff --git a/src/java.sql/share/classes/java/sql/ResultSet.java b/src/java.sql/share/classes/java/sql/ResultSet.java index 4478138b7db..f9e14f5f2c2 100644 --- a/src/java.sql/share/classes/java/sql/ResultSet.java +++ b/src/java.sql/share/classes/java/sql/ResultSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -171,8 +171,8 @@ public interface ResultSet extends Wrapper, AutoCloseable { * * @return <code>true</code> if the new current row is valid; * <code>false</code> if there are no more rows - * @exception SQLException if a database access error occurs or this method is - * called on a closed result set + * @throws SQLException if a database access error occurs or this method is + * called on a closed result set */ boolean next() throws SQLException; @@ -202,7 +202,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * object that is already closed is a no-op. * * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void close() throws SQLException; @@ -216,8 +216,8 @@ public interface ResultSet extends Wrapper, AutoCloseable { * * @return <code>true</code> if the last column value read was SQL * <code>NULL</code> and <code>false</code> otherwise - * @exception SQLException if a database access error occurs or this method is - * called on a closed result set + * @throws SQLException if a database access error occurs or this method is + * called on a closed result set */ boolean wasNull() throws SQLException; @@ -231,7 +231,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -252,7 +252,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>false</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -266,7 +266,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>0</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -280,7 +280,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>0</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -294,7 +294,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>0</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -308,7 +308,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>0</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -322,7 +322,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>0</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -336,7 +336,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>0</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -351,10 +351,10 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param scale the number of digits to the right of the decimal point * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @deprecated Use {@code getBigDecimal(int columnIndex)} * or {@code getBigDecimal(String columnLabel)} @@ -371,7 +371,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -385,7 +385,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -399,7 +399,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -413,7 +413,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -440,7 +440,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * as a stream of one-byte ASCII characters; * if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -471,10 +471,10 @@ public interface ResultSet extends Wrapper, AutoCloseable { * if the value is SQL <code>NULL</code>, the value returned is * <code>null</code> * - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @deprecated use <code>getCharacterStream</code> in place of * <code>getUnicodeStream</code> @@ -501,7 +501,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { * as a stream of uninterpreted bytes; * if the value is SQL <code>NULL</code>, the value returned is * <code>null</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -519,7 +519,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -540,7 +540,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>false</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -554,7 +554,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>0</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -568,7 +568,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>0</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -582,7 +582,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>0</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -596,7 +596,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>0</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -610,7 +610,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>0</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -624,7 +624,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>0</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -639,10 +639,10 @@ java.io.InputStream getBinaryStream(int columnIndex) * @param scale the number of digits to the right of the decimal point * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @deprecated Use {@code getBigDecimal(int columnIndex)} * or {@code getBigDecimal(String columnLabel)} @@ -659,7 +659,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -673,7 +673,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -688,7 +688,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * @return the column value; * if the value is SQL <code>NULL</code>, * the value returned is <code>null</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -702,7 +702,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -728,7 +728,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * as a stream of one-byte ASCII characters. * If the value is SQL <code>NULL</code>, * the value returned is <code>null</code>. - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -758,10 +758,10 @@ java.io.InputStream getBinaryStream(int columnIndex) * as a stream of two-byte Unicode characters. * If the value is SQL <code>NULL</code>, the value returned * is <code>null</code>. - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @deprecated use <code>getCharacterStream</code> instead */ @@ -787,7 +787,7 @@ java.io.InputStream getBinaryStream(int columnIndex) * @return a Java input stream that delivers the database column value * as a stream of uninterpreted bytes; * if the value is SQL <code>NULL</code>, the result is <code>null</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -817,8 +817,8 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @return the first <code>SQLWarning</code> object reported or * <code>null</code> if there are none - * @exception SQLException if a database access error occurs or this method is - * called on a closed result set + * @throws SQLException if a database access error occurs or this method is + * called on a closed result set */ SQLWarning getWarnings() throws SQLException; @@ -828,8 +828,8 @@ java.io.InputStream getBinaryStream(String columnLabel) * returns <code>null</code> until a new warning is * reported for this <code>ResultSet</code> object. * - * @exception SQLException if a database access error occurs or this method is - * called on a closed result set + * @throws SQLException if a database access error occurs or this method is + * called on a closed result set */ void clearWarnings() throws SQLException; @@ -851,8 +851,8 @@ java.io.InputStream getBinaryStream(String columnLabel) * is also the current row of this SQL cursor. * * @return the SQL name for this <code>ResultSet</code> object's cursor - * @exception SQLException if a database access error occurs or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or this method is called on a closed result set + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method */ String getCursorName() throws SQLException; @@ -862,8 +862,8 @@ java.io.InputStream getBinaryStream(String columnLabel) * this <code>ResultSet</code> object's columns. * * @return the description of this <code>ResultSet</code> object's columns - * @exception SQLException if a database access error occurs or this method is - * called on a closed result set + * @throws SQLException if a database access error occurs or this method is + * called on a closed result set */ ResultSetMetaData getMetaData() throws SQLException; @@ -901,7 +901,7 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @return a <code>java.lang.Object</code> holding the column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -931,7 +931,7 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return a <code>java.lang.Object</code> holding the column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set */ @@ -945,8 +945,8 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return the column index of the given column name - * @exception SQLException if the <code>ResultSet</code> object - * does not contain a column labeled <code>columnLabel</code>, a database access error occurs + * @throws SQLException if the {@code ResultSet} object + * does not contain a column labeled {@code columnLabel}, a database access error occurs * or this method is called on a closed result set */ int findColumn(String columnLabel) throws SQLException; @@ -966,7 +966,7 @@ java.io.InputStream getBinaryStream(String columnLabel) * value; if the value is SQL <code>NULL</code>, the value returned is * <code>null</code> in the Java programming language. * @param columnIndex the first column is 1, the second is 2, ... - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set * @since 1.2 @@ -982,7 +982,7 @@ java.io.InputStream getBinaryStream(String columnLabel) * @return a <code>java.io.Reader</code> object that contains the column * value; if the value is SQL <code>NULL</code>, the value returned is * <code>null</code> in the Java programming language - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set * @since 1.2 @@ -998,7 +998,7 @@ java.io.InputStream getBinaryStream(String columnLabel) * @return the column value (full precision); * if the value is SQL <code>NULL</code>, the value returned is * <code>null</code> in the Java programming language. - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs or this method is * called on a closed result set * @since 1.2 @@ -1014,7 +1014,7 @@ java.io.InputStream getBinaryStream(String columnLabel) * @return the column value (full precision); * if the value is SQL <code>NULL</code>, the value returned is * <code>null</code> in the Java programming language. - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs or this method is * called on a closed result set * @since 1.2 @@ -1037,9 +1037,9 @@ java.io.InputStream getBinaryStream(String columnLabel) * @return <code>true</code> if the cursor is before the first row; * <code>false</code> if the cursor is at any other position or the * result set contains no rows - * @exception SQLException if a database access error occurs or this method is - * called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or this method is + * called on a closed result set + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1056,9 +1056,9 @@ java.io.InputStream getBinaryStream(String columnLabel) * @return <code>true</code> if the cursor is after the last row; * <code>false</code> if the cursor is at any other position or the * result set contains no rows - * @exception SQLException if a database access error occurs or this method is - * called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or this method is + * called on a closed result set + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1074,9 +1074,9 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @return <code>true</code> if the cursor is on the first row; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs or this method is - * called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or this method is + * called on a closed result set + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1095,9 +1095,9 @@ java.io.InputStream getBinaryStream(String columnLabel) * set type of <code>TYPE_FORWARD_ONLY</code> * @return <code>true</code> if the cursor is on the last row; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs or this method is - * called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or this method is + * called on a closed result set + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1108,10 +1108,10 @@ java.io.InputStream getBinaryStream(String columnLabel) * this <code>ResultSet</code> object, just before the * first row. This method has no effect if the result set contains no rows. * - * @exception SQLException if a database access error + * @throws SQLException if a database access error * occurs; this method is called on a closed result set or the - * result set type is <code>TYPE_FORWARD_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * result set type is {@code TYPE_FORWARD_ONLY} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1121,10 +1121,10 @@ java.io.InputStream getBinaryStream(String columnLabel) * Moves the cursor to the end of * this <code>ResultSet</code> object, just after the * last row. This method has no effect if the result set contains no rows. - * @exception SQLException if a database access error + * @throws SQLException if a database access error * occurs; this method is called on a closed result set - * or the result set type is <code>TYPE_FORWARD_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * or the result set type is {@code TYPE_FORWARD_ONLY} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1136,10 +1136,10 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @return <code>true</code> if the cursor is on a valid row; * <code>false</code> if there are no rows in the result set - * @exception SQLException if a database access error + * @throws SQLException if a database access error * occurs; this method is called on a closed result set - * or the result set type is <code>TYPE_FORWARD_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * or the result set type is {@code TYPE_FORWARD_ONLY} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1151,10 +1151,10 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @return <code>true</code> if the cursor is on a valid row; * <code>false</code> if there are no rows in the result set - * @exception SQLException if a database access error + * @throws SQLException if a database access error * occurs; this method is called on a closed result set - * or the result set type is <code>TYPE_FORWARD_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * or the result set type is {@code TYPE_FORWARD_ONLY} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1169,9 +1169,9 @@ java.io.InputStream getBinaryStream(String columnLabel) * set type of <code>TYPE_FORWARD_ONLY</code> * * @return the current row number; <code>0</code> if there is no current row - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1213,10 +1213,10 @@ java.io.InputStream getBinaryStream(String columnLabel) * <code>ResultSet</code> object; * <code>false</code> if the cursor is before the first row or after the * last row - * @exception SQLException if a database access error + * @throws SQLException if a database access error * occurs; this method is called on a closed result set - * or the result set type is <code>TYPE_FORWARD_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * or the result set type is {@code TYPE_FORWARD_ONLY} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1239,10 +1239,10 @@ java.io.InputStream getBinaryStream(String columnLabel) * forward; a negative number moves the cursor backward * @return <code>true</code> if the cursor is on a row; * <code>false</code> otherwise - * @exception SQLException if a database access error occurs; this method + * @throws SQLException if a database access error occurs; this method * is called on a closed result set or the result set type is - * <code>TYPE_FORWARD_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * {@code TYPE_FORWARD_ONLY} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1263,10 +1263,10 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @return <code>true</code> if the cursor is now positioned on a valid row; * <code>false</code> if the cursor is positioned before the first row - * @exception SQLException if a database access error + * @throws SQLException if a database access error * occurs; this method is called on a closed result set - * or the result set type is <code>TYPE_FORWARD_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * or the result set type is {@code TYPE_FORWARD_ONLY} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1314,10 +1314,10 @@ java.io.InputStream getBinaryStream(String columnLabel) * fetch direction; one of <code>ResultSet.FETCH_FORWARD</code>, * <code>ResultSet.FETCH_REVERSE</code>, or * <code>ResultSet.FETCH_UNKNOWN</code> - * @exception SQLException if a database access error occurs; this + * @throws SQLException if a database access error occurs; this * method is called on a closed result set or - * the result set type is <code>TYPE_FORWARD_ONLY</code> and the fetch - * direction is not <code>FETCH_FORWARD</code> + * the result set type is {@code TYPE_FORWARD_ONLY} and the fetch + * direction is not {@code FETCH_FORWARD} * @since 1.2 * @see Statement#setFetchDirection * @see #getFetchDirection @@ -1329,7 +1329,7 @@ java.io.InputStream getBinaryStream(String columnLabel) * <code>ResultSet</code> object. * * @return the current fetch direction for this <code>ResultSet</code> object - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed result set * @since 1.2 * @see #setFetchDirection @@ -1347,7 +1347,7 @@ java.io.InputStream getBinaryStream(String columnLabel) * that created the result set. The fetch size may be changed at any time. * * @param rows the number of rows to fetch - * @exception SQLException if a database access error occurs; this method + * @throws SQLException if a database access error occurs; this method * is called on a closed result set or the * condition {@code rows >= 0} is not satisfied * @since 1.2 @@ -1360,7 +1360,7 @@ java.io.InputStream getBinaryStream(String columnLabel) * <code>ResultSet</code> object. * * @return the current fetch size for this <code>ResultSet</code> object - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed result set * @since 1.2 * @see #setFetchSize @@ -1398,7 +1398,7 @@ java.io.InputStream getBinaryStream(String columnLabel) * @return <code>ResultSet.TYPE_FORWARD_ONLY</code>, * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, * or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed result set * @since 1.2 */ @@ -1426,7 +1426,7 @@ java.io.InputStream getBinaryStream(String columnLabel) * @return the concurrency type, either * <code>ResultSet.CONCUR_READ_ONLY</code> * or <code>ResultSet.CONCUR_UPDATABLE</code> - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed result set * @since 1.2 */ @@ -1444,9 +1444,9 @@ java.io.InputStream getBinaryStream(String columnLabel) * concurrency of <code>CONCUR_READ_ONLY</code> * @return <code>true</code> if the current row is detected to * have been visibly updated by the owner or another; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see DatabaseMetaData#updatesAreDetected * @since 1.2 @@ -1462,9 +1462,9 @@ java.io.InputStream getBinaryStream(String columnLabel) * concurrency of <code>CONCUR_READ_ONLY</code> * @return <code>true</code> if the current row is detected to * have been inserted; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * * @see DatabaseMetaData#insertsAreDetected @@ -1482,9 +1482,9 @@ java.io.InputStream getBinaryStream(String columnLabel) * concurrency of <code>CONCUR_READ_ONLY</code> * @return <code>true</code> if the current row is detected to * have been deleted by the owner or another; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * * @see DatabaseMetaData#deletesAreDetected @@ -1501,11 +1501,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * or <code>insertRow</code> methods are called to update the database. * * @param columnIndex the first column is 1, the second is 2, ... - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1520,11 +1520,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1540,11 +1540,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1559,11 +1559,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1578,11 +1578,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1597,11 +1597,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1616,11 +1616,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1635,11 +1635,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1655,11 +1655,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1674,11 +1674,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1693,11 +1693,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1712,11 +1712,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1731,11 +1731,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1751,11 +1751,11 @@ java.io.InputStream getBinaryStream(String columnLabel) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1773,11 +1773,11 @@ void updateTimestamp(int columnIndex, java.sql.Timestamp x) * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @param length the length of the stream - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1796,11 +1796,11 @@ void updateAsciiStream(int columnIndex, * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @param length the length of the stream - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1819,11 +1819,11 @@ void updateBinaryStream(int columnIndex, * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @param length the length of the stream - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1853,11 +1853,11 @@ void updateCharacterStream(int columnIndex, * this is the length * of the data in the stream or reader. For all other types, * this value will be ignored. - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1874,11 +1874,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1892,11 +1892,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * <code>insertRow</code> methods are called to update the database. * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1911,11 +1911,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1930,11 +1930,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1949,11 +1949,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1968,11 +1968,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -1987,11 +1987,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2006,11 +2006,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2025,11 +2025,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2045,11 +2045,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2064,11 +2064,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2084,11 +2084,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2103,11 +2103,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2122,11 +2122,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2142,11 +2142,11 @@ void updateObject(int columnIndex, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2164,11 +2164,11 @@ void updateTimestamp(String columnLabel, java.sql.Timestamp x) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value * @param length the length of the stream - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2187,11 +2187,11 @@ void updateAsciiStream(String columnLabel, * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value * @param length the length of the stream - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2211,11 +2211,11 @@ void updateBinaryStream(String columnLabel, * @param reader the <code>java.io.Reader</code> object containing * the new column value * @param length the length of the stream - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2245,11 +2245,11 @@ void updateCharacterStream(String columnLabel, * this is the length * of the data in the stream or reader. For all other types, * this value will be ignored. - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2266,11 +2266,11 @@ void updateObject(String columnLabel, Object x, int scaleOrLength) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2281,13 +2281,13 @@ void updateObject(String columnLabel, Object x, int scaleOrLength) * <code>ResultSet</code> object and into the database. * The cursor must be on the insert row when this method is called. * - * @exception SQLException if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code>, + * @throws SQLException if a database access error occurs; + * the result set concurrency is {@code CONCUR_READ_ONLY}, * this method is called on a closed result set, * if this method is called when the cursor is not on the insert row, * or if not all of non-nullable columns in * the insert row have been given a non-null value - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2298,11 +2298,11 @@ void updateObject(String columnLabel, Object x, int scaleOrLength) * current row of this <code>ResultSet</code> object. * This method cannot be called when the cursor is on the insert row. * - * @exception SQLException if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code>; + * @throws SQLException if a database access error occurs; + * the result set concurrency is {@code CONCUR_READ_ONLY}; * this method is called on a closed result set or * if this method is called when the cursor is on the insert row - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2313,11 +2313,11 @@ void updateObject(String columnLabel, Object x, int scaleOrLength) * and from the underlying database. This method cannot be called when * the cursor is on the insert row. * - * @exception SQLException if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code>; + * @throws SQLException if a database access error occurs; + * the result set concurrency is {@code CONCUR_READ_ONLY}; * this method is called on a closed result set * or if this method is called when the cursor is on the insert row - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2344,11 +2344,11 @@ void updateObject(String columnLabel, Object x, int scaleOrLength) * updates made to the row are lost. Calling the method * <code>refreshRow</code> frequently will likely slow performance. * - * @exception SQLException if a database access error + * @throws SQLException if a database access error * occurs; this method is called on a closed result set; - * the result set type is <code>TYPE_FORWARD_ONLY</code> or if this + * the result set type is {@code TYPE_FORWARD_ONLY} or if this * method is called when the cursor is on the insert row - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method or this method is not supported for the specified result * set type and result set concurrency. * @since 1.2 @@ -2365,12 +2365,12 @@ void updateObject(String columnLabel, Object x, int scaleOrLength) * <code>updateRow</code> has already been called, this method has no * effect. * - * @exception SQLException if a database access error - * occurs; this method is called on a closed result set; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * @throws SQLException if a database access error + * occurs; this method is called on a closed result set; + * the result set concurrency is {@code CONCUR_READ_ONLY} * or if this method is called when the cursor is * on the insert row - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2393,10 +2393,10 @@ void updateObject(String columnLabel, Object x, int scaleOrLength) * An updater method must be called before a * getter method can be called on a column value. * - * @exception SQLException if a database access error occurs; this + * @throws SQLException if a database access error occurs; this * method is called on a closed result set - * or the result set concurrency is <code>CONCUR_READ_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * or the result set concurrency is {@code CONCUR_READ_ONLY} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2407,10 +2407,10 @@ void updateObject(String columnLabel, Object x, int scaleOrLength) * current row. This method has no effect if the cursor is not on * the insert row. * - * @exception SQLException if a database access error occurs; this + * @throws SQLException if a database access error occurs; this * method is called on a closed result set - * or the result set concurrency is <code>CONCUR_READ_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * or the result set concurrency is {@code CONCUR_READ_ONLY} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2426,7 +2426,7 @@ void updateObject(String columnLabel, Object x, int scaleOrLength) * @return the <code>Statement</code> object that produced * this <code>ResultSet</code> object or <code>null</code> * if the result set was produced some other way - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * or this method is called on a closed result set * @since 1.2 */ @@ -2447,10 +2447,10 @@ void updateObject(String columnLabel, Object x, int scaleOrLength) * from SQL type names to classes in the Java programming language * @return an <code>Object</code> in the Java programming language * representing the SQL value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2465,10 +2465,10 @@ Object getObject(int columnIndex, java.util.Map<String,Class<?>> map) * @param columnIndex the first column is 1, the second is 2, ... * @return a <code>Ref</code> object representing an SQL <code>REF</code> * value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2482,10 +2482,10 @@ Object getObject(int columnIndex, java.util.Map<String,Class<?>> map) * @param columnIndex the first column is 1, the second is 2, ... * @return a <code>Blob</code> object representing the SQL * <code>BLOB</code> value in the specified column - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2499,10 +2499,10 @@ Object getObject(int columnIndex, java.util.Map<String,Class<?>> map) * @param columnIndex the first column is 1, the second is 2, ... * @return a <code>Clob</code> object representing the SQL * <code>CLOB</code> value in the specified column - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2516,10 +2516,10 @@ Object getObject(int columnIndex, java.util.Map<String,Class<?>> map) * @param columnIndex the first column is 1, the second is 2, ... * @return an <code>Array</code> object representing the SQL * <code>ARRAY</code> value in the specified column - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2539,10 +2539,10 @@ Object getObject(int columnIndex, java.util.Map<String,Class<?>> map) * from SQL type names to classes in the Java programming language * @return an <code>Object</code> representing the SQL value in the * specified column - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2557,10 +2557,10 @@ Object getObject(String columnLabel, java.util.Map<String,Class<?>> map) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return a <code>Ref</code> object representing the SQL <code>REF</code> * value in the specified column - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2574,10 +2574,10 @@ Object getObject(String columnLabel, java.util.Map<String,Class<?>> map) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return a <code>Blob</code> object representing the SQL <code>BLOB</code> * value in the specified column - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2591,10 +2591,10 @@ Object getObject(String columnLabel, java.util.Map<String,Class<?>> map) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return a <code>Clob</code> object representing the SQL <code>CLOB</code> * value in the specified column - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2608,10 +2608,10 @@ Object getObject(String columnLabel, java.util.Map<String,Class<?>> map) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return an <code>Array</code> object representing the SQL <code>ARRAY</code> value in * the specified column - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -2631,7 +2631,7 @@ Object getObject(String columnLabel, java.util.Map<String,Class<?>> map) * @return the column value as a <code>java.sql.Date</code> object; * if the value is SQL <code>NULL</code>, * the value returned is <code>null</code> in the Java programming language - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs * or this method is called on a closed result set * @since 1.2 @@ -2652,7 +2652,7 @@ Object getObject(String columnLabel, java.util.Map<String,Class<?>> map) * @return the column value as a <code>java.sql.Date</code> object; * if the value is SQL <code>NULL</code>, * the value returned is <code>null</code> in the Java programming language - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs * or this method is called on a closed result set * @since 1.2 @@ -2673,7 +2673,7 @@ Object getObject(String columnLabel, java.util.Map<String,Class<?>> map) * @return the column value as a <code>java.sql.Time</code> object; * if the value is SQL <code>NULL</code>, * the value returned is <code>null</code> in the Java programming language - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs * or this method is called on a closed result set * @since 1.2 @@ -2694,7 +2694,7 @@ Object getObject(String columnLabel, java.util.Map<String,Class<?>> map) * @return the column value as a <code>java.sql.Time</code> object; * if the value is SQL <code>NULL</code>, * the value returned is <code>null</code> in the Java programming language - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs * or this method is called on a closed result set * @since 1.2 @@ -2715,7 +2715,7 @@ Object getObject(String columnLabel, java.util.Map<String,Class<?>> map) * @return the column value as a <code>java.sql.Timestamp</code> object; * if the value is SQL <code>NULL</code>, * the value returned is <code>null</code> in the Java programming language - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs * or this method is called on a closed result set * @since 1.2 @@ -2737,7 +2737,7 @@ java.sql.Timestamp getTimestamp(int columnIndex, Calendar cal) * @return the column value as a <code>java.sql.Timestamp</code> object; * if the value is SQL <code>NULL</code>, * the value returned is <code>null</code> in the Java programming language - * @exception SQLException if the columnLabel is not valid or + * @throws SQLException if the columnLabel is not valid or * if a database access error occurs * or this method is called on a closed result set * @since 1.2 @@ -2772,10 +2772,10 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * @return the column value as a <code>java.net.URL</code> object; * if the value is SQL <code>NULL</code>, * the value returned is <code>null</code> in the Java programming language - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; this method * is called on a closed result set or if a URL is malformed - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -2790,10 +2790,10 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * @return the column value as a <code>java.net.URL</code> object; * if the value is SQL <code>NULL</code>, * the value returned is <code>null</code> in the Java programming language - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; this method * is called on a closed result set or if a URL is malformed - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -2808,11 +2808,11 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -2827,11 +2827,11 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -2846,11 +2846,11 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -2865,11 +2865,11 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -2884,11 +2884,11 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -2903,11 +2903,11 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -2922,11 +2922,11 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -2941,11 +2941,11 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -2964,7 +2964,7 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * @throws SQLException if the columnIndex is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -2981,7 +2981,7 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * @throws SQLException if the columnLabel is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -2996,11 +2996,11 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * * @param columnIndex the first column is 1, the second 2, ... * @param x the column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3015,11 +3015,11 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3061,7 +3061,7 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * error could occur; this method is called on a closed result set; * the result set concurrency is <code>CONCUR_READ_ONLY</code> * or if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3084,7 +3084,7 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * error could occur; this method is called on a closed result set; * the result set concurrency is <CODE>CONCUR_READ_ONLY</code> * or if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3105,7 +3105,7 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * error could occur; this method is called on a closed result set; * if a database access error occurs or * the result set concurrency is <code>CONCUR_READ_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3126,7 +3126,7 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * error could occur; this method is called on a closed result set; * if a database access error occurs or * the result set concurrency is <code>CONCUR_READ_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3140,12 +3140,12 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * @param columnIndex the first column is 1, the second is 2, ... * @return a <code>NClob</code> object representing the SQL * <code>NCLOB</code> value in the specified column - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if the driver does not support national * character sets; if the driver can detect that a data conversion * error could occur; this method is called on a closed result set * or if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3159,12 +3159,12 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return a <code>NClob</code> object representing the SQL <code>NCLOB</code> * value in the specified column - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if the driver does not support national * character sets; if the driver can detect that a data conversion * error could occur; this method is called on a closed result set * or if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3179,7 +3179,7 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * @throws SQLException if the columnIndex is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3194,7 +3194,7 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * @throws SQLException if the columnLabel is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3219,7 +3219,7 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * the result set concurrency is <code>CONCUR_READ_ONLY</code>. The <code>getCause</code> method * of the exception may provide a more detailed exception, for example, if the * stream does not contain valid XML. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3244,7 +3244,7 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * the result set concurrency is <code>CONCUR_READ_ONLY</code>. The <code>getCause</code> method * of the exception may provide a more detailed exception, for example, if the * stream does not contain valid XML. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3261,10 +3261,10 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3282,10 +3282,10 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>null</code> - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3304,10 +3304,10 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * value; if the value is SQL <code>NULL</code>, the value returned is * <code>null</code> in the Java programming language. * @param columnIndex the first column is 1, the second is 2, ... - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3325,10 +3325,10 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * @return a <code>java.io.Reader</code> object that contains the column * value; if the value is SQL <code>NULL</code>, the value returned is * <code>null</code> in the Java programming language - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3351,10 +3351,10 @@ java.sql.Timestamp getTimestamp(String columnLabel, Calendar cal) * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @param length the length of the stream - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * the result set concurrency is {@code CONCUR_READ_ONLY} or this method is called on a closed result set + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3380,10 +3380,10 @@ void updateNCharacterStream(int columnIndex, * @param reader the <code>java.io.Reader</code> object containing * the new column value * @param length the length of the stream - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * the result set concurrency is {@code CONCUR_READ_ONLY} or this method is called on a closed result set + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3402,11 +3402,11 @@ void updateNCharacterStream(String columnLabel, * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @param length the length of the stream - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3426,11 +3426,11 @@ void updateAsciiStream(int columnIndex, * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @param length the length of the stream - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3450,11 +3450,11 @@ void updateBinaryStream(int columnIndex, * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @param length the length of the stream - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3473,11 +3473,11 @@ void updateCharacterStream(int columnIndex, * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value * @param length the length of the stream - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3497,11 +3497,11 @@ void updateAsciiStream(String columnLabel, * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value * @param length the length of the stream - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3522,11 +3522,11 @@ void updateBinaryStream(String columnLabel, * @param reader the <code>java.io.Reader</code> object containing * the new column value * @param length the length of the stream - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3547,11 +3547,11 @@ void updateCharacterStream(String columnLabel, * @param inputStream An object that contains the data to set the parameter * value to. * @param length the number of bytes in the parameter data. - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3571,11 +3571,11 @@ void updateCharacterStream(String columnLabel, * @param inputStream An object that contains the data to set the parameter * value to. * @param length the number of bytes in the parameter data. - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3598,11 +3598,11 @@ void updateCharacterStream(String columnLabel, * @param columnIndex the first column is 1, the second is 2, ... * @param reader An object that contains the data to set the parameter value to. * @param length the number of characters in the parameter data. - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3625,11 +3625,11 @@ void updateCharacterStream(String columnLabel, * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param reader An object that contains the data to set the parameter value to. * @param length the number of characters in the parameter data. - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3657,7 +3657,7 @@ void updateCharacterStream(String columnLabel, * error could occur; this method is called on a closed result set, * if a database access error occurs or * the result set concurrency is <code>CONCUR_READ_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3686,7 +3686,7 @@ void updateCharacterStream(String columnLabel, * error could occur; this method is called on a closed result set; * if a database access error occurs or * the result set concurrency is <code>CONCUR_READ_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3715,10 +3715,10 @@ void updateCharacterStream(String columnLabel, * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * the result set concurrency is {@code CONCUR_READ_ONLY} or this method is called on a closed result set + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3747,10 +3747,10 @@ void updateNCharacterStream(int columnIndex, * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param reader the <code>java.io.Reader</code> object containing * the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * the result set concurrency is {@code CONCUR_READ_ONLY} or this method is called on a closed result set + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3772,11 +3772,11 @@ void updateNCharacterStream(String columnLabel, * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3799,11 +3799,11 @@ void updateAsciiStream(int columnIndex, * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3826,11 +3826,11 @@ void updateBinaryStream(int columnIndex, * * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3852,11 +3852,11 @@ void updateCharacterStream(int columnIndex, * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3879,11 +3879,11 @@ void updateAsciiStream(String columnLabel, * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param x the new column value - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3907,10 +3907,10 @@ void updateBinaryStream(String columnLabel, * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param reader the <code>java.io.Reader</code> object containing * the new column value - * @exception SQLException if the columnLabel is not valid; if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * @throws SQLException if the columnLabel is not valid; if a database access error occurs; + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3932,10 +3932,10 @@ void updateCharacterStream(String columnLabel, * @param columnIndex the first column is 1, the second is 2, ... * @param inputStream An object that contains the data to set the parameter * value to. - * @exception SQLException if the columnIndex is not valid; if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * @throws SQLException if the columnIndex is not valid; if a database access error occurs; + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3957,10 +3957,10 @@ void updateCharacterStream(String columnLabel, * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param inputStream An object that contains the data to set the parameter * value to. - * @exception SQLException if the columnLabel is not valid; if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * @throws SQLException if the columnLabel is not valid; if a database access error occurs; + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -3985,11 +3985,11 @@ void updateCharacterStream(String columnLabel, * * @param columnIndex the first column is 1, the second is 2, ... * @param reader An object that contains the data to set the parameter value to. - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -4014,10 +4014,10 @@ void updateCharacterStream(String columnLabel, * * @param columnLabel the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column * @param reader An object that contains the data to set the parameter value to. - * @exception SQLException if the columnLabel is not valid; if a database access error occurs; - * the result set concurrency is <code>CONCUR_READ_ONLY</code> + * @throws SQLException if the columnLabel is not valid; if a database access error occurs; + * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -4047,7 +4047,7 @@ void updateCharacterStream(String columnLabel, * error could occur; this method is called on a closed result set, * if a database access error occurs or * the result set concurrency is <code>CONCUR_READ_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -4077,7 +4077,7 @@ void updateCharacterStream(String columnLabel, * error could occur; this method is called on a closed result set; * if a database access error occurs or * the result set concurrency is <code>CONCUR_READ_ONLY</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -4171,11 +4171,11 @@ void updateCharacterStream(String columnLabel, * this is the length * of the data in the stream or reader. For all other types, * this value will be ignored. - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not + * @throws SQLFeatureNotSupportedException if the JDBC driver does not * support this method; if the JDBC driver does not support the specified targetSqlType * @see JDBCType * @see SQLType @@ -4214,11 +4214,11 @@ default void updateObject(int columnIndex, Object x, * this is the length * of the data in the stream or reader. For all other types, * this value will be ignored. - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not + * @throws SQLFeatureNotSupportedException if the JDBC driver does not * support this method; if the JDBC driver does not support the specified targetSqlType * @see JDBCType * @see SQLType @@ -4242,11 +4242,11 @@ default void updateObject(String columnLabel, Object x, * @param columnIndex the first column is 1, the second is 2, ... * @param x the new column value * @param targetSqlType the SQL type to be sent to the database - * @exception SQLException if the columnIndex is not valid; + * @throws SQLException if the columnIndex is not valid; * if a database access error occurs; * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not + * @throws SQLFeatureNotSupportedException if the JDBC driver does not * support this method; if the JDBC driver does not support the specified targetSqlType * @see JDBCType * @see SQLType @@ -4272,11 +4272,11 @@ default void updateObject(int columnIndex, Object x, SQLType targetSqlType) * the name of the column * @param x the new column value * @param targetSqlType the SQL type to be sent to the database - * @exception SQLException if the columnLabel is not valid; + * @throws SQLException if the columnLabel is not valid; * if a database access error occurs; * the result set concurrency is {@code CONCUR_READ_ONLY} * or this method is called on a closed result set - * @exception SQLFeatureNotSupportedException if the JDBC driver does not + * @throws SQLFeatureNotSupportedException if the JDBC driver does not * support this method; if the JDBC driver does not support the specified targetSqlType * @see JDBCType * @see SQLType diff --git a/src/java.sql/share/classes/java/sql/ResultSetMetaData.java b/src/java.sql/share/classes/java/sql/ResultSetMetaData.java index ea5659fd333..a56e61d342b 100644 --- a/src/java.sql/share/classes/java/sql/ResultSetMetaData.java +++ b/src/java.sql/share/classes/java/sql/ResultSetMetaData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -50,7 +50,7 @@ public interface ResultSetMetaData extends Wrapper { * Returns the number of columns in this <code>ResultSet</code> object. * * @return the number of columns - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getColumnCount() throws SQLException; @@ -59,7 +59,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean isAutoIncrement(int column) throws SQLException; @@ -68,7 +68,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean isCaseSensitive(int column) throws SQLException; @@ -77,7 +77,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean isSearchable(int column) throws SQLException; @@ -86,7 +86,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean isCurrency(int column) throws SQLException; @@ -96,7 +96,7 @@ public interface ResultSetMetaData extends Wrapper { * @param column the first column is 1, the second is 2, ... * @return the nullability status of the given column; one of <code>columnNoNulls</code>, * <code>columnNullable</code> or <code>columnNullableUnknown</code> - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int isNullable(int column) throws SQLException; @@ -123,7 +123,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean isSigned(int column) throws SQLException; @@ -133,7 +133,7 @@ public interface ResultSetMetaData extends Wrapper { * @param column the first column is 1, the second is 2, ... * @return the normal maximum number of characters allowed as the width * of the designated column - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getColumnDisplaySize(int column) throws SQLException; @@ -146,7 +146,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return the suggested column title - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getColumnLabel(int column) throws SQLException; @@ -155,7 +155,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return column name - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getColumnName(int column) throws SQLException; @@ -164,7 +164,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return schema name or "" if not applicable - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getSchemaName(int column) throws SQLException; @@ -178,7 +178,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return precision - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getPrecision(int column) throws SQLException; @@ -188,7 +188,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return scale - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ int getScale(int column) throws SQLException; @@ -197,7 +197,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return table name or "" if not applicable - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getTableName(int column) throws SQLException; @@ -207,7 +207,7 @@ public interface ResultSetMetaData extends Wrapper { * @param column the first column is 1, the second is 2, ... * @return the name of the catalog for the table in which the given column * appears or "" if not applicable - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getCatalogName(int column) throws SQLException; @@ -216,7 +216,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return SQL type from java.sql.Types - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see Types */ int getColumnType(int column) throws SQLException; @@ -227,7 +227,7 @@ public interface ResultSetMetaData extends Wrapper { * @param column the first column is 1, the second is 2, ... * @return type name used by the database. If the column type is * a user-defined type, then a fully-qualified type name is returned. - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ String getColumnTypeName(int column) throws SQLException; @@ -236,7 +236,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean isReadOnly(int column) throws SQLException; @@ -245,7 +245,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean isWritable(int column) throws SQLException; @@ -254,7 +254,7 @@ public interface ResultSetMetaData extends Wrapper { * * @param column the first column is 1, the second is 2, ... * @return <code>true</code> if so; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean isDefinitelyWritable(int column) throws SQLException; @@ -272,7 +272,7 @@ public interface ResultSetMetaData extends Wrapper { * language that would be used by the method * <code>ResultSet.getObject</code> to retrieve the value in the specified * column. This is the class name used for custom mapping. - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @since 1.2 */ String getColumnClassName(int column) throws SQLException; diff --git a/src/java.sql/share/classes/java/sql/SQLData.java b/src/java.sql/share/classes/java/sql/SQLData.java index 7d83c7374cd..860cd06465a 100644 --- a/src/java.sql/share/classes/java/sql/SQLData.java +++ b/src/java.sql/share/classes/java/sql/SQLData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -72,8 +72,8 @@ public interface SQLData { * * @return the type name that was passed to the method <code>readSQL</code> * when this object was constructed and populated - * @exception SQLException if there is a database access error - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if there is a database access error + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -104,8 +104,8 @@ public interface SQLData { * @param stream the <code>SQLInput</code> object from which to read the data for * the value that is being custom mapped * @param typeName the SQL type name of the value on the data stream - * @exception SQLException if there is a database access error - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if there is a database access error + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see SQLInput * @since 1.2 @@ -127,8 +127,8 @@ public interface SQLData { * * @param stream the <code>SQLOutput</code> object to which to write the data for * the value that was custom mapped - * @exception SQLException if there is a database access error - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if there is a database access error + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see SQLOutput * @since 1.2 diff --git a/src/java.sql/share/classes/java/sql/SQLInput.java b/src/java.sql/share/classes/java/sql/SQLInput.java index b768fa95e1e..15052bd3e5e 100644 --- a/src/java.sql/share/classes/java/sql/SQLInput.java +++ b/src/java.sql/share/classes/java/sql/SQLInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -67,8 +67,8 @@ public interface SQLInput { * in the Java programming language. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>null</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -79,8 +79,8 @@ public interface SQLInput { * in the Java programming language. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>false</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -91,8 +91,8 @@ public interface SQLInput { * in the Java programming language. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>0</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -103,8 +103,8 @@ public interface SQLInput { * in the Java programming language. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>0</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -115,8 +115,8 @@ public interface SQLInput { * in the Java programming language. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>0</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -127,8 +127,8 @@ public interface SQLInput { * in the Java programming language. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>0</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -139,8 +139,8 @@ public interface SQLInput { * in the Java programming language. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>0</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -151,8 +151,8 @@ public interface SQLInput { * in the Java programming language. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>0</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -163,8 +163,8 @@ public interface SQLInput { * object in the Java programming language. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>null</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -175,8 +175,8 @@ public interface SQLInput { * in the Java programming language. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>null</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -186,8 +186,8 @@ public interface SQLInput { * Reads the next attribute in the stream and returns it as a <code>java.sql.Date</code> object. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>null</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -197,8 +197,8 @@ public interface SQLInput { * Reads the next attribute in the stream and returns it as a <code>java.sql.Time</code> object. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>null</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -208,8 +208,8 @@ public interface SQLInput { * Reads the next attribute in the stream and returns it as a <code>java.sql.Timestamp</code> object. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>null</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -219,8 +219,8 @@ public interface SQLInput { * Reads the next attribute in the stream and returns it as a stream of Unicode characters. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>null</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -230,8 +230,8 @@ public interface SQLInput { * Reads the next attribute in the stream and returns it as a stream of ASCII characters. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>null</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -242,8 +242,8 @@ public interface SQLInput { * bytes. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>null</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -272,8 +272,8 @@ public interface SQLInput { * * @return the datum at the head of the stream as an <code>Object</code> in the * Java programming language;<code>null</code> if the datum is SQL <code>NULL</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -286,8 +286,8 @@ public interface SQLInput { * @return a <code>Ref</code> object representing the SQL <code>REF</code> value * at the head of the stream; <code>null</code> if the value read is * SQL <code>NULL</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -300,8 +300,8 @@ public interface SQLInput { * @return a <code>Blob</code> object representing data of the SQL <code>BLOB</code> value * at the head of the stream; <code>null</code> if the value read is * SQL <code>NULL</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -314,8 +314,8 @@ public interface SQLInput { * @return a <code>Clob</code> object representing data of the SQL <code>CLOB</code> value * at the head of the stream; <code>null</code> if the value read is * SQL <code>NULL</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -328,8 +328,8 @@ public interface SQLInput { * @return an <code>Array</code> object representing data of the SQL * <code>ARRAY</code> value at the head of the stream; <code>null</code> * if the value read is SQL <code>NULL</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -340,9 +340,9 @@ public interface SQLInput { * * @return <code>true</code> if the most recently read SQL value was SQL * <code>NULL</code>; <code>false</code> otherwise - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -355,9 +355,9 @@ public interface SQLInput { * <code>java.net.URL</code> object in the Java programming language. * * @return a <code>java.net.URL</code> object. - * @exception SQLException if a database access error occurs, - * or if a URL is malformed - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs, + * or if a URL is malformed + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -372,8 +372,8 @@ public interface SQLInput { * @return a <code>NClob</code> object representing data of the SQL <code>NCLOB</code> value * at the head of the stream; <code>null</code> if the value read is * SQL <code>NULL</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -386,8 +386,8 @@ public interface SQLInput { * and <code>LONGNVARCHAR</code> columns. * * @return the attribute; if the value is SQL <code>NULL</code>, returns <code>null</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -400,8 +400,8 @@ public interface SQLInput { * @return a <code>SQLXML</code> object representing data of the SQL <code>XML</code> value * at the head of the stream; <code>null</code> if the value read is * SQL <code>NULL</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -414,8 +414,8 @@ public interface SQLInput { * @return a <code>RowId</code> object representing data of the SQL <code>ROWID</code> value * at the head of the stream; <code>null</code> if the value read is * SQL <code>NULL</code> - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -448,8 +448,8 @@ public interface SQLInput { * @param type Class representing the Java data type to convert the attribute to. * @return the attribute at the head of the stream as an {@code Object} in the * Java programming language;{@code null} if the attribute is SQL {@code NULL} - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.8 */ diff --git a/src/java.sql/share/classes/java/sql/SQLOutput.java b/src/java.sql/share/classes/java/sql/SQLOutput.java index 0edfc998aa3..5e96412d540 100644 --- a/src/java.sql/share/classes/java/sql/SQLOutput.java +++ b/src/java.sql/share/classes/java/sql/SQLOutput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -59,8 +59,8 @@ public interface SQLOutput { * in the Java programming language. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -72,8 +72,8 @@ public interface SQLOutput { * in the Java programming language. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -85,8 +85,8 @@ public interface SQLOutput { * in the Java programming language. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -98,8 +98,8 @@ public interface SQLOutput { * in the Java programming language. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -111,8 +111,8 @@ public interface SQLOutput { * in the Java programming language. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -124,8 +124,8 @@ public interface SQLOutput { * in the Java programming language. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -137,8 +137,8 @@ public interface SQLOutput { * in the Java programming language. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -150,8 +150,8 @@ public interface SQLOutput { * in the Java programming language. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -163,8 +163,8 @@ public interface SQLOutput { * in the Java programming language. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -176,8 +176,8 @@ public interface SQLOutput { * in the Java programming language. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -189,8 +189,8 @@ public interface SQLOutput { * in the Java programming language. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -202,8 +202,8 @@ public interface SQLOutput { * in the Java programming language. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -215,8 +215,8 @@ public interface SQLOutput { * in the Java programming language. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -226,8 +226,8 @@ public interface SQLOutput { * Writes the next attribute to the stream as a stream of Unicode characters. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -237,8 +237,8 @@ public interface SQLOutput { * Writes the next attribute to the stream as a stream of ASCII characters. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -249,8 +249,8 @@ public interface SQLOutput { * bytes. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -282,8 +282,8 @@ public interface SQLOutput { * * @param x the object representing data of an SQL structured or * distinct type - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -294,8 +294,8 @@ public interface SQLOutput { * * @param x a <code>Ref</code> object representing data of an SQL * <code>REF</code> value - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -307,8 +307,8 @@ public interface SQLOutput { * @param x a <code>Blob</code> object representing data of an SQL * <code>BLOB</code> value * - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -320,8 +320,8 @@ public interface SQLOutput { * @param x a <code>Clob</code> object representing data of an SQL * <code>CLOB</code> value * - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -333,8 +333,8 @@ public interface SQLOutput { * @param x a <code>Struct</code> object representing data of an SQL * structured type * - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -346,8 +346,8 @@ public interface SQLOutput { * @param x an <code>Array</code> object representing data of an SQL * <code>ARRAY</code> type * - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -361,8 +361,8 @@ public interface SQLOutput { * @param x a <code>java.net.URL</code> object representing the data * of SQL DATALINK type * - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -380,8 +380,8 @@ public interface SQLOutput { * when it sends it to the stream. * * @param x the value to pass to the database - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -393,8 +393,8 @@ public interface SQLOutput { * @param x a <code>NClob</code> object representing data of an SQL * <code>NCLOB</code> value * - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -407,8 +407,8 @@ public interface SQLOutput { * @param x a <code>RowId</code> object representing data of an SQL * <code>ROWID</code> value * - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -427,7 +427,7 @@ public interface SQLOutput { * if there is an error processing the XML value. The <code>getCause</code> method * of the exception may provide a more detailed exception, for example, if the * stream does not contain valid XML. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -457,11 +457,11 @@ public interface SQLOutput { * * @param x the object containing the input parameter value * @param targetSqlType the SQL type to be sent to the database. - * @exception SQLException if a database access error occurs or - * if the Java Object specified by x is an InputStream - * or Reader object and the value of the scale parameter is less - * than zero - * @exception SQLFeatureNotSupportedException if + * @throws SQLException if a database access error occurs or + * if the Java Object specified by x is an InputStream + * or Reader object and the value of the scale parameter is less + * than zero + * @throws SQLFeatureNotSupportedException if * the JDBC driver does not support this data type * @see JDBCType * @see SQLType diff --git a/src/java.sql/share/classes/java/sql/SQLXML.java b/src/java.sql/share/classes/java/sql/SQLXML.java index 680ab7df5a5..7b2c56d1a20 100644 --- a/src/java.sql/share/classes/java/sql/SQLXML.java +++ b/src/java.sql/share/classes/java/sql/SQLXML.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -200,7 +200,7 @@ public interface SQLXML * being thrown. If <code>free</code> is called multiple times, the subsequent * calls to <code>free</code> are treated as a no-op. * @throws SQLException if there is an error freeing the XML value. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -218,7 +218,7 @@ public interface SQLXML * @return a stream containing the XML data. * @throws SQLException if there is an error processing the XML value. * An exception is thrown if the state is not readable. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -237,7 +237,7 @@ public interface SQLXML * @return a stream to which data can be written. * @throws SQLException if there is an error processing the XML value. * An exception is thrown if the state is not writable. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -261,7 +261,7 @@ public interface SQLXML * The getCause() method of the exception may provide a more detailed exception, for example, * if the stream does not contain valid characters. * An exception is thrown if the state is not readable. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -285,7 +285,7 @@ public interface SQLXML * The getCause() method of the exception may provide a more detailed exception, for example, * if the stream does not contain valid characters. * An exception is thrown if the state is not writable. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -309,7 +309,7 @@ public interface SQLXML * The getCause() method of the exception may provide a more detailed exception, for example, * if the stream does not contain valid characters. * An exception is thrown if the state is not readable. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -333,7 +333,7 @@ public interface SQLXML * The getCause() method of the exception may provide a more detailed exception, for example, * if the stream does not contain valid characters. * An exception is thrown if the state is not writable. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -376,7 +376,7 @@ public interface SQLXML * The getCause() method of the exception may provide a more detailed exception, for example, * if an XML parser exception occurs. * An exception is thrown if the state is not readable. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -418,7 +418,7 @@ public interface SQLXML * The getCause() method of the exception may provide a more detailed exception, for example, * if an XML parser exception occurs. * An exception is thrown if the state is not writable. - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ diff --git a/src/java.sql/share/classes/java/sql/Savepoint.java b/src/java.sql/share/classes/java/sql/Savepoint.java index 07d1ae15805..bd605f71057 100644 --- a/src/java.sql/share/classes/java/sql/Savepoint.java +++ b/src/java.sql/share/classes/java/sql/Savepoint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -44,7 +44,7 @@ public interface Savepoint { * Retrieves the generated ID for the savepoint that this * <code>Savepoint</code> object represents. * @return the numeric ID of this savepoint - * @exception SQLException if this is a named savepoint + * @throws SQLException if this is a named savepoint * @since 1.4 */ int getSavepointId() throws SQLException; @@ -53,7 +53,7 @@ public interface Savepoint { * Retrieves the name of the savepoint that this <code>Savepoint</code> * object represents. * @return the name of this savepoint - * @exception SQLException if this is an un-named savepoint + * @throws SQLException if this is an un-named savepoint * @since 1.4 */ String getSavepointName() throws SQLException; diff --git a/src/java.sql/share/classes/java/sql/Statement.java b/src/java.sql/share/classes/java/sql/Statement.java index 89828185508..252a937da8b 100644 --- a/src/java.sql/share/classes/java/sql/Statement.java +++ b/src/java.sql/share/classes/java/sql/Statement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -56,11 +56,11 @@ public interface Statement extends Wrapper, AutoCloseable { * static SQL <code>SELECT</code> statement * @return a <code>ResultSet</code> object that contains the data produced * by the given query; never <code>null</code> - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>, the given + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement}, the given * SQL statement produces anything other than a single - * <code>ResultSet</code> object, the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> + * {@code ResultSet} object, the method is called on a + * {@code PreparedStatement} or {@code CallableStatement} * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} * method has been exceeded and has at least attempted to cancel @@ -82,10 +82,10 @@ public interface Statement extends Wrapper, AutoCloseable { * @return either (1) the row count for SQL Data Manipulation Language (DML) statements * or (2) 0 for SQL statements that return nothing * - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>, the given - * SQL statement produces a <code>ResultSet</code> object, the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement}, the given + * SQL statement produces a {@code ResultSet} object, the method is called on a + * {@code PreparedStatement} or {@code CallableStatement} * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} * method has been exceeded and has at least attempted to cancel @@ -108,7 +108,7 @@ public interface Statement extends Wrapper, AutoCloseable { * closed, its current <code>ResultSet</code> object, if one exists, is * also closed. * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void close() throws SQLException; @@ -126,8 +126,8 @@ public interface Statement extends Wrapper, AutoCloseable { * * @return the current column size limit for columns storing character and * binary values; zero means there is no limit - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @see #setMaxFieldSize */ int getMaxFieldSize() throws SQLException; @@ -146,8 +146,8 @@ public interface Statement extends Wrapper, AutoCloseable { * greater than 256. * * @param max the new column size limit in bytes; zero means there is no limit - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement} * or the condition {@code max >= 0} is not satisfied * @see #getMaxFieldSize */ @@ -162,8 +162,8 @@ public interface Statement extends Wrapper, AutoCloseable { * @return the current maximum number of rows for a <code>ResultSet</code> * object produced by this <code>Statement</code> object; * zero means there is no limit - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @see #setMaxRows */ int getMaxRows() throws SQLException; @@ -176,8 +176,8 @@ public interface Statement extends Wrapper, AutoCloseable { * rows are silently dropped. * * @param max the new max rows limit; zero means there is no limit - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement} * or the condition {@code max >= 0} is not satisfied * @see #getMaxRows */ @@ -202,8 +202,8 @@ public interface Statement extends Wrapper, AutoCloseable { * * @param enable <code>true</code> to enable escape processing; * <code>false</code> to disable it - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} */ void setEscapeProcessing(boolean enable) throws SQLException; @@ -215,8 +215,8 @@ public interface Statement extends Wrapper, AutoCloseable { * * @return the current query timeout limit in seconds; zero means there is * no limit - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @see #setQueryTimeout */ int getQueryTimeout() throws SQLException; @@ -242,8 +242,8 @@ public interface Statement extends Wrapper, AutoCloseable { * * @param seconds the new query timeout limit in seconds; zero means * there is no limit - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement} * or the condition {@code seconds >= 0} is not satisfied * @see #getQueryTimeout */ @@ -255,9 +255,9 @@ public interface Statement extends Wrapper, AutoCloseable { * This method can be used by one thread to cancel a statement that * is being executed by another thread. * - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method */ void cancel() throws SQLException; @@ -279,8 +279,8 @@ public interface Statement extends Wrapper, AutoCloseable { * * @return the first <code>SQLWarning</code> object or <code>null</code> * if there are no warnings - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} */ SQLWarning getWarnings() throws SQLException; @@ -291,8 +291,8 @@ public interface Statement extends Wrapper, AutoCloseable { * <code>null</code> until a new warning is reported for this * <code>Statement</code> object. * - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} */ void clearWarnings() throws SQLException; @@ -315,8 +315,8 @@ public interface Statement extends Wrapper, AutoCloseable { * * @param name the new cursor name, which must be unique within * a connection - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method */ void setCursorName(String name) throws SQLException; @@ -343,10 +343,10 @@ public interface Statement extends Wrapper, AutoCloseable { * @return <code>true</code> if the first result is a <code>ResultSet</code> * object; <code>false</code> if it is an update count or there are * no results - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>, + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement}, * the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> + * {@code PreparedStatement} or {@code CallableStatement} * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} * method has been exceeded and has at least attempted to cancel @@ -363,8 +363,8 @@ public interface Statement extends Wrapper, AutoCloseable { * * @return the current result as a <code>ResultSet</code> object or * <code>null</code> if the result is an update count or there are no more results - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @see #execute */ ResultSet getResultSet() throws SQLException; @@ -376,8 +376,8 @@ public interface Statement extends Wrapper, AutoCloseable { * * @return the current result as an update count; -1 if the current result is a * <code>ResultSet</code> object or there are no more results - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @see #execute */ int getUpdateCount() throws SQLException; @@ -397,8 +397,8 @@ public interface Statement extends Wrapper, AutoCloseable { * @return <code>true</code> if the next result is a <code>ResultSet</code> * object; <code>false</code> if it is an update count or there are * no more results - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @see #execute */ boolean getMoreResults() throws SQLException; @@ -419,11 +419,11 @@ public interface Statement extends Wrapper, AutoCloseable { * its own fetch direction. * * @param direction the initial direction for processing rows - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement} * or the given direction - * is not one of <code>ResultSet.FETCH_FORWARD</code>, - * <code>ResultSet.FETCH_REVERSE</code>, or <code>ResultSet.FETCH_UNKNOWN</code> + * is not one of {@code ResultSet.FETCH_FORWARD}, + * {@code ResultSet.FETCH_REVERSE}, or {@code ResultSet.FETCH_UNKNOWN} * @since 1.2 * @see #getFetchDirection */ @@ -439,8 +439,8 @@ public interface Statement extends Wrapper, AutoCloseable { * * @return the default fetch direction for result sets generated * from this <code>Statement</code> object - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @since 1.2 * @see #setFetchDirection */ @@ -454,8 +454,8 @@ public interface Statement extends Wrapper, AutoCloseable { * The default value is zero. * * @param rows the number of rows to fetch - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code> or the + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement} or the * condition {@code rows >= 0} is not satisfied. * @since 1.2 * @see #getFetchSize @@ -472,8 +472,8 @@ public interface Statement extends Wrapper, AutoCloseable { * * @return the default fetch size for result sets generated * from this <code>Statement</code> object - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @since 1.2 * @see #setFetchSize */ @@ -485,8 +485,8 @@ public interface Statement extends Wrapper, AutoCloseable { * * @return either <code>ResultSet.CONCUR_READ_ONLY</code> or * <code>ResultSet.CONCUR_UPDATABLE</code> - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @since 1.2 */ int getResultSetConcurrency() throws SQLException; @@ -498,8 +498,8 @@ public interface Statement extends Wrapper, AutoCloseable { * @return one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @since 1.2 */ int getResultSetType() throws SQLException; @@ -513,10 +513,10 @@ public interface Statement extends Wrapper, AutoCloseable { * <code>PreparedStatement</code> or <code>CallableStatement</code>. * @param sql typically this is a SQL <code>INSERT</code> or * <code>UPDATE</code> statement - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>, the + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement}, the * driver does not support batch updates, the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> + * {@code PreparedStatement} or {@code CallableStatement} * @see #executeBatch * @see DatabaseMetaData#supportsBatchUpdates * @since 1.2 @@ -527,8 +527,8 @@ public interface Statement extends Wrapper, AutoCloseable { * Empties this <code>Statement</code> object's current list of * SQL commands. * - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code> or the + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement} or the * driver does not support batch updates * @see #addBatch * @see DatabaseMetaData#supportsBatchUpdates @@ -577,10 +577,10 @@ public interface Statement extends Wrapper, AutoCloseable { * @return an array of update counts containing one element for each * command in the batch. The elements of the array are ordered according * to the order in which commands were added to the batch. - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code> or the + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement} or the * driver does not support batch statements. Throws {@link BatchUpdateException} - * (a subclass of <code>SQLException</code>) if one of the commands sent to the + * (a subclass of {@code SQLException}) if one of the commands sent to the * database fails to execute properly or attempts to return a result set. * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} @@ -597,8 +597,8 @@ public interface Statement extends Wrapper, AutoCloseable { * Retrieves the <code>Connection</code> object * that produced this <code>Statement</code> object. * @return the connection that produced this statement - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @since 1.2 */ Connection getConnection() throws SQLException; @@ -684,17 +684,17 @@ public interface Statement extends Wrapper, AutoCloseable { * @return <code>true</code> if the next result is a <code>ResultSet</code> * object; <code>false</code> if it is an update count or there are no * more results - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code> or the argument + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement} or the argument * supplied is not one of the following: - * <code>Statement.CLOSE_CURRENT_RESULT</code>, - * <code>Statement.KEEP_CURRENT_RESULT</code> or - * <code>Statement.CLOSE_ALL_RESULTS</code> - *@exception SQLFeatureNotSupportedException if - * <code>DatabaseMetaData.supportsMultipleOpenResults</code> returns - * <code>false</code> and either - * <code>Statement.KEEP_CURRENT_RESULT</code> or - * <code>Statement.CLOSE_ALL_RESULTS</code> are supplied as + * {@code Statement.CLOSE_CURRENT_RESULT}, + * {@code Statement.KEEP_CURRENT_RESULT} or + * {@code Statement.CLOSE_ALL_RESULTS} + *@throws SQLFeatureNotSupportedException if + * {@code DatabaseMetaData.supportsMultipleOpenResults} returns + * {@code false} and either + * {@code Statement.KEEP_CURRENT_RESULT} or + * {@code Statement.CLOSE_ALL_RESULTS} are supplied as * the argument. * @since 1.4 * @see #execute @@ -712,8 +712,8 @@ public interface Statement extends Wrapper, AutoCloseable { * * @return a <code>ResultSet</code> object containing the auto-generated key(s) * generated by the execution of this <code>Statement</code> object - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.4 */ @@ -742,12 +742,12 @@ public interface Statement extends Wrapper, AutoCloseable { * @return either (1) the row count for SQL Data Manipulation Language (DML) statements * or (2) 0 for SQL statements that return nothing * - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>, the given - * SQL statement returns a <code>ResultSet</code> object, + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement}, the given + * SQL statement returns a {@code ResultSet} object, * the given constant is not one of those allowed, the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * {@code PreparedStatement} or {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method with a constant of Statement.RETURN_GENERATED_KEYS * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} @@ -777,12 +777,12 @@ public interface Statement extends Wrapper, AutoCloseable { * @return either (1) the row count for SQL Data Manipulation Language (DML) statements * or (2) 0 for SQL statements that return nothing * - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>, the SQL - * statement returns a <code>ResultSet</code> object,the second argument + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement}, the SQL + * statement returns a {@code ResultSet} object,the second argument * supplied to this method is not an - * <code>int</code> array whose elements are valid column indexes, the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> + * {@code int} array whose elements are valid column indexes, the method is called on a + * {@code PreparedStatement} or {@code CallableStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} @@ -811,12 +811,12 @@ public interface Statement extends Wrapper, AutoCloseable { * @return either the row count for <code>INSERT</code>, <code>UPDATE</code>, * or <code>DELETE</code> statements, or 0 for SQL statements * that return nothing - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>, the SQL - * statement returns a <code>ResultSet</code> object, the - * second argument supplied to this method is not a <code>String</code> array + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement}, the SQL + * statement returns a {@code ResultSet} object, the + * second argument supplied to this method is not a {@code String} array * whose elements are valid column names, the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> + * {@code PreparedStatement} or {@code CallableStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} @@ -857,14 +857,14 @@ public interface Statement extends Wrapper, AutoCloseable { * @return <code>true</code> if the first result is a <code>ResultSet</code> * object; <code>false</code> if it is an update count or there are * no results - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>, the second + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement}, the second * parameter supplied to this method is not - * <code>Statement.RETURN_GENERATED_KEYS</code> or - * <code>Statement.NO_GENERATED_KEYS</code>, + * {@code Statement.RETURN_GENERATED_KEYS} or + * {@code Statement.NO_GENERATED_KEYS}, * the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * {@code PreparedStatement} or {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method with a constant of Statement.RETURN_GENERATED_KEYS * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} @@ -910,11 +910,11 @@ public interface Statement extends Wrapper, AutoCloseable { * @return <code>true</code> if the first result is a <code>ResultSet</code> * object; <code>false</code> if it is an update count or there * are no results - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>, the - * elements in the <code>int</code> array passed to this method + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement}, the + * elements in the {@code int} array passed to this method * are not valid column indexes, the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> + * {@code PreparedStatement} or {@code CallableStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} @@ -959,11 +959,11 @@ public interface Statement extends Wrapper, AutoCloseable { * @return <code>true</code> if the next result is a <code>ResultSet</code> * object; <code>false</code> if it is an update count or there * are no more results - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>,the - * elements of the <code>String</code> array passed to this + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement},the + * elements of the {@code String} array passed to this * method are not valid column names, the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> + * {@code PreparedStatement} or {@code CallableStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} @@ -984,8 +984,8 @@ public interface Statement extends Wrapper, AutoCloseable { * * @return either <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code> - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * * @since 1.4 */ @@ -1087,8 +1087,8 @@ boolean isPoolable() * * @return the current result as an update count; -1 if the current result * is a <code>ResultSet</code> object or there are no more results - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @see #execute * @since 1.8 */ @@ -1109,8 +1109,8 @@ default long getLargeUpdateCount() throws SQLException { * The default implementation will throw {@code UnsupportedOperationException} * * @param max the new max rows limit; zero means there is no limit - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement} * or the condition {@code max >= 0} is not satisfied * @see #getMaxRows * @since 1.8 @@ -1133,8 +1133,8 @@ default void setLargeMaxRows(long max) throws SQLException { * @return the current maximum number of rows for a <code>ResultSet</code> * object produced by this <code>Statement</code> object; * zero means there is no limit - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>Statement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code Statement} * @see #setMaxRows * @since 1.8 */ @@ -1183,10 +1183,10 @@ default long getLargeMaxRows() throws SQLException { * @return an array of update counts containing one element for each * command in the batch. The elements of the array are ordered according * to the order in which commands were added to the batch. - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code> or the + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement} or the * driver does not support batch statements. Throws {@link BatchUpdateException} - * (a subclass of <code>SQLException</code>) if one of the commands sent to the + * (a subclass of {@code SQLException}) if one of the commands sent to the * database fails to execute properly or attempts to return a result set. * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} @@ -1222,10 +1222,10 @@ default long[] executeLargeBatch() throws SQLException { * @return either (1) the row count for SQL Data Manipulation Language * (DML) statements or (2) 0 for SQL statements that return nothing * - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>, the given - * SQL statement produces a <code>ResultSet</code> object, the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement}, the given + * SQL statement produces a {@code ResultSet} object, the method is called on a + * {@code PreparedStatement} or {@code CallableStatement} * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} * method has been exceeded and has at least attempted to cancel @@ -1266,12 +1266,12 @@ default long executeLargeUpdate(String sql) throws SQLException { * @return either (1) the row count for SQL Data Manipulation Language (DML) statements * or (2) 0 for SQL statements that return nothing * - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>, the given - * SQL statement returns a <code>ResultSet</code> object, + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement}, the given + * SQL statement returns a {@code ResultSet} object, * the given constant is not one of those allowed, the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * {@code PreparedStatement} or {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method with a constant of Statement.RETURN_GENERATED_KEYS * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} @@ -1311,12 +1311,12 @@ default long executeLargeUpdate(String sql, int autoGeneratedKeys) * @return either (1) the row count for SQL Data Manipulation Language (DML) statements * or (2) 0 for SQL statements that return nothing * - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>, the SQL - * statement returns a <code>ResultSet</code> object,the second argument + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement}, the SQL + * statement returns a {@code ResultSet} object,the second argument * supplied to this method is not an - * <code>int</code> array whose elements are valid column indexes, the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> + * {@code int} array whose elements are valid column indexes, the method is called on a + * {@code PreparedStatement} or {@code CallableStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} @@ -1354,12 +1354,12 @@ default long executeLargeUpdate(String sql, int columnIndexes[]) throws SQLExcep * @return either the row count for <code>INSERT</code>, <code>UPDATE</code>, * or <code>DELETE</code> statements, or 0 for SQL statements * that return nothing - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>Statement</code>, the SQL - * statement returns a <code>ResultSet</code> object, the - * second argument supplied to this method is not a <code>String</code> array + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code Statement}, the SQL + * statement returns a {@code ResultSet} object, the + * second argument supplied to this method is not a {@code String} array * whose elements are valid column names, the method is called on a - * <code>PreparedStatement</code> or <code>CallableStatement</code> + * {@code PreparedStatement} or {@code CallableStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @throws SQLTimeoutException when the driver has determined that the * timeout value that was specified by the {@code setQueryTimeout} diff --git a/src/java.sql/share/classes/java/sql/Struct.java b/src/java.sql/share/classes/java/sql/Struct.java index d2b74418a6d..a2dbb8459c3 100644 --- a/src/java.sql/share/classes/java/sql/Struct.java +++ b/src/java.sql/share/classes/java/sql/Struct.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -47,8 +47,8 @@ public interface Struct { * @return the fully-qualified type name of the SQL structured * type for which this <code>Struct</code> object * is the generic representation - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -71,8 +71,8 @@ public interface Struct { * the result. * * @return an array containing the ordered attribute values - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ @@ -96,8 +96,8 @@ public interface Struct { * * @param map a mapping of SQL type names to Java classes * @return an array containing the ordered attribute values - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.2 */ diff --git a/src/java.sql/share/classes/java/sql/Time.java b/src/java.sql/share/classes/java/sql/Time.java index 281d031c7c1..7292d7a5573 100644 --- a/src/java.sql/share/classes/java/sql/Time.java +++ b/src/java.sql/share/classes/java/sql/Time.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -140,8 +140,8 @@ public String toString () { * values do not have a year component. * * @deprecated - * @exception java.lang.IllegalArgumentException if this - * method is invoked + * @throws java.lang.IllegalArgumentException if this + * method is invoked * @see #setYear */ @Deprecated(since="1.2") @@ -154,8 +154,8 @@ public int getYear() { * values do not have a month component. * * @deprecated - * @exception java.lang.IllegalArgumentException if this - * method is invoked + * @throws java.lang.IllegalArgumentException if this + * method is invoked * @see #setMonth */ @Deprecated(since="1.2") @@ -168,8 +168,8 @@ public int getMonth() { * values do not have a day component. * * @deprecated - * @exception java.lang.IllegalArgumentException if this - * method is invoked + * @throws java.lang.IllegalArgumentException if this + * method is invoked */ @Deprecated(since="1.2") public int getDay() { @@ -181,8 +181,8 @@ public int getDay() { * values do not have a date component. * * @deprecated - * @exception java.lang.IllegalArgumentException if this - * method is invoked + * @throws java.lang.IllegalArgumentException if this + * method is invoked * @see #setDate */ @Deprecated(since="1.2") @@ -195,8 +195,8 @@ public int getDate() { * values do not have a year component. * * @deprecated - * @exception java.lang.IllegalArgumentException if this - * method is invoked + * @throws java.lang.IllegalArgumentException if this + * method is invoked * @see #getYear */ @Deprecated(since="1.2") @@ -209,8 +209,8 @@ public void setYear(int i) { * values do not have a month component. * * @deprecated - * @exception java.lang.IllegalArgumentException if this - * method is invoked + * @throws java.lang.IllegalArgumentException if this + * method is invoked * @see #getMonth */ @Deprecated(since="1.2") @@ -223,8 +223,8 @@ public void setMonth(int i) { * values do not have a date component. * * @deprecated - * @exception java.lang.IllegalArgumentException if this - * method is invoked + * @throws java.lang.IllegalArgumentException if this + * method is invoked * @see #getDate */ @Deprecated(since="1.2") @@ -246,7 +246,7 @@ public void setDate(int i) { * * @param time a {@code LocalTime} to convert * @return a {@code Time} object - * @exception NullPointerException if {@code time} is null + * @throws NullPointerException if {@code time} is null * @since 1.8 */ @SuppressWarnings("deprecation") @@ -274,7 +274,7 @@ public LocalTime toLocalTime() { * not be used because SQL {@code Time} values do not have a date * component. * - * @exception java.lang.UnsupportedOperationException if this method is invoked + * @throws java.lang.UnsupportedOperationException if this method is invoked */ @Override public Instant toInstant() { diff --git a/src/java.sql/share/classes/java/sql/Timestamp.java b/src/java.sql/share/classes/java/sql/Timestamp.java index 4b4c334dd45..dc347ab02ff 100644 --- a/src/java.sql/share/classes/java/sql/Timestamp.java +++ b/src/java.sql/share/classes/java/sql/Timestamp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -84,7 +84,7 @@ public class Timestamp extends java.util.Date { * @param second 0 to 59 * @param nano 0 to 999,999,999 * @deprecated instead use the constructor {@code Timestamp(long millis)} - * @exception IllegalArgumentException if the nano argument is out of bounds + * @throws IllegalArgumentException if the nano argument is out of bounds */ @Deprecated(since="1.2") public Timestamp(int year, int month, int date, @@ -163,7 +163,7 @@ public long getTime() { * and {@code dd} may also be omitted. * * @return corresponding {@code Timestamp} value - * @exception java.lang.IllegalArgumentException if the given argument + * @throws java.lang.IllegalArgumentException if the given argument * does not have the format {@code yyyy-[m]m-[d]d hh:mm:ss[.f...]} */ public static Timestamp valueOf(String s) { @@ -327,8 +327,8 @@ public int getNanos() { * to the given value. * * @param n the new fractional seconds component - * @exception java.lang.IllegalArgumentException if the given argument - * is greater than 999999999 or less than 0 + * @throws java.lang.IllegalArgumentException if the given argument + * is greater than 999999999 or less than 0 * @see #getNanos */ public void setNanos(int n) { @@ -490,7 +490,7 @@ public int hashCode() { * * @param dateTime a {@code LocalDateTime} to convert * @return a {@code Timestamp} object - * @exception NullPointerException if {@code dateTime} is null. + * @throws NullPointerException if {@code dateTime} is null. * @since 1.8 */ @SuppressWarnings("deprecation") @@ -535,8 +535,8 @@ public LocalDateTime toLocalDateTime() { * @param instant the instant to convert * @return an {@code Timestamp} representing the same point on the time-line as * the provided instant - * @exception NullPointerException if {@code instant} is null. - * @exception IllegalArgumentException if the instant is too large to + * @throws NullPointerException if {@code instant} is null. + * @throws IllegalArgumentException if the instant is too large to * represent as a {@code Timestamp} * @since 1.8 */ diff --git a/src/java.sql/share/classes/javax/sql/CommonDataSource.java b/src/java.sql/share/classes/javax/sql/CommonDataSource.java index 160c432474d..26a83424142 100644 --- a/src/java.sql/share/classes/javax/sql/CommonDataSource.java +++ b/src/java.sql/share/classes/javax/sql/CommonDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -55,7 +55,7 @@ public interface CommonDataSource { * * @return the log writer for this data source or null if * logging is disabled - * @exception java.sql.SQLException if a database access error occurs + * @throws java.sql.SQLException if a database access error occurs * @see #setLogWriter */ java.io.PrintWriter getLogWriter() throws SQLException; @@ -76,7 +76,7 @@ public interface CommonDataSource { * disabled. * * @param out the new log writer; to disable logging, set to null - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getLogWriter */ void setLogWriter(java.io.PrintWriter out) throws SQLException; @@ -90,7 +90,7 @@ public interface CommonDataSource { * initially zero. * * @param seconds the data source login time limit - * @exception SQLException if a database access error occurs. + * @throws SQLException if a database access error occurs. * @see #getLoginTimeout */ void setLoginTimeout(int seconds) throws SQLException; @@ -104,7 +104,7 @@ public interface CommonDataSource { * initially zero. * * @return the data source login time limit - * @exception SQLException if a database access error occurs. + * @throws SQLException if a database access error occurs. * @see #setLoginTimeout */ int getLoginTimeout() throws SQLException; diff --git a/src/java.sql/share/classes/javax/sql/ConnectionPoolDataSource.java b/src/java.sql/share/classes/javax/sql/ConnectionPoolDataSource.java index db004c4cf1b..d493da2e48f 100644 --- a/src/java.sql/share/classes/javax/sql/ConnectionPoolDataSource.java +++ b/src/java.sql/share/classes/javax/sql/ConnectionPoolDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -48,8 +48,8 @@ public interface ConnectionPoolDataSource extends CommonDataSource { * @return a <code>PooledConnection</code> object that is a physical * connection to the database that this * <code>ConnectionPoolDataSource</code> object represents - * @exception SQLException if a database access error occurs - * @exception java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -64,8 +64,8 @@ public interface ConnectionPoolDataSource extends CommonDataSource { * @return a <code>PooledConnection</code> object that is a physical * connection to the database that this * <code>ConnectionPoolDataSource</code> object represents - * @exception SQLException if a database access error occurs - * @exception java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ diff --git a/src/java.sql/share/classes/javax/sql/DataSource.java b/src/java.sql/share/classes/javax/sql/DataSource.java index b4e2c19a4dd..9b7434677ff 100644 --- a/src/java.sql/share/classes/javax/sql/DataSource.java +++ b/src/java.sql/share/classes/javax/sql/DataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -83,7 +83,7 @@ public interface DataSource extends CommonDataSource, Wrapper { * this {@code DataSource} object represents. * * @return a connection to the data source - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @throws java.sql.SQLTimeoutException when the driver has determined that the * timeout value specified by the {@code setLoginTimeout} method * has been exceeded and has at least tried to cancel the @@ -99,7 +99,7 @@ public interface DataSource extends CommonDataSource, Wrapper { * being made * @param password the user's password * @return a connection to the data source - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @throws java.sql.SQLTimeoutException when the driver has determined that the * timeout value specified by the {@code setLoginTimeout} method * has been exceeded and has at least tried to cancel the diff --git a/src/java.sql/share/classes/javax/sql/PooledConnection.java b/src/java.sql/share/classes/javax/sql/PooledConnection.java index 83e35b41a85..6a53539eb53 100644 --- a/src/java.sql/share/classes/javax/sql/PooledConnection.java +++ b/src/java.sql/share/classes/javax/sql/PooledConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -110,8 +110,8 @@ public interface PooledConnection { * * @return a <code>Connection</code> object that is a handle to * this <code>PooledConnection</code> object - * @exception SQLException if a database access error occurs - * @exception java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -125,8 +125,8 @@ public interface PooledConnection { * See the {@link PooledConnection interface description} for more * information. * - * @exception SQLException if a database access error occurs - * @exception java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ diff --git a/src/java.sql/share/classes/javax/sql/RowSet.java b/src/java.sql/share/classes/javax/sql/RowSet.java index 48a012c3dc1..a8a4efd9823 100644 --- a/src/java.sql/share/classes/javax/sql/RowSet.java +++ b/src/java.sql/share/classes/javax/sql/RowSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -101,7 +101,7 @@ public interface RowSet extends ResultSet { * The default value is <code>null</code>. * * @return a string url - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #setUrl */ String getUrl() throws SQLException; @@ -118,7 +118,7 @@ public interface RowSet extends ResultSet { * connection, whichever was set to non null value most recently. * * @param url a string value; may be <code>null</code> - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getUrl */ void setUrl(String url) throws SQLException; @@ -144,7 +144,7 @@ public interface RowSet extends ResultSet { * * @param name the logical name of the data source for this <code>RowSet</code> * object; may be <code>null</code> - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getDataSourceName */ void setDataSourceName(String name) throws SQLException; @@ -166,7 +166,7 @@ public interface RowSet extends ResultSet { * given <code>String</code>. * * @param name a user name - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getUsername */ void setUsername(String name) throws SQLException; @@ -187,7 +187,7 @@ public interface RowSet extends ResultSet { * the given <code>String</code>. * * @param password the password string - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getPassword */ void setPassword(String password) throws SQLException; @@ -213,7 +213,7 @@ public interface RowSet extends ResultSet { * <code>Connection.TRANSACTION_READ_COMMITTED</code>, * <code>Connection.TRANSACTION_REPEATABLE_READ</code>, or * <code>Connection.TRANSACTION_SERIALIZABLE</code> - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getTransactionIsolation */ void setTransactionIsolation(int level) throws SQLException; @@ -228,7 +228,7 @@ public interface RowSet extends ResultSet { * SQL user-defined types and the Java classes to which they are * to be mapped * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #setTypeMap */ java.util.Map<String,Class<?>> getTypeMap() throws SQLException; @@ -241,7 +241,7 @@ public interface RowSet extends ResultSet { * @param map a <code>java.util.Map</code> object containing the names of * SQL user-defined types and the Java classes to which they are * to be mapped - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getTypeMap */ void setTypeMap(java.util.Map<String,Class<?>> map) throws SQLException; @@ -272,7 +272,7 @@ public interface RowSet extends ResultSet { * * @param cmd the SQL query that will be used to get the data for this * <code>RowSet</code> object; may be <code>null</code> - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getCommand */ void setCommand(String cmd) throws SQLException; @@ -297,7 +297,7 @@ public interface RowSet extends ResultSet { * * @param value <code>true</code> if read-only; <code>false</code> if * updatable - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #isReadOnly */ void setReadOnly(boolean value) throws SQLException; @@ -313,7 +313,7 @@ public interface RowSet extends ResultSet { * * @return the current maximum column size limit; zero means that there * is no limit - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #setMaxFieldSize */ int getMaxFieldSize() throws SQLException; @@ -329,7 +329,7 @@ public interface RowSet extends ResultSet { * For maximum portability, use values greater than 256. * * @param max the new max column size limit in bytes; zero means unlimited - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getMaxFieldSize */ void setMaxFieldSize(int max) throws SQLException; @@ -341,7 +341,7 @@ public interface RowSet extends ResultSet { * * @return the current maximum number of rows that this <code>RowSet</code> * object can contain; zero means unlimited - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #setMaxRows */ int getMaxRows() throws SQLException; @@ -352,7 +352,7 @@ public interface RowSet extends ResultSet { * If the limit is exceeded, the excess rows are silently dropped. * * @param max the new maximum number of rows; zero means unlimited - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getMaxRows */ void setMaxRows(int max) throws SQLException; @@ -365,7 +365,7 @@ public interface RowSet extends ResultSet { * * @return <code>true</code> if escape processing is enabled; * <code>false</code> if it is disabled - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #setEscapeProcessing */ boolean getEscapeProcessing() throws SQLException; @@ -377,7 +377,7 @@ public interface RowSet extends ResultSet { * * @param enable <code>true</code> to enable escape processing; * <code>false</code> to disable it - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getEscapeProcessing */ void setEscapeProcessing(boolean enable) throws SQLException; @@ -389,7 +389,7 @@ public interface RowSet extends ResultSet { * * @return the current query timeout limit in seconds; zero means * unlimited - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #setQueryTimeout */ int getQueryTimeout() throws SQLException; @@ -401,7 +401,7 @@ public interface RowSet extends ResultSet { * * @param seconds the new query timeout limit in seconds; zero means * that there is no limit - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see #getQueryTimeout */ void setQueryTimeout(int seconds) throws SQLException; @@ -415,7 +415,7 @@ public interface RowSet extends ResultSet { * <code>ResultSet.TYPE_FORWARD_ONLY</code>, * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see java.sql.ResultSet#getType */ void setType(int type) throws SQLException; @@ -428,7 +428,7 @@ public interface RowSet extends ResultSet { * @param concurrency one of the <code>ResultSet</code> constants specifying a * concurrency level: <code>ResultSet.CONCUR_READ_ONLY</code> or * <code>ResultSet.CONCUR_UPDATABLE</code> - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see ResultSet#getConcurrency */ void setConcurrency(int concurrency) throws SQLException; @@ -451,7 +451,7 @@ public interface RowSet extends ResultSet { * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param sqlType a SQL type code defined by <code>java.sql.Types</code> - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setNull(int parameterIndex, int sqlType) throws SQLException; @@ -462,9 +462,9 @@ public interface RowSet extends ResultSet { * * @param parameterName the name of the parameter * @param sqlType the SQL type code defined in <code>java.sql.Types</code> - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -496,7 +496,7 @@ public interface RowSet extends ResultSet { * @param typeName the fully qualified name of an SQL UDT or the type * name of the SQL structured type being referenced by a <code>REF</code> * type; ignored if the parameter is not a UDT or <code>REF</code> type - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setNull (int paramIndex, int sqlType, String typeName) throws SQLException; @@ -527,9 +527,9 @@ void setNull (int paramIndex, int sqlType, String typeName) * @param typeName the fully-qualified name of an SQL user-defined type; * ignored if the parameter is not a user-defined type or * SQL <code>REF</code> value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -543,7 +543,7 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setBoolean(int parameterIndex, boolean x) throws SQLException; @@ -554,10 +554,10 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} * @see #getBoolean - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -570,7 +570,7 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setByte(int parameterIndex, byte x) throws SQLException; @@ -581,9 +581,9 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getByte * @since 1.4 @@ -597,7 +597,7 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setShort(int parameterIndex, short x) throws SQLException; @@ -608,9 +608,9 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getShort * @since 1.4 @@ -624,7 +624,7 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setInt(int parameterIndex, int x) throws SQLException; @@ -635,9 +635,9 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getInt * @since 1.4 @@ -651,7 +651,7 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setLong(int parameterIndex, long x) throws SQLException; @@ -662,9 +662,9 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getLong * @since 1.4 @@ -678,7 +678,7 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setFloat(int parameterIndex, float x) throws SQLException; @@ -689,9 +689,9 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getFloat * @since 1.4 @@ -705,7 +705,7 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setDouble(int parameterIndex, double x) throws SQLException; @@ -716,9 +716,9 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getDouble * @since 1.4 @@ -733,7 +733,7 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException; @@ -745,9 +745,9 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getBigDecimal * @since 1.4 @@ -763,7 +763,7 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setString(int parameterIndex, String x) throws SQLException; @@ -777,9 +777,9 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getString * @since 1.4 @@ -795,7 +795,7 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setBytes(int parameterIndex, byte x[]) throws SQLException; @@ -808,9 +808,9 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getBytes * @since 1.4 @@ -825,7 +825,7 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setDate(int parameterIndex, java.sql.Date x) throws SQLException; @@ -837,7 +837,7 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setTime(int parameterIndex, java.sql.Time x) throws SQLException; @@ -849,7 +849,7 @@ void setNull (String parameterName, int sqlType, String typeName) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws SQLException; @@ -862,9 +862,9 @@ void setTimestamp(int parameterIndex, java.sql.Timestamp x) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTimestamp * @since 1.4 @@ -887,7 +887,7 @@ void setTimestamp(String parameterName, java.sql.Timestamp x) * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the Java input stream that contains the ASCII parameter value * @param length the number of bytes in the stream - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException; @@ -908,9 +908,9 @@ void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) * @param parameterName the name of the parameter * @param x the Java input stream that contains the ASCII parameter value * @param length the number of bytes in the stream - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -932,7 +932,7 @@ void setAsciiStream(String parameterName, java.io.InputStream x, int length) * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the java input stream which contains the binary parameter value * @param length the number of bytes in the stream - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws SQLException; @@ -952,9 +952,9 @@ void setBinaryStream(int parameterIndex, java.io.InputStream x, * @param parameterName the name of the parameter * @param x the java input stream which contains the binary parameter value * @param length the number of bytes in the stream - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -977,7 +977,7 @@ void setBinaryStream(String parameterName, java.io.InputStream x, * @param reader the {@code Reader} object that contains the UNICODE data * to be set * @param length the number of characters in the stream - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setCharacterStream(int parameterIndex, Reader reader, @@ -1000,9 +1000,9 @@ void setCharacterStream(int parameterIndex, * @param reader the <code>java.io.Reader</code> object that * contains the UNICODE data used as the designated parameter * @param length the number of characters in the stream - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.4 */ @@ -1028,8 +1028,8 @@ void setCharacterStream(String parameterName, * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the Java input stream that contains the ASCII parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code PreparedStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ @@ -1053,8 +1053,8 @@ void setAsciiStream(int parameterIndex, java.io.InputStream x) * * @param parameterName the name of the parameter * @param x the Java input stream that contains the ASCII parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ @@ -1078,8 +1078,8 @@ void setAsciiStream(String parameterName, java.io.InputStream x) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the java input stream which contains the binary parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code PreparedStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ @@ -1102,8 +1102,8 @@ void setBinaryStream(int parameterIndex, java.io.InputStream x) * * @param parameterName the name of the parameter * @param x the java input stream which contains the binary parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ @@ -1130,8 +1130,8 @@ void setBinaryStream(String parameterName, java.io.InputStream x) * @param parameterIndex the first parameter is 1, the second is 2, ... * @param reader the <code>java.io.Reader</code> object that contains the * Unicode data - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code PreparedStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ @@ -1157,8 +1157,8 @@ void setCharacterStream(int parameterIndex, * @param parameterName the name of the parameter * @param reader the <code>java.io.Reader</code> object that contains the * Unicode data - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.6 */ @@ -1232,7 +1232,7 @@ void setCharacterStream(String parameterName, * this is the length * of the data in the stream or {@code Reader}. For all other types, * this value will be ignored. - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see java.sql.Types */ void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) @@ -1266,14 +1266,14 @@ void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLengt * @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, * this is the number of digits after the decimal point. For all other * types, this value will be ignored. - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is - * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>, - * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>, - * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>, - * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code> - * or <code>STRUCT</code> data type and the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if {@code targetSqlType} is + * a {@code ARRAY}, {@code BLOB}, {@code CLOB}, + * {@code DATALINK}, {@code JAVA_OBJECT}, {@code NCHAR}, + * {@code NCLOB}, {@code NVARCHAR}, {@code LONGNVARCHAR}, + * {@code REF}, {@code ROWID}, {@code SQLXML} + * or {@code STRUCT} data type and the JDBC driver does not support * this data type * @see Types * @see #getObject @@ -1297,7 +1297,7 @@ void setObject(String parameterName, Object x, int targetSqlType, int scale) * @param x the object containing the input parameter value * @param targetSqlType the SQL type (as defined in <code>java.sql.Types</code>) * to be sent to the database - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException; @@ -1311,14 +1311,14 @@ void setObject(int parameterIndex, Object x, * @param x the object containing the input parameter value * @param targetSqlType the SQL type (as defined in java.sql.Types) to be * sent to the database - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is - * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>, - * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>, - * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>, - * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code> - * or <code>STRUCT</code> data type and the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if {@code targetSqlType} is + * a {@code ARRAY}, {@code BLOB}, {@code CLOB}, + * {@code DATALINK}, {@code JAVA_OBJECT}, {@code NCHAR}, + * {@code NCLOB}, {@code NVARCHAR}, {@code LONGNVARCHAR}, + * {@code REF}, {@code ROWID}, {@code SQLXML} + * or {@code STRUCT} data type and the JDBC driver does not support * this data type * @see #getObject * @since 1.4 @@ -1354,10 +1354,10 @@ void setObject(String parameterName, Object x, int targetSqlType) * * @param parameterName the name of the parameter * @param x the object containing the input parameter value - * @exception SQLException if a database access error occurs, - * this method is called on a closed <code>CallableStatement</code> or if the given - * <code>Object</code> parameter is ambiguous - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs, + * this method is called on a closed {@code CallableStatement} or if the given + * {@code Object} parameter is ambiguous + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getObject * @since 1.4 @@ -1392,7 +1392,7 @@ void setObject(String parameterName, Object x, int targetSqlType) * * @param parameterIndex The first parameter is 1, the second is 2, ... * @param x The object containing the input parameter value - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setObject(int parameterIndex, Object x) throws SQLException; @@ -1404,7 +1404,7 @@ void setObject(String parameterName, Object x, int targetSqlType) * * @param i the first parameter is 1, the second is 2, ... * @param x an object representing data of an SQL <code>REF</code> type - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setRef (int i, Ref x) throws SQLException; @@ -1416,7 +1416,7 @@ void setObject(String parameterName, Object x, int targetSqlType) * * @param i the first parameter is 1, the second is 2, ... * @param x an object representing a BLOB - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setBlob (int i, Blob x) throws SQLException; @@ -1497,7 +1497,7 @@ void setBlob(int parameterIndex, InputStream inputStream) * is less than zero; if the number of bytes in the <code>InputStream</code> does not match * the specified length; if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * * @since 1.6 @@ -1512,9 +1512,9 @@ void setBlob(String parameterName, InputStream inputStream, long length) * * @param parameterName the name of the parameter * @param x a <code>Blob</code> object that maps an SQL <code>BLOB</code> value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -1552,7 +1552,7 @@ void setBlob(String parameterName, InputStream inputStream) * * @param i the first parameter is 1, the second is 2, ... * @param x an object representing a CLOB - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setClob (int i, Clob x) throws SQLException; @@ -1620,7 +1620,7 @@ void setClob(int parameterIndex, Reader reader) * marker in the SQL statement; if the length specified is less than zero; * a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * * @since 1.6 @@ -1635,9 +1635,9 @@ void setClob(String parameterName, Reader reader, long length) * * @param parameterName the name of the parameter * @param x a <code>Clob</code> object that maps an SQL <code>CLOB</code> value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -1674,7 +1674,7 @@ void setClob(String parameterName, Reader reader) * * @param i the first parameter is 1, the second is 2, ... * @param x an object representing an SQL array - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setArray (int i, Array x) throws SQLException; @@ -1687,7 +1687,7 @@ void setClob(String parameterName, Reader reader) * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @param cal the <code>java.util.Calendar</code> object to use for calculating the date - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setDate(int parameterIndex, java.sql.Date x, Calendar cal) throws SQLException; @@ -1701,9 +1701,9 @@ void setDate(int parameterIndex, java.sql.Date x, Calendar cal) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getDate * @since 1.4 @@ -1725,9 +1725,9 @@ void setDate(String parameterName, java.sql.Date x) * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the date - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getDate * @since 1.4 @@ -1744,7 +1744,7 @@ void setDate(String parameterName, java.sql.Date x, Calendar cal) * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value * @param cal the <code>java.util.Calendar</code> object to use for calculating the time - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setTime(int parameterIndex, java.sql.Time x, Calendar cal) throws SQLException; @@ -1756,9 +1756,9 @@ void setTime(int parameterIndex, java.sql.Time x, Calendar cal) * * @param parameterName the name of the parameter * @param x the parameter value - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTime * @since 1.4 @@ -1780,9 +1780,9 @@ void setTime(String parameterName, java.sql.Time x) * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the time - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTime * @since 1.4 @@ -1801,7 +1801,7 @@ void setTime(String parameterName, java.sql.Time x, Calendar cal) * @param x the parameter value * @param cal the <code>java.util.Calendar</code> object to use for calculating the * timestamp - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal) throws SQLException; @@ -1820,9 +1820,9 @@ void setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal) * @param x the parameter value * @param cal the <code>Calendar</code> object the driver will use * to construct the timestamp - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code CallableStatement} + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @see #getTimestamp * @since 1.4 @@ -1838,7 +1838,7 @@ void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal) * release the resources used by the current parameter values, which can * be done by calling the method <code>clearParameters</code>. * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void clearParameters() throws SQLException; @@ -1870,9 +1870,9 @@ void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal) * <code>execute</code> will call on the {@code Reader}'s <code>readData</code> * method as part of its implementation. * - * @exception SQLException if a database access error occurs or any of the - * properties necessary for making a connection and creating - * a statement have not been set + * @throws SQLException if a database access error occurs or any of the + * properties necessary for making a connection and creating + * a statement have not been set */ void execute() throws SQLException; @@ -2079,7 +2079,7 @@ public void setNCharacterStream(String parameterName, Reader value, long length) * character sets; if the driver can detect that a data conversion * error could occur; if a database access error occurs or * this method is called on a closed <code>CallableStatement</code> - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @since 1.6 */ @@ -2181,8 +2181,8 @@ void setNClob(int parameterIndex, Reader reader) * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the <code>java.net.URL</code> object to be set - * @exception SQLException if a database access error occurs or - * this method is called on a closed <code>PreparedStatement</code> + * @throws SQLException if a database access error occurs or + * this method is called on a closed {@code PreparedStatement} * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method * @since 1.4 */ diff --git a/src/java.sql/share/classes/javax/sql/RowSetInternal.java b/src/java.sql/share/classes/javax/sql/RowSetInternal.java index a58d862c19c..d7e947c1b56 100644 --- a/src/java.sql/share/classes/javax/sql/RowSetInternal.java +++ b/src/java.sql/share/classes/javax/sql/RowSetInternal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -45,7 +45,7 @@ public interface RowSetInternal { * * @return an array of the current parameter values for this <code>RowSet</code> * object's command - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ Object[] getParams() throws SQLException; @@ -55,7 +55,7 @@ public interface RowSetInternal { * * @return the <code>Connection</code> object passed to the rowset * or <code>null</code> if none was passed - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ Connection getConnection() throws SQLException; @@ -69,7 +69,7 @@ public interface RowSetInternal { * @param md the <code>RowSetMetaData</code> object that will be set with * information about the rowset's columns * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setMetaData(RowSetMetaData md) throws SQLException; @@ -82,7 +82,7 @@ public interface RowSetInternal { * <code>getOriginal</code> are said to have an original value. * * @return the original value of the rowset - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ public ResultSet getOriginal() throws SQLException; @@ -93,10 +93,10 @@ public interface RowSetInternal { * an exception is thrown. * * @return the original value of the current row as a <code>ResultSet</code> - * object - * @exception SQLException if a database access error occurs or this method - * is called while the cursor is on the insert row, before the - * first row, or after the last row + * object + * @throws SQLException if a database access error occurs or this method + * is called while the cursor is on the insert row, before the + * first row, or after the last row */ public ResultSet getOriginalRow() throws SQLException; diff --git a/src/java.sql/share/classes/javax/sql/RowSetMetaData.java b/src/java.sql/share/classes/javax/sql/RowSetMetaData.java index 76bc4f78ebb..464dff31703 100644 --- a/src/java.sql/share/classes/javax/sql/RowSetMetaData.java +++ b/src/java.sql/share/classes/javax/sql/RowSetMetaData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -51,7 +51,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * the given number. * * @param columnCount the number of columns in the <code>RowSet</code> object - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setColumnCount(int columnCount) throws SQLException; @@ -64,7 +64,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * @param property <code>true</code> if the column is automatically * numbered; <code>false</code> if it is not * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setAutoIncrement(int columnIndex, boolean property) throws SQLException; @@ -76,7 +76,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * @param property <code>true</code> if the column is case sensitive; * <code>false</code> if it is not * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setCaseSensitive(int columnIndex, boolean property) throws SQLException; @@ -88,7 +88,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * @param property <code>true</code> if the column can be used in a * <code>WHERE</code> clause; <code>false</code> if it cannot * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setSearchable(int columnIndex, boolean property) throws SQLException; @@ -100,7 +100,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * @param property <code>true</code> if the column is a cash value; * <code>false</code> if it is not * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setCurrency(int columnIndex, boolean property) throws SQLException; @@ -115,7 +115,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * <code>ResultSetMetaData.columnNullable</code>, or * <code>ResultSetMetaData.columnNullableUnknown</code> * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setNullable(int columnIndex, int property) throws SQLException; @@ -127,7 +127,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * @param property <code>true</code> if the column is a signed number; * <code>false</code> if it is not * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setSigned(int columnIndex, boolean property) throws SQLException; @@ -139,7 +139,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * @param size the normal maximum number of characters for * the designated column * - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setColumnDisplaySize(int columnIndex, int size) throws SQLException; @@ -149,7 +149,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * * @param columnIndex the first column is 1, the second is 2, ... * @param label the column title - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setColumnLabel(int columnIndex, String label) throws SQLException; @@ -158,7 +158,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * * @param columnIndex the first column is 1, the second is 2, ... * @param columnName the designated column's name - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setColumnName(int columnIndex, String columnName) throws SQLException; @@ -168,7 +168,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * * @param columnIndex the first column is 1, the second is 2, ... * @param schemaName the schema name - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setSchemaName(int columnIndex, String schemaName) throws SQLException; @@ -178,7 +178,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * * @param columnIndex the first column is 1, the second is 2, ... * @param precision the total number of decimal digits - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setPrecision(int columnIndex, int precision) throws SQLException; @@ -188,7 +188,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * * @param columnIndex the first column is 1, the second is 2, ... * @param scale the number of digits to right of decimal point - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setScale(int columnIndex, int scale) throws SQLException; @@ -198,7 +198,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * * @param columnIndex the first column is 1, the second is 2, ... * @param tableName the column's table name - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setTableName(int columnIndex, String tableName) throws SQLException; @@ -208,7 +208,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * * @param columnIndex the first column is 1, the second is 2, ... * @param catalogName the column's catalog name - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setCatalogName(int columnIndex, String catalogName) throws SQLException; @@ -217,7 +217,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * * @param columnIndex the first column is 1, the second is 2, ... * @param SQLType the column's SQL type - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs * @see Types */ void setColumnType(int columnIndex, int SQLType) throws SQLException; @@ -228,7 +228,7 @@ public interface RowSetMetaData extends ResultSetMetaData { * * @param columnIndex the first column is 1, the second is 2, ... * @param typeName data source specific type name. - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ void setColumnTypeName(int columnIndex, String typeName) throws SQLException; diff --git a/src/java.sql/share/classes/javax/sql/RowSetReader.java b/src/java.sql/share/classes/javax/sql/RowSetReader.java index c699db2aea5..a693b417cc3 100644 --- a/src/java.sql/share/classes/javax/sql/RowSetReader.java +++ b/src/java.sql/share/classes/javax/sql/RowSetReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -65,8 +65,8 @@ public interface RowSetReader { * @param caller the <code>RowSet</code> object (1) that has implemented the * <code>RowSetInternal</code> interface, (2) with which this reader is * registered, and (3) whose <code>execute</code> method called this reader - * @exception SQLException if a database access error occurs or this method - * invokes the <code>RowSet.execute</code> method + * @throws SQLException if a database access error occurs or this method + * invokes the {@code RowSet.execute} method */ void readData(RowSetInternal caller) throws SQLException; diff --git a/src/java.sql/share/classes/javax/sql/RowSetWriter.java b/src/java.sql/share/classes/javax/sql/RowSetWriter.java index 1865ba24c9a..3f46554019b 100644 --- a/src/java.sql/share/classes/javax/sql/RowSetWriter.java +++ b/src/java.sql/share/classes/javax/sql/RowSetWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -57,7 +57,7 @@ public interface RowSetWriter { * registered, and (3) that called this method internally * @return <code>true</code> if the modified data was written; <code>false</code> * if not, which will be the case if there is a conflict - * @exception SQLException if a database access error occurs + * @throws SQLException if a database access error occurs */ boolean writeData(RowSetInternal caller) throws SQLException; diff --git a/src/java.sql/share/classes/javax/sql/XAConnection.java b/src/java.sql/share/classes/javax/sql/XAConnection.java index 76c1894c219..c0d0e7a92cf 100644 --- a/src/java.sql/share/classes/javax/sql/XAConnection.java +++ b/src/java.sql/share/classes/javax/sql/XAConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -46,8 +46,8 @@ public interface XAConnection extends PooledConnection { * in a distributed transaction. * * @return the {@code XAResource} object - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not * support this method * @since 1.4 */ diff --git a/src/java.sql/share/classes/javax/sql/XADataSource.java b/src/java.sql/share/classes/javax/sql/XADataSource.java index 7c1fbaada27..0f7a597476b 100644 --- a/src/java.sql/share/classes/javax/sql/XADataSource.java +++ b/src/java.sql/share/classes/javax/sql/XADataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -48,8 +48,8 @@ public interface XADataSource extends CommonDataSource { * @return an {@code XAConnection} object, which represents a * physical connection to a data source, that can be used in * a distributed transaction - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @throws SQLTimeoutException when the driver has determined that the * timeout value specified by the {@code setLoginTimeout} method @@ -69,8 +69,8 @@ public interface XADataSource extends CommonDataSource { * @return an {@code XAConnection} object, which represents a * physical connection to a data source, that can be used in * a distributed transaction - * @exception SQLException if a database access error occurs - * @exception SQLFeatureNotSupportedException if the JDBC driver does not support + * @throws SQLException if a database access error occurs + * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method * @throws SQLTimeoutException when the driver has determined that the * timeout value specified by the {@code setLoginTimeout} method diff --git a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AWTEventMonitor.java b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AWTEventMonitor.java index 28f2a97b6db..5dc686f31df 100644 --- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AWTEventMonitor.java +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AWTEventMonitor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -45,6 +45,11 @@ public class AWTEventMonitor { + /** + * Constructs an {@code AWTEventMonitor}. + */ + public AWTEventMonitor() {} + /** * The current component with keyboard focus. * diff --git a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AccessibilityEventMonitor.java b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AccessibilityEventMonitor.java index 78375e72b5c..e9a90e9e45c 100644 --- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AccessibilityEventMonitor.java +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AccessibilityEventMonitor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -45,6 +45,11 @@ public class AccessibilityEventMonitor { + /** + * Constructs an {@code AccessibilityEventMonitor}. + */ + public AccessibilityEventMonitor() {} + // listeners /** * The current list of registered {@link java.beans.PropertyChangeListener diff --git a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AccessibilityListenerList.java b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AccessibilityListenerList.java index 0de59f95244..62133dc6773 100644 --- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AccessibilityListenerList.java +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AccessibilityListenerList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -46,6 +46,11 @@ public class AccessibilityListenerList { */ protected transient Object[] listenerList = NULL_ARRAY; + /** + * Constructs an {@code AccessibilityListenerList}. + */ + public AccessibilityListenerList() {} + /** * Passes back the event listener list as an array of listener type, listener pairs. * Note that for performance reasons, this implementation passes back the actual diff --git a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/EventID.java b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/EventID.java index f984034b49f..4fbf8ee508a 100644 --- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/EventID.java +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/EventID.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -37,6 +37,11 @@ */ public class EventID { + /** + * Constructs an {@code EventID}. + */ + public EventID() {} + /** * Maps to AWT Action support (i.e., ActionListener and ActionEvent) */ diff --git a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/SwingEventMonitor.java b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/SwingEventMonitor.java index c5dcda4df3e..d8d82970ef5 100644 --- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/SwingEventMonitor.java +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/SwingEventMonitor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -73,6 +73,11 @@ public class SwingEventMonitor extends AWTEventMonitor { */ static private final SwingEventListener swingListener = new SwingEventListener(); + /** + * Constructs a {@code SwingEventMonitor}. + */ + public SwingEventMonitor() {} + /** * Adds the specified listener to receive all {@link EventID#ANCESTOR ANCESTOR} * events on each component instance in the Java Virtual Machine as they occur. diff --git a/src/jdk.attach/windows/classes/sun/tools/attach/AttachProviderImpl.java b/src/jdk.attach/windows/classes/sun/tools/attach/AttachProviderImpl.java index c094622e7db..9a12c4bbbff 100644 --- a/src/jdk.attach/windows/classes/sun/tools/attach/AttachProviderImpl.java +++ b/src/jdk.attach/windows/classes/sun/tools/attach/AttachProviderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -43,7 +43,7 @@ public AttachProviderImpl() { "This provider is not supported on this version of Windows"); } String arch = System.getProperty("os.arch"); - if (!arch.equals("x86") && !arch.equals("amd64")) { + if (!arch.equals("x86") && !arch.equals("amd64") && !arch.equals("aarch64")) { throw new RuntimeException( "This provider is not supported on this processor architecture"); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/doclint/DocLint.java b/src/jdk.compiler/share/classes/com/sun/tools/doclint/DocLint.java index f0e576906ac..f14aa349d10 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/doclint/DocLint.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/doclint/DocLint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 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 @@ -25,422 +25,63 @@ package com.sun.tools.doclint; -import java.io.File; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; +import java.util.ServiceLoader; -import javax.lang.model.element.Name; -import javax.tools.StandardLocation; - -import com.sun.source.doctree.DocCommentTree; -import com.sun.source.tree.BlockTree; -import com.sun.source.tree.ClassTree; -import com.sun.source.tree.CompilationUnitTree; -import com.sun.source.tree.LambdaExpressionTree; -import com.sun.source.tree.ModuleTree; -import com.sun.source.tree.PackageTree; -import com.sun.source.tree.MethodTree; -import com.sun.source.tree.Tree; -import com.sun.source.tree.VariableTree; import com.sun.source.util.JavacTask; import com.sun.source.util.Plugin; -import com.sun.source.util.TaskEvent; -import com.sun.source.util.TaskListener; -import com.sun.source.util.TreePath; -import com.sun.source.util.TreePathScanner; -import com.sun.tools.javac.api.JavacTaskImpl; -import com.sun.tools.javac.api.JavacTool; -import com.sun.tools.javac.file.JavacFileManager; -import com.sun.tools.javac.main.JavaCompiler; -import com.sun.tools.javac.util.Context; -import com.sun.tools.javac.util.DefinedBy; -import com.sun.tools.javac.util.DefinedBy.Api; /** - * Multi-function entry point for the doc check utility. - * - * This class can be invoked in the following ways: - * <ul> - * <li>From the command line - * <li>From javac, as a plugin - * <li>Directly, via a simple API - * </ul> + * The base class for the DocLint service used by javac. * * <p><b>This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own - * risk. This code and its internal interfaces are subject to change - * or deletion without notice.</b></p> + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> */ -public class DocLint implements Plugin { - +public abstract class DocLint implements Plugin { public static final String XMSGS_OPTION = "-Xmsgs"; public static final String XMSGS_CUSTOM_PREFIX = "-Xmsgs:"; - private static final String STATS = "-stats"; - public static final String XCUSTOM_TAGS_PREFIX = "-XcustomTags:"; public static final String XHTML_VERSION_PREFIX = "-XhtmlVersion:"; public static final String XCHECK_PACKAGE = "-XcheckPackage:"; - public static final String SEPARATOR = ","; - - // <editor-fold defaultstate="collapsed" desc="Command-line entry point"> - public static void main(String... args) { - DocLint dl = new DocLint(); - try { - dl.run(args); - } catch (BadArgs e) { - System.err.println(e.getMessage()); - System.exit(1); - } catch (IOException e) { - System.err.println(dl.localize("dc.main.ioerror", e.getLocalizedMessage())); - System.exit(2); - } - } - - // </editor-fold> - - // <editor-fold defaultstate="collapsed" desc="Simple API"> - - public class BadArgs extends Exception { - private static final long serialVersionUID = 0; - BadArgs(String code, Object... args) { - super(localize(code, args)); - this.code = code; - this.args = args; - } - - final String code; - final transient Object[] args; - } - - /** - * Simple API entry point. - * @param args Options and operands for doclint - * @throws BadArgs if an error is detected in any args - * @throws IOException if there are problems with any of the file arguments - */ - public void run(String... args) throws BadArgs, IOException { - PrintWriter out = new PrintWriter(System.out); - try { - run(out, args); - } finally { - out.flush(); - } - } - - public void run(PrintWriter out, String... args) throws BadArgs, IOException { - env = new Env(); - processArgs(args); - - boolean noFiles = javacFiles.isEmpty(); - if (needHelp) { - showHelp(out); - if (noFiles) - return; - } else if (noFiles) { - out.println(localize("dc.main.no.files.given")); - return; - } - - JavacTool tool = JavacTool.create(); - - JavacFileManager fm = new JavacFileManager(new Context(), false, null); - fm.setSymbolFileEnabled(false); - if (javacBootClassPath != null) { - fm.setLocation(StandardLocation.PLATFORM_CLASS_PATH, javacBootClassPath); - } - if (javacClassPath != null) { - fm.setLocation(StandardLocation.CLASS_PATH, javacClassPath); - } - if (javacSourcePath != null) { - fm.setLocation(StandardLocation.SOURCE_PATH, javacSourcePath); - } - - JavacTask task = tool.getTask(out, fm, null, javacOpts, null, - fm.getJavaFileObjectsFromFiles(javacFiles)); - Iterable<? extends CompilationUnitTree> units = task.parse(); - ((JavacTaskImpl) task).enter(); - - env.init(task); - checker = new Checker(env); - - DeclScanner ds = new DeclScanner(env) { - @Override - void visitDecl(Tree tree, Name name) { - TreePath p = getCurrentPath(); - DocCommentTree dc = env.trees.getDocCommentTree(p); - - checker.scan(dc, p); - } - }; - - ds.scan(units, null); - - reportStats(out); - - Context ctx = ((JavacTaskImpl) task).getContext(); - JavaCompiler c = JavaCompiler.instance(ctx); - c.printCount("error", c.errorCount()); - c.printCount("warn", c.warningCount()); - } - - void processArgs(String... args) throws BadArgs { - javacOpts = new ArrayList<>(); - javacFiles = new ArrayList<>(); - - if (args.length == 0) - needHelp = true; - - for (int i = 0; i < args.length; i++) { - String arg = args[i]; - if (arg.matches("-Xmax(errs|warns)") && i + 1 < args.length) { - if (args[++i].matches("[0-9]+")) { - javacOpts.add(arg); - javacOpts.add(args[i]); - } else { - throw new BadArgs("dc.bad.value.for.option", arg, args[i]); - } - } else if ((arg.equals("-target") || arg.equals("-source")) && i + 1 < args.length) { - javacOpts.add(arg); - javacOpts.add(args[++i]); - } else if (arg.equals(STATS)) { - env.messages.setStatsEnabled(true); - } else if (arg.equals("-bootclasspath") && i + 1 < args.length) { - javacBootClassPath = splitPath(args[++i]); - } else if (arg.equals("-classpath") && i + 1 < args.length) { - javacClassPath = splitPath(args[++i]); - } else if (arg.equals("-cp") && i + 1 < args.length) { - javacClassPath = splitPath(args[++i]); - } else if (arg.equals("-sourcepath") && i + 1 < args.length) { - javacSourcePath = splitPath(args[++i]); - } else if (arg.equals(XMSGS_OPTION)) { - env.messages.setOptions(null); - } else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) { - env.messages.setOptions(arg.substring(arg.indexOf(":") + 1)); - } else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) { - env.setCustomTags(arg.substring(arg.indexOf(":") + 1)); - } else if (arg.startsWith(XHTML_VERSION_PREFIX)) { - String argsVersion = arg.substring(arg.indexOf(":") + 1); - HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion); - if (htmlVersion != null) { - env.setHtmlVersion(htmlVersion); - } else { - throw new BadArgs("dc.bad.value.for.option", arg, argsVersion); - } - } else if (arg.equals("-h") || arg.equals("-help") || arg.equals("--help") - || arg.equals("-?") || arg.equals("-usage")) { - needHelp = true; - } else if (arg.startsWith("-")) { - throw new BadArgs("dc.bad.option", arg); - } else { - while (i < args.length) - javacFiles.add(new File(args[i++])); - } - } - } - - void showHelp(PrintWriter out) { - String msg = localize("dc.main.usage"); - for (String line: msg.split("\n")) - out.println(line); - } - - List<File> splitPath(String path) { - List<File> files = new ArrayList<>(); - for (String f: path.split(File.pathSeparator)) { - if (f.length() > 0) - files.add(new File(f)); - } - return files; - } - - List<File> javacBootClassPath; - List<File> javacClassPath; - List<File> javacSourcePath; - List<String> javacOpts; - List<File> javacFiles; - boolean needHelp = false; - - // </editor-fold> - // <editor-fold defaultstate="collapsed" desc="javac Plugin"> + private static ServiceLoader.Provider<DocLint> docLintProvider; - @Override @DefinedBy(Api.COMPILER_TREE) - public String getName() { - return "doclint"; - } - - @Override @DefinedBy(Api.COMPILER_TREE) - public void init(JavacTask task, String... args) { - init(task, args, true); - } - - // </editor-fold> - - // <editor-fold defaultstate="collapsed" desc="Embedding API"> - - public void init(JavacTask task, String[] args, boolean addTaskListener) { - env = new Env(); - for (String arg : args) { - if (arg.equals(XMSGS_OPTION)) { - env.messages.setOptions(null); - } else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) { - env.messages.setOptions(arg.substring(arg.indexOf(":") + 1)); - } else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) { - env.setCustomTags(arg.substring(arg.indexOf(":") + 1)); - } else if (arg.startsWith(XHTML_VERSION_PREFIX)) { - String argsVersion = arg.substring(arg.indexOf(":") + 1); - HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion); - if (htmlVersion != null) { - env.setHtmlVersion(htmlVersion); - } else { - throw new IllegalArgumentException(argsVersion); - } - } else if (arg.startsWith(XCHECK_PACKAGE)) { - env.setCheckPackages(arg.substring(arg.indexOf(":") + 1)); - } else - throw new IllegalArgumentException(arg); - } - env.init(task); - - checker = new Checker(env); - - if (addTaskListener) { - final DeclScanner ds = new DeclScanner(env) { - @Override - void visitDecl(Tree tree, Name name) { - TreePath p = getCurrentPath(); - DocCommentTree dc = env.trees.getDocCommentTree(p); - - checker.scan(dc, p); - } - }; - - TaskListener tl = new TaskListener() { - @Override @DefinedBy(Api.COMPILER_TREE) - public void started(TaskEvent e) { - switch (e.getKind()) { - case ANALYZE: - CompilationUnitTree tree; - while ((tree = todo.poll()) != null) - ds.scan(tree, null); - break; - } - } + public abstract boolean isValidOption(String opt); - @Override @DefinedBy(Api.COMPILER_TREE) - public void finished(TaskEvent e) { - switch (e.getKind()) { - case PARSE: - todo.add(e.getCompilationUnit()); - break; - } - } + public static synchronized DocLint newDocLint() { + if (docLintProvider == null) { + docLintProvider = ServiceLoader.load(DocLint.class).stream() + .filter(p_ -> p_.get().getName().equals("doclint")) + .findFirst() + .orElse(new ServiceLoader.Provider<>() { + @Override + public Class<? extends DocLint> type() { + return NoDocLint.class; + } - Queue<CompilationUnitTree> todo = new LinkedList<>(); - }; - - task.addTaskListener(tl); + @Override + public DocLint get() { + return new NoDocLint(); + } + }); } + return docLintProvider.get(); } - public void scan(TreePath p) { - DocCommentTree dc = env.trees.getDocCommentTree(p); - checker.scan(dc, p); - } - - public boolean shouldCheck(CompilationUnitTree unit) { - return env.shouldCheck(unit); - } - - public void reportStats(PrintWriter out) { - env.messages.reportStats(out); - } - - // </editor-fold> - - Env env; - Checker checker; - - public static boolean isValidOption(String opt) { - if (opt.equals(XMSGS_OPTION)) - return true; - if (opt.startsWith(XMSGS_CUSTOM_PREFIX)) - return Messages.Options.isValidOptions(opt.substring(XMSGS_CUSTOM_PREFIX.length())); - if (opt.startsWith(XCHECK_PACKAGE)) { - return Env.validatePackages(opt.substring(opt.indexOf(":") + 1)); + private static class NoDocLint extends DocLint { + @Override + public String getName() { + return "doclint-not-available"; } - return false; - } - private String localize(String code, Object... args) { - Messages m = (env != null) ? env.messages : new Messages(null); - return m.localize(code, args); - } - - // <editor-fold defaultstate="collapsed" desc="DeclScanner"> - - static abstract class DeclScanner extends TreePathScanner<Void, Void> { - final Env env; - - public DeclScanner(Env env) { - this.env = env; - } - - abstract void visitDecl(Tree tree, Name name); - - @Override @DefinedBy(Api.COMPILER_TREE) - public Void visitPackage(PackageTree tree, Void ignore) { - visitDecl(tree, null); - return super.visitPackage(tree, ignore); + @Override + public void init(JavacTask task, String... args) { + // ignore } - @Override @DefinedBy(Api.COMPILER_TREE) - public Void visitClass(ClassTree tree, Void ignore) { - visitDecl(tree, tree.getSimpleName()); - return super.visitClass(tree, ignore); + @Override + public boolean isValidOption(String s) { + return false; } - - @Override @DefinedBy(Api.COMPILER_TREE) - public Void visitMethod(MethodTree tree, Void ignore) { - visitDecl(tree, tree.getName()); - return null; - } - - @Override @DefinedBy(Api.COMPILER_TREE) - public Void visitModule(ModuleTree tree, Void ignore) { - visitDecl(tree, null); - return super.visitModule(tree, ignore); - } - - @Override @DefinedBy(Api.COMPILER_TREE) - public Void visitVariable(VariableTree tree, Void ignore) { - visitDecl(tree, tree.getName()); - return super.visitVariable(tree, ignore); - } - - @Override @DefinedBy(Api.COMPILER_TREE) - public Void visitCompilationUnit(CompilationUnitTree node, Void p) { - if (!env.shouldCheck(node)) { - return null; - } - return super.visitCompilationUnit(node, p); - } - - @Override @DefinedBy(Api.COMPILER_TREE) - public Void visitBlock(BlockTree tree, Void ignore) { - return null; - } - - @Override @DefinedBy(Api.COMPILER_TREE) - public Void visitLambdaExpression(LambdaExpressionTree tree, Void ignore) { - return null; - } - } - - // </editor-fold> - } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java index 7a7f05f6cd3..0277d57b237 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java @@ -258,7 +258,7 @@ public void initDocLint(List<String> docLintOpts) { if (docLintOpts.isEmpty()) return; - new DocLint().init(this, docLintOpts.toArray(new String[docLintOpts.size()])); + DocLint.newDocLint().init(this, docLintOpts.toArray(new String[docLintOpts.size()])); JavaCompiler.instance(context).keepComments = true; } } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java index 10beb451d19..0af0ec0ede9 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java @@ -5514,8 +5514,8 @@ private void checkSerialVersionUID(JCClassDecl tree, ClassSymbol c) { } if (svuid == null) { - log.warning(LintCategory.SERIAL, - tree.pos(), Warnings.MissingSVUID(c)); + if (!c.isRecord()) + log.warning(LintCategory.SERIAL, tree.pos(), Warnings.MissingSVUID(c)); return; } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java index 7a23f1bdc68..835ddd58d86 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -557,37 +557,24 @@ Type instantiatePolymorphicSignatureInstance(Env<AttrContext> env, List<Type> argtypes) { final Type restype; - if (spMethod == null || types.isSameType(spMethod.getReturnType(), syms.objectType)) { - // The return type of the polymorphic signature is polymorphic, - // and is computed from the enclosing tree E, as follows: - // if E is a cast, then use the target type of the cast expression - // as a return type; if E is an expression statement, the return - // type is 'void'; otherwise - // the return type is simply 'Object'. A correctness check ensures - // that env.next refers to the lexically enclosing environment in - // which the polymorphic signature call environment is nested. - - switch (env.next.tree.getTag()) { - case TYPECAST: - JCTypeCast castTree = (JCTypeCast)env.next.tree; - restype = (TreeInfo.skipParens(castTree.expr) == env.tree) ? - castTree.clazz.type : - syms.objectType; - break; - case EXEC: - JCTree.JCExpressionStatement execTree = - (JCTree.JCExpressionStatement)env.next.tree; - restype = (TreeInfo.skipParens(execTree.expr) == env.tree) ? - syms.voidType : - syms.objectType; - break; - default: - restype = syms.objectType; - } - } else { - // The return type of the polymorphic signature is fixed - // (not polymorphic) - restype = spMethod.getReturnType(); + Type spType = spMethod == null ? syms.objectType : spMethod.getReturnType(); + + switch (env.next.tree.getTag()) { + case TYPECAST: + JCTypeCast castTree = (JCTypeCast)env.next.tree; + restype = (TreeInfo.skipParens(castTree.expr) == env.tree) ? + castTree.clazz.type : + spType; + break; + case EXEC: + JCTree.JCExpressionStatement execTree = + (JCTree.JCExpressionStatement)env.next.tree; + restype = (TreeInfo.skipParens(execTree.expr) == env.tree) ? + syms.voidType : + spType; + break; + default: + restype = spType; } List<Type> paramtypes = argtypes.map(new ImplicitArgType(spMethod, resolveContext.step)); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java index 38bc886038c..c578224539e 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java @@ -2798,11 +2798,23 @@ Symbol findPolymorphicSignatureInstance(final Symbol spMethod, // Check that there is already a method symbol for the method // type and owner if (types.isSameType(mtype, sym.type) && - spMethod.owner == sym.owner) { + spMethod.owner == sym.owner) { return sym; } } + Type spReturnType = spMethod.asType().getReturnType(); + if (types.isSameType(spReturnType, syms.objectType)) { + // Polymorphic return, pass through mtype + } else if (!types.isSameType(spReturnType, mtype.getReturnType())) { + // Retain the sig poly method's return type, which differs from that of mtype + // Will result in an incompatible return type error + mtype = new MethodType(mtype.getParameterTypes(), + spReturnType, + mtype.getThrownTypes(), + syms.methodClass); + } + // Create the desired method // Retain static modifier is to support invocations to // MethodHandle.linkTo* methods diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java index a5422c05139..a12db6ce668 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java @@ -132,7 +132,7 @@ protected void help(Log log) { XDOCLINT_CUSTOM("-Xdoclint:", "opt.Xdoclint.subopts", "opt.Xdoclint.custom", EXTENDED, BASIC) { @Override public boolean matches(String option) { - return DocLint.isValidOption( + return DocLint.newDocLint().isValidOption( option.replace(XDOCLINT_CUSTOM.primaryName, DocLint.XMSGS_CUSTOM_PREFIX)); } @@ -147,7 +147,7 @@ public void process(OptionHelper helper, String option, String arg) { XDOCLINT_PACKAGE("-Xdoclint/package:", "opt.Xdoclint.package.args", "opt.Xdoclint.package.desc", EXTENDED, BASIC) { @Override public boolean matches(String option) { - return DocLint.isValidOption( + return DocLint.newDocLint().isValidOption( option.replace(XDOCLINT_PACKAGE.primaryName, DocLint.XCHECK_PACKAGE)); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java index 8c1c1533246..f1e2507690c 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java @@ -598,7 +598,7 @@ public Name ident() { return ident(false); } - protected Name ident(boolean advanceOnErrors) { + protected Name ident(boolean allowClass) { if (token.kind == IDENTIFIER) { Name name = token.name(); nextToken(); @@ -634,8 +634,9 @@ protected Name ident(boolean advanceOnErrors) { return name; } else { accept(IDENTIFIER); - if (advanceOnErrors) { + if (allowClass && token.kind == CLASS) { nextToken(); + return names._class; } return names.error; } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java index b786f4cfd51..5b382114e48 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java @@ -32,6 +32,7 @@ import java.util.EnumSet; import java.util.List; import java.util.ListIterator; +import java.util.Set; import javax.lang.model.element.Name; import javax.tools.Diagnostic; @@ -46,7 +47,6 @@ import com.sun.source.doctree.StartElementTree; import com.sun.source.doctree.TextTree; import com.sun.source.util.DocTreeFactory; -import com.sun.tools.doclint.HtmlTag; import com.sun.tools.javac.api.JavacTrees; import com.sun.tools.javac.parser.ParserFactory; import com.sun.tools.javac.parser.ReferenceParser; @@ -95,8 +95,8 @@ import com.sun.tools.javac.util.ListBuffer; import com.sun.tools.javac.util.Pair; import com.sun.tools.javac.util.Position; +import com.sun.tools.javac.util.StringUtils; -import static com.sun.tools.doclint.HtmlTag.*; /** * @@ -112,7 +112,7 @@ public class DocTreeMaker implements DocTreeFactory { // A subset of block tags, which acts as sentence breakers, appearing // anywhere but the zero'th position in the first sentence. - final EnumSet<HtmlTag> sentenceBreakTags; + final Set<String> sentenceBreakTags; /** Get the TreeMaker instance. */ public static DocTreeMaker instance(Context context) { @@ -142,7 +142,7 @@ protected DocTreeMaker(Context context) { this.pos = Position.NOPOS; trees = JavacTrees.instance(context); referenceParser = new ReferenceParser(ParserFactory.instance(context)); - sentenceBreakTags = EnumSet.of(H1, H2, H3, H4, H5, H6, PRE, P); + sentenceBreakTags = Set.of("H1", "H2", "H3", "H4", "H5", "H6", "PRE", "P"); } /** Reassign current position. @@ -690,7 +690,7 @@ private int getSentenceBreak(String s, DocTree dt) { } private boolean isSentenceBreak(Name tagName) { - return sentenceBreakTags.contains(get(tagName)); + return sentenceBreakTags.contains(StringUtils.toUpperCase(tagName.toString())); } private boolean isSentenceBreak(DocTree dt, boolean isFirstDocTree) { diff --git a/src/jdk.compiler/share/classes/jdk/internal/shellsupport/doc/JavadocFormatter.java b/src/jdk.compiler/share/classes/jdk/internal/shellsupport/doc/JavadocFormatter.java index fb031ae3f77..184f451dac2 100644 --- a/src/jdk.compiler/share/classes/jdk/internal/shellsupport/doc/JavadocFormatter.java +++ b/src/jdk.compiler/share/classes/jdk/internal/shellsupport/doc/JavadocFormatter.java @@ -30,6 +30,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; +import java.util.HashMap; import java.util.IdentityHashMap; import java.util.LinkedHashMap; import java.util.List; @@ -58,7 +59,6 @@ import com.sun.source.util.DocTreeScanner; import com.sun.source.util.DocTrees; import com.sun.source.util.JavacTask; -import com.sun.tools.doclint.HtmlTag; import com.sun.tools.javac.util.DefinedBy; import com.sun.tools.javac.util.DefinedBy.Api; import com.sun.tools.javac.util.StringUtils; @@ -124,6 +124,27 @@ public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOExcept } } + enum HtmlTag { + HTML, + H1, H2, H3, H4, H5, H6, + BLOCKQUOTE, P, PRE, + IMG, + OL, UL, LI, + DL, DT, DD, + TABLE, TR, TD, TH; + + private static final Map<String, HtmlTag> index = new HashMap<>(); + static { + for (HtmlTag t: values()) { + index.put(StringUtils.toLowerCase(t.name()), t); + } + } + + public static HtmlTag get(Name tagName) { + return index.get(StringUtils.toLowerCase(tagName.toString())); + } + } + private class FormatJavadocScanner extends DocTreeScanner<Object, Object> { private final StringBuilder result; private final JavacTask task; diff --git a/src/jdk.compiler/share/classes/module-info.java b/src/jdk.compiler/share/classes/module-info.java index 6026cddefbb..88066d3c363 100644 --- a/src/jdk.compiler/share/classes/module-info.java +++ b/src/jdk.compiler/share/classes/module-info.java @@ -117,6 +117,7 @@ uses javax.annotation.processing.Processor; uses com.sun.source.util.Plugin; + uses com.sun.tools.doclint.DocLint; uses com.sun.tools.javac.platform.PlatformProvider; provides java.util.spi.ToolProvider with diff --git a/src/jdk.crypto.ec/share/classes/sun/security/ec/ECDHKeyAgreement.java b/src/jdk.crypto.ec/share/classes/sun/security/ec/ECDHKeyAgreement.java index cccd4a68812..6c79228ef22 100644 --- a/src/jdk.crypto.ec/share/classes/sun/security/ec/ECDHKeyAgreement.java +++ b/src/jdk.crypto.ec/share/classes/sun/security/ec/ECDHKeyAgreement.java @@ -169,22 +169,13 @@ protected byte[] engineGenerateSecret() throws IllegalStateException { } byte[] result; Optional<byte[]> resultOpt = deriveKeyImpl(privateKey, publicKey); - if (resultOpt.isPresent()) { - result = resultOpt.get(); - } else { - if (SunEC.isNativeDisabled()) { - NamedCurve privNC = CurveDB.lookup(privateKey.getParams()); - NamedCurve pubNC = CurveDB.lookup(publicKey.getParams()); - throw new IllegalStateException( - new InvalidAlgorithmParameterException("Legacy SunEC " + - "curve disabled, one or both keys: " + - "Private: " + ((privNC != null) ? - privNC.toString() : " unknown") + - ", PublicKey:" + ((pubNC != null) ? - pubNC.toString() : " unknown"))); - } - result = deriveKeyNative(privateKey, publicKey); + if (resultOpt.isEmpty()) { + NamedCurve nc = CurveDB.lookup(publicKey.getParams()); + throw new IllegalStateException( + new InvalidAlgorithmParameterException("Curve not supported: " + + (nc != null ? nc.toString() : "unknown"))); } + result = resultOpt.get(); publicKey = null; return result; } @@ -263,42 +254,4 @@ Optional<byte[]> deriveKeyImpl(ECPrivateKey priv, ECPublicKey pubKey) { return Optional.of(result); } - - private static - byte[] deriveKeyNative(ECPrivateKey privateKey, ECPublicKey publicKey) { - - ECParameterSpec params = privateKey.getParams(); - byte[] s = privateKey.getS().toByteArray(); - byte[] encodedParams = // DER OID - ECUtil.encodeECParameterSpec(null, params); - - byte[] publicValue; - if (publicKey instanceof ECPublicKeyImpl) { - ECPublicKeyImpl ecPub = (ECPublicKeyImpl) publicKey; - publicValue = ecPub.getEncodedPublicValue(); - } else { // instanceof ECPublicKey - publicValue = - ECUtil.encodePoint(publicKey.getW(), params.getCurve()); - } - - try { - return deriveKey(s, publicValue, encodedParams); - - } catch (GeneralSecurityException e) { - throw new ProviderException("Could not derive key", e); - } - } - - - /** - * Generates a secret key using the public and private keys. - * - * @param s the private key's S value. - * @param w the public key's W point (in uncompressed form). - * @param encodedParams the curve's DER encoded object identifier. - * - * @return byte[] the secret key. - */ - private static native byte[] deriveKey(byte[] s, byte[] w, - byte[] encodedParams) throws GeneralSecurityException; } diff --git a/src/jdk.crypto.ec/share/classes/sun/security/ec/ECDSASignature.java b/src/jdk.crypto.ec/share/classes/sun/security/ec/ECDSASignature.java index 41c18e91f7b..4bf63d77e74 100644 --- a/src/jdk.crypto.ec/share/classes/sun/security/ec/ECDSASignature.java +++ b/src/jdk.crypto.ec/share/classes/sun/security/ec/ECDSASignature.java @@ -466,53 +466,6 @@ private byte[] signDigestImpl(ECDSAOperations ops, int seedBits, } - private Optional<byte[]> signDigestAvailable(ECPrivateKey privateKey, - byte[] digest, SecureRandom random) throws SignatureException { - - ECParameterSpec params = privateKey.getParams(); - - // seed is the key size + 64 bits - int seedBits = params.getOrder().bitLength() + 64; - Optional<ECDSAOperations> opsOpt = - ECDSAOperations.forParameters(params); - if (opsOpt.isEmpty()) { - return Optional.empty(); - } else { - byte[] sig = signDigestImpl(opsOpt.get(), seedBits, digest, - privateKey, random); - return Optional.of(sig); - } - } - - private byte[] signDigestNative(ECPrivateKey privateKey, byte[] digest, - SecureRandom random) throws SignatureException { - - byte[] s = privateKey.getS().toByteArray(); - ECParameterSpec params = privateKey.getParams(); - - // DER OID - byte[] encodedParams = ECUtil.encodeECParameterSpec(null, params); - int orderLength = params.getOrder().bitLength(); - - // seed is twice the order length (in bytes) plus 1 - byte[] seed = new byte[(((orderLength + 7) >> 3) + 1) * 2]; - - random.nextBytes(seed); - - // random bits needed for timing countermeasures - int timingArgument = random.nextInt(); - // values must be non-zero to enable countermeasures - timingArgument |= 1; - - try { - return signDigest(digest, s, encodedParams, seed, - timingArgument); - } catch (GeneralSecurityException e) { - throw new SignatureException("Could not sign data", e); - } - - } - // sign the data and return the signature. See JCA doc @Override protected byte[] engineSign() throws SignatureException { @@ -522,21 +475,18 @@ protected byte[] engineSign() throws SignatureException { } byte[] digest = getDigestValue(); - Optional<byte[]> sigOpt = signDigestAvailable(privateKey, digest, random); - byte[] sig; - if (sigOpt.isPresent()) { - sig = sigOpt.get(); - } else { - if (SunEC.isNativeDisabled()) { - NamedCurve nc = CurveDB.lookup(privateKey.getParams()); - throw new SignatureException( - new InvalidAlgorithmParameterException( - "Legacy SunEC curve disabled: " + - (nc != null ? nc.toString() - : "unknown"))); - } - sig = signDigestNative(privateKey, digest, random); + ECParameterSpec params = privateKey.getParams(); + + // seed is the key size + 64 bits + int seedBits = params.getOrder().bitLength() + 64; + Optional<ECDSAOperations> opsOpt = + ECDSAOperations.forParameters(params); + if (opsOpt.isEmpty()) { + throw new SignatureException("Curve not supported: " + + params.toString()); } + byte[] sig = signDigestImpl(opsOpt.get(), seedBits, digest, privateKey, + random); if (p1363Format) { return sig; @@ -557,59 +507,14 @@ protected boolean engineVerify(byte[] signature) throws SignatureException { } byte[] digest = getDigestValue(); - Optional<Boolean> verifyOpt - = verifySignedDigestAvailable(publicKey, sig, digest); - - if (verifyOpt.isPresent()) { - return verifyOpt.get(); - } else { - if (SunEC.isNativeDisabled()) { - NamedCurve nc = CurveDB.lookup(publicKey.getParams()); - throw new SignatureException( - new InvalidAlgorithmParameterException( - "Legacy SunEC curve disabled: " + - (nc != null ? nc.toString() - : "unknown"))); - } - - byte[] w; - ECParameterSpec params = publicKey.getParams(); - // DER OID - byte[] encodedParams = ECUtil.encodeECParameterSpec(null, params); - - if (publicKey instanceof ECPublicKeyImpl) { - w = ((ECPublicKeyImpl) publicKey).getEncodedPublicValue(); - } else { // instanceof ECPublicKey - w = ECUtil.encodePoint(publicKey.getW(), params.getCurve()); - } - - try { - return verifySignedDigest(sig, digest, w, encodedParams); - } catch (GeneralSecurityException e) { - throw new SignatureException("Could not verify signature", e); - } - } - } - - private Optional<Boolean> verifySignedDigestAvailable( - ECPublicKey publicKey, byte[] sig, byte[] digestValue) { - - ECParameterSpec params = publicKey.getParams(); Optional<ECDSAOperations> opsOpt = - ECDSAOperations.forParameters(params); + ECDSAOperations.forParameters(publicKey.getParams()); if (opsOpt.isEmpty()) { - return Optional.empty(); - } else { - boolean result = verifySignedDigestImpl(opsOpt.get(), digestValue, - publicKey, sig); - return Optional.of(result); + throw new SignatureException("Curve not supported: " + + publicKey.getParams().toString()); } - } - - private boolean verifySignedDigestImpl(ECDSAOperations ops, - byte[] digest, ECPublicKey pub, byte[] sig) { - return ops.verifySignedDigest(digest, sig, pub.getW()); + return opsOpt.get().verifySignedDigest(digest, sig, publicKey.getW()); } // set parameter, not supported. See JCA doc @@ -657,40 +562,4 @@ protected AlgorithmParameters engineGetParameters() { throw new ProviderException("Error retrieving EC parameters", e); } } - - /** - * Signs the digest using the private key. - * - * @param digest the digest to be signed. - * @param s the private key's S value. - * @param encodedParams the curve's DER encoded object identifier. - * @param seed the random seed. - * @param timing When non-zero, the implmentation will use timing - * countermeasures to hide secrets from timing channels. The EC - * implementation will disable the countermeasures when this value is - * zero, because the underlying EC functions are shared by several - * crypto operations, some of which do not use the countermeasures. - * The high-order 31 bits must be uniformly random. The entropy from - * these bits is used by the countermeasures. - * - * @return byte[] the signature. - */ - private static native byte[] signDigest(byte[] digest, byte[] s, - byte[] encodedParams, byte[] seed, int timing) - throws GeneralSecurityException; - - /** - * Verifies the signed digest using the public key. - * - * @param signature the signature to be verified. It is encoded - * as a concatenation of the key's R and S values. - * @param digest the digest to be used. - * @param w the public key's W point (in uncompressed form). - * @param encodedParams the curve's DER encoded object identifier. - * - * @return boolean true if the signature is successfully verified. - */ - private static native boolean verifySignedDigest(byte[] signature, - byte[] digest, byte[] w, byte[] encodedParams) - throws GeneralSecurityException; } diff --git a/src/jdk.crypto.ec/share/classes/sun/security/ec/ECKeyPairGenerator.java b/src/jdk.crypto.ec/share/classes/sun/security/ec/ECKeyPairGenerator.java index 804313a8cae..1898c882cc8 100644 --- a/src/jdk.crypto.ec/share/classes/sun/security/ec/ECKeyPairGenerator.java +++ b/src/jdk.crypto.ec/share/classes/sun/security/ec/ECKeyPairGenerator.java @@ -95,7 +95,7 @@ public void initialize(AlgorithmParameterSpec params, SecureRandom random) ecSpec = ECUtil.getECParameterSpec(null, ecParams); if (ecSpec == null) { throw new InvalidAlgorithmParameterException( - "Unsupported curve: " + params); + "Curve not supported: " + params); } } else if (params instanceof ECGenParameterSpec) { String name = ((ECGenParameterSpec) params).getName(); @@ -126,29 +126,13 @@ private static void ensureCurveIsSupported(ECParameterSpec ecSpec) ecParams.init(ecSpec); } catch (InvalidParameterSpecException ex) { throw new InvalidAlgorithmParameterException( - "Unsupported curve: " + ecSpec.toString()); + "Curve not supported: " + ecSpec.toString()); } // Check if the java implementation supports this curve - if (ECOperations.forParameters(ecSpec).isPresent()) { - return; - } - - // Check if the native library supported this curve, if available - if (SunEC.isNativeDisabled()) { - throw new InvalidAlgorithmParameterException( - "Unsupported curve: " + ecSpec.toString()); - } - - byte[] encodedParams; - try { - encodedParams = ecParams.getEncoded(); - } catch (IOException ex) { - throw new RuntimeException(ex); - } - if (!isCurveSupported(encodedParams)) { + if (ECOperations.forParameters(ecSpec).isEmpty()) { throw new InvalidAlgorithmParameterException( - "Unsupported curve: " + ecParams.toString()); + "Curve not supported: " + ecSpec.toString()); } } @@ -168,15 +152,8 @@ public KeyPair generateKeyPair() { } catch (Exception ex) { throw new ProviderException(ex); } - if (SunEC.isNativeDisabled()) { - throw new ProviderException("Legacy SunEC curve disabled: " + - params.toString()); - } - try { - return generateKeyPairNative(random); - } catch (Exception ex) { - throw new ProviderException(ex); - } + throw new ProviderException("Curve not supported: " + + params.toString()); } private byte[] generatePrivateScalar(SecureRandom random, @@ -231,32 +208,6 @@ private Optional<KeyPair> generateKeyPairImpl(SecureRandom random) return Optional.of(new KeyPair(publicKey, privateKey)); } - private KeyPair generateKeyPairNative(SecureRandom random) - throws Exception { - - ECParameterSpec ecParams = (ECParameterSpec) params; - byte[] encodedParams = ECUtil.encodeECParameterSpec(null, ecParams); - - // seed is twice the key size (in bytes) plus 1 - byte[] seed = new byte[(((keySize + 7) >> 3) + 1) * 2]; - random.nextBytes(seed); - Object[] keyBytes = generateECKeyPair(keySize, encodedParams, seed); - - // The 'params' object supplied above is equivalent to the native - // one so there is no need to fetch it. - // keyBytes[0] is the encoding of the native private key - BigInteger s = new BigInteger(1, (byte[]) keyBytes[0]); - - PrivateKey privateKey = new ECPrivateKeyImpl(s, ecParams); - - // keyBytes[1] is the encoding of the native public key - byte[] pubKey = (byte[]) keyBytes[1]; - ECPoint w = ECUtil.decodePoint(pubKey, ecParams.getCurve()); - PublicKey publicKey = new ECPublicKeyImpl(w, ecParams); - - return new KeyPair(publicKey, privateKey); - } - private void checkKeySize(int keySize) throws InvalidParameterException { if (keySize < KEY_SIZE_MIN) { throw new InvalidParameterException @@ -268,24 +219,4 @@ private void checkKeySize(int keySize) throws InvalidParameterException { } this.keySize = keySize; } - - /** - * Checks whether the curve in the encoded parameters is supported by the - * native implementation. Some curve operations will be performed by the - * Java implementation, but not all of them. So native support is still - * required for all curves. - * - * @param encodedParams encoded parameters in the same form accepted - * by generateECKeyPair - * @return true if and only if generateECKeyPair will succeed for - * the supplied parameters - */ - private static native boolean isCurveSupported(byte[] encodedParams); - - /* - * Generates the keypair and returns a 2-element array of encoding bytes. - * The first one is for the private key, the second for the public key. - */ - private static native Object[] generateECKeyPair(int keySize, - byte[] encodedParams, byte[] seed) throws GeneralSecurityException; } diff --git a/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java b/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java index e5c7d404c53..eb3b78867d9 100644 --- a/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java +++ b/src/jdk.crypto.ec/share/classes/sun/security/ec/SunEC.java @@ -31,9 +31,11 @@ import java.security.PrivilegedAction; import java.security.Provider; import java.security.ProviderException; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; +import java.util.Iterator; import java.util.List; import sun.security.ec.ed.EdDSAAlgorithmParameters; @@ -41,6 +43,7 @@ import sun.security.ec.ed.EdDSAKeyPairGenerator; import sun.security.ec.ed.EdDSASignature; import sun.security.util.CurveDB; +import sun.security.util.KnownOIDs; import sun.security.util.NamedCurve; import static sun.security.util.SecurityConstants.PROVIDER_VER; @@ -48,54 +51,11 @@ /** * Provider class for the Elliptic Curve provider. - * Supports EC keypair and parameter generation, ECDSA signing and - * ECDH key agreement. - * - * IMPLEMENTATION NOTE: - * The Java classes in this provider access a native ECC implementation - * via JNI to a C++ wrapper class which in turn calls C functions. - * The Java classes are packaged into the jdk.crypto.sunec module and the - * C++ and C functions are packaged into libsunec.so or sunec.dll in the - * JRE native libraries directory. If the native library is not present - * then this provider is registered with support for fewer ECC algorithms - * (KeyPairGenerator, Signature and KeyAgreement are omitted). - * - * @since 1.7 */ public final class SunEC extends Provider { private static final long serialVersionUID = -2279741672933606418L; - // This flag is true if the native library is disabled or not loaded. - private static boolean disableNative = true; - - static { - String s = sun.security.action.GetPropertyAction.privilegedGetProperty( - "jdk.sunec.disableNative"); - if (s != null && s.equalsIgnoreCase("false")) { - disableNative = false; - } - - // If native is enabled, verify the library is available. - if (!disableNative) { - try { - AccessController.doPrivileged(new PrivilegedAction<Void>() { - public Void run() { - System.loadLibrary("sunec"); // check for native library - return null; - } - }); - } catch (UnsatisfiedLinkError e) { - disableNative = true; - } - } - } - - // Check if native library support is disabled. - static boolean isNativeDisabled() { - return SunEC.disableNative; - } - private static class ProviderServiceA extends ProviderService { ProviderServiceA(Provider p, String type, String algo, String cn, HashMap<String, String> attrs) { @@ -258,17 +218,11 @@ void putEntries() { boolean firstCurve = true; StringBuilder names = new StringBuilder(); - Collection<? extends NamedCurve> supportedCurves; - if (SunEC.isNativeDisabled()) { - supportedCurves = Collections.unmodifiableList(List.of( - CurveDB.lookup("secp256r1"), - CurveDB.lookup("secp384r1"), - CurveDB.lookup("secp521r1"))); - } else { - supportedCurves = CurveDB.getSupportedCurves(); - } - - for (NamedCurve namedCurve : supportedCurves) { + for (NamedCurve namedCurve : + List.of( + CurveDB.lookup("secp256r1"), + CurveDB.lookup("secp384r1"), + CurveDB.lookup("secp521r1"))) { if (!firstCurve) { names.append("|"); } else { @@ -380,7 +334,6 @@ private void putXDHEntries() { HashMap<String, String> ATTRS = new HashMap<>(1); ATTRS.put("ImplementedIn", "Software"); - /* XDH does not require native implementation */ putService(new ProviderService(this, "KeyFactory", "XDH", "sun.security.ec.XDHKeyFactory", null, ATTRS)); putService(new ProviderServiceA(this, "KeyFactory", @@ -414,7 +367,6 @@ private void putEdDSAEntries() { HashMap<String, String> ATTRS = new HashMap<>(1); ATTRS.put("ImplementedIn", "Software"); - /* EdDSA does not require native implementation */ putService(new ProviderService(this, "KeyFactory", "EdDSA", "sun.security.ec.ed.EdDSAKeyFactory", null, ATTRS)); putService(new ProviderServiceA(this, "KeyFactory", diff --git a/src/jdk.crypto.ec/share/legal/ecc.md b/src/jdk.crypto.ec/share/legal/ecc.md deleted file mode 100644 index 9484110555b..00000000000 --- a/src/jdk.crypto.ec/share/legal/ecc.md +++ /dev/null @@ -1,599 +0,0 @@ -## Mozilla Elliptic Curve Cryptography (ECC) - -### Mozilla ECC Notice - -You are receiving a -[copy](http://hg.openjdk.java.net/jdk/jdk/file/tip/src/jdk.crypto.ec/share/native/libsunec/impl) -of the Elliptic Curve Cryptography library in source form or object code. - -``` -The terms of the Oracle license do NOT apply to the Elliptic Curve Cryptography -library; it is licensed under the following license, separately from the Oracle -programs you received. If you do not wish to install the Elliptic Curve -Cryptography library, you may delete the Elliptic Curve Cryptography library by -removing: - - Linux: $(JAVA_HOME)/lib/libsunec.so - macOS: $(JAVA_HOME)/lib/libsunec.dylib - Windows: $(JAVA_HOME)\bin\sunec.dll - -``` - -#### Mozilla ECC Library Removal Impact -``` -The Java Cryptographic Service SunEC Provider uses the Mozilla ECC library. If -this native library is removed, the following algorithms will no longer be -available from the SunEC provider using the JCA/JCE APIs: - - KeyPairGenerator: EC - KeyAgreement: ECDH - Signature: names that include *withECDSA* - -``` - -#### Written Offer for Source Code - -``` -For third party technology that you receive from Oracle in binary form which -is licensed under an open source license that gives you the right to receive -the source code for that binary, you can also receive a copy of the source -code on physical media by submitting a written request to: - - Oracle America, Inc. - Attn: Associate General Counsel, - Development and Engineering Legal - 500 Oracle Parkway, 10th Floor - Redwood Shores, CA 94065 - -Your request should include: -``` - -* The name of the component or binary file(s) for which you are requesting - the source code -* The name and version number of the Oracle product containing the binary -* The date you received the Oracle product -* Your name -* Your company name (if applicable) -* Your return mailing address and email and -* A telephone number in the event we need to reach you. - -``` -We may charge you a fee to cover the cost of physical media and processing. -Your request must be sent (i) within three (3) years of the date you received -the Oracle product that included the component or binary file(s) that are the -subject of your request, or (ii) in the case of code licensed under the GPL -v3, for as long as Oracle offers spare parts or customer support for that -product model. - -``` - -### Mozilla ECC License -``` -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the -License. - -The Original Code is the Elliptic Curve Cryptography library. - -The Initial Developer of the Original Code is -Sun Microsystems, Inc. -Portions created by the Initial Developer are Copyright (C) 2003 -the Initial Developer. All Rights Reserved. - -Contributor(s): -Dr Vipul Gupta and -Douglas Stebila, Sun Microsystems Laboratories - -The Elliptic Curve Cryptography Library is subject to GNU Lesser Public License -Version 2.1. -``` - -#### LGPL 2.1 -``` - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - <one line to give the library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - -``` - diff --git a/src/jdk.crypto.ec/share/native/libsunec/ECC_JNI.cpp b/src/jdk.crypto.ec/share/native/libsunec/ECC_JNI.cpp deleted file mode 100644 index eeae66e7cde..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/ECC_JNI.cpp +++ /dev/null @@ -1,527 +0,0 @@ -/* - * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -#include <jni.h> -#include "jni_util.h" -#include "impl/ecc_impl.h" -#include "sun_security_ec_ECDHKeyAgreement.h" -#include "sun_security_ec_ECKeyPairGenerator.h" -#include "sun_security_ec_ECDSASignature.h" - -#define ILLEGAL_STATE_EXCEPTION "java/lang/IllegalStateException" -#define INVALID_ALGORITHM_PARAMETER_EXCEPTION \ - "java/security/InvalidAlgorithmParameterException" -#define INVALID_PARAMETER_EXCEPTION \ - "java/security/InvalidParameterException" -#define KEY_EXCEPTION "java/security/KeyException" - -extern "C" { - -/* - * Declare library specific JNI_Onload entry if static build - */ -DEF_STATIC_JNI_OnLoad - -/* - * Throws an arbitrary Java exception. - */ -void ThrowException(JNIEnv *env, const char *exceptionName) -{ - jclass exceptionClazz = env->FindClass(exceptionName); - if (exceptionClazz != NULL) { - env->ThrowNew(exceptionClazz, NULL); - } -} - -/* - * Deep free of the ECParams struct - */ -void FreeECParams(ECParams *ecparams, jboolean freeStruct) -{ - // Use B_FALSE to free the SECItem->data element, but not the SECItem itself - // Use B_TRUE to free both - - SECITEM_FreeItem(&ecparams->fieldID.u.prime, B_FALSE); - SECITEM_FreeItem(&ecparams->curve.a, B_FALSE); - SECITEM_FreeItem(&ecparams->curve.b, B_FALSE); - SECITEM_FreeItem(&ecparams->curve.seed, B_FALSE); - SECITEM_FreeItem(&ecparams->base, B_FALSE); - SECITEM_FreeItem(&ecparams->order, B_FALSE); - SECITEM_FreeItem(&ecparams->DEREncoding, B_FALSE); - SECITEM_FreeItem(&ecparams->curveOID, B_FALSE); - if (freeStruct) - free(ecparams); -} - -jbyteArray getEncodedBytes(JNIEnv *env, SECItem *hSECItem) -{ - SECItem *s = (SECItem *)hSECItem; - - jbyteArray jEncodedBytes = env->NewByteArray(s->len); - if (jEncodedBytes == NULL) { - return NULL; - } - // Copy bytes from a native SECItem buffer to Java byte array - env->SetByteArrayRegion(jEncodedBytes, 0, s->len, (jbyte *)s->data); - if (env->ExceptionCheck()) { // should never happen - return NULL; - } - return jEncodedBytes; -} - -/* - * Class: sun_security_ec_ECKeyPairGenerator - * Method: isCurveSupported - * Signature: ([B)Z - */ -JNIEXPORT jboolean -JNICALL Java_sun_security_ec_ECKeyPairGenerator_isCurveSupported - (JNIEnv *env, jclass clazz, jbyteArray encodedParams) -{ - SECKEYECParams params_item; - ECParams *ecparams = NULL; - jboolean result = JNI_FALSE; - - // The curve is supported if we can get parameters for it - params_item.len = env->GetArrayLength(encodedParams); - params_item.data = - (unsigned char *) env->GetByteArrayElements(encodedParams, 0); - if (params_item.data == NULL) { - goto cleanup; - } - - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ - goto cleanup; - } - - // If we make it to here, then the curve is supported - result = JNI_TRUE; - -cleanup: - { - if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); - } - if (ecparams) { - FreeECParams(ecparams, true); - } - } - - return result; -} - -/* - * Class: sun_security_ec_ECKeyPairGenerator - * Method: generateECKeyPair - * Signature: (I[B[B)[[B - */ -JNIEXPORT jobjectArray -JNICALL Java_sun_security_ec_ECKeyPairGenerator_generateECKeyPair - (JNIEnv *env, jclass clazz, jint keySize, jbyteArray encodedParams, jbyteArray seed) -{ - ECPrivateKey *privKey = NULL; // contains both public and private values - ECParams *ecparams = NULL; - SECKEYECParams params_item; - jint jSeedLength; - jbyte* pSeedBuffer = NULL; - jobjectArray result = NULL; - jclass baCls = NULL; - jbyteArray jba; - - // Initialize the ECParams struct - params_item.len = env->GetArrayLength(encodedParams); - params_item.data = - (unsigned char *) env->GetByteArrayElements(encodedParams, 0); - if (params_item.data == NULL) { - goto cleanup; - } - - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ - ThrowException(env, INVALID_ALGORITHM_PARAMETER_EXCEPTION); - goto cleanup; - } - - // Copy seed from Java to native buffer - jSeedLength = env->GetArrayLength(seed); - pSeedBuffer = new jbyte[jSeedLength]; - env->GetByteArrayRegion(seed, 0, jSeedLength, pSeedBuffer); - - // Generate the new keypair (using the supplied seed) - if (EC_NewKey(ecparams, &privKey, (unsigned char *) pSeedBuffer, - jSeedLength, 0) != SECSuccess) { - ThrowException(env, KEY_EXCEPTION); - goto cleanup; - } - - jboolean isCopy; - baCls = env->FindClass("[B"); - if (baCls == NULL) { - goto cleanup; - } - result = env->NewObjectArray(2, baCls, NULL); - if (result == NULL) { - goto cleanup; - } - jba = getEncodedBytes(env, &(privKey->privateValue)); - if (jba == NULL) { - result = NULL; - goto cleanup; - } - env->SetObjectArrayElement(result, 0, jba); // big integer - if (env->ExceptionCheck()) { // should never happen - result = NULL; - goto cleanup; - } - - jba = getEncodedBytes(env, &(privKey->publicValue)); - if (jba == NULL) { - result = NULL; - goto cleanup; - } - env->SetObjectArrayElement(result, 1, jba); // encoded ec point - if (env->ExceptionCheck()) { // should never happen - result = NULL; - goto cleanup; - } - -cleanup: - { - if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); - } - if (ecparams) { - FreeECParams(ecparams, true); - } - if (privKey) { - FreeECParams(&privKey->ecParams, false); - SECITEM_FreeItem(&privKey->version, B_FALSE); - SECITEM_FreeItem(&privKey->privateValue, B_FALSE); - SECITEM_FreeItem(&privKey->publicValue, B_FALSE); - free(privKey); - } - - if (pSeedBuffer) { - delete [] pSeedBuffer; - } - } - - return result; -} - -/* - * Class: sun_security_ec_ECDSASignature - * Method: signDigest - * Signature: ([B[B[B[B)[B - */ -JNIEXPORT jbyteArray -JNICALL Java_sun_security_ec_ECDSASignature_signDigest - (JNIEnv *env, jclass clazz, jbyteArray digest, jbyteArray privateKey, jbyteArray encodedParams, jbyteArray seed, jint timing) -{ - jbyte* pDigestBuffer = NULL; - jint jDigestLength = env->GetArrayLength(digest); - jbyteArray jSignedDigest = NULL; - - SECItem signature_item; - jbyte* pSignedDigestBuffer = NULL; - jbyteArray temp; - - jint jSeedLength = env->GetArrayLength(seed); - jbyte* pSeedBuffer = NULL; - - // Copy digest from Java to native buffer - pDigestBuffer = new jbyte[jDigestLength]; - env->GetByteArrayRegion(digest, 0, jDigestLength, pDigestBuffer); - SECItem digest_item; - digest_item.data = (unsigned char *) pDigestBuffer; - digest_item.len = jDigestLength; - - ECPrivateKey privKey; - privKey.privateValue.data = NULL; - - // Initialize the ECParams struct - ECParams *ecparams = NULL; - SECKEYECParams params_item; - params_item.len = env->GetArrayLength(encodedParams); - params_item.data = - (unsigned char *) env->GetByteArrayElements(encodedParams, 0); - if (params_item.data == NULL) { - goto cleanup; - } - - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ - ThrowException(env, INVALID_ALGORITHM_PARAMETER_EXCEPTION); - goto cleanup; - } - - // Extract private key data - privKey.ecParams = *ecparams; // struct assignment - privKey.privateValue.len = env->GetArrayLength(privateKey); - privKey.privateValue.data = - (unsigned char *) env->GetByteArrayElements(privateKey, 0); - if (privKey.privateValue.data == NULL) { - goto cleanup; - } - - // Prepare a buffer for the signature (twice the key length) - pSignedDigestBuffer = new jbyte[ecparams->order.len * 2]; - signature_item.data = (unsigned char *) pSignedDigestBuffer; - signature_item.len = ecparams->order.len * 2; - - // Copy seed from Java to native buffer - pSeedBuffer = new jbyte[jSeedLength]; - env->GetByteArrayRegion(seed, 0, jSeedLength, pSeedBuffer); - - // Sign the digest (using the supplied seed) - if (ECDSA_SignDigest(&privKey, &signature_item, &digest_item, - (unsigned char *) pSeedBuffer, jSeedLength, 0, timing) != SECSuccess) { - ThrowException(env, KEY_EXCEPTION); - goto cleanup; - } - - // Create new byte array - temp = env->NewByteArray(signature_item.len); - if (temp == NULL) { - goto cleanup; - } - - // Copy data from native buffer - env->SetByteArrayRegion(temp, 0, signature_item.len, pSignedDigestBuffer); - jSignedDigest = temp; - -cleanup: - { - if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); - } - if (privKey.privateValue.data) { - env->ReleaseByteArrayElements(privateKey, - (jbyte *) privKey.privateValue.data, JNI_ABORT); - } - if (pDigestBuffer) { - delete [] pDigestBuffer; - } - if (pSignedDigestBuffer) { - delete [] pSignedDigestBuffer; - } - if (pSeedBuffer) { - delete [] pSeedBuffer; - } - if (ecparams) { - FreeECParams(ecparams, true); - } - } - - return jSignedDigest; -} - -/* - * Class: sun_security_ec_ECDSASignature - * Method: verifySignedDigest - * Signature: ([B[B[B[B)Z - */ -JNIEXPORT jboolean -JNICALL Java_sun_security_ec_ECDSASignature_verifySignedDigest - (JNIEnv *env, jclass clazz, jbyteArray signedDigest, jbyteArray digest, jbyteArray publicKey, jbyteArray encodedParams) -{ - jboolean isValid = false; - - // Copy signedDigest from Java to native buffer - jbyte* pSignedDigestBuffer = NULL; - jint jSignedDigestLength = env->GetArrayLength(signedDigest); - pSignedDigestBuffer = new jbyte[jSignedDigestLength]; - env->GetByteArrayRegion(signedDigest, 0, jSignedDigestLength, - pSignedDigestBuffer); - SECItem signature_item; - signature_item.data = (unsigned char *) pSignedDigestBuffer; - signature_item.len = jSignedDigestLength; - - // Copy digest from Java to native buffer - jbyte* pDigestBuffer = NULL; - jint jDigestLength = env->GetArrayLength(digest); - pDigestBuffer = new jbyte[jDigestLength]; - env->GetByteArrayRegion(digest, 0, jDigestLength, pDigestBuffer); - SECItem digest_item; - digest_item.data = (unsigned char *) pDigestBuffer; - digest_item.len = jDigestLength; - - // Extract public key data - ECPublicKey pubKey; - pubKey.publicValue.data = NULL; - ECParams *ecparams = NULL; - SECKEYECParams params_item; - - // Initialize the ECParams struct - params_item.len = env->GetArrayLength(encodedParams); - params_item.data = - (unsigned char *) env->GetByteArrayElements(encodedParams, 0); - if (params_item.data == NULL) { - goto cleanup; - } - - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ - ThrowException(env, INVALID_ALGORITHM_PARAMETER_EXCEPTION); - goto cleanup; - } - pubKey.ecParams = *ecparams; // struct assignment - pubKey.publicValue.len = env->GetArrayLength(publicKey); - pubKey.publicValue.data = - (unsigned char *) env->GetByteArrayElements(publicKey, 0); - - if (ECDSA_VerifyDigest(&pubKey, &signature_item, &digest_item, 0) - != SECSuccess) { - goto cleanup; - } - - isValid = true; - -cleanup: - { - if (params_item.data) - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); - - if (pubKey.publicValue.data) - env->ReleaseByteArrayElements(publicKey, - (jbyte *) pubKey.publicValue.data, JNI_ABORT); - - if (ecparams) - FreeECParams(ecparams, true); - - if (pSignedDigestBuffer) - delete [] pSignedDigestBuffer; - - if (pDigestBuffer) - delete [] pDigestBuffer; - } - - return isValid; -} - -/* - * Class: sun_security_ec_ECDHKeyAgreement - * Method: deriveKey - * Signature: ([B[B[B)[B - */ -JNIEXPORT jbyteArray -JNICALL Java_sun_security_ec_ECDHKeyAgreement_deriveKey - (JNIEnv *env, jclass clazz, jbyteArray privateKey, jbyteArray publicKey, jbyteArray encodedParams) -{ - jbyteArray jSecret = NULL; - ECParams *ecparams = NULL; - SECItem privateValue_item; - privateValue_item.data = NULL; - SECItem publicValue_item; - publicValue_item.data = NULL; - SECKEYECParams params_item; - params_item.data = NULL; - - // Extract private key value - privateValue_item.len = env->GetArrayLength(privateKey); - privateValue_item.data = - (unsigned char *) env->GetByteArrayElements(privateKey, 0); - if (privateValue_item.data == NULL) { - goto cleanup; - } - - // Extract public key value - publicValue_item.len = env->GetArrayLength(publicKey); - publicValue_item.data = - (unsigned char *) env->GetByteArrayElements(publicKey, 0); - if (publicValue_item.data == NULL) { - goto cleanup; - } - - // Initialize the ECParams struct - params_item.len = env->GetArrayLength(encodedParams); - params_item.data = - (unsigned char *) env->GetByteArrayElements(encodedParams, 0); - if (params_item.data == NULL) { - goto cleanup; - } - - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ - ThrowException(env, INVALID_ALGORITHM_PARAMETER_EXCEPTION); - goto cleanup; - } - - // Prepare a buffer for the secret - SECItem secret_item; - secret_item.data = NULL; - secret_item.len = ecparams->order.len * 2; - - if (ECDH_Derive(&publicValue_item, ecparams, &privateValue_item, B_FALSE, - &secret_item, 0) != SECSuccess) { - ThrowException(env, ILLEGAL_STATE_EXCEPTION); - goto cleanup; - } - - // Create new byte array - jSecret = env->NewByteArray(secret_item.len); - if (jSecret == NULL) { - goto cleanup; - } - - // Copy bytes from the SECItem buffer to a Java byte array - env->SetByteArrayRegion(jSecret, 0, secret_item.len, - (jbyte *)secret_item.data); - - // Free the SECItem data buffer - SECITEM_FreeItem(&secret_item, B_FALSE); - -cleanup: - { - if (privateValue_item.data) - env->ReleaseByteArrayElements(privateKey, - (jbyte *) privateValue_item.data, JNI_ABORT); - - if (publicValue_item.data) - env->ReleaseByteArrayElements(publicKey, - (jbyte *) publicValue_item.data, JNI_ABORT); - - if (params_item.data) - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); - - if (ecparams) - FreeECParams(ecparams, true); - } - - return jSecret; -} - -} /* extern "C" */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ec.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ec.c deleted file mode 100644 index 8c98bdd74d4..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ec.c +++ /dev/null @@ -1,1091 +0,0 @@ -/* - * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the Elliptic Curve Cryptography library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Dr Vipul Gupta <vipul.gupta@sun.com> and - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - * Last Modified Date from the Original Code: May 2017 - *********************************************************************** */ - -#include "mplogic.h" -#include "ec.h" -#include "ecl.h" - -#include <sys/types.h> -#ifndef _KERNEL -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#ifndef _WIN32 -#include <strings.h> -#endif /* _WIN32 */ - -#endif -#include "ecl-exp.h" -#include "mpi.h" -#include "ecc_impl.h" - -#ifdef _KERNEL -#define PORT_ZFree(p, l) bzero((p), (l)); kmem_free((p), (l)) -#else -#ifndef _WIN32 -#define PORT_ZFree(p, l) bzero((p), (l)); free((p)) -#else -#define PORT_ZFree(p, l) memset((p), 0, (l)); free((p)) -#endif /* _WIN32 */ -#endif - -/* - * Returns true if pointP is the point at infinity, false otherwise - */ -PRBool -ec_point_at_infinity(SECItem *pointP) -{ - unsigned int i; - - for (i = 1; i < pointP->len; i++) { - if (pointP->data[i] != 0x00) return PR_FALSE; - } - - return PR_TRUE; -} - -/* - * Computes scalar point multiplication pointQ = k1 * G + k2 * pointP for - * the curve whose parameters are encoded in params with base point G. - */ -SECStatus -ec_points_mul(const ECParams *params, const mp_int *k1, const mp_int *k2, - const SECItem *pointP, SECItem *pointQ, int kmflag, int timing) -{ - mp_int Px, Py, Qx, Qy; - mp_int Gx, Gy, order, irreducible, a, b; -#if 0 /* currently don't support non-named curves */ - unsigned int irr_arr[5]; -#endif - ECGroup *group = NULL; - SECStatus rv = SECFailure; - mp_err err = MP_OKAY; - unsigned int len; - -#if EC_DEBUG - int i; - char mpstr[256]; - - printf("ec_points_mul: params [len=%d]:", params->DEREncoding.len); - for (i = 0; i < params->DEREncoding.len; i++) - printf("%02x:", params->DEREncoding.data[i]); - printf("\n"); - - if (k1 != NULL) { - mp_tohex((mp_int*)k1, mpstr); - printf("ec_points_mul: scalar k1: %s\n", mpstr); - mp_todecimal((mp_int*)k1, mpstr); - printf("ec_points_mul: scalar k1: %s (dec)\n", mpstr); - } - - if (k2 != NULL) { - mp_tohex((mp_int*)k2, mpstr); - printf("ec_points_mul: scalar k2: %s\n", mpstr); - mp_todecimal((mp_int*)k2, mpstr); - printf("ec_points_mul: scalar k2: %s (dec)\n", mpstr); - } - - if (pointP != NULL) { - printf("ec_points_mul: pointP [len=%d]:", pointP->len); - for (i = 0; i < pointP->len; i++) - printf("%02x:", pointP->data[i]); - printf("\n"); - } -#endif - - /* NOTE: We only support uncompressed points for now */ - len = (params->fieldID.size + 7) >> 3; - if (pointP != NULL) { - if ((pointP->data[0] != EC_POINT_FORM_UNCOMPRESSED) || - (pointP->len != (2 * len + 1))) { - return SECFailure; - }; - } - - MP_DIGITS(&Px) = 0; - MP_DIGITS(&Py) = 0; - MP_DIGITS(&Qx) = 0; - MP_DIGITS(&Qy) = 0; - MP_DIGITS(&Gx) = 0; - MP_DIGITS(&Gy) = 0; - MP_DIGITS(&order) = 0; - MP_DIGITS(&irreducible) = 0; - MP_DIGITS(&a) = 0; - MP_DIGITS(&b) = 0; - CHECK_MPI_OK( mp_init(&Px, kmflag) ); - CHECK_MPI_OK( mp_init(&Py, kmflag) ); - CHECK_MPI_OK( mp_init(&Qx, kmflag) ); - CHECK_MPI_OK( mp_init(&Qy, kmflag) ); - CHECK_MPI_OK( mp_init(&Gx, kmflag) ); - CHECK_MPI_OK( mp_init(&Gy, kmflag) ); - CHECK_MPI_OK( mp_init(&order, kmflag) ); - CHECK_MPI_OK( mp_init(&irreducible, kmflag) ); - CHECK_MPI_OK( mp_init(&a, kmflag) ); - CHECK_MPI_OK( mp_init(&b, kmflag) ); - - if ((k2 != NULL) && (pointP != NULL)) { - /* Initialize Px and Py */ - CHECK_MPI_OK( mp_read_unsigned_octets(&Px, pointP->data + 1, (mp_size) len) ); - CHECK_MPI_OK( mp_read_unsigned_octets(&Py, pointP->data + 1 + len, (mp_size) len) ); - } - - /* construct from named params, if possible */ - if (params->name != ECCurve_noName) { - group = ECGroup_fromName(params->name, kmflag); - } - -#if 0 /* currently don't support non-named curves */ - if (group == NULL) { - /* Set up mp_ints containing the curve coefficients */ - CHECK_MPI_OK( mp_read_unsigned_octets(&Gx, params->base.data + 1, - (mp_size) len) ); - CHECK_MPI_OK( mp_read_unsigned_octets(&Gy, params->base.data + 1 + len, - (mp_size) len) ); - SECITEM_TO_MPINT( params->order, &order ); - SECITEM_TO_MPINT( params->curve.a, &a ); - SECITEM_TO_MPINT( params->curve.b, &b ); - if (params->fieldID.type == ec_field_GFp) { - SECITEM_TO_MPINT( params->fieldID.u.prime, &irreducible ); - group = ECGroup_consGFp(&irreducible, &a, &b, &Gx, &Gy, &order, params->cofactor); - } else { - SECITEM_TO_MPINT( params->fieldID.u.poly, &irreducible ); - irr_arr[0] = params->fieldID.size; - irr_arr[1] = params->fieldID.k1; - irr_arr[2] = params->fieldID.k2; - irr_arr[3] = params->fieldID.k3; - irr_arr[4] = 0; - group = ECGroup_consGF2m(&irreducible, irr_arr, &a, &b, &Gx, &Gy, &order, params->cofactor); - } - } -#endif - if (group == NULL) - goto cleanup; - - if ((k2 != NULL) && (pointP != NULL)) { - CHECK_MPI_OK( ECPoints_mul(group, k1, k2, &Px, &Py, &Qx, &Qy, timing) ); - } else { - CHECK_MPI_OK( ECPoints_mul(group, k1, NULL, NULL, NULL, &Qx, &Qy, timing) ); - } - - /* Construct the SECItem representation of point Q */ - pointQ->data[0] = EC_POINT_FORM_UNCOMPRESSED; - CHECK_MPI_OK( mp_to_fixlen_octets(&Qx, pointQ->data + 1, - (mp_size) len) ); - CHECK_MPI_OK( mp_to_fixlen_octets(&Qy, pointQ->data + 1 + len, - (mp_size) len) ); - - rv = SECSuccess; - -#if EC_DEBUG - printf("ec_points_mul: pointQ [len=%d]:", pointQ->len); - for (i = 0; i < pointQ->len; i++) - printf("%02x:", pointQ->data[i]); - printf("\n"); -#endif - -cleanup: - ECGroup_free(group); - mp_clear(&Px); - mp_clear(&Py); - mp_clear(&Qx); - mp_clear(&Qy); - mp_clear(&Gx); - mp_clear(&Gy); - mp_clear(&order); - mp_clear(&irreducible); - mp_clear(&a); - mp_clear(&b); - if (err) { - MP_TO_SEC_ERROR(err); - rv = SECFailure; - } - - return rv; -} - -/* Generates a new EC key pair. The private key is a supplied - * value and the public key is the result of performing a scalar - * point multiplication of that value with the curve's base point. - */ -SECStatus -ec_NewKey(ECParams *ecParams, ECPrivateKey **privKey, - const unsigned char *privKeyBytes, int privKeyLen, int kmflag) -{ - SECStatus rv = SECFailure; - PRArenaPool *arena; - ECPrivateKey *key; - mp_int k; - mp_err err = MP_OKAY; - int len; - -#if EC_DEBUG - printf("ec_NewKey called\n"); -#endif - k.dp = (mp_digit*)NULL; - - if (!ecParams || !privKey || !privKeyBytes || (privKeyLen < 0)) { - PORT_SetError(SEC_ERROR_INVALID_ARGS); - return SECFailure; - } - - /* Initialize an arena for the EC key. */ - if (!(arena = PORT_NewArena(NSS_FREEBL_DEFAULT_CHUNKSIZE))) - return SECFailure; - - key = (ECPrivateKey *)PORT_ArenaZAlloc(arena, sizeof(ECPrivateKey), - kmflag); - if (!key) { - PORT_FreeArena(arena, PR_TRUE); - return SECFailure; - } - - /* Set the version number (SEC 1 section C.4 says it should be 1) */ - SECITEM_AllocItem(arena, &key->version, 1, kmflag); - key->version.data[0] = 1; - - /* Copy all of the fields from the ECParams argument to the - * ECParams structure within the private key. - */ - key->ecParams.arena = arena; - key->ecParams.type = ecParams->type; - key->ecParams.fieldID.size = ecParams->fieldID.size; - key->ecParams.fieldID.type = ecParams->fieldID.type; - if (ecParams->fieldID.type == ec_field_GFp) { - CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.fieldID.u.prime, - &ecParams->fieldID.u.prime, kmflag)); - } else { - CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.fieldID.u.poly, - &ecParams->fieldID.u.poly, kmflag)); - } - key->ecParams.fieldID.k1 = ecParams->fieldID.k1; - key->ecParams.fieldID.k2 = ecParams->fieldID.k2; - key->ecParams.fieldID.k3 = ecParams->fieldID.k3; - CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.curve.a, - &ecParams->curve.a, kmflag)); - CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.curve.b, - &ecParams->curve.b, kmflag)); - CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.curve.seed, - &ecParams->curve.seed, kmflag)); - CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.base, - &ecParams->base, kmflag)); - CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.order, - &ecParams->order, kmflag)); - key->ecParams.cofactor = ecParams->cofactor; - CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.DEREncoding, - &ecParams->DEREncoding, kmflag)); - key->ecParams.name = ecParams->name; - CHECK_SEC_OK(SECITEM_CopyItem(arena, &key->ecParams.curveOID, - &ecParams->curveOID, kmflag)); - - len = (ecParams->fieldID.size + 7) >> 3; - SECITEM_AllocItem(arena, &key->publicValue, 2*len + 1, kmflag); - len = ecParams->order.len; - SECITEM_AllocItem(arena, &key->privateValue, len, kmflag); - - /* Copy private key */ - if (privKeyLen >= len) { - memcpy(key->privateValue.data, privKeyBytes, len); - } else { - memset(key->privateValue.data, 0, (len - privKeyLen)); - memcpy(key->privateValue.data + (len - privKeyLen), privKeyBytes, privKeyLen); - } - - /* Compute corresponding public key */ - MP_DIGITS(&k) = 0; - CHECK_MPI_OK( mp_init(&k, kmflag) ); - CHECK_MPI_OK( mp_read_unsigned_octets(&k, key->privateValue.data, - (mp_size) len) ); - - /* key generation does not support timing mitigation */ - rv = ec_points_mul(ecParams, &k, NULL, NULL, &(key->publicValue), kmflag, /*timing*/ 0); - if (rv != SECSuccess) goto cleanup; - *privKey = key; - -cleanup: - mp_clear(&k); - if (rv) { - PORT_FreeArena(arena, PR_TRUE); - } - -#if EC_DEBUG - printf("ec_NewKey returning %s\n", - (rv == SECSuccess) ? "success" : "failure"); -#endif - - return rv; - -} - -/* Generates a new EC key pair. The private key is a supplied - * random value (in seed) and the public key is the result of - * performing a scalar point multiplication of that value with - * the curve's base point. - */ -SECStatus -EC_NewKeyFromSeed(ECParams *ecParams, ECPrivateKey **privKey, - const unsigned char *seed, int seedlen, int kmflag) -{ - SECStatus rv = SECFailure; - rv = ec_NewKey(ecParams, privKey, seed, seedlen, kmflag); - return rv; -} - -/* Generate a random private key using the algorithm A.4.1 of ANSI X9.62, - * modified a la FIPS 186-2 Change Notice 1 to eliminate the bias in the - * random number generator. - * - * Parameters - * - order: a buffer that holds the curve's group order - * - len: the length in octets of the order buffer - * - random: a buffer of 2 * len random bytes - * - randomlen: the length in octets of the random buffer - * - * Return Value - * Returns a buffer of len octets that holds the private key. The caller - * is responsible for freeing the buffer with PORT_ZFree. - */ -static unsigned char * -ec_GenerateRandomPrivateKey(const unsigned char *order, int len, - const unsigned char *random, int randomlen, int kmflag) -{ - SECStatus rv = SECSuccess; - mp_err err; - unsigned char *privKeyBytes = NULL; - mp_int privKeyVal, order_1, one; - - MP_DIGITS(&privKeyVal) = 0; - MP_DIGITS(&order_1) = 0; - MP_DIGITS(&one) = 0; - CHECK_MPI_OK( mp_init(&privKeyVal, kmflag) ); - CHECK_MPI_OK( mp_init(&order_1, kmflag) ); - CHECK_MPI_OK( mp_init(&one, kmflag) ); - - /* - * Reduces the 2*len buffer of random bytes modulo the group order. - */ - if ((privKeyBytes = PORT_Alloc(2*len, kmflag)) == NULL) goto cleanup; - if (randomlen != 2 * len) { - randomlen = 2 * len; - } - /* No need to generate - random bytes are now supplied */ - /* CHECK_SEC_OK( RNG_GenerateGlobalRandomBytes(privKeyBytes, 2*len) );*/ - memcpy(privKeyBytes, random, randomlen); - - CHECK_MPI_OK( mp_read_unsigned_octets(&privKeyVal, privKeyBytes, 2*len) ); - CHECK_MPI_OK( mp_read_unsigned_octets(&order_1, order, len) ); - CHECK_MPI_OK( mp_set_int(&one, 1) ); - CHECK_MPI_OK( mp_sub(&order_1, &one, &order_1) ); - CHECK_MPI_OK( mp_mod(&privKeyVal, &order_1, &privKeyVal) ); - CHECK_MPI_OK( mp_add(&privKeyVal, &one, &privKeyVal) ); - CHECK_MPI_OK( mp_to_fixlen_octets(&privKeyVal, privKeyBytes, len) ); - memset(privKeyBytes+len, 0, len); -cleanup: - mp_clear(&privKeyVal); - mp_clear(&order_1); - mp_clear(&one); - if (err < MP_OKAY) { - MP_TO_SEC_ERROR(err); - rv = SECFailure; - } - if (rv != SECSuccess && privKeyBytes) { -#ifdef _KERNEL - kmem_free(privKeyBytes, 2*len); -#else - free(privKeyBytes); -#endif - privKeyBytes = NULL; - } - return privKeyBytes; -} - -/* Generates a new EC key pair. The private key is a random value and - * the public key is the result of performing a scalar point multiplication - * of that value with the curve's base point. - */ -SECStatus -EC_NewKey(ECParams *ecParams, ECPrivateKey **privKey, - const unsigned char* random, int randomlen, int kmflag) -{ - SECStatus rv = SECFailure; - int len; - unsigned char *privKeyBytes = NULL; - - if (!ecParams) { - PORT_SetError(SEC_ERROR_INVALID_ARGS); - return SECFailure; - } - - len = ecParams->order.len; - privKeyBytes = ec_GenerateRandomPrivateKey(ecParams->order.data, len, - random, randomlen, kmflag); - if (privKeyBytes == NULL) goto cleanup; - /* generate public key */ - CHECK_SEC_OK( ec_NewKey(ecParams, privKey, privKeyBytes, len, kmflag) ); - -cleanup: - if (privKeyBytes) { - PORT_ZFree(privKeyBytes, len * 2); - } -#if EC_DEBUG - printf("EC_NewKey returning %s\n", - (rv == SECSuccess) ? "success" : "failure"); -#endif - - return rv; -} - -/* Validates an EC public key as described in Section 5.2.2 of - * X9.62. The ECDH primitive when used without the cofactor does - * not address small subgroup attacks, which may occur when the - * public key is not valid. These attacks can be prevented by - * validating the public key before using ECDH. - */ -SECStatus -EC_ValidatePublicKey(ECParams *ecParams, SECItem *publicValue, int kmflag) -{ - mp_int Px, Py; - ECGroup *group = NULL; - SECStatus rv = SECFailure; - mp_err err = MP_OKAY; - unsigned int len; - - if (!ecParams || !publicValue) { - PORT_SetError(SEC_ERROR_INVALID_ARGS); - return SECFailure; - } - - /* NOTE: We only support uncompressed points for now */ - len = (ecParams->fieldID.size + 7) >> 3; - if (publicValue->data[0] != EC_POINT_FORM_UNCOMPRESSED) { - PORT_SetError(SEC_ERROR_UNSUPPORTED_EC_POINT_FORM); - return SECFailure; - } else if (publicValue->len != (2 * len + 1)) { - PORT_SetError(SEC_ERROR_BAD_KEY); - return SECFailure; - } - - MP_DIGITS(&Px) = 0; - MP_DIGITS(&Py) = 0; - CHECK_MPI_OK( mp_init(&Px, kmflag) ); - CHECK_MPI_OK( mp_init(&Py, kmflag) ); - - /* Initialize Px and Py */ - CHECK_MPI_OK( mp_read_unsigned_octets(&Px, publicValue->data + 1, (mp_size) len) ); - CHECK_MPI_OK( mp_read_unsigned_octets(&Py, publicValue->data + 1 + len, (mp_size) len) ); - - /* construct from named params */ - group = ECGroup_fromName(ecParams->name, kmflag); - if (group == NULL) { - /* - * ECGroup_fromName fails if ecParams->name is not a valid - * ECCurveName value, or if we run out of memory, or perhaps - * for other reasons. Unfortunately if ecParams->name is a - * valid ECCurveName value, we don't know what the right error - * code should be because ECGroup_fromName doesn't return an - * error code to the caller. Set err to MP_UNDEF because - * that's what ECGroup_fromName uses internally. - */ - if ((ecParams->name <= ECCurve_noName) || - (ecParams->name >= ECCurve_pastLastCurve)) { - err = MP_BADARG; - } else { - err = MP_UNDEF; - } - goto cleanup; - } - - /* validate public point */ - if ((err = ECPoint_validate(group, &Px, &Py)) < MP_YES) { - if (err == MP_NO) { - PORT_SetError(SEC_ERROR_BAD_KEY); - rv = SECFailure; - err = MP_OKAY; /* don't change the error code */ - } - goto cleanup; - } - - rv = SECSuccess; - -cleanup: - ECGroup_free(group); - mp_clear(&Px); - mp_clear(&Py); - if (err) { - MP_TO_SEC_ERROR(err); - rv = SECFailure; - } - return rv; -} - -/* -** Performs an ECDH key derivation by computing the scalar point -** multiplication of privateValue and publicValue (with or without the -** cofactor) and returns the x-coordinate of the resulting elliptic -** curve point in derived secret. If successful, derivedSecret->data -** is set to the address of the newly allocated buffer containing the -** derived secret, and derivedSecret->len is the size of the secret -** produced. It is the caller's responsibility to free the allocated -** buffer containing the derived secret. -*/ -SECStatus -ECDH_Derive(SECItem *publicValue, - ECParams *ecParams, - SECItem *privateValue, - PRBool withCofactor, - SECItem *derivedSecret, - int kmflag) -{ - SECStatus rv = SECFailure; - unsigned int len = 0; - SECItem pointQ = {siBuffer, NULL, 0}; - mp_int k; /* to hold the private value */ - mp_int cofactor; - mp_err err = MP_OKAY; -#if EC_DEBUG - int i; -#endif - - if (!publicValue || !ecParams || !privateValue || - !derivedSecret) { - PORT_SetError(SEC_ERROR_INVALID_ARGS); - return SECFailure; - } - - if (EC_ValidatePublicKey(ecParams, publicValue, kmflag) != SECSuccess) { - return SECFailure; - } - - memset(derivedSecret, 0, sizeof *derivedSecret); - len = (ecParams->fieldID.size + 7) >> 3; - pointQ.len = 2*len + 1; - if ((pointQ.data = PORT_Alloc(2*len + 1, kmflag)) == NULL) goto cleanup; - - MP_DIGITS(&k) = 0; - CHECK_MPI_OK( mp_init(&k, kmflag) ); - CHECK_MPI_OK( mp_read_unsigned_octets(&k, privateValue->data, - (mp_size) privateValue->len) ); - - if (withCofactor && (ecParams->cofactor != 1)) { - /* multiply k with the cofactor */ - MP_DIGITS(&cofactor) = 0; - CHECK_MPI_OK( mp_init(&cofactor, kmflag) ); - mp_set(&cofactor, ecParams->cofactor); - CHECK_MPI_OK( mp_mul(&k, &cofactor, &k) ); - } - - /* Multiply our private key and peer's public point */ - /* ECDH doesn't support timing mitigation */ - if ((ec_points_mul(ecParams, NULL, &k, publicValue, &pointQ, kmflag, /*timing*/ 0) != SECSuccess) || - ec_point_at_infinity(&pointQ)) - goto cleanup; - - /* Allocate memory for the derived secret and copy - * the x co-ordinate of pointQ into it. - */ - SECITEM_AllocItem(NULL, derivedSecret, len, kmflag); - memcpy(derivedSecret->data, pointQ.data + 1, len); - - rv = SECSuccess; - -#if EC_DEBUG - printf("derived_secret:\n"); - for (i = 0; i < derivedSecret->len; i++) - printf("%02x:", derivedSecret->data[i]); - printf("\n"); -#endif - -cleanup: - mp_clear(&k); - - if (pointQ.data) { - PORT_ZFree(pointQ.data, 2*len + 1); - } - - return rv; -} - -/* Computes the ECDSA signature (a concatenation of two values r and s) - * on the digest using the given key and the random value kb (used in - * computing s). - */ -SECStatus -ECDSA_SignDigestWithSeed(ECPrivateKey *key, SECItem *signature, - const SECItem *digest, const unsigned char *kb, const int kblen, int kmflag, - int timing) -{ - SECStatus rv = SECFailure; - mp_int x1; - mp_int d, k; /* private key, random integer */ - mp_int r, s; /* tuple (r, s) is the signature */ - mp_int n; - mp_err err = MP_OKAY; - ECParams *ecParams = NULL; - SECItem kGpoint = { siBuffer, NULL, 0}; - int flen = 0; /* length in bytes of the field size */ - unsigned olen; /* length in bytes of the base point order */ - unsigned int orderBitSize; - -#if EC_DEBUG - char mpstr[256]; -#endif - - /* Initialize MPI integers. */ - /* must happen before the first potential call to cleanup */ - MP_DIGITS(&x1) = 0; - MP_DIGITS(&d) = 0; - MP_DIGITS(&k) = 0; - MP_DIGITS(&r) = 0; - MP_DIGITS(&s) = 0; - MP_DIGITS(&n) = 0; - - /* Check args */ - if (!key || !signature || !digest || !kb || (kblen < 0)) { - PORT_SetError(SEC_ERROR_INVALID_ARGS); - goto cleanup; - } - - ecParams = &(key->ecParams); - flen = (ecParams->fieldID.size + 7) >> 3; - olen = ecParams->order.len; - if (signature->data == NULL) { - /* a call to get the signature length only */ - goto finish; - } - if (signature->len < 2*olen) { - PORT_SetError(SEC_ERROR_OUTPUT_LEN); - rv = SECBufferTooSmall; - goto cleanup; - } - - - CHECK_MPI_OK( mp_init(&x1, kmflag) ); - CHECK_MPI_OK( mp_init(&d, kmflag) ); - CHECK_MPI_OK( mp_init(&k, kmflag) ); - CHECK_MPI_OK( mp_init(&r, kmflag) ); - CHECK_MPI_OK( mp_init(&s, kmflag) ); - CHECK_MPI_OK( mp_init(&n, kmflag) ); - - SECITEM_TO_MPINT( ecParams->order, &n ); - SECITEM_TO_MPINT( key->privateValue, &d ); - CHECK_MPI_OK( mp_read_unsigned_octets(&k, kb, kblen) ); - /* Make sure k is in the interval [1, n-1] */ - if ((mp_cmp_z(&k) <= 0) || (mp_cmp(&k, &n) >= 0)) { -#if EC_DEBUG - printf("k is outside [1, n-1]\n"); - mp_tohex(&k, mpstr); - printf("k : %s \n", mpstr); - mp_tohex(&n, mpstr); - printf("n : %s \n", mpstr); -#endif - PORT_SetError(SEC_ERROR_NEED_RANDOM); - goto cleanup; - } - - /* - ** ANSI X9.62, Section 5.3.2, Step 2 - ** - ** Compute kG - */ - kGpoint.len = 2*flen + 1; - kGpoint.data = PORT_Alloc(2*flen + 1, kmflag); - if ((kGpoint.data == NULL) || - (ec_points_mul(ecParams, &k, NULL, NULL, &kGpoint, kmflag, timing) - != SECSuccess)) - goto cleanup; - - /* - ** ANSI X9.62, Section 5.3.3, Step 1 - ** - ** Extract the x co-ordinate of kG into x1 - */ - CHECK_MPI_OK( mp_read_unsigned_octets(&x1, kGpoint.data + 1, - (mp_size) flen) ); - - /* - ** ANSI X9.62, Section 5.3.3, Step 2 - ** - ** r = x1 mod n NOTE: n is the order of the curve - */ - CHECK_MPI_OK( mp_mod(&x1, &n, &r) ); - - /* - ** ANSI X9.62, Section 5.3.3, Step 3 - ** - ** verify r != 0 - */ - if (mp_cmp_z(&r) == 0) { - PORT_SetError(SEC_ERROR_NEED_RANDOM); - goto cleanup; - } - - /* - ** ANSI X9.62, Section 5.3.3, Step 4 - ** - ** s = (k**-1 * (HASH(M) + d*r)) mod n - */ - SECITEM_TO_MPINT(*digest, &s); /* s = HASH(M) */ - - /* In the definition of EC signing, digests are truncated - * to the order length - * (see SEC 1 "Elliptic Curve Digit Signature Algorithm" section 4.1.*/ - orderBitSize = mpl_significant_bits(&n); - if (digest->len*8 > orderBitSize) { - mpl_rsh(&s,&s,digest->len*8 - orderBitSize); - } - -#if EC_DEBUG - mp_todecimal(&n, mpstr); - printf("n : %s (dec)\n", mpstr); - mp_todecimal(&d, mpstr); - printf("d : %s (dec)\n", mpstr); - mp_tohex(&x1, mpstr); - printf("x1: %s\n", mpstr); - mp_todecimal(&s, mpstr); - printf("digest: %s (decimal)\n", mpstr); - mp_todecimal(&r, mpstr); - printf("r : %s (dec)\n", mpstr); - mp_tohex(&r, mpstr); - printf("r : %s\n", mpstr); -#endif - - CHECK_MPI_OK( mp_invmod(&k, &n, &k) ); /* k = k**-1 mod n */ - CHECK_MPI_OK( mp_mulmod(&d, &r, &n, &d) ); /* d = d * r mod n */ - CHECK_MPI_OK( mp_addmod(&s, &d, &n, &s) ); /* s = s + d mod n */ - CHECK_MPI_OK( mp_mulmod(&s, &k, &n, &s) ); /* s = s * k mod n */ - -#if EC_DEBUG - mp_todecimal(&s, mpstr); - printf("s : %s (dec)\n", mpstr); - mp_tohex(&s, mpstr); - printf("s : %s\n", mpstr); -#endif - - /* - ** ANSI X9.62, Section 5.3.3, Step 5 - ** - ** verify s != 0 - */ - if (mp_cmp_z(&s) == 0) { - PORT_SetError(SEC_ERROR_NEED_RANDOM); - goto cleanup; - } - - /* - ** - ** Signature is tuple (r, s) - */ - CHECK_MPI_OK( mp_to_fixlen_octets(&r, signature->data, olen) ); - CHECK_MPI_OK( mp_to_fixlen_octets(&s, signature->data + olen, olen) ); -finish: - signature->len = 2*olen; - - rv = SECSuccess; - err = MP_OKAY; -cleanup: - mp_clear(&x1); - mp_clear(&d); - mp_clear(&k); - mp_clear(&r); - mp_clear(&s); - mp_clear(&n); - - if (kGpoint.data) { - PORT_ZFree(kGpoint.data, 2*flen + 1); - } - - if (err) { - MP_TO_SEC_ERROR(err); - rv = SECFailure; - } - -#if EC_DEBUG - printf("ECDSA signing with seed %s\n", - (rv == SECSuccess) ? "succeeded" : "failed"); -#endif - - return rv; -} - -/* -** Computes the ECDSA signature on the digest using the given key -** and a random seed. -*/ -SECStatus -ECDSA_SignDigest(ECPrivateKey *key, SECItem *signature, const SECItem *digest, - const unsigned char* random, int randomLen, int kmflag, int timing) -{ - SECStatus rv = SECFailure; - int len; - unsigned char *kBytes= NULL; - - if (!key) { - PORT_SetError(SEC_ERROR_INVALID_ARGS); - return SECFailure; - } - - /* Generate random value k */ - len = key->ecParams.order.len; - kBytes = ec_GenerateRandomPrivateKey(key->ecParams.order.data, len, - random, randomLen, kmflag); - if (kBytes == NULL) goto cleanup; - - /* Generate ECDSA signature with the specified k value */ - rv = ECDSA_SignDigestWithSeed(key, signature, digest, kBytes, len, kmflag, timing); - -cleanup: - if (kBytes) { - PORT_ZFree(kBytes, len * 2); - } - -#if EC_DEBUG - printf("ECDSA signing %s\n", - (rv == SECSuccess) ? "succeeded" : "failed"); -#endif - - return rv; -} - -/* -** Checks the signature on the given digest using the key provided. -*/ -SECStatus -ECDSA_VerifyDigest(ECPublicKey *key, const SECItem *signature, - const SECItem *digest, int kmflag) -{ - SECStatus rv = SECFailure; - mp_int r_, s_; /* tuple (r', s') is received signature) */ - mp_int c, u1, u2, v; /* intermediate values used in verification */ - mp_int x1; - mp_int n; - mp_err err = MP_OKAY; - ECParams *ecParams = NULL; - SECItem pointC = { siBuffer, NULL, 0 }; - int slen; /* length in bytes of a half signature (r or s) */ - int flen; /* length in bytes of the field size */ - unsigned olen; /* length in bytes of the base point order */ - unsigned int orderBitSize; - -#if EC_DEBUG - char mpstr[256]; - printf("ECDSA verification called\n"); -#endif - - /* Initialize MPI integers. */ - /* must happen before the first potential call to cleanup */ - MP_DIGITS(&r_) = 0; - MP_DIGITS(&s_) = 0; - MP_DIGITS(&c) = 0; - MP_DIGITS(&u1) = 0; - MP_DIGITS(&u2) = 0; - MP_DIGITS(&x1) = 0; - MP_DIGITS(&v) = 0; - MP_DIGITS(&n) = 0; - - /* Check args */ - if (!key || !signature || !digest) { - PORT_SetError(SEC_ERROR_INVALID_ARGS); - goto cleanup; - } - - ecParams = &(key->ecParams); - flen = (ecParams->fieldID.size + 7) >> 3; - olen = ecParams->order.len; - if (signature->len == 0 || signature->len%2 != 0 || - signature->len > 2*olen) { - PORT_SetError(SEC_ERROR_INPUT_LEN); - goto cleanup; - } - slen = signature->len/2; - - SECITEM_AllocItem(NULL, &pointC, 2*flen + 1, kmflag); - if (pointC.data == NULL) - goto cleanup; - - CHECK_MPI_OK( mp_init(&r_, kmflag) ); - CHECK_MPI_OK( mp_init(&s_, kmflag) ); - CHECK_MPI_OK( mp_init(&c, kmflag) ); - CHECK_MPI_OK( mp_init(&u1, kmflag) ); - CHECK_MPI_OK( mp_init(&u2, kmflag) ); - CHECK_MPI_OK( mp_init(&x1, kmflag) ); - CHECK_MPI_OK( mp_init(&v, kmflag) ); - CHECK_MPI_OK( mp_init(&n, kmflag) ); - - /* - ** Convert received signature (r', s') into MPI integers. - */ - CHECK_MPI_OK( mp_read_unsigned_octets(&r_, signature->data, slen) ); - CHECK_MPI_OK( mp_read_unsigned_octets(&s_, signature->data + slen, slen) ); - - /* - ** ANSI X9.62, Section 5.4.2, Steps 1 and 2 - ** - ** Verify that 0 < r' < n and 0 < s' < n - */ - SECITEM_TO_MPINT(ecParams->order, &n); - if (mp_cmp_z(&r_) <= 0 || mp_cmp_z(&s_) <= 0 || - mp_cmp(&r_, &n) >= 0 || mp_cmp(&s_, &n) >= 0) { - PORT_SetError(SEC_ERROR_BAD_SIGNATURE); - goto cleanup; /* will return rv == SECFailure */ - } - - /* - ** ANSI X9.62, Section 5.4.2, Step 3 - ** - ** c = (s')**-1 mod n - */ - CHECK_MPI_OK( mp_invmod(&s_, &n, &c) ); /* c = (s')**-1 mod n */ - - /* - ** ANSI X9.62, Section 5.4.2, Step 4 - ** - ** u1 = ((HASH(M')) * c) mod n - */ - SECITEM_TO_MPINT(*digest, &u1); /* u1 = HASH(M) */ - - /* In the definition of EC signing, digests are truncated - * to the order length, in bits. - * (see SEC 1 "Elliptic Curve Digit Signature Algorithm" section 4.1.*/ - /* u1 = HASH(M') */ - orderBitSize = mpl_significant_bits(&n); - if (digest->len*8 > orderBitSize) { - mpl_rsh(&u1,&u1,digest->len*8- orderBitSize); - } - -#if EC_DEBUG - mp_todecimal(&r_, mpstr); - printf("r_: %s (dec)\n", mpstr); - mp_todecimal(&s_, mpstr); - printf("s_: %s (dec)\n", mpstr); - mp_todecimal(&c, mpstr); - printf("c : %s (dec)\n", mpstr); - mp_todecimal(&u1, mpstr); - printf("digest: %s (dec)\n", mpstr); -#endif - - CHECK_MPI_OK( mp_mulmod(&u1, &c, &n, &u1) ); /* u1 = u1 * c mod n */ - - /* - ** ANSI X9.62, Section 5.4.2, Step 4 - ** - ** u2 = ((r') * c) mod n - */ - CHECK_MPI_OK( mp_mulmod(&r_, &c, &n, &u2) ); - - /* - ** ANSI X9.62, Section 5.4.3, Step 1 - ** - ** Compute u1*G + u2*Q - ** Here, A = u1.G B = u2.Q and C = A + B - ** If the result, C, is the point at infinity, reject the signature - */ - /* verification does not support timing mitigation */ - if (ec_points_mul(ecParams, &u1, &u2, &key->publicValue, &pointC, kmflag, /*timing*/ 0) - != SECSuccess) { - rv = SECFailure; - goto cleanup; - } - if (ec_point_at_infinity(&pointC)) { - PORT_SetError(SEC_ERROR_BAD_SIGNATURE); - rv = SECFailure; - goto cleanup; - } - - CHECK_MPI_OK( mp_read_unsigned_octets(&x1, pointC.data + 1, flen) ); - - /* - ** ANSI X9.62, Section 5.4.4, Step 2 - ** - ** v = x1 mod n - */ - CHECK_MPI_OK( mp_mod(&x1, &n, &v) ); - -#if EC_DEBUG - mp_todecimal(&r_, mpstr); - printf("r_: %s (dec)\n", mpstr); - mp_todecimal(&v, mpstr); - printf("v : %s (dec)\n", mpstr); -#endif - - /* - ** ANSI X9.62, Section 5.4.4, Step 3 - ** - ** Verification: v == r' - */ - if (mp_cmp(&v, &r_)) { - PORT_SetError(SEC_ERROR_BAD_SIGNATURE); - rv = SECFailure; /* Signature failed to verify. */ - } else { - rv = SECSuccess; /* Signature verified. */ - } - -#if EC_DEBUG - mp_todecimal(&u1, mpstr); - printf("u1: %s (dec)\n", mpstr); - mp_todecimal(&u2, mpstr); - printf("u2: %s (dec)\n", mpstr); - mp_tohex(&x1, mpstr); - printf("x1: %s\n", mpstr); - mp_todecimal(&v, mpstr); - printf("v : %s (dec)\n", mpstr); -#endif - -cleanup: - mp_clear(&r_); - mp_clear(&s_); - mp_clear(&c); - mp_clear(&u1); - mp_clear(&u2); - mp_clear(&x1); - mp_clear(&v); - mp_clear(&n); - - if (pointC.data) SECITEM_FreeItem(&pointC, PR_FALSE); - if (err) { - MP_TO_SEC_ERROR(err); - rv = SECFailure; - } - -#if EC_DEBUG - printf("ECDSA verification %s\n", - (rv == SECSuccess) ? "succeeded" : "failed"); -#endif - - return rv; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ec.h b/src/jdk.crypto.ec/share/native/libsunec/impl/ec.h deleted file mode 100644 index 958419aa724..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ec.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the Elliptic Curve Cryptography library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories - * - *********************************************************************** */ - -#ifndef __ec_h_ -#define __ec_h_ - -#define EC_DEBUG 0 -#define EC_POINT_FORM_COMPRESSED_Y0 0x02 -#define EC_POINT_FORM_COMPRESSED_Y1 0x03 -#define EC_POINT_FORM_UNCOMPRESSED 0x04 -#define EC_POINT_FORM_HYBRID_Y0 0x06 -#define EC_POINT_FORM_HYBRID_Y1 0x07 - -#define ANSI_X962_CURVE_OID_TOTAL_LEN 10 -#define SECG_CURVE_OID_TOTAL_LEN 7 -#define BRAINPOOL_CURVE_OID_TOTAL_LEN 11 - -#endif /* __ec_h_ */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ec2.h b/src/jdk.crypto.ec/share/native/libsunec/impl/ec2.h deleted file mode 100644 index 72df04ef413..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ec2.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for binary polynomial field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - * Last Modified Date from the Original Code: May 2017 - *********************************************************************** */ - -#ifndef _EC2_H -#define _EC2_H - -#include "ecl-priv.h" - -/* Checks if point P(px, py) is at infinity. Uses affine coordinates. */ -mp_err ec_GF2m_pt_is_inf_aff(const mp_int *px, const mp_int *py); - -/* Sets P(px, py) to be the point at infinity. Uses affine coordinates. */ -mp_err ec_GF2m_pt_set_inf_aff(mp_int *px, mp_int *py); - -/* Computes R = P + Q where R is (rx, ry), P is (px, py) and Q is (qx, - * qy). Uses affine coordinates. */ -mp_err ec_GF2m_pt_add_aff(const mp_int *px, const mp_int *py, - const mp_int *qx, const mp_int *qy, mp_int *rx, - mp_int *ry, const ECGroup *group); - -/* Computes R = P - Q. Uses affine coordinates. */ -mp_err ec_GF2m_pt_sub_aff(const mp_int *px, const mp_int *py, - const mp_int *qx, const mp_int *qy, mp_int *rx, - mp_int *ry, const ECGroup *group); - -/* Computes R = 2P. Uses affine coordinates. */ -mp_err ec_GF2m_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx, - mp_int *ry, const ECGroup *group); - -/* Validates a point on a GF2m curve. */ -mp_err ec_GF2m_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group); - -/* by default, this routine is unused and thus doesn't need to be compiled */ -#ifdef ECL_ENABLE_GF2M_PT_MUL_AFF -/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters - * a, b and p are the elliptic curve coefficients and the irreducible that - * determines the field GF2m. Uses affine coordinates. */ -mp_err ec_GF2m_pt_mul_aff(const mp_int *n, const mp_int *px, - const mp_int *py, mp_int *rx, mp_int *ry, - const ECGroup *group); -#endif - -/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters - * a, b and p are the elliptic curve coefficients and the irreducible that - * determines the field GF2m. Uses Montgomery projective coordinates. */ -mp_err ec_GF2m_pt_mul_mont(const mp_int *n, const mp_int *px, - const mp_int *py, mp_int *rx, mp_int *ry, - const ECGroup *group, int timing); - -#ifdef ECL_ENABLE_GF2M_PROJ -/* Converts a point P(px, py) from affine coordinates to projective - * coordinates R(rx, ry, rz). */ -mp_err ec_GF2m_pt_aff2proj(const mp_int *px, const mp_int *py, mp_int *rx, - mp_int *ry, mp_int *rz, const ECGroup *group); - -/* Converts a point P(px, py, pz) from projective coordinates to affine - * coordinates R(rx, ry). */ -mp_err ec_GF2m_pt_proj2aff(const mp_int *px, const mp_int *py, - const mp_int *pz, mp_int *rx, mp_int *ry, - const ECGroup *group); - -/* Checks if point P(px, py, pz) is at infinity. Uses projective - * coordinates. */ -mp_err ec_GF2m_pt_is_inf_proj(const mp_int *px, const mp_int *py, - const mp_int *pz); - -/* Sets P(px, py, pz) to be the point at infinity. Uses projective - * coordinates. */ -mp_err ec_GF2m_pt_set_inf_proj(mp_int *px, mp_int *py, mp_int *pz); - -/* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is - * (qx, qy, qz). Uses projective coordinates. */ -mp_err ec_GF2m_pt_add_proj(const mp_int *px, const mp_int *py, - const mp_int *pz, const mp_int *qx, - const mp_int *qy, mp_int *rx, mp_int *ry, - mp_int *rz, const ECGroup *group); - -/* Computes R = 2P. Uses projective coordinates. */ -mp_err ec_GF2m_pt_dbl_proj(const mp_int *px, const mp_int *py, - const mp_int *pz, mp_int *rx, mp_int *ry, - mp_int *rz, const ECGroup *group); - -/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters - * a, b and p are the elliptic curve coefficients and the prime that - * determines the field GF2m. Uses projective coordinates. */ -mp_err ec_GF2m_pt_mul_proj(const mp_int *n, const mp_int *px, - const mp_int *py, mp_int *rx, mp_int *ry, - const ECGroup *group); -#endif - -#endif /* _EC2_H */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_163.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_163.c deleted file mode 100644 index d35d11d008d..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_163.c +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for binary polynomial field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Sheueling Chang-Shantz <sheueling.chang@sun.com>, - * Stephen Fung <fungstep@hotmail.com>, and - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories. - * - *********************************************************************** */ - -#include "ec2.h" -#include "mp_gf2m.h" -#include "mp_gf2m-priv.h" -#include "mpi.h" -#include "mpi-priv.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -/* Fast reduction for polynomials over a 163-bit curve. Assumes reduction - * polynomial with terms {163, 7, 6, 3, 0}. */ -mp_err -ec_GF2m_163_mod(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit *u, z; - - if (a != r) { - MP_CHECKOK(mp_copy(a, r)); - } -#ifdef ECL_SIXTY_FOUR_BIT - if (MP_USED(r) < 6) { - MP_CHECKOK(s_mp_pad(r, 6)); - } - u = MP_DIGITS(r); - MP_USED(r) = 6; - - /* u[5] only has 6 significant bits */ - z = u[5]; - u[2] ^= (z << 36) ^ (z << 35) ^ (z << 32) ^ (z << 29); - z = u[4]; - u[2] ^= (z >> 28) ^ (z >> 29) ^ (z >> 32) ^ (z >> 35); - u[1] ^= (z << 36) ^ (z << 35) ^ (z << 32) ^ (z << 29); - z = u[3]; - u[1] ^= (z >> 28) ^ (z >> 29) ^ (z >> 32) ^ (z >> 35); - u[0] ^= (z << 36) ^ (z << 35) ^ (z << 32) ^ (z << 29); - z = u[2] >> 35; /* z only has 29 significant bits */ - u[0] ^= (z << 7) ^ (z << 6) ^ (z << 3) ^ z; - /* clear bits above 163 */ - u[5] = u[4] = u[3] = 0; - u[2] ^= z << 35; -#else - if (MP_USED(r) < 11) { - MP_CHECKOK(s_mp_pad(r, 11)); - } - u = MP_DIGITS(r); - MP_USED(r) = 11; - - /* u[11] only has 6 significant bits */ - z = u[10]; - u[5] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3); - u[4] ^= (z << 29); - z = u[9]; - u[5] ^= (z >> 28) ^ (z >> 29); - u[4] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3); - u[3] ^= (z << 29); - z = u[8]; - u[4] ^= (z >> 28) ^ (z >> 29); - u[3] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3); - u[2] ^= (z << 29); - z = u[7]; - u[3] ^= (z >> 28) ^ (z >> 29); - u[2] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3); - u[1] ^= (z << 29); - z = u[6]; - u[2] ^= (z >> 28) ^ (z >> 29); - u[1] ^= (z << 4) ^ (z << 3) ^ z ^ (z >> 3); - u[0] ^= (z << 29); - z = u[5] >> 3; /* z only has 29 significant bits */ - u[1] ^= (z >> 25) ^ (z >> 26); - u[0] ^= (z << 7) ^ (z << 6) ^ (z << 3) ^ z; - /* clear bits above 163 */ - u[11] = u[10] = u[9] = u[8] = u[7] = u[6] = 0; - u[5] ^= z << 3; -#endif - s_mp_clamp(r); - - CLEANUP: - return res; -} - -/* Fast squaring for polynomials over a 163-bit curve. Assumes reduction - * polynomial with terms {163, 7, 6, 3, 0}. */ -mp_err -ec_GF2m_163_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit *u, *v; - - v = MP_DIGITS(a); - -#ifdef ECL_SIXTY_FOUR_BIT - if (MP_USED(a) < 3) { - return mp_bsqrmod(a, meth->irr_arr, r); - } - if (MP_USED(r) < 6) { - MP_CHECKOK(s_mp_pad(r, 6)); - } - MP_USED(r) = 6; -#else - if (MP_USED(a) < 6) { - return mp_bsqrmod(a, meth->irr_arr, r); - } - if (MP_USED(r) < 12) { - MP_CHECKOK(s_mp_pad(r, 12)); - } - MP_USED(r) = 12; -#endif - u = MP_DIGITS(r); - -#ifdef ECL_THIRTY_TWO_BIT - u[11] = gf2m_SQR1(v[5]); - u[10] = gf2m_SQR0(v[5]); - u[9] = gf2m_SQR1(v[4]); - u[8] = gf2m_SQR0(v[4]); - u[7] = gf2m_SQR1(v[3]); - u[6] = gf2m_SQR0(v[3]); -#endif - u[5] = gf2m_SQR1(v[2]); - u[4] = gf2m_SQR0(v[2]); - u[3] = gf2m_SQR1(v[1]); - u[2] = gf2m_SQR0(v[1]); - u[1] = gf2m_SQR1(v[0]); - u[0] = gf2m_SQR0(v[0]); - return ec_GF2m_163_mod(r, r, meth); - - CLEANUP: - return res; -} - -/* Fast multiplication for polynomials over a 163-bit curve. Assumes - * reduction polynomial with terms {163, 7, 6, 3, 0}. */ -mp_err -ec_GF2m_163_mul(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit a2 = 0, a1 = 0, a0, b2 = 0, b1 = 0, b0; - -#ifdef ECL_THIRTY_TWO_BIT - mp_digit a5 = 0, a4 = 0, a3 = 0, b5 = 0, b4 = 0, b3 = 0; - mp_digit rm[6]; -#endif - - if (a == b) { - return ec_GF2m_163_sqr(a, r, meth); - } else { - switch (MP_USED(a)) { -#ifdef ECL_THIRTY_TWO_BIT - case 6: - a5 = MP_DIGIT(a, 5); - case 5: - a4 = MP_DIGIT(a, 4); - case 4: - a3 = MP_DIGIT(a, 3); -#endif - case 3: - a2 = MP_DIGIT(a, 2); - case 2: - a1 = MP_DIGIT(a, 1); - default: - a0 = MP_DIGIT(a, 0); - } - switch (MP_USED(b)) { -#ifdef ECL_THIRTY_TWO_BIT - case 6: - b5 = MP_DIGIT(b, 5); - case 5: - b4 = MP_DIGIT(b, 4); - case 4: - b3 = MP_DIGIT(b, 3); -#endif - case 3: - b2 = MP_DIGIT(b, 2); - case 2: - b1 = MP_DIGIT(b, 1); - default: - b0 = MP_DIGIT(b, 0); - } -#ifdef ECL_SIXTY_FOUR_BIT - MP_CHECKOK(s_mp_pad(r, 6)); - s_bmul_3x3(MP_DIGITS(r), a2, a1, a0, b2, b1, b0); - MP_USED(r) = 6; - s_mp_clamp(r); -#else - MP_CHECKOK(s_mp_pad(r, 12)); - s_bmul_3x3(MP_DIGITS(r) + 6, a5, a4, a3, b5, b4, b3); - s_bmul_3x3(MP_DIGITS(r), a2, a1, a0, b2, b1, b0); - s_bmul_3x3(rm, a5 ^ a2, a4 ^ a1, a3 ^ a0, b5 ^ b2, b4 ^ b1, - b3 ^ b0); - rm[5] ^= MP_DIGIT(r, 5) ^ MP_DIGIT(r, 11); - rm[4] ^= MP_DIGIT(r, 4) ^ MP_DIGIT(r, 10); - rm[3] ^= MP_DIGIT(r, 3) ^ MP_DIGIT(r, 9); - rm[2] ^= MP_DIGIT(r, 2) ^ MP_DIGIT(r, 8); - rm[1] ^= MP_DIGIT(r, 1) ^ MP_DIGIT(r, 7); - rm[0] ^= MP_DIGIT(r, 0) ^ MP_DIGIT(r, 6); - MP_DIGIT(r, 8) ^= rm[5]; - MP_DIGIT(r, 7) ^= rm[4]; - MP_DIGIT(r, 6) ^= rm[3]; - MP_DIGIT(r, 5) ^= rm[2]; - MP_DIGIT(r, 4) ^= rm[1]; - MP_DIGIT(r, 3) ^= rm[0]; - MP_USED(r) = 12; - s_mp_clamp(r); -#endif - return ec_GF2m_163_mod(r, r, meth); - } - - CLEANUP: - return res; -} - -/* Wire in fast field arithmetic for 163-bit curves. */ -mp_err -ec_group_set_gf2m163(ECGroup *group, ECCurveName name) -{ - group->meth->field_mod = &ec_GF2m_163_mod; - group->meth->field_mul = &ec_GF2m_163_mul; - group->meth->field_sqr = &ec_GF2m_163_sqr; - return MP_OKAY; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_193.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_193.c deleted file mode 100644 index bbff2e50f80..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_193.c +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for binary polynomial field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Sheueling Chang-Shantz <sheueling.chang@sun.com>, - * Stephen Fung <fungstep@hotmail.com>, and - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories. - * - *********************************************************************** */ - -#include "ec2.h" -#include "mp_gf2m.h" -#include "mp_gf2m-priv.h" -#include "mpi.h" -#include "mpi-priv.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -/* Fast reduction for polynomials over a 193-bit curve. Assumes reduction - * polynomial with terms {193, 15, 0}. */ -mp_err -ec_GF2m_193_mod(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit *u, z; - - if (a != r) { - MP_CHECKOK(mp_copy(a, r)); - } -#ifdef ECL_SIXTY_FOUR_BIT - if (MP_USED(r) < 7) { - MP_CHECKOK(s_mp_pad(r, 7)); - } - u = MP_DIGITS(r); - MP_USED(r) = 7; - - /* u[6] only has 2 significant bits */ - z = u[6]; - u[3] ^= (z << 14) ^ (z >> 1); - u[2] ^= (z << 63); - z = u[5]; - u[3] ^= (z >> 50); - u[2] ^= (z << 14) ^ (z >> 1); - u[1] ^= (z << 63); - z = u[4]; - u[2] ^= (z >> 50); - u[1] ^= (z << 14) ^ (z >> 1); - u[0] ^= (z << 63); - z = u[3] >> 1; /* z only has 63 significant bits */ - u[1] ^= (z >> 49); - u[0] ^= (z << 15) ^ z; - /* clear bits above 193 */ - u[6] = u[5] = u[4] = 0; - u[3] ^= z << 1; -#else - if (MP_USED(r) < 13) { - MP_CHECKOK(s_mp_pad(r, 13)); - } - u = MP_DIGITS(r); - MP_USED(r) = 13; - - /* u[12] only has 2 significant bits */ - z = u[12]; - u[6] ^= (z << 14) ^ (z >> 1); - u[5] ^= (z << 31); - z = u[11]; - u[6] ^= (z >> 18); - u[5] ^= (z << 14) ^ (z >> 1); - u[4] ^= (z << 31); - z = u[10]; - u[5] ^= (z >> 18); - u[4] ^= (z << 14) ^ (z >> 1); - u[3] ^= (z << 31); - z = u[9]; - u[4] ^= (z >> 18); - u[3] ^= (z << 14) ^ (z >> 1); - u[2] ^= (z << 31); - z = u[8]; - u[3] ^= (z >> 18); - u[2] ^= (z << 14) ^ (z >> 1); - u[1] ^= (z << 31); - z = u[7]; - u[2] ^= (z >> 18); - u[1] ^= (z << 14) ^ (z >> 1); - u[0] ^= (z << 31); - z = u[6] >> 1; /* z only has 31 significant bits */ - u[1] ^= (z >> 17); - u[0] ^= (z << 15) ^ z; - /* clear bits above 193 */ - u[12] = u[11] = u[10] = u[9] = u[8] = u[7] = 0; - u[6] ^= z << 1; -#endif - s_mp_clamp(r); - - CLEANUP: - return res; -} - -/* Fast squaring for polynomials over a 193-bit curve. Assumes reduction - * polynomial with terms {193, 15, 0}. */ -mp_err -ec_GF2m_193_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit *u, *v; - - v = MP_DIGITS(a); - -#ifdef ECL_SIXTY_FOUR_BIT - if (MP_USED(a) < 4) { - return mp_bsqrmod(a, meth->irr_arr, r); - } - if (MP_USED(r) < 7) { - MP_CHECKOK(s_mp_pad(r, 7)); - } - MP_USED(r) = 7; -#else - if (MP_USED(a) < 7) { - return mp_bsqrmod(a, meth->irr_arr, r); - } - if (MP_USED(r) < 13) { - MP_CHECKOK(s_mp_pad(r, 13)); - } - MP_USED(r) = 13; -#endif - u = MP_DIGITS(r); - -#ifdef ECL_THIRTY_TWO_BIT - u[12] = gf2m_SQR0(v[6]); - u[11] = gf2m_SQR1(v[5]); - u[10] = gf2m_SQR0(v[5]); - u[9] = gf2m_SQR1(v[4]); - u[8] = gf2m_SQR0(v[4]); - u[7] = gf2m_SQR1(v[3]); -#endif - u[6] = gf2m_SQR0(v[3]); - u[5] = gf2m_SQR1(v[2]); - u[4] = gf2m_SQR0(v[2]); - u[3] = gf2m_SQR1(v[1]); - u[2] = gf2m_SQR0(v[1]); - u[1] = gf2m_SQR1(v[0]); - u[0] = gf2m_SQR0(v[0]); - return ec_GF2m_193_mod(r, r, meth); - - CLEANUP: - return res; -} - -/* Fast multiplication for polynomials over a 193-bit curve. Assumes - * reduction polynomial with terms {193, 15, 0}. */ -mp_err -ec_GF2m_193_mul(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit a3 = 0, a2 = 0, a1 = 0, a0, b3 = 0, b2 = 0, b1 = 0, b0; - -#ifdef ECL_THIRTY_TWO_BIT - mp_digit a6 = 0, a5 = 0, a4 = 0, b6 = 0, b5 = 0, b4 = 0; - mp_digit rm[8]; -#endif - - if (a == b) { - return ec_GF2m_193_sqr(a, r, meth); - } else { - switch (MP_USED(a)) { -#ifdef ECL_THIRTY_TWO_BIT - case 7: - a6 = MP_DIGIT(a, 6); - case 6: - a5 = MP_DIGIT(a, 5); - case 5: - a4 = MP_DIGIT(a, 4); -#endif - case 4: - a3 = MP_DIGIT(a, 3); - case 3: - a2 = MP_DIGIT(a, 2); - case 2: - a1 = MP_DIGIT(a, 1); - default: - a0 = MP_DIGIT(a, 0); - } - switch (MP_USED(b)) { -#ifdef ECL_THIRTY_TWO_BIT - case 7: - b6 = MP_DIGIT(b, 6); - case 6: - b5 = MP_DIGIT(b, 5); - case 5: - b4 = MP_DIGIT(b, 4); -#endif - case 4: - b3 = MP_DIGIT(b, 3); - case 3: - b2 = MP_DIGIT(b, 2); - case 2: - b1 = MP_DIGIT(b, 1); - default: - b0 = MP_DIGIT(b, 0); - } -#ifdef ECL_SIXTY_FOUR_BIT - MP_CHECKOK(s_mp_pad(r, 8)); - s_bmul_4x4(MP_DIGITS(r), a3, a2, a1, a0, b3, b2, b1, b0); - MP_USED(r) = 8; - s_mp_clamp(r); -#else - MP_CHECKOK(s_mp_pad(r, 14)); - s_bmul_3x3(MP_DIGITS(r) + 8, a6, a5, a4, b6, b5, b4); - s_bmul_4x4(MP_DIGITS(r), a3, a2, a1, a0, b3, b2, b1, b0); - s_bmul_4x4(rm, a3, a6 ^ a2, a5 ^ a1, a4 ^ a0, b3, b6 ^ b2, b5 ^ b1, - b4 ^ b0); - rm[7] ^= MP_DIGIT(r, 7); - rm[6] ^= MP_DIGIT(r, 6); - rm[5] ^= MP_DIGIT(r, 5) ^ MP_DIGIT(r, 13); - rm[4] ^= MP_DIGIT(r, 4) ^ MP_DIGIT(r, 12); - rm[3] ^= MP_DIGIT(r, 3) ^ MP_DIGIT(r, 11); - rm[2] ^= MP_DIGIT(r, 2) ^ MP_DIGIT(r, 10); - rm[1] ^= MP_DIGIT(r, 1) ^ MP_DIGIT(r, 9); - rm[0] ^= MP_DIGIT(r, 0) ^ MP_DIGIT(r, 8); - MP_DIGIT(r, 11) ^= rm[7]; - MP_DIGIT(r, 10) ^= rm[6]; - MP_DIGIT(r, 9) ^= rm[5]; - MP_DIGIT(r, 8) ^= rm[4]; - MP_DIGIT(r, 7) ^= rm[3]; - MP_DIGIT(r, 6) ^= rm[2]; - MP_DIGIT(r, 5) ^= rm[1]; - MP_DIGIT(r, 4) ^= rm[0]; - MP_USED(r) = 14; - s_mp_clamp(r); -#endif - return ec_GF2m_193_mod(r, r, meth); - } - - CLEANUP: - return res; -} - -/* Wire in fast field arithmetic for 193-bit curves. */ -mp_err -ec_group_set_gf2m193(ECGroup *group, ECCurveName name) -{ - group->meth->field_mod = &ec_GF2m_193_mod; - group->meth->field_mul = &ec_GF2m_193_mul; - group->meth->field_sqr = &ec_GF2m_193_sqr; - return MP_OKAY; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_233.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_233.c deleted file mode 100644 index 6ba2706ceda..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_233.c +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for binary polynomial field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Sheueling Chang-Shantz <sheueling.chang@sun.com>, - * Stephen Fung <fungstep@hotmail.com>, and - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories. - * - *********************************************************************** */ - -#include "ec2.h" -#include "mp_gf2m.h" -#include "mp_gf2m-priv.h" -#include "mpi.h" -#include "mpi-priv.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -/* Fast reduction for polynomials over a 233-bit curve. Assumes reduction - * polynomial with terms {233, 74, 0}. */ -mp_err -ec_GF2m_233_mod(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit *u, z; - - if (a != r) { - MP_CHECKOK(mp_copy(a, r)); - } -#ifdef ECL_SIXTY_FOUR_BIT - if (MP_USED(r) < 8) { - MP_CHECKOK(s_mp_pad(r, 8)); - } - u = MP_DIGITS(r); - MP_USED(r) = 8; - - /* u[7] only has 18 significant bits */ - z = u[7]; - u[4] ^= (z << 33) ^ (z >> 41); - u[3] ^= (z << 23); - z = u[6]; - u[4] ^= (z >> 31); - u[3] ^= (z << 33) ^ (z >> 41); - u[2] ^= (z << 23); - z = u[5]; - u[3] ^= (z >> 31); - u[2] ^= (z << 33) ^ (z >> 41); - u[1] ^= (z << 23); - z = u[4]; - u[2] ^= (z >> 31); - u[1] ^= (z << 33) ^ (z >> 41); - u[0] ^= (z << 23); - z = u[3] >> 41; /* z only has 23 significant bits */ - u[1] ^= (z << 10); - u[0] ^= z; - /* clear bits above 233 */ - u[7] = u[6] = u[5] = u[4] = 0; - u[3] ^= z << 41; -#else - if (MP_USED(r) < 15) { - MP_CHECKOK(s_mp_pad(r, 15)); - } - u = MP_DIGITS(r); - MP_USED(r) = 15; - - /* u[14] only has 18 significant bits */ - z = u[14]; - u[9] ^= (z << 1); - u[7] ^= (z >> 9); - u[6] ^= (z << 23); - z = u[13]; - u[9] ^= (z >> 31); - u[8] ^= (z << 1); - u[6] ^= (z >> 9); - u[5] ^= (z << 23); - z = u[12]; - u[8] ^= (z >> 31); - u[7] ^= (z << 1); - u[5] ^= (z >> 9); - u[4] ^= (z << 23); - z = u[11]; - u[7] ^= (z >> 31); - u[6] ^= (z << 1); - u[4] ^= (z >> 9); - u[3] ^= (z << 23); - z = u[10]; - u[6] ^= (z >> 31); - u[5] ^= (z << 1); - u[3] ^= (z >> 9); - u[2] ^= (z << 23); - z = u[9]; - u[5] ^= (z >> 31); - u[4] ^= (z << 1); - u[2] ^= (z >> 9); - u[1] ^= (z << 23); - z = u[8]; - u[4] ^= (z >> 31); - u[3] ^= (z << 1); - u[1] ^= (z >> 9); - u[0] ^= (z << 23); - z = u[7] >> 9; /* z only has 23 significant bits */ - u[3] ^= (z >> 22); - u[2] ^= (z << 10); - u[0] ^= z; - /* clear bits above 233 */ - u[14] = u[13] = u[12] = u[11] = u[10] = u[9] = u[8] = 0; - u[7] ^= z << 9; -#endif - s_mp_clamp(r); - - CLEANUP: - return res; -} - -/* Fast squaring for polynomials over a 233-bit curve. Assumes reduction - * polynomial with terms {233, 74, 0}. */ -mp_err -ec_GF2m_233_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit *u, *v; - - v = MP_DIGITS(a); - -#ifdef ECL_SIXTY_FOUR_BIT - if (MP_USED(a) < 4) { - return mp_bsqrmod(a, meth->irr_arr, r); - } - if (MP_USED(r) < 8) { - MP_CHECKOK(s_mp_pad(r, 8)); - } - MP_USED(r) = 8; -#else - if (MP_USED(a) < 8) { - return mp_bsqrmod(a, meth->irr_arr, r); - } - if (MP_USED(r) < 15) { - MP_CHECKOK(s_mp_pad(r, 15)); - } - MP_USED(r) = 15; -#endif - u = MP_DIGITS(r); - -#ifdef ECL_THIRTY_TWO_BIT - u[14] = gf2m_SQR0(v[7]); - u[13] = gf2m_SQR1(v[6]); - u[12] = gf2m_SQR0(v[6]); - u[11] = gf2m_SQR1(v[5]); - u[10] = gf2m_SQR0(v[5]); - u[9] = gf2m_SQR1(v[4]); - u[8] = gf2m_SQR0(v[4]); -#endif - u[7] = gf2m_SQR1(v[3]); - u[6] = gf2m_SQR0(v[3]); - u[5] = gf2m_SQR1(v[2]); - u[4] = gf2m_SQR0(v[2]); - u[3] = gf2m_SQR1(v[1]); - u[2] = gf2m_SQR0(v[1]); - u[1] = gf2m_SQR1(v[0]); - u[0] = gf2m_SQR0(v[0]); - return ec_GF2m_233_mod(r, r, meth); - - CLEANUP: - return res; -} - -/* Fast multiplication for polynomials over a 233-bit curve. Assumes - * reduction polynomial with terms {233, 74, 0}. */ -mp_err -ec_GF2m_233_mul(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit a3 = 0, a2 = 0, a1 = 0, a0, b3 = 0, b2 = 0, b1 = 0, b0; - -#ifdef ECL_THIRTY_TWO_BIT - mp_digit a7 = 0, a6 = 0, a5 = 0, a4 = 0, b7 = 0, b6 = 0, b5 = 0, b4 = - 0; - mp_digit rm[8]; -#endif - - if (a == b) { - return ec_GF2m_233_sqr(a, r, meth); - } else { - switch (MP_USED(a)) { -#ifdef ECL_THIRTY_TWO_BIT - case 8: - a7 = MP_DIGIT(a, 7); - case 7: - a6 = MP_DIGIT(a, 6); - case 6: - a5 = MP_DIGIT(a, 5); - case 5: - a4 = MP_DIGIT(a, 4); -#endif - case 4: - a3 = MP_DIGIT(a, 3); - case 3: - a2 = MP_DIGIT(a, 2); - case 2: - a1 = MP_DIGIT(a, 1); - default: - a0 = MP_DIGIT(a, 0); - } - switch (MP_USED(b)) { -#ifdef ECL_THIRTY_TWO_BIT - case 8: - b7 = MP_DIGIT(b, 7); - case 7: - b6 = MP_DIGIT(b, 6); - case 6: - b5 = MP_DIGIT(b, 5); - case 5: - b4 = MP_DIGIT(b, 4); -#endif - case 4: - b3 = MP_DIGIT(b, 3); - case 3: - b2 = MP_DIGIT(b, 2); - case 2: - b1 = MP_DIGIT(b, 1); - default: - b0 = MP_DIGIT(b, 0); - } -#ifdef ECL_SIXTY_FOUR_BIT - MP_CHECKOK(s_mp_pad(r, 8)); - s_bmul_4x4(MP_DIGITS(r), a3, a2, a1, a0, b3, b2, b1, b0); - MP_USED(r) = 8; - s_mp_clamp(r); -#else - MP_CHECKOK(s_mp_pad(r, 16)); - s_bmul_4x4(MP_DIGITS(r) + 8, a7, a6, a5, a4, b7, b6, b5, b4); - s_bmul_4x4(MP_DIGITS(r), a3, a2, a1, a0, b3, b2, b1, b0); - s_bmul_4x4(rm, a7 ^ a3, a6 ^ a2, a5 ^ a1, a4 ^ a0, b7 ^ b3, - b6 ^ b2, b5 ^ b1, b4 ^ b0); - rm[7] ^= MP_DIGIT(r, 7) ^ MP_DIGIT(r, 15); - rm[6] ^= MP_DIGIT(r, 6) ^ MP_DIGIT(r, 14); - rm[5] ^= MP_DIGIT(r, 5) ^ MP_DIGIT(r, 13); - rm[4] ^= MP_DIGIT(r, 4) ^ MP_DIGIT(r, 12); - rm[3] ^= MP_DIGIT(r, 3) ^ MP_DIGIT(r, 11); - rm[2] ^= MP_DIGIT(r, 2) ^ MP_DIGIT(r, 10); - rm[1] ^= MP_DIGIT(r, 1) ^ MP_DIGIT(r, 9); - rm[0] ^= MP_DIGIT(r, 0) ^ MP_DIGIT(r, 8); - MP_DIGIT(r, 11) ^= rm[7]; - MP_DIGIT(r, 10) ^= rm[6]; - MP_DIGIT(r, 9) ^= rm[5]; - MP_DIGIT(r, 8) ^= rm[4]; - MP_DIGIT(r, 7) ^= rm[3]; - MP_DIGIT(r, 6) ^= rm[2]; - MP_DIGIT(r, 5) ^= rm[1]; - MP_DIGIT(r, 4) ^= rm[0]; - MP_USED(r) = 16; - s_mp_clamp(r); -#endif - return ec_GF2m_233_mod(r, r, meth); - } - - CLEANUP: - return res; -} - -/* Wire in fast field arithmetic for 233-bit curves. */ -mp_err -ec_group_set_gf2m233(ECGroup *group, ECCurveName name) -{ - group->meth->field_mod = &ec_GF2m_233_mod; - group->meth->field_mul = &ec_GF2m_233_mul; - group->meth->field_sqr = &ec_GF2m_233_sqr; - return MP_OKAY; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_aff.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_aff.c deleted file mode 100644 index 8d0f5460f6a..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_aff.c +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for binary polynomial field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - * Last Modified Date from the Original Code: May 2017 - *********************************************************************** */ - -#include "ec2.h" -#include "mplogic.h" -#include "mp_gf2m.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -/* Checks if point P(px, py) is at infinity. Uses affine coordinates. */ -mp_err -ec_GF2m_pt_is_inf_aff(const mp_int *px, const mp_int *py) -{ - - if ((mp_cmp_z(px) == 0) && (mp_cmp_z(py) == 0)) { - return MP_YES; - } else { - return MP_NO; - } - -} - -/* Sets P(px, py) to be the point at infinity. Uses affine coordinates. */ -mp_err -ec_GF2m_pt_set_inf_aff(mp_int *px, mp_int *py) -{ - mp_zero(px); - mp_zero(py); - return MP_OKAY; -} - -/* Computes R = P + Q based on IEEE P1363 A.10.2. Elliptic curve points P, - * Q, and R can all be identical. Uses affine coordinates. */ -mp_err -ec_GF2m_pt_add_aff(const mp_int *px, const mp_int *py, const mp_int *qx, - const mp_int *qy, mp_int *rx, mp_int *ry, - const ECGroup *group) -{ - mp_err res = MP_OKAY; - mp_int lambda, tempx, tempy; - - MP_DIGITS(&lambda) = 0; - MP_DIGITS(&tempx) = 0; - MP_DIGITS(&tempy) = 0; - MP_CHECKOK(mp_init(&lambda, FLAG(px))); - MP_CHECKOK(mp_init(&tempx, FLAG(px))); - MP_CHECKOK(mp_init(&tempy, FLAG(px))); - /* if P = inf, then R = Q */ - if (ec_GF2m_pt_is_inf_aff(px, py) == 0) { - MP_CHECKOK(mp_copy(qx, rx)); - MP_CHECKOK(mp_copy(qy, ry)); - res = MP_OKAY; - goto CLEANUP; - } - /* if Q = inf, then R = P */ - if (ec_GF2m_pt_is_inf_aff(qx, qy) == 0) { - MP_CHECKOK(mp_copy(px, rx)); - MP_CHECKOK(mp_copy(py, ry)); - res = MP_OKAY; - goto CLEANUP; - } - /* if px != qx, then lambda = (py+qy) / (px+qx), tempx = a + lambda^2 - * + lambda + px + qx */ - if (mp_cmp(px, qx) != 0) { - MP_CHECKOK(group->meth->field_add(py, qy, &tempy, group->meth)); - MP_CHECKOK(group->meth->field_add(px, qx, &tempx, group->meth)); - MP_CHECKOK(group->meth-> - field_div(&tempy, &tempx, &lambda, group->meth)); - MP_CHECKOK(group->meth->field_sqr(&lambda, &tempx, group->meth)); - MP_CHECKOK(group->meth-> - field_add(&tempx, &lambda, &tempx, group->meth)); - MP_CHECKOK(group->meth-> - field_add(&tempx, &group->curvea, &tempx, group->meth)); - MP_CHECKOK(group->meth-> - field_add(&tempx, px, &tempx, group->meth)); - MP_CHECKOK(group->meth-> - field_add(&tempx, qx, &tempx, group->meth)); - } else { - /* if py != qy or qx = 0, then R = inf */ - if (((mp_cmp(py, qy) != 0)) || (mp_cmp_z(qx) == 0)) { - mp_zero(rx); - mp_zero(ry); - res = MP_OKAY; - goto CLEANUP; - } - /* lambda = qx + qy / qx */ - MP_CHECKOK(group->meth->field_div(qy, qx, &lambda, group->meth)); - MP_CHECKOK(group->meth-> - field_add(&lambda, qx, &lambda, group->meth)); - /* tempx = a + lambda^2 + lambda */ - MP_CHECKOK(group->meth->field_sqr(&lambda, &tempx, group->meth)); - MP_CHECKOK(group->meth-> - field_add(&tempx, &lambda, &tempx, group->meth)); - MP_CHECKOK(group->meth-> - field_add(&tempx, &group->curvea, &tempx, group->meth)); - } - /* ry = (qx + tempx) * lambda + tempx + qy */ - MP_CHECKOK(group->meth->field_add(qx, &tempx, &tempy, group->meth)); - MP_CHECKOK(group->meth-> - field_mul(&tempy, &lambda, &tempy, group->meth)); - MP_CHECKOK(group->meth-> - field_add(&tempy, &tempx, &tempy, group->meth)); - MP_CHECKOK(group->meth->field_add(&tempy, qy, ry, group->meth)); - /* rx = tempx */ - MP_CHECKOK(mp_copy(&tempx, rx)); - - CLEANUP: - mp_clear(&lambda); - mp_clear(&tempx); - mp_clear(&tempy); - return res; -} - -/* Computes R = P - Q. Elliptic curve points P, Q, and R can all be - * identical. Uses affine coordinates. */ -mp_err -ec_GF2m_pt_sub_aff(const mp_int *px, const mp_int *py, const mp_int *qx, - const mp_int *qy, mp_int *rx, mp_int *ry, - const ECGroup *group) -{ - mp_err res = MP_OKAY; - mp_int nqy; - - MP_DIGITS(&nqy) = 0; - MP_CHECKOK(mp_init(&nqy, FLAG(px))); - /* nqy = qx+qy */ - MP_CHECKOK(group->meth->field_add(qx, qy, &nqy, group->meth)); - MP_CHECKOK(group->point_add(px, py, qx, &nqy, rx, ry, group)); - CLEANUP: - mp_clear(&nqy); - return res; -} - -/* Computes R = 2P. Elliptic curve points P and R can be identical. Uses - * affine coordinates. */ -mp_err -ec_GF2m_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx, - mp_int *ry, const ECGroup *group) -{ - return group->point_add(px, py, px, py, rx, ry, group); -} - -/* by default, this routine is unused and thus doesn't need to be compiled */ -#ifdef ECL_ENABLE_GF2M_PT_MUL_AFF -/* Computes R = nP based on IEEE P1363 A.10.3. Elliptic curve points P and - * R can be identical. Uses affine coordinates. */ -mp_err -ec_GF2m_pt_mul_aff(const mp_int *n, const mp_int *px, const mp_int *py, - mp_int *rx, mp_int *ry, const ECGroup *group) -{ - mp_err res = MP_OKAY; - mp_int k, k3, qx, qy, sx, sy; - int b1, b3, i, l; - - MP_DIGITS(&k) = 0; - MP_DIGITS(&k3) = 0; - MP_DIGITS(&qx) = 0; - MP_DIGITS(&qy) = 0; - MP_DIGITS(&sx) = 0; - MP_DIGITS(&sy) = 0; - MP_CHECKOK(mp_init(&k)); - MP_CHECKOK(mp_init(&k3)); - MP_CHECKOK(mp_init(&qx)); - MP_CHECKOK(mp_init(&qy)); - MP_CHECKOK(mp_init(&sx)); - MP_CHECKOK(mp_init(&sy)); - - /* if n = 0 then r = inf */ - if (mp_cmp_z(n) == 0) { - mp_zero(rx); - mp_zero(ry); - res = MP_OKAY; - goto CLEANUP; - } - /* Q = P, k = n */ - MP_CHECKOK(mp_copy(px, &qx)); - MP_CHECKOK(mp_copy(py, &qy)); - MP_CHECKOK(mp_copy(n, &k)); - /* if n < 0 then Q = -Q, k = -k */ - if (mp_cmp_z(n) < 0) { - MP_CHECKOK(group->meth->field_add(&qx, &qy, &qy, group->meth)); - MP_CHECKOK(mp_neg(&k, &k)); - } -#ifdef ECL_DEBUG /* basic double and add method */ - l = mpl_significant_bits(&k) - 1; - MP_CHECKOK(mp_copy(&qx, &sx)); - MP_CHECKOK(mp_copy(&qy, &sy)); - for (i = l - 1; i >= 0; i--) { - /* S = 2S */ - MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group)); - /* if k_i = 1, then S = S + Q */ - if (mpl_get_bit(&k, i) != 0) { - MP_CHECKOK(group-> - point_add(&sx, &sy, &qx, &qy, &sx, &sy, group)); - } - } -#else /* double and add/subtract method from - * standard */ - /* k3 = 3 * k */ - MP_CHECKOK(mp_set_int(&k3, 3)); - MP_CHECKOK(mp_mul(&k, &k3, &k3)); - /* S = Q */ - MP_CHECKOK(mp_copy(&qx, &sx)); - MP_CHECKOK(mp_copy(&qy, &sy)); - /* l = index of high order bit in binary representation of 3*k */ - l = mpl_significant_bits(&k3) - 1; - /* for i = l-1 downto 1 */ - for (i = l - 1; i >= 1; i--) { - /* S = 2S */ - MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group)); - b3 = MP_GET_BIT(&k3, i); - b1 = MP_GET_BIT(&k, i); - /* if k3_i = 1 and k_i = 0, then S = S + Q */ - if ((b3 == 1) && (b1 == 0)) { - MP_CHECKOK(group-> - point_add(&sx, &sy, &qx, &qy, &sx, &sy, group)); - /* if k3_i = 0 and k_i = 1, then S = S - Q */ - } else if ((b3 == 0) && (b1 == 1)) { - MP_CHECKOK(group-> - point_sub(&sx, &sy, &qx, &qy, &sx, &sy, group)); - } - } -#endif - /* output S */ - MP_CHECKOK(mp_copy(&sx, rx)); - MP_CHECKOK(mp_copy(&sy, ry)); - - CLEANUP: - mp_clear(&k); - mp_clear(&k3); - mp_clear(&qx); - mp_clear(&qy); - mp_clear(&sx); - mp_clear(&sy); - return res; -} -#endif - -/* Validates a point on a GF2m curve. */ -mp_err -ec_GF2m_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group) -{ - mp_err res = MP_NO; - mp_int accl, accr, tmp, pxt, pyt; - - MP_DIGITS(&accl) = 0; - MP_DIGITS(&accr) = 0; - MP_DIGITS(&tmp) = 0; - MP_DIGITS(&pxt) = 0; - MP_DIGITS(&pyt) = 0; - MP_CHECKOK(mp_init(&accl, FLAG(px))); - MP_CHECKOK(mp_init(&accr, FLAG(px))); - MP_CHECKOK(mp_init(&tmp, FLAG(px))); - MP_CHECKOK(mp_init(&pxt, FLAG(px))); - MP_CHECKOK(mp_init(&pyt, FLAG(px))); - - /* 1: Verify that publicValue is not the point at infinity */ - if (ec_GF2m_pt_is_inf_aff(px, py) == MP_YES) { - res = MP_NO; - goto CLEANUP; - } - /* 2: Verify that the coordinates of publicValue are elements - * of the field. - */ - if ((MP_SIGN(px) == MP_NEG) || (mp_cmp(px, &group->meth->irr) >= 0) || - (MP_SIGN(py) == MP_NEG) || (mp_cmp(py, &group->meth->irr) >= 0)) { - res = MP_NO; - goto CLEANUP; - } - /* 3: Verify that publicValue is on the curve. */ - if (group->meth->field_enc) { - group->meth->field_enc(px, &pxt, group->meth); - group->meth->field_enc(py, &pyt, group->meth); - } else { - mp_copy(px, &pxt); - mp_copy(py, &pyt); - } - /* left-hand side: y^2 + x*y */ - MP_CHECKOK( group->meth->field_sqr(&pyt, &accl, group->meth) ); - MP_CHECKOK( group->meth->field_mul(&pxt, &pyt, &tmp, group->meth) ); - MP_CHECKOK( group->meth->field_add(&accl, &tmp, &accl, group->meth) ); - /* right-hand side: x^3 + a*x^2 + b */ - MP_CHECKOK( group->meth->field_sqr(&pxt, &tmp, group->meth) ); - MP_CHECKOK( group->meth->field_mul(&pxt, &tmp, &accr, group->meth) ); - MP_CHECKOK( group->meth->field_mul(&group->curvea, &tmp, &tmp, group->meth) ); - MP_CHECKOK( group->meth->field_add(&tmp, &accr, &accr, group->meth) ); - MP_CHECKOK( group->meth->field_add(&accr, &group->curveb, &accr, group->meth) ); - /* check LHS - RHS == 0 */ - MP_CHECKOK( group->meth->field_add(&accl, &accr, &accr, group->meth) ); - if (mp_cmp_z(&accr) != 0) { - res = MP_NO; - goto CLEANUP; - } - /* 4: Verify that the order of the curve times the publicValue - * is the point at infinity. - */ - /* timing mitigation is not supported */ - MP_CHECKOK( ECPoint_mul(group, &group->order, px, py, &pxt, &pyt, /*timing*/ 0) ); - if (ec_GF2m_pt_is_inf_aff(&pxt, &pyt) != MP_YES) { - res = MP_NO; - goto CLEANUP; - } - - res = MP_YES; - -CLEANUP: - mp_clear(&accl); - mp_clear(&accr); - mp_clear(&tmp); - mp_clear(&pxt); - mp_clear(&pyt); - return res; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_mont.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_mont.c deleted file mode 100644 index bb605536f0f..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ec2_mont.c +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for binary polynomial field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Sheueling Chang-Shantz <sheueling.chang@sun.com>, - * Stephen Fung <fungstep@hotmail.com>, and - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories. - * - * Last Modified Date from the Original Code: May 2017 - *********************************************************************** */ - -#include "ec2.h" -#include "mplogic.h" -#include "mp_gf2m.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -/* Compute the x-coordinate x/z for the point 2*(x/z) in Montgomery - * projective coordinates. Uses algorithm Mdouble in appendix of Lopez, J. - * and Dahab, R. "Fast multiplication on elliptic curves over GF(2^m) - * without precomputation". modified to not require precomputation of - * c=b^{2^{m-1}}. */ -static mp_err -gf2m_Mdouble(mp_int *x, mp_int *z, const ECGroup *group, int kmflag) -{ - mp_err res = MP_OKAY; - mp_int t1; - - MP_DIGITS(&t1) = 0; - MP_CHECKOK(mp_init(&t1, kmflag)); - - MP_CHECKOK(group->meth->field_sqr(x, x, group->meth)); - MP_CHECKOK(group->meth->field_sqr(z, &t1, group->meth)); - MP_CHECKOK(group->meth->field_mul(x, &t1, z, group->meth)); - MP_CHECKOK(group->meth->field_sqr(x, x, group->meth)); - MP_CHECKOK(group->meth->field_sqr(&t1, &t1, group->meth)); - MP_CHECKOK(group->meth-> - field_mul(&group->curveb, &t1, &t1, group->meth)); - MP_CHECKOK(group->meth->field_add(x, &t1, x, group->meth)); - - CLEANUP: - mp_clear(&t1); - return res; -} - -/* Compute the x-coordinate x1/z1 for the point (x1/z1)+(x2/x2) in - * Montgomery projective coordinates. Uses algorithm Madd in appendix of - * Lopex, J. and Dahab, R. "Fast multiplication on elliptic curves over - * GF(2^m) without precomputation". */ -static mp_err -gf2m_Madd(const mp_int *x, mp_int *x1, mp_int *z1, mp_int *x2, mp_int *z2, - const ECGroup *group, int kmflag) -{ - mp_err res = MP_OKAY; - mp_int t1, t2; - - MP_DIGITS(&t1) = 0; - MP_DIGITS(&t2) = 0; - MP_CHECKOK(mp_init(&t1, kmflag)); - MP_CHECKOK(mp_init(&t2, kmflag)); - - MP_CHECKOK(mp_copy(x, &t1)); - MP_CHECKOK(group->meth->field_mul(x1, z2, x1, group->meth)); - MP_CHECKOK(group->meth->field_mul(z1, x2, z1, group->meth)); - MP_CHECKOK(group->meth->field_mul(x1, z1, &t2, group->meth)); - MP_CHECKOK(group->meth->field_add(z1, x1, z1, group->meth)); - MP_CHECKOK(group->meth->field_sqr(z1, z1, group->meth)); - MP_CHECKOK(group->meth->field_mul(z1, &t1, x1, group->meth)); - MP_CHECKOK(group->meth->field_add(x1, &t2, x1, group->meth)); - - CLEANUP: - mp_clear(&t1); - mp_clear(&t2); - return res; -} - -/* Compute the x, y affine coordinates from the point (x1, z1) (x2, z2) - * using Montgomery point multiplication algorithm Mxy() in appendix of - * Lopex, J. and Dahab, R. "Fast multiplication on elliptic curves over - * GF(2^m) without precomputation". Returns: 0 on error 1 if return value - * should be the point at infinity 2 otherwise */ -static int -gf2m_Mxy(const mp_int *x, const mp_int *y, mp_int *x1, mp_int *z1, - mp_int *x2, mp_int *z2, const ECGroup *group) -{ - mp_err res = MP_OKAY; - int ret = 0; - mp_int t3, t4, t5; - - MP_DIGITS(&t3) = 0; - MP_DIGITS(&t4) = 0; - MP_DIGITS(&t5) = 0; - MP_CHECKOK(mp_init(&t3, FLAG(x2))); - MP_CHECKOK(mp_init(&t4, FLAG(x2))); - MP_CHECKOK(mp_init(&t5, FLAG(x2))); - - if (mp_cmp_z(z1) == 0) { - mp_zero(x2); - mp_zero(z2); - ret = 1; - goto CLEANUP; - } - - if (mp_cmp_z(z2) == 0) { - MP_CHECKOK(mp_copy(x, x2)); - MP_CHECKOK(group->meth->field_add(x, y, z2, group->meth)); - ret = 2; - goto CLEANUP; - } - - MP_CHECKOK(mp_set_int(&t5, 1)); - if (group->meth->field_enc) { - MP_CHECKOK(group->meth->field_enc(&t5, &t5, group->meth)); - } - - MP_CHECKOK(group->meth->field_mul(z1, z2, &t3, group->meth)); - - MP_CHECKOK(group->meth->field_mul(z1, x, z1, group->meth)); - MP_CHECKOK(group->meth->field_add(z1, x1, z1, group->meth)); - MP_CHECKOK(group->meth->field_mul(z2, x, z2, group->meth)); - MP_CHECKOK(group->meth->field_mul(z2, x1, x1, group->meth)); - MP_CHECKOK(group->meth->field_add(z2, x2, z2, group->meth)); - - MP_CHECKOK(group->meth->field_mul(z2, z1, z2, group->meth)); - MP_CHECKOK(group->meth->field_sqr(x, &t4, group->meth)); - MP_CHECKOK(group->meth->field_add(&t4, y, &t4, group->meth)); - MP_CHECKOK(group->meth->field_mul(&t4, &t3, &t4, group->meth)); - MP_CHECKOK(group->meth->field_add(&t4, z2, &t4, group->meth)); - - MP_CHECKOK(group->meth->field_mul(&t3, x, &t3, group->meth)); - MP_CHECKOK(group->meth->field_div(&t5, &t3, &t3, group->meth)); - MP_CHECKOK(group->meth->field_mul(&t3, &t4, &t4, group->meth)); - MP_CHECKOK(group->meth->field_mul(x1, &t3, x2, group->meth)); - MP_CHECKOK(group->meth->field_add(x2, x, z2, group->meth)); - - MP_CHECKOK(group->meth->field_mul(z2, &t4, z2, group->meth)); - MP_CHECKOK(group->meth->field_add(z2, y, z2, group->meth)); - - ret = 2; - - CLEANUP: - mp_clear(&t3); - mp_clear(&t4); - mp_clear(&t5); - if (res == MP_OKAY) { - return ret; - } else { - return 0; - } -} - -/* Computes R = nP based on algorithm 2P of Lopex, J. and Dahab, R. "Fast - * multiplication on elliptic curves over GF(2^m) without - * precomputation". Elliptic curve points P and R can be identical. Uses - * Montgomery projective coordinates. The timing parameter is ignored - * because this algorithm resists timing attacks by default. */ -mp_err -ec_GF2m_pt_mul_mont(const mp_int *n, const mp_int *px, const mp_int *py, - mp_int *rx, mp_int *ry, const ECGroup *group, - int timing) -{ - mp_err res = MP_OKAY; - mp_int x1, x2, z1, z2; - int i, j; - mp_digit top_bit, mask; - - MP_DIGITS(&x1) = 0; - MP_DIGITS(&x2) = 0; - MP_DIGITS(&z1) = 0; - MP_DIGITS(&z2) = 0; - MP_CHECKOK(mp_init(&x1, FLAG(n))); - MP_CHECKOK(mp_init(&x2, FLAG(n))); - MP_CHECKOK(mp_init(&z1, FLAG(n))); - MP_CHECKOK(mp_init(&z2, FLAG(n))); - - /* if result should be point at infinity */ - if ((mp_cmp_z(n) == 0) || (ec_GF2m_pt_is_inf_aff(px, py) == MP_YES)) { - MP_CHECKOK(ec_GF2m_pt_set_inf_aff(rx, ry)); - goto CLEANUP; - } - - MP_CHECKOK(mp_copy(px, &x1)); /* x1 = px */ - MP_CHECKOK(mp_set_int(&z1, 1)); /* z1 = 1 */ - MP_CHECKOK(group->meth->field_sqr(&x1, &z2, group->meth)); /* z2 = - * x1^2 = - * px^2 */ - MP_CHECKOK(group->meth->field_sqr(&z2, &x2, group->meth)); - MP_CHECKOK(group->meth->field_add(&x2, &group->curveb, &x2, group->meth)); /* x2 - * = - * px^4 - * + - * b - */ - - /* find top-most bit and go one past it */ - i = MP_USED(n) - 1; - j = MP_DIGIT_BIT - 1; - top_bit = 1; - top_bit <<= MP_DIGIT_BIT - 1; - mask = top_bit; - while (!(MP_DIGITS(n)[i] & mask)) { - mask >>= 1; - j--; - } - mask >>= 1; - j--; - - /* if top most bit was at word break, go to next word */ - if (!mask) { - i--; - j = MP_DIGIT_BIT - 1; - mask = top_bit; - } - - for (; i >= 0; i--) { - for (; j >= 0; j--) { - if (MP_DIGITS(n)[i] & mask) { - MP_CHECKOK(gf2m_Madd(px, &x1, &z1, &x2, &z2, group, FLAG(n))); - MP_CHECKOK(gf2m_Mdouble(&x2, &z2, group, FLAG(n))); - } else { - MP_CHECKOK(gf2m_Madd(px, &x2, &z2, &x1, &z1, group, FLAG(n))); - MP_CHECKOK(gf2m_Mdouble(&x1, &z1, group, FLAG(n))); - } - mask >>= 1; - } - j = MP_DIGIT_BIT - 1; - mask = top_bit; - } - - /* convert out of "projective" coordinates */ - i = gf2m_Mxy(px, py, &x1, &z1, &x2, &z2, group); - if (i == 0) { - res = MP_BADARG; - goto CLEANUP; - } else if (i == 1) { - MP_CHECKOK(ec_GF2m_pt_set_inf_aff(rx, ry)); - } else { - MP_CHECKOK(mp_copy(&x2, rx)); - MP_CHECKOK(mp_copy(&z2, ry)); - } - - CLEANUP: - mp_clear(&x1); - mp_clear(&x2); - mp_clear(&z1); - mp_clear(&z2); - return res; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ec_naf.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ec_naf.c deleted file mode 100644 index bb26a026428..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ec_naf.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Stephen Fung <fungstep@hotmail.com>, Sun Microsystems Laboratories - * - *********************************************************************** */ - -#include "ecl-priv.h" - -/* Returns 2^e as an integer. This is meant to be used for small powers of - * two. */ -int -ec_twoTo(int e) -{ - int a = 1; - int i; - - for (i = 0; i < e; i++) { - a *= 2; - } - return a; -} - -/* Computes the windowed non-adjacent-form (NAF) of a scalar. Out should - * be an array of signed char's to output to, bitsize should be the number - * of bits of out, in is the original scalar, and w is the window size. - * NAF is discussed in the paper: D. Hankerson, J. Hernandez and A. - * Menezes, "Software implementation of elliptic curve cryptography over - * binary fields", Proc. CHES 2000. */ -mp_err -ec_compute_wNAF(signed char *out, int bitsize, const mp_int *in, int w) -{ - mp_int k; - mp_err res = MP_OKAY; - int i, twowm1, mask; - - twowm1 = ec_twoTo(w - 1); - mask = 2 * twowm1 - 1; - - MP_DIGITS(&k) = 0; - MP_CHECKOK(mp_init_copy(&k, in)); - - i = 0; - /* Compute wNAF form */ - while (mp_cmp_z(&k) > 0) { - if (mp_isodd(&k)) { - out[i] = MP_DIGIT(&k, 0) & mask; - if (out[i] >= twowm1) - out[i] -= 2 * twowm1; - - /* Subtract off out[i]. Note mp_sub_d only works with - * unsigned digits */ - if (out[i] >= 0) { - mp_sub_d(&k, out[i], &k); - } else { - mp_add_d(&k, -(out[i]), &k); - } - } else { - out[i] = 0; - } - mp_div_2(&k, &k); - i++; - } - /* Zero out the remaining elements of the out array. */ - for (; i < bitsize + 1; i++) { - out[i] = 0; - } - CLEANUP: - mp_clear(&k); - return res; - -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecc_impl.h b/src/jdk.crypto.ec/share/native/libsunec/impl/ecc_impl.h deleted file mode 100644 index 48aa13a4b00..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecc_impl.h +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1994-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Dr Vipul Gupta <vipul.gupta@sun.com> and - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - * Last Modified Date from the Original Code: May 2017 - *********************************************************************** */ - -#ifndef _ECC_IMPL_H -#define _ECC_IMPL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <sys/types.h> -#include "ecl-exp.h" - -/* - * Multi-platform definitions - */ -#ifdef __linux__ -#define B_FALSE FALSE -#define B_TRUE TRUE -typedef unsigned char uint8_t; -typedef unsigned long ulong_t; -typedef enum { B_FALSE, B_TRUE } boolean_t; -#endif /* __linux__ */ - -#ifdef _ALLBSD_SOURCE -#include <stdint.h> -#define B_FALSE FALSE -#define B_TRUE TRUE -typedef unsigned long ulong_t; -typedef enum boolean { B_FALSE, B_TRUE } boolean_t; -#endif /* _ALLBSD_SOURCE */ - -#ifdef AIX -#define B_FALSE FALSE -#define B_TRUE TRUE -typedef unsigned char uint8_t; -typedef unsigned long ulong_t; -#endif /* AIX */ - -#ifdef _WIN32 -typedef unsigned char uint8_t; -typedef unsigned long ulong_t; -typedef enum boolean { B_FALSE, B_TRUE } boolean_t; -#define strdup _strdup /* Replace POSIX name with ISO C++ name */ -#endif /* _WIN32 */ - -#ifndef _KERNEL -#include <stdlib.h> -#endif /* _KERNEL */ - -#define EC_MAX_DIGEST_LEN 1024 /* max digest that can be signed */ -#define EC_MAX_POINT_LEN 145 /* max len of DER encoded Q */ -#define EC_MAX_VALUE_LEN 72 /* max len of ANSI X9.62 private value d */ -#define EC_MAX_SIG_LEN 144 /* max signature len for supported curves */ -#define EC_MIN_KEY_LEN 112 /* min key length in bits */ -#define EC_MAX_KEY_LEN 571 /* max key length in bits */ -#define EC_MAX_OID_LEN 10 /* max length of OID buffer */ - -/* - * Various structures and definitions from NSS are here. - */ - -#ifdef _KERNEL -#define PORT_ArenaAlloc(a, n, f) kmem_alloc((n), (f)) -#define PORT_ArenaZAlloc(a, n, f) kmem_zalloc((n), (f)) -#define PORT_ArenaGrow(a, b, c, d) NULL -#define PORT_ZAlloc(n, f) kmem_zalloc((n), (f)) -#define PORT_Alloc(n, f) kmem_alloc((n), (f)) -#else -#define PORT_ArenaAlloc(a, n, f) malloc((n)) -#define PORT_ArenaZAlloc(a, n, f) calloc(1, (n)) -#define PORT_ArenaGrow(a, b, c, d) NULL -#define PORT_ZAlloc(n, f) calloc(1, (n)) -#define PORT_Alloc(n, f) malloc((n)) -#endif - -#define PORT_NewArena(b) (char *)12345 -#define PORT_ArenaMark(a) NULL -#define PORT_ArenaUnmark(a, b) -#define PORT_ArenaRelease(a, m) -#define PORT_FreeArena(a, b) -#define PORT_Strlen(s) strlen((s)) -#define PORT_SetError(e) - -#define PRBool boolean_t -#define PR_TRUE B_TRUE -#define PR_FALSE B_FALSE - -#ifdef _KERNEL -#define PORT_Assert ASSERT -#define PORT_Memcpy(t, f, l) bcopy((f), (t), (l)) -#else -#define PORT_Assert assert -#define PORT_Memcpy(t, f, l) memcpy((t), (f), (l)) -#endif - -#define CHECK_OK(func) if (func == NULL) goto cleanup -#define CHECK_SEC_OK(func) if (SECSuccess != (rv = func)) goto cleanup - -typedef enum { - siBuffer = 0, - siClearDataBuffer = 1, - siCipherDataBuffer = 2, - siDERCertBuffer = 3, - siEncodedCertBuffer = 4, - siDERNameBuffer = 5, - siEncodedNameBuffer = 6, - siAsciiNameString = 7, - siAsciiString = 8, - siDEROID = 9, - siUnsignedInteger = 10, - siUTCTime = 11, - siGeneralizedTime = 12 -} SECItemType; - -typedef struct SECItemStr SECItem; - -struct SECItemStr { - SECItemType type; - unsigned char *data; - unsigned int len; -}; - -typedef SECItem SECKEYECParams; - -typedef enum { ec_params_explicit, - ec_params_named -} ECParamsType; - -typedef enum { ec_field_GFp = 1, - ec_field_GF2m -} ECFieldType; - -struct ECFieldIDStr { - int size; /* field size in bits */ - ECFieldType type; - union { - SECItem prime; /* prime p for (GFp) */ - SECItem poly; /* irreducible binary polynomial for (GF2m) */ - } u; - int k1; /* first coefficient of pentanomial or - * the only coefficient of trinomial - */ - int k2; /* two remaining coefficients of pentanomial */ - int k3; -}; -typedef struct ECFieldIDStr ECFieldID; - -struct ECCurveStr { - SECItem a; /* contains octet stream encoding of - * field element (X9.62 section 4.3.3) - */ - SECItem b; - SECItem seed; -}; -typedef struct ECCurveStr ECCurve; - -typedef void PRArenaPool; - -struct ECParamsStr { - PRArenaPool * arena; - ECParamsType type; - ECFieldID fieldID; - ECCurve curve; - SECItem base; - SECItem order; - int cofactor; - SECItem DEREncoding; - ECCurveName name; - SECItem curveOID; -}; -typedef struct ECParamsStr ECParams; - -struct ECPublicKeyStr { - ECParams ecParams; - SECItem publicValue; /* elliptic curve point encoded as - * octet stream. - */ -}; -typedef struct ECPublicKeyStr ECPublicKey; - -struct ECPrivateKeyStr { - ECParams ecParams; - SECItem publicValue; /* encoded ec point */ - SECItem privateValue; /* private big integer */ - SECItem version; /* As per SEC 1, Appendix C, Section C.4 */ -}; -typedef struct ECPrivateKeyStr ECPrivateKey; - -typedef enum _SECStatus { - SECBufferTooSmall = -3, - SECWouldBlock = -2, - SECFailure = -1, - SECSuccess = 0 -} SECStatus; - -#ifdef _KERNEL -#define RNG_GenerateGlobalRandomBytes(p,l) ecc_knzero_random_generator((p), (l)) -#else -/* - This function is no longer required because the random bytes are now - supplied by the caller. Force a failure. -*/ -#define RNG_GenerateGlobalRandomBytes(p,l) SECFailure -#endif -#define CHECK_MPI_OK(func) if (MP_OKAY > (err = func)) goto cleanup -#define MP_TO_SEC_ERROR(err) - -#define SECITEM_TO_MPINT(it, mp) \ - CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len)) - -extern int ecc_knzero_random_generator(uint8_t *, size_t); -extern ulong_t soft_nzero_random_generator(uint8_t *, ulong_t); - -extern SECStatus EC_DecodeParams(const SECItem *, ECParams **, int); -extern SECItem * SECITEM_AllocItem(PRArenaPool *, SECItem *, unsigned int, int); -extern SECStatus SECITEM_CopyItem(PRArenaPool *, SECItem *, const SECItem *, - int); -extern void SECITEM_FreeItem(SECItem *, boolean_t); -/* This function has been modified to accept an array of random bytes */ -extern SECStatus EC_NewKey(ECParams *ecParams, ECPrivateKey **privKey, - const unsigned char* random, int randomlen, int); -/* This function has been modified to accept an array of random bytes */ -extern SECStatus ECDSA_SignDigest(ECPrivateKey *, SECItem *, const SECItem *, - const unsigned char* random, int randomlen, int, int timing); -extern SECStatus ECDSA_VerifyDigest(ECPublicKey *, const SECItem *, - const SECItem *, int); -extern SECStatus ECDH_Derive(SECItem *, ECParams *, SECItem *, boolean_t, - SECItem *, int); - -#ifdef __cplusplus -} -#endif - -#endif /* _ECC_IMPL_H */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecdecode.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecdecode.c deleted file mode 100644 index 7667ac32152..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecdecode.c +++ /dev/null @@ -1,642 +0,0 @@ -/* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the Elliptic Curve Cryptography library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Dr Vipul Gupta <vipul.gupta@sun.com> and - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - * Last Modified Date from the Original Code: Nov 2016 - *********************************************************************** */ - -#include <sys/types.h> - -#ifndef _WIN32 -#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) -#include <sys/systm.h> -#endif /* __linux__ || _ALLBSD_SOURCE */ -#include <sys/param.h> -#endif /* _WIN32 */ - -#ifdef _KERNEL -#include <sys/kmem.h> -#else -#include <stdio.h> -#include <string.h> -#endif -#include "ec.h" -#include "ecl-curve.h" -#include "ecc_impl.h" - -#define MAX_ECKEY_LEN 72 -#define SEC_ASN1_OBJECT_ID 0x06 - -/* - * Initializes a SECItem from a hexadecimal string - * - * Warning: This function ignores leading 00's, so any leading 00's - * in the hexadecimal string must be optional. - */ -static SECItem * -hexString2SECItem(PRArenaPool *arena, SECItem *item, const char *str, - int kmflag) -{ - int i = 0; - int byteval = 0; - int tmp = (int)strlen(str); - - if ((tmp % 2) != 0) return NULL; - - /* skip leading 00's unless the hex string is "00" */ - while ((tmp > 2) && (str[0] == '0') && (str[1] == '0')) { - str += 2; - tmp -= 2; - } - - item->data = (unsigned char *) PORT_ArenaAlloc(arena, tmp/2, kmflag); - if (item->data == NULL) return NULL; - item->len = tmp/2; - - while (str[i]) { - if ((str[i] >= '0') && (str[i] <= '9')) - tmp = str[i] - '0'; - else if ((str[i] >= 'a') && (str[i] <= 'f')) - tmp = str[i] - 'a' + 10; - else if ((str[i] >= 'A') && (str[i] <= 'F')) - tmp = str[i] - 'A' + 10; - else - return NULL; - - byteval = byteval * 16 + tmp; - if ((i % 2) != 0) { - item->data[i/2] = byteval; - byteval = 0; - } - i++; - } - - return item; -} - -static SECStatus -gf_populate_params(ECCurveName name, ECFieldType field_type, ECParams *params, - int kmflag) -{ - SECStatus rv = SECFailure; - const ECCurveParams *curveParams; - /* 2 ['0'+'4'] + MAX_ECKEY_LEN * 2 [x,y] * 2 [hex string] + 1 ['\0'] */ - char genenc[3 + 2 * 2 * MAX_ECKEY_LEN]; - - if (((int)name < ECCurve_noName) || (name > ECCurve_pastLastCurve)) - goto cleanup; - params->name = name; - curveParams = ecCurve_map[params->name]; - CHECK_OK(curveParams); - if ((strlen(curveParams->genx) + strlen(curveParams->geny)) > 2 * 2 * MAX_ECKEY_LEN) { - goto cleanup; - } - params->fieldID.size = curveParams->size; - params->fieldID.type = field_type; - if (field_type == ec_field_GFp) { - CHECK_OK(hexString2SECItem(NULL, ¶ms->fieldID.u.prime, - curveParams->irr, kmflag)); - } else { - CHECK_OK(hexString2SECItem(NULL, ¶ms->fieldID.u.poly, - curveParams->irr, kmflag)); - } - CHECK_OK(hexString2SECItem(NULL, ¶ms->curve.a, - curveParams->curvea, kmflag)); - CHECK_OK(hexString2SECItem(NULL, ¶ms->curve.b, - curveParams->curveb, kmflag)); - genenc[0] = '0'; - genenc[1] = '4'; - genenc[2] = '\0'; - strcat(genenc, curveParams->genx); - strcat(genenc, curveParams->geny); - CHECK_OK(hexString2SECItem(NULL, ¶ms->base, genenc, kmflag)); - CHECK_OK(hexString2SECItem(NULL, ¶ms->order, - curveParams->order, kmflag)); - params->cofactor = curveParams->cofactor; - - rv = SECSuccess; - -cleanup: - return rv; -} - -ECCurveName SECOID_FindOIDTag(const SECItem *); - -SECStatus -EC_FillParams(PRArenaPool *arena, const SECItem *encodedParams, - ECParams *params, int kmflag) -{ - SECStatus rv = SECFailure; - ECCurveName tag; - SECItem oid = { siBuffer, NULL, 0}; - -#if EC_DEBUG - int i; - - printf("Encoded params in EC_DecodeParams: "); - for (i = 0; i < encodedParams->len; i++) { - printf("%02x:", encodedParams->data[i]); - } - printf("\n"); -#endif - - if ((encodedParams->len != ANSI_X962_CURVE_OID_TOTAL_LEN) && - (encodedParams->len != SECG_CURVE_OID_TOTAL_LEN) && - (encodedParams->len != BRAINPOOL_CURVE_OID_TOTAL_LEN)) { - PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE); - return SECFailure; - }; - - oid.len = encodedParams->len - 2; - oid.data = encodedParams->data + 2; - if ((encodedParams->data[0] != SEC_ASN1_OBJECT_ID) || - ((tag = SECOID_FindOIDTag(&oid)) == ECCurve_noName)) { - PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE); - return SECFailure; - } - - params->arena = arena; - params->cofactor = 0; - params->type = ec_params_named; - params->name = ECCurve_noName; - - /* For named curves, fill out curveOID */ - params->curveOID.len = oid.len; - params->curveOID.data = (unsigned char *) PORT_ArenaAlloc(NULL, oid.len, - kmflag); - if (params->curveOID.data == NULL) goto cleanup; - memcpy(params->curveOID.data, oid.data, oid.len); - -#if EC_DEBUG -#ifndef SECOID_FindOIDTagDescription - printf("Curve: %s\n", ecCurve_map[tag]->text); -#else - printf("Curve: %s\n", SECOID_FindOIDTagDescription(tag)); -#endif -#endif - - switch (tag) { - - /* Binary curves */ - - case ECCurve_X9_62_CHAR2_PNB163V1: - /* Populate params for c2pnb163v1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB163V1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_PNB163V2: - /* Populate params for c2pnb163v2 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB163V2, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_PNB163V3: - /* Populate params for c2pnb163v3 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB163V3, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_PNB176V1: - /* Populate params for c2pnb176v1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB176V1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_TNB191V1: - /* Populate params for c2tnb191v1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB191V1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_TNB191V2: - /* Populate params for c2tnb191v2 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB191V2, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_TNB191V3: - /* Populate params for c2tnb191v3 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB191V3, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_PNB208W1: - /* Populate params for c2pnb208w1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB208W1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_TNB239V1: - /* Populate params for c2tnb239v1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB239V1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_TNB239V2: - /* Populate params for c2tnb239v2 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB239V2, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_TNB239V3: - /* Populate params for c2tnb239v3 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB239V3, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_PNB272W1: - /* Populate params for c2pnb272w1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB272W1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_PNB304W1: - /* Populate params for c2pnb304w1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB304W1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_TNB359V1: - /* Populate params for c2tnb359v1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB359V1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_PNB368W1: - /* Populate params for c2pnb368w1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB368W1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_X9_62_CHAR2_TNB431R1: - /* Populate params for c2tnb431r1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB431R1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_113R1: - /* Populate params for sect113r1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_113R1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_113R2: - /* Populate params for sect113r2 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_113R2, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_131R1: - /* Populate params for sect131r1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_131R1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_131R2: - /* Populate params for sect131r2 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_131R2, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_163K1: - /* Populate params for sect163k1 - * (the NIST K-163 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_163K1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_163R1: - /* Populate params for sect163r1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_163R1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_163R2: - /* Populate params for sect163r2 - * (the NIST B-163 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_163R2, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_193R1: - /* Populate params for sect193r1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_193R1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_193R2: - /* Populate params for sect193r2 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_193R2, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_233K1: - /* Populate params for sect233k1 - * (the NIST K-233 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_233K1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_233R1: - /* Populate params for sect233r1 - * (the NIST B-233 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_233R1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_239K1: - /* Populate params for sect239k1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_239K1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_283K1: - /* Populate params for sect283k1 - * (the NIST K-283 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_283K1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_283R1: - /* Populate params for sect283r1 - * (the NIST B-283 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_283R1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_409K1: - /* Populate params for sect409k1 - * (the NIST K-409 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_409K1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_409R1: - /* Populate params for sect409r1 - * (the NIST B-409 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_409R1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_571K1: - /* Populate params for sect571k1 - * (the NIST K-571 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_571K1, ec_field_GF2m, - params, kmflag) ); - break; - - case ECCurve_SECG_CHAR2_571R1: - /* Populate params for sect571r1 - * (the NIST B-571 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_571R1, ec_field_GF2m, - params, kmflag) ); - break; - - /* Prime curves */ - - case ECCurve_X9_62_PRIME_192V1: - /* Populate params for prime192v1 aka secp192r1 - * (the NIST P-192 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_192V1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_X9_62_PRIME_192V2: - /* Populate params for prime192v2 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_192V2, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_X9_62_PRIME_192V3: - /* Populate params for prime192v3 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_192V3, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_X9_62_PRIME_239V1: - /* Populate params for prime239v1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_239V1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_X9_62_PRIME_239V2: - /* Populate params for prime239v2 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_239V2, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_X9_62_PRIME_239V3: - /* Populate params for prime239v3 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_239V3, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_X9_62_PRIME_256V1: - /* Populate params for prime256v1 aka secp256r1 - * (the NIST P-256 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_256V1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_SECG_PRIME_112R1: - /* Populate params for secp112r1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_112R1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_SECG_PRIME_112R2: - /* Populate params for secp112r2 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_112R2, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_SECG_PRIME_128R1: - /* Populate params for secp128r1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_128R1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_SECG_PRIME_128R2: - /* Populate params for secp128r2 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_128R2, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_SECG_PRIME_160K1: - /* Populate params for secp160k1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_160K1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_SECG_PRIME_160R1: - /* Populate params for secp160r1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_160R1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_SECG_PRIME_160R2: - /* Populate params for secp160r1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_160R2, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_SECG_PRIME_192K1: - /* Populate params for secp192k1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_192K1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_SECG_PRIME_224K1: - /* Populate params for secp224k1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_224K1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_SECG_PRIME_224R1: - /* Populate params for secp224r1 - * (the NIST P-224 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_224R1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_SECG_PRIME_256K1: - /* Populate params for secp256k1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_256K1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_SECG_PRIME_384R1: - /* Populate params for secp384r1 - * (the NIST P-384 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_384R1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_SECG_PRIME_521R1: - /* Populate params for secp521r1 - * (the NIST P-521 curve) - */ - CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_521R1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_BrainpoolP256r1: - /* Populate params for brainpoolP256r1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_BrainpoolP256r1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_BrainpoolP320r1: - /* Populate params for brainpoolP320r1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_BrainpoolP320r1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_BrainpoolP384r1: - /* Populate params for brainpoolP384r1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_BrainpoolP384r1, ec_field_GFp, - params, kmflag) ); - break; - - case ECCurve_BrainpoolP512r1: - /* Populate params for brainpoolP512r1 */ - CHECK_SEC_OK( gf_populate_params(ECCurve_BrainpoolP512r1, ec_field_GFp, - params, kmflag) ); - break; - - default: - break; - }; - -cleanup: - if (!params->cofactor) { - PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE); -#if EC_DEBUG - printf("Unrecognized curve, returning NULL params\n"); -#endif - } - - return rv; -} - -SECStatus -EC_DecodeParams(const SECItem *encodedParams, ECParams **ecparams, int kmflag) -{ - PRArenaPool *arena; - ECParams *params; - SECStatus rv = SECFailure; - - /* Initialize an arena for the ECParams structure */ - if (!(arena = PORT_NewArena(NSS_FREEBL_DEFAULT_CHUNKSIZE))) - return SECFailure; - - params = (ECParams *)PORT_ArenaZAlloc(NULL, sizeof(ECParams), kmflag); - if (!params) { - PORT_FreeArena(NULL, B_TRUE); - return SECFailure; - } - - /* Copy the encoded params */ - SECITEM_AllocItem(arena, &(params->DEREncoding), encodedParams->len, - kmflag); - memcpy(params->DEREncoding.data, encodedParams->data, encodedParams->len); - - /* Fill out the rest of the ECParams structure based on - * the encoded params - */ - rv = EC_FillParams(NULL, encodedParams, params, kmflag); - if (rv == SECFailure) { - PORT_FreeArena(NULL, B_TRUE); - return SECFailure; - } else { - *ecparams = params;; - return SECSuccess; - } -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl-curve.h b/src/jdk.crypto.ec/share/native/libsunec/impl/ecl-curve.h deleted file mode 100644 index aaa75e5d2d3..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl-curve.h +++ /dev/null @@ -1,733 +0,0 @@ -/* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - *********************************************************************** */ - -#ifndef _ECL_CURVE_H -#define _ECL_CURVE_H - -#include "ecl-exp.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -/* NIST prime curves */ -static const ECCurveParams ecCurve_NIST_P192 = { - "NIST-P192", ECField_GFp, 192, - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC", - "64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1", - "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012", - "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811", - "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831", 1 -}; - -static const ECCurveParams ecCurve_NIST_P224 = { - "NIST-P224", ECField_GFp, 224, - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE", - "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4", - "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21", - "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D", 1 -}; - -static const ECCurveParams ecCurve_NIST_P256 = { - "NIST-P256", ECField_GFp, 256, - "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF", - "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC", - "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B", - "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296", - "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5", - "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551", 1 -}; - -static const ECCurveParams ecCurve_NIST_P384 = { - "NIST-P384", ECField_GFp, 384, - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC", - "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF", - "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7", - "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973", - 1 -}; - -static const ECCurveParams ecCurve_NIST_P521 = { - "NIST-P521", ECField_GFp, 521, - "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", - "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC", - "0051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00", - "00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66", - "011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650", - "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409", - 1 -}; - -/* NIST binary curves */ -static const ECCurveParams ecCurve_NIST_K163 = { - "NIST-K163", ECField_GF2m, 163, - "0800000000000000000000000000000000000000C9", - "000000000000000000000000000000000000000001", - "000000000000000000000000000000000000000001", - "02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8", - "0289070FB05D38FF58321F2E800536D538CCDAA3D9", - "04000000000000000000020108A2E0CC0D99F8A5EF", 2 -}; - -static const ECCurveParams ecCurve_NIST_B163 = { - "NIST-B163", ECField_GF2m, 163, - "0800000000000000000000000000000000000000C9", - "000000000000000000000000000000000000000001", - "020A601907B8C953CA1481EB10512F78744A3205FD", - "03F0EBA16286A2D57EA0991168D4994637E8343E36", - "00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1", - "040000000000000000000292FE77E70C12A4234C33", 2 -}; - -static const ECCurveParams ecCurve_NIST_K233 = { - "NIST-K233", ECField_GF2m, 233, - "020000000000000000000000000000000000000004000000000000000001", - "000000000000000000000000000000000000000000000000000000000000", - "000000000000000000000000000000000000000000000000000000000001", - "017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126", - "01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3", - "008000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF", 4 -}; - -static const ECCurveParams ecCurve_NIST_B233 = { - "NIST-B233", ECField_GF2m, 233, - "020000000000000000000000000000000000000004000000000000000001", - "000000000000000000000000000000000000000000000000000000000001", - "0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD", - "00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B", - "01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052", - "01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7", 2 -}; - -static const ECCurveParams ecCurve_NIST_K283 = { - "NIST-K283", ECField_GF2m, 283, - "0800000000000000000000000000000000000000000000000000000000000000000010A1", - "000000000000000000000000000000000000000000000000000000000000000000000000", - "000000000000000000000000000000000000000000000000000000000000000000000001", - "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836", - "01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259", - "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61", 4 -}; - -static const ECCurveParams ecCurve_NIST_B283 = { - "NIST-B283", ECField_GF2m, 283, - "0800000000000000000000000000000000000000000000000000000000000000000010A1", - "000000000000000000000000000000000000000000000000000000000000000000000001", - "027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E313B79A2F5", - "05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B12053", - "03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45BE8112F4", - "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7CEFADB307", 2 -}; - -static const ECCurveParams ecCurve_NIST_K409 = { - "NIST-K409", ECField_GF2m, 409, - "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", - "0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746", - "01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B", - "007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF", 4 -}; - -static const ECCurveParams ecCurve_NIST_B409 = { - "NIST-B409", ECField_GF2m, 409, - "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", - "0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F", - "015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7", - "0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706", - "010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173", 2 -}; - -static const ECCurveParams ecCurve_NIST_K571 = { - "NIST-K571", ECField_GF2m, 571, - "080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425", - "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", - "026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C8972", - "0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F601CD4C143EF1C7A3", - "020000000000000000000000000000000000000000000000000000000000000000000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB45CFE778F637C1001", 4 -}; - -static const ECCurveParams ecCurve_NIST_B571 = { - "NIST-B571", ECField_GF2m, 571, - "080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425", - "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", - "02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C7FFEFF7F2955727A", - "0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19", - "037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A684423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C1A4827AF1B8AC15B", - "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E8382E9BB2FE84E47", 2 -}; - -/* ANSI X9.62 prime curves */ -static const ECCurveParams ecCurve_X9_62_PRIME_192V2 = { - "X9.62 P-192V2", ECField_GFp, 192, - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC", - "CC22D6DFB95C6B25E49C0D6364A4E5980C393AA21668D953", - "EEA2BAE7E1497842F2DE7769CFE9C989C072AD696F48034A", - "6574D11D69B6EC7A672BB82A083DF2F2B0847DE970B2DE15", - "FFFFFFFFFFFFFFFFFFFFFFFE5FB1A724DC80418648D8DD31", 1 -}; - -static const ECCurveParams ecCurve_X9_62_PRIME_192V3 = { - "X9.62 P-192V3", ECField_GFp, 192, - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC", - "22123DC2395A05CAA7423DAECCC94760A7D462256BD56916", - "7D29778100C65A1DA1783716588DCE2B8B4AEE8E228F1896", - "38A90F22637337334B49DCB66A6DC8F9978ACA7648A943B0", - "FFFFFFFFFFFFFFFFFFFFFFFF7A62D031C83F4294F640EC13", 1 -}; - -static const ECCurveParams ecCurve_X9_62_PRIME_239V1 = { - "X9.62 P-239V1", ECField_GFp, 239, - "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF", - "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC", - "6B016C3BDCF18941D0D654921475CA71A9DB2FB27D1D37796185C2942C0A", - "0FFA963CDCA8816CCC33B8642BEDF905C3D358573D3F27FBBD3B3CB9AAAF", - "7DEBE8E4E90A5DAE6E4054CA530BA04654B36818CE226B39FCCB7B02F1AE", - "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF9E5E9A9F5D9071FBD1522688909D0B", 1 -}; - -static const ECCurveParams ecCurve_X9_62_PRIME_239V2 = { - "X9.62 P-239V2", ECField_GFp, 239, - "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF", - "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC", - "617FAB6832576CBBFED50D99F0249C3FEE58B94BA0038C7AE84C8C832F2C", - "38AF09D98727705120C921BB5E9E26296A3CDCF2F35757A0EAFD87B830E7", - "5B0125E4DBEA0EC7206DA0FC01D9B081329FB555DE6EF460237DFF8BE4BA", - "7FFFFFFFFFFFFFFFFFFFFFFF800000CFA7E8594377D414C03821BC582063", 1 -}; - -static const ECCurveParams ecCurve_X9_62_PRIME_239V3 = { - "X9.62 P-239V3", ECField_GFp, 239, - "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF", - "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC", - "255705FA2A306654B1F4CB03D6A750A30C250102D4988717D9BA15AB6D3E", - "6768AE8E18BB92CFCF005C949AA2C6D94853D0E660BBF854B1C9505FE95A", - "1607E6898F390C06BC1D552BAD226F3B6FCFE48B6E818499AF18E3ED6CF3", - "7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF975DEB41B3A6057C3C432146526551", 1 -}; - -/* ANSI X9.62 binary curves */ -static const ECCurveParams ecCurve_X9_62_CHAR2_PNB163V1 = { - "X9.62 C2-PNB163V1", ECField_GF2m, 163, - "080000000000000000000000000000000000000107", - "072546B5435234A422E0789675F432C89435DE5242", - "00C9517D06D5240D3CFF38C74B20B6CD4D6F9DD4D9", - "07AF69989546103D79329FCC3D74880F33BBE803CB", - "01EC23211B5966ADEA1D3F87F7EA5848AEF0B7CA9F", - "0400000000000000000001E60FC8821CC74DAEAFC1", 2 -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_PNB163V2 = { - "X9.62 C2-PNB163V2", ECField_GF2m, 163, - "080000000000000000000000000000000000000107", - "0108B39E77C4B108BED981ED0E890E117C511CF072", - "0667ACEB38AF4E488C407433FFAE4F1C811638DF20", - "0024266E4EB5106D0A964D92C4860E2671DB9B6CC5", - "079F684DDF6684C5CD258B3890021B2386DFD19FC5", - "03FFFFFFFFFFFFFFFFFFFDF64DE1151ADBB78F10A7", 2 -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_PNB163V3 = { - "X9.62 C2-PNB163V3", ECField_GF2m, 163, - "080000000000000000000000000000000000000107", - "07A526C63D3E25A256A007699F5447E32AE456B50E", - "03F7061798EB99E238FD6F1BF95B48FEEB4854252B", - "02F9F87B7C574D0BDECF8A22E6524775F98CDEBDCB", - "05B935590C155E17EA48EB3FF3718B893DF59A05D0", - "03FFFFFFFFFFFFFFFFFFFE1AEE140F110AFF961309", 2 -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_PNB176V1 = { - "X9.62 C2-PNB176V1", ECField_GF2m, 176, - "0100000000000000000000000000000000080000000007", - "E4E6DB2995065C407D9D39B8D0967B96704BA8E9C90B", - "5DDA470ABE6414DE8EC133AE28E9BBD7FCEC0AE0FFF2", - "8D16C2866798B600F9F08BB4A8E860F3298CE04A5798", - "6FA4539C2DADDDD6BAB5167D61B436E1D92BB16A562C", - "00010092537397ECA4F6145799D62B0A19CE06FE26AD", 0xFF6E -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_TNB191V1 = { - "X9.62 C2-TNB191V1", ECField_GF2m, 191, - "800000000000000000000000000000000000000000000201", - "2866537B676752636A68F56554E12640276B649EF7526267", - "2E45EF571F00786F67B0081B9495A3D95462F5DE0AA185EC", - "36B3DAF8A23206F9C4F299D7B21A9C369137F2C84AE1AA0D", - "765BE73433B3F95E332932E70EA245CA2418EA0EF98018FB", - "40000000000000000000000004A20E90C39067C893BBB9A5", 2 -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_TNB191V2 = { - "X9.62 C2-TNB191V2", ECField_GF2m, 191, - "800000000000000000000000000000000000000000000201", - "401028774D7777C7B7666D1366EA432071274F89FF01E718", - "0620048D28BCBD03B6249C99182B7C8CD19700C362C46A01", - "3809B2B7CC1B28CC5A87926AAD83FD28789E81E2C9E3BF10", - "17434386626D14F3DBF01760D9213A3E1CF37AEC437D668A", - "20000000000000000000000050508CB89F652824E06B8173", 4 -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_TNB191V3 = { - "X9.62 C2-TNB191V3", ECField_GF2m, 191, - "800000000000000000000000000000000000000000000201", - "6C01074756099122221056911C77D77E77A777E7E7E77FCB", - "71FE1AF926CF847989EFEF8DB459F66394D90F32AD3F15E8", - "375D4CE24FDE434489DE8746E71786015009E66E38A926DD", - "545A39176196575D985999366E6AD34CE0A77CD7127B06BE", - "155555555555555555555555610C0B196812BFB6288A3EA3", 6 -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_PNB208W1 = { - "X9.62 C2-PNB208W1", ECField_GF2m, 208, - "010000000000000000000000000000000800000000000000000007", - "0000000000000000000000000000000000000000000000000000", - "C8619ED45A62E6212E1160349E2BFA844439FAFC2A3FD1638F9E", - "89FDFBE4ABE193DF9559ECF07AC0CE78554E2784EB8C1ED1A57A", - "0F55B51A06E78E9AC38A035FF520D8B01781BEB1A6BB08617DE3", - "000101BAF95C9723C57B6C21DA2EFF2D5ED588BDD5717E212F9D", 0xFE48 -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_TNB239V1 = { - "X9.62 C2-TNB239V1", ECField_GF2m, 239, - "800000000000000000000000000000000000000000000000001000000001", - "32010857077C5431123A46B808906756F543423E8D27877578125778AC76", - "790408F2EEDAF392B012EDEFB3392F30F4327C0CA3F31FC383C422AA8C16", - "57927098FA932E7C0A96D3FD5B706EF7E5F5C156E16B7E7C86038552E91D", - "61D8EE5077C33FECF6F1A16B268DE469C3C7744EA9A971649FC7A9616305", - "2000000000000000000000000000000F4D42FFE1492A4993F1CAD666E447", 4 -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_TNB239V2 = { - "X9.62 C2-TNB239V2", ECField_GF2m, 239, - "800000000000000000000000000000000000000000000000001000000001", - "4230017757A767FAE42398569B746325D45313AF0766266479B75654E65F", - "5037EA654196CFF0CD82B2C14A2FCF2E3FF8775285B545722F03EACDB74B", - "28F9D04E900069C8DC47A08534FE76D2B900B7D7EF31F5709F200C4CA205", - "5667334C45AFF3B5A03BAD9DD75E2C71A99362567D5453F7FA6E227EC833", - "1555555555555555555555555555553C6F2885259C31E3FCDF154624522D", 6 -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_TNB239V3 = { - "X9.62 C2-TNB239V3", ECField_GF2m, 239, - "800000000000000000000000000000000000000000000000001000000001", - "01238774666A67766D6676F778E676B66999176666E687666D8766C66A9F", - "6A941977BA9F6A435199ACFC51067ED587F519C5ECB541B8E44111DE1D40", - "70F6E9D04D289C4E89913CE3530BFDE903977D42B146D539BF1BDE4E9C92", - "2E5A0EAF6E5E1305B9004DCE5C0ED7FE59A35608F33837C816D80B79F461", - "0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCAC4912D2D9DF903EF9888B8A0E4CFF", 0xA -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_PNB272W1 = { - "X9.62 C2-PNB272W1", ECField_GF2m, 272, - "010000000000000000000000000000000000000000000000000000010000000000000B", - "91A091F03B5FBA4AB2CCF49C4EDD220FB028712D42BE752B2C40094DBACDB586FB20", - "7167EFC92BB2E3CE7C8AAAFF34E12A9C557003D7C73A6FAF003F99F6CC8482E540F7", - "6108BABB2CEEBCF787058A056CBE0CFE622D7723A289E08A07AE13EF0D10D171DD8D", - "10C7695716851EEF6BA7F6872E6142FBD241B830FF5EFCACECCAB05E02005DDE9D23", - "000100FAF51354E0E39E4892DF6E319C72C8161603FA45AA7B998A167B8F1E629521", - 0xFF06 -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_PNB304W1 = { - "X9.62 C2-PNB304W1", ECField_GF2m, 304, - "010000000000000000000000000000000000000000000000000000000000000000000000000807", - "FD0D693149A118F651E6DCE6802085377E5F882D1B510B44160074C1288078365A0396C8E681", - "BDDB97E555A50A908E43B01C798EA5DAA6788F1EA2794EFCF57166B8C14039601E55827340BE", - "197B07845E9BE2D96ADB0F5F3C7F2CFFBD7A3EB8B6FEC35C7FD67F26DDF6285A644F740A2614", - "E19FBEB76E0DA171517ECF401B50289BF014103288527A9B416A105E80260B549FDC1B92C03B", - "000101D556572AABAC800101D556572AABAC8001022D5C91DD173F8FB561DA6899164443051D", 0xFE2E -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_TNB359V1 = { - "X9.62 C2-TNB359V1", ECField_GF2m, 359, - "800000000000000000000000000000000000000000000000000000000000000000000000100000000000000001", - "5667676A654B20754F356EA92017D946567C46675556F19556A04616B567D223A5E05656FB549016A96656A557", - "2472E2D0197C49363F1FE7F5B6DB075D52B6947D135D8CA445805D39BC345626089687742B6329E70680231988", - "3C258EF3047767E7EDE0F1FDAA79DAEE3841366A132E163ACED4ED2401DF9C6BDCDE98E8E707C07A2239B1B097", - "53D7E08529547048121E9C95F3791DD804963948F34FAE7BF44EA82365DC7868FE57E4AE2DE211305A407104BD", - "01AF286BCA1AF286BCA1AF286BCA1AF286BCA1AF286BC9FB8F6B85C556892C20A7EB964FE7719E74F490758D3B", 0x4C -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_PNB368W1 = { - "X9.62 C2-PNB368W1", ECField_GF2m, 368, - "0100000000000000000000000000000000000000000000000000000000000000000000002000000000000000000007", - "E0D2EE25095206F5E2A4F9ED229F1F256E79A0E2B455970D8D0D865BD94778C576D62F0AB7519CCD2A1A906AE30D", - "FC1217D4320A90452C760A58EDCD30C8DD069B3C34453837A34ED50CB54917E1C2112D84D164F444F8F74786046A", - "1085E2755381DCCCE3C1557AFA10C2F0C0C2825646C5B34A394CBCFA8BC16B22E7E789E927BE216F02E1FB136A5F", - "7B3EB1BDDCBA62D5D8B2059B525797FC73822C59059C623A45FF3843CEE8F87CD1855ADAA81E2A0750B80FDA2310", - "00010090512DA9AF72B08349D98A5DD4C7B0532ECA51CE03E2D10F3B7AC579BD87E909AE40A6F131E9CFCE5BD967", 0xFF70 -}; - -static const ECCurveParams ecCurve_X9_62_CHAR2_TNB431R1 = { - "X9.62 C2-TNB431R1", ECField_GF2m, 431, - "800000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000001", - "1A827EF00DD6FC0E234CAF046C6A5D8A85395B236CC4AD2CF32A0CADBDC9DDF620B0EB9906D0957F6C6FEACD615468DF104DE296CD8F", - "10D9B4A3D9047D8B154359ABFB1B7F5485B04CEB868237DDC9DEDA982A679A5A919B626D4E50A8DD731B107A9962381FB5D807BF2618", - "120FC05D3C67A99DE161D2F4092622FECA701BE4F50F4758714E8A87BBF2A658EF8C21E7C5EFE965361F6C2999C0C247B0DBD70CE6B7", - "20D0AF8903A96F8D5FA2C255745D3C451B302C9346D9B7E485E7BCE41F6B591F3E8F6ADDCBB0BC4C2F947A7DE1A89B625D6A598B3760", - "0340340340340340340340340340340340340340340340340340340323C313FAB50589703B5EC68D3587FEC60D161CC149C1AD4A91", 0x2760 -}; - -/* SEC2 prime curves */ -static const ECCurveParams ecCurve_SECG_PRIME_112R1 = { - "SECP-112R1", ECField_GFp, 112, - "DB7C2ABF62E35E668076BEAD208B", - "DB7C2ABF62E35E668076BEAD2088", - "659EF8BA043916EEDE8911702B22", - "09487239995A5EE76B55F9C2F098", - "A89CE5AF8724C0A23E0E0FF77500", - "DB7C2ABF62E35E7628DFAC6561C5", 1 -}; - -static const ECCurveParams ecCurve_SECG_PRIME_112R2 = { - "SECP-112R2", ECField_GFp, 112, - "DB7C2ABF62E35E668076BEAD208B", - "6127C24C05F38A0AAAF65C0EF02C", - "51DEF1815DB5ED74FCC34C85D709", - "4BA30AB5E892B4E1649DD0928643", - "adcd46f5882e3747def36e956e97", - "36DF0AAFD8B8D7597CA10520D04B", 4 -}; - -static const ECCurveParams ecCurve_SECG_PRIME_128R1 = { - "SECP-128R1", ECField_GFp, 128, - "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF", - "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC", - "E87579C11079F43DD824993C2CEE5ED3", - "161FF7528B899B2D0C28607CA52C5B86", - "CF5AC8395BAFEB13C02DA292DDED7A83", - "FFFFFFFE0000000075A30D1B9038A115", 1 -}; - -static const ECCurveParams ecCurve_SECG_PRIME_128R2 = { - "SECP-128R2", ECField_GFp, 128, - "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF", - "D6031998D1B3BBFEBF59CC9BBFF9AEE1", - "5EEEFCA380D02919DC2C6558BB6D8A5D", - "7B6AA5D85E572983E6FB32A7CDEBC140", - "27B6916A894D3AEE7106FE805FC34B44", - "3FFFFFFF7FFFFFFFBE0024720613B5A3", 4 -}; - -static const ECCurveParams ecCurve_SECG_PRIME_160K1 = { - "SECP-160K1", ECField_GFp, 160, - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73", - "0000000000000000000000000000000000000000", - "0000000000000000000000000000000000000007", - "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB", - "938CF935318FDCED6BC28286531733C3F03C4FEE", - "0100000000000000000001B8FA16DFAB9ACA16B6B3", 1 -}; - -static const ECCurveParams ecCurve_SECG_PRIME_160R1 = { - "SECP-160R1", ECField_GFp, 160, - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC", - "1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45", - "4A96B5688EF573284664698968C38BB913CBFC82", - "23A628553168947D59DCC912042351377AC5FB32", - "0100000000000000000001F4C8F927AED3CA752257", 1 -}; - -static const ECCurveParams ecCurve_SECG_PRIME_160R2 = { - "SECP-160R2", ECField_GFp, 160, - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70", - "B4E134D3FB59EB8BAB57274904664D5AF50388BA", - "52DCB034293A117E1F4FF11B30F7199D3144CE6D", - "FEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E", - "0100000000000000000000351EE786A818F3A1A16B", 1 -}; - -static const ECCurveParams ecCurve_SECG_PRIME_192K1 = { - "SECP-192K1", ECField_GFp, 192, - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37", - "000000000000000000000000000000000000000000000000", - "000000000000000000000000000000000000000000000003", - "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D", - "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D", - "FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D", 1 -}; - -static const ECCurveParams ecCurve_SECG_PRIME_224K1 = { - "SECP-224K1", ECField_GFp, 224, - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D", - "00000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000005", - "A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C", - "7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5", - "010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7", 1 -}; - -static const ECCurveParams ecCurve_SECG_PRIME_256K1 = { - "SECP-256K1", ECField_GFp, 256, - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000007", - "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", - "483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8", - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141", 1 -}; - -/* SEC2 binary curves */ -static const ECCurveParams ecCurve_SECG_CHAR2_113R1 = { - "SECT-113R1", ECField_GF2m, 113, - "020000000000000000000000000201", - "003088250CA6E7C7FE649CE85820F7", - "00E8BEE4D3E2260744188BE0E9C723", - "009D73616F35F4AB1407D73562C10F", - "00A52830277958EE84D1315ED31886", - "0100000000000000D9CCEC8A39E56F", 2 -}; - -static const ECCurveParams ecCurve_SECG_CHAR2_113R2 = { - "SECT-113R2", ECField_GF2m, 113, - "020000000000000000000000000201", - "00689918DBEC7E5A0DD6DFC0AA55C7", - "0095E9A9EC9B297BD4BF36E059184F", - "01A57A6A7B26CA5EF52FCDB8164797", - "00B3ADC94ED1FE674C06E695BABA1D", - "010000000000000108789B2496AF93", 2 -}; - -static const ECCurveParams ecCurve_SECG_CHAR2_131R1 = { - "SECT-131R1", ECField_GF2m, 131, - "080000000000000000000000000000010D", - "07A11B09A76B562144418FF3FF8C2570B8", - "0217C05610884B63B9C6C7291678F9D341", - "0081BAF91FDF9833C40F9C181343638399", - "078C6E7EA38C001F73C8134B1B4EF9E150", - "0400000000000000023123953A9464B54D", 2 -}; - -static const ECCurveParams ecCurve_SECG_CHAR2_131R2 = { - "SECT-131R2", ECField_GF2m, 131, - "080000000000000000000000000000010D", - "03E5A88919D7CAFCBF415F07C2176573B2", - "04B8266A46C55657AC734CE38F018F2192", - "0356DCD8F2F95031AD652D23951BB366A8", - "0648F06D867940A5366D9E265DE9EB240F", - "0400000000000000016954A233049BA98F", 2 -}; - -static const ECCurveParams ecCurve_SECG_CHAR2_163R1 = { - "SECT-163R1", ECField_GF2m, 163, - "0800000000000000000000000000000000000000C9", - "07B6882CAAEFA84F9554FF8428BD88E246D2782AE2", - "0713612DCDDCB40AAB946BDA29CA91F73AF958AFD9", - "0369979697AB43897789566789567F787A7876A654", - "00435EDB42EFAFB2989D51FEFCE3C80988F41FF883", - "03FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B", 2 -}; - -static const ECCurveParams ecCurve_SECG_CHAR2_193R1 = { - "SECT-193R1", ECField_GF2m, 193, - "02000000000000000000000000000000000000000000008001", - "0017858FEB7A98975169E171F77B4087DE098AC8A911DF7B01", - "00FDFB49BFE6C3A89FACADAA7A1E5BBC7CC1C2E5D831478814", - "01F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E1", - "0025E399F2903712CCF3EA9E3A1AD17FB0B3201B6AF7CE1B05", - "01000000000000000000000000C7F34A778F443ACC920EBA49", 2 -}; - -static const ECCurveParams ecCurve_SECG_CHAR2_193R2 = { - "SECT-193R2", ECField_GF2m, 193, - "02000000000000000000000000000000000000000000008001", - "0163F35A5137C2CE3EA6ED8667190B0BC43ECD69977702709B", - "00C9BB9E8927D4D64C377E2AB2856A5B16E3EFB7F61D4316AE", - "00D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F", - "01CE94335607C304AC29E7DEFBD9CA01F596F927224CDECF6C", - "010000000000000000000000015AAB561B005413CCD4EE99D5", 2 -}; - -static const ECCurveParams ecCurve_SECG_CHAR2_239K1 = { - "SECT-239K1", ECField_GF2m, 239, - "800000000000000000004000000000000000000000000000000000000001", - "000000000000000000000000000000000000000000000000000000000000", - "000000000000000000000000000000000000000000000000000000000001", - "29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC", - "76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA", - "2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5", 4 -}; - -/* WTLS curves */ -static const ECCurveParams ecCurve_WTLS_1 = { - "WTLS-1", ECField_GF2m, 113, - "020000000000000000000000000201", - "000000000000000000000000000001", - "000000000000000000000000000001", - "01667979A40BA497E5D5C270780617", - "00F44B4AF1ECC2630E08785CEBCC15", - "00FFFFFFFFFFFFFFFDBF91AF6DEA73", 2 -}; - -static const ECCurveParams ecCurve_WTLS_8 = { - "WTLS-8", ECField_GFp, 112, - "FFFFFFFFFFFFFFFFFFFFFFFFFDE7", - "0000000000000000000000000000", - "0000000000000000000000000003", - "0000000000000000000000000001", - "0000000000000000000000000002", - "0100000000000001ECEA551AD837E9", 1 -}; - -static const ECCurveParams ecCurve_WTLS_9 = { - "WTLS-9", ECField_GFp, 160, - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC808F", - "0000000000000000000000000000000000000000", - "0000000000000000000000000000000000000003", - "0000000000000000000000000000000000000001", - "0000000000000000000000000000000000000002", - "0100000000000000000001CDC98AE0E2DE574ABF33", 1 -}; - -static const ECCurveParams ecCurve_BrainpoolP256r1 = { - "brainpoolP256r1", ECField_GFp, 256, - "A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377", - "7D5A0975FC2C3057EEF67530417AFFE7FB8055C126DC5C6CE94A4B44F330B5D9", - "26DC5C6CE94A4B44F330B5D9BBD77CBF958416295CF7E1CE6BCCDC18FF8C07B6", - "8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262", - "547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997", - "A9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7", 1 -}; - -static const ECCurveParams ecCurve_BrainpoolP320r1 = { - "brainpoolP320r1", ECField_GFp, 320, - "D35E472036BC4FB7E13C785ED201E065F98FCFA6F6F40DEF4F92B9EC7893EC28FCD412B1F1B32E27", - "3EE30B568FBAB0F883CCEBD46D3F3BB8A2A73513F5EB79DA66190EB085FFA9F492F375A97D860EB4", - "520883949DFDBC42D3AD198640688A6FE13F41349554B49ACC31DCCD884539816F5EB4AC8FB1F1A6", - "43BD7E9AFB53D8B85289BCC48EE5BFE6F20137D10A087EB6E7871E2A10A599C710AF8D0D39E20611", - "14FDD05545EC1CC8AB4093247F77275E0743FFED117182EAA9C77877AAAC6AC7D35245D1692E8EE1", - "D35E472036BC4FB7E13C785ED201E065F98FCFA5B68F12A32D482EC7EE8658E98691555B44C59311", 1 -}; - -static const ECCurveParams ecCurve_BrainpoolP384r1 = { - "brainpoolP384r1", ECField_GFp, 384, - "8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123ACD3A729901D1A71874700133107EC53", - "7BC382C63D8C150C3C72080ACE05AFA0C2BEA28E4FB22787139165EFBA91F90F8AA5814A503AD4EB04A8C7DD22CE2826", - "04A8C7DD22CE28268B39B55416F0447C2FB77DE107DCD2A62E880EA53EEB62D57CB4390295DBC9943AB78696FA504C11", - "1D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8E826E03436D646AAEF87B2E247D4AF1E", - "8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF99129280E4646217791811142820341263C5315", - "8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7CF3AB6AF6B7FC3103B883202E9046565", 1 -}; - -static const ECCurveParams ecCurve_BrainpoolP512r1 = { - "brainpoolP512r1", ECField_GFp, 512, - "AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA703308717D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3", - "7830A3318B603B89E2327145AC234CC594CBDD8D3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CA", - "3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CADC083E67984050B75EBAE5DD2809BD638016F723", - "81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822", - "7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892", - "AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069", 1 -}; - -/* mapping between ECCurveName enum and pointers to ECCurveParams */ -static const ECCurveParams *ecCurve_map[] = { - NULL, /* ECCurve_noName */ - &ecCurve_NIST_P192, /* ECCurve_NIST_P192 */ - &ecCurve_NIST_P224, /* ECCurve_NIST_P224 */ - &ecCurve_NIST_P256, /* ECCurve_NIST_P256 */ - &ecCurve_NIST_P384, /* ECCurve_NIST_P384 */ - &ecCurve_NIST_P521, /* ECCurve_NIST_P521 */ - &ecCurve_NIST_K163, /* ECCurve_NIST_K163 */ - &ecCurve_NIST_B163, /* ECCurve_NIST_B163 */ - &ecCurve_NIST_K233, /* ECCurve_NIST_K233 */ - &ecCurve_NIST_B233, /* ECCurve_NIST_B233 */ - &ecCurve_NIST_K283, /* ECCurve_NIST_K283 */ - &ecCurve_NIST_B283, /* ECCurve_NIST_B283 */ - &ecCurve_NIST_K409, /* ECCurve_NIST_K409 */ - &ecCurve_NIST_B409, /* ECCurve_NIST_B409 */ - &ecCurve_NIST_K571, /* ECCurve_NIST_K571 */ - &ecCurve_NIST_B571, /* ECCurve_NIST_B571 */ - &ecCurve_X9_62_PRIME_192V2, /* ECCurve_X9_62_PRIME_192V2 */ - &ecCurve_X9_62_PRIME_192V3, /* ECCurve_X9_62_PRIME_192V3 */ - &ecCurve_X9_62_PRIME_239V1, /* ECCurve_X9_62_PRIME_239V1 */ - &ecCurve_X9_62_PRIME_239V2, /* ECCurve_X9_62_PRIME_239V2 */ - &ecCurve_X9_62_PRIME_239V3, /* ECCurve_X9_62_PRIME_239V3 */ - &ecCurve_X9_62_CHAR2_PNB163V1, /* ECCurve_X9_62_CHAR2_PNB163V1 */ - &ecCurve_X9_62_CHAR2_PNB163V2, /* ECCurve_X9_62_CHAR2_PNB163V2 */ - &ecCurve_X9_62_CHAR2_PNB163V3, /* ECCurve_X9_62_CHAR2_PNB163V3 */ - &ecCurve_X9_62_CHAR2_PNB176V1, /* ECCurve_X9_62_CHAR2_PNB176V1 */ - &ecCurve_X9_62_CHAR2_TNB191V1, /* ECCurve_X9_62_CHAR2_TNB191V1 */ - &ecCurve_X9_62_CHAR2_TNB191V2, /* ECCurve_X9_62_CHAR2_TNB191V2 */ - &ecCurve_X9_62_CHAR2_TNB191V3, /* ECCurve_X9_62_CHAR2_TNB191V3 */ - &ecCurve_X9_62_CHAR2_PNB208W1, /* ECCurve_X9_62_CHAR2_PNB208W1 */ - &ecCurve_X9_62_CHAR2_TNB239V1, /* ECCurve_X9_62_CHAR2_TNB239V1 */ - &ecCurve_X9_62_CHAR2_TNB239V2, /* ECCurve_X9_62_CHAR2_TNB239V2 */ - &ecCurve_X9_62_CHAR2_TNB239V3, /* ECCurve_X9_62_CHAR2_TNB239V3 */ - &ecCurve_X9_62_CHAR2_PNB272W1, /* ECCurve_X9_62_CHAR2_PNB272W1 */ - &ecCurve_X9_62_CHAR2_PNB304W1, /* ECCurve_X9_62_CHAR2_PNB304W1 */ - &ecCurve_X9_62_CHAR2_TNB359V1, /* ECCurve_X9_62_CHAR2_TNB359V1 */ - &ecCurve_X9_62_CHAR2_PNB368W1, /* ECCurve_X9_62_CHAR2_PNB368W1 */ - &ecCurve_X9_62_CHAR2_TNB431R1, /* ECCurve_X9_62_CHAR2_TNB431R1 */ - &ecCurve_SECG_PRIME_112R1, /* ECCurve_SECG_PRIME_112R1 */ - &ecCurve_SECG_PRIME_112R2, /* ECCurve_SECG_PRIME_112R2 */ - &ecCurve_SECG_PRIME_128R1, /* ECCurve_SECG_PRIME_128R1 */ - &ecCurve_SECG_PRIME_128R2, /* ECCurve_SECG_PRIME_128R2 */ - &ecCurve_SECG_PRIME_160K1, /* ECCurve_SECG_PRIME_160K1 */ - &ecCurve_SECG_PRIME_160R1, /* ECCurve_SECG_PRIME_160R1 */ - &ecCurve_SECG_PRIME_160R2, /* ECCurve_SECG_PRIME_160R2 */ - &ecCurve_SECG_PRIME_192K1, /* ECCurve_SECG_PRIME_192K1 */ - &ecCurve_SECG_PRIME_224K1, /* ECCurve_SECG_PRIME_224K1 */ - &ecCurve_SECG_PRIME_256K1, /* ECCurve_SECG_PRIME_256K1 */ - &ecCurve_SECG_CHAR2_113R1, /* ECCurve_SECG_CHAR2_113R1 */ - &ecCurve_SECG_CHAR2_113R2, /* ECCurve_SECG_CHAR2_113R2 */ - &ecCurve_SECG_CHAR2_131R1, /* ECCurve_SECG_CHAR2_131R1 */ - &ecCurve_SECG_CHAR2_131R2, /* ECCurve_SECG_CHAR2_131R2 */ - &ecCurve_SECG_CHAR2_163R1, /* ECCurve_SECG_CHAR2_163R1 */ - &ecCurve_SECG_CHAR2_193R1, /* ECCurve_SECG_CHAR2_193R1 */ - &ecCurve_SECG_CHAR2_193R2, /* ECCurve_SECG_CHAR2_193R2 */ - &ecCurve_SECG_CHAR2_239K1, /* ECCurve_SECG_CHAR2_239K1 */ - &ecCurve_WTLS_1, /* ECCurve_WTLS_1 */ - &ecCurve_WTLS_8, /* ECCurve_WTLS_8 */ - &ecCurve_WTLS_9, /* ECCurve_WTLS_9 */ - &ecCurve_BrainpoolP256r1, /* ECCurve_BrainpoolP256r1 */ - &ecCurve_BrainpoolP320r1, /* ECCurve_BrainpoolP320r1 */ - &ecCurve_BrainpoolP384r1, /* ECCurve_brainpoolP384r1 */ - &ecCurve_BrainpoolP512r1, /* ECCurve_brainpoolP512r1 */ - NULL /* ECCurve_pastLastCurve */ -}; - -#endif /* _ECL_CURVE_H */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl-exp.h b/src/jdk.crypto.ec/share/native/libsunec/impl/ecl-exp.h deleted file mode 100644 index 8b442c603e0..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl-exp.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - *********************************************************************** */ - -#ifndef _ECL_EXP_H -#define _ECL_EXP_H - -/* Curve field type */ -typedef enum { - ECField_GFp, - ECField_GF2m -} ECField; - -/* Hexadecimal encoding of curve parameters */ -struct ECCurveParamsStr { - char *text; - ECField field; - unsigned int size; - char *irr; - char *curvea; - char *curveb; - char *genx; - char *geny; - char *order; - int cofactor; -}; -typedef struct ECCurveParamsStr ECCurveParams; - -/* Named curve parameters */ -typedef enum { - - ECCurve_noName = 0, - - /* NIST prime curves */ - ECCurve_NIST_P192, - ECCurve_NIST_P224, - ECCurve_NIST_P256, - ECCurve_NIST_P384, - ECCurve_NIST_P521, - - /* NIST binary curves */ - ECCurve_NIST_K163, - ECCurve_NIST_B163, - ECCurve_NIST_K233, - ECCurve_NIST_B233, - ECCurve_NIST_K283, - ECCurve_NIST_B283, - ECCurve_NIST_K409, - ECCurve_NIST_B409, - ECCurve_NIST_K571, - ECCurve_NIST_B571, - - /* ANSI X9.62 prime curves */ - /* ECCurve_X9_62_PRIME_192V1 == ECCurve_NIST_P192 */ - ECCurve_X9_62_PRIME_192V2, - ECCurve_X9_62_PRIME_192V3, - ECCurve_X9_62_PRIME_239V1, - ECCurve_X9_62_PRIME_239V2, - ECCurve_X9_62_PRIME_239V3, - /* ECCurve_X9_62_PRIME_256V1 == ECCurve_NIST_P256 */ - - /* ANSI X9.62 binary curves */ - ECCurve_X9_62_CHAR2_PNB163V1, - ECCurve_X9_62_CHAR2_PNB163V2, - ECCurve_X9_62_CHAR2_PNB163V3, - ECCurve_X9_62_CHAR2_PNB176V1, - ECCurve_X9_62_CHAR2_TNB191V1, - ECCurve_X9_62_CHAR2_TNB191V2, - ECCurve_X9_62_CHAR2_TNB191V3, - ECCurve_X9_62_CHAR2_PNB208W1, - ECCurve_X9_62_CHAR2_TNB239V1, - ECCurve_X9_62_CHAR2_TNB239V2, - ECCurve_X9_62_CHAR2_TNB239V3, - ECCurve_X9_62_CHAR2_PNB272W1, - ECCurve_X9_62_CHAR2_PNB304W1, - ECCurve_X9_62_CHAR2_TNB359V1, - ECCurve_X9_62_CHAR2_PNB368W1, - ECCurve_X9_62_CHAR2_TNB431R1, - - /* SEC2 prime curves */ - ECCurve_SECG_PRIME_112R1, - ECCurve_SECG_PRIME_112R2, - ECCurve_SECG_PRIME_128R1, - ECCurve_SECG_PRIME_128R2, - ECCurve_SECG_PRIME_160K1, - ECCurve_SECG_PRIME_160R1, - ECCurve_SECG_PRIME_160R2, - ECCurve_SECG_PRIME_192K1, - /* ECCurve_SECG_PRIME_192R1 == ECCurve_NIST_P192 */ - ECCurve_SECG_PRIME_224K1, - /* ECCurve_SECG_PRIME_224R1 == ECCurve_NIST_P224 */ - ECCurve_SECG_PRIME_256K1, - /* ECCurve_SECG_PRIME_256R1 == ECCurve_NIST_P256 */ - /* ECCurve_SECG_PRIME_384R1 == ECCurve_NIST_P384 */ - /* ECCurve_SECG_PRIME_521R1 == ECCurve_NIST_P521 */ - - /* SEC2 binary curves */ - ECCurve_SECG_CHAR2_113R1, - ECCurve_SECG_CHAR2_113R2, - ECCurve_SECG_CHAR2_131R1, - ECCurve_SECG_CHAR2_131R2, - /* ECCurve_SECG_CHAR2_163K1 == ECCurve_NIST_K163 */ - ECCurve_SECG_CHAR2_163R1, - /* ECCurve_SECG_CHAR2_163R2 == ECCurve_NIST_B163 */ - ECCurve_SECG_CHAR2_193R1, - ECCurve_SECG_CHAR2_193R2, - /* ECCurve_SECG_CHAR2_233K1 == ECCurve_NIST_K233 */ - /* ECCurve_SECG_CHAR2_233R1 == ECCurve_NIST_B233 */ - ECCurve_SECG_CHAR2_239K1, - /* ECCurve_SECG_CHAR2_283K1 == ECCurve_NIST_K283 */ - /* ECCurve_SECG_CHAR2_283R1 == ECCurve_NIST_B283 */ - /* ECCurve_SECG_CHAR2_409K1 == ECCurve_NIST_K409 */ - /* ECCurve_SECG_CHAR2_409R1 == ECCurve_NIST_B409 */ - /* ECCurve_SECG_CHAR2_571K1 == ECCurve_NIST_K571 */ - /* ECCurve_SECG_CHAR2_571R1 == ECCurve_NIST_B571 */ - - /* WTLS curves */ - ECCurve_WTLS_1, - /* there is no WTLS 2 curve */ - /* ECCurve_WTLS_3 == ECCurve_NIST_K163 */ - /* ECCurve_WTLS_4 == ECCurve_SECG_CHAR2_113R1 */ - /* ECCurve_WTLS_5 == ECCurve_X9_62_CHAR2_PNB163V1 */ - /* ECCurve_WTLS_6 == ECCurve_SECG_PRIME_112R1 */ - /* ECCurve_WTLS_7 == ECCurve_SECG_PRIME_160R1 */ - ECCurve_WTLS_8, - ECCurve_WTLS_9, - /* ECCurve_WTLS_10 == ECCurve_NIST_K233 */ - /* ECCurve_WTLS_11 == ECCurve_NIST_B233 */ - /* ECCurve_WTLS_12 == ECCurve_NIST_P224 */ - - /* ECC Brainpool prime curves in RFC 5639*/ - ECCurve_BrainpoolP256r1, - ECCurve_BrainpoolP320r1, - ECCurve_BrainpoolP384r1, - ECCurve_BrainpoolP512r1, - - ECCurve_pastLastCurve -} ECCurveName; - -/* Aliased named curves */ - -#define ECCurve_X9_62_PRIME_192V1 ECCurve_NIST_P192 -#define ECCurve_X9_62_PRIME_256V1 ECCurve_NIST_P256 -#define ECCurve_SECG_PRIME_192R1 ECCurve_NIST_P192 -#define ECCurve_SECG_PRIME_224R1 ECCurve_NIST_P224 -#define ECCurve_SECG_PRIME_256R1 ECCurve_NIST_P256 -#define ECCurve_SECG_PRIME_384R1 ECCurve_NIST_P384 -#define ECCurve_SECG_PRIME_521R1 ECCurve_NIST_P521 -#define ECCurve_SECG_CHAR2_163K1 ECCurve_NIST_K163 -#define ECCurve_SECG_CHAR2_163R2 ECCurve_NIST_B163 -#define ECCurve_SECG_CHAR2_233K1 ECCurve_NIST_K233 -#define ECCurve_SECG_CHAR2_233R1 ECCurve_NIST_B233 -#define ECCurve_SECG_CHAR2_283K1 ECCurve_NIST_K283 -#define ECCurve_SECG_CHAR2_283R1 ECCurve_NIST_B283 -#define ECCurve_SECG_CHAR2_409K1 ECCurve_NIST_K409 -#define ECCurve_SECG_CHAR2_409R1 ECCurve_NIST_B409 -#define ECCurve_SECG_CHAR2_571K1 ECCurve_NIST_K571 -#define ECCurve_SECG_CHAR2_571R1 ECCurve_NIST_B571 -#define ECCurve_WTLS_3 ECCurve_NIST_K163 -#define ECCurve_WTLS_4 ECCurve_SECG_CHAR2_113R1 -#define ECCurve_WTLS_5 ECCurve_X9_62_CHAR2_PNB163V1 -#define ECCurve_WTLS_6 ECCurve_SECG_PRIME_112R1 -#define ECCurve_WTLS_7 ECCurve_SECG_PRIME_160R1 -#define ECCurve_WTLS_10 ECCurve_NIST_K233 -#define ECCurve_WTLS_11 ECCurve_NIST_B233 -#define ECCurve_WTLS_12 ECCurve_NIST_P224 - -#endif /* _ECL_EXP_H */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl-priv.h b/src/jdk.crypto.ec/share/native/libsunec/impl/ecl-priv.h deleted file mode 100644 index bdfe61547b2..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl-priv.h +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Stephen Fung <fungstep@hotmail.com> and - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - * Last Modified Date from the Original Code: May 2017 - *********************************************************************** */ - -#ifndef _ECL_PRIV_H -#define _ECL_PRIV_H - -#include "ecl.h" -#include "mpi.h" -#include "mplogic.h" - -/* MAX_FIELD_SIZE_DIGITS is the maximum size of field element supported */ -/* the following needs to go away... */ -#if defined(MP_USE_LONG_LONG_DIGIT) || defined(MP_USE_LONG_DIGIT) -#define ECL_SIXTY_FOUR_BIT -#else -#define ECL_THIRTY_TWO_BIT -#endif - -#define ECL_CURVE_DIGITS(curve_size_in_bits) \ - (((curve_size_in_bits)+(sizeof(mp_digit)*8-1))/(sizeof(mp_digit)*8)) -#define ECL_BITS (sizeof(mp_digit)*8) -#define ECL_MAX_FIELD_SIZE_DIGITS (80/sizeof(mp_digit)) - -/* Gets the i'th bit in the binary representation of a. If i >= length(a), - * then return 0. (The above behaviour differs from mpl_get_bit, which - * causes an error if i >= length(a).) */ -#define MP_GET_BIT(a, i) \ - ((i) >= mpl_significant_bits((a))) ? 0 : mpl_get_bit((a), (i)) - -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) -#define MP_ADD_CARRY(a1, a2, s, cin, cout) \ - { mp_word w; \ - w = ((mp_word)(cin)) + (a1) + (a2); \ - s = ACCUM(w); \ - cout = CARRYOUT(w); } - -/* Handle case when carry-in value is zero */ -#define MP_ADD_CARRY_ZERO(a1, a2, s, cout) \ - MP_ADD_CARRY(a1, a2, s, 0, cout); - -#define MP_SUB_BORROW(a1, a2, s, bin, bout) \ - { mp_word w; \ - w = ((mp_word)(a1)) - (a2) - (bin); \ - s = ACCUM(w); \ - bout = (w >> MP_DIGIT_BIT) & 1; } - -#else -/* NOTE, - * cin and cout could be the same variable. - * bin and bout could be the same variable. - * a1 or a2 and s could be the same variable. - * don't trash those outputs until their respective inputs have - * been read. */ -#define MP_ADD_CARRY(a1, a2, s, cin, cout) \ - { mp_digit tmp,sum; \ - tmp = (a1); \ - sum = tmp + (a2); \ - tmp = (sum < tmp); /* detect overflow */ \ - s = sum += (cin); \ - cout = tmp + (sum < (cin)); } - -/* Handle case when carry-in value is zero */ -#define MP_ADD_CARRY_ZERO(a1, a2, s, cout) \ - { mp_digit tmp,sum; \ - tmp = (a1); \ - sum = tmp + (a2); \ - tmp = (sum < tmp); /* detect overflow */ \ - s = sum; \ - cout = tmp; } - -#define MP_SUB_BORROW(a1, a2, s, bin, bout) \ - { mp_digit tmp; \ - tmp = (a1); \ - s = tmp - (a2); \ - tmp = (s > tmp); /* detect borrow */ \ - if ((bin) && !s--) tmp++; \ - bout = tmp; } -#endif - - -struct GFMethodStr; -typedef struct GFMethodStr GFMethod; -struct GFMethodStr { - /* Indicates whether the structure was constructed from dynamic memory - * or statically created. */ - int constructed; - /* Irreducible that defines the field. For prime fields, this is the - * prime p. For binary polynomial fields, this is the bitstring - * representation of the irreducible polynomial. */ - mp_int irr; - /* For prime fields, the value irr_arr[0] is the number of bits in the - * field. For binary polynomial fields, the irreducible polynomial - * f(t) is represented as an array of unsigned int[], where f(t) is - * of the form: f(t) = t^p[0] + t^p[1] + ... + t^p[4] where m = p[0] - * > p[1] > ... > p[4] = 0. */ - unsigned int irr_arr[5]; - /* Field arithmetic methods. All methods (except field_enc and - * field_dec) are assumed to take field-encoded parameters and return - * field-encoded values. All methods (except field_enc and field_dec) - * are required to be implemented. */ - mp_err (*field_add) (const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); - mp_err (*field_neg) (const mp_int *a, mp_int *r, const GFMethod *meth); - mp_err (*field_sub) (const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); - mp_err (*field_mod) (const mp_int *a, mp_int *r, const GFMethod *meth); - mp_err (*field_mul) (const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); - mp_err (*field_sqr) (const mp_int *a, mp_int *r, const GFMethod *meth); - mp_err (*field_div) (const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); - mp_err (*field_enc) (const mp_int *a, mp_int *r, const GFMethod *meth); - mp_err (*field_dec) (const mp_int *a, mp_int *r, const GFMethod *meth); - /* Extra storage for implementation-specific data. Any memory - * allocated to these extra fields will be cleared by extra_free. */ - void *extra1; - void *extra2; - void (*extra_free) (GFMethod *meth); -}; - -/* Construct generic GFMethods. */ -GFMethod *GFMethod_consGFp(const mp_int *irr); -GFMethod *GFMethod_consGFp_mont(const mp_int *irr); -GFMethod *GFMethod_consGF2m(const mp_int *irr, - const unsigned int irr_arr[5]); -/* Free the memory allocated (if any) to a GFMethod object. */ -void GFMethod_free(GFMethod *meth); - -struct ECGroupStr { - /* Indicates whether the structure was constructed from dynamic memory - * or statically created. */ - int constructed; - /* Field definition and arithmetic. */ - GFMethod *meth; - /* Textual representation of curve name, if any. */ - char *text; -#ifdef _KERNEL - int text_len; -#endif - /* Curve parameters, field-encoded. */ - mp_int curvea, curveb; - /* x and y coordinates of the base point, field-encoded. */ - mp_int genx, geny; - /* Order and cofactor of the base point. */ - mp_int order; - int cofactor; - /* Point arithmetic methods. All methods are assumed to take - * field-encoded parameters and return field-encoded values. All - * methods (except base_point_mul and points_mul) are required to be - * implemented. */ - mp_err (*point_add) (const mp_int *px, const mp_int *py, - const mp_int *qx, const mp_int *qy, mp_int *rx, - mp_int *ry, const ECGroup *group); - mp_err (*point_sub) (const mp_int *px, const mp_int *py, - const mp_int *qx, const mp_int *qy, mp_int *rx, - mp_int *ry, const ECGroup *group); - mp_err (*point_dbl) (const mp_int *px, const mp_int *py, mp_int *rx, - mp_int *ry, const ECGroup *group); - mp_err (*point_mul) (const mp_int *n, const mp_int *px, - const mp_int *py, mp_int *rx, mp_int *ry, - const ECGroup *group, int timing); - mp_err (*base_point_mul) (const mp_int *n, mp_int *rx, mp_int *ry, - const ECGroup *group); - mp_err (*points_mul) (const mp_int *k1, const mp_int *k2, - const mp_int *px, const mp_int *py, mp_int *rx, - mp_int *ry, const ECGroup *group, - int timing); - mp_err (*validate_point) (const mp_int *px, const mp_int *py, const ECGroup *group); - /* Extra storage for implementation-specific data. Any memory - * allocated to these extra fields will be cleared by extra_free. */ - void *extra1; - void *extra2; - void (*extra_free) (ECGroup *group); -}; - -/* Wrapper functions for generic prime field arithmetic. */ -mp_err ec_GFp_add(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -mp_err ec_GFp_neg(const mp_int *a, mp_int *r, const GFMethod *meth); -mp_err ec_GFp_sub(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); - -/* fixed length in-line adds. Count is in words */ -mp_err ec_GFp_add_3(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -mp_err ec_GFp_add_4(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -mp_err ec_GFp_add_5(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -mp_err ec_GFp_add_6(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -mp_err ec_GFp_sub_3(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -mp_err ec_GFp_sub_4(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -mp_err ec_GFp_sub_5(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -mp_err ec_GFp_sub_6(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); - -mp_err ec_GFp_mod(const mp_int *a, mp_int *r, const GFMethod *meth); -mp_err ec_GFp_mul(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -mp_err ec_GFp_sqr(const mp_int *a, mp_int *r, const GFMethod *meth); -mp_err ec_GFp_div(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -/* Wrapper functions for generic binary polynomial field arithmetic. */ -mp_err ec_GF2m_add(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -mp_err ec_GF2m_neg(const mp_int *a, mp_int *r, const GFMethod *meth); -mp_err ec_GF2m_mod(const mp_int *a, mp_int *r, const GFMethod *meth); -mp_err ec_GF2m_mul(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -mp_err ec_GF2m_sqr(const mp_int *a, mp_int *r, const GFMethod *meth); -mp_err ec_GF2m_div(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); - -/* Montgomery prime field arithmetic. */ -mp_err ec_GFp_mul_mont(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -mp_err ec_GFp_sqr_mont(const mp_int *a, mp_int *r, const GFMethod *meth); -mp_err ec_GFp_div_mont(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth); -mp_err ec_GFp_enc_mont(const mp_int *a, mp_int *r, const GFMethod *meth); -mp_err ec_GFp_dec_mont(const mp_int *a, mp_int *r, const GFMethod *meth); -void ec_GFp_extra_free_mont(GFMethod *meth); - -/* point multiplication */ -mp_err ec_pts_mul_basic(const mp_int *k1, const mp_int *k2, - const mp_int *px, const mp_int *py, mp_int *rx, - mp_int *ry, const ECGroup *group, - int timing); -mp_err ec_pts_mul_simul_w2(const mp_int *k1, const mp_int *k2, - const mp_int *px, const mp_int *py, mp_int *rx, - mp_int *ry, const ECGroup *group, - int timing); - -/* Computes the windowed non-adjacent-form (NAF) of a scalar. Out should - * be an array of signed char's to output to, bitsize should be the number - * of bits of out, in is the original scalar, and w is the window size. - * NAF is discussed in the paper: D. Hankerson, J. Hernandez and A. - * Menezes, "Software implementation of elliptic curve cryptography over - * binary fields", Proc. CHES 2000. */ -mp_err ec_compute_wNAF(signed char *out, int bitsize, const mp_int *in, - int w); - -/* Optimized field arithmetic */ -mp_err ec_group_set_gfp192(ECGroup *group, ECCurveName); -mp_err ec_group_set_gfp224(ECGroup *group, ECCurveName); -mp_err ec_group_set_gfp256(ECGroup *group, ECCurveName); -mp_err ec_group_set_gfp384(ECGroup *group, ECCurveName); -mp_err ec_group_set_gfp521(ECGroup *group, ECCurveName); -mp_err ec_group_set_gf2m163(ECGroup *group, ECCurveName name); -mp_err ec_group_set_gf2m193(ECGroup *group, ECCurveName name); -mp_err ec_group_set_gf2m233(ECGroup *group, ECCurveName name); - -/* Optimized floating-point arithmetic */ -#ifdef ECL_USE_FP -mp_err ec_group_set_secp160r1_fp(ECGroup *group); -mp_err ec_group_set_nistp192_fp(ECGroup *group); -mp_err ec_group_set_nistp224_fp(ECGroup *group); -#endif - -#endif /* _ECL_PRIV_H */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecl.c deleted file mode 100644 index 49f407a28b4..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl.c +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - *********************************************************************** */ - -#include "mpi.h" -#include "mplogic.h" -#include "ecl.h" -#include "ecl-priv.h" -#include "ec2.h" -#include "ecp.h" -#ifndef _KERNEL -#include <stdlib.h> -#include <string.h> -#endif - -/* Allocate memory for a new ECGroup object. */ -ECGroup * -ECGroup_new(int kmflag) -{ - mp_err res = MP_OKAY; - ECGroup *group; -#ifdef _KERNEL - group = (ECGroup *) kmem_alloc(sizeof(ECGroup), kmflag); -#else - group = (ECGroup *) malloc(sizeof(ECGroup)); -#endif - if (group == NULL) - return NULL; - group->constructed = MP_YES; - group->meth = NULL; - group->text = NULL; - MP_DIGITS(&group->curvea) = 0; - MP_DIGITS(&group->curveb) = 0; - MP_DIGITS(&group->genx) = 0; - MP_DIGITS(&group->geny) = 0; - MP_DIGITS(&group->order) = 0; - group->base_point_mul = NULL; - group->points_mul = NULL; - group->validate_point = NULL; - group->extra1 = NULL; - group->extra2 = NULL; - group->extra_free = NULL; - MP_CHECKOK(mp_init(&group->curvea, kmflag)); - MP_CHECKOK(mp_init(&group->curveb, kmflag)); - MP_CHECKOK(mp_init(&group->genx, kmflag)); - MP_CHECKOK(mp_init(&group->geny, kmflag)); - MP_CHECKOK(mp_init(&group->order, kmflag)); - - CLEANUP: - if (res != MP_OKAY) { - ECGroup_free(group); - return NULL; - } - return group; -} - -/* Construct a generic ECGroup for elliptic curves over prime fields. */ -ECGroup * -ECGroup_consGFp(const mp_int *irr, const mp_int *curvea, - const mp_int *curveb, const mp_int *genx, - const mp_int *geny, const mp_int *order, int cofactor) -{ - mp_err res = MP_OKAY; - ECGroup *group = NULL; - - group = ECGroup_new(FLAG(irr)); - if (group == NULL) - return NULL; - - group->meth = GFMethod_consGFp(irr); - if (group->meth == NULL) { - res = MP_MEM; - goto CLEANUP; - } - MP_CHECKOK(mp_copy(curvea, &group->curvea)); - MP_CHECKOK(mp_copy(curveb, &group->curveb)); - MP_CHECKOK(mp_copy(genx, &group->genx)); - MP_CHECKOK(mp_copy(geny, &group->geny)); - MP_CHECKOK(mp_copy(order, &group->order)); - group->cofactor = cofactor; - group->point_add = &ec_GFp_pt_add_aff; - group->point_sub = &ec_GFp_pt_sub_aff; - group->point_dbl = &ec_GFp_pt_dbl_aff; - group->point_mul = &ec_GFp_pt_mul_jm_wNAF; - group->base_point_mul = NULL; - group->points_mul = &ec_GFp_pts_mul_jac; - group->validate_point = &ec_GFp_validate_point; - - CLEANUP: - if (res != MP_OKAY) { - ECGroup_free(group); - return NULL; - } - return group; -} - -/* Construct a generic ECGroup for elliptic curves over prime fields with - * field arithmetic implemented in Montgomery coordinates. */ -ECGroup * -ECGroup_consGFp_mont(const mp_int *irr, const mp_int *curvea, - const mp_int *curveb, const mp_int *genx, - const mp_int *geny, const mp_int *order, int cofactor) -{ - mp_err res = MP_OKAY; - ECGroup *group = NULL; - - group = ECGroup_new(FLAG(irr)); - if (group == NULL) - return NULL; - - group->meth = GFMethod_consGFp_mont(irr); - if (group->meth == NULL) { - res = MP_MEM; - goto CLEANUP; - } - MP_CHECKOK(group->meth-> - field_enc(curvea, &group->curvea, group->meth)); - MP_CHECKOK(group->meth-> - field_enc(curveb, &group->curveb, group->meth)); - MP_CHECKOK(group->meth->field_enc(genx, &group->genx, group->meth)); - MP_CHECKOK(group->meth->field_enc(geny, &group->geny, group->meth)); - MP_CHECKOK(mp_copy(order, &group->order)); - group->cofactor = cofactor; - group->point_add = &ec_GFp_pt_add_aff; - group->point_sub = &ec_GFp_pt_sub_aff; - group->point_dbl = &ec_GFp_pt_dbl_aff; - group->point_mul = &ec_GFp_pt_mul_jm_wNAF; - group->base_point_mul = NULL; - group->points_mul = &ec_GFp_pts_mul_jac; - group->validate_point = &ec_GFp_validate_point; - - CLEANUP: - if (res != MP_OKAY) { - ECGroup_free(group); - return NULL; - } - return group; -} - -#ifdef NSS_ECC_MORE_THAN_SUITE_B -/* Construct a generic ECGroup for elliptic curves over binary polynomial - * fields. */ -ECGroup * -ECGroup_consGF2m(const mp_int *irr, const unsigned int irr_arr[5], - const mp_int *curvea, const mp_int *curveb, - const mp_int *genx, const mp_int *geny, - const mp_int *order, int cofactor) -{ - mp_err res = MP_OKAY; - ECGroup *group = NULL; - - group = ECGroup_new(FLAG(irr)); - if (group == NULL) - return NULL; - - group->meth = GFMethod_consGF2m(irr, irr_arr); - if (group->meth == NULL) { - res = MP_MEM; - goto CLEANUP; - } - MP_CHECKOK(mp_copy(curvea, &group->curvea)); - MP_CHECKOK(mp_copy(curveb, &group->curveb)); - MP_CHECKOK(mp_copy(genx, &group->genx)); - MP_CHECKOK(mp_copy(geny, &group->geny)); - MP_CHECKOK(mp_copy(order, &group->order)); - group->cofactor = cofactor; - group->point_add = &ec_GF2m_pt_add_aff; - group->point_sub = &ec_GF2m_pt_sub_aff; - group->point_dbl = &ec_GF2m_pt_dbl_aff; - group->point_mul = &ec_GF2m_pt_mul_mont; - group->base_point_mul = NULL; - group->points_mul = &ec_pts_mul_basic; - group->validate_point = &ec_GF2m_validate_point; - - CLEANUP: - if (res != MP_OKAY) { - ECGroup_free(group); - return NULL; - } - return group; -} -#endif - -/* Construct ECGroup from hex parameters and name, if any. Called by - * ECGroup_fromHex and ECGroup_fromName. */ -ECGroup * -ecgroup_fromNameAndHex(const ECCurveName name, - const ECCurveParams * params, int kmflag) -{ - mp_int irr, curvea, curveb, genx, geny, order; - int bits; - ECGroup *group = NULL; - mp_err res = MP_OKAY; - - /* initialize values */ - MP_DIGITS(&irr) = 0; - MP_DIGITS(&curvea) = 0; - MP_DIGITS(&curveb) = 0; - MP_DIGITS(&genx) = 0; - MP_DIGITS(&geny) = 0; - MP_DIGITS(&order) = 0; - MP_CHECKOK(mp_init(&irr, kmflag)); - MP_CHECKOK(mp_init(&curvea, kmflag)); - MP_CHECKOK(mp_init(&curveb, kmflag)); - MP_CHECKOK(mp_init(&genx, kmflag)); - MP_CHECKOK(mp_init(&geny, kmflag)); - MP_CHECKOK(mp_init(&order, kmflag)); - MP_CHECKOK(mp_read_radix(&irr, params->irr, 16)); - MP_CHECKOK(mp_read_radix(&curvea, params->curvea, 16)); - MP_CHECKOK(mp_read_radix(&curveb, params->curveb, 16)); - MP_CHECKOK(mp_read_radix(&genx, params->genx, 16)); - MP_CHECKOK(mp_read_radix(&geny, params->geny, 16)); - MP_CHECKOK(mp_read_radix(&order, params->order, 16)); - - /* determine number of bits */ - bits = mpl_significant_bits(&irr) - 1; - if (bits < MP_OKAY) { - res = bits; - goto CLEANUP; - } - - /* determine which optimizations (if any) to use */ - if (params->field == ECField_GFp) { -#ifdef NSS_ECC_MORE_THAN_SUITE_B - switch (name) { -#ifdef ECL_USE_FP - case ECCurve_SECG_PRIME_160R1: - group = - ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny, - &order, params->cofactor); - if (group == NULL) { res = MP_UNDEF; goto CLEANUP; } - MP_CHECKOK(ec_group_set_secp160r1_fp(group)); - break; -#endif - case ECCurve_SECG_PRIME_192R1: -#ifdef ECL_USE_FP - group = - ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny, - &order, params->cofactor); - if (group == NULL) { res = MP_UNDEF; goto CLEANUP; } - MP_CHECKOK(ec_group_set_nistp192_fp(group)); -#else - group = - ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny, - &order, params->cofactor); - if (group == NULL) { res = MP_UNDEF; goto CLEANUP; } - MP_CHECKOK(ec_group_set_gfp192(group, name)); -#endif - break; - case ECCurve_SECG_PRIME_224R1: -#ifdef ECL_USE_FP - group = - ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny, - &order, params->cofactor); - if (group == NULL) { res = MP_UNDEF; goto CLEANUP; } - MP_CHECKOK(ec_group_set_nistp224_fp(group)); -#else - group = - ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny, - &order, params->cofactor); - if (group == NULL) { res = MP_UNDEF; goto CLEANUP; } - MP_CHECKOK(ec_group_set_gfp224(group, name)); -#endif - break; - case ECCurve_SECG_PRIME_256R1: - group = - ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny, - &order, params->cofactor); - if (group == NULL) { res = MP_UNDEF; goto CLEANUP; } - MP_CHECKOK(ec_group_set_gfp256(group, name)); - break; - case ECCurve_SECG_PRIME_521R1: - group = - ECGroup_consGFp(&irr, &curvea, &curveb, &genx, &geny, - &order, params->cofactor); - if (group == NULL) { res = MP_UNDEF; goto CLEANUP; } - MP_CHECKOK(ec_group_set_gfp521(group, name)); - break; - default: - /* use generic arithmetic */ -#endif - group = - ECGroup_consGFp_mont(&irr, &curvea, &curveb, &genx, &geny, - &order, params->cofactor); - if (group == NULL) { res = MP_UNDEF; goto CLEANUP; } -#ifdef NSS_ECC_MORE_THAN_SUITE_B - } - } else if (params->field == ECField_GF2m) { - group = ECGroup_consGF2m(&irr, NULL, &curvea, &curveb, &genx, &geny, &order, params->cofactor); - if (group == NULL) { res = MP_UNDEF; goto CLEANUP; } - if ((name == ECCurve_NIST_K163) || - (name == ECCurve_NIST_B163) || - (name == ECCurve_SECG_CHAR2_163R1)) { - MP_CHECKOK(ec_group_set_gf2m163(group, name)); - } else if ((name == ECCurve_SECG_CHAR2_193R1) || - (name == ECCurve_SECG_CHAR2_193R2)) { - MP_CHECKOK(ec_group_set_gf2m193(group, name)); - } else if ((name == ECCurve_NIST_K233) || - (name == ECCurve_NIST_B233)) { - MP_CHECKOK(ec_group_set_gf2m233(group, name)); - } -#endif - } else { - res = MP_UNDEF; - goto CLEANUP; - } - - /* set name, if any */ - if ((group != NULL) && (params->text != NULL)) { -#ifdef _KERNEL - int n = strlen(params->text) + 1; - - group->text = kmem_alloc(n, kmflag); - if (group->text == NULL) { - res = MP_MEM; - goto CLEANUP; - } - bcopy(params->text, group->text, n); - group->text_len = n; -#else - group->text = strdup(params->text); - if (group->text == NULL) { - res = MP_MEM; - } -#endif - } - - CLEANUP: - mp_clear(&irr); - mp_clear(&curvea); - mp_clear(&curveb); - mp_clear(&genx); - mp_clear(&geny); - mp_clear(&order); - if (res != MP_OKAY) { - ECGroup_free(group); - return NULL; - } - return group; -} - -/* Construct ECGroup from hexadecimal representations of parameters. */ -ECGroup * -ECGroup_fromHex(const ECCurveParams * params, int kmflag) -{ - return ecgroup_fromNameAndHex(ECCurve_noName, params, kmflag); -} - -/* Construct ECGroup from named parameters. */ -ECGroup * -ECGroup_fromName(const ECCurveName name, int kmflag) -{ - ECGroup *group = NULL; - ECCurveParams *params = NULL; - mp_err res = MP_OKAY; - - params = EC_GetNamedCurveParams(name, kmflag); - if (params == NULL) { - res = MP_UNDEF; - goto CLEANUP; - } - - /* construct actual group */ - group = ecgroup_fromNameAndHex(name, params, kmflag); - if (group == NULL) { - res = MP_UNDEF; - goto CLEANUP; - } - - CLEANUP: - EC_FreeCurveParams(params); - if (res != MP_OKAY) { - ECGroup_free(group); - return NULL; - } - return group; -} - -/* Validates an EC public key as described in Section 5.2.2 of X9.62. */ -mp_err ECPoint_validate(const ECGroup *group, const mp_int *px, const - mp_int *py) -{ - /* 1: Verify that publicValue is not the point at infinity */ - /* 2: Verify that the coordinates of publicValue are elements - * of the field. - */ - /* 3: Verify that publicValue is on the curve. */ - /* 4: Verify that the order of the curve times the publicValue - * is the point at infinity. - */ - return group->validate_point(px, py, group); -} - -/* Free the memory allocated (if any) to an ECGroup object. */ -void -ECGroup_free(ECGroup *group) -{ - if (group == NULL) - return; - GFMethod_free(group->meth); - if (group->constructed == MP_NO) - return; - mp_clear(&group->curvea); - mp_clear(&group->curveb); - mp_clear(&group->genx); - mp_clear(&group->geny); - mp_clear(&group->order); - if (group->text != NULL) -#ifdef _KERNEL - kmem_free(group->text, group->text_len); -#else - free(group->text); -#endif - if (group->extra_free != NULL) - group->extra_free(group); -#ifdef _KERNEL - kmem_free(group, sizeof (ECGroup)); -#else - free(group); -#endif -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl.h b/src/jdk.crypto.ec/share/native/libsunec/impl/ecl.h deleted file mode 100644 index deff0aa1191..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - * Last Modified Date from the Original Code: May 2017 - *********************************************************************** */ - -#ifndef _ECL_H -#define _ECL_H - -/* Although this is not an exported header file, code which uses elliptic - * curve point operations will need to include it. */ - -#include "ecl-exp.h" -#include "mpi.h" - -struct ECGroupStr; -typedef struct ECGroupStr ECGroup; - -/* Construct ECGroup from hexadecimal representations of parameters. */ -ECGroup *ECGroup_fromHex(const ECCurveParams * params, int kmflag); - -/* Construct ECGroup from named parameters. */ -ECGroup *ECGroup_fromName(const ECCurveName name, int kmflag); - -/* Free an allocated ECGroup. */ -void ECGroup_free(ECGroup *group); - -/* Construct ECCurveParams from an ECCurveName */ -ECCurveParams *EC_GetNamedCurveParams(const ECCurveName name, int kmflag); - -/* Duplicates an ECCurveParams */ -ECCurveParams *ECCurveParams_dup(const ECCurveParams * params, int kmflag); - -/* Free an allocated ECCurveParams */ -void EC_FreeCurveParams(ECCurveParams * params); - -/* Elliptic curve scalar-point multiplication. Computes Q(x, y) = k * P(x, - * y). If x, y = NULL, then P is assumed to be the generator (base point) - * of the group of points on the elliptic curve. Input and output values - * are assumed to be NOT field-encoded. */ -mp_err ECPoint_mul(const ECGroup *group, const mp_int *k, const mp_int *px, - const mp_int *py, mp_int *qx, mp_int *qy, - int timing); - -/* Elliptic curve scalar-point multiplication. Computes Q(x, y) = k1 * G + - * k2 * P(x, y), where G is the generator (base point) of the group of - * points on the elliptic curve. Input and output values are assumed to - * be NOT field-encoded. */ -mp_err ECPoints_mul(const ECGroup *group, const mp_int *k1, - const mp_int *k2, const mp_int *px, const mp_int *py, - mp_int *qx, mp_int *qy, int timing); - -/* Validates an EC public key as described in Section 5.2.2 of X9.62. - * Returns MP_YES if the public key is valid, MP_NO if the public key - * is invalid, or an error code if the validation could not be - * performed. */ -mp_err ECPoint_validate(const ECGroup *group, const mp_int *px, const - mp_int *py); - -#endif /* _ECL_H */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl_curve.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecl_curve.c deleted file mode 100644 index fe883242988..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl_curve.c +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - *********************************************************************** */ - -#include "ecl.h" -#include "ecl-curve.h" -#include "ecl-priv.h" -#ifndef _KERNEL -#include <stdlib.h> -#include <string.h> -#endif - -#define CHECK(func) if ((func) == NULL) { res = 0; goto CLEANUP; } - -/* Duplicates an ECCurveParams */ -ECCurveParams * -ECCurveParams_dup(const ECCurveParams * params, int kmflag) -{ - int res = 1; - ECCurveParams *ret = NULL; - -#ifdef _KERNEL - ret = (ECCurveParams *) kmem_zalloc(sizeof(ECCurveParams), kmflag); -#else - CHECK(ret = (ECCurveParams *) calloc(1, sizeof(ECCurveParams))); -#endif - if (params->text != NULL) { -#ifdef _KERNEL - ret->text = kmem_alloc(strlen(params->text) + 1, kmflag); - bcopy(params->text, ret->text, strlen(params->text) + 1); -#else - CHECK(ret->text = strdup(params->text)); -#endif - } - ret->field = params->field; - ret->size = params->size; - if (params->irr != NULL) { -#ifdef _KERNEL - ret->irr = kmem_alloc(strlen(params->irr) + 1, kmflag); - bcopy(params->irr, ret->irr, strlen(params->irr) + 1); -#else - CHECK(ret->irr = strdup(params->irr)); -#endif - } - if (params->curvea != NULL) { -#ifdef _KERNEL - ret->curvea = kmem_alloc(strlen(params->curvea) + 1, kmflag); - bcopy(params->curvea, ret->curvea, strlen(params->curvea) + 1); -#else - CHECK(ret->curvea = strdup(params->curvea)); -#endif - } - if (params->curveb != NULL) { -#ifdef _KERNEL - ret->curveb = kmem_alloc(strlen(params->curveb) + 1, kmflag); - bcopy(params->curveb, ret->curveb, strlen(params->curveb) + 1); -#else - CHECK(ret->curveb = strdup(params->curveb)); -#endif - } - if (params->genx != NULL) { -#ifdef _KERNEL - ret->genx = kmem_alloc(strlen(params->genx) + 1, kmflag); - bcopy(params->genx, ret->genx, strlen(params->genx) + 1); -#else - CHECK(ret->genx = strdup(params->genx)); -#endif - } - if (params->geny != NULL) { -#ifdef _KERNEL - ret->geny = kmem_alloc(strlen(params->geny) + 1, kmflag); - bcopy(params->geny, ret->geny, strlen(params->geny) + 1); -#else - CHECK(ret->geny = strdup(params->geny)); -#endif - } - if (params->order != NULL) { -#ifdef _KERNEL - ret->order = kmem_alloc(strlen(params->order) + 1, kmflag); - bcopy(params->order, ret->order, strlen(params->order) + 1); -#else - CHECK(ret->order = strdup(params->order)); -#endif - } - ret->cofactor = params->cofactor; - - CLEANUP: - if (res != 1) { - EC_FreeCurveParams(ret); - return NULL; - } - return ret; -} - -#undef CHECK - -/* Construct ECCurveParams from an ECCurveName */ -ECCurveParams * -EC_GetNamedCurveParams(const ECCurveName name, int kmflag) -{ - if ((name <= ECCurve_noName) || (ECCurve_pastLastCurve <= name) || - (ecCurve_map[name] == NULL)) { - return NULL; - } else { - return ECCurveParams_dup(ecCurve_map[name], kmflag); - } -} - -/* Free the memory allocated (if any) to an ECCurveParams object. */ -void -EC_FreeCurveParams(ECCurveParams * params) -{ - if (params == NULL) - return; - if (params->text != NULL) -#ifdef _KERNEL - kmem_free(params->text, strlen(params->text) + 1); -#else - free(params->text); -#endif - if (params->irr != NULL) -#ifdef _KERNEL - kmem_free(params->irr, strlen(params->irr) + 1); -#else - free(params->irr); -#endif - if (params->curvea != NULL) -#ifdef _KERNEL - kmem_free(params->curvea, strlen(params->curvea) + 1); -#else - free(params->curvea); -#endif - if (params->curveb != NULL) -#ifdef _KERNEL - kmem_free(params->curveb, strlen(params->curveb) + 1); -#else - free(params->curveb); -#endif - if (params->genx != NULL) -#ifdef _KERNEL - kmem_free(params->genx, strlen(params->genx) + 1); -#else - free(params->genx); -#endif - if (params->geny != NULL) -#ifdef _KERNEL - kmem_free(params->geny, strlen(params->geny) + 1); -#else - free(params->geny); -#endif - if (params->order != NULL) -#ifdef _KERNEL - kmem_free(params->order, strlen(params->order) + 1); -#else - free(params->order); -#endif -#ifdef _KERNEL - kmem_free(params, sizeof(ECCurveParams)); -#else - free(params); -#endif -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl_gf.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecl_gf.c deleted file mode 100644 index 3723925e255..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl_gf.c +++ /dev/null @@ -1,1043 +0,0 @@ -/* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Stephen Fung <fungstep@hotmail.com> and - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - *********************************************************************** */ - -#include "mpi.h" -#include "mp_gf2m.h" -#include "ecl-priv.h" -#include "mpi-priv.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -/* Allocate memory for a new GFMethod object. */ -GFMethod * -GFMethod_new(int kmflag) -{ - mp_err res = MP_OKAY; - GFMethod *meth; -#ifdef _KERNEL - meth = (GFMethod *) kmem_alloc(sizeof(GFMethod), kmflag); -#else - meth = (GFMethod *) malloc(sizeof(GFMethod)); - if (meth == NULL) - return NULL; -#endif - meth->constructed = MP_YES; - MP_DIGITS(&meth->irr) = 0; - meth->extra_free = NULL; - MP_CHECKOK(mp_init(&meth->irr, kmflag)); - - CLEANUP: - if (res != MP_OKAY) { - GFMethod_free(meth); - return NULL; - } - return meth; -} - -/* Construct a generic GFMethod for arithmetic over prime fields with - * irreducible irr. */ -GFMethod * -GFMethod_consGFp(const mp_int *irr) -{ - mp_err res = MP_OKAY; - GFMethod *meth = NULL; - - meth = GFMethod_new(FLAG(irr)); - if (meth == NULL) - return NULL; - - MP_CHECKOK(mp_copy(irr, &meth->irr)); - meth->irr_arr[0] = mpl_significant_bits(irr); - meth->irr_arr[1] = meth->irr_arr[2] = meth->irr_arr[3] = - meth->irr_arr[4] = 0; - switch(MP_USED(&meth->irr)) { - /* maybe we need 1 and 2 words here as well?*/ - case 3: - meth->field_add = &ec_GFp_add_3; - meth->field_sub = &ec_GFp_sub_3; - break; - case 4: - meth->field_add = &ec_GFp_add_4; - meth->field_sub = &ec_GFp_sub_4; - break; - case 5: - meth->field_add = &ec_GFp_add_5; - meth->field_sub = &ec_GFp_sub_5; - break; - case 6: - meth->field_add = &ec_GFp_add_6; - meth->field_sub = &ec_GFp_sub_6; - break; - default: - meth->field_add = &ec_GFp_add; - meth->field_sub = &ec_GFp_sub; - } - meth->field_neg = &ec_GFp_neg; - meth->field_mod = &ec_GFp_mod; - meth->field_mul = &ec_GFp_mul; - meth->field_sqr = &ec_GFp_sqr; - meth->field_div = &ec_GFp_div; - meth->field_enc = NULL; - meth->field_dec = NULL; - meth->extra1 = NULL; - meth->extra2 = NULL; - meth->extra_free = NULL; - - CLEANUP: - if (res != MP_OKAY) { - GFMethod_free(meth); - return NULL; - } - return meth; -} - -/* Construct a generic GFMethod for arithmetic over binary polynomial - * fields with irreducible irr that has array representation irr_arr (see - * ecl-priv.h for description of the representation). If irr_arr is NULL, - * then it is constructed from the bitstring representation. */ -GFMethod * -GFMethod_consGF2m(const mp_int *irr, const unsigned int irr_arr[5]) -{ - mp_err res = MP_OKAY; - int ret; - GFMethod *meth = NULL; - - meth = GFMethod_new(FLAG(irr)); - if (meth == NULL) - return NULL; - - MP_CHECKOK(mp_copy(irr, &meth->irr)); - if (irr_arr != NULL) { - /* Irreducible polynomials are either trinomials or pentanomials. */ - meth->irr_arr[0] = irr_arr[0]; - meth->irr_arr[1] = irr_arr[1]; - meth->irr_arr[2] = irr_arr[2]; - if (irr_arr[2] > 0) { - meth->irr_arr[3] = irr_arr[3]; - meth->irr_arr[4] = irr_arr[4]; - } else { - meth->irr_arr[3] = meth->irr_arr[4] = 0; - } - } else { - ret = mp_bpoly2arr(irr, meth->irr_arr, 5); - /* Irreducible polynomials are either trinomials or pentanomials. */ - if ((ret != 5) && (ret != 3)) { - res = MP_UNDEF; - goto CLEANUP; - } - } - meth->field_add = &ec_GF2m_add; - meth->field_neg = &ec_GF2m_neg; - meth->field_sub = &ec_GF2m_add; - meth->field_mod = &ec_GF2m_mod; - meth->field_mul = &ec_GF2m_mul; - meth->field_sqr = &ec_GF2m_sqr; - meth->field_div = &ec_GF2m_div; - meth->field_enc = NULL; - meth->field_dec = NULL; - meth->extra1 = NULL; - meth->extra2 = NULL; - meth->extra_free = NULL; - - CLEANUP: - if (res != MP_OKAY) { - GFMethod_free(meth); - return NULL; - } - return meth; -} - -/* Free the memory allocated (if any) to a GFMethod object. */ -void -GFMethod_free(GFMethod *meth) -{ - if (meth == NULL) - return; - if (meth->constructed == MP_NO) - return; - mp_clear(&meth->irr); - if (meth->extra_free != NULL) - meth->extra_free(meth); -#ifdef _KERNEL - kmem_free(meth, sizeof(GFMethod)); -#else - free(meth); -#endif -} - -/* Wrapper functions for generic prime field arithmetic. */ - -/* Add two field elements. Assumes that 0 <= a, b < meth->irr */ -mp_err -ec_GFp_add(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - /* PRE: 0 <= a, b < p = meth->irr POST: 0 <= r < p, r = a + b (mod p) */ - mp_err res; - - if ((res = mp_add(a, b, r)) != MP_OKAY) { - return res; - } - if (mp_cmp(r, &meth->irr) >= 0) { - return mp_sub(r, &meth->irr, r); - } - return res; -} - -/* Negates a field element. Assumes that 0 <= a < meth->irr */ -mp_err -ec_GFp_neg(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - /* PRE: 0 <= a < p = meth->irr POST: 0 <= r < p, r = -a (mod p) */ - - if (mp_cmp_z(a) == 0) { - mp_zero(r); - return MP_OKAY; - } - return mp_sub(&meth->irr, a, r); -} - -/* Subtracts two field elements. Assumes that 0 <= a, b < meth->irr */ -mp_err -ec_GFp_sub(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - - /* PRE: 0 <= a, b < p = meth->irr POST: 0 <= r < p, r = a - b (mod p) */ - res = mp_sub(a, b, r); - if (res == MP_RANGE) { - MP_CHECKOK(mp_sub(b, a, r)); - if (mp_cmp_z(r) < 0) { - MP_CHECKOK(mp_add(r, &meth->irr, r)); - } - MP_CHECKOK(ec_GFp_neg(r, r, meth)); - } - if (mp_cmp_z(r) < 0) { - MP_CHECKOK(mp_add(r, &meth->irr, r)); - } - CLEANUP: - return res; -} -/* - * Inline adds for small curve lengths. - */ -/* 3 words */ -mp_err -ec_GFp_add_3(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit a0 = 0, a1 = 0, a2 = 0; - mp_digit r0 = 0, r1 = 0, r2 = 0; - mp_digit carry; - - switch(MP_USED(a)) { - case 3: - a2 = MP_DIGIT(a,2); - case 2: - a1 = MP_DIGIT(a,1); - case 1: - a0 = MP_DIGIT(a,0); - } - switch(MP_USED(b)) { - case 3: - r2 = MP_DIGIT(b,2); - case 2: - r1 = MP_DIGIT(b,1); - case 1: - r0 = MP_DIGIT(b,0); - } - -#ifndef MPI_AMD64_ADD - MP_ADD_CARRY_ZERO(a0, r0, r0, carry); - MP_ADD_CARRY(a1, r1, r1, carry, carry); - MP_ADD_CARRY(a2, r2, r2, carry, carry); -#else - __asm__ ( - "xorq %3,%3 \n\t" - "addq %4,%0 \n\t" - "adcq %5,%1 \n\t" - "adcq %6,%2 \n\t" - "adcq $0,%3 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(carry) - : "r" (a0), "r" (a1), "r" (a2), - "0" (r0), "1" (r1), "2" (r2) - : "%cc" ); -#endif - - MP_CHECKOK(s_mp_pad(r, 3)); - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 3; - - /* Do quick 'subract' if we've gone over - * (add the 2's complement of the curve field) */ - a2 = MP_DIGIT(&meth->irr,2); - if (carry || r2 > a2 || - ((r2 == a2) && mp_cmp(r,&meth->irr) != MP_LT)) { - a1 = MP_DIGIT(&meth->irr,1); - a0 = MP_DIGIT(&meth->irr,0); -#ifndef MPI_AMD64_ADD - MP_SUB_BORROW(r0, a0, r0, 0, carry); - MP_SUB_BORROW(r1, a1, r1, carry, carry); - MP_SUB_BORROW(r2, a2, r2, carry, carry); -#else - __asm__ ( - "subq %3,%0 \n\t" - "sbbq %4,%1 \n\t" - "sbbq %5,%2 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2) - : "r" (a0), "r" (a1), "r" (a2), - "0" (r0), "1" (r1), "2" (r2) - : "%cc" ); -#endif - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - } - - s_mp_clamp(r); - - CLEANUP: - return res; -} - -/* 4 words */ -mp_err -ec_GFp_add_4(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit a0 = 0, a1 = 0, a2 = 0, a3 = 0; - mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0; - mp_digit carry; - - switch(MP_USED(a)) { - case 4: - a3 = MP_DIGIT(a,3); - case 3: - a2 = MP_DIGIT(a,2); - case 2: - a1 = MP_DIGIT(a,1); - case 1: - a0 = MP_DIGIT(a,0); - } - switch(MP_USED(b)) { - case 4: - r3 = MP_DIGIT(b,3); - case 3: - r2 = MP_DIGIT(b,2); - case 2: - r1 = MP_DIGIT(b,1); - case 1: - r0 = MP_DIGIT(b,0); - } - -#ifndef MPI_AMD64_ADD - MP_ADD_CARRY_ZERO(a0, r0, r0, carry); - MP_ADD_CARRY(a1, r1, r1, carry, carry); - MP_ADD_CARRY(a2, r2, r2, carry, carry); - MP_ADD_CARRY(a3, r3, r3, carry, carry); -#else - __asm__ ( - "xorq %4,%4 \n\t" - "addq %5,%0 \n\t" - "adcq %6,%1 \n\t" - "adcq %7,%2 \n\t" - "adcq %8,%3 \n\t" - "adcq $0,%4 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3), "=r"(carry) - : "r" (a0), "r" (a1), "r" (a2), "r" (a3), - "0" (r0), "1" (r1), "2" (r2), "3" (r3) - : "%cc" ); -#endif - - MP_CHECKOK(s_mp_pad(r, 4)); - MP_DIGIT(r, 3) = r3; - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 4; - - /* Do quick 'subract' if we've gone over - * (add the 2's complement of the curve field) */ - a3 = MP_DIGIT(&meth->irr,3); - if (carry || r3 > a3 || - ((r3 == a3) && mp_cmp(r,&meth->irr) != MP_LT)) { - a2 = MP_DIGIT(&meth->irr,2); - a1 = MP_DIGIT(&meth->irr,1); - a0 = MP_DIGIT(&meth->irr,0); -#ifndef MPI_AMD64_ADD - MP_SUB_BORROW(r0, a0, r0, 0, carry); - MP_SUB_BORROW(r1, a1, r1, carry, carry); - MP_SUB_BORROW(r2, a2, r2, carry, carry); - MP_SUB_BORROW(r3, a3, r3, carry, carry); -#else - __asm__ ( - "subq %4,%0 \n\t" - "sbbq %5,%1 \n\t" - "sbbq %6,%2 \n\t" - "sbbq %7,%3 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3) - : "r" (a0), "r" (a1), "r" (a2), "r" (a3), - "0" (r0), "1" (r1), "2" (r2), "3" (r3) - : "%cc" ); -#endif - MP_DIGIT(r, 3) = r3; - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - } - - s_mp_clamp(r); - - CLEANUP: - return res; -} - -/* 5 words */ -mp_err -ec_GFp_add_5(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit a0 = 0, a1 = 0, a2 = 0, a3 = 0, a4 = 0; - mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0; - mp_digit carry; - - switch(MP_USED(a)) { - case 5: - a4 = MP_DIGIT(a,4); - case 4: - a3 = MP_DIGIT(a,3); - case 3: - a2 = MP_DIGIT(a,2); - case 2: - a1 = MP_DIGIT(a,1); - case 1: - a0 = MP_DIGIT(a,0); - } - switch(MP_USED(b)) { - case 5: - r4 = MP_DIGIT(b,4); - case 4: - r3 = MP_DIGIT(b,3); - case 3: - r2 = MP_DIGIT(b,2); - case 2: - r1 = MP_DIGIT(b,1); - case 1: - r0 = MP_DIGIT(b,0); - } - - MP_ADD_CARRY_ZERO(a0, r0, r0, carry); - MP_ADD_CARRY(a1, r1, r1, carry, carry); - MP_ADD_CARRY(a2, r2, r2, carry, carry); - MP_ADD_CARRY(a3, r3, r3, carry, carry); - MP_ADD_CARRY(a4, r4, r4, carry, carry); - - MP_CHECKOK(s_mp_pad(r, 5)); - MP_DIGIT(r, 4) = r4; - MP_DIGIT(r, 3) = r3; - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 5; - - /* Do quick 'subract' if we've gone over - * (add the 2's complement of the curve field) */ - a4 = MP_DIGIT(&meth->irr,4); - if (carry || r4 > a4 || - ((r4 == a4) && mp_cmp(r,&meth->irr) != MP_LT)) { - a3 = MP_DIGIT(&meth->irr,3); - a2 = MP_DIGIT(&meth->irr,2); - a1 = MP_DIGIT(&meth->irr,1); - a0 = MP_DIGIT(&meth->irr,0); - MP_SUB_BORROW(r0, a0, r0, 0, carry); - MP_SUB_BORROW(r1, a1, r1, carry, carry); - MP_SUB_BORROW(r2, a2, r2, carry, carry); - MP_SUB_BORROW(r3, a3, r3, carry, carry); - MP_SUB_BORROW(r4, a4, r4, carry, carry); - MP_DIGIT(r, 4) = r4; - MP_DIGIT(r, 3) = r3; - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - } - - s_mp_clamp(r); - - CLEANUP: - return res; -} - -/* 6 words */ -mp_err -ec_GFp_add_6(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit a0 = 0, a1 = 0, a2 = 0, a3 = 0, a4 = 0, a5 = 0; - mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0, r5 = 0; - mp_digit carry; - - switch(MP_USED(a)) { - case 6: - a5 = MP_DIGIT(a,5); - case 5: - a4 = MP_DIGIT(a,4); - case 4: - a3 = MP_DIGIT(a,3); - case 3: - a2 = MP_DIGIT(a,2); - case 2: - a1 = MP_DIGIT(a,1); - case 1: - a0 = MP_DIGIT(a,0); - } - switch(MP_USED(b)) { - case 6: - r5 = MP_DIGIT(b,5); - case 5: - r4 = MP_DIGIT(b,4); - case 4: - r3 = MP_DIGIT(b,3); - case 3: - r2 = MP_DIGIT(b,2); - case 2: - r1 = MP_DIGIT(b,1); - case 1: - r0 = MP_DIGIT(b,0); - } - - MP_ADD_CARRY_ZERO(a0, r0, r0, carry); - MP_ADD_CARRY(a1, r1, r1, carry, carry); - MP_ADD_CARRY(a2, r2, r2, carry, carry); - MP_ADD_CARRY(a3, r3, r3, carry, carry); - MP_ADD_CARRY(a4, r4, r4, carry, carry); - MP_ADD_CARRY(a5, r5, r5, carry, carry); - - MP_CHECKOK(s_mp_pad(r, 6)); - MP_DIGIT(r, 5) = r5; - MP_DIGIT(r, 4) = r4; - MP_DIGIT(r, 3) = r3; - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 6; - - /* Do quick 'subract' if we've gone over - * (add the 2's complement of the curve field) */ - a5 = MP_DIGIT(&meth->irr,5); - if (carry || r5 > a5 || - ((r5 == a5) && mp_cmp(r,&meth->irr) != MP_LT)) { - a4 = MP_DIGIT(&meth->irr,4); - a3 = MP_DIGIT(&meth->irr,3); - a2 = MP_DIGIT(&meth->irr,2); - a1 = MP_DIGIT(&meth->irr,1); - a0 = MP_DIGIT(&meth->irr,0); - MP_SUB_BORROW(r0, a0, r0, 0, carry); - MP_SUB_BORROW(r1, a1, r1, carry, carry); - MP_SUB_BORROW(r2, a2, r2, carry, carry); - MP_SUB_BORROW(r3, a3, r3, carry, carry); - MP_SUB_BORROW(r4, a4, r4, carry, carry); - MP_SUB_BORROW(r5, a5, r5, carry, carry); - MP_DIGIT(r, 5) = r5; - MP_DIGIT(r, 4) = r4; - MP_DIGIT(r, 3) = r3; - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - } - - s_mp_clamp(r); - - CLEANUP: - return res; -} - -/* - * The following subraction functions do in-line subractions based - * on our curve size. - * - * ... 3 words - */ -mp_err -ec_GFp_sub_3(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit b0 = 0, b1 = 0, b2 = 0; - mp_digit r0 = 0, r1 = 0, r2 = 0; - mp_digit borrow; - - switch(MP_USED(a)) { - case 3: - r2 = MP_DIGIT(a,2); - case 2: - r1 = MP_DIGIT(a,1); - case 1: - r0 = MP_DIGIT(a,0); - } - switch(MP_USED(b)) { - case 3: - b2 = MP_DIGIT(b,2); - case 2: - b1 = MP_DIGIT(b,1); - case 1: - b0 = MP_DIGIT(b,0); - } - -#ifndef MPI_AMD64_ADD - MP_SUB_BORROW(r0, b0, r0, 0, borrow); - MP_SUB_BORROW(r1, b1, r1, borrow, borrow); - MP_SUB_BORROW(r2, b2, r2, borrow, borrow); -#else - __asm__ ( - "xorq %3,%3 \n\t" - "subq %4,%0 \n\t" - "sbbq %5,%1 \n\t" - "sbbq %6,%2 \n\t" - "adcq $0,%3 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2), "=r" (borrow) - : "r" (b0), "r" (b1), "r" (b2), - "0" (r0), "1" (r1), "2" (r2) - : "%cc" ); -#endif - - /* Do quick 'add' if we've gone under 0 - * (subtract the 2's complement of the curve field) */ - if (borrow) { - b2 = MP_DIGIT(&meth->irr,2); - b1 = MP_DIGIT(&meth->irr,1); - b0 = MP_DIGIT(&meth->irr,0); -#ifndef MPI_AMD64_ADD - MP_ADD_CARRY_ZERO(b0, r0, r0, borrow); - MP_ADD_CARRY(b1, r1, r1, borrow, borrow); - MP_ADD_CARRY(b2, r2, r2, borrow, borrow); -#else - __asm__ ( - "addq %3,%0 \n\t" - "adcq %4,%1 \n\t" - "adcq %5,%2 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2) - : "r" (b0), "r" (b1), "r" (b2), - "0" (r0), "1" (r1), "2" (r2) - : "%cc" ); -#endif - } - -#ifdef MPI_AMD64_ADD - /* compiler fakeout? */ - if ((r2 == b0) && (r1 == b0) && (r0 == b0)) { - MP_CHECKOK(s_mp_pad(r, 4)); - } -#endif - MP_CHECKOK(s_mp_pad(r, 3)); - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 3; - s_mp_clamp(r); - - CLEANUP: - return res; -} - -/* 4 words */ -mp_err -ec_GFp_sub_4(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit b0 = 0, b1 = 0, b2 = 0, b3 = 0; - mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0; - mp_digit borrow; - - switch(MP_USED(a)) { - case 4: - r3 = MP_DIGIT(a,3); - case 3: - r2 = MP_DIGIT(a,2); - case 2: - r1 = MP_DIGIT(a,1); - case 1: - r0 = MP_DIGIT(a,0); - } - switch(MP_USED(b)) { - case 4: - b3 = MP_DIGIT(b,3); - case 3: - b2 = MP_DIGIT(b,2); - case 2: - b1 = MP_DIGIT(b,1); - case 1: - b0 = MP_DIGIT(b,0); - } - -#ifndef MPI_AMD64_ADD - MP_SUB_BORROW(r0, b0, r0, 0, borrow); - MP_SUB_BORROW(r1, b1, r1, borrow, borrow); - MP_SUB_BORROW(r2, b2, r2, borrow, borrow); - MP_SUB_BORROW(r3, b3, r3, borrow, borrow); -#else - __asm__ ( - "xorq %4,%4 \n\t" - "subq %5,%0 \n\t" - "sbbq %6,%1 \n\t" - "sbbq %7,%2 \n\t" - "sbbq %8,%3 \n\t" - "adcq $0,%4 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3), "=r" (borrow) - : "r" (b0), "r" (b1), "r" (b2), "r" (b3), - "0" (r0), "1" (r1), "2" (r2), "3" (r3) - : "%cc" ); -#endif - - /* Do quick 'add' if we've gone under 0 - * (subtract the 2's complement of the curve field) */ - if (borrow) { - b3 = MP_DIGIT(&meth->irr,3); - b2 = MP_DIGIT(&meth->irr,2); - b1 = MP_DIGIT(&meth->irr,1); - b0 = MP_DIGIT(&meth->irr,0); -#ifndef MPI_AMD64_ADD - MP_ADD_CARRY_ZERO(b0, r0, r0, borrow); - MP_ADD_CARRY(b1, r1, r1, borrow, borrow); - MP_ADD_CARRY(b2, r2, r2, borrow, borrow); - MP_ADD_CARRY(b3, r3, r3, borrow, borrow); -#else - __asm__ ( - "addq %4,%0 \n\t" - "adcq %5,%1 \n\t" - "adcq %6,%2 \n\t" - "adcq %7,%3 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3) - : "r" (b0), "r" (b1), "r" (b2), "r" (b3), - "0" (r0), "1" (r1), "2" (r2), "3" (r3) - : "%cc" ); -#endif - } -#ifdef MPI_AMD64_ADD - /* compiler fakeout? */ - if ((r3 == b0) && (r1 == b0) && (r0 == b0)) { - MP_CHECKOK(s_mp_pad(r, 4)); - } -#endif - MP_CHECKOK(s_mp_pad(r, 4)); - MP_DIGIT(r, 3) = r3; - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 4; - s_mp_clamp(r); - - CLEANUP: - return res; -} - -/* 5 words */ -mp_err -ec_GFp_sub_5(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit b0 = 0, b1 = 0, b2 = 0, b3 = 0, b4 = 0; - mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0; - mp_digit borrow; - - switch(MP_USED(a)) { - case 5: - r4 = MP_DIGIT(a,4); - case 4: - r3 = MP_DIGIT(a,3); - case 3: - r2 = MP_DIGIT(a,2); - case 2: - r1 = MP_DIGIT(a,1); - case 1: - r0 = MP_DIGIT(a,0); - } - switch(MP_USED(b)) { - case 5: - b4 = MP_DIGIT(b,4); - case 4: - b3 = MP_DIGIT(b,3); - case 3: - b2 = MP_DIGIT(b,2); - case 2: - b1 = MP_DIGIT(b,1); - case 1: - b0 = MP_DIGIT(b,0); - } - - MP_SUB_BORROW(r0, b0, r0, 0, borrow); - MP_SUB_BORROW(r1, b1, r1, borrow, borrow); - MP_SUB_BORROW(r2, b2, r2, borrow, borrow); - MP_SUB_BORROW(r3, b3, r3, borrow, borrow); - MP_SUB_BORROW(r4, b4, r4, borrow, borrow); - - /* Do quick 'add' if we've gone under 0 - * (subtract the 2's complement of the curve field) */ - if (borrow) { - b4 = MP_DIGIT(&meth->irr,4); - b3 = MP_DIGIT(&meth->irr,3); - b2 = MP_DIGIT(&meth->irr,2); - b1 = MP_DIGIT(&meth->irr,1); - b0 = MP_DIGIT(&meth->irr,0); - MP_ADD_CARRY_ZERO(b0, r0, r0, borrow); - MP_ADD_CARRY(b1, r1, r1, borrow, borrow); - MP_ADD_CARRY(b2, r2, r2, borrow, borrow); - MP_ADD_CARRY(b3, r3, r3, borrow, borrow); - MP_ADD_CARRY(b4, r4, r4, borrow, borrow); - } - MP_CHECKOK(s_mp_pad(r, 5)); - MP_DIGIT(r, 4) = r4; - MP_DIGIT(r, 3) = r3; - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 5; - s_mp_clamp(r); - - CLEANUP: - return res; -} - -/* 6 words */ -mp_err -ec_GFp_sub_6(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit b0 = 0, b1 = 0, b2 = 0, b3 = 0, b4 = 0, b5 = 0; - mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0, r5 = 0; - mp_digit borrow; - - switch(MP_USED(a)) { - case 6: - r5 = MP_DIGIT(a,5); - case 5: - r4 = MP_DIGIT(a,4); - case 4: - r3 = MP_DIGIT(a,3); - case 3: - r2 = MP_DIGIT(a,2); - case 2: - r1 = MP_DIGIT(a,1); - case 1: - r0 = MP_DIGIT(a,0); - } - switch(MP_USED(b)) { - case 6: - b5 = MP_DIGIT(b,5); - case 5: - b4 = MP_DIGIT(b,4); - case 4: - b3 = MP_DIGIT(b,3); - case 3: - b2 = MP_DIGIT(b,2); - case 2: - b1 = MP_DIGIT(b,1); - case 1: - b0 = MP_DIGIT(b,0); - } - - MP_SUB_BORROW(r0, b0, r0, 0, borrow); - MP_SUB_BORROW(r1, b1, r1, borrow, borrow); - MP_SUB_BORROW(r2, b2, r2, borrow, borrow); - MP_SUB_BORROW(r3, b3, r3, borrow, borrow); - MP_SUB_BORROW(r4, b4, r4, borrow, borrow); - MP_SUB_BORROW(r5, b5, r5, borrow, borrow); - - /* Do quick 'add' if we've gone under 0 - * (subtract the 2's complement of the curve field) */ - if (borrow) { - b5 = MP_DIGIT(&meth->irr,5); - b4 = MP_DIGIT(&meth->irr,4); - b3 = MP_DIGIT(&meth->irr,3); - b2 = MP_DIGIT(&meth->irr,2); - b1 = MP_DIGIT(&meth->irr,1); - b0 = MP_DIGIT(&meth->irr,0); - MP_ADD_CARRY_ZERO(b0, r0, r0, borrow); - MP_ADD_CARRY(b1, r1, r1, borrow, borrow); - MP_ADD_CARRY(b2, r2, r2, borrow, borrow); - MP_ADD_CARRY(b3, r3, r3, borrow, borrow); - MP_ADD_CARRY(b4, r4, r4, borrow, borrow); - MP_ADD_CARRY(b5, r5, r5, borrow, borrow); - } - - MP_CHECKOK(s_mp_pad(r, 6)); - MP_DIGIT(r, 5) = r5; - MP_DIGIT(r, 4) = r4; - MP_DIGIT(r, 3) = r3; - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 6; - s_mp_clamp(r); - - CLEANUP: - return res; -} - - -/* Reduces an integer to a field element. */ -mp_err -ec_GFp_mod(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - return mp_mod(a, &meth->irr, r); -} - -/* Multiplies two field elements. */ -mp_err -ec_GFp_mul(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - return mp_mulmod(a, b, &meth->irr, r); -} - -/* Squares a field element. */ -mp_err -ec_GFp_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - return mp_sqrmod(a, &meth->irr, r); -} - -/* Divides two field elements. If a is NULL, then returns the inverse of - * b. */ -mp_err -ec_GFp_div(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_int t; - - /* If a is NULL, then return the inverse of b, otherwise return a/b. */ - if (a == NULL) { - return mp_invmod(b, &meth->irr, r); - } else { - /* MPI doesn't support divmod, so we implement it using invmod and - * mulmod. */ - MP_CHECKOK(mp_init(&t, FLAG(b))); - MP_CHECKOK(mp_invmod(b, &meth->irr, &t)); - MP_CHECKOK(mp_mulmod(a, &t, &meth->irr, r)); - CLEANUP: - mp_clear(&t); - return res; - } -} - -/* Wrapper functions for generic binary polynomial field arithmetic. */ - -/* Adds two field elements. */ -mp_err -ec_GF2m_add(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - return mp_badd(a, b, r); -} - -/* Negates a field element. Note that for binary polynomial fields, the - * negation of a field element is the field element itself. */ -mp_err -ec_GF2m_neg(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - if (a == r) { - return MP_OKAY; - } else { - return mp_copy(a, r); - } -} - -/* Reduces a binary polynomial to a field element. */ -mp_err -ec_GF2m_mod(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - return mp_bmod(a, meth->irr_arr, r); -} - -/* Multiplies two field elements. */ -mp_err -ec_GF2m_mul(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - return mp_bmulmod(a, b, meth->irr_arr, r); -} - -/* Squares a field element. */ -mp_err -ec_GF2m_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - return mp_bsqrmod(a, meth->irr_arr, r); -} - -/* Divides two field elements. If a is NULL, then returns the inverse of - * b. */ -mp_err -ec_GF2m_div(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_int t; - - /* If a is NULL, then return the inverse of b, otherwise return a/b. */ - if (a == NULL) { - /* The GF(2^m) portion of MPI doesn't support invmod, so we - * compute 1/b. */ - MP_CHECKOK(mp_init(&t, FLAG(b))); - MP_CHECKOK(mp_set_int(&t, 1)); - MP_CHECKOK(mp_bdivmod(&t, b, &meth->irr, meth->irr_arr, r)); - CLEANUP: - mp_clear(&t); - return res; - } else { - return mp_bdivmod(a, b, &meth->irr, meth->irr_arr, r); - } -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl_mult.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecl_mult.c deleted file mode 100644 index 316dd0c9d56..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecl_mult.c +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - * Last Modified Date from the Original Code: May 2017 - *********************************************************************** */ - -#include "mpi.h" -#include "mplogic.h" -#include "ecl.h" -#include "ecl-priv.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k * P(x, - * y). If x, y = NULL, then P is assumed to be the generator (base point) - * of the group of points on the elliptic curve. Input and output values - * are assumed to be NOT field-encoded. */ -mp_err -ECPoint_mul(const ECGroup *group, const mp_int *k, const mp_int *px, - const mp_int *py, mp_int *rx, mp_int *ry, - int timing) -{ - mp_err res = MP_OKAY; - mp_int kt; - - ARGCHK((k != NULL) && (group != NULL), MP_BADARG); - MP_DIGITS(&kt) = 0; - - /* want scalar to be less than or equal to group order */ - if (mp_cmp(k, &group->order) > 0) { - MP_CHECKOK(mp_init(&kt, FLAG(k))); - MP_CHECKOK(mp_mod(k, &group->order, &kt)); - } else { - MP_SIGN(&kt) = MP_ZPOS; - MP_USED(&kt) = MP_USED(k); - MP_ALLOC(&kt) = MP_ALLOC(k); - MP_DIGITS(&kt) = MP_DIGITS(k); - } - - if ((px == NULL) || (py == NULL)) { - if (group->base_point_mul) { - MP_CHECKOK(group->base_point_mul(&kt, rx, ry, group)); - } else { - kt.flag = (mp_sign)0; - MP_CHECKOK(group-> - point_mul(&kt, &group->genx, &group->geny, rx, ry, - group, timing)); - } - } else { - kt.flag = (mp_sign)0; - if (group->meth->field_enc) { - MP_CHECKOK(group->meth->field_enc(px, rx, group->meth)); - MP_CHECKOK(group->meth->field_enc(py, ry, group->meth)); - MP_CHECKOK(group->point_mul(&kt, rx, ry, rx, ry, group, timing)); - } else { - MP_CHECKOK(group->point_mul(&kt, px, py, rx, ry, group, timing)); - } - } - if (group->meth->field_dec) { - MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth)); - MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth)); - } - - CLEANUP: - if (MP_DIGITS(&kt) != MP_DIGITS(k)) { - mp_clear(&kt); - } - return res; -} - -/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G + - * k2 * P(x, y), where G is the generator (base point) of the group of - * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL. - * Input and output values are assumed to be NOT field-encoded. */ -mp_err -ec_pts_mul_basic(const mp_int *k1, const mp_int *k2, const mp_int *px, - const mp_int *py, mp_int *rx, mp_int *ry, - const ECGroup *group, int timing) -{ - mp_err res = MP_OKAY; - mp_int sx, sy; - - ARGCHK(group != NULL, MP_BADARG); - ARGCHK(!((k1 == NULL) - && ((k2 == NULL) || (px == NULL) - || (py == NULL))), MP_BADARG); - - /* if some arguments are not defined used ECPoint_mul */ - if (k1 == NULL) { - return ECPoint_mul(group, k2, px, py, rx, ry, timing); - } else if ((k2 == NULL) || (px == NULL) || (py == NULL)) { - return ECPoint_mul(group, k1, NULL, NULL, rx, ry, timing); - } - - MP_DIGITS(&sx) = 0; - MP_DIGITS(&sy) = 0; - MP_CHECKOK(mp_init(&sx, FLAG(k1))); - MP_CHECKOK(mp_init(&sy, FLAG(k1))); - - MP_CHECKOK(ECPoint_mul(group, k1, NULL, NULL, &sx, &sy, timing)); - MP_CHECKOK(ECPoint_mul(group, k2, px, py, rx, ry, timing)); - - if (group->meth->field_enc) { - MP_CHECKOK(group->meth->field_enc(&sx, &sx, group->meth)); - MP_CHECKOK(group->meth->field_enc(&sy, &sy, group->meth)); - MP_CHECKOK(group->meth->field_enc(rx, rx, group->meth)); - MP_CHECKOK(group->meth->field_enc(ry, ry, group->meth)); - } - - MP_CHECKOK(group->point_add(&sx, &sy, rx, ry, rx, ry, group)); - - if (group->meth->field_dec) { - MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth)); - MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth)); - } - - CLEANUP: - mp_clear(&sx); - mp_clear(&sy); - return res; -} - -/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G + - * k2 * P(x, y), where G is the generator (base point) of the group of - * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL. - * Input and output values are assumed to be NOT field-encoded. Uses - * algorithm 15 (simultaneous multiple point multiplication) from Brown, - * Hankerson, Lopez, Menezes. Software Implementation of the NIST - * Elliptic Curves over Prime Fields. */ -mp_err -ec_pts_mul_simul_w2(const mp_int *k1, const mp_int *k2, const mp_int *px, - const mp_int *py, mp_int *rx, mp_int *ry, - const ECGroup *group, int timing) -{ - mp_err res = MP_OKAY; - mp_int precomp[4][4][2]; - const mp_int *a, *b; - int i, j; - int ai, bi, d; - - ARGCHK(group != NULL, MP_BADARG); - ARGCHK(!((k1 == NULL) - && ((k2 == NULL) || (px == NULL) - || (py == NULL))), MP_BADARG); - - /* if some arguments are not defined used ECPoint_mul */ - if (k1 == NULL) { - return ECPoint_mul(group, k2, px, py, rx, ry, timing); - } else if ((k2 == NULL) || (px == NULL) || (py == NULL)) { - return ECPoint_mul(group, k1, NULL, NULL, rx, ry, timing); - } - - /* initialize precomputation table */ - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - MP_DIGITS(&precomp[i][j][0]) = 0; - MP_DIGITS(&precomp[i][j][1]) = 0; - } - } - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - MP_CHECKOK( mp_init_size(&precomp[i][j][0], - ECL_MAX_FIELD_SIZE_DIGITS, FLAG(k1)) ); - MP_CHECKOK( mp_init_size(&precomp[i][j][1], - ECL_MAX_FIELD_SIZE_DIGITS, FLAG(k1)) ); - } - } - - /* fill precomputation table */ - /* assign {k1, k2} = {a, b} such that len(a) >= len(b) */ - if (mpl_significant_bits(k1) < mpl_significant_bits(k2)) { - a = k2; - b = k1; - if (group->meth->field_enc) { - MP_CHECKOK(group->meth-> - field_enc(px, &precomp[1][0][0], group->meth)); - MP_CHECKOK(group->meth-> - field_enc(py, &precomp[1][0][1], group->meth)); - } else { - MP_CHECKOK(mp_copy(px, &precomp[1][0][0])); - MP_CHECKOK(mp_copy(py, &precomp[1][0][1])); - } - MP_CHECKOK(mp_copy(&group->genx, &precomp[0][1][0])); - MP_CHECKOK(mp_copy(&group->geny, &precomp[0][1][1])); - } else { - a = k1; - b = k2; - MP_CHECKOK(mp_copy(&group->genx, &precomp[1][0][0])); - MP_CHECKOK(mp_copy(&group->geny, &precomp[1][0][1])); - if (group->meth->field_enc) { - MP_CHECKOK(group->meth-> - field_enc(px, &precomp[0][1][0], group->meth)); - MP_CHECKOK(group->meth-> - field_enc(py, &precomp[0][1][1], group->meth)); - } else { - MP_CHECKOK(mp_copy(px, &precomp[0][1][0])); - MP_CHECKOK(mp_copy(py, &precomp[0][1][1])); - } - } - /* precompute [*][0][*] */ - mp_zero(&precomp[0][0][0]); - mp_zero(&precomp[0][0][1]); - MP_CHECKOK(group-> - point_dbl(&precomp[1][0][0], &precomp[1][0][1], - &precomp[2][0][0], &precomp[2][0][1], group)); - MP_CHECKOK(group-> - point_add(&precomp[1][0][0], &precomp[1][0][1], - &precomp[2][0][0], &precomp[2][0][1], - &precomp[3][0][0], &precomp[3][0][1], group)); - /* precompute [*][1][*] */ - for (i = 1; i < 4; i++) { - MP_CHECKOK(group-> - point_add(&precomp[0][1][0], &precomp[0][1][1], - &precomp[i][0][0], &precomp[i][0][1], - &precomp[i][1][0], &precomp[i][1][1], group)); - } - /* precompute [*][2][*] */ - MP_CHECKOK(group-> - point_dbl(&precomp[0][1][0], &precomp[0][1][1], - &precomp[0][2][0], &precomp[0][2][1], group)); - for (i = 1; i < 4; i++) { - MP_CHECKOK(group-> - point_add(&precomp[0][2][0], &precomp[0][2][1], - &precomp[i][0][0], &precomp[i][0][1], - &precomp[i][2][0], &precomp[i][2][1], group)); - } - /* precompute [*][3][*] */ - MP_CHECKOK(group-> - point_add(&precomp[0][1][0], &precomp[0][1][1], - &precomp[0][2][0], &precomp[0][2][1], - &precomp[0][3][0], &precomp[0][3][1], group)); - for (i = 1; i < 4; i++) { - MP_CHECKOK(group-> - point_add(&precomp[0][3][0], &precomp[0][3][1], - &precomp[i][0][0], &precomp[i][0][1], - &precomp[i][3][0], &precomp[i][3][1], group)); - } - - d = (mpl_significant_bits(a) + 1) / 2; - - /* R = inf */ - mp_zero(rx); - mp_zero(ry); - - for (i = d - 1; i >= 0; i--) { - ai = MP_GET_BIT(a, 2 * i + 1); - ai <<= 1; - ai |= MP_GET_BIT(a, 2 * i); - bi = MP_GET_BIT(b, 2 * i + 1); - bi <<= 1; - bi |= MP_GET_BIT(b, 2 * i); - /* R = 2^2 * R */ - MP_CHECKOK(group->point_dbl(rx, ry, rx, ry, group)); - MP_CHECKOK(group->point_dbl(rx, ry, rx, ry, group)); - /* R = R + (ai * A + bi * B) */ - MP_CHECKOK(group-> - point_add(rx, ry, &precomp[ai][bi][0], - &precomp[ai][bi][1], rx, ry, group)); - } - - if (group->meth->field_dec) { - MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth)); - MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth)); - } - - CLEANUP: - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - mp_clear(&precomp[i][j][0]); - mp_clear(&precomp[i][j][1]); - } - } - return res; -} - -/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G + - * k2 * P(x, y), where G is the generator (base point) of the group of - * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL. - * Input and output values are assumed to be NOT field-encoded. */ -mp_err -ECPoints_mul(const ECGroup *group, const mp_int *k1, const mp_int *k2, - const mp_int *px, const mp_int *py, mp_int *rx, mp_int *ry, - int timing) -{ - mp_err res = MP_OKAY; - mp_int k1t, k2t; - const mp_int *k1p, *k2p; - - MP_DIGITS(&k1t) = 0; - MP_DIGITS(&k2t) = 0; - - ARGCHK(group != NULL, MP_BADARG); - - /* want scalar to be less than or equal to group order */ - if (k1 != NULL) { - if (mp_cmp(k1, &group->order) >= 0) { - MP_CHECKOK(mp_init(&k1t, FLAG(k1))); - MP_CHECKOK(mp_mod(k1, &group->order, &k1t)); - k1p = &k1t; - } else { - k1p = k1; - } - } else { - k1p = k1; - } - if (k2 != NULL) { - if (mp_cmp(k2, &group->order) >= 0) { - MP_CHECKOK(mp_init(&k2t, FLAG(k2))); - MP_CHECKOK(mp_mod(k2, &group->order, &k2t)); - k2p = &k2t; - } else { - k2p = k2; - } - } else { - k2p = k2; - } - - /* if points_mul is defined, then use it */ - if (group->points_mul) { - res = group->points_mul(k1p, k2p, px, py, rx, ry, group, timing); - } else { - res = ec_pts_mul_simul_w2(k1p, k2p, px, py, rx, ry, group, timing); - } - - CLEANUP: - mp_clear(&k1t); - mp_clear(&k2t); - return res; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp.h b/src/jdk.crypto.ec/share/native/libsunec/impl/ecp.h deleted file mode 100644 index b367b909e80..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for prime field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - * Last Modified Date from the Original Code: May 2017 - *********************************************************************** */ - -#ifndef _ECP_H -#define _ECP_H - -#include "ecl-priv.h" - -/* Checks if point P(px, py) is at infinity. Uses affine coordinates. */ -mp_err ec_GFp_pt_is_inf_aff(const mp_int *px, const mp_int *py); - -/* Sets P(px, py) to be the point at infinity. Uses affine coordinates. */ -mp_err ec_GFp_pt_set_inf_aff(mp_int *px, mp_int *py); - -/* Computes R = P + Q where R is (rx, ry), P is (px, py) and Q is (qx, - * qy). Uses affine coordinates. */ -mp_err ec_GFp_pt_add_aff(const mp_int *px, const mp_int *py, - const mp_int *qx, const mp_int *qy, mp_int *rx, - mp_int *ry, const ECGroup *group); - -/* Computes R = P - Q. Uses affine coordinates. */ -mp_err ec_GFp_pt_sub_aff(const mp_int *px, const mp_int *py, - const mp_int *qx, const mp_int *qy, mp_int *rx, - mp_int *ry, const ECGroup *group); - -/* Computes R = 2P. Uses affine coordinates. */ -mp_err ec_GFp_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx, - mp_int *ry, const ECGroup *group); - -/* Validates a point on a GFp curve. */ -mp_err ec_GFp_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group); - -#ifdef ECL_ENABLE_GFP_PT_MUL_AFF -/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters - * a, b and p are the elliptic curve coefficients and the prime that - * determines the field GFp. Uses affine coordinates. */ -mp_err ec_GFp_pt_mul_aff(const mp_int *n, const mp_int *px, - const mp_int *py, mp_int *rx, mp_int *ry, - const ECGroup *group); -#endif - -/* Converts a point P(px, py) from affine coordinates to Jacobian - * projective coordinates R(rx, ry, rz). */ -mp_err ec_GFp_pt_aff2jac(const mp_int *px, const mp_int *py, mp_int *rx, - mp_int *ry, mp_int *rz, const ECGroup *group); - -/* Converts a point P(px, py, pz) from Jacobian projective coordinates to - * affine coordinates R(rx, ry). */ -mp_err ec_GFp_pt_jac2aff(const mp_int *px, const mp_int *py, - const mp_int *pz, mp_int *rx, mp_int *ry, - const ECGroup *group); - -/* Checks if point P(px, py, pz) is at infinity. Uses Jacobian - * coordinates. */ -mp_err ec_GFp_pt_is_inf_jac(const mp_int *px, const mp_int *py, - const mp_int *pz); - -/* Sets P(px, py, pz) to be the point at infinity. Uses Jacobian - * coordinates. */ -mp_err ec_GFp_pt_set_inf_jac(mp_int *px, mp_int *py, mp_int *pz); - -/* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is - * (qx, qy, qz). Uses Jacobian coordinates. */ -mp_err ec_GFp_pt_add_jac_aff(const mp_int *px, const mp_int *py, - const mp_int *pz, const mp_int *qx, - const mp_int *qy, mp_int *rx, mp_int *ry, - mp_int *rz, const ECGroup *group); - -/* Computes R = 2P. Uses Jacobian coordinates. */ -mp_err ec_GFp_pt_dbl_jac(const mp_int *px, const mp_int *py, - const mp_int *pz, mp_int *rx, mp_int *ry, - mp_int *rz, const ECGroup *group); - -#ifdef ECL_ENABLE_GFP_PT_MUL_JAC -/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters - * a, b and p are the elliptic curve coefficients and the prime that - * determines the field GFp. Uses Jacobian coordinates. */ -mp_err ec_GFp_pt_mul_jac(const mp_int *n, const mp_int *px, - const mp_int *py, mp_int *rx, mp_int *ry, - const ECGroup *group); -#endif - -/* Computes R(x, y) = k1 * G + k2 * P(x, y), where G is the generator - * (base point) of the group of points on the elliptic curve. Allows k1 = - * NULL or { k2, P } = NULL. Implemented using mixed Jacobian-affine - * coordinates. Input and output values are assumed to be NOT - * field-encoded and are in affine form. */ -mp_err - ec_GFp_pts_mul_jac(const mp_int *k1, const mp_int *k2, const mp_int *px, - const mp_int *py, mp_int *rx, mp_int *ry, - const ECGroup *group, int timing); - -/* Computes R = nP where R is (rx, ry) and P is the base point. Elliptic - * curve points P and R can be identical. Uses mixed Modified-Jacobian - * co-ordinates for doubling and Chudnovsky Jacobian coordinates for - * additions. Assumes input is already field-encoded using field_enc, and - * returns output that is still field-encoded. Uses 5-bit window NAF - * method (algorithm 11) for scalar-point multiplication from Brown, - * Hankerson, Lopez, Menezes. Software Implementation of the NIST Elliptic - * Curves Over Prime Fields. The implementation includes a countermeasure - * that attempts to hide the size of n from timing channels. This counter- - * measure is enabled using the timing argument. The high-rder bits of timing - * must be uniformly random in order for this countermeasure to work. */ -mp_err - ec_GFp_pt_mul_jm_wNAF(const mp_int *n, const mp_int *px, const mp_int *py, - mp_int *rx, mp_int *ry, const ECGroup *group, - int timing); - -#endif /* _ECP_H */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_192.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_192.c deleted file mode 100644 index 69b0d8571c0..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_192.c +++ /dev/null @@ -1,517 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for prime field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - *********************************************************************** */ - -#include "ecp.h" -#include "mpi.h" -#include "mplogic.h" -#include "mpi-priv.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -#define ECP192_DIGITS ECL_CURVE_DIGITS(192) - -/* Fast modular reduction for p192 = 2^192 - 2^64 - 1. a can be r. Uses - * algorithm 7 from Brown, Hankerson, Lopez, Menezes. Software - * Implementation of the NIST Elliptic Curves over Prime Fields. */ -mp_err -ec_GFp_nistp192_mod(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_size a_used = MP_USED(a); - mp_digit r3; -#ifndef MPI_AMD64_ADD - mp_digit carry; -#endif -#ifdef ECL_THIRTY_TWO_BIT - mp_digit a5a = 0, a5b = 0, a4a = 0, a4b = 0, a3a = 0, a3b = 0; - mp_digit r0a, r0b, r1a, r1b, r2a, r2b; -#else - mp_digit a5 = 0, a4 = 0, a3 = 0; - mp_digit r0, r1, r2; -#endif - - /* reduction not needed if a is not larger than field size */ - if (a_used < ECP192_DIGITS) { - if (a == r) { - return MP_OKAY; - } - return mp_copy(a, r); - } - - /* for polynomials larger than twice the field size, use regular - * reduction */ - if (a_used > ECP192_DIGITS*2) { - MP_CHECKOK(mp_mod(a, &meth->irr, r)); - } else { - /* copy out upper words of a */ - -#ifdef ECL_THIRTY_TWO_BIT - - /* in all the math below, - * nXb is most signifiant, nXa is least significant */ - switch (a_used) { - case 12: - a5b = MP_DIGIT(a, 11); - case 11: - a5a = MP_DIGIT(a, 10); - case 10: - a4b = MP_DIGIT(a, 9); - case 9: - a4a = MP_DIGIT(a, 8); - case 8: - a3b = MP_DIGIT(a, 7); - case 7: - a3a = MP_DIGIT(a, 6); - } - - - r2b= MP_DIGIT(a, 5); - r2a= MP_DIGIT(a, 4); - r1b = MP_DIGIT(a, 3); - r1a = MP_DIGIT(a, 2); - r0b = MP_DIGIT(a, 1); - r0a = MP_DIGIT(a, 0); - - /* implement r = (a2,a1,a0)+(a5,a5,a5)+(a4,a4,0)+(0,a3,a3) */ - MP_ADD_CARRY(r0a, a3a, r0a, 0, carry); - MP_ADD_CARRY(r0b, a3b, r0b, carry, carry); - MP_ADD_CARRY(r1a, a3a, r1a, carry, carry); - MP_ADD_CARRY(r1b, a3b, r1b, carry, carry); - MP_ADD_CARRY(r2a, a4a, r2a, carry, carry); - MP_ADD_CARRY(r2b, a4b, r2b, carry, carry); - r3 = carry; carry = 0; - MP_ADD_CARRY(r0a, a5a, r0a, 0, carry); - MP_ADD_CARRY(r0b, a5b, r0b, carry, carry); - MP_ADD_CARRY(r1a, a5a, r1a, carry, carry); - MP_ADD_CARRY(r1b, a5b, r1b, carry, carry); - MP_ADD_CARRY(r2a, a5a, r2a, carry, carry); - MP_ADD_CARRY(r2b, a5b, r2b, carry, carry); - r3 += carry; - MP_ADD_CARRY(r1a, a4a, r1a, 0, carry); - MP_ADD_CARRY(r1b, a4b, r1b, carry, carry); - MP_ADD_CARRY(r2a, 0, r2a, carry, carry); - MP_ADD_CARRY(r2b, 0, r2b, carry, carry); - r3 += carry; - - /* reduce out the carry */ - while (r3) { - MP_ADD_CARRY(r0a, r3, r0a, 0, carry); - MP_ADD_CARRY(r0b, 0, r0b, carry, carry); - MP_ADD_CARRY(r1a, r3, r1a, carry, carry); - MP_ADD_CARRY(r1b, 0, r1b, carry, carry); - MP_ADD_CARRY(r2a, 0, r2a, carry, carry); - MP_ADD_CARRY(r2b, 0, r2b, carry, carry); - r3 = carry; - } - - /* check for final reduction */ - /* - * our field is 0xffffffffffffffff, 0xfffffffffffffffe, - * 0xffffffffffffffff. That means we can only be over and need - * one more reduction - * if r2 == 0xffffffffffffffffff (same as r2+1 == 0) - * and - * r1 == 0xffffffffffffffffff or - * r1 == 0xfffffffffffffffffe and r0 = 0xfffffffffffffffff - * In all cases, we subtract the field (or add the 2's - * complement value (1,1,0)). (r0, r1, r2) - */ - if (((r2b == 0xffffffff) && (r2a == 0xffffffff) - && (r1b == 0xffffffff) ) && - ((r1a == 0xffffffff) || - (r1a == 0xfffffffe) && (r0a == 0xffffffff) && - (r0b == 0xffffffff)) ) { - /* do a quick subtract */ - MP_ADD_CARRY(r0a, 1, r0a, 0, carry); - r0b += carry; - r1a = r1b = r2a = r2b = 0; - } - - /* set the lower words of r */ - if (a != r) { - MP_CHECKOK(s_mp_pad(r, 6)); - } - MP_DIGIT(r, 5) = r2b; - MP_DIGIT(r, 4) = r2a; - MP_DIGIT(r, 3) = r1b; - MP_DIGIT(r, 2) = r1a; - MP_DIGIT(r, 1) = r0b; - MP_DIGIT(r, 0) = r0a; - MP_USED(r) = 6; -#else - switch (a_used) { - case 6: - a5 = MP_DIGIT(a, 5); - case 5: - a4 = MP_DIGIT(a, 4); - case 4: - a3 = MP_DIGIT(a, 3); - } - - r2 = MP_DIGIT(a, 2); - r1 = MP_DIGIT(a, 1); - r0 = MP_DIGIT(a, 0); - - /* implement r = (a2,a1,a0)+(a5,a5,a5)+(a4,a4,0)+(0,a3,a3) */ -#ifndef MPI_AMD64_ADD - MP_ADD_CARRY_ZERO(r0, a3, r0, carry); - MP_ADD_CARRY(r1, a3, r1, carry, carry); - MP_ADD_CARRY(r2, a4, r2, carry, carry); - r3 = carry; - MP_ADD_CARRY_ZERO(r0, a5, r0, carry); - MP_ADD_CARRY(r1, a5, r1, carry, carry); - MP_ADD_CARRY(r2, a5, r2, carry, carry); - r3 += carry; - MP_ADD_CARRY_ZERO(r1, a4, r1, carry); - MP_ADD_CARRY(r2, 0, r2, carry, carry); - r3 += carry; - -#else - r2 = MP_DIGIT(a, 2); - r1 = MP_DIGIT(a, 1); - r0 = MP_DIGIT(a, 0); - - /* set the lower words of r */ - __asm__ ( - "xorq %3,%3 \n\t" - "addq %4,%0 \n\t" - "adcq %4,%1 \n\t" - "adcq %5,%2 \n\t" - "adcq $0,%3 \n\t" - "addq %6,%0 \n\t" - "adcq %6,%1 \n\t" - "adcq %6,%2 \n\t" - "adcq $0,%3 \n\t" - "addq %5,%1 \n\t" - "adcq $0,%2 \n\t" - "adcq $0,%3 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3), "=r"(a3), - "=r"(a4), "=r"(a5) - : "0" (r0), "1" (r1), "2" (r2), "3" (r3), - "4" (a3), "5" (a4), "6"(a5) - : "%cc" ); -#endif - - /* reduce out the carry */ - while (r3) { -#ifndef MPI_AMD64_ADD - MP_ADD_CARRY_ZERO(r0, r3, r0, carry); - MP_ADD_CARRY(r1, r3, r1, carry, carry); - MP_ADD_CARRY(r2, 0, r2, carry, carry); - r3 = carry; -#else - a3=r3; - __asm__ ( - "xorq %3,%3 \n\t" - "addq %4,%0 \n\t" - "adcq %4,%1 \n\t" - "adcq $0,%2 \n\t" - "adcq $0,%3 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(r3), "=r"(a3) - : "0" (r0), "1" (r1), "2" (r2), "3" (r3), "4"(a3) - : "%cc" ); -#endif - } - - /* check for final reduction */ - /* - * our field is 0xffffffffffffffff, 0xfffffffffffffffe, - * 0xffffffffffffffff. That means we can only be over and need - * one more reduction - * if r2 == 0xffffffffffffffffff (same as r2+1 == 0) - * and - * r1 == 0xffffffffffffffffff or - * r1 == 0xfffffffffffffffffe and r0 = 0xfffffffffffffffff - * In all cases, we subtract the field (or add the 2's - * complement value (1,1,0)). (r0, r1, r2) - */ - if (r3 || ((r2 == MP_DIGIT_MAX) && - ((r1 == MP_DIGIT_MAX) || - ((r1 == (MP_DIGIT_MAX-1)) && (r0 == MP_DIGIT_MAX))))) { - /* do a quick subtract */ - r0++; - r1 = r2 = 0; - } - /* set the lower words of r */ - if (a != r) { - MP_CHECKOK(s_mp_pad(r, 3)); - } - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - MP_USED(r) = 3; -#endif - } - - CLEANUP: - return res; -} - -#ifndef ECL_THIRTY_TWO_BIT -/* Compute the sum of 192 bit curves. Do the work in-line since the - * number of words are so small, we don't want to overhead of mp function - * calls. Uses optimized modular reduction for p192. - */ -mp_err -ec_GFp_nistp192_add(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit a0 = 0, a1 = 0, a2 = 0; - mp_digit r0 = 0, r1 = 0, r2 = 0; - mp_digit carry; - - switch(MP_USED(a)) { - case 3: - a2 = MP_DIGIT(a,2); - case 2: - a1 = MP_DIGIT(a,1); - case 1: - a0 = MP_DIGIT(a,0); - } - switch(MP_USED(b)) { - case 3: - r2 = MP_DIGIT(b,2); - case 2: - r1 = MP_DIGIT(b,1); - case 1: - r0 = MP_DIGIT(b,0); - } - -#ifndef MPI_AMD64_ADD - MP_ADD_CARRY_ZERO(a0, r0, r0, carry); - MP_ADD_CARRY(a1, r1, r1, carry, carry); - MP_ADD_CARRY(a2, r2, r2, carry, carry); -#else - __asm__ ( - "xorq %3,%3 \n\t" - "addq %4,%0 \n\t" - "adcq %5,%1 \n\t" - "adcq %6,%2 \n\t" - "adcq $0,%3 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(carry) - : "r" (a0), "r" (a1), "r" (a2), "0" (r0), - "1" (r1), "2" (r2) - : "%cc" ); -#endif - - /* Do quick 'subract' if we've gone over - * (add the 2's complement of the curve field) */ - if (carry || ((r2 == MP_DIGIT_MAX) && - ((r1 == MP_DIGIT_MAX) || - ((r1 == (MP_DIGIT_MAX-1)) && (r0 == MP_DIGIT_MAX))))) { -#ifndef MPI_AMD64_ADD - MP_ADD_CARRY_ZERO(r0, 1, r0, carry); - MP_ADD_CARRY(r1, 1, r1, carry, carry); - MP_ADD_CARRY(r2, 0, r2, carry, carry); -#else - __asm__ ( - "addq $1,%0 \n\t" - "adcq $1,%1 \n\t" - "adcq $0,%2 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2) - : "0" (r0), "1" (r1), "2" (r2) - : "%cc" ); -#endif - } - - - MP_CHECKOK(s_mp_pad(r, 3)); - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 3; - s_mp_clamp(r); - - - CLEANUP: - return res; -} - -/* Compute the diff of 192 bit curves. Do the work in-line since the - * number of words are so small, we don't want to overhead of mp function - * calls. Uses optimized modular reduction for p192. - */ -mp_err -ec_GFp_nistp192_sub(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_digit b0 = 0, b1 = 0, b2 = 0; - mp_digit r0 = 0, r1 = 0, r2 = 0; - mp_digit borrow; - - switch(MP_USED(a)) { - case 3: - r2 = MP_DIGIT(a,2); - case 2: - r1 = MP_DIGIT(a,1); - case 1: - r0 = MP_DIGIT(a,0); - } - - switch(MP_USED(b)) { - case 3: - b2 = MP_DIGIT(b,2); - case 2: - b1 = MP_DIGIT(b,1); - case 1: - b0 = MP_DIGIT(b,0); - } - -#ifndef MPI_AMD64_ADD - MP_SUB_BORROW(r0, b0, r0, 0, borrow); - MP_SUB_BORROW(r1, b1, r1, borrow, borrow); - MP_SUB_BORROW(r2, b2, r2, borrow, borrow); -#else - __asm__ ( - "xorq %3,%3 \n\t" - "subq %4,%0 \n\t" - "sbbq %5,%1 \n\t" - "sbbq %6,%2 \n\t" - "adcq $0,%3 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2), "=r"(borrow) - : "r" (b0), "r" (b1), "r" (b2), "0" (r0), - "1" (r1), "2" (r2) - : "%cc" ); -#endif - - /* Do quick 'add' if we've gone under 0 - * (subtract the 2's complement of the curve field) */ - if (borrow) { -#ifndef MPI_AMD64_ADD - MP_SUB_BORROW(r0, 1, r0, 0, borrow); - MP_SUB_BORROW(r1, 1, r1, borrow, borrow); - MP_SUB_BORROW(r2, 0, r2, borrow, borrow); -#else - __asm__ ( - "subq $1,%0 \n\t" - "sbbq $1,%1 \n\t" - "sbbq $0,%2 \n\t" - : "=r"(r0), "=r"(r1), "=r"(r2) - : "0" (r0), "1" (r1), "2" (r2) - : "%cc" ); -#endif - } - - MP_CHECKOK(s_mp_pad(r, 3)); - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 3; - s_mp_clamp(r); - - CLEANUP: - return res; -} - -#endif - -/* Compute the square of polynomial a, reduce modulo p192. Store the - * result in r. r could be a. Uses optimized modular reduction for p192. - */ -mp_err -ec_GFp_nistp192_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - - MP_CHECKOK(mp_sqr(a, r)); - MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth)); - CLEANUP: - return res; -} - -/* Compute the product of two polynomials a and b, reduce modulo p192. - * Store the result in r. r could be a or b; a could be b. Uses - * optimized modular reduction for p192. */ -mp_err -ec_GFp_nistp192_mul(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - - MP_CHECKOK(mp_mul(a, b, r)); - MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth)); - CLEANUP: - return res; -} - -/* Divides two field elements. If a is NULL, then returns the inverse of - * b. */ -mp_err -ec_GFp_nistp192_div(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_int t; - - /* If a is NULL, then return the inverse of b, otherwise return a/b. */ - if (a == NULL) { - return mp_invmod(b, &meth->irr, r); - } else { - /* MPI doesn't support divmod, so we implement it using invmod and - * mulmod. */ - MP_CHECKOK(mp_init(&t, FLAG(b))); - MP_CHECKOK(mp_invmod(b, &meth->irr, &t)); - MP_CHECKOK(mp_mul(a, &t, r)); - MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth)); - CLEANUP: - mp_clear(&t); - return res; - } -} - -/* Wire in fast field arithmetic and precomputation of base point for - * named curves. */ -mp_err -ec_group_set_gfp192(ECGroup *group, ECCurveName name) -{ - if (name == ECCurve_NIST_P192) { - group->meth->field_mod = &ec_GFp_nistp192_mod; - group->meth->field_mul = &ec_GFp_nistp192_mul; - group->meth->field_sqr = &ec_GFp_nistp192_sqr; - group->meth->field_div = &ec_GFp_nistp192_div; -#ifndef ECL_THIRTY_TWO_BIT - group->meth->field_add = &ec_GFp_nistp192_add; - group->meth->field_sub = &ec_GFp_nistp192_sub; -#endif - } - return MP_OKAY; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_224.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_224.c deleted file mode 100644 index b2901e06266..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_224.c +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for prime field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - *********************************************************************** */ - -#include "ecp.h" -#include "mpi.h" -#include "mplogic.h" -#include "mpi-priv.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -#define ECP224_DIGITS ECL_CURVE_DIGITS(224) - -/* Fast modular reduction for p224 = 2^224 - 2^96 + 1. a can be r. Uses - * algorithm 7 from Brown, Hankerson, Lopez, Menezes. Software - * Implementation of the NIST Elliptic Curves over Prime Fields. */ -mp_err -ec_GFp_nistp224_mod(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_size a_used = MP_USED(a); - - int r3b; - mp_digit carry; -#ifdef ECL_THIRTY_TWO_BIT - mp_digit a6a = 0, a6b = 0, - a5a = 0, a5b = 0, a4a = 0, a4b = 0, a3a = 0, a3b = 0; - mp_digit r0a, r0b, r1a, r1b, r2a, r2b, r3a; -#else - mp_digit a6 = 0, a5 = 0, a4 = 0, a3b = 0, a5a = 0; - mp_digit a6b = 0, a6a_a5b = 0, a5b = 0, a5a_a4b = 0, a4a_a3b = 0; - mp_digit r0, r1, r2, r3; -#endif - - /* reduction not needed if a is not larger than field size */ - if (a_used < ECP224_DIGITS) { - if (a == r) return MP_OKAY; - return mp_copy(a, r); - } - /* for polynomials larger than twice the field size, use regular - * reduction */ - if (a_used > ECL_CURVE_DIGITS(224*2)) { - MP_CHECKOK(mp_mod(a, &meth->irr, r)); - } else { -#ifdef ECL_THIRTY_TWO_BIT - /* copy out upper words of a */ - switch (a_used) { - case 14: - a6b = MP_DIGIT(a, 13); - case 13: - a6a = MP_DIGIT(a, 12); - case 12: - a5b = MP_DIGIT(a, 11); - case 11: - a5a = MP_DIGIT(a, 10); - case 10: - a4b = MP_DIGIT(a, 9); - case 9: - a4a = MP_DIGIT(a, 8); - case 8: - a3b = MP_DIGIT(a, 7); - } - r3a = MP_DIGIT(a, 6); - r2b= MP_DIGIT(a, 5); - r2a= MP_DIGIT(a, 4); - r1b = MP_DIGIT(a, 3); - r1a = MP_DIGIT(a, 2); - r0b = MP_DIGIT(a, 1); - r0a = MP_DIGIT(a, 0); - - - /* implement r = (a3a,a2,a1,a0) - +(a5a, a4,a3b, 0) - +( 0, a6,a5b, 0) - -( 0 0, 0|a6b, a6a|a5b ) - -( a6b, a6a|a5b, a5a|a4b, a4a|a3b ) */ - MP_ADD_CARRY (r1b, a3b, r1b, 0, carry); - MP_ADD_CARRY (r2a, a4a, r2a, carry, carry); - MP_ADD_CARRY (r2b, a4b, r2b, carry, carry); - MP_ADD_CARRY (r3a, a5a, r3a, carry, carry); - r3b = carry; - MP_ADD_CARRY (r1b, a5b, r1b, 0, carry); - MP_ADD_CARRY (r2a, a6a, r2a, carry, carry); - MP_ADD_CARRY (r2b, a6b, r2b, carry, carry); - MP_ADD_CARRY (r3a, 0, r3a, carry, carry); - r3b += carry; - MP_SUB_BORROW(r0a, a3b, r0a, 0, carry); - MP_SUB_BORROW(r0b, a4a, r0b, carry, carry); - MP_SUB_BORROW(r1a, a4b, r1a, carry, carry); - MP_SUB_BORROW(r1b, a5a, r1b, carry, carry); - MP_SUB_BORROW(r2a, a5b, r2a, carry, carry); - MP_SUB_BORROW(r2b, a6a, r2b, carry, carry); - MP_SUB_BORROW(r3a, a6b, r3a, carry, carry); - r3b -= carry; - MP_SUB_BORROW(r0a, a5b, r0a, 0, carry); - MP_SUB_BORROW(r0b, a6a, r0b, carry, carry); - MP_SUB_BORROW(r1a, a6b, r1a, carry, carry); - if (carry) { - MP_SUB_BORROW(r1b, 0, r1b, carry, carry); - MP_SUB_BORROW(r2a, 0, r2a, carry, carry); - MP_SUB_BORROW(r2b, 0, r2b, carry, carry); - MP_SUB_BORROW(r3a, 0, r3a, carry, carry); - r3b -= carry; - } - - while (r3b > 0) { - int tmp; - MP_ADD_CARRY(r1b, r3b, r1b, 0, carry); - if (carry) { - MP_ADD_CARRY(r2a, 0, r2a, carry, carry); - MP_ADD_CARRY(r2b, 0, r2b, carry, carry); - MP_ADD_CARRY(r3a, 0, r3a, carry, carry); - } - tmp = carry; - MP_SUB_BORROW(r0a, r3b, r0a, 0, carry); - if (carry) { - MP_SUB_BORROW(r0b, 0, r0b, carry, carry); - MP_SUB_BORROW(r1a, 0, r1a, carry, carry); - MP_SUB_BORROW(r1b, 0, r1b, carry, carry); - MP_SUB_BORROW(r2a, 0, r2a, carry, carry); - MP_SUB_BORROW(r2b, 0, r2b, carry, carry); - MP_SUB_BORROW(r3a, 0, r3a, carry, carry); - tmp -= carry; - } - r3b = tmp; - } - - while (r3b < 0) { - mp_digit maxInt = MP_DIGIT_MAX; - MP_ADD_CARRY (r0a, 1, r0a, 0, carry); - MP_ADD_CARRY (r0b, 0, r0b, carry, carry); - MP_ADD_CARRY (r1a, 0, r1a, carry, carry); - MP_ADD_CARRY (r1b, maxInt, r1b, carry, carry); - MP_ADD_CARRY (r2a, maxInt, r2a, carry, carry); - MP_ADD_CARRY (r2b, maxInt, r2b, carry, carry); - MP_ADD_CARRY (r3a, maxInt, r3a, carry, carry); - r3b += carry; - } - /* check for final reduction */ - /* now the only way we are over is if the top 4 words are all ones */ - if ((r3a == MP_DIGIT_MAX) && (r2b == MP_DIGIT_MAX) - && (r2a == MP_DIGIT_MAX) && (r1b == MP_DIGIT_MAX) && - ((r1a != 0) || (r0b != 0) || (r0a != 0)) ) { - /* one last subraction */ - MP_SUB_BORROW(r0a, 1, r0a, 0, carry); - MP_SUB_BORROW(r0b, 0, r0b, carry, carry); - MP_SUB_BORROW(r1a, 0, r1a, carry, carry); - r1b = r2a = r2b = r3a = 0; - } - - - if (a != r) { - MP_CHECKOK(s_mp_pad(r, 7)); - } - /* set the lower words of r */ - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 7; - MP_DIGIT(r, 6) = r3a; - MP_DIGIT(r, 5) = r2b; - MP_DIGIT(r, 4) = r2a; - MP_DIGIT(r, 3) = r1b; - MP_DIGIT(r, 2) = r1a; - MP_DIGIT(r, 1) = r0b; - MP_DIGIT(r, 0) = r0a; -#else - /* copy out upper words of a */ - switch (a_used) { - case 7: - a6 = MP_DIGIT(a, 6); - a6b = a6 >> 32; - a6a_a5b = a6 << 32; - case 6: - a5 = MP_DIGIT(a, 5); - a5b = a5 >> 32; - a6a_a5b |= a5b; - a5b = a5b << 32; - a5a_a4b = a5 << 32; - a5a = a5 & 0xffffffff; - case 5: - a4 = MP_DIGIT(a, 4); - a5a_a4b |= a4 >> 32; - a4a_a3b = a4 << 32; - case 4: - a3b = MP_DIGIT(a, 3) >> 32; - a4a_a3b |= a3b; - a3b = a3b << 32; - } - - r3 = MP_DIGIT(a, 3) & 0xffffffff; - r2 = MP_DIGIT(a, 2); - r1 = MP_DIGIT(a, 1); - r0 = MP_DIGIT(a, 0); - - /* implement r = (a3a,a2,a1,a0) - +(a5a, a4,a3b, 0) - +( 0, a6,a5b, 0) - -( 0 0, 0|a6b, a6a|a5b ) - -( a6b, a6a|a5b, a5a|a4b, a4a|a3b ) */ - MP_ADD_CARRY_ZERO (r1, a3b, r1, carry); - MP_ADD_CARRY (r2, a4 , r2, carry, carry); - MP_ADD_CARRY (r3, a5a, r3, carry, carry); - MP_ADD_CARRY_ZERO (r1, a5b, r1, carry); - MP_ADD_CARRY (r2, a6 , r2, carry, carry); - MP_ADD_CARRY (r3, 0, r3, carry, carry); - - MP_SUB_BORROW(r0, a4a_a3b, r0, 0, carry); - MP_SUB_BORROW(r1, a5a_a4b, r1, carry, carry); - MP_SUB_BORROW(r2, a6a_a5b, r2, carry, carry); - MP_SUB_BORROW(r3, a6b , r3, carry, carry); - MP_SUB_BORROW(r0, a6a_a5b, r0, 0, carry); - MP_SUB_BORROW(r1, a6b , r1, carry, carry); - if (carry) { - MP_SUB_BORROW(r2, 0, r2, carry, carry); - MP_SUB_BORROW(r3, 0, r3, carry, carry); - } - - - /* if the value is negative, r3 has a 2's complement - * high value */ - r3b = (int)(r3 >>32); - while (r3b > 0) { - r3 &= 0xffffffff; - MP_ADD_CARRY_ZERO(r1,((mp_digit)r3b) << 32, r1, carry); - if (carry) { - MP_ADD_CARRY(r2, 0, r2, carry, carry); - MP_ADD_CARRY(r3, 0, r3, carry, carry); - } - MP_SUB_BORROW(r0, r3b, r0, 0, carry); - if (carry) { - MP_SUB_BORROW(r1, 0, r1, carry, carry); - MP_SUB_BORROW(r2, 0, r2, carry, carry); - MP_SUB_BORROW(r3, 0, r3, carry, carry); - } - r3b = (int)(r3 >>32); - } - - while (r3b < 0) { - MP_ADD_CARRY_ZERO (r0, 1, r0, carry); - MP_ADD_CARRY (r1, MP_DIGIT_MAX <<32, r1, carry, carry); - MP_ADD_CARRY (r2, MP_DIGIT_MAX, r2, carry, carry); - MP_ADD_CARRY (r3, MP_DIGIT_MAX >> 32, r3, carry, carry); - r3b = (int)(r3 >>32); - } - /* check for final reduction */ - /* now the only way we are over is if the top 4 words are all ones */ - if ((r3 == (MP_DIGIT_MAX >> 32)) && (r2 == MP_DIGIT_MAX) - && ((r1 & MP_DIGIT_MAX << 32)== MP_DIGIT_MAX << 32) && - ((r1 != MP_DIGIT_MAX << 32 ) || (r0 != 0)) ) { - /* one last subraction */ - MP_SUB_BORROW(r0, 1, r0, 0, carry); - MP_SUB_BORROW(r1, 0, r1, carry, carry); - r2 = r3 = 0; - } - - - if (a != r) { - MP_CHECKOK(s_mp_pad(r, 4)); - } - /* set the lower words of r */ - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 4; - MP_DIGIT(r, 3) = r3; - MP_DIGIT(r, 2) = r2; - MP_DIGIT(r, 1) = r1; - MP_DIGIT(r, 0) = r0; -#endif - } - - CLEANUP: - return res; -} - -/* Compute the square of polynomial a, reduce modulo p224. Store the - * result in r. r could be a. Uses optimized modular reduction for p224. - */ -mp_err -ec_GFp_nistp224_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - - MP_CHECKOK(mp_sqr(a, r)); - MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth)); - CLEANUP: - return res; -} - -/* Compute the product of two polynomials a and b, reduce modulo p224. - * Store the result in r. r could be a or b; a could be b. Uses - * optimized modular reduction for p224. */ -mp_err -ec_GFp_nistp224_mul(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - - MP_CHECKOK(mp_mul(a, b, r)); - MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth)); - CLEANUP: - return res; -} - -/* Divides two field elements. If a is NULL, then returns the inverse of - * b. */ -mp_err -ec_GFp_nistp224_div(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_int t; - - /* If a is NULL, then return the inverse of b, otherwise return a/b. */ - if (a == NULL) { - return mp_invmod(b, &meth->irr, r); - } else { - /* MPI doesn't support divmod, so we implement it using invmod and - * mulmod. */ - MP_CHECKOK(mp_init(&t, FLAG(b))); - MP_CHECKOK(mp_invmod(b, &meth->irr, &t)); - MP_CHECKOK(mp_mul(a, &t, r)); - MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth)); - CLEANUP: - mp_clear(&t); - return res; - } -} - -/* Wire in fast field arithmetic and precomputation of base point for - * named curves. */ -mp_err -ec_group_set_gfp224(ECGroup *group, ECCurveName name) -{ - if (name == ECCurve_NIST_P224) { - group->meth->field_mod = &ec_GFp_nistp224_mod; - group->meth->field_mul = &ec_GFp_nistp224_mul; - group->meth->field_sqr = &ec_GFp_nistp224_sqr; - group->meth->field_div = &ec_GFp_nistp224_div; - } - return MP_OKAY; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_256.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_256.c deleted file mode 100644 index a5a5fa37e58..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_256.c +++ /dev/null @@ -1,430 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for prime field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca> - * - *********************************************************************** */ - -#include "ecp.h" -#include "mpi.h" -#include "mplogic.h" -#include "mpi-priv.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -/* Fast modular reduction for p256 = 2^256 - 2^224 + 2^192+ 2^96 - 1. a can be r. - * Uses algorithm 2.29 from Hankerson, Menezes, Vanstone. Guide to - * Elliptic Curve Cryptography. */ -mp_err -ec_GFp_nistp256_mod(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_size a_used = MP_USED(a); - int a_bits = mpl_significant_bits(a); - mp_digit carry; - -#ifdef ECL_THIRTY_TWO_BIT - mp_digit a8=0, a9=0, a10=0, a11=0, a12=0, a13=0, a14=0, a15=0; - mp_digit r0, r1, r2, r3, r4, r5, r6, r7; - int r8; /* must be a signed value ! */ -#else - mp_digit a4=0, a5=0, a6=0, a7=0; - mp_digit a4h, a4l, a5h, a5l, a6h, a6l, a7h, a7l; - mp_digit r0, r1, r2, r3; - int r4; /* must be a signed value ! */ -#endif - /* for polynomials larger than twice the field size - * use regular reduction */ - if (a_bits < 256) { - if (a == r) return MP_OKAY; - return mp_copy(a,r); - } - if (a_bits > 512) { - MP_CHECKOK(mp_mod(a, &meth->irr, r)); - } else { - -#ifdef ECL_THIRTY_TWO_BIT - switch (a_used) { - case 16: - a15 = MP_DIGIT(a,15); - case 15: - a14 = MP_DIGIT(a,14); - case 14: - a13 = MP_DIGIT(a,13); - case 13: - a12 = MP_DIGIT(a,12); - case 12: - a11 = MP_DIGIT(a,11); - case 11: - a10 = MP_DIGIT(a,10); - case 10: - a9 = MP_DIGIT(a,9); - case 9: - a8 = MP_DIGIT(a,8); - } - - r0 = MP_DIGIT(a,0); - r1 = MP_DIGIT(a,1); - r2 = MP_DIGIT(a,2); - r3 = MP_DIGIT(a,3); - r4 = MP_DIGIT(a,4); - r5 = MP_DIGIT(a,5); - r6 = MP_DIGIT(a,6); - r7 = MP_DIGIT(a,7); - - /* sum 1 */ - MP_ADD_CARRY(r3, a11, r3, 0, carry); - MP_ADD_CARRY(r4, a12, r4, carry, carry); - MP_ADD_CARRY(r5, a13, r5, carry, carry); - MP_ADD_CARRY(r6, a14, r6, carry, carry); - MP_ADD_CARRY(r7, a15, r7, carry, carry); - r8 = carry; - MP_ADD_CARRY(r3, a11, r3, 0, carry); - MP_ADD_CARRY(r4, a12, r4, carry, carry); - MP_ADD_CARRY(r5, a13, r5, carry, carry); - MP_ADD_CARRY(r6, a14, r6, carry, carry); - MP_ADD_CARRY(r7, a15, r7, carry, carry); - r8 += carry; - /* sum 2 */ - MP_ADD_CARRY(r3, a12, r3, 0, carry); - MP_ADD_CARRY(r4, a13, r4, carry, carry); - MP_ADD_CARRY(r5, a14, r5, carry, carry); - MP_ADD_CARRY(r6, a15, r6, carry, carry); - MP_ADD_CARRY(r7, 0, r7, carry, carry); - r8 += carry; - /* combine last bottom of sum 3 with second sum 2 */ - MP_ADD_CARRY(r0, a8, r0, 0, carry); - MP_ADD_CARRY(r1, a9, r1, carry, carry); - MP_ADD_CARRY(r2, a10, r2, carry, carry); - MP_ADD_CARRY(r3, a12, r3, carry, carry); - MP_ADD_CARRY(r4, a13, r4, carry, carry); - MP_ADD_CARRY(r5, a14, r5, carry, carry); - MP_ADD_CARRY(r6, a15, r6, carry, carry); - MP_ADD_CARRY(r7, a15, r7, carry, carry); /* from sum 3 */ - r8 += carry; - /* sum 3 (rest of it)*/ - MP_ADD_CARRY(r6, a14, r6, 0, carry); - MP_ADD_CARRY(r7, 0, r7, carry, carry); - r8 += carry; - /* sum 4 (rest of it)*/ - MP_ADD_CARRY(r0, a9, r0, 0, carry); - MP_ADD_CARRY(r1, a10, r1, carry, carry); - MP_ADD_CARRY(r2, a11, r2, carry, carry); - MP_ADD_CARRY(r3, a13, r3, carry, carry); - MP_ADD_CARRY(r4, a14, r4, carry, carry); - MP_ADD_CARRY(r5, a15, r5, carry, carry); - MP_ADD_CARRY(r6, a13, r6, carry, carry); - MP_ADD_CARRY(r7, a8, r7, carry, carry); - r8 += carry; - /* diff 5 */ - MP_SUB_BORROW(r0, a11, r0, 0, carry); - MP_SUB_BORROW(r1, a12, r1, carry, carry); - MP_SUB_BORROW(r2, a13, r2, carry, carry); - MP_SUB_BORROW(r3, 0, r3, carry, carry); - MP_SUB_BORROW(r4, 0, r4, carry, carry); - MP_SUB_BORROW(r5, 0, r5, carry, carry); - MP_SUB_BORROW(r6, a8, r6, carry, carry); - MP_SUB_BORROW(r7, a10, r7, carry, carry); - r8 -= carry; - /* diff 6 */ - MP_SUB_BORROW(r0, a12, r0, 0, carry); - MP_SUB_BORROW(r1, a13, r1, carry, carry); - MP_SUB_BORROW(r2, a14, r2, carry, carry); - MP_SUB_BORROW(r3, a15, r3, carry, carry); - MP_SUB_BORROW(r4, 0, r4, carry, carry); - MP_SUB_BORROW(r5, 0, r5, carry, carry); - MP_SUB_BORROW(r6, a9, r6, carry, carry); - MP_SUB_BORROW(r7, a11, r7, carry, carry); - r8 -= carry; - /* diff 7 */ - MP_SUB_BORROW(r0, a13, r0, 0, carry); - MP_SUB_BORROW(r1, a14, r1, carry, carry); - MP_SUB_BORROW(r2, a15, r2, carry, carry); - MP_SUB_BORROW(r3, a8, r3, carry, carry); - MP_SUB_BORROW(r4, a9, r4, carry, carry); - MP_SUB_BORROW(r5, a10, r5, carry, carry); - MP_SUB_BORROW(r6, 0, r6, carry, carry); - MP_SUB_BORROW(r7, a12, r7, carry, carry); - r8 -= carry; - /* diff 8 */ - MP_SUB_BORROW(r0, a14, r0, 0, carry); - MP_SUB_BORROW(r1, a15, r1, carry, carry); - MP_SUB_BORROW(r2, 0, r2, carry, carry); - MP_SUB_BORROW(r3, a9, r3, carry, carry); - MP_SUB_BORROW(r4, a10, r4, carry, carry); - MP_SUB_BORROW(r5, a11, r5, carry, carry); - MP_SUB_BORROW(r6, 0, r6, carry, carry); - MP_SUB_BORROW(r7, a13, r7, carry, carry); - r8 -= carry; - - /* reduce the overflows */ - while (r8 > 0) { - mp_digit r8_d = r8; - MP_ADD_CARRY(r0, r8_d, r0, 0, carry); - MP_ADD_CARRY(r1, 0, r1, carry, carry); - MP_ADD_CARRY(r2, 0, r2, carry, carry); - MP_ADD_CARRY(r3, -r8_d, r3, carry, carry); - MP_ADD_CARRY(r4, MP_DIGIT_MAX, r4, carry, carry); - MP_ADD_CARRY(r5, MP_DIGIT_MAX, r5, carry, carry); - MP_ADD_CARRY(r6, -(r8_d+1), r6, carry, carry); - MP_ADD_CARRY(r7, (r8_d-1), r7, carry, carry); - r8 = carry; - } - - /* reduce the underflows */ - while (r8 < 0) { - mp_digit r8_d = -r8; - MP_SUB_BORROW(r0, r8_d, r0, 0, carry); - MP_SUB_BORROW(r1, 0, r1, carry, carry); - MP_SUB_BORROW(r2, 0, r2, carry, carry); - MP_SUB_BORROW(r3, -r8_d, r3, carry, carry); - MP_SUB_BORROW(r4, MP_DIGIT_MAX, r4, carry, carry); - MP_SUB_BORROW(r5, MP_DIGIT_MAX, r5, carry, carry); - MP_SUB_BORROW(r6, -(r8_d+1), r6, carry, carry); - MP_SUB_BORROW(r7, (r8_d-1), r7, carry, carry); - r8 = -carry; - } - if (a != r) { - MP_CHECKOK(s_mp_pad(r,8)); - } - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 8; - - MP_DIGIT(r,7) = r7; - MP_DIGIT(r,6) = r6; - MP_DIGIT(r,5) = r5; - MP_DIGIT(r,4) = r4; - MP_DIGIT(r,3) = r3; - MP_DIGIT(r,2) = r2; - MP_DIGIT(r,1) = r1; - MP_DIGIT(r,0) = r0; - - /* final reduction if necessary */ - if ((r7 == MP_DIGIT_MAX) && - ((r6 > 1) || ((r6 == 1) && - (r5 || r4 || r3 || - ((r2 == MP_DIGIT_MAX) && (r1 == MP_DIGIT_MAX) - && (r0 == MP_DIGIT_MAX)))))) { - MP_CHECKOK(mp_sub(r, &meth->irr, r)); - } -#ifdef notdef - - - /* smooth the negatives */ - while (MP_SIGN(r) != MP_ZPOS) { - MP_CHECKOK(mp_add(r, &meth->irr, r)); - } - while (MP_USED(r) > 8) { - MP_CHECKOK(mp_sub(r, &meth->irr, r)); - } - - /* final reduction if necessary */ - if (MP_DIGIT(r,7) >= MP_DIGIT(&meth->irr,7)) { - if (mp_cmp(r,&meth->irr) != MP_LT) { - MP_CHECKOK(mp_sub(r, &meth->irr, r)); - } - } -#endif - s_mp_clamp(r); -#else - switch (a_used) { - case 8: - a7 = MP_DIGIT(a,7); - case 7: - a6 = MP_DIGIT(a,6); - case 6: - a5 = MP_DIGIT(a,5); - case 5: - a4 = MP_DIGIT(a,4); - } - a7l = a7 << 32; - a7h = a7 >> 32; - a6l = a6 << 32; - a6h = a6 >> 32; - a5l = a5 << 32; - a5h = a5 >> 32; - a4l = a4 << 32; - a4h = a4 >> 32; - r3 = MP_DIGIT(a,3); - r2 = MP_DIGIT(a,2); - r1 = MP_DIGIT(a,1); - r0 = MP_DIGIT(a,0); - - /* sum 1 */ - MP_ADD_CARRY_ZERO(r1, a5h << 32, r1, carry); - MP_ADD_CARRY(r2, a6, r2, carry, carry); - MP_ADD_CARRY(r3, a7, r3, carry, carry); - r4 = carry; - MP_ADD_CARRY_ZERO(r1, a5h << 32, r1, carry); - MP_ADD_CARRY(r2, a6, r2, carry, carry); - MP_ADD_CARRY(r3, a7, r3, carry, carry); - r4 += carry; - /* sum 2 */ - MP_ADD_CARRY_ZERO(r1, a6l, r1, carry); - MP_ADD_CARRY(r2, a6h | a7l, r2, carry, carry); - MP_ADD_CARRY(r3, a7h, r3, carry, carry); - r4 += carry; - MP_ADD_CARRY_ZERO(r1, a6l, r1, carry); - MP_ADD_CARRY(r2, a6h | a7l, r2, carry, carry); - MP_ADD_CARRY(r3, a7h, r3, carry, carry); - r4 += carry; - - /* sum 3 */ - MP_ADD_CARRY_ZERO(r0, a4, r0, carry); - MP_ADD_CARRY(r1, a5l >> 32, r1, carry, carry); - MP_ADD_CARRY(r2, 0, r2, carry, carry); - MP_ADD_CARRY(r3, a7, r3, carry, carry); - r4 += carry; - /* sum 4 */ - MP_ADD_CARRY_ZERO(r0, a4h | a5l, r0, carry); - MP_ADD_CARRY(r1, a5h|(a6h<<32), r1, carry, carry); - MP_ADD_CARRY(r2, a7, r2, carry, carry); - MP_ADD_CARRY(r3, a6h | a4l, r3, carry, carry); - r4 += carry; - /* diff 5 */ - MP_SUB_BORROW(r0, a5h | a6l, r0, 0, carry); - MP_SUB_BORROW(r1, a6h, r1, carry, carry); - MP_SUB_BORROW(r2, 0, r2, carry, carry); - MP_SUB_BORROW(r3, (a4l>>32)|a5l,r3, carry, carry); - r4 -= carry; - /* diff 6 */ - MP_SUB_BORROW(r0, a6, r0, 0, carry); - MP_SUB_BORROW(r1, a7, r1, carry, carry); - MP_SUB_BORROW(r2, 0, r2, carry, carry); - MP_SUB_BORROW(r3, a4h|(a5h<<32),r3, carry, carry); - r4 -= carry; - /* diff 7 */ - MP_SUB_BORROW(r0, a6h|a7l, r0, 0, carry); - MP_SUB_BORROW(r1, a7h|a4l, r1, carry, carry); - MP_SUB_BORROW(r2, a4h|a5l, r2, carry, carry); - MP_SUB_BORROW(r3, a6l, r3, carry, carry); - r4 -= carry; - /* diff 8 */ - MP_SUB_BORROW(r0, a7, r0, 0, carry); - MP_SUB_BORROW(r1, a4h<<32, r1, carry, carry); - MP_SUB_BORROW(r2, a5, r2, carry, carry); - MP_SUB_BORROW(r3, a6h<<32, r3, carry, carry); - r4 -= carry; - - /* reduce the overflows */ - while (r4 > 0) { - mp_digit r4_long = r4; - mp_digit r4l = (r4_long << 32); - MP_ADD_CARRY_ZERO(r0, r4_long, r0, carry); - MP_ADD_CARRY(r1, -r4l, r1, carry, carry); - MP_ADD_CARRY(r2, MP_DIGIT_MAX, r2, carry, carry); - MP_ADD_CARRY(r3, r4l-r4_long-1,r3, carry, carry); - r4 = carry; - } - - /* reduce the underflows */ - while (r4 < 0) { - mp_digit r4_long = -r4; - mp_digit r4l = (r4_long << 32); - MP_SUB_BORROW(r0, r4_long, r0, 0, carry); - MP_SUB_BORROW(r1, -r4l, r1, carry, carry); - MP_SUB_BORROW(r2, MP_DIGIT_MAX, r2, carry, carry); - MP_SUB_BORROW(r3, r4l-r4_long-1,r3, carry, carry); - r4 = -carry; - } - - if (a != r) { - MP_CHECKOK(s_mp_pad(r,4)); - } - MP_SIGN(r) = MP_ZPOS; - MP_USED(r) = 4; - - MP_DIGIT(r,3) = r3; - MP_DIGIT(r,2) = r2; - MP_DIGIT(r,1) = r1; - MP_DIGIT(r,0) = r0; - - /* final reduction if necessary */ - if ((r3 > 0xFFFFFFFF00000001ULL) || - ((r3 == 0xFFFFFFFF00000001ULL) && - (r2 || (r1 >> 32)|| - (r1 == 0xFFFFFFFFULL && r0 == MP_DIGIT_MAX)))) { - /* very rare, just use mp_sub */ - MP_CHECKOK(mp_sub(r, &meth->irr, r)); - } - - s_mp_clamp(r); -#endif - } - - CLEANUP: - return res; -} - -/* Compute the square of polynomial a, reduce modulo p256. Store the - * result in r. r could be a. Uses optimized modular reduction for p256. - */ -mp_err -ec_GFp_nistp256_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - - MP_CHECKOK(mp_sqr(a, r)); - MP_CHECKOK(ec_GFp_nistp256_mod(r, r, meth)); - CLEANUP: - return res; -} - -/* Compute the product of two polynomials a and b, reduce modulo p256. - * Store the result in r. r could be a or b; a could be b. Uses - * optimized modular reduction for p256. */ -mp_err -ec_GFp_nistp256_mul(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - - MP_CHECKOK(mp_mul(a, b, r)); - MP_CHECKOK(ec_GFp_nistp256_mod(r, r, meth)); - CLEANUP: - return res; -} - -/* Wire in fast field arithmetic and precomputation of base point for - * named curves. */ -mp_err -ec_group_set_gfp256(ECGroup *group, ECCurveName name) -{ - if (name == ECCurve_NIST_P256) { - group->meth->field_mod = &ec_GFp_nistp256_mod; - group->meth->field_mul = &ec_GFp_nistp256_mul; - group->meth->field_sqr = &ec_GFp_nistp256_sqr; - } - return MP_OKAY; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_384.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_384.c deleted file mode 100644 index e40a8f10017..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_384.c +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for prime field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca> - * - *********************************************************************** */ - -#include "ecp.h" -#include "mpi.h" -#include "mplogic.h" -#include "mpi-priv.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -/* Fast modular reduction for p384 = 2^384 - 2^128 - 2^96 + 2^32 - 1. a can be r. - * Uses algorithm 2.30 from Hankerson, Menezes, Vanstone. Guide to - * Elliptic Curve Cryptography. */ -mp_err -ec_GFp_nistp384_mod(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - int a_bits = mpl_significant_bits(a); - int i; - - /* m1, m2 are statically-allocated mp_int of exactly the size we need */ - mp_int m[10]; - -#ifdef ECL_THIRTY_TWO_BIT - mp_digit s[10][12]; - for (i = 0; i < 10; i++) { - MP_SIGN(&m[i]) = MP_ZPOS; - MP_ALLOC(&m[i]) = 12; - MP_USED(&m[i]) = 12; - MP_DIGITS(&m[i]) = s[i]; - } -#else - mp_digit s[10][6]; - for (i = 0; i < 10; i++) { - MP_SIGN(&m[i]) = MP_ZPOS; - MP_ALLOC(&m[i]) = 6; - MP_USED(&m[i]) = 6; - MP_DIGITS(&m[i]) = s[i]; - } -#endif - -#ifdef ECL_THIRTY_TWO_BIT - /* for polynomials larger than twice the field size or polynomials - * not using all words, use regular reduction */ - if ((a_bits > 768) || (a_bits <= 736)) { - MP_CHECKOK(mp_mod(a, &meth->irr, r)); - } else { - for (i = 0; i < 12; i++) { - s[0][i] = MP_DIGIT(a, i); - } - s[1][0] = 0; - s[1][1] = 0; - s[1][2] = 0; - s[1][3] = 0; - s[1][4] = MP_DIGIT(a, 21); - s[1][5] = MP_DIGIT(a, 22); - s[1][6] = MP_DIGIT(a, 23); - s[1][7] = 0; - s[1][8] = 0; - s[1][9] = 0; - s[1][10] = 0; - s[1][11] = 0; - for (i = 0; i < 12; i++) { - s[2][i] = MP_DIGIT(a, i+12); - } - s[3][0] = MP_DIGIT(a, 21); - s[3][1] = MP_DIGIT(a, 22); - s[3][2] = MP_DIGIT(a, 23); - for (i = 3; i < 12; i++) { - s[3][i] = MP_DIGIT(a, i+9); - } - s[4][0] = 0; - s[4][1] = MP_DIGIT(a, 23); - s[4][2] = 0; - s[4][3] = MP_DIGIT(a, 20); - for (i = 4; i < 12; i++) { - s[4][i] = MP_DIGIT(a, i+8); - } - s[5][0] = 0; - s[5][1] = 0; - s[5][2] = 0; - s[5][3] = 0; - s[5][4] = MP_DIGIT(a, 20); - s[5][5] = MP_DIGIT(a, 21); - s[5][6] = MP_DIGIT(a, 22); - s[5][7] = MP_DIGIT(a, 23); - s[5][8] = 0; - s[5][9] = 0; - s[5][10] = 0; - s[5][11] = 0; - s[6][0] = MP_DIGIT(a, 20); - s[6][1] = 0; - s[6][2] = 0; - s[6][3] = MP_DIGIT(a, 21); - s[6][4] = MP_DIGIT(a, 22); - s[6][5] = MP_DIGIT(a, 23); - s[6][6] = 0; - s[6][7] = 0; - s[6][8] = 0; - s[6][9] = 0; - s[6][10] = 0; - s[6][11] = 0; - s[7][0] = MP_DIGIT(a, 23); - for (i = 1; i < 12; i++) { - s[7][i] = MP_DIGIT(a, i+11); - } - s[8][0] = 0; - s[8][1] = MP_DIGIT(a, 20); - s[8][2] = MP_DIGIT(a, 21); - s[8][3] = MP_DIGIT(a, 22); - s[8][4] = MP_DIGIT(a, 23); - s[8][5] = 0; - s[8][6] = 0; - s[8][7] = 0; - s[8][8] = 0; - s[8][9] = 0; - s[8][10] = 0; - s[8][11] = 0; - s[9][0] = 0; - s[9][1] = 0; - s[9][2] = 0; - s[9][3] = MP_DIGIT(a, 23); - s[9][4] = MP_DIGIT(a, 23); - s[9][5] = 0; - s[9][6] = 0; - s[9][7] = 0; - s[9][8] = 0; - s[9][9] = 0; - s[9][10] = 0; - s[9][11] = 0; - - MP_CHECKOK(mp_add(&m[0], &m[1], r)); - MP_CHECKOK(mp_add(r, &m[1], r)); - MP_CHECKOK(mp_add(r, &m[2], r)); - MP_CHECKOK(mp_add(r, &m[3], r)); - MP_CHECKOK(mp_add(r, &m[4], r)); - MP_CHECKOK(mp_add(r, &m[5], r)); - MP_CHECKOK(mp_add(r, &m[6], r)); - MP_CHECKOK(mp_sub(r, &m[7], r)); - MP_CHECKOK(mp_sub(r, &m[8], r)); - MP_CHECKOK(mp_submod(r, &m[9], &meth->irr, r)); - s_mp_clamp(r); - } -#else - /* for polynomials larger than twice the field size or polynomials - * not using all words, use regular reduction */ - if ((a_bits > 768) || (a_bits <= 736)) { - MP_CHECKOK(mp_mod(a, &meth->irr, r)); - } else { - for (i = 0; i < 6; i++) { - s[0][i] = MP_DIGIT(a, i); - } - s[1][0] = 0; - s[1][1] = 0; - s[1][2] = (MP_DIGIT(a, 10) >> 32) | (MP_DIGIT(a, 11) << 32); - s[1][3] = MP_DIGIT(a, 11) >> 32; - s[1][4] = 0; - s[1][5] = 0; - for (i = 0; i < 6; i++) { - s[2][i] = MP_DIGIT(a, i+6); - } - s[3][0] = (MP_DIGIT(a, 10) >> 32) | (MP_DIGIT(a, 11) << 32); - s[3][1] = (MP_DIGIT(a, 11) >> 32) | (MP_DIGIT(a, 6) << 32); - for (i = 2; i < 6; i++) { - s[3][i] = (MP_DIGIT(a, i+4) >> 32) | (MP_DIGIT(a, i+5) << 32); - } - s[4][0] = (MP_DIGIT(a, 11) >> 32) << 32; - s[4][1] = MP_DIGIT(a, 10) << 32; - for (i = 2; i < 6; i++) { - s[4][i] = MP_DIGIT(a, i+4); - } - s[5][0] = 0; - s[5][1] = 0; - s[5][2] = MP_DIGIT(a, 10); - s[5][3] = MP_DIGIT(a, 11); - s[5][4] = 0; - s[5][5] = 0; - s[6][0] = (MP_DIGIT(a, 10) << 32) >> 32; - s[6][1] = (MP_DIGIT(a, 10) >> 32) << 32; - s[6][2] = MP_DIGIT(a, 11); - s[6][3] = 0; - s[6][4] = 0; - s[6][5] = 0; - s[7][0] = (MP_DIGIT(a, 11) >> 32) | (MP_DIGIT(a, 6) << 32); - for (i = 1; i < 6; i++) { - s[7][i] = (MP_DIGIT(a, i+5) >> 32) | (MP_DIGIT(a, i+6) << 32); - } - s[8][0] = MP_DIGIT(a, 10) << 32; - s[8][1] = (MP_DIGIT(a, 10) >> 32) | (MP_DIGIT(a, 11) << 32); - s[8][2] = MP_DIGIT(a, 11) >> 32; - s[8][3] = 0; - s[8][4] = 0; - s[8][5] = 0; - s[9][0] = 0; - s[9][1] = (MP_DIGIT(a, 11) >> 32) << 32; - s[9][2] = MP_DIGIT(a, 11) >> 32; - s[9][3] = 0; - s[9][4] = 0; - s[9][5] = 0; - - MP_CHECKOK(mp_add(&m[0], &m[1], r)); - MP_CHECKOK(mp_add(r, &m[1], r)); - MP_CHECKOK(mp_add(r, &m[2], r)); - MP_CHECKOK(mp_add(r, &m[3], r)); - MP_CHECKOK(mp_add(r, &m[4], r)); - MP_CHECKOK(mp_add(r, &m[5], r)); - MP_CHECKOK(mp_add(r, &m[6], r)); - MP_CHECKOK(mp_sub(r, &m[7], r)); - MP_CHECKOK(mp_sub(r, &m[8], r)); - MP_CHECKOK(mp_submod(r, &m[9], &meth->irr, r)); - s_mp_clamp(r); - } -#endif - - CLEANUP: - return res; -} - -/* Compute the square of polynomial a, reduce modulo p384. Store the - * result in r. r could be a. Uses optimized modular reduction for p384. - */ -mp_err -ec_GFp_nistp384_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - - MP_CHECKOK(mp_sqr(a, r)); - MP_CHECKOK(ec_GFp_nistp384_mod(r, r, meth)); - CLEANUP: - return res; -} - -/* Compute the product of two polynomials a and b, reduce modulo p384. - * Store the result in r. r could be a or b; a could be b. Uses - * optimized modular reduction for p384. */ -mp_err -ec_GFp_nistp384_mul(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - - MP_CHECKOK(mp_mul(a, b, r)); - MP_CHECKOK(ec_GFp_nistp384_mod(r, r, meth)); - CLEANUP: - return res; -} - -/* Wire in fast field arithmetic and precomputation of base point for - * named curves. */ -mp_err -ec_group_set_gfp384(ECGroup *group, ECCurveName name) -{ - if (name == ECCurve_NIST_P384) { - group->meth->field_mod = &ec_GFp_nistp384_mod; - group->meth->field_mul = &ec_GFp_nistp384_mul; - group->meth->field_sqr = &ec_GFp_nistp384_sqr; - } - return MP_OKAY; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_521.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_521.c deleted file mode 100644 index 11172dda7a9..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_521.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for prime field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca> - * - *********************************************************************** */ - -#include "ecp.h" -#include "mpi.h" -#include "mplogic.h" -#include "mpi-priv.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -#define ECP521_DIGITS ECL_CURVE_DIGITS(521) - -/* Fast modular reduction for p521 = 2^521 - 1. a can be r. Uses - * algorithm 2.31 from Hankerson, Menezes, Vanstone. Guide to - * Elliptic Curve Cryptography. */ -mp_err -ec_GFp_nistp521_mod(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - int a_bits = mpl_significant_bits(a); - unsigned int i; - - /* m1, m2 are statically-allocated mp_int of exactly the size we need */ - mp_int m1; - - mp_digit s1[ECP521_DIGITS] = { 0 }; - - MP_SIGN(&m1) = MP_ZPOS; - MP_ALLOC(&m1) = ECP521_DIGITS; - MP_USED(&m1) = ECP521_DIGITS; - MP_DIGITS(&m1) = s1; - - if (a_bits < 521) { - if (a==r) return MP_OKAY; - return mp_copy(a, r); - } - /* for polynomials larger than twice the field size or polynomials - * not using all words, use regular reduction */ - if (a_bits > (521*2)) { - MP_CHECKOK(mp_mod(a, &meth->irr, r)); - } else { -#define FIRST_DIGIT (ECP521_DIGITS-1) - for (i = FIRST_DIGIT; i < MP_USED(a)-1; i++) { - s1[i-FIRST_DIGIT] = (MP_DIGIT(a, i) >> 9) - | (MP_DIGIT(a, 1+i) << (MP_DIGIT_BIT-9)); - } - s1[i-FIRST_DIGIT] = MP_DIGIT(a, i) >> 9; - - if ( a != r ) { - MP_CHECKOK(s_mp_pad(r,ECP521_DIGITS)); - for (i = 0; i < ECP521_DIGITS; i++) { - MP_DIGIT(r,i) = MP_DIGIT(a, i); - } - } - MP_USED(r) = ECP521_DIGITS; - MP_DIGIT(r,FIRST_DIGIT) &= 0x1FF; - - MP_CHECKOK(s_mp_add(r, &m1)); - if (MP_DIGIT(r, FIRST_DIGIT) & 0x200) { - MP_CHECKOK(s_mp_add_d(r,1)); - MP_DIGIT(r,FIRST_DIGIT) &= 0x1FF; - } - s_mp_clamp(r); - } - - CLEANUP: - return res; -} - -/* Compute the square of polynomial a, reduce modulo p521. Store the - * result in r. r could be a. Uses optimized modular reduction for p521. - */ -mp_err -ec_GFp_nistp521_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - - MP_CHECKOK(mp_sqr(a, r)); - MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth)); - CLEANUP: - return res; -} - -/* Compute the product of two polynomials a and b, reduce modulo p521. - * Store the result in r. r could be a or b; a could be b. Uses - * optimized modular reduction for p521. */ -mp_err -ec_GFp_nistp521_mul(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - - MP_CHECKOK(mp_mul(a, b, r)); - MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth)); - CLEANUP: - return res; -} - -/* Divides two field elements. If a is NULL, then returns the inverse of - * b. */ -mp_err -ec_GFp_nistp521_div(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - mp_int t; - - /* If a is NULL, then return the inverse of b, otherwise return a/b. */ - if (a == NULL) { - return mp_invmod(b, &meth->irr, r); - } else { - /* MPI doesn't support divmod, so we implement it using invmod and - * mulmod. */ - MP_CHECKOK(mp_init(&t, FLAG(b))); - MP_CHECKOK(mp_invmod(b, &meth->irr, &t)); - MP_CHECKOK(mp_mul(a, &t, r)); - MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth)); - CLEANUP: - mp_clear(&t); - return res; - } -} - -/* Wire in fast field arithmetic and precomputation of base point for - * named curves. */ -mp_err -ec_group_set_gfp521(ECGroup *group, ECCurveName name) -{ - if (name == ECCurve_NIST_P521) { - group->meth->field_mod = &ec_GFp_nistp521_mod; - group->meth->field_mul = &ec_GFp_nistp521_mul; - group->meth->field_sqr = &ec_GFp_nistp521_sqr; - group->meth->field_div = &ec_GFp_nistp521_div; - } - return MP_OKAY; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_aff.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_aff.c deleted file mode 100644 index c9d92327171..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_aff.c +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for prime field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Sheueling Chang-Shantz <sheueling.chang@sun.com>, - * Stephen Fung <fungstep@hotmail.com>, and - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories. - * Bodo Moeller <moeller@cdc.informatik.tu-darmstadt.de>, - * Nils Larsch <nla@trustcenter.de>, and - * Lenka Fibikova <fibikova@exp-math.uni-essen.de>, the OpenSSL Project - * - * Last Modified Date from the Original Code: May 2017 - *********************************************************************** */ - -#include "ecp.h" -#include "mplogic.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -/* Checks if point P(px, py) is at infinity. Uses affine coordinates. */ -mp_err -ec_GFp_pt_is_inf_aff(const mp_int *px, const mp_int *py) -{ - - if ((mp_cmp_z(px) == 0) && (mp_cmp_z(py) == 0)) { - return MP_YES; - } else { - return MP_NO; - } - -} - -/* Sets P(px, py) to be the point at infinity. Uses affine coordinates. */ -mp_err -ec_GFp_pt_set_inf_aff(mp_int *px, mp_int *py) -{ - mp_zero(px); - mp_zero(py); - return MP_OKAY; -} - -/* Computes R = P + Q based on IEEE P1363 A.10.1. Elliptic curve points P, - * Q, and R can all be identical. Uses affine coordinates. Assumes input - * is already field-encoded using field_enc, and returns output that is - * still field-encoded. */ -mp_err -ec_GFp_pt_add_aff(const mp_int *px, const mp_int *py, const mp_int *qx, - const mp_int *qy, mp_int *rx, mp_int *ry, - const ECGroup *group) -{ - mp_err res = MP_OKAY; - mp_int lambda, temp, tempx, tempy; - - MP_DIGITS(&lambda) = 0; - MP_DIGITS(&temp) = 0; - MP_DIGITS(&tempx) = 0; - MP_DIGITS(&tempy) = 0; - MP_CHECKOK(mp_init(&lambda, FLAG(px))); - MP_CHECKOK(mp_init(&temp, FLAG(px))); - MP_CHECKOK(mp_init(&tempx, FLAG(px))); - MP_CHECKOK(mp_init(&tempy, FLAG(px))); - /* if P = inf, then R = Q */ - if (ec_GFp_pt_is_inf_aff(px, py) == 0) { - MP_CHECKOK(mp_copy(qx, rx)); - MP_CHECKOK(mp_copy(qy, ry)); - res = MP_OKAY; - goto CLEANUP; - } - /* if Q = inf, then R = P */ - if (ec_GFp_pt_is_inf_aff(qx, qy) == 0) { - MP_CHECKOK(mp_copy(px, rx)); - MP_CHECKOK(mp_copy(py, ry)); - res = MP_OKAY; - goto CLEANUP; - } - /* if px != qx, then lambda = (py-qy) / (px-qx) */ - if (mp_cmp(px, qx) != 0) { - MP_CHECKOK(group->meth->field_sub(py, qy, &tempy, group->meth)); - MP_CHECKOK(group->meth->field_sub(px, qx, &tempx, group->meth)); - MP_CHECKOK(group->meth-> - field_div(&tempy, &tempx, &lambda, group->meth)); - } else { - /* if py != qy or qy = 0, then R = inf */ - if (((mp_cmp(py, qy) != 0)) || (mp_cmp_z(qy) == 0)) { - mp_zero(rx); - mp_zero(ry); - res = MP_OKAY; - goto CLEANUP; - } - /* lambda = (3qx^2+a) / (2qy) */ - MP_CHECKOK(group->meth->field_sqr(qx, &tempx, group->meth)); - MP_CHECKOK(mp_set_int(&temp, 3)); - if (group->meth->field_enc) { - MP_CHECKOK(group->meth->field_enc(&temp, &temp, group->meth)); - } - MP_CHECKOK(group->meth-> - field_mul(&tempx, &temp, &tempx, group->meth)); - MP_CHECKOK(group->meth-> - field_add(&tempx, &group->curvea, &tempx, group->meth)); - MP_CHECKOK(mp_set_int(&temp, 2)); - if (group->meth->field_enc) { - MP_CHECKOK(group->meth->field_enc(&temp, &temp, group->meth)); - } - MP_CHECKOK(group->meth->field_mul(qy, &temp, &tempy, group->meth)); - MP_CHECKOK(group->meth-> - field_div(&tempx, &tempy, &lambda, group->meth)); - } - /* rx = lambda^2 - px - qx */ - MP_CHECKOK(group->meth->field_sqr(&lambda, &tempx, group->meth)); - MP_CHECKOK(group->meth->field_sub(&tempx, px, &tempx, group->meth)); - MP_CHECKOK(group->meth->field_sub(&tempx, qx, &tempx, group->meth)); - /* ry = (x1-x2) * lambda - y1 */ - MP_CHECKOK(group->meth->field_sub(qx, &tempx, &tempy, group->meth)); - MP_CHECKOK(group->meth-> - field_mul(&tempy, &lambda, &tempy, group->meth)); - MP_CHECKOK(group->meth->field_sub(&tempy, qy, &tempy, group->meth)); - MP_CHECKOK(mp_copy(&tempx, rx)); - MP_CHECKOK(mp_copy(&tempy, ry)); - - CLEANUP: - mp_clear(&lambda); - mp_clear(&temp); - mp_clear(&tempx); - mp_clear(&tempy); - return res; -} - -/* Computes R = P - Q. Elliptic curve points P, Q, and R can all be - * identical. Uses affine coordinates. Assumes input is already - * field-encoded using field_enc, and returns output that is still - * field-encoded. */ -mp_err -ec_GFp_pt_sub_aff(const mp_int *px, const mp_int *py, const mp_int *qx, - const mp_int *qy, mp_int *rx, mp_int *ry, - const ECGroup *group) -{ - mp_err res = MP_OKAY; - mp_int nqy; - - MP_DIGITS(&nqy) = 0; - MP_CHECKOK(mp_init(&nqy, FLAG(px))); - /* nqy = -qy */ - MP_CHECKOK(group->meth->field_neg(qy, &nqy, group->meth)); - res = group->point_add(px, py, qx, &nqy, rx, ry, group); - CLEANUP: - mp_clear(&nqy); - return res; -} - -/* Computes R = 2P. Elliptic curve points P and R can be identical. Uses - * affine coordinates. Assumes input is already field-encoded using - * field_enc, and returns output that is still field-encoded. */ -mp_err -ec_GFp_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx, - mp_int *ry, const ECGroup *group) -{ - return ec_GFp_pt_add_aff(px, py, px, py, rx, ry, group); -} - -/* by default, this routine is unused and thus doesn't need to be compiled */ -#ifdef ECL_ENABLE_GFP_PT_MUL_AFF -/* Computes R = nP based on IEEE P1363 A.10.3. Elliptic curve points P and - * R can be identical. Uses affine coordinates. Assumes input is already - * field-encoded using field_enc, and returns output that is still - * field-encoded. */ -mp_err -ec_GFp_pt_mul_aff(const mp_int *n, const mp_int *px, const mp_int *py, - mp_int *rx, mp_int *ry, const ECGroup *group) -{ - mp_err res = MP_OKAY; - mp_int k, k3, qx, qy, sx, sy; - int b1, b3, i, l; - - MP_DIGITS(&k) = 0; - MP_DIGITS(&k3) = 0; - MP_DIGITS(&qx) = 0; - MP_DIGITS(&qy) = 0; - MP_DIGITS(&sx) = 0; - MP_DIGITS(&sy) = 0; - MP_CHECKOK(mp_init(&k)); - MP_CHECKOK(mp_init(&k3)); - MP_CHECKOK(mp_init(&qx)); - MP_CHECKOK(mp_init(&qy)); - MP_CHECKOK(mp_init(&sx)); - MP_CHECKOK(mp_init(&sy)); - - /* if n = 0 then r = inf */ - if (mp_cmp_z(n) == 0) { - mp_zero(rx); - mp_zero(ry); - res = MP_OKAY; - goto CLEANUP; - } - /* Q = P, k = n */ - MP_CHECKOK(mp_copy(px, &qx)); - MP_CHECKOK(mp_copy(py, &qy)); - MP_CHECKOK(mp_copy(n, &k)); - /* if n < 0 then Q = -Q, k = -k */ - if (mp_cmp_z(n) < 0) { - MP_CHECKOK(group->meth->field_neg(&qy, &qy, group->meth)); - MP_CHECKOK(mp_neg(&k, &k)); - } -#ifdef ECL_DEBUG /* basic double and add method */ - l = mpl_significant_bits(&k) - 1; - MP_CHECKOK(mp_copy(&qx, &sx)); - MP_CHECKOK(mp_copy(&qy, &sy)); - for (i = l - 1; i >= 0; i--) { - /* S = 2S */ - MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group)); - /* if k_i = 1, then S = S + Q */ - if (mpl_get_bit(&k, i) != 0) { - MP_CHECKOK(group-> - point_add(&sx, &sy, &qx, &qy, &sx, &sy, group)); - } - } -#else /* double and add/subtract method from - * standard */ - /* k3 = 3 * k */ - MP_CHECKOK(mp_set_int(&k3, 3)); - MP_CHECKOK(mp_mul(&k, &k3, &k3)); - /* S = Q */ - MP_CHECKOK(mp_copy(&qx, &sx)); - MP_CHECKOK(mp_copy(&qy, &sy)); - /* l = index of high order bit in binary representation of 3*k */ - l = mpl_significant_bits(&k3) - 1; - /* for i = l-1 downto 1 */ - for (i = l - 1; i >= 1; i--) { - /* S = 2S */ - MP_CHECKOK(group->point_dbl(&sx, &sy, &sx, &sy, group)); - b3 = MP_GET_BIT(&k3, i); - b1 = MP_GET_BIT(&k, i); - /* if k3_i = 1 and k_i = 0, then S = S + Q */ - if ((b3 == 1) && (b1 == 0)) { - MP_CHECKOK(group-> - point_add(&sx, &sy, &qx, &qy, &sx, &sy, group)); - /* if k3_i = 0 and k_i = 1, then S = S - Q */ - } else if ((b3 == 0) && (b1 == 1)) { - MP_CHECKOK(group-> - point_sub(&sx, &sy, &qx, &qy, &sx, &sy, group)); - } - } -#endif - /* output S */ - MP_CHECKOK(mp_copy(&sx, rx)); - MP_CHECKOK(mp_copy(&sy, ry)); - - CLEANUP: - mp_clear(&k); - mp_clear(&k3); - mp_clear(&qx); - mp_clear(&qy); - mp_clear(&sx); - mp_clear(&sy); - return res; -} -#endif - -/* Validates a point on a GFp curve. */ -mp_err -ec_GFp_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group) -{ - mp_err res = MP_NO; - mp_int accl, accr, tmp, pxt, pyt; - - MP_DIGITS(&accl) = 0; - MP_DIGITS(&accr) = 0; - MP_DIGITS(&tmp) = 0; - MP_DIGITS(&pxt) = 0; - MP_DIGITS(&pyt) = 0; - MP_CHECKOK(mp_init(&accl, FLAG(px))); - MP_CHECKOK(mp_init(&accr, FLAG(px))); - MP_CHECKOK(mp_init(&tmp, FLAG(px))); - MP_CHECKOK(mp_init(&pxt, FLAG(px))); - MP_CHECKOK(mp_init(&pyt, FLAG(px))); - - /* 1: Verify that publicValue is not the point at infinity */ - if (ec_GFp_pt_is_inf_aff(px, py) == MP_YES) { - res = MP_NO; - goto CLEANUP; - } - /* 2: Verify that the coordinates of publicValue are elements - * of the field. - */ - if ((MP_SIGN(px) == MP_NEG) || (mp_cmp(px, &group->meth->irr) >= 0) || - (MP_SIGN(py) == MP_NEG) || (mp_cmp(py, &group->meth->irr) >= 0)) { - res = MP_NO; - goto CLEANUP; - } - /* 3: Verify that publicValue is on the curve. */ - if (group->meth->field_enc) { - group->meth->field_enc(px, &pxt, group->meth); - group->meth->field_enc(py, &pyt, group->meth); - } else { - mp_copy(px, &pxt); - mp_copy(py, &pyt); - } - /* left-hand side: y^2 */ - MP_CHECKOK( group->meth->field_sqr(&pyt, &accl, group->meth) ); - /* right-hand side: x^3 + a*x + b */ - MP_CHECKOK( group->meth->field_sqr(&pxt, &tmp, group->meth) ); - MP_CHECKOK( group->meth->field_mul(&pxt, &tmp, &accr, group->meth) ); - MP_CHECKOK( group->meth->field_mul(&group->curvea, &pxt, &tmp, group->meth) ); - MP_CHECKOK( group->meth->field_add(&tmp, &accr, &accr, group->meth) ); - MP_CHECKOK( group->meth->field_add(&accr, &group->curveb, &accr, group->meth) ); - /* check LHS - RHS == 0 */ - MP_CHECKOK( group->meth->field_sub(&accl, &accr, &accr, group->meth) ); - if (mp_cmp_z(&accr) != 0) { - res = MP_NO; - goto CLEANUP; - } - /* 4: Verify that the order of the curve times the publicValue - * is the point at infinity. - */ - /* timing mitigation is not supported */ - MP_CHECKOK( ECPoint_mul(group, &group->order, px, py, &pxt, &pyt, /*timing*/ 0) ); - if (ec_GFp_pt_is_inf_aff(&pxt, &pyt) != MP_YES) { - res = MP_NO; - goto CLEANUP; - } - - res = MP_YES; - -CLEANUP: - mp_clear(&accl); - mp_clear(&accr); - mp_clear(&tmp); - mp_clear(&pxt); - mp_clear(&pyt); - return res; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_jac.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_jac.c deleted file mode 100644 index 9e1bdf20f67..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_jac.c +++ /dev/null @@ -1,564 +0,0 @@ -/* - * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for prime field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Sheueling Chang-Shantz <sheueling.chang@sun.com>, - * Stephen Fung <fungstep@hotmail.com>, and - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories. - * Bodo Moeller <moeller@cdc.informatik.tu-darmstadt.de>, - * Nils Larsch <nla@trustcenter.de>, and - * Lenka Fibikova <fibikova@exp-math.uni-essen.de>, the OpenSSL Project - * - * Last Modified Date from the Original Code: May 2017 - *********************************************************************** */ - -#include "ecp.h" -#include "mplogic.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif -#ifdef ECL_DEBUG -#include <assert.h> -#endif - -/* Converts a point P(px, py) from affine coordinates to Jacobian - * projective coordinates R(rx, ry, rz). Assumes input is already - * field-encoded using field_enc, and returns output that is still - * field-encoded. */ -mp_err -ec_GFp_pt_aff2jac(const mp_int *px, const mp_int *py, mp_int *rx, - mp_int *ry, mp_int *rz, const ECGroup *group) -{ - mp_err res = MP_OKAY; - - if (ec_GFp_pt_is_inf_aff(px, py) == MP_YES) { - MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, rz)); - } else { - MP_CHECKOK(mp_copy(px, rx)); - MP_CHECKOK(mp_copy(py, ry)); - MP_CHECKOK(mp_set_int(rz, 1)); - if (group->meth->field_enc) { - MP_CHECKOK(group->meth->field_enc(rz, rz, group->meth)); - } - } - CLEANUP: - return res; -} - -/* Converts a point P(px, py, pz) from Jacobian projective coordinates to - * affine coordinates R(rx, ry). P and R can share x and y coordinates. - * Assumes input is already field-encoded using field_enc, and returns - * output that is still field-encoded. */ -mp_err -ec_GFp_pt_jac2aff(const mp_int *px, const mp_int *py, const mp_int *pz, - mp_int *rx, mp_int *ry, const ECGroup *group) -{ - mp_err res = MP_OKAY; - mp_int z1, z2, z3; - - MP_DIGITS(&z1) = 0; - MP_DIGITS(&z2) = 0; - MP_DIGITS(&z3) = 0; - MP_CHECKOK(mp_init(&z1, FLAG(px))); - MP_CHECKOK(mp_init(&z2, FLAG(px))); - MP_CHECKOK(mp_init(&z3, FLAG(px))); - - /* if point at infinity, then set point at infinity and exit */ - if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) { - MP_CHECKOK(ec_GFp_pt_set_inf_aff(rx, ry)); - goto CLEANUP; - } - - /* transform (px, py, pz) into (px / pz^2, py / pz^3) */ - if (mp_cmp_d(pz, 1) == 0) { - MP_CHECKOK(mp_copy(px, rx)); - MP_CHECKOK(mp_copy(py, ry)); - } else { - MP_CHECKOK(group->meth->field_div(NULL, pz, &z1, group->meth)); - MP_CHECKOK(group->meth->field_sqr(&z1, &z2, group->meth)); - MP_CHECKOK(group->meth->field_mul(&z1, &z2, &z3, group->meth)); - MP_CHECKOK(group->meth->field_mul(px, &z2, rx, group->meth)); - MP_CHECKOK(group->meth->field_mul(py, &z3, ry, group->meth)); - } - - CLEANUP: - mp_clear(&z1); - mp_clear(&z2); - mp_clear(&z3); - return res; -} - -/* Checks if point P(px, py, pz) is at infinity. Uses Jacobian - * coordinates. */ -mp_err -ec_GFp_pt_is_inf_jac(const mp_int *px, const mp_int *py, const mp_int *pz) -{ - return mp_cmp_z(pz); -} - -/* Sets P(px, py, pz) to be the point at infinity. Uses Jacobian - * coordinates. */ -mp_err -ec_GFp_pt_set_inf_jac(mp_int *px, mp_int *py, mp_int *pz) -{ - mp_zero(pz); - return MP_OKAY; -} - -/* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is - * (qx, qy, 1). Elliptic curve points P, Q, and R can all be identical. - * Uses mixed Jacobian-affine coordinates. Assumes input is already - * field-encoded using field_enc, and returns output that is still - * field-encoded. Uses equation (2) from Brown, Hankerson, Lopez, and - * Menezes. Software Implementation of the NIST Elliptic Curves Over Prime - * Fields. */ -mp_err -ec_GFp_pt_add_jac_aff(const mp_int *px, const mp_int *py, const mp_int *pz, - const mp_int *qx, const mp_int *qy, mp_int *rx, - mp_int *ry, mp_int *rz, const ECGroup *group) -{ - mp_err res = MP_OKAY; - mp_int A, B, C, D, C2, C3; - - MP_DIGITS(&A) = 0; - MP_DIGITS(&B) = 0; - MP_DIGITS(&C) = 0; - MP_DIGITS(&D) = 0; - MP_DIGITS(&C2) = 0; - MP_DIGITS(&C3) = 0; - MP_CHECKOK(mp_init(&A, FLAG(px))); - MP_CHECKOK(mp_init(&B, FLAG(px))); - MP_CHECKOK(mp_init(&C, FLAG(px))); - MP_CHECKOK(mp_init(&D, FLAG(px))); - MP_CHECKOK(mp_init(&C2, FLAG(px))); - MP_CHECKOK(mp_init(&C3, FLAG(px))); - - /* If either P or Q is the point at infinity, then return the other - * point */ - if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) { - MP_CHECKOK(ec_GFp_pt_aff2jac(qx, qy, rx, ry, rz, group)); - goto CLEANUP; - } - if (ec_GFp_pt_is_inf_aff(qx, qy) == MP_YES) { - MP_CHECKOK(mp_copy(px, rx)); - MP_CHECKOK(mp_copy(py, ry)); - MP_CHECKOK(mp_copy(pz, rz)); - goto CLEANUP; - } - - /* A = qx * pz^2, B = qy * pz^3 */ - MP_CHECKOK(group->meth->field_sqr(pz, &A, group->meth)); - MP_CHECKOK(group->meth->field_mul(&A, pz, &B, group->meth)); - MP_CHECKOK(group->meth->field_mul(&A, qx, &A, group->meth)); - MP_CHECKOK(group->meth->field_mul(&B, qy, &B, group->meth)); - - /* - * Additional checks for point equality and point at infinity - */ - if (mp_cmp(px, &A) == 0 && mp_cmp(py, &B) == 0) { - /* POINT_DOUBLE(P) */ - MP_CHECKOK(ec_GFp_pt_dbl_jac(px, py, pz, rx, ry, rz, group)); - goto CLEANUP; - } - - /* C = A - px, D = B - py */ - MP_CHECKOK(group->meth->field_sub(&A, px, &C, group->meth)); - MP_CHECKOK(group->meth->field_sub(&B, py, &D, group->meth)); - - /* C2 = C^2, C3 = C^3 */ - MP_CHECKOK(group->meth->field_sqr(&C, &C2, group->meth)); - MP_CHECKOK(group->meth->field_mul(&C, &C2, &C3, group->meth)); - - /* rz = pz * C */ - MP_CHECKOK(group->meth->field_mul(pz, &C, rz, group->meth)); - - /* C = px * C^2 */ - MP_CHECKOK(group->meth->field_mul(px, &C2, &C, group->meth)); - /* A = D^2 */ - MP_CHECKOK(group->meth->field_sqr(&D, &A, group->meth)); - - /* rx = D^2 - (C^3 + 2 * (px * C^2)) */ - MP_CHECKOK(group->meth->field_add(&C, &C, rx, group->meth)); - MP_CHECKOK(group->meth->field_add(&C3, rx, rx, group->meth)); - MP_CHECKOK(group->meth->field_sub(&A, rx, rx, group->meth)); - - /* C3 = py * C^3 */ - MP_CHECKOK(group->meth->field_mul(py, &C3, &C3, group->meth)); - - /* ry = D * (px * C^2 - rx) - py * C^3 */ - MP_CHECKOK(group->meth->field_sub(&C, rx, ry, group->meth)); - MP_CHECKOK(group->meth->field_mul(&D, ry, ry, group->meth)); - MP_CHECKOK(group->meth->field_sub(ry, &C3, ry, group->meth)); - - CLEANUP: - mp_clear(&A); - mp_clear(&B); - mp_clear(&C); - mp_clear(&D); - mp_clear(&C2); - mp_clear(&C3); - return res; -} - -/* Computes R = 2P. Elliptic curve points P and R can be identical. Uses - * Jacobian coordinates. - * - * Assumes input is already field-encoded using field_enc, and returns - * output that is still field-encoded. - * - * This routine implements Point Doubling in the Jacobian Projective - * space as described in the paper "Efficient elliptic curve exponentiation - * using mixed coordinates", by H. Cohen, A Miyaji, T. Ono. - */ -mp_err -ec_GFp_pt_dbl_jac(const mp_int *px, const mp_int *py, const mp_int *pz, - mp_int *rx, mp_int *ry, mp_int *rz, const ECGroup *group) -{ - mp_err res = MP_OKAY; - mp_int t0, t1, M, S; - - MP_DIGITS(&t0) = 0; - MP_DIGITS(&t1) = 0; - MP_DIGITS(&M) = 0; - MP_DIGITS(&S) = 0; - MP_CHECKOK(mp_init(&t0, FLAG(px))); - MP_CHECKOK(mp_init(&t1, FLAG(px))); - MP_CHECKOK(mp_init(&M, FLAG(px))); - MP_CHECKOK(mp_init(&S, FLAG(px))); - - if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) { - MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, rz)); - goto CLEANUP; - } - - if (mp_cmp_d(pz, 1) == 0) { - /* M = 3 * px^2 + a */ - MP_CHECKOK(group->meth->field_sqr(px, &t0, group->meth)); - MP_CHECKOK(group->meth->field_add(&t0, &t0, &M, group->meth)); - MP_CHECKOK(group->meth->field_add(&t0, &M, &t0, group->meth)); - MP_CHECKOK(group->meth-> - field_add(&t0, &group->curvea, &M, group->meth)); - } else if (mp_cmp_int(&group->curvea, -3, FLAG(px)) == 0) { - /* M = 3 * (px + pz^2) * (px - pz^2) */ - MP_CHECKOK(group->meth->field_sqr(pz, &M, group->meth)); - MP_CHECKOK(group->meth->field_add(px, &M, &t0, group->meth)); - MP_CHECKOK(group->meth->field_sub(px, &M, &t1, group->meth)); - MP_CHECKOK(group->meth->field_mul(&t0, &t1, &M, group->meth)); - MP_CHECKOK(group->meth->field_add(&M, &M, &t0, group->meth)); - MP_CHECKOK(group->meth->field_add(&t0, &M, &M, group->meth)); - } else { - /* M = 3 * (px^2) + a * (pz^4) */ - MP_CHECKOK(group->meth->field_sqr(px, &t0, group->meth)); - MP_CHECKOK(group->meth->field_add(&t0, &t0, &M, group->meth)); - MP_CHECKOK(group->meth->field_add(&t0, &M, &t0, group->meth)); - MP_CHECKOK(group->meth->field_sqr(pz, &M, group->meth)); - MP_CHECKOK(group->meth->field_sqr(&M, &M, group->meth)); - MP_CHECKOK(group->meth-> - field_mul(&M, &group->curvea, &M, group->meth)); - MP_CHECKOK(group->meth->field_add(&M, &t0, &M, group->meth)); - } - - /* rz = 2 * py * pz */ - /* t0 = 4 * py^2 */ - if (mp_cmp_d(pz, 1) == 0) { - MP_CHECKOK(group->meth->field_add(py, py, rz, group->meth)); - MP_CHECKOK(group->meth->field_sqr(rz, &t0, group->meth)); - } else { - MP_CHECKOK(group->meth->field_add(py, py, &t0, group->meth)); - MP_CHECKOK(group->meth->field_mul(&t0, pz, rz, group->meth)); - MP_CHECKOK(group->meth->field_sqr(&t0, &t0, group->meth)); - } - - /* S = 4 * px * py^2 = px * (2 * py)^2 */ - MP_CHECKOK(group->meth->field_mul(px, &t0, &S, group->meth)); - - /* rx = M^2 - 2 * S */ - MP_CHECKOK(group->meth->field_add(&S, &S, &t1, group->meth)); - MP_CHECKOK(group->meth->field_sqr(&M, rx, group->meth)); - MP_CHECKOK(group->meth->field_sub(rx, &t1, rx, group->meth)); - - /* ry = M * (S - rx) - 8 * py^4 */ - MP_CHECKOK(group->meth->field_sqr(&t0, &t1, group->meth)); - if (mp_isodd(&t1)) { - MP_CHECKOK(mp_add(&t1, &group->meth->irr, &t1)); - } - MP_CHECKOK(mp_div_2(&t1, &t1)); - MP_CHECKOK(group->meth->field_sub(&S, rx, &S, group->meth)); - MP_CHECKOK(group->meth->field_mul(&M, &S, &M, group->meth)); - MP_CHECKOK(group->meth->field_sub(&M, &t1, ry, group->meth)); - - CLEANUP: - mp_clear(&t0); - mp_clear(&t1); - mp_clear(&M); - mp_clear(&S); - return res; -} - -/* by default, this routine is unused and thus doesn't need to be compiled */ -#ifdef ECL_ENABLE_GFP_PT_MUL_JAC -/* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters - * a, b and p are the elliptic curve coefficients and the prime that - * determines the field GFp. Elliptic curve points P and R can be - * identical. Uses mixed Jacobian-affine coordinates. Assumes input is - * already field-encoded using field_enc, and returns output that is still - * field-encoded. Uses 4-bit window method. */ -mp_err -ec_GFp_pt_mul_jac(const mp_int *n, const mp_int *px, const mp_int *py, - mp_int *rx, mp_int *ry, const ECGroup *group) -{ - mp_err res = MP_OKAY; - mp_int precomp[16][2], rz; - int i, ni, d; - - MP_DIGITS(&rz) = 0; - for (i = 0; i < 16; i++) { - MP_DIGITS(&precomp[i][0]) = 0; - MP_DIGITS(&precomp[i][1]) = 0; - } - - ARGCHK(group != NULL, MP_BADARG); - ARGCHK((n != NULL) && (px != NULL) && (py != NULL), MP_BADARG); - - /* initialize precomputation table */ - for (i = 0; i < 16; i++) { - MP_CHECKOK(mp_init(&precomp[i][0])); - MP_CHECKOK(mp_init(&precomp[i][1])); - } - - /* fill precomputation table */ - mp_zero(&precomp[0][0]); - mp_zero(&precomp[0][1]); - MP_CHECKOK(mp_copy(px, &precomp[1][0])); - MP_CHECKOK(mp_copy(py, &precomp[1][1])); - for (i = 2; i < 16; i++) { - MP_CHECKOK(group-> - point_add(&precomp[1][0], &precomp[1][1], - &precomp[i - 1][0], &precomp[i - 1][1], - &precomp[i][0], &precomp[i][1], group)); - } - - d = (mpl_significant_bits(n) + 3) / 4; - - /* R = inf */ - MP_CHECKOK(mp_init(&rz)); - MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, &rz)); - - for (i = d - 1; i >= 0; i--) { - /* compute window ni */ - ni = MP_GET_BIT(n, 4 * i + 3); - ni <<= 1; - ni |= MP_GET_BIT(n, 4 * i + 2); - ni <<= 1; - ni |= MP_GET_BIT(n, 4 * i + 1); - ni <<= 1; - ni |= MP_GET_BIT(n, 4 * i); - /* R = 2^4 * R */ - MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group)); - MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group)); - MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group)); - MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group)); - /* R = R + (ni * P) */ - MP_CHECKOK(ec_GFp_pt_add_jac_aff - (rx, ry, &rz, &precomp[ni][0], &precomp[ni][1], rx, ry, - &rz, group)); - } - - /* convert result S to affine coordinates */ - MP_CHECKOK(ec_GFp_pt_jac2aff(rx, ry, &rz, rx, ry, group)); - - CLEANUP: - mp_clear(&rz); - for (i = 0; i < 16; i++) { - mp_clear(&precomp[i][0]); - mp_clear(&precomp[i][1]); - } - return res; -} -#endif - -/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G + - * k2 * P(x, y), where G is the generator (base point) of the group of - * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL. - * Uses mixed Jacobian-affine coordinates. Input and output values are - * assumed to be NOT field-encoded. Uses algorithm 15 (simultaneous - * multiple point multiplication) from Brown, Hankerson, Lopez, Menezes. - * Software Implementation of the NIST Elliptic Curves over Prime Fields. */ -mp_err -ec_GFp_pts_mul_jac(const mp_int *k1, const mp_int *k2, const mp_int *px, - const mp_int *py, mp_int *rx, mp_int *ry, - const ECGroup *group, int timing) -{ - mp_err res = MP_OKAY; - mp_int precomp[4][4][2]; - mp_int rz; - const mp_int *a, *b; - int i, j; - int ai, bi, d; - - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - MP_DIGITS(&precomp[i][j][0]) = 0; - MP_DIGITS(&precomp[i][j][1]) = 0; - } - } - MP_DIGITS(&rz) = 0; - - ARGCHK(group != NULL, MP_BADARG); - ARGCHK(!((k1 == NULL) - && ((k2 == NULL) || (px == NULL) - || (py == NULL))), MP_BADARG); - - /* if some arguments are not defined used ECPoint_mul */ - if (k1 == NULL) { - return ECPoint_mul(group, k2, px, py, rx, ry, timing); - } else if ((k2 == NULL) || (px == NULL) || (py == NULL)) { - return ECPoint_mul(group, k1, NULL, NULL, rx, ry, timing); - } - - /* initialize precomputation table */ - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - MP_CHECKOK(mp_init(&precomp[i][j][0], FLAG(k1))); - MP_CHECKOK(mp_init(&precomp[i][j][1], FLAG(k1))); - } - } - - /* fill precomputation table */ - /* assign {k1, k2} = {a, b} such that len(a) >= len(b) */ - if (mpl_significant_bits(k1) < mpl_significant_bits(k2)) { - a = k2; - b = k1; - if (group->meth->field_enc) { - MP_CHECKOK(group->meth-> - field_enc(px, &precomp[1][0][0], group->meth)); - MP_CHECKOK(group->meth-> - field_enc(py, &precomp[1][0][1], group->meth)); - } else { - MP_CHECKOK(mp_copy(px, &precomp[1][0][0])); - MP_CHECKOK(mp_copy(py, &precomp[1][0][1])); - } - MP_CHECKOK(mp_copy(&group->genx, &precomp[0][1][0])); - MP_CHECKOK(mp_copy(&group->geny, &precomp[0][1][1])); - } else { - a = k1; - b = k2; - MP_CHECKOK(mp_copy(&group->genx, &precomp[1][0][0])); - MP_CHECKOK(mp_copy(&group->geny, &precomp[1][0][1])); - if (group->meth->field_enc) { - MP_CHECKOK(group->meth-> - field_enc(px, &precomp[0][1][0], group->meth)); - MP_CHECKOK(group->meth-> - field_enc(py, &precomp[0][1][1], group->meth)); - } else { - MP_CHECKOK(mp_copy(px, &precomp[0][1][0])); - MP_CHECKOK(mp_copy(py, &precomp[0][1][1])); - } - } - /* precompute [*][0][*] */ - mp_zero(&precomp[0][0][0]); - mp_zero(&precomp[0][0][1]); - MP_CHECKOK(group-> - point_dbl(&precomp[1][0][0], &precomp[1][0][1], - &precomp[2][0][0], &precomp[2][0][1], group)); - MP_CHECKOK(group-> - point_add(&precomp[1][0][0], &precomp[1][0][1], - &precomp[2][0][0], &precomp[2][0][1], - &precomp[3][0][0], &precomp[3][0][1], group)); - /* precompute [*][1][*] */ - for (i = 1; i < 4; i++) { - MP_CHECKOK(group-> - point_add(&precomp[0][1][0], &precomp[0][1][1], - &precomp[i][0][0], &precomp[i][0][1], - &precomp[i][1][0], &precomp[i][1][1], group)); - } - /* precompute [*][2][*] */ - MP_CHECKOK(group-> - point_dbl(&precomp[0][1][0], &precomp[0][1][1], - &precomp[0][2][0], &precomp[0][2][1], group)); - for (i = 1; i < 4; i++) { - MP_CHECKOK(group-> - point_add(&precomp[0][2][0], &precomp[0][2][1], - &precomp[i][0][0], &precomp[i][0][1], - &precomp[i][2][0], &precomp[i][2][1], group)); - } - /* precompute [*][3][*] */ - MP_CHECKOK(group-> - point_add(&precomp[0][1][0], &precomp[0][1][1], - &precomp[0][2][0], &precomp[0][2][1], - &precomp[0][3][0], &precomp[0][3][1], group)); - for (i = 1; i < 4; i++) { - MP_CHECKOK(group-> - point_add(&precomp[0][3][0], &precomp[0][3][1], - &precomp[i][0][0], &precomp[i][0][1], - &precomp[i][3][0], &precomp[i][3][1], group)); - } - - d = (mpl_significant_bits(a) + 1) / 2; - - /* R = inf */ - MP_CHECKOK(mp_init(&rz, FLAG(k1))); - MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, &rz)); - - for (i = d - 1; i >= 0; i--) { - ai = MP_GET_BIT(a, 2 * i + 1); - ai <<= 1; - ai |= MP_GET_BIT(a, 2 * i); - bi = MP_GET_BIT(b, 2 * i + 1); - bi <<= 1; - bi |= MP_GET_BIT(b, 2 * i); - /* R = 2^2 * R */ - MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group)); - MP_CHECKOK(ec_GFp_pt_dbl_jac(rx, ry, &rz, rx, ry, &rz, group)); - /* R = R + (ai * A + bi * B) */ - MP_CHECKOK(ec_GFp_pt_add_jac_aff - (rx, ry, &rz, &precomp[ai][bi][0], &precomp[ai][bi][1], - rx, ry, &rz, group)); - } - - MP_CHECKOK(ec_GFp_pt_jac2aff(rx, ry, &rz, rx, ry, group)); - - if (group->meth->field_dec) { - MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth)); - MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth)); - } - - CLEANUP: - mp_clear(&rz); - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - mp_clear(&precomp[i][j][0]); - mp_clear(&precomp[i][j][1]); - } - } - return res; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_jm.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_jm.c deleted file mode 100644 index c5cdef9bf4a..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_jm.c +++ /dev/null @@ -1,396 +0,0 @@ -/* - * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library for prime field curves. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Stephen Fung <fungstep@hotmail.com>, Sun Microsystems Laboratories - * - * Last Modified Date from the Original Code: May 2017 - *********************************************************************** */ - -#include "ecp.h" -#include "ecl-priv.h" -#include "mplogic.h" -#ifndef _KERNEL -#include <stdlib.h> -#endif - -#define MAX_SCRATCH 6 - -/* Computes R = 2P. Elliptic curve points P and R can be identical. Uses - * Modified Jacobian coordinates. - * - * Assumes input is already field-encoded using field_enc, and returns - * output that is still field-encoded. - * - */ -mp_err -ec_GFp_pt_dbl_jm(const mp_int *px, const mp_int *py, const mp_int *pz, - const mp_int *paz4, mp_int *rx, mp_int *ry, mp_int *rz, - mp_int *raz4, mp_int scratch[], const ECGroup *group) -{ - mp_err res = MP_OKAY; - mp_int *t0, *t1, *M, *S; - - t0 = &scratch[0]; - t1 = &scratch[1]; - M = &scratch[2]; - S = &scratch[3]; - -#if MAX_SCRATCH < 4 -#error "Scratch array defined too small " -#endif - - /* Check for point at infinity */ - if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) { - /* Set r = pt at infinity by setting rz = 0 */ - - MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, rz)); - goto CLEANUP; - } - - /* M = 3 (px^2) + a*(pz^4) */ - MP_CHECKOK(group->meth->field_sqr(px, t0, group->meth)); - MP_CHECKOK(group->meth->field_add(t0, t0, M, group->meth)); - MP_CHECKOK(group->meth->field_add(t0, M, t0, group->meth)); - MP_CHECKOK(group->meth->field_add(t0, paz4, M, group->meth)); - - /* rz = 2 * py * pz */ - MP_CHECKOK(group->meth->field_mul(py, pz, S, group->meth)); - MP_CHECKOK(group->meth->field_add(S, S, rz, group->meth)); - - /* t0 = 2y^2 , t1 = 8y^4 */ - MP_CHECKOK(group->meth->field_sqr(py, t0, group->meth)); - MP_CHECKOK(group->meth->field_add(t0, t0, t0, group->meth)); - MP_CHECKOK(group->meth->field_sqr(t0, t1, group->meth)); - MP_CHECKOK(group->meth->field_add(t1, t1, t1, group->meth)); - - /* S = 4 * px * py^2 = 2 * px * t0 */ - MP_CHECKOK(group->meth->field_mul(px, t0, S, group->meth)); - MP_CHECKOK(group->meth->field_add(S, S, S, group->meth)); - - - /* rx = M^2 - 2S */ - MP_CHECKOK(group->meth->field_sqr(M, rx, group->meth)); - MP_CHECKOK(group->meth->field_sub(rx, S, rx, group->meth)); - MP_CHECKOK(group->meth->field_sub(rx, S, rx, group->meth)); - - /* ry = M * (S - rx) - t1 */ - MP_CHECKOK(group->meth->field_sub(S, rx, S, group->meth)); - MP_CHECKOK(group->meth->field_mul(S, M, ry, group->meth)); - MP_CHECKOK(group->meth->field_sub(ry, t1, ry, group->meth)); - - /* ra*z^4 = 2*t1*(apz4) */ - MP_CHECKOK(group->meth->field_mul(paz4, t1, raz4, group->meth)); - MP_CHECKOK(group->meth->field_add(raz4, raz4, raz4, group->meth)); - - - CLEANUP: - return res; -} - -/* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is - * (qx, qy, 1). Elliptic curve points P, Q, and R can all be identical. - * Uses mixed Modified_Jacobian-affine coordinates. Assumes input is - * already field-encoded using field_enc, and returns output that is still - * field-encoded. */ -mp_err -ec_GFp_pt_add_jm_aff(const mp_int *px, const mp_int *py, const mp_int *pz, - const mp_int *paz4, const mp_int *qx, - const mp_int *qy, mp_int *rx, mp_int *ry, mp_int *rz, - mp_int *raz4, mp_int scratch[], const ECGroup *group) -{ - mp_err res = MP_OKAY; - mp_int *A, *B, *C, *D, *C2, *C3; - - A = &scratch[0]; - B = &scratch[1]; - C = &scratch[2]; - D = &scratch[3]; - C2 = &scratch[4]; - C3 = &scratch[5]; - -#if MAX_SCRATCH < 6 -#error "Scratch array defined too small " -#endif - - /* If either P or Q is the point at infinity, then return the other - * point */ - if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) { - MP_CHECKOK(ec_GFp_pt_aff2jac(qx, qy, rx, ry, rz, group)); - MP_CHECKOK(group->meth->field_sqr(rz, raz4, group->meth)); - MP_CHECKOK(group->meth->field_sqr(raz4, raz4, group->meth)); - MP_CHECKOK(group->meth-> - field_mul(raz4, &group->curvea, raz4, group->meth)); - goto CLEANUP; - } - if (ec_GFp_pt_is_inf_aff(qx, qy) == MP_YES) { - MP_CHECKOK(mp_copy(px, rx)); - MP_CHECKOK(mp_copy(py, ry)); - MP_CHECKOK(mp_copy(pz, rz)); - MP_CHECKOK(mp_copy(paz4, raz4)); - goto CLEANUP; - } - - /* A = qx * pz^2, B = qy * pz^3 */ - MP_CHECKOK(group->meth->field_sqr(pz, A, group->meth)); - MP_CHECKOK(group->meth->field_mul(A, pz, B, group->meth)); - MP_CHECKOK(group->meth->field_mul(A, qx, A, group->meth)); - MP_CHECKOK(group->meth->field_mul(B, qy, B, group->meth)); - - /* - * Additional checks for point equality and point at infinity - */ - if (mp_cmp(px, A) == 0 && mp_cmp(py, B) == 0) { - /* POINT_DOUBLE(P) */ - MP_CHECKOK(ec_GFp_pt_dbl_jm(px, py, pz, paz4, rx, ry, rz, raz4, - scratch, group)); - goto CLEANUP; - } - - /* C = A - px, D = B - py */ - MP_CHECKOK(group->meth->field_sub(A, px, C, group->meth)); - MP_CHECKOK(group->meth->field_sub(B, py, D, group->meth)); - - /* C2 = C^2, C3 = C^3 */ - MP_CHECKOK(group->meth->field_sqr(C, C2, group->meth)); - MP_CHECKOK(group->meth->field_mul(C, C2, C3, group->meth)); - - /* rz = pz * C */ - MP_CHECKOK(group->meth->field_mul(pz, C, rz, group->meth)); - - /* C = px * C^2 */ - MP_CHECKOK(group->meth->field_mul(px, C2, C, group->meth)); - /* A = D^2 */ - MP_CHECKOK(group->meth->field_sqr(D, A, group->meth)); - - /* rx = D^2 - (C^3 + 2 * (px * C^2)) */ - MP_CHECKOK(group->meth->field_add(C, C, rx, group->meth)); - MP_CHECKOK(group->meth->field_add(C3, rx, rx, group->meth)); - MP_CHECKOK(group->meth->field_sub(A, rx, rx, group->meth)); - - /* C3 = py * C^3 */ - MP_CHECKOK(group->meth->field_mul(py, C3, C3, group->meth)); - - /* ry = D * (px * C^2 - rx) - py * C^3 */ - MP_CHECKOK(group->meth->field_sub(C, rx, ry, group->meth)); - MP_CHECKOK(group->meth->field_mul(D, ry, ry, group->meth)); - MP_CHECKOK(group->meth->field_sub(ry, C3, ry, group->meth)); - - /* raz4 = a * rz^4 */ - MP_CHECKOK(group->meth->field_sqr(rz, raz4, group->meth)); - MP_CHECKOK(group->meth->field_sqr(raz4, raz4, group->meth)); - MP_CHECKOK(group->meth-> - field_mul(raz4, &group->curvea, raz4, group->meth)); -CLEANUP: - return res; -} - -/* Computes R = nP where R is (rx, ry) and P is the base point. Elliptic - * curve points P and R can be identical. Uses mixed Modified-Jacobian - * co-ordinates for doubling and Chudnovsky Jacobian coordinates for - * additions. Assumes input is already field-encoded using field_enc, and - * returns output that is still field-encoded. Uses 5-bit window NAF - * method (algorithm 11) for scalar-point multiplication from Brown, - * Hankerson, Lopez, Menezes. Software Implementation of the NIST Elliptic - * Curves Over Prime Fields. */ -mp_err -ec_GFp_pt_mul_jm_wNAF(const mp_int *n, const mp_int *px, const mp_int *py, - mp_int *rx, mp_int *ry, const ECGroup *group, - int timing) -{ - mp_err res = MP_OKAY; - mp_int precomp[16][2], rz, tpx, tpy, tpz; - mp_int raz4, tpaz4; - mp_int scratch[MAX_SCRATCH]; - signed char *naf = NULL; - int i, orderBitSize; - int numDoubles, numAdds, extraDoubles, extraAdds; - - MP_DIGITS(&rz) = 0; - MP_DIGITS(&raz4) = 0; - MP_DIGITS(&tpx) = 0; - MP_DIGITS(&tpy) = 0; - MP_DIGITS(&tpz) = 0; - MP_DIGITS(&tpaz4) = 0; - for (i = 0; i < 16; i++) { - MP_DIGITS(&precomp[i][0]) = 0; - MP_DIGITS(&precomp[i][1]) = 0; - } - for (i = 0; i < MAX_SCRATCH; i++) { - MP_DIGITS(&scratch[i]) = 0; - } - - ARGCHK(group != NULL, MP_BADARG); - ARGCHK((n != NULL) && (px != NULL) && (py != NULL), MP_BADARG); - - /* initialize precomputation table */ - MP_CHECKOK(mp_init(&tpx, FLAG(n))); - MP_CHECKOK(mp_init(&tpy, FLAG(n))); - MP_CHECKOK(mp_init(&tpz, FLAG(n))); - MP_CHECKOK(mp_init(&tpaz4, FLAG(n))); - MP_CHECKOK(mp_init(&rz, FLAG(n))); - MP_CHECKOK(mp_init(&raz4, FLAG(n))); - - for (i = 0; i < 16; i++) { - MP_CHECKOK(mp_init(&precomp[i][0], FLAG(n))); - MP_CHECKOK(mp_init(&precomp[i][1], FLAG(n))); - } - for (i = 0; i < MAX_SCRATCH; i++) { - MP_CHECKOK(mp_init(&scratch[i], FLAG(n))); - } - - /* Set out[8] = P */ - MP_CHECKOK(mp_copy(px, &precomp[8][0])); - MP_CHECKOK(mp_copy(py, &precomp[8][1])); - - /* Set (tpx, tpy) = 2P */ - MP_CHECKOK(group-> - point_dbl(&precomp[8][0], &precomp[8][1], &tpx, &tpy, - group)); - - /* Set 3P, 5P, ..., 15P */ - for (i = 8; i < 15; i++) { - MP_CHECKOK(group-> - point_add(&precomp[i][0], &precomp[i][1], &tpx, &tpy, - &precomp[i + 1][0], &precomp[i + 1][1], - group)); - } - - /* Set -15P, -13P, ..., -P */ - for (i = 0; i < 8; i++) { - MP_CHECKOK(mp_copy(&precomp[15 - i][0], &precomp[i][0])); - MP_CHECKOK(group->meth-> - field_neg(&precomp[15 - i][1], &precomp[i][1], - group->meth)); - } - - /* R = inf */ - MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, &rz)); - - orderBitSize = mpl_significant_bits(&group->order); - - /* Allocate memory for NAF */ -#ifdef _KERNEL - naf = (signed char *) kmem_alloc((orderBitSize + 1), FLAG(n)); -#else - naf = (signed char *) malloc(sizeof(signed char) * (orderBitSize + 1)); - if (naf == NULL) { - res = MP_MEM; - goto CLEANUP; - } -#endif - - /* Compute 5NAF */ - ec_compute_wNAF(naf, orderBitSize, n, 5); - - numAdds = 0; - numDoubles = orderBitSize; - /* wNAF method */ - for (i = orderBitSize; i >= 0; i--) { - - if (ec_GFp_pt_is_inf_jac(rx, ry, &rz) == MP_YES) { - numDoubles--; - } - - /* R = 2R */ - ec_GFp_pt_dbl_jm(rx, ry, &rz, &raz4, rx, ry, &rz, - &raz4, scratch, group); - - if (naf[i] != 0) { - ec_GFp_pt_add_jm_aff(rx, ry, &rz, &raz4, - &precomp[(naf[i] + 15) / 2][0], - &precomp[(naf[i] + 15) / 2][1], rx, ry, - &rz, &raz4, scratch, group); - numAdds++; - } - } - - /* extra operations to make timing less dependent on secrets */ - if (timing) { - /* low-order bit of timing argument contains no entropy */ - timing >>= 1; - - MP_CHECKOK(ec_GFp_pt_set_inf_jac(&tpx, &tpy, &tpz)); - mp_zero(&tpaz4); - - /* Set the temp value to a non-infinite point */ - ec_GFp_pt_add_jm_aff(&tpx, &tpy, &tpz, &tpaz4, - &precomp[8][0], - &precomp[8][1], &tpx, &tpy, - &tpz, &tpaz4, scratch, group); - - /* two bits of extra adds */ - extraAdds = timing & 0x3; - timing >>= 2; - /* Window size is 5, so the maximum number of additions is ceil(orderBitSize/5) */ - /* This is the same as (orderBitSize + 4) / 5 */ - for(i = numAdds; i <= (orderBitSize + 4) / 5 + extraAdds; i++) { - ec_GFp_pt_add_jm_aff(&tpx, &tpy, &tpz, &tpaz4, - &precomp[9 + (i % 3)][0], - &precomp[9 + (i % 3)][1], &tpx, &tpy, - &tpz, &tpaz4, scratch, group); - } - - /* two bits of extra doubles */ - extraDoubles = timing & 0x3; - timing >>= 2; - for(i = numDoubles; i <= orderBitSize + extraDoubles; i++) { - ec_GFp_pt_dbl_jm(&tpx, &tpy, &tpz, &tpaz4, &tpx, &tpy, &tpz, - &tpaz4, scratch, group); - } - - } - - /* convert result S to affine coordinates */ - MP_CHECKOK(ec_GFp_pt_jac2aff(rx, ry, &rz, rx, ry, group)); - - CLEANUP: - for (i = 0; i < MAX_SCRATCH; i++) { - mp_clear(&scratch[i]); - } - for (i = 0; i < 16; i++) { - mp_clear(&precomp[i][0]); - mp_clear(&precomp[i][1]); - } - mp_clear(&tpx); - mp_clear(&tpy); - mp_clear(&tpz); - mp_clear(&tpaz4); - mp_clear(&rz); - mp_clear(&raz4); -#ifdef _KERNEL - kmem_free(naf, (orderBitSize + 1)); -#else - free(naf); -#endif - return res; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_mont.c b/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_mont.c deleted file mode 100644 index 6b5d6a62def..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/ecp_mont.c +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the elliptic curve math library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories - * - *********************************************************************** */ - -/* Uses Montgomery reduction for field arithmetic. See mpi/mpmontg.c for - * code implementation. */ - -#include "mpi.h" -#include "mplogic.h" -#include "mpi-priv.h" -#include "ecl-priv.h" -#include "ecp.h" -#ifndef _KERNEL -#include <stdlib.h> -#include <stdio.h> -#endif - -/* Construct a generic GFMethod for arithmetic over prime fields with - * irreducible irr. */ -GFMethod * -GFMethod_consGFp_mont(const mp_int *irr) -{ - mp_err res = MP_OKAY; - int i; - GFMethod *meth = NULL; - mp_mont_modulus *mmm; - - meth = GFMethod_consGFp(irr); - if (meth == NULL) - return NULL; - -#ifdef _KERNEL - mmm = (mp_mont_modulus *) kmem_alloc(sizeof(mp_mont_modulus), - FLAG(irr)); -#else - mmm = (mp_mont_modulus *) malloc(sizeof(mp_mont_modulus)); -#endif - if (mmm == NULL) { - res = MP_MEM; - goto CLEANUP; - } - - meth->field_mul = &ec_GFp_mul_mont; - meth->field_sqr = &ec_GFp_sqr_mont; - meth->field_div = &ec_GFp_div_mont; - meth->field_enc = &ec_GFp_enc_mont; - meth->field_dec = &ec_GFp_dec_mont; - meth->extra1 = mmm; - meth->extra2 = NULL; - meth->extra_free = &ec_GFp_extra_free_mont; - - mmm->N = meth->irr; - i = mpl_significant_bits(&meth->irr); - i += MP_DIGIT_BIT - 1; - mmm->b = i - i % MP_DIGIT_BIT; - mmm->n0prime = 0 - s_mp_invmod_radix(MP_DIGIT(&meth->irr, 0)); - - CLEANUP: - if (res != MP_OKAY) { - GFMethod_free(meth); - return NULL; - } - return meth; -} - -/* Wrapper functions for generic prime field arithmetic. */ - -/* Field multiplication using Montgomery reduction. */ -mp_err -ec_GFp_mul_mont(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - -#ifdef MP_MONT_USE_MP_MUL - /* if MP_MONT_USE_MP_MUL is defined, then the function s_mp_mul_mont - * is not implemented and we have to use mp_mul and s_mp_redc directly - */ - MP_CHECKOK(mp_mul(a, b, r)); - MP_CHECKOK(s_mp_redc(r, (mp_mont_modulus *) meth->extra1)); -#else - mp_int s; - - MP_DIGITS(&s) = 0; - /* s_mp_mul_mont doesn't allow source and destination to be the same */ - if ((a == r) || (b == r)) { - MP_CHECKOK(mp_init(&s, FLAG(a))); - MP_CHECKOK(s_mp_mul_mont - (a, b, &s, (mp_mont_modulus *) meth->extra1)); - MP_CHECKOK(mp_copy(&s, r)); - mp_clear(&s); - } else { - return s_mp_mul_mont(a, b, r, (mp_mont_modulus *) meth->extra1); - } -#endif - CLEANUP: - return res; -} - -/* Field squaring using Montgomery reduction. */ -mp_err -ec_GFp_sqr_mont(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - return ec_GFp_mul_mont(a, a, r, meth); -} - -/* Field division using Montgomery reduction. */ -mp_err -ec_GFp_div_mont(const mp_int *a, const mp_int *b, mp_int *r, - const GFMethod *meth) -{ - mp_err res = MP_OKAY; - - /* if A=aZ represents a encoded in montgomery coordinates with Z and # - * and \ respectively represent multiplication and division in - * montgomery coordinates, then A\B = (a/b)Z = (A/B)Z and Binv = - * (1/b)Z = (1/B)(Z^2) where B # Binv = Z */ - MP_CHECKOK(ec_GFp_div(a, b, r, meth)); - MP_CHECKOK(ec_GFp_enc_mont(r, r, meth)); - if (a == NULL) { - MP_CHECKOK(ec_GFp_enc_mont(r, r, meth)); - } - CLEANUP: - return res; -} - -/* Encode a field element in Montgomery form. See s_mp_to_mont in - * mpi/mpmontg.c */ -mp_err -ec_GFp_enc_mont(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_mont_modulus *mmm; - mp_err res = MP_OKAY; - - mmm = (mp_mont_modulus *) meth->extra1; - MP_CHECKOK(mpl_lsh(a, r, mmm->b)); - MP_CHECKOK(mp_mod(r, &mmm->N, r)); - CLEANUP: - return res; -} - -/* Decode a field element from Montgomery form. */ -mp_err -ec_GFp_dec_mont(const mp_int *a, mp_int *r, const GFMethod *meth) -{ - mp_err res = MP_OKAY; - - if (a != r) { - MP_CHECKOK(mp_copy(a, r)); - } - MP_CHECKOK(s_mp_redc(r, (mp_mont_modulus *) meth->extra1)); - CLEANUP: - return res; -} - -/* Free the memory allocated to the extra fields of Montgomery GFMethod - * object. */ -void -ec_GFp_extra_free_mont(GFMethod *meth) -{ - if (meth->extra1 != NULL) { -#ifdef _KERNEL - kmem_free(meth->extra1, sizeof(mp_mont_modulus)); -#else - free(meth->extra1); -#endif - meth->extra1 = NULL; - } -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/logtab.h b/src/jdk.crypto.ec/share/native/libsunec/impl/logtab.h deleted file mode 100644 index 9f709ccb7e2..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/logtab.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1994-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories - * - *********************************************************************** */ - -#ifndef _LOGTAB_H -#define _LOGTAB_H - -const float s_logv_2[] = { - 0.000000000f, 0.000000000f, 1.000000000f, 0.630929754f, /* 0 1 2 3 */ - 0.500000000f, 0.430676558f, 0.386852807f, 0.356207187f, /* 4 5 6 7 */ - 0.333333333f, 0.315464877f, 0.301029996f, 0.289064826f, /* 8 9 10 11 */ - 0.278942946f, 0.270238154f, 0.262649535f, 0.255958025f, /* 12 13 14 15 */ - 0.250000000f, 0.244650542f, 0.239812467f, 0.235408913f, /* 16 17 18 19 */ - 0.231378213f, 0.227670249f, 0.224243824f, 0.221064729f, /* 20 21 22 23 */ - 0.218104292f, 0.215338279f, 0.212746054f, 0.210309918f, /* 24 25 26 27 */ - 0.208014598f, 0.205846832f, 0.203795047f, 0.201849087f, /* 28 29 30 31 */ - 0.200000000f, 0.198239863f, 0.196561632f, 0.194959022f, /* 32 33 34 35 */ - 0.193426404f, 0.191958720f, 0.190551412f, 0.189200360f, /* 36 37 38 39 */ - 0.187901825f, 0.186652411f, 0.185449023f, 0.184288833f, /* 40 41 42 43 */ - 0.183169251f, 0.182087900f, 0.181042597f, 0.180031327f, /* 44 45 46 47 */ - 0.179052232f, 0.178103594f, 0.177183820f, 0.176291434f, /* 48 49 50 51 */ - 0.175425064f, 0.174583430f, 0.173765343f, 0.172969690f, /* 52 53 54 55 */ - 0.172195434f, 0.171441601f, 0.170707280f, 0.169991616f, /* 56 57 58 59 */ - 0.169293808f, 0.168613099f, 0.167948779f, 0.167300179f, /* 60 61 62 63 */ - 0.166666667f -}; - -#endif /* _LOGTAB_H */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/mp_gf2m-priv.h b/src/jdk.crypto.ec/share/native/libsunec/impl/mp_gf2m-priv.h deleted file mode 100644 index caa56e45f9a..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/mp_gf2m-priv.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the Multi-precision Binary Polynomial Arithmetic Library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Sheueling Chang Shantz <sheueling.chang@sun.com> and - * Douglas Stebila <douglas@stebila.ca> of Sun Laboratories. - * - *********************************************************************** */ - -#ifndef _MP_GF2M_PRIV_H_ -#define _MP_GF2M_PRIV_H_ - -#include "mpi-priv.h" - -extern const mp_digit mp_gf2m_sqr_tb[16]; - -#if defined(MP_USE_UINT_DIGIT) -#define MP_DIGIT_BITS 32 -#else -#define MP_DIGIT_BITS 64 -#endif - -/* Platform-specific macros for fast binary polynomial squaring. */ -#if MP_DIGIT_BITS == 32 -#define gf2m_SQR1(w) \ - mp_gf2m_sqr_tb[(w) >> 28 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 24 & 0xF] << 16 | \ - mp_gf2m_sqr_tb[(w) >> 20 & 0xF] << 8 | mp_gf2m_sqr_tb[(w) >> 16 & 0xF] -#define gf2m_SQR0(w) \ - mp_gf2m_sqr_tb[(w) >> 12 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 8 & 0xF] << 16 | \ - mp_gf2m_sqr_tb[(w) >> 4 & 0xF] << 8 | mp_gf2m_sqr_tb[(w) & 0xF] -#else -#define gf2m_SQR1(w) \ - mp_gf2m_sqr_tb[(w) >> 60 & 0xF] << 56 | mp_gf2m_sqr_tb[(w) >> 56 & 0xF] << 48 | \ - mp_gf2m_sqr_tb[(w) >> 52 & 0xF] << 40 | mp_gf2m_sqr_tb[(w) >> 48 & 0xF] << 32 | \ - mp_gf2m_sqr_tb[(w) >> 44 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 40 & 0xF] << 16 | \ - mp_gf2m_sqr_tb[(w) >> 36 & 0xF] << 8 | mp_gf2m_sqr_tb[(w) >> 32 & 0xF] -#define gf2m_SQR0(w) \ - mp_gf2m_sqr_tb[(w) >> 28 & 0xF] << 56 | mp_gf2m_sqr_tb[(w) >> 24 & 0xF] << 48 | \ - mp_gf2m_sqr_tb[(w) >> 20 & 0xF] << 40 | mp_gf2m_sqr_tb[(w) >> 16 & 0xF] << 32 | \ - mp_gf2m_sqr_tb[(w) >> 12 & 0xF] << 24 | mp_gf2m_sqr_tb[(w) >> 8 & 0xF] << 16 | \ - mp_gf2m_sqr_tb[(w) >> 4 & 0xF] << 8 | mp_gf2m_sqr_tb[(w) & 0xF] -#endif - -/* Multiply two binary polynomials mp_digits a, b. - * Result is a polynomial with degree < 2 * MP_DIGIT_BITS - 1. - * Output in two mp_digits rh, rl. - */ -void s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b); - -/* Compute xor-multiply of two binary polynomials (a1, a0) x (b1, b0) - * result is a binary polynomial in 4 mp_digits r[4]. - * The caller MUST ensure that r has the right amount of space allocated. - */ -void s_bmul_2x2(mp_digit *r, const mp_digit a1, const mp_digit a0, const mp_digit b1, - const mp_digit b0); - -/* Compute xor-multiply of two binary polynomials (a2, a1, a0) x (b2, b1, b0) - * result is a binary polynomial in 6 mp_digits r[6]. - * The caller MUST ensure that r has the right amount of space allocated. - */ -void s_bmul_3x3(mp_digit *r, const mp_digit a2, const mp_digit a1, const mp_digit a0, - const mp_digit b2, const mp_digit b1, const mp_digit b0); - -/* Compute xor-multiply of two binary polynomials (a3, a2, a1, a0) x (b3, b2, b1, b0) - * result is a binary polynomial in 8 mp_digits r[8]. - * The caller MUST ensure that r has the right amount of space allocated. - */ -void s_bmul_4x4(mp_digit *r, const mp_digit a3, const mp_digit a2, const mp_digit a1, - const mp_digit a0, const mp_digit b3, const mp_digit b2, const mp_digit b1, - const mp_digit b0); - -#endif /* _MP_GF2M_PRIV_H_ */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/mp_gf2m.c b/src/jdk.crypto.ec/share/native/libsunec/impl/mp_gf2m.c deleted file mode 100644 index 31911c04d9c..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/mp_gf2m.c +++ /dev/null @@ -1,603 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the Multi-precision Binary Polynomial Arithmetic Library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Sheueling Chang Shantz <sheueling.chang@sun.com> and - * Douglas Stebila <douglas@stebila.ca> of Sun Laboratories. - * - *********************************************************************** */ - -#include "mp_gf2m.h" -#include "mp_gf2m-priv.h" -#include "mplogic.h" -#include "mpi-priv.h" - -const mp_digit mp_gf2m_sqr_tb[16] = -{ - 0, 1, 4, 5, 16, 17, 20, 21, - 64, 65, 68, 69, 80, 81, 84, 85 -}; - -/* Multiply two binary polynomials mp_digits a, b. - * Result is a polynomial with degree < 2 * MP_DIGIT_BITS - 1. - * Output in two mp_digits rh, rl. - */ -#if MP_DIGIT_BITS == 32 -void -s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b) -{ - register mp_digit h, l, s; - mp_digit tab[8], top2b = a >> 30; - register mp_digit a1, a2, a4; - - a1 = a & (0x3FFFFFFF); a2 = a1 << 1; a4 = a2 << 1; - - tab[0] = 0; tab[1] = a1; tab[2] = a2; tab[3] = a1^a2; - tab[4] = a4; tab[5] = a1^a4; tab[6] = a2^a4; tab[7] = a1^a2^a4; - - s = tab[b & 0x7]; l = s; - s = tab[b >> 3 & 0x7]; l ^= s << 3; h = s >> 29; - s = tab[b >> 6 & 0x7]; l ^= s << 6; h ^= s >> 26; - s = tab[b >> 9 & 0x7]; l ^= s << 9; h ^= s >> 23; - s = tab[b >> 12 & 0x7]; l ^= s << 12; h ^= s >> 20; - s = tab[b >> 15 & 0x7]; l ^= s << 15; h ^= s >> 17; - s = tab[b >> 18 & 0x7]; l ^= s << 18; h ^= s >> 14; - s = tab[b >> 21 & 0x7]; l ^= s << 21; h ^= s >> 11; - s = tab[b >> 24 & 0x7]; l ^= s << 24; h ^= s >> 8; - s = tab[b >> 27 & 0x7]; l ^= s << 27; h ^= s >> 5; - s = tab[b >> 30 ]; l ^= s << 30; h ^= s >> 2; - - /* compensate for the top two bits of a */ - - if (top2b & 01) { l ^= b << 30; h ^= b >> 2; } - if (top2b & 02) { l ^= b << 31; h ^= b >> 1; } - - *rh = h; *rl = l; -} -#else -void -s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b) -{ - register mp_digit h, l, s; - mp_digit tab[16], top3b = a >> 61; - register mp_digit a1, a2, a4, a8; - - a1 = a & (0x1FFFFFFFFFFFFFFFULL); a2 = a1 << 1; - a4 = a2 << 1; a8 = a4 << 1; - tab[ 0] = 0; tab[ 1] = a1; tab[ 2] = a2; tab[ 3] = a1^a2; - tab[ 4] = a4; tab[ 5] = a1^a4; tab[ 6] = a2^a4; tab[ 7] = a1^a2^a4; - tab[ 8] = a8; tab[ 9] = a1^a8; tab[10] = a2^a8; tab[11] = a1^a2^a8; - tab[12] = a4^a8; tab[13] = a1^a4^a8; tab[14] = a2^a4^a8; tab[15] = a1^a2^a4^a8; - - s = tab[b & 0xF]; l = s; - s = tab[b >> 4 & 0xF]; l ^= s << 4; h = s >> 60; - s = tab[b >> 8 & 0xF]; l ^= s << 8; h ^= s >> 56; - s = tab[b >> 12 & 0xF]; l ^= s << 12; h ^= s >> 52; - s = tab[b >> 16 & 0xF]; l ^= s << 16; h ^= s >> 48; - s = tab[b >> 20 & 0xF]; l ^= s << 20; h ^= s >> 44; - s = tab[b >> 24 & 0xF]; l ^= s << 24; h ^= s >> 40; - s = tab[b >> 28 & 0xF]; l ^= s << 28; h ^= s >> 36; - s = tab[b >> 32 & 0xF]; l ^= s << 32; h ^= s >> 32; - s = tab[b >> 36 & 0xF]; l ^= s << 36; h ^= s >> 28; - s = tab[b >> 40 & 0xF]; l ^= s << 40; h ^= s >> 24; - s = tab[b >> 44 & 0xF]; l ^= s << 44; h ^= s >> 20; - s = tab[b >> 48 & 0xF]; l ^= s << 48; h ^= s >> 16; - s = tab[b >> 52 & 0xF]; l ^= s << 52; h ^= s >> 12; - s = tab[b >> 56 & 0xF]; l ^= s << 56; h ^= s >> 8; - s = tab[b >> 60 ]; l ^= s << 60; h ^= s >> 4; - - /* compensate for the top three bits of a */ - - if (top3b & 01) { l ^= b << 61; h ^= b >> 3; } - if (top3b & 02) { l ^= b << 62; h ^= b >> 2; } - if (top3b & 04) { l ^= b << 63; h ^= b >> 1; } - - *rh = h; *rl = l; -} -#endif - -/* Compute xor-multiply of two binary polynomials (a1, a0) x (b1, b0) - * result is a binary polynomial in 4 mp_digits r[4]. - * The caller MUST ensure that r has the right amount of space allocated. - */ -void -s_bmul_2x2(mp_digit *r, const mp_digit a1, const mp_digit a0, const mp_digit b1, - const mp_digit b0) -{ - mp_digit m1, m0; - /* r[3] = h1, r[2] = h0; r[1] = l1; r[0] = l0 */ - s_bmul_1x1(r+3, r+2, a1, b1); - s_bmul_1x1(r+1, r, a0, b0); - s_bmul_1x1(&m1, &m0, a0 ^ a1, b0 ^ b1); - /* Correction on m1 ^= l1 ^ h1; m0 ^= l0 ^ h0; */ - r[2] ^= m1 ^ r[1] ^ r[3]; /* h0 ^= m1 ^ l1 ^ h1; */ - r[1] = r[3] ^ r[2] ^ r[0] ^ m1 ^ m0; /* l1 ^= l0 ^ h0 ^ m0; */ -} - -/* Compute xor-multiply of two binary polynomials (a2, a1, a0) x (b2, b1, b0) - * result is a binary polynomial in 6 mp_digits r[6]. - * The caller MUST ensure that r has the right amount of space allocated. - */ -void -s_bmul_3x3(mp_digit *r, const mp_digit a2, const mp_digit a1, const mp_digit a0, - const mp_digit b2, const mp_digit b1, const mp_digit b0) -{ - mp_digit zm[4]; - - s_bmul_1x1(r+5, r+4, a2, b2); /* fill top 2 words */ - s_bmul_2x2(zm, a1, a2^a0, b1, b2^b0); /* fill middle 4 words */ - s_bmul_2x2(r, a1, a0, b1, b0); /* fill bottom 4 words */ - - zm[3] ^= r[3]; - zm[2] ^= r[2]; - zm[1] ^= r[1] ^ r[5]; - zm[0] ^= r[0] ^ r[4]; - - r[5] ^= zm[3]; - r[4] ^= zm[2]; - r[3] ^= zm[1]; - r[2] ^= zm[0]; -} - -/* Compute xor-multiply of two binary polynomials (a3, a2, a1, a0) x (b3, b2, b1, b0) - * result is a binary polynomial in 8 mp_digits r[8]. - * The caller MUST ensure that r has the right amount of space allocated. - */ -void s_bmul_4x4(mp_digit *r, const mp_digit a3, const mp_digit a2, const mp_digit a1, - const mp_digit a0, const mp_digit b3, const mp_digit b2, const mp_digit b1, - const mp_digit b0) -{ - mp_digit zm[4]; - - s_bmul_2x2(r+4, a3, a2, b3, b2); /* fill top 4 words */ - s_bmul_2x2(zm, a3^a1, a2^a0, b3^b1, b2^b0); /* fill middle 4 words */ - s_bmul_2x2(r, a1, a0, b1, b0); /* fill bottom 4 words */ - - zm[3] ^= r[3] ^ r[7]; - zm[2] ^= r[2] ^ r[6]; - zm[1] ^= r[1] ^ r[5]; - zm[0] ^= r[0] ^ r[4]; - - r[5] ^= zm[3]; - r[4] ^= zm[2]; - r[3] ^= zm[1]; - r[2] ^= zm[0]; -} - -/* Compute addition of two binary polynomials a and b, - * store result in c; c could be a or b, a and b could be equal; - * c is the bitwise XOR of a and b. - */ -mp_err -mp_badd(const mp_int *a, const mp_int *b, mp_int *c) -{ - mp_digit *pa, *pb, *pc; - mp_size ix; - mp_size used_pa, used_pb; - mp_err res = MP_OKAY; - - /* Add all digits up to the precision of b. If b had more - * precision than a initially, swap a, b first - */ - if (MP_USED(a) >= MP_USED(b)) { - pa = MP_DIGITS(a); - pb = MP_DIGITS(b); - used_pa = MP_USED(a); - used_pb = MP_USED(b); - } else { - pa = MP_DIGITS(b); - pb = MP_DIGITS(a); - used_pa = MP_USED(b); - used_pb = MP_USED(a); - } - - /* Make sure c has enough precision for the output value */ - MP_CHECKOK( s_mp_pad(c, used_pa) ); - - /* Do word-by-word xor */ - pc = MP_DIGITS(c); - for (ix = 0; ix < used_pb; ix++) { - (*pc++) = (*pa++) ^ (*pb++); - } - - /* Finish the rest of digits until we're actually done */ - for (; ix < used_pa; ++ix) { - *pc++ = *pa++; - } - - MP_USED(c) = used_pa; - MP_SIGN(c) = ZPOS; - s_mp_clamp(c); - -CLEANUP: - return res; -} - -#define s_mp_div2(a) MP_CHECKOK( mpl_rsh((a), (a), 1) ); - -/* Compute binary polynomial multiply d = a * b */ -static void -s_bmul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *d) -{ - mp_digit a_i, a0b0, a1b1, carry = 0; - while (a_len--) { - a_i = *a++; - s_bmul_1x1(&a1b1, &a0b0, a_i, b); - *d++ = a0b0 ^ carry; - carry = a1b1; - } - *d = carry; -} - -/* Compute binary polynomial xor multiply accumulate d ^= a * b */ -static void -s_bmul_d_add(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *d) -{ - mp_digit a_i, a0b0, a1b1, carry = 0; - while (a_len--) { - a_i = *a++; - s_bmul_1x1(&a1b1, &a0b0, a_i, b); - *d++ ^= a0b0 ^ carry; - carry = a1b1; - } - *d ^= carry; -} - -/* Compute binary polynomial xor multiply c = a * b. - * All parameters may be identical. - */ -mp_err -mp_bmul(const mp_int *a, const mp_int *b, mp_int *c) -{ - mp_digit *pb, b_i; - mp_int tmp; - mp_size ib, a_used, b_used; - mp_err res = MP_OKAY; - - MP_DIGITS(&tmp) = 0; - - ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG); - - if (a == c) { - MP_CHECKOK( mp_init_copy(&tmp, a) ); - if (a == b) - b = &tmp; - a = &tmp; - } else if (b == c) { - MP_CHECKOK( mp_init_copy(&tmp, b) ); - b = &tmp; - } - - if (MP_USED(a) < MP_USED(b)) { - const mp_int *xch = b; /* switch a and b if b longer */ - b = a; - a = xch; - } - - MP_USED(c) = 1; MP_DIGIT(c, 0) = 0; - MP_CHECKOK( s_mp_pad(c, USED(a) + USED(b)) ); - - pb = MP_DIGITS(b); - s_bmul_d(MP_DIGITS(a), MP_USED(a), *pb++, MP_DIGITS(c)); - - /* Outer loop: Digits of b */ - a_used = MP_USED(a); - b_used = MP_USED(b); - MP_USED(c) = a_used + b_used; - for (ib = 1; ib < b_used; ib++) { - b_i = *pb++; - - /* Inner product: Digits of a */ - if (b_i) - s_bmul_d_add(MP_DIGITS(a), a_used, b_i, MP_DIGITS(c) + ib); - else - MP_DIGIT(c, ib + a_used) = b_i; - } - - s_mp_clamp(c); - - SIGN(c) = ZPOS; - -CLEANUP: - mp_clear(&tmp); - return res; -} - - -/* Compute modular reduction of a and store result in r. - * r could be a. - * For modular arithmetic, the irreducible polynomial f(t) is represented - * as an array of int[], where f(t) is of the form: - * f(t) = t^p[0] + t^p[1] + ... + t^p[k] - * where m = p[0] > p[1] > ... > p[k] = 0. - */ -mp_err -mp_bmod(const mp_int *a, const unsigned int p[], mp_int *r) -{ - int j, k; - int n, dN, d0, d1; - mp_digit zz, *z, tmp; - mp_size used; - mp_err res = MP_OKAY; - - /* The algorithm does the reduction in place in r, - * if a != r, copy a into r first so reduction can be done in r - */ - if (a != r) { - MP_CHECKOK( mp_copy(a, r) ); - } - z = MP_DIGITS(r); - - /* start reduction */ - dN = p[0] / MP_DIGIT_BITS; - used = MP_USED(r); - - for (j = used - 1; j > dN;) { - - zz = z[j]; - if (zz == 0) { - j--; continue; - } - z[j] = 0; - - for (k = 1; p[k] > 0; k++) { - /* reducing component t^p[k] */ - n = p[0] - p[k]; - d0 = n % MP_DIGIT_BITS; - d1 = MP_DIGIT_BITS - d0; - n /= MP_DIGIT_BITS; - z[j-n] ^= (zz>>d0); - if (d0) - z[j-n-1] ^= (zz<<d1); - } - - /* reducing component t^0 */ - n = dN; - d0 = p[0] % MP_DIGIT_BITS; - d1 = MP_DIGIT_BITS - d0; - z[j-n] ^= (zz >> d0); - if (d0) - z[j-n-1] ^= (zz << d1); - - } - - /* final round of reduction */ - while (j == dN) { - - d0 = p[0] % MP_DIGIT_BITS; - zz = z[dN] >> d0; - if (zz == 0) break; - d1 = MP_DIGIT_BITS - d0; - - /* clear up the top d1 bits */ - if (d0) z[dN] = (z[dN] << d1) >> d1; - *z ^= zz; /* reduction t^0 component */ - - for (k = 1; p[k] > 0; k++) { - /* reducing component t^p[k]*/ - n = p[k] / MP_DIGIT_BITS; - d0 = p[k] % MP_DIGIT_BITS; - d1 = MP_DIGIT_BITS - d0; - z[n] ^= (zz << d0); - tmp = zz >> d1; - if (d0 && tmp) - z[n+1] ^= tmp; - } - } - - s_mp_clamp(r); -CLEANUP: - return res; -} - -/* Compute the product of two polynomials a and b, reduce modulo p, - * Store the result in r. r could be a or b; a could be b. - */ -mp_err -mp_bmulmod(const mp_int *a, const mp_int *b, const unsigned int p[], mp_int *r) -{ - mp_err res; - - if (a == b) return mp_bsqrmod(a, p, r); - if ((res = mp_bmul(a, b, r) ) != MP_OKAY) - return res; - return mp_bmod(r, p, r); -} - -/* Compute binary polynomial squaring c = a*a mod p . - * Parameter r and a can be identical. - */ - -mp_err -mp_bsqrmod(const mp_int *a, const unsigned int p[], mp_int *r) -{ - mp_digit *pa, *pr, a_i; - mp_int tmp; - mp_size ia, a_used; - mp_err res; - - ARGCHK(a != NULL && r != NULL, MP_BADARG); - MP_DIGITS(&tmp) = 0; - - if (a == r) { - MP_CHECKOK( mp_init_copy(&tmp, a) ); - a = &tmp; - } - - MP_USED(r) = 1; MP_DIGIT(r, 0) = 0; - MP_CHECKOK( s_mp_pad(r, 2*USED(a)) ); - - pa = MP_DIGITS(a); - pr = MP_DIGITS(r); - a_used = MP_USED(a); - MP_USED(r) = 2 * a_used; - - for (ia = 0; ia < a_used; ia++) { - a_i = *pa++; - *pr++ = gf2m_SQR0(a_i); - *pr++ = gf2m_SQR1(a_i); - } - - MP_CHECKOK( mp_bmod(r, p, r) ); - s_mp_clamp(r); - SIGN(r) = ZPOS; - -CLEANUP: - mp_clear(&tmp); - return res; -} - -/* Compute binary polynomial y/x mod p, y divided by x, reduce modulo p. - * Store the result in r. r could be x or y, and x could equal y. - * Uses algorithm Modular_Division_GF(2^m) from - * Chang-Shantz, S. "From Euclid's GCD to Montgomery Multiplication to - * the Great Divide". - */ -int -mp_bdivmod(const mp_int *y, const mp_int *x, const mp_int *pp, - const unsigned int p[], mp_int *r) -{ - mp_int aa, bb, uu; - mp_int *a, *b, *u, *v; - mp_err res = MP_OKAY; - - MP_DIGITS(&aa) = 0; - MP_DIGITS(&bb) = 0; - MP_DIGITS(&uu) = 0; - - MP_CHECKOK( mp_init_copy(&aa, x) ); - MP_CHECKOK( mp_init_copy(&uu, y) ); - MP_CHECKOK( mp_init_copy(&bb, pp) ); - MP_CHECKOK( s_mp_pad(r, USED(pp)) ); - MP_USED(r) = 1; MP_DIGIT(r, 0) = 0; - - a = &aa; b= &bb; u=&uu; v=r; - /* reduce x and y mod p */ - MP_CHECKOK( mp_bmod(a, p, a) ); - MP_CHECKOK( mp_bmod(u, p, u) ); - - while (!mp_isodd(a)) { - s_mp_div2(a); - if (mp_isodd(u)) { - MP_CHECKOK( mp_badd(u, pp, u) ); - } - s_mp_div2(u); - } - - do { - if (mp_cmp_mag(b, a) > 0) { - MP_CHECKOK( mp_badd(b, a, b) ); - MP_CHECKOK( mp_badd(v, u, v) ); - do { - s_mp_div2(b); - if (mp_isodd(v)) { - MP_CHECKOK( mp_badd(v, pp, v) ); - } - s_mp_div2(v); - } while (!mp_isodd(b)); - } - else if ((MP_DIGIT(a,0) == 1) && (MP_USED(a) == 1)) - break; - else { - MP_CHECKOK( mp_badd(a, b, a) ); - MP_CHECKOK( mp_badd(u, v, u) ); - do { - s_mp_div2(a); - if (mp_isodd(u)) { - MP_CHECKOK( mp_badd(u, pp, u) ); - } - s_mp_div2(u); - } while (!mp_isodd(a)); - } - } while (1); - - MP_CHECKOK( mp_copy(u, r) ); - -CLEANUP: - /* XXX this appears to be a memory leak in the NSS code */ - mp_clear(&aa); - mp_clear(&bb); - mp_clear(&uu); - return res; - -} - -/* Convert the bit-string representation of a polynomial a into an array - * of integers corresponding to the bits with non-zero coefficient. - * Up to max elements of the array will be filled. Return value is total - * number of coefficients that would be extracted if array was large enough. - */ -int -mp_bpoly2arr(const mp_int *a, unsigned int p[], int max) -{ - int i, j, k; - mp_digit top_bit, mask; - - top_bit = 1; - top_bit <<= MP_DIGIT_BIT - 1; - - for (k = 0; k < max; k++) p[k] = 0; - k = 0; - - for (i = MP_USED(a) - 1; i >= 0; i--) { - mask = top_bit; - for (j = MP_DIGIT_BIT - 1; j >= 0; j--) { - if (MP_DIGITS(a)[i] & mask) { - if (k < max) p[k] = MP_DIGIT_BIT * i + j; - k++; - } - mask >>= 1; - } - } - - return k; -} - -/* Convert the coefficient array representation of a polynomial to a - * bit-string. The array must be terminated by 0. - */ -mp_err -mp_barr2poly(const unsigned int p[], mp_int *a) -{ - - mp_err res = MP_OKAY; - int i; - - mp_zero(a); - for (i = 0; p[i] > 0; i++) { - MP_CHECKOK( mpl_set_bit(a, p[i], 1) ); - } - MP_CHECKOK( mpl_set_bit(a, 0, 1) ); - -CLEANUP: - return res; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/mp_gf2m.h b/src/jdk.crypto.ec/share/native/libsunec/impl/mp_gf2m.h deleted file mode 100644 index c95d30ffc74..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/mp_gf2m.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the Multi-precision Binary Polynomial Arithmetic Library. - * - * The Initial Developer of the Original Code is - * Sun Microsystems, Inc. - * Portions created by the Initial Developer are Copyright (C) 2003 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Sheueling Chang Shantz <sheueling.chang@sun.com> and - * Douglas Stebila <douglas@stebila.ca> of Sun Laboratories. - * - *********************************************************************** */ - -#ifndef _MP_GF2M_H_ -#define _MP_GF2M_H_ - -#include "mpi.h" - -mp_err mp_badd(const mp_int *a, const mp_int *b, mp_int *c); -mp_err mp_bmul(const mp_int *a, const mp_int *b, mp_int *c); - -/* For modular arithmetic, the irreducible polynomial f(t) is represented - * as an array of int[], where f(t) is of the form: - * f(t) = t^p[0] + t^p[1] + ... + t^p[k] - * where m = p[0] > p[1] > ... > p[k] = 0. - */ -mp_err mp_bmod(const mp_int *a, const unsigned int p[], mp_int *r); -mp_err mp_bmulmod(const mp_int *a, const mp_int *b, const unsigned int p[], - mp_int *r); -mp_err mp_bsqrmod(const mp_int *a, const unsigned int p[], mp_int *r); -mp_err mp_bdivmod(const mp_int *y, const mp_int *x, const mp_int *pp, - const unsigned int p[], mp_int *r); - -int mp_bpoly2arr(const mp_int *a, unsigned int p[], int max); -mp_err mp_barr2poly(const unsigned int p[], mp_int *a); - -#endif /* _MP_GF2M_H_ */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/mpi-config.h b/src/jdk.crypto.ec/share/native/libsunec/impl/mpi-config.h deleted file mode 100644 index a349f96ad88..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/mpi-config.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library. - * - * The Initial Developer of the Original Code is - * Michael J. Fromberger. - * Portions created by the Initial Developer are Copyright (C) 1997 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Netscape Communications Corporation - * - *********************************************************************** */ - -#ifndef _MPI_CONFIG_H -#define _MPI_CONFIG_H - -/* $Id: mpi-config.h,v 1.5 2004/04/25 15:03:10 gerv%gerv.net Exp $ */ - -/* - For boolean options, - 0 = no - 1 = yes - - Other options are documented individually. - - */ - -#ifndef MP_IOFUNC -#define MP_IOFUNC 0 /* include mp_print() ? */ -#endif - -#ifndef MP_MODARITH -#define MP_MODARITH 1 /* include modular arithmetic ? */ -#endif - -#ifndef MP_NUMTH -#define MP_NUMTH 1 /* include number theoretic functions? */ -#endif - -#ifndef MP_LOGTAB -#define MP_LOGTAB 1 /* use table of logs instead of log()? */ -#endif - -#ifndef MP_MEMSET -#define MP_MEMSET 1 /* use memset() to zero buffers? */ -#endif - -#ifndef MP_MEMCPY -#define MP_MEMCPY 1 /* use memcpy() to copy buffers? */ -#endif - -#ifndef MP_CRYPTO -#define MP_CRYPTO 1 /* erase memory on free? */ -#endif - -#ifndef MP_ARGCHK -/* - 0 = no parameter checks - 1 = runtime checks, continue execution and return an error to caller - 2 = assertions; dump core on parameter errors - */ -#ifdef DEBUG -#define MP_ARGCHK 2 /* how to check input arguments */ -#else -#define MP_ARGCHK 1 /* how to check input arguments */ -#endif -#endif - -#ifndef MP_DEBUG -#define MP_DEBUG 0 /* print diagnostic output? */ -#endif - -#ifndef MP_DEFPREC -#define MP_DEFPREC 64 /* default precision, in digits */ -#endif - -#ifndef MP_MACRO -#define MP_MACRO 0 /* use macros for frequent calls? */ -#endif - -#ifndef MP_SQUARE -#define MP_SQUARE 1 /* use separate squaring code? */ -#endif - -#endif /* _MPI_CONFIG_H */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/mpi-priv.h b/src/jdk.crypto.ec/share/native/libsunec/impl/mpi-priv.h deleted file mode 100644 index 76bac90693d..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/mpi-priv.h +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library. - * - * The Initial Developer of the Original Code is - * Michael J. Fromberger. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Netscape Communications Corporation - * - *********************************************************************** */ - -/* Arbitrary precision integer arithmetic library - * - * NOTE WELL: the content of this header file is NOT part of the "public" - * API for the MPI library, and may change at any time. - * Application programs that use libmpi should NOT include this header file. - */ - -#ifndef _MPI_PRIV_H -#define _MPI_PRIV_H - -/* $Id: mpi-priv.h,v 1.20 2005/11/22 07:16:43 relyea%netscape.com Exp $ */ - -#include "mpi.h" -#ifndef _KERNEL -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#endif /* _KERNEL */ - -#if MP_DEBUG -#include <stdio.h> - -#define DIAG(T,V) {fprintf(stderr,T);mp_print(V,stderr);fputc('\n',stderr);} -#else -#define DIAG(T,V) -#endif - -/* If we aren't using a wired-in logarithm table, we need to include - the math library to get the log() function - */ - -/* {{{ s_logv_2[] - log table for 2 in various bases */ - -#if MP_LOGTAB -/* - A table of the logs of 2 for various bases (the 0 and 1 entries of - this table are meaningless and should not be referenced). - - This table is used to compute output lengths for the mp_toradix() - function. Since a number n in radix r takes up about log_r(n) - digits, we estimate the output size by taking the least integer - greater than log_r(n), where: - - log_r(n) = log_2(n) * log_r(2) - - This table, therefore, is a table of log_r(2) for 2 <= r <= 36, - which are the output bases supported. - */ - -extern const float s_logv_2[]; -#define LOG_V_2(R) s_logv_2[(R)] - -#else - -/* - If MP_LOGTAB is not defined, use the math library to compute the - logarithms on the fly. Otherwise, use the table. - Pick which works best for your system. - */ - -#include <math.h> -#define LOG_V_2(R) (log(2.0)/log(R)) - -#endif /* if MP_LOGTAB */ - -/* }}} */ - -/* {{{ Digit arithmetic macros */ - -/* - When adding and multiplying digits, the results can be larger than - can be contained in an mp_digit. Thus, an mp_word is used. These - macros mask off the upper and lower digits of the mp_word (the - mp_word may be more than 2 mp_digits wide, but we only concern - ourselves with the low-order 2 mp_digits) - */ - -#define CARRYOUT(W) (mp_digit)((W)>>DIGIT_BIT) -#define ACCUM(W) (mp_digit)(W) - -#define MP_MIN(a,b) (((a) < (b)) ? (a) : (b)) -#define MP_MAX(a,b) (((a) > (b)) ? (a) : (b)) -#define MP_HOWMANY(a,b) (((a) + (b) - 1)/(b)) -#define MP_ROUNDUP(a,b) (MP_HOWMANY(a,b) * (b)) - -/* }}} */ - -/* {{{ Comparison constants */ - -#define MP_LT -1 -#define MP_EQ 0 -#define MP_GT 1 - -/* }}} */ - -/* {{{ private function declarations */ - -/* - If MP_MACRO is false, these will be defined as actual functions; - otherwise, suitable macro definitions will be used. This works - around the fact that ANSI C89 doesn't support an 'inline' keyword - (although I hear C9x will ... about bloody time). At present, the - macro definitions are identical to the function bodies, but they'll - expand in place, instead of generating a function call. - - I chose these particular functions to be made into macros because - some profiling showed they are called a lot on a typical workload, - and yet they are primarily housekeeping. - */ -#if MP_MACRO == 0 - void s_mp_setz(mp_digit *dp, mp_size count); /* zero digits */ - void s_mp_copy(const mp_digit *sp, mp_digit *dp, mp_size count); /* copy */ - void *s_mp_alloc(size_t nb, size_t ni, int flag); /* general allocator */ - void s_mp_free(void *ptr, mp_size); /* general free function */ -extern unsigned long mp_allocs; -extern unsigned long mp_frees; -extern unsigned long mp_copies; -#else - - /* Even if these are defined as macros, we need to respect the settings - of the MP_MEMSET and MP_MEMCPY configuration options... - */ - #if MP_MEMSET == 0 - #define s_mp_setz(dp, count) \ - {int ix;for(ix=0;ix<(count);ix++)(dp)[ix]=0;} - #else - #define s_mp_setz(dp, count) memset(dp, 0, (count) * sizeof(mp_digit)) - #endif /* MP_MEMSET */ - - #if MP_MEMCPY == 0 - #define s_mp_copy(sp, dp, count) \ - {int ix;for(ix=0;ix<(count);ix++)(dp)[ix]=(sp)[ix];} - #else - #define s_mp_copy(sp, dp, count) memcpy(dp, sp, (count) * sizeof(mp_digit)) - #endif /* MP_MEMCPY */ - - #define s_mp_alloc(nb, ni) calloc(nb, ni) - #define s_mp_free(ptr) {if(ptr) free(ptr);} -#endif /* MP_MACRO */ - -mp_err s_mp_grow(mp_int *mp, mp_size min); /* increase allocated size */ -mp_err s_mp_pad(mp_int *mp, mp_size min); /* left pad with zeroes */ - -#if MP_MACRO == 0 - void s_mp_clamp(mp_int *mp); /* clip leading zeroes */ -#else - #define s_mp_clamp(mp)\ - { mp_size used = MP_USED(mp); \ - while (used > 1 && DIGIT(mp, used - 1) == 0) --used; \ - MP_USED(mp) = used; \ - } -#endif /* MP_MACRO */ - -void s_mp_exch(mp_int *a, mp_int *b); /* swap a and b in place */ - -mp_err s_mp_lshd(mp_int *mp, mp_size p); /* left-shift by p digits */ -void s_mp_rshd(mp_int *mp, mp_size p); /* right-shift by p digits */ -mp_err s_mp_mul_2d(mp_int *mp, mp_digit d); /* multiply by 2^d in place */ -void s_mp_div_2d(mp_int *mp, mp_digit d); /* divide by 2^d in place */ -void s_mp_mod_2d(mp_int *mp, mp_digit d); /* modulo 2^d in place */ -void s_mp_div_2(mp_int *mp); /* divide by 2 in place */ -mp_err s_mp_mul_2(mp_int *mp); /* multiply by 2 in place */ -mp_err s_mp_norm(mp_int *a, mp_int *b, mp_digit *pd); - /* normalize for division */ -mp_err s_mp_add_d(mp_int *mp, mp_digit d); /* unsigned digit addition */ -mp_err s_mp_sub_d(mp_int *mp, mp_digit d); /* unsigned digit subtract */ -mp_err s_mp_mul_d(mp_int *mp, mp_digit d); /* unsigned digit multiply */ -mp_err s_mp_div_d(mp_int *mp, mp_digit d, mp_digit *r); - /* unsigned digit divide */ -mp_err s_mp_reduce(mp_int *x, const mp_int *m, const mp_int *mu); - /* Barrett reduction */ -mp_err s_mp_add(mp_int *a, const mp_int *b); /* magnitude addition */ -mp_err s_mp_add_3arg(const mp_int *a, const mp_int *b, mp_int *c); -mp_err s_mp_sub(mp_int *a, const mp_int *b); /* magnitude subtract */ -mp_err s_mp_sub_3arg(const mp_int *a, const mp_int *b, mp_int *c); -mp_err s_mp_add_offset(mp_int *a, mp_int *b, mp_size offset); - /* a += b * RADIX^offset */ -mp_err s_mp_mul(mp_int *a, const mp_int *b); /* magnitude multiply */ -#if MP_SQUARE -mp_err s_mp_sqr(mp_int *a); /* magnitude square */ -#else -#define s_mp_sqr(a) s_mp_mul(a, a) -#endif -mp_err s_mp_div(mp_int *rem, mp_int *div, mp_int *quot); /* magnitude div */ -mp_err s_mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c); -mp_err s_mp_2expt(mp_int *a, mp_digit k); /* a = 2^k */ -int s_mp_cmp(const mp_int *a, const mp_int *b); /* magnitude comparison */ -int s_mp_cmp_d(const mp_int *a, mp_digit d); /* magnitude digit compare */ -int s_mp_ispow2(const mp_int *v); /* is v a power of 2? */ -int s_mp_ispow2d(mp_digit d); /* is d a power of 2? */ - -int s_mp_tovalue(char ch, int r); /* convert ch to value */ -char s_mp_todigit(mp_digit val, int r, int low); /* convert val to digit */ -int s_mp_outlen(int bits, int r); /* output length in bytes */ -mp_digit s_mp_invmod_radix(mp_digit P); /* returns (P ** -1) mod RADIX */ -mp_err s_mp_invmod_odd_m( const mp_int *a, const mp_int *m, mp_int *c); -mp_err s_mp_invmod_2d( const mp_int *a, mp_size k, mp_int *c); -mp_err s_mp_invmod_even_m(const mp_int *a, const mp_int *m, mp_int *c); - -#ifdef NSS_USE_COMBA - -#define IS_POWER_OF_2(a) ((a) && !((a) & ((a)-1))) - -void s_mp_mul_comba_4(const mp_int *A, const mp_int *B, mp_int *C); -void s_mp_mul_comba_8(const mp_int *A, const mp_int *B, mp_int *C); -void s_mp_mul_comba_16(const mp_int *A, const mp_int *B, mp_int *C); -void s_mp_mul_comba_32(const mp_int *A, const mp_int *B, mp_int *C); - -void s_mp_sqr_comba_4(const mp_int *A, mp_int *B); -void s_mp_sqr_comba_8(const mp_int *A, mp_int *B); -void s_mp_sqr_comba_16(const mp_int *A, mp_int *B); -void s_mp_sqr_comba_32(const mp_int *A, mp_int *B); - -#endif /* end NSS_USE_COMBA */ - -/* ------ mpv functions, operate on arrays of digits, not on mp_int's ------ */ -#if defined (__OS2__) && defined (__IBMC__) -#define MPI_ASM_DECL __cdecl -#else -#define MPI_ASM_DECL -#endif - -#ifdef MPI_AMD64 - -mp_digit MPI_ASM_DECL s_mpv_mul_set_vec64(mp_digit*, mp_digit *, mp_size, mp_digit); -mp_digit MPI_ASM_DECL s_mpv_mul_add_vec64(mp_digit*, const mp_digit*, mp_size, mp_digit); - -/* c = a * b */ -#define s_mpv_mul_d(a, a_len, b, c) \ - ((unsigned long*)c)[a_len] = s_mpv_mul_set_vec64(c, a, a_len, b) - -/* c += a * b */ -#define s_mpv_mul_d_add(a, a_len, b, c) \ - ((unsigned long*)c)[a_len] = s_mpv_mul_add_vec64(c, a, a_len, b) - -#else - -void MPI_ASM_DECL s_mpv_mul_d(const mp_digit *a, mp_size a_len, - mp_digit b, mp_digit *c); -void MPI_ASM_DECL s_mpv_mul_d_add(const mp_digit *a, mp_size a_len, - mp_digit b, mp_digit *c); - -#endif - -void MPI_ASM_DECL s_mpv_mul_d_add_prop(const mp_digit *a, - mp_size a_len, mp_digit b, - mp_digit *c); -void MPI_ASM_DECL s_mpv_sqr_add_prop(const mp_digit *a, - mp_size a_len, - mp_digit *sqrs); - -mp_err MPI_ASM_DECL s_mpv_div_2dx1d(mp_digit Nhi, mp_digit Nlo, - mp_digit divisor, mp_digit *quot, mp_digit *rem); - -/* c += a * b * (MP_RADIX ** offset); */ -#define s_mp_mul_d_add_offset(a, b, c, off) \ -(s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off), MP_OKAY) - -typedef struct { - mp_int N; /* modulus N */ - mp_digit n0prime; /* n0' = - (n0 ** -1) mod MP_RADIX */ - mp_size b; /* R == 2 ** b, also b = # significant bits in N */ -} mp_mont_modulus; - -mp_err s_mp_mul_mont(const mp_int *a, const mp_int *b, mp_int *c, - mp_mont_modulus *mmm); -mp_err s_mp_redc(mp_int *T, mp_mont_modulus *mmm); - -/* - * s_mpi_getProcessorLineSize() returns the size in bytes of the cache line - * if a cache exists, or zero if there is no cache. If more than one - * cache line exists, it should return the smallest line size (which is - * usually the L1 cache). - * - * mp_modexp uses this information to make sure that private key information - * isn't being leaked through the cache. - * - * see mpcpucache.c for the implementation. - */ -unsigned long s_mpi_getProcessorLineSize(); - -/* }}} */ -#endif /* _MPI_PRIV_H */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/mpi.c b/src/jdk.crypto.ec/share/native/libsunec/impl/mpi.c deleted file mode 100644 index e085c0ce78f..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/mpi.c +++ /dev/null @@ -1,4871 +0,0 @@ -/* - * Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library. - * - * The Initial Developer of the Original Code is - * Michael J. Fromberger. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Netscape Communications Corporation - * Douglas Stebila <douglas@stebila.ca> of Sun Laboratories. - * - * Last Modified Date from the Original Code: Nov 2019 - *********************************************************************** */ - -/* Arbitrary precision integer arithmetic library */ - -#include "mpi-priv.h" -#if defined(OSF1) -#include <c_asm.h> -#endif - -#if MP_LOGTAB -/* - A table of the logs of 2 for various bases (the 0 and 1 entries of - this table are meaningless and should not be referenced). - - This table is used to compute output lengths for the mp_toradix() - function. Since a number n in radix r takes up about log_r(n) - digits, we estimate the output size by taking the least integer - greater than log_r(n), where: - - log_r(n) = log_2(n) * log_r(2) - - This table, therefore, is a table of log_r(2) for 2 <= r <= 36, - which are the output bases supported. - */ -#include "logtab.h" -#endif - -/* {{{ Constant strings */ - -/* Constant strings returned by mp_strerror() */ -static const char *mp_err_string[] = { - "unknown result code", /* say what? */ - "boolean true", /* MP_OKAY, MP_YES */ - "boolean false", /* MP_NO */ - "out of memory", /* MP_MEM */ - "argument out of range", /* MP_RANGE */ - "invalid input parameter", /* MP_BADARG */ - "result is undefined" /* MP_UNDEF */ -}; - -/* Value to digit maps for radix conversion */ - -/* s_dmap_1 - standard digits and letters */ -static const char *s_dmap_1 = - "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/"; - -/* }}} */ - -unsigned long mp_allocs; -unsigned long mp_frees; -unsigned long mp_copies; - -/* {{{ Default precision manipulation */ - -/* Default precision for newly created mp_int's */ -static mp_size s_mp_defprec = MP_DEFPREC; - -mp_size mp_get_prec(void) -{ - return s_mp_defprec; - -} /* end mp_get_prec() */ - -void mp_set_prec(mp_size prec) -{ - if(prec == 0) - s_mp_defprec = MP_DEFPREC; - else - s_mp_defprec = prec; - -} /* end mp_set_prec() */ - -/* }}} */ - -/*------------------------------------------------------------------------*/ -/* {{{ mp_init(mp, kmflag) */ - -/* - mp_init(mp, kmflag) - - Initialize a new zero-valued mp_int. Returns MP_OKAY if successful, - MP_MEM if memory could not be allocated for the structure. - */ - -mp_err mp_init(mp_int *mp, int kmflag) -{ - return mp_init_size(mp, s_mp_defprec, kmflag); - -} /* end mp_init() */ - -/* }}} */ - -/* {{{ mp_init_size(mp, prec, kmflag) */ - -/* - mp_init_size(mp, prec, kmflag) - - Initialize a new zero-valued mp_int with at least the given - precision; returns MP_OKAY if successful, or MP_MEM if memory could - not be allocated for the structure. - */ - -mp_err mp_init_size(mp_int *mp, mp_size prec, int kmflag) -{ - ARGCHK(mp != NULL && prec > 0, MP_BADARG); - - prec = MP_ROUNDUP(prec, s_mp_defprec); - if((DIGITS(mp) = s_mp_alloc(prec, sizeof(mp_digit), kmflag)) == NULL) - return MP_MEM; - - SIGN(mp) = ZPOS; - USED(mp) = 1; - ALLOC(mp) = prec; - - return MP_OKAY; - -} /* end mp_init_size() */ - -/* }}} */ - -/* {{{ mp_init_copy(mp, from) */ - -/* - mp_init_copy(mp, from) - - Initialize mp as an exact copy of from. Returns MP_OKAY if - successful, MP_MEM if memory could not be allocated for the new - structure. - */ - -mp_err mp_init_copy(mp_int *mp, const mp_int *from) -{ - ARGCHK(mp != NULL && from != NULL, MP_BADARG); - - if(mp == from) - return MP_OKAY; - - if((DIGITS(mp) = s_mp_alloc(ALLOC(from), sizeof(mp_digit), FLAG(from))) == NULL) - return MP_MEM; - - s_mp_copy(DIGITS(from), DIGITS(mp), USED(from)); - USED(mp) = USED(from); - ALLOC(mp) = ALLOC(from); - SIGN(mp) = SIGN(from); - -#ifndef _WIN32 - FLAG(mp) = FLAG(from); -#endif /* _WIN32 */ - - return MP_OKAY; - -} /* end mp_init_copy() */ - -/* }}} */ - -/* {{{ mp_copy(from, to) */ - -/* - mp_copy(from, to) - - Copies the mp_int 'from' to the mp_int 'to'. It is presumed that - 'to' has already been initialized (if not, use mp_init_copy() - instead). If 'from' and 'to' are identical, nothing happens. - */ - -mp_err mp_copy(const mp_int *from, mp_int *to) -{ - ARGCHK(from != NULL && to != NULL, MP_BADARG); - - if(from == to) - return MP_OKAY; - - ++mp_copies; - { /* copy */ - mp_digit *tmp; - - /* - If the allocated buffer in 'to' already has enough space to hold - all the used digits of 'from', we'll re-use it to avoid hitting - the memory allocater more than necessary; otherwise, we'd have - to grow anyway, so we just allocate a hunk and make the copy as - usual - */ - if(ALLOC(to) >= USED(from)) { - s_mp_setz(DIGITS(to) + USED(from), ALLOC(to) - USED(from)); - s_mp_copy(DIGITS(from), DIGITS(to), USED(from)); - - } else { - if((tmp = s_mp_alloc(ALLOC(from), sizeof(mp_digit), FLAG(from))) == NULL) - return MP_MEM; - - s_mp_copy(DIGITS(from), tmp, USED(from)); - - if(DIGITS(to) != NULL) { -#if MP_CRYPTO - s_mp_setz(DIGITS(to), ALLOC(to)); -#endif - s_mp_free(DIGITS(to), ALLOC(to)); - } - - DIGITS(to) = tmp; - ALLOC(to) = ALLOC(from); - } - - /* Copy the precision and sign from the original */ - USED(to) = USED(from); - SIGN(to) = SIGN(from); - } /* end copy */ - - return MP_OKAY; - -} /* end mp_copy() */ - -/* }}} */ - -/* {{{ mp_exch(mp1, mp2) */ - -/* - mp_exch(mp1, mp2) - - Exchange mp1 and mp2 without allocating any intermediate memory - (well, unless you count the stack space needed for this call and the - locals it creates...). This cannot fail. - */ - -void mp_exch(mp_int *mp1, mp_int *mp2) -{ -#if MP_ARGCHK == 2 - assert(mp1 != NULL && mp2 != NULL); -#else - if(mp1 == NULL || mp2 == NULL) - return; -#endif - - s_mp_exch(mp1, mp2); - -} /* end mp_exch() */ - -/* }}} */ - -/* {{{ mp_clear(mp) */ - -/* - mp_clear(mp) - - Release the storage used by an mp_int, and void its fields so that - if someone calls mp_clear() again for the same int later, we won't - get tollchocked. - */ - -void mp_clear(mp_int *mp) -{ - if(mp == NULL) - return; - - if(DIGITS(mp) != NULL) { -#if MP_CRYPTO - s_mp_setz(DIGITS(mp), ALLOC(mp)); -#endif - s_mp_free(DIGITS(mp), ALLOC(mp)); - DIGITS(mp) = NULL; - } - - USED(mp) = 0; - ALLOC(mp) = 0; - -} /* end mp_clear() */ - -/* }}} */ - -/* {{{ mp_zero(mp) */ - -/* - mp_zero(mp) - - Set mp to zero. Does not change the allocated size of the structure, - and therefore cannot fail (except on a bad argument, which we ignore) - */ -void mp_zero(mp_int *mp) -{ - if(mp == NULL) - return; - - s_mp_setz(DIGITS(mp), ALLOC(mp)); - USED(mp) = 1; - SIGN(mp) = ZPOS; - -} /* end mp_zero() */ - -/* }}} */ - -/* {{{ mp_set(mp, d) */ - -void mp_set(mp_int *mp, mp_digit d) -{ - if(mp == NULL) - return; - - mp_zero(mp); - DIGIT(mp, 0) = d; - -} /* end mp_set() */ - -/* }}} */ - -/* {{{ mp_set_int(mp, z) */ - -mp_err mp_set_int(mp_int *mp, long z) -{ - int ix; - unsigned long v = labs(z); - mp_err res; - - ARGCHK(mp != NULL, MP_BADARG); - - mp_zero(mp); - if(z == 0) - return MP_OKAY; /* shortcut for zero */ - - if (sizeof v <= sizeof(mp_digit)) { - DIGIT(mp,0) = v; - } else { - for (ix = sizeof(long) - 1; ix >= 0; ix--) { - if ((res = s_mp_mul_d(mp, (UCHAR_MAX + 1))) != MP_OKAY) - return res; - - res = s_mp_add_d(mp, (mp_digit)((v >> (ix * CHAR_BIT)) & UCHAR_MAX)); - if (res != MP_OKAY) - return res; - } - } - if(z < 0) - SIGN(mp) = NEG; - - return MP_OKAY; - -} /* end mp_set_int() */ - -/* }}} */ - -/* {{{ mp_set_ulong(mp, z) */ - -mp_err mp_set_ulong(mp_int *mp, unsigned long z) -{ - int ix; - mp_err res; - - ARGCHK(mp != NULL, MP_BADARG); - - mp_zero(mp); - if(z == 0) - return MP_OKAY; /* shortcut for zero */ - - if (sizeof z <= sizeof(mp_digit)) { - DIGIT(mp,0) = z; - } else { - for (ix = sizeof(long) - 1; ix >= 0; ix--) { - if ((res = s_mp_mul_d(mp, (UCHAR_MAX + 1))) != MP_OKAY) - return res; - - res = s_mp_add_d(mp, (mp_digit)((z >> (ix * CHAR_BIT)) & UCHAR_MAX)); - if (res != MP_OKAY) - return res; - } - } - return MP_OKAY; -} /* end mp_set_ulong() */ - -/* }}} */ - -/*------------------------------------------------------------------------*/ -/* {{{ Digit arithmetic */ - -/* {{{ mp_add_d(a, d, b) */ - -/* - mp_add_d(a, d, b) - - Compute the sum b = a + d, for a single digit d. Respects the sign of - its primary addend (single digits are unsigned anyway). - */ - -mp_err mp_add_d(const mp_int *a, mp_digit d, mp_int *b) -{ - mp_int tmp; - mp_err res; - - ARGCHK(a != NULL && b != NULL, MP_BADARG); - - if((res = mp_init_copy(&tmp, a)) != MP_OKAY) - return res; - - if(SIGN(&tmp) == ZPOS) { - if((res = s_mp_add_d(&tmp, d)) != MP_OKAY) - goto CLEANUP; - } else if(s_mp_cmp_d(&tmp, d) >= 0) { - if((res = s_mp_sub_d(&tmp, d)) != MP_OKAY) - goto CLEANUP; - } else { - mp_neg(&tmp, &tmp); - - DIGIT(&tmp, 0) = d - DIGIT(&tmp, 0); - } - - if(s_mp_cmp_d(&tmp, 0) == 0) - SIGN(&tmp) = ZPOS; - - s_mp_exch(&tmp, b); - -CLEANUP: - mp_clear(&tmp); - return res; - -} /* end mp_add_d() */ - -/* }}} */ - -/* {{{ mp_sub_d(a, d, b) */ - -/* - mp_sub_d(a, d, b) - - Compute the difference b = a - d, for a single digit d. Respects the - sign of its subtrahend (single digits are unsigned anyway). - */ - -mp_err mp_sub_d(const mp_int *a, mp_digit d, mp_int *b) -{ - mp_int tmp; - mp_err res; - - ARGCHK(a != NULL && b != NULL, MP_BADARG); - - if((res = mp_init_copy(&tmp, a)) != MP_OKAY) - return res; - - if(SIGN(&tmp) == NEG) { - if((res = s_mp_add_d(&tmp, d)) != MP_OKAY) - goto CLEANUP; - } else if(s_mp_cmp_d(&tmp, d) >= 0) { - if((res = s_mp_sub_d(&tmp, d)) != MP_OKAY) - goto CLEANUP; - } else { - mp_neg(&tmp, &tmp); - - DIGIT(&tmp, 0) = d - DIGIT(&tmp, 0); - SIGN(&tmp) = NEG; - } - - if(s_mp_cmp_d(&tmp, 0) == 0) - SIGN(&tmp) = ZPOS; - - s_mp_exch(&tmp, b); - -CLEANUP: - mp_clear(&tmp); - return res; - -} /* end mp_sub_d() */ - -/* }}} */ - -/* {{{ mp_mul_d(a, d, b) */ - -/* - mp_mul_d(a, d, b) - - Compute the product b = a * d, for a single digit d. Respects the sign - of its multiplicand (single digits are unsigned anyway) - */ - -mp_err mp_mul_d(const mp_int *a, mp_digit d, mp_int *b) -{ - mp_err res; - - ARGCHK(a != NULL && b != NULL, MP_BADARG); - - if(d == 0) { - mp_zero(b); - return MP_OKAY; - } - - if((res = mp_copy(a, b)) != MP_OKAY) - return res; - - res = s_mp_mul_d(b, d); - - return res; - -} /* end mp_mul_d() */ - -/* }}} */ - -/* {{{ mp_mul_2(a, c) */ - -mp_err mp_mul_2(const mp_int *a, mp_int *c) -{ - mp_err res; - - ARGCHK(a != NULL && c != NULL, MP_BADARG); - - if((res = mp_copy(a, c)) != MP_OKAY) - return res; - - return s_mp_mul_2(c); - -} /* end mp_mul_2() */ - -/* }}} */ - -/* {{{ mp_div_d(a, d, q, r) */ - -/* - mp_div_d(a, d, q, r) - - Compute the quotient q = a / d and remainder r = a mod d, for a - single digit d. Respects the sign of its divisor (single digits are - unsigned anyway). - */ - -mp_err mp_div_d(const mp_int *a, mp_digit d, mp_int *q, mp_digit *r) -{ - mp_err res; - mp_int qp; - mp_digit rem; - int pow; - - ARGCHK(a != NULL, MP_BADARG); - - if(d == 0) - return MP_RANGE; - - /* Shortcut for powers of two ... */ - if((pow = s_mp_ispow2d(d)) >= 0) { - mp_digit mask; - - mask = ((mp_digit)1 << pow) - 1; - rem = DIGIT(a, 0) & mask; - - if(q) { - mp_copy(a, q); - s_mp_div_2d(q, pow); - } - - if(r) - *r = rem; - - return MP_OKAY; - } - - if((res = mp_init_copy(&qp, a)) != MP_OKAY) - return res; - - res = s_mp_div_d(&qp, d, &rem); - - if(s_mp_cmp_d(&qp, 0) == 0) - SIGN(q) = ZPOS; - - if(r) - *r = rem; - - if(q) - s_mp_exch(&qp, q); - - mp_clear(&qp); - return res; - -} /* end mp_div_d() */ - -/* }}} */ - -/* {{{ mp_div_2(a, c) */ - -/* - mp_div_2(a, c) - - Compute c = a / 2, disregarding the remainder. - */ - -mp_err mp_div_2(const mp_int *a, mp_int *c) -{ - mp_err res; - - ARGCHK(a != NULL && c != NULL, MP_BADARG); - - if((res = mp_copy(a, c)) != MP_OKAY) - return res; - - s_mp_div_2(c); - - return MP_OKAY; - -} /* end mp_div_2() */ - -/* }}} */ - -/* {{{ mp_expt_d(a, d, b) */ - -mp_err mp_expt_d(const mp_int *a, mp_digit d, mp_int *c) -{ - mp_int s, x; - mp_err res; - - ARGCHK(a != NULL && c != NULL, MP_BADARG); - - if((res = mp_init(&s, FLAG(a))) != MP_OKAY) - return res; - if((res = mp_init_copy(&x, a)) != MP_OKAY) - goto X; - - DIGIT(&s, 0) = 1; - - while(d != 0) { - if(d & 1) { - if((res = s_mp_mul(&s, &x)) != MP_OKAY) - goto CLEANUP; - } - - d /= 2; - - if((res = s_mp_sqr(&x)) != MP_OKAY) - goto CLEANUP; - } - - s.flag = (mp_sign)0; - s_mp_exch(&s, c); - -CLEANUP: - mp_clear(&x); -X: - mp_clear(&s); - - return res; - -} /* end mp_expt_d() */ - -/* }}} */ - -/* }}} */ - -/*------------------------------------------------------------------------*/ -/* {{{ Full arithmetic */ - -/* {{{ mp_abs(a, b) */ - -/* - mp_abs(a, b) - - Compute b = |a|. 'a' and 'b' may be identical. - */ - -mp_err mp_abs(const mp_int *a, mp_int *b) -{ - mp_err res; - - ARGCHK(a != NULL && b != NULL, MP_BADARG); - - if((res = mp_copy(a, b)) != MP_OKAY) - return res; - - SIGN(b) = ZPOS; - - return MP_OKAY; - -} /* end mp_abs() */ - -/* }}} */ - -/* {{{ mp_neg(a, b) */ - -/* - mp_neg(a, b) - - Compute b = -a. 'a' and 'b' may be identical. - */ - -mp_err mp_neg(const mp_int *a, mp_int *b) -{ - mp_err res; - - ARGCHK(a != NULL && b != NULL, MP_BADARG); - - if((res = mp_copy(a, b)) != MP_OKAY) - return res; - - if(s_mp_cmp_d(b, 0) == MP_EQ) - SIGN(b) = ZPOS; - else - SIGN(b) = (SIGN(b) == NEG) ? ZPOS : NEG; - - return MP_OKAY; - -} /* end mp_neg() */ - -/* }}} */ - -/* {{{ mp_add(a, b, c) */ - -/* - mp_add(a, b, c) - - Compute c = a + b. All parameters may be identical. - */ - -mp_err mp_add(const mp_int *a, const mp_int *b, mp_int *c) -{ - mp_err res; - - ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG); - - if(SIGN(a) == SIGN(b)) { /* same sign: add values, keep sign */ - MP_CHECKOK( s_mp_add_3arg(a, b, c) ); - } else if(s_mp_cmp(a, b) >= 0) { /* different sign: |a| >= |b| */ - MP_CHECKOK( s_mp_sub_3arg(a, b, c) ); - } else { /* different sign: |a| < |b| */ - MP_CHECKOK( s_mp_sub_3arg(b, a, c) ); - } - - if (s_mp_cmp_d(c, 0) == MP_EQ) - SIGN(c) = ZPOS; - -CLEANUP: - return res; - -} /* end mp_add() */ - -/* }}} */ - -/* {{{ mp_sub(a, b, c) */ - -/* - mp_sub(a, b, c) - - Compute c = a - b. All parameters may be identical. - */ - -mp_err mp_sub(const mp_int *a, const mp_int *b, mp_int *c) -{ - mp_err res; - int magDiff; - - ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG); - - if (a == b) { - mp_zero(c); - return MP_OKAY; - } - - if (MP_SIGN(a) != MP_SIGN(b)) { - MP_CHECKOK( s_mp_add_3arg(a, b, c) ); - } else if (!(magDiff = s_mp_cmp(a, b))) { - mp_zero(c); - res = MP_OKAY; - } else if (magDiff > 0) { - MP_CHECKOK( s_mp_sub_3arg(a, b, c) ); - } else { - MP_CHECKOK( s_mp_sub_3arg(b, a, c) ); - MP_SIGN(c) = !MP_SIGN(a); - } - - if (s_mp_cmp_d(c, 0) == MP_EQ) - MP_SIGN(c) = MP_ZPOS; - -CLEANUP: - return res; - -} /* end mp_sub() */ - -/* }}} */ - -/* {{{ mp_mul(a, b, c) */ - -/* - mp_mul(a, b, c) - - Compute c = a * b. All parameters may be identical. - */ -mp_err mp_mul(const mp_int *a, const mp_int *b, mp_int * c) -{ - mp_digit *pb; - mp_int tmp; - mp_err res; - mp_size ib; - mp_size useda, usedb; - - ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG); - - if (a == c) { - if ((res = mp_init_copy(&tmp, a)) != MP_OKAY) - return res; - if (a == b) - b = &tmp; - a = &tmp; - } else if (b == c) { - if ((res = mp_init_copy(&tmp, b)) != MP_OKAY) - return res; - b = &tmp; - } else { - MP_DIGITS(&tmp) = 0; - } - - if (MP_USED(a) < MP_USED(b)) { - const mp_int *xch = b; /* switch a and b, to do fewer outer loops */ - b = a; - a = xch; - } - - MP_USED(c) = 1; MP_DIGIT(c, 0) = 0; - if((res = s_mp_pad(c, USED(a) + USED(b))) != MP_OKAY) - goto CLEANUP; - -#ifdef NSS_USE_COMBA - if ((MP_USED(a) == MP_USED(b)) && IS_POWER_OF_2(MP_USED(b))) { - if (MP_USED(a) == 4) { - s_mp_mul_comba_4(a, b, c); - goto CLEANUP; - } - if (MP_USED(a) == 8) { - s_mp_mul_comba_8(a, b, c); - goto CLEANUP; - } - if (MP_USED(a) == 16) { - s_mp_mul_comba_16(a, b, c); - goto CLEANUP; - } - if (MP_USED(a) == 32) { - s_mp_mul_comba_32(a, b, c); - goto CLEANUP; - } - } -#endif - - pb = MP_DIGITS(b); - s_mpv_mul_d(MP_DIGITS(a), MP_USED(a), *pb++, MP_DIGITS(c)); - - /* Outer loop: Digits of b */ - useda = MP_USED(a); - usedb = MP_USED(b); - for (ib = 1; ib < usedb; ib++) { - mp_digit b_i = *pb++; - - /* Inner product: Digits of a */ - if (b_i) - s_mpv_mul_d_add(MP_DIGITS(a), useda, b_i, MP_DIGITS(c) + ib); - else - MP_DIGIT(c, ib + useda) = b_i; - } - - s_mp_clamp(c); - - if(SIGN(a) == SIGN(b) || s_mp_cmp_d(c, 0) == MP_EQ) - SIGN(c) = ZPOS; - else - SIGN(c) = NEG; - -CLEANUP: - mp_clear(&tmp); - return res; -} /* end mp_mul() */ - -/* }}} */ - -/* {{{ mp_sqr(a, sqr) */ - -#if MP_SQUARE -/* - Computes the square of a. This can be done more - efficiently than a general multiplication, because many of the - computation steps are redundant when squaring. The inner product - step is a bit more complicated, but we save a fair number of - iterations of the multiplication loop. - */ - -/* sqr = a^2; Caller provides both a and tmp; */ -mp_err mp_sqr(const mp_int *a, mp_int *sqr) -{ - mp_digit *pa; - mp_digit d; - mp_err res; - mp_size ix; - mp_int tmp; - int count; - - ARGCHK(a != NULL && sqr != NULL, MP_BADARG); - - if (a == sqr) { - if((res = mp_init_copy(&tmp, a)) != MP_OKAY) - return res; - a = &tmp; - } else { - DIGITS(&tmp) = 0; - res = MP_OKAY; - } - - ix = 2 * MP_USED(a); - if (ix > MP_ALLOC(sqr)) { - MP_USED(sqr) = 1; - MP_CHECKOK( s_mp_grow(sqr, ix) ); - } - MP_USED(sqr) = ix; - MP_DIGIT(sqr, 0) = 0; - -#ifdef NSS_USE_COMBA - if (IS_POWER_OF_2(MP_USED(a))) { - if (MP_USED(a) == 4) { - s_mp_sqr_comba_4(a, sqr); - goto CLEANUP; - } - if (MP_USED(a) == 8) { - s_mp_sqr_comba_8(a, sqr); - goto CLEANUP; - } - if (MP_USED(a) == 16) { - s_mp_sqr_comba_16(a, sqr); - goto CLEANUP; - } - if (MP_USED(a) == 32) { - s_mp_sqr_comba_32(a, sqr); - goto CLEANUP; - } - } -#endif - - pa = MP_DIGITS(a); - count = MP_USED(a) - 1; - if (count > 0) { - d = *pa++; - s_mpv_mul_d(pa, count, d, MP_DIGITS(sqr) + 1); - for (ix = 3; --count > 0; ix += 2) { - d = *pa++; - s_mpv_mul_d_add(pa, count, d, MP_DIGITS(sqr) + ix); - } /* for(ix ...) */ - MP_DIGIT(sqr, MP_USED(sqr)-1) = 0; /* above loop stopped short of this. */ - - /* now sqr *= 2 */ - s_mp_mul_2(sqr); - } else { - MP_DIGIT(sqr, 1) = 0; - } - - /* now add the squares of the digits of a to sqr. */ - s_mpv_sqr_add_prop(MP_DIGITS(a), MP_USED(a), MP_DIGITS(sqr)); - - SIGN(sqr) = ZPOS; - s_mp_clamp(sqr); - -CLEANUP: - mp_clear(&tmp); - return res; - -} /* end mp_sqr() */ -#endif - -/* }}} */ - -/* {{{ mp_div(a, b, q, r) */ - -/* - mp_div(a, b, q, r) - - Compute q = a / b and r = a mod b. Input parameters may be re-used - as output parameters. If q or r is NULL, that portion of the - computation will be discarded (although it will still be computed) - */ -mp_err mp_div(const mp_int *a, const mp_int *b, mp_int *q, mp_int *r) -{ - mp_err res; - mp_int *pQ, *pR; - mp_int qtmp, rtmp, btmp; - int cmp; - mp_sign signA; - mp_sign signB; - - ARGCHK(a != NULL && b != NULL, MP_BADARG); - - signA = MP_SIGN(a); - signB = MP_SIGN(b); - - if(mp_cmp_z(b) == MP_EQ) - return MP_RANGE; - - DIGITS(&qtmp) = 0; - DIGITS(&rtmp) = 0; - DIGITS(&btmp) = 0; - - /* Set up some temporaries... */ - if (!r || r == a || r == b) { - MP_CHECKOK( mp_init_copy(&rtmp, a) ); - pR = &rtmp; - } else { - MP_CHECKOK( mp_copy(a, r) ); - pR = r; - } - - if (!q || q == a || q == b) { - MP_CHECKOK( mp_init_size(&qtmp, MP_USED(a), FLAG(a)) ); - pQ = &qtmp; - } else { - MP_CHECKOK( s_mp_pad(q, MP_USED(a)) ); - pQ = q; - mp_zero(pQ); - } - - /* - If |a| <= |b|, we can compute the solution without division; - otherwise, we actually do the work required. - */ - if ((cmp = s_mp_cmp(a, b)) <= 0) { - if (cmp) { - /* r was set to a above. */ - mp_zero(pQ); - } else { - mp_set(pQ, 1); - mp_zero(pR); - } - } else { - MP_CHECKOK( mp_init_copy(&btmp, b) ); - MP_CHECKOK( s_mp_div(pR, &btmp, pQ) ); - } - - /* Compute the signs for the output */ - MP_SIGN(pR) = signA; /* Sr = Sa */ - /* Sq = ZPOS if Sa == Sb */ /* Sq = NEG if Sa != Sb */ - MP_SIGN(pQ) = (signA == signB) ? ZPOS : NEG; - - if(s_mp_cmp_d(pQ, 0) == MP_EQ) - SIGN(pQ) = ZPOS; - if(s_mp_cmp_d(pR, 0) == MP_EQ) - SIGN(pR) = ZPOS; - - /* Copy output, if it is needed */ - if(q && q != pQ) - s_mp_exch(pQ, q); - - if(r && r != pR) - s_mp_exch(pR, r); - -CLEANUP: - mp_clear(&btmp); - mp_clear(&rtmp); - mp_clear(&qtmp); - - return res; - -} /* end mp_div() */ - -/* }}} */ - -/* {{{ mp_div_2d(a, d, q, r) */ - -mp_err mp_div_2d(const mp_int *a, mp_digit d, mp_int *q, mp_int *r) -{ - mp_err res; - - ARGCHK(a != NULL, MP_BADARG); - - if(q) { - if((res = mp_copy(a, q)) != MP_OKAY) - return res; - } - if(r) { - if((res = mp_copy(a, r)) != MP_OKAY) - return res; - } - if(q) { - s_mp_div_2d(q, d); - } - if(r) { - s_mp_mod_2d(r, d); - } - - return MP_OKAY; - -} /* end mp_div_2d() */ - -/* }}} */ - -/* {{{ mp_expt(a, b, c) */ - -/* - mp_expt(a, b, c) - - Compute c = a ** b, that is, raise a to the b power. Uses a - standard iterative square-and-multiply technique. - */ - -mp_err mp_expt(mp_int *a, mp_int *b, mp_int *c) -{ - mp_int s, x; - mp_err res; - mp_digit d; - unsigned int dig, bit; - - ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG); - - if(mp_cmp_z(b) < 0) - return MP_RANGE; - - if((res = mp_init(&s, FLAG(a))) != MP_OKAY) - return res; - - mp_set(&s, 1); - - if((res = mp_init_copy(&x, a)) != MP_OKAY) - goto X; - - /* Loop over low-order digits in ascending order */ - for(dig = 0; dig < (USED(b) - 1); dig++) { - d = DIGIT(b, dig); - - /* Loop over bits of each non-maximal digit */ - for(bit = 0; bit < DIGIT_BIT; bit++) { - if(d & 1) { - if((res = s_mp_mul(&s, &x)) != MP_OKAY) - goto CLEANUP; - } - - d >>= 1; - - if((res = s_mp_sqr(&x)) != MP_OKAY) - goto CLEANUP; - } - } - - /* Consider now the last digit... */ - d = DIGIT(b, dig); - - while(d) { - if(d & 1) { - if((res = s_mp_mul(&s, &x)) != MP_OKAY) - goto CLEANUP; - } - - d >>= 1; - - if((res = s_mp_sqr(&x)) != MP_OKAY) - goto CLEANUP; - } - - if(mp_iseven(b)) - SIGN(&s) = SIGN(a); - - res = mp_copy(&s, c); - -CLEANUP: - mp_clear(&x); -X: - mp_clear(&s); - - return res; - -} /* end mp_expt() */ - -/* }}} */ - -/* {{{ mp_2expt(a, k) */ - -/* Compute a = 2^k */ - -mp_err mp_2expt(mp_int *a, mp_digit k) -{ - ARGCHK(a != NULL, MP_BADARG); - - return s_mp_2expt(a, k); - -} /* end mp_2expt() */ - -/* }}} */ - -/* {{{ mp_mod(a, m, c) */ - -/* - mp_mod(a, m, c) - - Compute c = a (mod m). Result will always be 0 <= c < m. - */ - -mp_err mp_mod(const mp_int *a, const mp_int *m, mp_int *c) -{ - mp_err res; - int mag; - - ARGCHK(a != NULL && m != NULL && c != NULL, MP_BADARG); - - if(SIGN(m) == NEG) - return MP_RANGE; - - /* - If |a| > m, we need to divide to get the remainder and take the - absolute value. - - If |a| < m, we don't need to do any division, just copy and adjust - the sign (if a is negative). - - If |a| == m, we can simply set the result to zero. - - This order is intended to minimize the average path length of the - comparison chain on common workloads -- the most frequent cases are - that |a| != m, so we do those first. - */ - if((mag = s_mp_cmp(a, m)) > 0) { - if((res = mp_div(a, m, NULL, c)) != MP_OKAY) - return res; - - if(SIGN(c) == NEG) { - if((res = mp_add(c, m, c)) != MP_OKAY) - return res; - } - - } else if(mag < 0) { - if((res = mp_copy(a, c)) != MP_OKAY) - return res; - - if(mp_cmp_z(a) < 0) { - if((res = mp_add(c, m, c)) != MP_OKAY) - return res; - - } - - } else { - mp_zero(c); - - } - - return MP_OKAY; - -} /* end mp_mod() */ - -/* }}} */ - -/* {{{ mp_mod_d(a, d, c) */ - -/* - mp_mod_d(a, d, c) - - Compute c = a (mod d). Result will always be 0 <= c < d - */ -mp_err mp_mod_d(const mp_int *a, mp_digit d, mp_digit *c) -{ - mp_err res; - mp_digit rem; - - ARGCHK(a != NULL && c != NULL, MP_BADARG); - - if(s_mp_cmp_d(a, d) > 0) { - if((res = mp_div_d(a, d, NULL, &rem)) != MP_OKAY) - return res; - - } else { - if(SIGN(a) == NEG) - rem = d - DIGIT(a, 0); - else - rem = DIGIT(a, 0); - } - - if(c) - *c = rem; - - return MP_OKAY; - -} /* end mp_mod_d() */ - -/* }}} */ - -/* {{{ mp_sqrt(a, b) */ - -/* - mp_sqrt(a, b) - - Compute the integer square root of a, and store the result in b. - Uses an integer-arithmetic version of Newton's iterative linear - approximation technique to determine this value; the result has the - following two properties: - - b^2 <= a - (b+1)^2 >= a - - It is a range error to pass a negative value. - */ -mp_err mp_sqrt(const mp_int *a, mp_int *b) -{ - mp_int x, t; - mp_err res; - mp_size used; - - ARGCHK(a != NULL && b != NULL, MP_BADARG); - - /* Cannot take square root of a negative value */ - if(SIGN(a) == NEG) - return MP_RANGE; - - /* Special cases for zero and one, trivial */ - if(mp_cmp_d(a, 1) <= 0) - return mp_copy(a, b); - - /* Initialize the temporaries we'll use below */ - if((res = mp_init_size(&t, USED(a), FLAG(a))) != MP_OKAY) - return res; - - /* Compute an initial guess for the iteration as a itself */ - if((res = mp_init_copy(&x, a)) != MP_OKAY) - goto X; - - used = MP_USED(&x); - if (used > 1) { - s_mp_rshd(&x, used / 2); - } - - for(;;) { - /* t = (x * x) - a */ - mp_copy(&x, &t); /* can't fail, t is big enough for original x */ - if((res = mp_sqr(&t, &t)) != MP_OKAY || - (res = mp_sub(&t, a, &t)) != MP_OKAY) - goto CLEANUP; - - /* t = t / 2x */ - s_mp_mul_2(&x); - if((res = mp_div(&t, &x, &t, NULL)) != MP_OKAY) - goto CLEANUP; - s_mp_div_2(&x); - - /* Terminate the loop, if the quotient is zero */ - if(mp_cmp_z(&t) == MP_EQ) - break; - - /* x = x - t */ - if((res = mp_sub(&x, &t, &x)) != MP_OKAY) - goto CLEANUP; - - } - - /* Copy result to output parameter */ - mp_sub_d(&x, 1, &x); - s_mp_exch(&x, b); - - CLEANUP: - mp_clear(&x); - X: - mp_clear(&t); - - return res; - -} /* end mp_sqrt() */ - -/* }}} */ - -/* }}} */ - -/*------------------------------------------------------------------------*/ -/* {{{ Modular arithmetic */ - -#if MP_MODARITH -/* {{{ mp_addmod(a, b, m, c) */ - -/* - mp_addmod(a, b, m, c) - - Compute c = (a + b) mod m - */ - -mp_err mp_addmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c) -{ - mp_err res; - - ARGCHK(a != NULL && b != NULL && m != NULL && c != NULL, MP_BADARG); - - if((res = mp_add(a, b, c)) != MP_OKAY) - return res; - if((res = mp_mod(c, m, c)) != MP_OKAY) - return res; - - return MP_OKAY; - -} - -/* }}} */ - -/* {{{ mp_submod(a, b, m, c) */ - -/* - mp_submod(a, b, m, c) - - Compute c = (a - b) mod m - */ - -mp_err mp_submod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c) -{ - mp_err res; - - ARGCHK(a != NULL && b != NULL && m != NULL && c != NULL, MP_BADARG); - - if((res = mp_sub(a, b, c)) != MP_OKAY) - return res; - if((res = mp_mod(c, m, c)) != MP_OKAY) - return res; - - return MP_OKAY; - -} - -/* }}} */ - -/* {{{ mp_mulmod(a, b, m, c) */ - -/* - mp_mulmod(a, b, m, c) - - Compute c = (a * b) mod m - */ - -mp_err mp_mulmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c) -{ - mp_err res; - - ARGCHK(a != NULL && b != NULL && m != NULL && c != NULL, MP_BADARG); - - if((res = mp_mul(a, b, c)) != MP_OKAY) - return res; - if((res = mp_mod(c, m, c)) != MP_OKAY) - return res; - - return MP_OKAY; - -} - -/* }}} */ - -/* {{{ mp_sqrmod(a, m, c) */ - -#if MP_SQUARE -mp_err mp_sqrmod(const mp_int *a, const mp_int *m, mp_int *c) -{ - mp_err res; - - ARGCHK(a != NULL && m != NULL && c != NULL, MP_BADARG); - - if((res = mp_sqr(a, c)) != MP_OKAY) - return res; - if((res = mp_mod(c, m, c)) != MP_OKAY) - return res; - - return MP_OKAY; - -} /* end mp_sqrmod() */ -#endif - -/* }}} */ - -/* {{{ s_mp_exptmod(a, b, m, c) */ - -/* - s_mp_exptmod(a, b, m, c) - - Compute c = (a ** b) mod m. Uses a standard square-and-multiply - method with modular reductions at each step. (This is basically the - same code as mp_expt(), except for the addition of the reductions) - - The modular reductions are done using Barrett's algorithm (see - s_mp_reduce() below for details) - */ - -mp_err s_mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c) -{ - mp_int s, x, mu; - mp_err res; - mp_digit d; - unsigned int dig, bit; - - ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG); - - if(mp_cmp_z(b) < 0 || mp_cmp_z(m) <= 0) - return MP_RANGE; - - if((res = mp_init(&s, FLAG(a))) != MP_OKAY) - return res; - if((res = mp_init_copy(&x, a)) != MP_OKAY || - (res = mp_mod(&x, m, &x)) != MP_OKAY) - goto X; - if((res = mp_init(&mu, FLAG(a))) != MP_OKAY) - goto MU; - - mp_set(&s, 1); - - /* mu = b^2k / m */ - s_mp_add_d(&mu, 1); - s_mp_lshd(&mu, 2 * USED(m)); - if((res = mp_div(&mu, m, &mu, NULL)) != MP_OKAY) - goto CLEANUP; - - /* Loop over digits of b in ascending order, except highest order */ - for(dig = 0; dig < (USED(b) - 1); dig++) { - d = DIGIT(b, dig); - - /* Loop over the bits of the lower-order digits */ - for(bit = 0; bit < DIGIT_BIT; bit++) { - if(d & 1) { - if((res = s_mp_mul(&s, &x)) != MP_OKAY) - goto CLEANUP; - if((res = s_mp_reduce(&s, m, &mu)) != MP_OKAY) - goto CLEANUP; - } - - d >>= 1; - - if((res = s_mp_sqr(&x)) != MP_OKAY) - goto CLEANUP; - if((res = s_mp_reduce(&x, m, &mu)) != MP_OKAY) - goto CLEANUP; - } - } - - /* Now do the last digit... */ - d = DIGIT(b, dig); - - while(d) { - if(d & 1) { - if((res = s_mp_mul(&s, &x)) != MP_OKAY) - goto CLEANUP; - if((res = s_mp_reduce(&s, m, &mu)) != MP_OKAY) - goto CLEANUP; - } - - d >>= 1; - - if((res = s_mp_sqr(&x)) != MP_OKAY) - goto CLEANUP; - if((res = s_mp_reduce(&x, m, &mu)) != MP_OKAY) - goto CLEANUP; - } - - s_mp_exch(&s, c); - - CLEANUP: - mp_clear(&mu); - MU: - mp_clear(&x); - X: - mp_clear(&s); - - return res; - -} /* end s_mp_exptmod() */ - -/* }}} */ - -/* {{{ mp_exptmod_d(a, d, m, c) */ - -mp_err mp_exptmod_d(const mp_int *a, mp_digit d, const mp_int *m, mp_int *c) -{ - mp_int s, x; - mp_err res; - - ARGCHK(a != NULL && c != NULL, MP_BADARG); - - if((res = mp_init(&s, FLAG(a))) != MP_OKAY) - return res; - if((res = mp_init_copy(&x, a)) != MP_OKAY) - goto X; - - mp_set(&s, 1); - - while(d != 0) { - if(d & 1) { - if((res = s_mp_mul(&s, &x)) != MP_OKAY || - (res = mp_mod(&s, m, &s)) != MP_OKAY) - goto CLEANUP; - } - - d /= 2; - - if((res = s_mp_sqr(&x)) != MP_OKAY || - (res = mp_mod(&x, m, &x)) != MP_OKAY) - goto CLEANUP; - } - - s.flag = (mp_sign)0; - s_mp_exch(&s, c); - -CLEANUP: - mp_clear(&x); -X: - mp_clear(&s); - - return res; - -} /* end mp_exptmod_d() */ - -/* }}} */ -#endif /* if MP_MODARITH */ - -/* }}} */ - -/*------------------------------------------------------------------------*/ -/* {{{ Comparison functions */ - -/* {{{ mp_cmp_z(a) */ - -/* - mp_cmp_z(a) - - Compare a <=> 0. Returns <0 if a<0, 0 if a=0, >0 if a>0. - */ - -int mp_cmp_z(const mp_int *a) -{ - if(SIGN(a) == NEG) - return MP_LT; - else if(USED(a) == 1 && DIGIT(a, 0) == 0) - return MP_EQ; - else - return MP_GT; - -} /* end mp_cmp_z() */ - -/* }}} */ - -/* {{{ mp_cmp_d(a, d) */ - -/* - mp_cmp_d(a, d) - - Compare a <=> d. Returns <0 if a<d, 0 if a=d, >0 if a>d - */ - -int mp_cmp_d(const mp_int *a, mp_digit d) -{ - ARGCHK(a != NULL, MP_EQ); - - if(SIGN(a) == NEG) - return MP_LT; - - return s_mp_cmp_d(a, d); - -} /* end mp_cmp_d() */ - -/* }}} */ - -/* {{{ mp_cmp(a, b) */ - -int mp_cmp(const mp_int *a, const mp_int *b) -{ - ARGCHK(a != NULL && b != NULL, MP_EQ); - - if(SIGN(a) == SIGN(b)) { - int mag; - - if((mag = s_mp_cmp(a, b)) == MP_EQ) - return MP_EQ; - - if(SIGN(a) == ZPOS) - return mag; - else - return -mag; - - } else if(SIGN(a) == ZPOS) { - return MP_GT; - } else { - return MP_LT; - } - -} /* end mp_cmp() */ - -/* }}} */ - -/* {{{ mp_cmp_mag(a, b) */ - -/* - mp_cmp_mag(a, b) - - Compares |a| <=> |b|, and returns an appropriate comparison result - */ - -int mp_cmp_mag(mp_int *a, mp_int *b) -{ - ARGCHK(a != NULL && b != NULL, MP_EQ); - - return s_mp_cmp(a, b); - -} /* end mp_cmp_mag() */ - -/* }}} */ - -/* {{{ mp_cmp_int(a, z, kmflag) */ - -/* - This just converts z to an mp_int, and uses the existing comparison - routines. This is sort of inefficient, but it's not clear to me how - frequently this wil get used anyway. For small positive constants, - you can always use mp_cmp_d(), and for zero, there is mp_cmp_z(). - */ -int mp_cmp_int(const mp_int *a, long z, int kmflag) -{ - mp_int tmp; - int out; - - ARGCHK(a != NULL, MP_EQ); - - mp_init(&tmp, kmflag); mp_set_int(&tmp, z); - out = mp_cmp(a, &tmp); - mp_clear(&tmp); - - return out; - -} /* end mp_cmp_int() */ - -/* }}} */ - -/* {{{ mp_isodd(a) */ - -/* - mp_isodd(a) - - Returns a true (non-zero) value if a is odd, false (zero) otherwise. - */ -int mp_isodd(const mp_int *a) -{ - ARGCHK(a != NULL, 0); - - return (int)(DIGIT(a, 0) & 1); - -} /* end mp_isodd() */ - -/* }}} */ - -/* {{{ mp_iseven(a) */ - -int mp_iseven(const mp_int *a) -{ - return !mp_isodd(a); - -} /* end mp_iseven() */ - -/* }}} */ - -/* }}} */ - -/*------------------------------------------------------------------------*/ -/* {{{ Number theoretic functions */ - -#if MP_NUMTH -/* {{{ mp_gcd(a, b, c) */ - -/* - Like the old mp_gcd() function, except computes the GCD using the - binary algorithm due to Josef Stein in 1961 (via Knuth). - */ -mp_err mp_gcd(mp_int *a, mp_int *b, mp_int *c) -{ - mp_err res; - mp_int u, v, t; - mp_size k = 0; - - ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG); - - if(mp_cmp_z(a) == MP_EQ && mp_cmp_z(b) == MP_EQ) - return MP_RANGE; - if(mp_cmp_z(a) == MP_EQ) { - return mp_copy(b, c); - } else if(mp_cmp_z(b) == MP_EQ) { - return mp_copy(a, c); - } - - if((res = mp_init(&t, FLAG(a))) != MP_OKAY) - return res; - if((res = mp_init_copy(&u, a)) != MP_OKAY) - goto U; - if((res = mp_init_copy(&v, b)) != MP_OKAY) - goto V; - - SIGN(&u) = ZPOS; - SIGN(&v) = ZPOS; - - /* Divide out common factors of 2 until at least 1 of a, b is even */ - while(mp_iseven(&u) && mp_iseven(&v)) { - s_mp_div_2(&u); - s_mp_div_2(&v); - ++k; - } - - /* Initialize t */ - if(mp_isodd(&u)) { - if((res = mp_copy(&v, &t)) != MP_OKAY) - goto CLEANUP; - - /* t = -v */ - if(SIGN(&v) == ZPOS) - SIGN(&t) = NEG; - else - SIGN(&t) = ZPOS; - - } else { - if((res = mp_copy(&u, &t)) != MP_OKAY) - goto CLEANUP; - - } - - for(;;) { - while(mp_iseven(&t)) { - s_mp_div_2(&t); - } - - if(mp_cmp_z(&t) == MP_GT) { - if((res = mp_copy(&t, &u)) != MP_OKAY) - goto CLEANUP; - - } else { - if((res = mp_copy(&t, &v)) != MP_OKAY) - goto CLEANUP; - - /* v = -t */ - if(SIGN(&t) == ZPOS) - SIGN(&v) = NEG; - else - SIGN(&v) = ZPOS; - } - - if((res = mp_sub(&u, &v, &t)) != MP_OKAY) - goto CLEANUP; - - if(s_mp_cmp_d(&t, 0) == MP_EQ) - break; - } - - s_mp_2expt(&v, k); /* v = 2^k */ - res = mp_mul(&u, &v, c); /* c = u * v */ - - CLEANUP: - mp_clear(&v); - V: - mp_clear(&u); - U: - mp_clear(&t); - - return res; - -} /* end mp_gcd() */ - -/* }}} */ - -/* {{{ mp_lcm(a, b, c) */ - -/* We compute the least common multiple using the rule: - - ab = [a, b](a, b) - - ... by computing the product, and dividing out the gcd. - */ - -mp_err mp_lcm(mp_int *a, mp_int *b, mp_int *c) -{ - mp_int gcd, prod; - mp_err res; - - ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG); - - /* Set up temporaries */ - if((res = mp_init(&gcd, FLAG(a))) != MP_OKAY) - return res; - if((res = mp_init(&prod, FLAG(a))) != MP_OKAY) - goto GCD; - - if((res = mp_mul(a, b, &prod)) != MP_OKAY) - goto CLEANUP; - if((res = mp_gcd(a, b, &gcd)) != MP_OKAY) - goto CLEANUP; - - res = mp_div(&prod, &gcd, c, NULL); - - CLEANUP: - mp_clear(&prod); - GCD: - mp_clear(&gcd); - - return res; - -} /* end mp_lcm() */ - -/* }}} */ - -/* {{{ mp_xgcd(a, b, g, x, y) */ - -/* - mp_xgcd(a, b, g, x, y) - - Compute g = (a, b) and values x and y satisfying Bezout's identity - (that is, ax + by = g). This uses the binary extended GCD algorithm - based on the Stein algorithm used for mp_gcd() - See algorithm 14.61 in Handbook of Applied Cryptogrpahy. - */ - -mp_err mp_xgcd(const mp_int *a, const mp_int *b, mp_int *g, mp_int *x, mp_int *y) -{ - mp_int gx, xc, yc, u, v, A, B, C, D; - mp_int *clean[9]; - mp_err res; - int last = -1; - - if(mp_cmp_z(b) == 0) - return MP_RANGE; - - /* Initialize all these variables we need */ - MP_CHECKOK( mp_init(&u, FLAG(a)) ); - clean[++last] = &u; - MP_CHECKOK( mp_init(&v, FLAG(a)) ); - clean[++last] = &v; - MP_CHECKOK( mp_init(&gx, FLAG(a)) ); - clean[++last] = &gx; - MP_CHECKOK( mp_init(&A, FLAG(a)) ); - clean[++last] = &A; - MP_CHECKOK( mp_init(&B, FLAG(a)) ); - clean[++last] = &B; - MP_CHECKOK( mp_init(&C, FLAG(a)) ); - clean[++last] = &C; - MP_CHECKOK( mp_init(&D, FLAG(a)) ); - clean[++last] = &D; - MP_CHECKOK( mp_init_copy(&xc, a) ); - clean[++last] = &xc; - mp_abs(&xc, &xc); - MP_CHECKOK( mp_init_copy(&yc, b) ); - clean[++last] = &yc; - mp_abs(&yc, &yc); - - mp_set(&gx, 1); - - /* Divide by two until at least one of them is odd */ - while(mp_iseven(&xc) && mp_iseven(&yc)) { - mp_size nx = mp_trailing_zeros(&xc); - mp_size ny = mp_trailing_zeros(&yc); - mp_size n = MP_MIN(nx, ny); - s_mp_div_2d(&xc,n); - s_mp_div_2d(&yc,n); - MP_CHECKOK( s_mp_mul_2d(&gx,n) ); - } - - mp_copy(&xc, &u); - mp_copy(&yc, &v); - mp_set(&A, 1); mp_set(&D, 1); - - /* Loop through binary GCD algorithm */ - do { - while(mp_iseven(&u)) { - s_mp_div_2(&u); - - if(mp_iseven(&A) && mp_iseven(&B)) { - s_mp_div_2(&A); s_mp_div_2(&B); - } else { - MP_CHECKOK( mp_add(&A, &yc, &A) ); - s_mp_div_2(&A); - MP_CHECKOK( mp_sub(&B, &xc, &B) ); - s_mp_div_2(&B); - } - } - - while(mp_iseven(&v)) { - s_mp_div_2(&v); - - if(mp_iseven(&C) && mp_iseven(&D)) { - s_mp_div_2(&C); s_mp_div_2(&D); - } else { - MP_CHECKOK( mp_add(&C, &yc, &C) ); - s_mp_div_2(&C); - MP_CHECKOK( mp_sub(&D, &xc, &D) ); - s_mp_div_2(&D); - } - } - - if(mp_cmp(&u, &v) >= 0) { - MP_CHECKOK( mp_sub(&u, &v, &u) ); - MP_CHECKOK( mp_sub(&A, &C, &A) ); - MP_CHECKOK( mp_sub(&B, &D, &B) ); - } else { - MP_CHECKOK( mp_sub(&v, &u, &v) ); - MP_CHECKOK( mp_sub(&C, &A, &C) ); - MP_CHECKOK( mp_sub(&D, &B, &D) ); - } - } while (mp_cmp_z(&u) != 0); - - /* copy results to output */ - if(x) - MP_CHECKOK( mp_copy(&C, x) ); - - if(y) - MP_CHECKOK( mp_copy(&D, y) ); - - if(g) - MP_CHECKOK( mp_mul(&gx, &v, g) ); - - CLEANUP: - while(last >= 0) - mp_clear(clean[last--]); - - return res; - -} /* end mp_xgcd() */ - -/* }}} */ - -mp_size mp_trailing_zeros(const mp_int *mp) -{ - mp_digit d; - mp_size n = 0; - unsigned int ix; - - if (!mp || !MP_DIGITS(mp) || !mp_cmp_z(mp)) - return n; - - for (ix = 0; !(d = MP_DIGIT(mp,ix)) && (ix < MP_USED(mp)); ++ix) - n += MP_DIGIT_BIT; - if (!d) - return 0; /* shouldn't happen, but ... */ -#if !defined(MP_USE_UINT_DIGIT) - if (!(d & 0xffffffffU)) { - d >>= 32; - n += 32; - } -#endif - if (!(d & 0xffffU)) { - d >>= 16; - n += 16; - } - if (!(d & 0xffU)) { - d >>= 8; - n += 8; - } - if (!(d & 0xfU)) { - d >>= 4; - n += 4; - } - if (!(d & 0x3U)) { - d >>= 2; - n += 2; - } - if (!(d & 0x1U)) { - d >>= 1; - n += 1; - } -#if MP_ARGCHK == 2 - assert(0 != (d & 1)); -#endif - return n; -} - -/* Given a and prime p, computes c and k such that a*c == 2**k (mod p). -** Returns k (positive) or error (negative). -** This technique from the paper "Fast Modular Reciprocals" (unpublished) -** by Richard Schroeppel (a.k.a. Captain Nemo). -*/ -mp_err s_mp_almost_inverse(const mp_int *a, const mp_int *p, mp_int *c) -{ - mp_err res; - mp_err k = 0; - mp_int d, f, g; - - ARGCHK(a && p && c, MP_BADARG); - - MP_DIGITS(&d) = 0; - MP_DIGITS(&f) = 0; - MP_DIGITS(&g) = 0; - MP_CHECKOK( mp_init(&d, FLAG(a)) ); - MP_CHECKOK( mp_init_copy(&f, a) ); /* f = a */ - MP_CHECKOK( mp_init_copy(&g, p) ); /* g = p */ - - mp_set(c, 1); - mp_zero(&d); - - if (mp_cmp_z(&f) == 0) { - res = MP_UNDEF; - } else - for (;;) { - int diff_sign; - while (mp_iseven(&f)) { - mp_size n = mp_trailing_zeros(&f); - if (!n) { - res = MP_UNDEF; - goto CLEANUP; - } - s_mp_div_2d(&f, n); - MP_CHECKOK( s_mp_mul_2d(&d, n) ); - k += n; - } - if (mp_cmp_d(&f, 1) == MP_EQ) { /* f == 1 */ - res = k; - break; - } - diff_sign = mp_cmp(&f, &g); - if (diff_sign < 0) { /* f < g */ - s_mp_exch(&f, &g); - s_mp_exch(c, &d); - } else if (diff_sign == 0) { /* f == g */ - res = MP_UNDEF; /* a and p are not relatively prime */ - break; - } - if ((MP_DIGIT(&f,0) % 4) == (MP_DIGIT(&g,0) % 4)) { - MP_CHECKOK( mp_sub(&f, &g, &f) ); /* f = f - g */ - MP_CHECKOK( mp_sub(c, &d, c) ); /* c = c - d */ - } else { - MP_CHECKOK( mp_add(&f, &g, &f) ); /* f = f + g */ - MP_CHECKOK( mp_add(c, &d, c) ); /* c = c + d */ - } - } - if (res >= 0) { - if (s_mp_cmp(c, p) >= 0) { - MP_CHECKOK( mp_div(c, p, NULL, c)); - } - if (MP_SIGN(c) != MP_ZPOS) { - MP_CHECKOK( mp_add(c, p, c) ); - } - res = k; - } - -CLEANUP: - mp_clear(&d); - mp_clear(&f); - mp_clear(&g); - return res; -} - -/* Compute T = (P ** -1) mod MP_RADIX. Also works for 16-bit mp_digits. -** This technique from the paper "Fast Modular Reciprocals" (unpublished) -** by Richard Schroeppel (a.k.a. Captain Nemo). -*/ -mp_digit s_mp_invmod_radix(mp_digit P) -{ - mp_digit T = P; - T *= 2 - (P * T); - T *= 2 - (P * T); - T *= 2 - (P * T); - T *= 2 - (P * T); -#if !defined(MP_USE_UINT_DIGIT) - T *= 2 - (P * T); - T *= 2 - (P * T); -#endif - return T; -} - -/* Given c, k, and prime p, where a*c == 2**k (mod p), -** Compute x = (a ** -1) mod p. This is similar to Montgomery reduction. -** This technique from the paper "Fast Modular Reciprocals" (unpublished) -** by Richard Schroeppel (a.k.a. Captain Nemo). -*/ -mp_err s_mp_fixup_reciprocal(const mp_int *c, const mp_int *p, int k, mp_int *x) -{ - int k_orig = k; - mp_digit r; - mp_size ix; - mp_err res; - - if (mp_cmp_z(c) < 0) { /* c < 0 */ - MP_CHECKOK( mp_add(c, p, x) ); /* x = c + p */ - } else { - MP_CHECKOK( mp_copy(c, x) ); /* x = c */ - } - - /* make sure x is large enough */ - ix = MP_HOWMANY(k, MP_DIGIT_BIT) + MP_USED(p) + 1; - ix = MP_MAX(ix, MP_USED(x)); - MP_CHECKOK( s_mp_pad(x, ix) ); - - r = 0 - s_mp_invmod_radix(MP_DIGIT(p,0)); - - for (ix = 0; k > 0; ix++) { - int j = MP_MIN(k, MP_DIGIT_BIT); - mp_digit v = r * MP_DIGIT(x, ix); - if (j < MP_DIGIT_BIT) { - v &= ((mp_digit)1 << j) - 1; /* v = v mod (2 ** j) */ - } - s_mp_mul_d_add_offset(p, v, x, ix); /* x += p * v * (RADIX ** ix) */ - k -= j; - } - s_mp_clamp(x); - s_mp_div_2d(x, k_orig); - res = MP_OKAY; - -CLEANUP: - return res; -} - -/* compute mod inverse using Schroeppel's method, only if m is odd */ -mp_err s_mp_invmod_odd_m(const mp_int *a, const mp_int *m, mp_int *c) -{ - int k; - mp_err res; - mp_int x; - - ARGCHK(a && m && c, MP_BADARG); - - if(mp_cmp_z(a) == 0 || mp_cmp_z(m) == 0) - return MP_RANGE; - if (mp_iseven(m)) - return MP_UNDEF; - - MP_DIGITS(&x) = 0; - - if (a == c) { - if ((res = mp_init_copy(&x, a)) != MP_OKAY) - return res; - if (a == m) - m = &x; - a = &x; - } else if (m == c) { - if ((res = mp_init_copy(&x, m)) != MP_OKAY) - return res; - m = &x; - } else { - MP_DIGITS(&x) = 0; - } - - MP_CHECKOK( s_mp_almost_inverse(a, m, c) ); - k = res; - MP_CHECKOK( s_mp_fixup_reciprocal(c, m, k, c) ); -CLEANUP: - mp_clear(&x); - return res; -} - -/* Known good algorithm for computing modular inverse. But slow. */ -mp_err mp_invmod_xgcd(const mp_int *a, const mp_int *m, mp_int *c) -{ - mp_int g, x; - mp_err res; - - ARGCHK(a && m && c, MP_BADARG); - - if(mp_cmp_z(a) == 0 || mp_cmp_z(m) == 0) - return MP_RANGE; - - MP_DIGITS(&g) = 0; - MP_DIGITS(&x) = 0; - MP_CHECKOK( mp_init(&x, FLAG(a)) ); - MP_CHECKOK( mp_init(&g, FLAG(a)) ); - - MP_CHECKOK( mp_xgcd(a, m, &g, &x, NULL) ); - - if (mp_cmp_d(&g, 1) != MP_EQ) { - res = MP_UNDEF; - goto CLEANUP; - } - - res = mp_mod(&x, m, c); - SIGN(c) = SIGN(a); - -CLEANUP: - mp_clear(&x); - mp_clear(&g); - - return res; -} - -/* modular inverse where modulus is 2**k. */ -/* c = a**-1 mod 2**k */ -mp_err s_mp_invmod_2d(const mp_int *a, mp_size k, mp_int *c) -{ - mp_err res; - mp_size ix = k + 4; - mp_int t0, t1, val, tmp, two2k; - - static const mp_digit d2 = 2; - static const mp_int two = { 0, MP_ZPOS, 1, 1, (mp_digit *)&d2 }; - - if (mp_iseven(a)) - return MP_UNDEF; - if (k <= MP_DIGIT_BIT) { - mp_digit i = s_mp_invmod_radix(MP_DIGIT(a,0)); - if (k < MP_DIGIT_BIT) - i &= ((mp_digit)1 << k) - (mp_digit)1; - mp_set(c, i); - return MP_OKAY; - } - MP_DIGITS(&t0) = 0; - MP_DIGITS(&t1) = 0; - MP_DIGITS(&val) = 0; - MP_DIGITS(&tmp) = 0; - MP_DIGITS(&two2k) = 0; - MP_CHECKOK( mp_init_copy(&val, a) ); - s_mp_mod_2d(&val, k); - MP_CHECKOK( mp_init_copy(&t0, &val) ); - MP_CHECKOK( mp_init_copy(&t1, &t0) ); - MP_CHECKOK( mp_init(&tmp, FLAG(a)) ); - MP_CHECKOK( mp_init(&two2k, FLAG(a)) ); - MP_CHECKOK( s_mp_2expt(&two2k, k) ); - do { - MP_CHECKOK( mp_mul(&val, &t1, &tmp) ); - MP_CHECKOK( mp_sub(&two, &tmp, &tmp) ); - MP_CHECKOK( mp_mul(&t1, &tmp, &t1) ); - s_mp_mod_2d(&t1, k); - while (MP_SIGN(&t1) != MP_ZPOS) { - MP_CHECKOK( mp_add(&t1, &two2k, &t1) ); - } - if (mp_cmp(&t1, &t0) == MP_EQ) - break; - MP_CHECKOK( mp_copy(&t1, &t0) ); - } while (--ix > 0); - if (!ix) { - res = MP_UNDEF; - } else { - mp_exch(c, &t1); - } - -CLEANUP: - mp_clear(&t0); - mp_clear(&t1); - mp_clear(&val); - mp_clear(&tmp); - mp_clear(&two2k); - return res; -} - -mp_err s_mp_invmod_even_m(const mp_int *a, const mp_int *m, mp_int *c) -{ - mp_err res; - mp_size k; - mp_int oddFactor, evenFactor; /* factors of the modulus */ - mp_int oddPart, evenPart; /* parts to combine via CRT. */ - mp_int C2, tmp1, tmp2; - - /*static const mp_digit d1 = 1; */ - /*static const mp_int one = { MP_ZPOS, 1, 1, (mp_digit *)&d1 }; */ - - if ((res = s_mp_ispow2(m)) >= 0) { - k = res; - return s_mp_invmod_2d(a, k, c); - } - MP_DIGITS(&oddFactor) = 0; - MP_DIGITS(&evenFactor) = 0; - MP_DIGITS(&oddPart) = 0; - MP_DIGITS(&evenPart) = 0; - MP_DIGITS(&C2) = 0; - MP_DIGITS(&tmp1) = 0; - MP_DIGITS(&tmp2) = 0; - - MP_CHECKOK( mp_init_copy(&oddFactor, m) ); /* oddFactor = m */ - MP_CHECKOK( mp_init(&evenFactor, FLAG(m)) ); - MP_CHECKOK( mp_init(&oddPart, FLAG(m)) ); - MP_CHECKOK( mp_init(&evenPart, FLAG(m)) ); - MP_CHECKOK( mp_init(&C2, FLAG(m)) ); - MP_CHECKOK( mp_init(&tmp1, FLAG(m)) ); - MP_CHECKOK( mp_init(&tmp2, FLAG(m)) ); - - k = mp_trailing_zeros(m); - s_mp_div_2d(&oddFactor, k); - MP_CHECKOK( s_mp_2expt(&evenFactor, k) ); - - /* compute a**-1 mod oddFactor. */ - MP_CHECKOK( s_mp_invmod_odd_m(a, &oddFactor, &oddPart) ); - /* compute a**-1 mod evenFactor, where evenFactor == 2**k. */ - MP_CHECKOK( s_mp_invmod_2d( a, k, &evenPart) ); - - /* Use Chinese Remainer theorem to compute a**-1 mod m. */ - /* let m1 = oddFactor, v1 = oddPart, - * let m2 = evenFactor, v2 = evenPart. - */ - - /* Compute C2 = m1**-1 mod m2. */ - MP_CHECKOK( s_mp_invmod_2d(&oddFactor, k, &C2) ); - - /* compute u = (v2 - v1)*C2 mod m2 */ - MP_CHECKOK( mp_sub(&evenPart, &oddPart, &tmp1) ); - MP_CHECKOK( mp_mul(&tmp1, &C2, &tmp2) ); - s_mp_mod_2d(&tmp2, k); - while (MP_SIGN(&tmp2) != MP_ZPOS) { - MP_CHECKOK( mp_add(&tmp2, &evenFactor, &tmp2) ); - } - - /* compute answer = v1 + u*m1 */ - MP_CHECKOK( mp_mul(&tmp2, &oddFactor, c) ); - MP_CHECKOK( mp_add(&oddPart, c, c) ); - /* not sure this is necessary, but it's low cost if not. */ - MP_CHECKOK( mp_mod(c, m, c) ); - -CLEANUP: - mp_clear(&oddFactor); - mp_clear(&evenFactor); - mp_clear(&oddPart); - mp_clear(&evenPart); - mp_clear(&C2); - mp_clear(&tmp1); - mp_clear(&tmp2); - return res; -} - - -/* {{{ mp_invmod(a, m, c) */ - -/* - mp_invmod(a, m, c) - - Compute c = a^-1 (mod m), if there is an inverse for a (mod m). - This is equivalent to the question of whether (a, m) = 1. If not, - MP_UNDEF is returned, and there is no inverse. - */ - -mp_err mp_invmod(const mp_int *a, const mp_int *m, mp_int *c) -{ - - ARGCHK(a && m && c, MP_BADARG); - - if(mp_cmp_z(a) == 0 || mp_cmp_z(m) == 0) - return MP_RANGE; - - if (mp_isodd(m)) { - return s_mp_invmod_odd_m(a, m, c); - } - if (mp_iseven(a)) - return MP_UNDEF; /* not invertable */ - - return s_mp_invmod_even_m(a, m, c); - -} /* end mp_invmod() */ - -/* }}} */ -#endif /* if MP_NUMTH */ - -/* }}} */ - -/*------------------------------------------------------------------------*/ -/* {{{ mp_print(mp, ofp) */ - -#if MP_IOFUNC -/* - mp_print(mp, ofp) - - Print a textual representation of the given mp_int on the output - stream 'ofp'. Output is generated using the internal radix. - */ - -void mp_print(mp_int *mp, FILE *ofp) -{ - int ix; - - if(mp == NULL || ofp == NULL) - return; - - fputc((SIGN(mp) == NEG) ? '-' : '+', ofp); - - for(ix = USED(mp) - 1; ix >= 0; ix--) { - fprintf(ofp, DIGIT_FMT, DIGIT(mp, ix)); - } - -} /* end mp_print() */ - -#endif /* if MP_IOFUNC */ - -/* }}} */ - -/*------------------------------------------------------------------------*/ -/* {{{ More I/O Functions */ - -/* {{{ mp_read_raw(mp, str, len) */ - -/* - mp_read_raw(mp, str, len) - - Read in a raw value (base 256) into the given mp_int - */ - -mp_err mp_read_raw(mp_int *mp, char *str, int len) -{ - int ix; - mp_err res; - unsigned char *ustr = (unsigned char *)str; - - ARGCHK(mp != NULL && str != NULL && len > 0, MP_BADARG); - - mp_zero(mp); - - /* Get sign from first byte */ - if(ustr[0]) - SIGN(mp) = NEG; - else - SIGN(mp) = ZPOS; - - /* Read the rest of the digits */ - for(ix = 1; ix < len; ix++) { - if((res = mp_mul_d(mp, 256, mp)) != MP_OKAY) - return res; - if((res = mp_add_d(mp, ustr[ix], mp)) != MP_OKAY) - return res; - } - - return MP_OKAY; - -} /* end mp_read_raw() */ - -/* }}} */ - -/* {{{ mp_raw_size(mp) */ - -int mp_raw_size(mp_int *mp) -{ - ARGCHK(mp != NULL, 0); - - return (USED(mp) * sizeof(mp_digit)) + 1; - -} /* end mp_raw_size() */ - -/* }}} */ - -/* {{{ mp_toraw(mp, str) */ - -mp_err mp_toraw(mp_int *mp, char *str) -{ - int ix, jx, pos = 1; - - ARGCHK(mp != NULL && str != NULL, MP_BADARG); - - str[0] = (char)SIGN(mp); - - /* Iterate over each digit... */ - for(ix = USED(mp) - 1; ix >= 0; ix--) { - mp_digit d = DIGIT(mp, ix); - - /* Unpack digit bytes, high order first */ - for(jx = sizeof(mp_digit) - 1; jx >= 0; jx--) { - str[pos++] = (char)(d >> (jx * CHAR_BIT)); - } - } - - return MP_OKAY; - -} /* end mp_toraw() */ - -/* }}} */ - -/* {{{ mp_read_radix(mp, str, radix) */ - -/* - mp_read_radix(mp, str, radix) - - Read an integer from the given string, and set mp to the resulting - value. The input is presumed to be in base 10. Leading non-digit - characters are ignored, and the function reads until a non-digit - character or the end of the string. - */ - -mp_err mp_read_radix(mp_int *mp, const char *str, int radix) -{ - int ix = 0, val = 0; - mp_err res; - mp_sign sig = ZPOS; - - ARGCHK(mp != NULL && str != NULL && radix >= 2 && radix <= MAX_RADIX, - MP_BADARG); - - mp_zero(mp); - - /* Skip leading non-digit characters until a digit or '-' or '+' */ - while(str[ix] && - (s_mp_tovalue(str[ix], radix) < 0) && - str[ix] != '-' && - str[ix] != '+') { - ++ix; - } - - if(str[ix] == '-') { - sig = NEG; - ++ix; - } else if(str[ix] == '+') { - sig = ZPOS; /* this is the default anyway... */ - ++ix; - } - - while((val = s_mp_tovalue(str[ix], radix)) >= 0) { - if((res = s_mp_mul_d(mp, radix)) != MP_OKAY) - return res; - if((res = s_mp_add_d(mp, val)) != MP_OKAY) - return res; - ++ix; - } - - if(s_mp_cmp_d(mp, 0) == MP_EQ) - SIGN(mp) = ZPOS; - else - SIGN(mp) = sig; - - return MP_OKAY; - -} /* end mp_read_radix() */ - -mp_err mp_read_variable_radix(mp_int *a, const char * str, int default_radix) -{ - int radix = default_radix; - int cx; - mp_sign sig = ZPOS; - mp_err res; - - /* Skip leading non-digit characters until a digit or '-' or '+' */ - while ((cx = *str) != 0 && - (s_mp_tovalue(cx, radix) < 0) && - cx != '-' && - cx != '+') { - ++str; - } - - if (cx == '-') { - sig = NEG; - ++str; - } else if (cx == '+') { - sig = ZPOS; /* this is the default anyway... */ - ++str; - } - - if (str[0] == '0') { - if ((str[1] | 0x20) == 'x') { - radix = 16; - str += 2; - } else { - radix = 8; - str++; - } - } - res = mp_read_radix(a, str, radix); - if (res == MP_OKAY) { - MP_SIGN(a) = (s_mp_cmp_d(a, 0) == MP_EQ) ? ZPOS : sig; - } - return res; -} - -/* }}} */ - -/* {{{ mp_radix_size(mp, radix) */ - -int mp_radix_size(mp_int *mp, int radix) -{ - int bits; - - if(!mp || radix < 2 || radix > MAX_RADIX) - return 0; - - bits = USED(mp) * DIGIT_BIT - 1; - - return s_mp_outlen(bits, radix); - -} /* end mp_radix_size() */ - -/* }}} */ - -/* {{{ mp_toradix(mp, str, radix) */ - -mp_err mp_toradix(mp_int *mp, char *str, int radix) -{ - int ix, pos = 0; - - ARGCHK(mp != NULL && str != NULL, MP_BADARG); - ARGCHK(radix > 1 && radix <= MAX_RADIX, MP_RANGE); - - if(mp_cmp_z(mp) == MP_EQ) { - str[0] = '0'; - str[1] = '\0'; - } else { - mp_err res; - mp_int tmp; - mp_sign sgn; - mp_digit rem, rdx = (mp_digit)radix; - char ch; - - if((res = mp_init_copy(&tmp, mp)) != MP_OKAY) - return res; - - /* Save sign for later, and take absolute value */ - sgn = SIGN(&tmp); SIGN(&tmp) = ZPOS; - - /* Generate output digits in reverse order */ - while(mp_cmp_z(&tmp) != 0) { - if((res = mp_div_d(&tmp, rdx, &tmp, &rem)) != MP_OKAY) { - mp_clear(&tmp); - return res; - } - - /* Generate digits, use capital letters */ - ch = s_mp_todigit(rem, radix, 0); - - str[pos++] = ch; - } - - /* Add - sign if original value was negative */ - if(sgn == NEG) - str[pos++] = '-'; - - /* Add trailing NUL to end the string */ - str[pos--] = '\0'; - - /* Reverse the digits and sign indicator */ - ix = 0; - while(ix < pos) { - char tmp = str[ix]; - - str[ix] = str[pos]; - str[pos] = tmp; - ++ix; - --pos; - } - - mp_clear(&tmp); - } - - return MP_OKAY; - -} /* end mp_toradix() */ - -/* }}} */ - -/* {{{ mp_tovalue(ch, r) */ - -int mp_tovalue(char ch, int r) -{ - return s_mp_tovalue(ch, r); - -} /* end mp_tovalue() */ - -/* }}} */ - -/* }}} */ - -/* {{{ mp_strerror(ec) */ - -/* - mp_strerror(ec) - - Return a string describing the meaning of error code 'ec'. The - string returned is allocated in static memory, so the caller should - not attempt to modify or free the memory associated with this - string. - */ -const char *mp_strerror(mp_err ec) -{ - int aec = (ec < 0) ? -ec : ec; - - /* Code values are negative, so the senses of these comparisons - are accurate */ - if(ec < MP_LAST_CODE || ec > MP_OKAY) { - return mp_err_string[0]; /* unknown error code */ - } else { - return mp_err_string[aec + 1]; - } - -} /* end mp_strerror() */ - -/* }}} */ - -/*========================================================================*/ -/*------------------------------------------------------------------------*/ -/* Static function definitions (internal use only) */ - -/* {{{ Memory management */ - -/* {{{ s_mp_grow(mp, min) */ - -/* Make sure there are at least 'min' digits allocated to mp */ -mp_err s_mp_grow(mp_int *mp, mp_size min) -{ - if(min > ALLOC(mp)) { - mp_digit *tmp; - - /* Set min to next nearest default precision block size */ - min = MP_ROUNDUP(min, s_mp_defprec); - - if((tmp = s_mp_alloc(min, sizeof(mp_digit), FLAG(mp))) == NULL) - return MP_MEM; - - s_mp_copy(DIGITS(mp), tmp, USED(mp)); - -#if MP_CRYPTO - s_mp_setz(DIGITS(mp), ALLOC(mp)); -#endif - s_mp_free(DIGITS(mp), ALLOC(mp)); - DIGITS(mp) = tmp; - ALLOC(mp) = min; - } - - return MP_OKAY; - -} /* end s_mp_grow() */ - -/* }}} */ - -/* {{{ s_mp_pad(mp, min) */ - -/* Make sure the used size of mp is at least 'min', growing if needed */ -mp_err s_mp_pad(mp_int *mp, mp_size min) -{ - if(min > USED(mp)) { - mp_err res; - - /* Make sure there is room to increase precision */ - if (min > ALLOC(mp)) { - if ((res = s_mp_grow(mp, min)) != MP_OKAY) - return res; - } else { - s_mp_setz(DIGITS(mp) + USED(mp), min - USED(mp)); - } - - /* Increase precision; should already be 0-filled */ - USED(mp) = min; - } - - return MP_OKAY; - -} /* end s_mp_pad() */ - -/* }}} */ - -/* {{{ s_mp_setz(dp, count) */ - -#if MP_MACRO == 0 -/* Set 'count' digits pointed to by dp to be zeroes */ -void s_mp_setz(mp_digit *dp, mp_size count) -{ -#if MP_MEMSET == 0 - int ix; - - for(ix = 0; ix < count; ix++) - dp[ix] = 0; -#else - memset(dp, 0, count * sizeof(mp_digit)); -#endif - -} /* end s_mp_setz() */ -#endif - -/* }}} */ - -/* {{{ s_mp_copy(sp, dp, count) */ - -#if MP_MACRO == 0 -/* Copy 'count' digits from sp to dp */ -void s_mp_copy(const mp_digit *sp, mp_digit *dp, mp_size count) -{ -#if MP_MEMCPY == 0 - int ix; - - for(ix = 0; ix < count; ix++) - dp[ix] = sp[ix]; -#else - memcpy(dp, sp, count * sizeof(mp_digit)); -#endif - -} /* end s_mp_copy() */ -#endif - -/* }}} */ - -/* {{{ s_mp_alloc(nb, ni, kmflag) */ - -#if MP_MACRO == 0 -/* Allocate ni records of nb bytes each, and return a pointer to that */ -void *s_mp_alloc(size_t nb, size_t ni, int kmflag) -{ - ++mp_allocs; -#ifdef _KERNEL - mp_int *mp; - mp = kmem_zalloc(nb * ni, kmflag); - if (mp != NULL) - FLAG(mp) = kmflag; - return (mp); -#else - return calloc(nb, ni); -#endif - -} /* end s_mp_alloc() */ -#endif - -/* }}} */ - -/* {{{ s_mp_free(ptr) */ - -#if MP_MACRO == 0 -/* Free the memory pointed to by ptr */ -void s_mp_free(void *ptr, mp_size alloc) -{ - if(ptr) { - ++mp_frees; -#ifdef _KERNEL - kmem_free(ptr, alloc * sizeof (mp_digit)); -#else - free(ptr); -#endif - } -} /* end s_mp_free() */ -#endif - -/* }}} */ - -/* {{{ s_mp_clamp(mp) */ - -#if MP_MACRO == 0 -/* Remove leading zeroes from the given value */ -void s_mp_clamp(mp_int *mp) -{ - mp_size used = MP_USED(mp); - while (used > 1 && DIGIT(mp, used - 1) == 0) - --used; - MP_USED(mp) = used; -} /* end s_mp_clamp() */ -#endif - -/* }}} */ - -/* {{{ s_mp_exch(a, b) */ - -/* Exchange the data for a and b; (b, a) = (a, b) */ -void s_mp_exch(mp_int *a, mp_int *b) -{ - mp_int tmp; - - tmp = *a; - *a = *b; - *b = tmp; - -} /* end s_mp_exch() */ - -/* }}} */ - -/* }}} */ - -/* {{{ Arithmetic helpers */ - -/* {{{ s_mp_lshd(mp, p) */ - -/* - Shift mp leftward by p digits, growing if needed, and zero-filling - the in-shifted digits at the right end. This is a convenient - alternative to multiplication by powers of the radix - The value of USED(mp) must already have been set to the value for - the shifted result. - */ - -mp_err s_mp_lshd(mp_int *mp, mp_size p) -{ - mp_err res; - mp_size pos; - int ix; - - if(p == 0) - return MP_OKAY; - - if (MP_USED(mp) == 1 && MP_DIGIT(mp, 0) == 0) - return MP_OKAY; - - if((res = s_mp_pad(mp, USED(mp) + p)) != MP_OKAY) - return res; - - pos = USED(mp) - 1; - - /* Shift all the significant figures over as needed */ - for(ix = pos - p; ix >= 0; ix--) - DIGIT(mp, ix + p) = DIGIT(mp, ix); - - /* Fill the bottom digits with zeroes */ - for(ix = 0; ix < p; ix++) - DIGIT(mp, ix) = 0; - - return MP_OKAY; - -} /* end s_mp_lshd() */ - -/* }}} */ - -/* {{{ s_mp_mul_2d(mp, d) */ - -/* - Multiply the integer by 2^d, where d is a number of bits. This - amounts to a bitwise shift of the value. - */ -mp_err s_mp_mul_2d(mp_int *mp, mp_digit d) -{ - mp_err res; - mp_digit dshift, bshift; - mp_digit mask; - - ARGCHK(mp != NULL, MP_BADARG); - - dshift = d / MP_DIGIT_BIT; - bshift = d % MP_DIGIT_BIT; - /* bits to be shifted out of the top word */ - mask = ((mp_digit)~0 << (MP_DIGIT_BIT - bshift)); - mask &= MP_DIGIT(mp, MP_USED(mp) - 1); - - if (MP_OKAY != (res = s_mp_pad(mp, MP_USED(mp) + dshift + (mask != 0) ))) - return res; - - if (dshift && MP_OKAY != (res = s_mp_lshd(mp, dshift))) - return res; - - if (bshift) { - mp_digit *pa = MP_DIGITS(mp); - mp_digit *alim = pa + MP_USED(mp); - mp_digit prev = 0; - - for (pa += dshift; pa < alim; ) { - mp_digit x = *pa; - *pa++ = (x << bshift) | prev; - prev = x >> (DIGIT_BIT - bshift); - } - } - - s_mp_clamp(mp); - return MP_OKAY; -} /* end s_mp_mul_2d() */ - -/* {{{ s_mp_rshd(mp, p) */ - -/* - Shift mp rightward by p digits. Maintains the invariant that - digits above the precision are all zero. Digits shifted off the - end are lost. Cannot fail. - */ - -void s_mp_rshd(mp_int *mp, mp_size p) -{ - mp_size ix; - mp_digit *src, *dst; - - if(p == 0) - return; - - /* Shortcut when all digits are to be shifted off */ - if(p >= USED(mp)) { - s_mp_setz(DIGITS(mp), ALLOC(mp)); - USED(mp) = 1; - SIGN(mp) = ZPOS; - return; - } - - /* Shift all the significant figures over as needed */ - dst = MP_DIGITS(mp); - src = dst + p; - for (ix = USED(mp) - p; ix > 0; ix--) - *dst++ = *src++; - - MP_USED(mp) -= p; - /* Fill the top digits with zeroes */ - while (p-- > 0) - *dst++ = 0; - -#if 0 - /* Strip off any leading zeroes */ - s_mp_clamp(mp); -#endif - -} /* end s_mp_rshd() */ - -/* }}} */ - -/* {{{ s_mp_div_2(mp) */ - -/* Divide by two -- take advantage of radix properties to do it fast */ -void s_mp_div_2(mp_int *mp) -{ - s_mp_div_2d(mp, 1); - -} /* end s_mp_div_2() */ - -/* }}} */ - -/* {{{ s_mp_mul_2(mp) */ - -mp_err s_mp_mul_2(mp_int *mp) -{ - mp_digit *pd; - unsigned int ix, used; - mp_digit kin = 0; - - /* Shift digits leftward by 1 bit */ - used = MP_USED(mp); - pd = MP_DIGITS(mp); - for (ix = 0; ix < used; ix++) { - mp_digit d = *pd; - *pd++ = (d << 1) | kin; - kin = (d >> (DIGIT_BIT - 1)); - } - - /* Deal with rollover from last digit */ - if (kin) { - if (ix >= ALLOC(mp)) { - mp_err res; - if((res = s_mp_grow(mp, ALLOC(mp) + 1)) != MP_OKAY) - return res; - } - - DIGIT(mp, ix) = kin; - USED(mp) += 1; - } - - return MP_OKAY; - -} /* end s_mp_mul_2() */ - -/* }}} */ - -/* {{{ s_mp_mod_2d(mp, d) */ - -/* - Remainder the integer by 2^d, where d is a number of bits. This - amounts to a bitwise AND of the value, and does not require the full - division code - */ -void s_mp_mod_2d(mp_int *mp, mp_digit d) -{ - mp_size ndig = (d / DIGIT_BIT), nbit = (d % DIGIT_BIT); - mp_size ix; - mp_digit dmask; - - if(ndig >= USED(mp)) - return; - - /* Flush all the bits above 2^d in its digit */ - dmask = ((mp_digit)1 << nbit) - 1; - DIGIT(mp, ndig) &= dmask; - - /* Flush all digits above the one with 2^d in it */ - for(ix = ndig + 1; ix < USED(mp); ix++) - DIGIT(mp, ix) = 0; - - s_mp_clamp(mp); - -} /* end s_mp_mod_2d() */ - -/* }}} */ - -/* {{{ s_mp_div_2d(mp, d) */ - -/* - Divide the integer by 2^d, where d is a number of bits. This - amounts to a bitwise shift of the value, and does not require the - full division code (used in Barrett reduction, see below) - */ -void s_mp_div_2d(mp_int *mp, mp_digit d) -{ - int ix; - mp_digit save, next, mask; - - s_mp_rshd(mp, d / DIGIT_BIT); - d %= DIGIT_BIT; - if (d) { - mask = ((mp_digit)1 << d) - 1; - save = 0; - for(ix = USED(mp) - 1; ix >= 0; ix--) { - next = DIGIT(mp, ix) & mask; - DIGIT(mp, ix) = (DIGIT(mp, ix) >> d) | (save << (DIGIT_BIT - d)); - save = next; - } - } - s_mp_clamp(mp); - -} /* end s_mp_div_2d() */ - -/* }}} */ - -/* {{{ s_mp_norm(a, b, *d) */ - -/* - s_mp_norm(a, b, *d) - - Normalize a and b for division, where b is the divisor. In order - that we might make good guesses for quotient digits, we want the - leading digit of b to be at least half the radix, which we - accomplish by multiplying a and b by a power of 2. The exponent - (shift count) is placed in *pd, so that the remainder can be shifted - back at the end of the division process. - */ - -mp_err s_mp_norm(mp_int *a, mp_int *b, mp_digit *pd) -{ - mp_digit d; - mp_digit mask; - mp_digit b_msd; - mp_err res = MP_OKAY; - - d = 0; - mask = DIGIT_MAX & ~(DIGIT_MAX >> 1); /* mask is msb of digit */ - b_msd = DIGIT(b, USED(b) - 1); - while (!(b_msd & mask)) { - b_msd <<= 1; - ++d; - } - - if (d) { - MP_CHECKOK( s_mp_mul_2d(a, d) ); - MP_CHECKOK( s_mp_mul_2d(b, d) ); - } - - *pd = d; -CLEANUP: - return res; - -} /* end s_mp_norm() */ - -/* }}} */ - -/* }}} */ - -/* {{{ Primitive digit arithmetic */ - -/* {{{ s_mp_add_d(mp, d) */ - -/* Add d to |mp| in place */ -mp_err s_mp_add_d(mp_int *mp, mp_digit d) /* unsigned digit addition */ -{ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) - mp_word w, k = 0; - mp_size ix = 1; - - w = (mp_word)DIGIT(mp, 0) + d; - DIGIT(mp, 0) = ACCUM(w); - k = CARRYOUT(w); - - while(ix < USED(mp) && k) { - w = (mp_word)DIGIT(mp, ix) + k; - DIGIT(mp, ix) = ACCUM(w); - k = CARRYOUT(w); - ++ix; - } - - if(k != 0) { - mp_err res; - - if((res = s_mp_pad(mp, USED(mp) + 1)) != MP_OKAY) - return res; - - DIGIT(mp, ix) = (mp_digit)k; - } - - return MP_OKAY; -#else - mp_digit * pmp = MP_DIGITS(mp); - mp_digit sum, mp_i, carry = 0; - mp_err res = MP_OKAY; - int used = (int)MP_USED(mp); - - mp_i = *pmp; - *pmp++ = sum = d + mp_i; - carry = (sum < d); - while (carry && --used > 0) { - mp_i = *pmp; - *pmp++ = sum = carry + mp_i; - carry = !sum; - } - if (carry && !used) { - /* mp is growing */ - used = MP_USED(mp); - MP_CHECKOK( s_mp_pad(mp, used + 1) ); - MP_DIGIT(mp, used) = carry; - } -CLEANUP: - return res; -#endif -} /* end s_mp_add_d() */ - -/* }}} */ - -/* {{{ s_mp_sub_d(mp, d) */ - -/* Subtract d from |mp| in place, assumes |mp| > d */ -mp_err s_mp_sub_d(mp_int *mp, mp_digit d) /* unsigned digit subtract */ -{ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD) - mp_word w, b = 0; - mp_size ix = 1; - - /* Compute initial subtraction */ - w = (RADIX + (mp_word)DIGIT(mp, 0)) - d; - b = CARRYOUT(w) ? 0 : 1; - DIGIT(mp, 0) = ACCUM(w); - - /* Propagate borrows leftward */ - while(b && ix < USED(mp)) { - w = (RADIX + (mp_word)DIGIT(mp, ix)) - b; - b = CARRYOUT(w) ? 0 : 1; - DIGIT(mp, ix) = ACCUM(w); - ++ix; - } - - /* Remove leading zeroes */ - s_mp_clamp(mp); - - /* If we have a borrow out, it's a violation of the input invariant */ - if(b) - return MP_RANGE; - else - return MP_OKAY; -#else - mp_digit *pmp = MP_DIGITS(mp); - mp_digit mp_i, diff, borrow; - mp_size used = MP_USED(mp); - - mp_i = *pmp; - *pmp++ = diff = mp_i - d; - borrow = (diff > mp_i); - while (borrow && --used) { - mp_i = *pmp; - *pmp++ = diff = mp_i - borrow; - borrow = (diff > mp_i); - } - s_mp_clamp(mp); - return (borrow && !used) ? MP_RANGE : MP_OKAY; -#endif -} /* end s_mp_sub_d() */ - -/* }}} */ - -/* {{{ s_mp_mul_d(a, d) */ - -/* Compute a = a * d, single digit multiplication */ -mp_err s_mp_mul_d(mp_int *a, mp_digit d) -{ - mp_err res; - mp_size used; - int pow; - - if (!d) { - mp_zero(a); - return MP_OKAY; - } - if (d == 1) - return MP_OKAY; - if (0 <= (pow = s_mp_ispow2d(d))) { - return s_mp_mul_2d(a, (mp_digit)pow); - } - - used = MP_USED(a); - MP_CHECKOK( s_mp_pad(a, used + 1) ); - - s_mpv_mul_d(MP_DIGITS(a), used, d, MP_DIGITS(a)); - - s_mp_clamp(a); - -CLEANUP: - return res; - -} /* end s_mp_mul_d() */ - -/* }}} */ - -/* {{{ s_mp_div_d(mp, d, r) */ - -/* - s_mp_div_d(mp, d, r) - - Compute the quotient mp = mp / d and remainder r = mp mod d, for a - single digit d. If r is null, the remainder will be discarded. - */ - -mp_err s_mp_div_d(mp_int *mp, mp_digit d, mp_digit *r) -{ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_DIV_WORD) - mp_word w = 0, q; -#else - mp_digit w = 0, q; -#endif - int ix; - mp_err res; - mp_int quot; - mp_int rem; - - if(d == 0) - return MP_RANGE; - if (d == 1) { - if (r) - *r = 0; - return MP_OKAY; - } - /* could check for power of 2 here, but mp_div_d does that. */ - if (MP_USED(mp) == 1) { - mp_digit n = MP_DIGIT(mp,0); - mp_digit rem; - - q = n / d; - rem = n % d; - MP_DIGIT(mp,0) = q; - if (r) - *r = rem; - return MP_OKAY; - } - - MP_DIGITS(&rem) = 0; - MP_DIGITS(") = 0; - /* Make room for the quotient */ - MP_CHECKOK( mp_init_size(", USED(mp), FLAG(mp)) ); - -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_DIV_WORD) - for(ix = USED(mp) - 1; ix >= 0; ix--) { - w = (w << DIGIT_BIT) | DIGIT(mp, ix); - - if(w >= d) { - q = w / d; - w = w % d; - } else { - q = 0; - } - - s_mp_lshd(", 1); - DIGIT(", 0) = (mp_digit)q; - } -#else - { - mp_digit p; -#if !defined(MP_ASSEMBLY_DIV_2DX1D) - mp_digit norm; -#endif - - MP_CHECKOK( mp_init_copy(&rem, mp) ); - -#if !defined(MP_ASSEMBLY_DIV_2DX1D) - MP_DIGIT(", 0) = d; - MP_CHECKOK( s_mp_norm(&rem, ", &norm) ); - if (norm) - d <<= norm; - MP_DIGIT(", 0) = 0; -#endif - - p = 0; - for (ix = USED(&rem) - 1; ix >= 0; ix--) { - w = DIGIT(&rem, ix); - - if (p) { - MP_CHECKOK( s_mpv_div_2dx1d(p, w, d, &q, &w) ); - } else if (w >= d) { - q = w / d; - w = w % d; - } else { - q = 0; - } - - MP_CHECKOK( s_mp_lshd(", 1) ); - DIGIT(", 0) = q; - p = w; - } -#if !defined(MP_ASSEMBLY_DIV_2DX1D) - if (norm) - w >>= norm; -#endif - } -#endif - - /* Deliver the remainder, if desired */ - if(r) - *r = (mp_digit)w; - - s_mp_clamp("); - mp_exch(", mp); -CLEANUP: - mp_clear("); - mp_clear(&rem); - - return res; -} /* end s_mp_div_d() */ - -/* }}} */ - - -/* }}} */ - -/* {{{ Primitive full arithmetic */ - -/* {{{ s_mp_add(a, b) */ - -/* Compute a = |a| + |b| */ -mp_err s_mp_add(mp_int *a, const mp_int *b) /* magnitude addition */ -{ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) - mp_word w = 0; -#else - mp_digit d, sum, carry = 0; -#endif - mp_digit *pa, *pb; - mp_size ix; - mp_size used; - mp_err res; - - /* Make sure a has enough precision for the output value */ - if((USED(b) > USED(a)) && (res = s_mp_pad(a, USED(b))) != MP_OKAY) - return res; - - /* - Add up all digits up to the precision of b. If b had initially - the same precision as a, or greater, we took care of it by the - padding step above, so there is no problem. If b had initially - less precision, we'll have to make sure the carry out is duly - propagated upward among the higher-order digits of the sum. - */ - pa = MP_DIGITS(a); - pb = MP_DIGITS(b); - used = MP_USED(b); - for(ix = 0; ix < used; ix++) { -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) - w = w + *pa + *pb++; - *pa++ = ACCUM(w); - w = CARRYOUT(w); -#else - d = *pa; - sum = d + *pb++; - d = (sum < d); /* detect overflow */ - *pa++ = sum += carry; - carry = d + (sum < carry); /* detect overflow */ -#endif - } - - /* If we run out of 'b' digits before we're actually done, make - sure the carries get propagated upward... - */ - used = MP_USED(a); -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) - while (w && ix < used) { - w = w + *pa; - *pa++ = ACCUM(w); - w = CARRYOUT(w); - ++ix; - } -#else - while (carry && ix < used) { - sum = carry + *pa; - *pa++ = sum; - carry = !sum; - ++ix; - } -#endif - - /* If there's an overall carry out, increase precision and include - it. We could have done this initially, but why touch the memory - allocator unless we're sure we have to? - */ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) - if (w) { - if((res = s_mp_pad(a, used + 1)) != MP_OKAY) - return res; - - DIGIT(a, ix) = (mp_digit)w; - } -#else - if (carry) { - if((res = s_mp_pad(a, used + 1)) != MP_OKAY) - return res; - - DIGIT(a, used) = carry; - } -#endif - - return MP_OKAY; -} /* end s_mp_add() */ - -/* }}} */ - -/* Compute c = |a| + |b| */ /* magnitude addition */ -mp_err s_mp_add_3arg(const mp_int *a, const mp_int *b, mp_int *c) -{ - mp_digit *pa, *pb, *pc; -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) - mp_word w = 0; -#else - mp_digit sum, carry = 0, d; -#endif - mp_size ix; - mp_size used; - mp_err res; - - MP_SIGN(c) = MP_SIGN(a); - if (MP_USED(a) < MP_USED(b)) { - const mp_int *xch = a; - a = b; - b = xch; - } - - /* Make sure a has enough precision for the output value */ - if (MP_OKAY != (res = s_mp_pad(c, MP_USED(a)))) - return res; - - /* - Add up all digits up to the precision of b. If b had initially - the same precision as a, or greater, we took care of it by the - exchange step above, so there is no problem. If b had initially - less precision, we'll have to make sure the carry out is duly - propagated upward among the higher-order digits of the sum. - */ - pa = MP_DIGITS(a); - pb = MP_DIGITS(b); - pc = MP_DIGITS(c); - used = MP_USED(b); - for (ix = 0; ix < used; ix++) { -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) - w = w + *pa++ + *pb++; - *pc++ = ACCUM(w); - w = CARRYOUT(w); -#else - d = *pa++; - sum = d + *pb++; - d = (sum < d); /* detect overflow */ - *pc++ = sum += carry; - carry = d + (sum < carry); /* detect overflow */ -#endif - } - - /* If we run out of 'b' digits before we're actually done, make - sure the carries get propagated upward... - */ - for (used = MP_USED(a); ix < used; ++ix) { -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) - w = w + *pa++; - *pc++ = ACCUM(w); - w = CARRYOUT(w); -#else - *pc++ = sum = carry + *pa++; - carry = (sum < carry); -#endif - } - - /* If there's an overall carry out, increase precision and include - it. We could have done this initially, but why touch the memory - allocator unless we're sure we have to? - */ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) - if (w) { - if((res = s_mp_pad(c, used + 1)) != MP_OKAY) - return res; - - DIGIT(c, used) = (mp_digit)w; - ++used; - } -#else - if (carry) { - if((res = s_mp_pad(c, used + 1)) != MP_OKAY) - return res; - - DIGIT(c, used) = carry; - ++used; - } -#endif - MP_USED(c) = used; - return MP_OKAY; -} -/* {{{ s_mp_add_offset(a, b, offset) */ - -/* Compute a = |a| + ( |b| * (RADIX ** offset) ) */ -mp_err s_mp_add_offset(mp_int *a, mp_int *b, mp_size offset) -{ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) - mp_word w, k = 0; -#else - mp_digit d, sum, carry = 0; -#endif - mp_size ib; - mp_size ia; - mp_size lim; - mp_err res; - - /* Make sure a has enough precision for the output value */ - lim = MP_USED(b) + offset; - if((lim > USED(a)) && (res = s_mp_pad(a, lim)) != MP_OKAY) - return res; - - /* - Add up all digits up to the precision of b. If b had initially - the same precision as a, or greater, we took care of it by the - padding step above, so there is no problem. If b had initially - less precision, we'll have to make sure the carry out is duly - propagated upward among the higher-order digits of the sum. - */ - lim = USED(b); - for(ib = 0, ia = offset; ib < lim; ib++, ia++) { -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) - w = (mp_word)DIGIT(a, ia) + DIGIT(b, ib) + k; - DIGIT(a, ia) = ACCUM(w); - k = CARRYOUT(w); -#else - d = MP_DIGIT(a, ia); - sum = d + MP_DIGIT(b, ib); - d = (sum < d); - MP_DIGIT(a,ia) = sum += carry; - carry = d + (sum < carry); -#endif - } - - /* If we run out of 'b' digits before we're actually done, make - sure the carries get propagated upward... - */ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) - for (lim = MP_USED(a); k && (ia < lim); ++ia) { - w = (mp_word)DIGIT(a, ia) + k; - DIGIT(a, ia) = ACCUM(w); - k = CARRYOUT(w); - } -#else - for (lim = MP_USED(a); carry && (ia < lim); ++ia) { - d = MP_DIGIT(a, ia); - MP_DIGIT(a,ia) = sum = d + carry; - carry = (sum < d); - } -#endif - - /* If there's an overall carry out, increase precision and include - it. We could have done this initially, but why touch the memory - allocator unless we're sure we have to? - */ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_ADD_WORD) - if(k) { - if((res = s_mp_pad(a, USED(a) + 1)) != MP_OKAY) - return res; - - DIGIT(a, ia) = (mp_digit)k; - } -#else - if (carry) { - if((res = s_mp_pad(a, lim + 1)) != MP_OKAY) - return res; - - DIGIT(a, lim) = carry; - } -#endif - s_mp_clamp(a); - - return MP_OKAY; - -} /* end s_mp_add_offset() */ - -/* }}} */ - -/* {{{ s_mp_sub(a, b) */ - -/* Compute a = |a| - |b|, assumes |a| >= |b| */ -mp_err s_mp_sub(mp_int *a, const mp_int *b) /* magnitude subtract */ -{ - mp_digit *pa, *pb, *limit; -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD) - mp_sword w = 0; -#else - mp_digit d, diff, borrow = 0; -#endif - - /* - Subtract and propagate borrow. Up to the precision of b, this - accounts for the digits of b; after that, we just make sure the - carries get to the right place. This saves having to pad b out to - the precision of a just to make the loops work right... - */ - pa = MP_DIGITS(a); - pb = MP_DIGITS(b); - limit = pb + MP_USED(b); - while (pb < limit) { -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD) - w = w + *pa - *pb++; - *pa++ = ACCUM(w); - w >>= MP_DIGIT_BIT; -#else - d = *pa; - diff = d - *pb++; - d = (diff > d); /* detect borrow */ - if (borrow && --diff == MP_DIGIT_MAX) - ++d; - *pa++ = diff; - borrow = d; -#endif - } - limit = MP_DIGITS(a) + MP_USED(a); -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD) - while (w && pa < limit) { - w = w + *pa; - *pa++ = ACCUM(w); - w >>= MP_DIGIT_BIT; - } -#else - while (borrow && pa < limit) { - d = *pa; - *pa++ = diff = d - borrow; - borrow = (diff > d); - } -#endif - - /* Clobber any leading zeroes we created */ - s_mp_clamp(a); - - /* - If there was a borrow out, then |b| > |a| in violation - of our input invariant. We've already done the work, - but we'll at least complain about it... - */ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD) - return w ? MP_RANGE : MP_OKAY; -#else - return borrow ? MP_RANGE : MP_OKAY; -#endif -} /* end s_mp_sub() */ - -/* }}} */ - -/* Compute c = |a| - |b|, assumes |a| >= |b| */ /* magnitude subtract */ -mp_err s_mp_sub_3arg(const mp_int *a, const mp_int *b, mp_int *c) -{ - mp_digit *pa, *pb, *pc; -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD) - mp_sword w = 0; -#else - mp_digit d, diff, borrow = 0; -#endif - int ix, limit; - mp_err res; - - MP_SIGN(c) = MP_SIGN(a); - - /* Make sure a has enough precision for the output value */ - if (MP_OKAY != (res = s_mp_pad(c, MP_USED(a)))) - return res; - - /* - Subtract and propagate borrow. Up to the precision of b, this - accounts for the digits of b; after that, we just make sure the - carries get to the right place. This saves having to pad b out to - the precision of a just to make the loops work right... - */ - pa = MP_DIGITS(a); - pb = MP_DIGITS(b); - pc = MP_DIGITS(c); - limit = MP_USED(b); - for (ix = 0; ix < limit; ++ix) { -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD) - w = w + *pa++ - *pb++; - *pc++ = ACCUM(w); - w >>= MP_DIGIT_BIT; -#else - d = *pa++; - diff = d - *pb++; - d = (diff > d); - if (borrow && --diff == MP_DIGIT_MAX) - ++d; - *pc++ = diff; - borrow = d; -#endif - } - for (limit = MP_USED(a); ix < limit; ++ix) { -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD) - w = w + *pa++; - *pc++ = ACCUM(w); - w >>= MP_DIGIT_BIT; -#else - d = *pa++; - *pc++ = diff = d - borrow; - borrow = (diff > d); -#endif - } - - /* Clobber any leading zeroes we created */ - MP_USED(c) = ix; - s_mp_clamp(c); - - /* - If there was a borrow out, then |b| > |a| in violation - of our input invariant. We've already done the work, - but we'll at least complain about it... - */ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_SUB_WORD) - return w ? MP_RANGE : MP_OKAY; -#else - return borrow ? MP_RANGE : MP_OKAY; -#endif -} -/* {{{ s_mp_mul(a, b) */ - -/* Compute a = |a| * |b| */ -mp_err s_mp_mul(mp_int *a, const mp_int *b) -{ - return mp_mul(a, b, a); -} /* end s_mp_mul() */ - -/* }}} */ - -#if defined(MP_USE_UINT_DIGIT) && defined(MP_USE_LONG_LONG_MULTIPLY) -/* This trick works on Sparc V8 CPUs with the Workshop compilers. */ -#define MP_MUL_DxD(a, b, Phi, Plo) \ - { unsigned long long product = (unsigned long long)a * b; \ - Plo = (mp_digit)product; \ - Phi = (mp_digit)(product >> MP_DIGIT_BIT); } -#elif defined(OSF1) -#define MP_MUL_DxD(a, b, Phi, Plo) \ - { Plo = asm ("mulq %a0, %a1, %v0", a, b);\ - Phi = asm ("umulh %a0, %a1, %v0", a, b); } -#else -#define MP_MUL_DxD(a, b, Phi, Plo) \ - { mp_digit a0b1, a1b0; \ - Plo = (a & MP_HALF_DIGIT_MAX) * (b & MP_HALF_DIGIT_MAX); \ - Phi = (a >> MP_HALF_DIGIT_BIT) * (b >> MP_HALF_DIGIT_BIT); \ - a0b1 = (a & MP_HALF_DIGIT_MAX) * (b >> MP_HALF_DIGIT_BIT); \ - a1b0 = (a >> MP_HALF_DIGIT_BIT) * (b & MP_HALF_DIGIT_MAX); \ - a1b0 += a0b1; \ - Phi += a1b0 >> MP_HALF_DIGIT_BIT; \ - if (a1b0 < a0b1) \ - Phi += MP_HALF_RADIX; \ - a1b0 <<= MP_HALF_DIGIT_BIT; \ - Plo += a1b0; \ - if (Plo < a1b0) \ - ++Phi; \ - } -#endif - -#if !defined(MP_ASSEMBLY_MULTIPLY) -/* c = a * b */ -void s_mpv_mul_d(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c) -{ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD) - mp_digit d = 0; - - /* Inner product: Digits of a */ - while (a_len--) { - mp_word w = ((mp_word)b * *a++) + d; - *c++ = ACCUM(w); - d = CARRYOUT(w); - } - *c = d; -#else - mp_digit carry = 0; - while (a_len--) { - mp_digit a_i = *a++; - mp_digit a0b0, a1b1; - - MP_MUL_DxD(a_i, b, a1b1, a0b0); - - a0b0 += carry; - if (a0b0 < carry) - ++a1b1; - *c++ = a0b0; - carry = a1b1; - } - *c = carry; -#endif -} - -/* c += a * b */ -void s_mpv_mul_d_add(const mp_digit *a, mp_size a_len, mp_digit b, - mp_digit *c) -{ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD) - mp_digit d = 0; - - /* Inner product: Digits of a */ - while (a_len--) { - mp_word w = ((mp_word)b * *a++) + *c + d; - *c++ = ACCUM(w); - d = CARRYOUT(w); - } - *c = d; -#else - mp_digit carry = 0; - while (a_len--) { - mp_digit a_i = *a++; - mp_digit a0b0, a1b1; - - MP_MUL_DxD(a_i, b, a1b1, a0b0); - - a0b0 += carry; - if (a0b0 < carry) - ++a1b1; - a0b0 += a_i = *c; - if (a0b0 < a_i) - ++a1b1; - *c++ = a0b0; - carry = a1b1; - } - *c = carry; -#endif -} - -/* Presently, this is only used by the Montgomery arithmetic code. */ -/* c += a * b */ -void s_mpv_mul_d_add_prop(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *c) -{ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD) - mp_digit d = 0; - - /* Inner product: Digits of a */ - while (a_len--) { - mp_word w = ((mp_word)b * *a++) + *c + d; - *c++ = ACCUM(w); - d = CARRYOUT(w); - } - - while (d) { - mp_word w = (mp_word)*c + d; - *c++ = ACCUM(w); - d = CARRYOUT(w); - } -#else - mp_digit carry = 0; - while (a_len--) { - mp_digit a_i = *a++; - mp_digit a0b0, a1b1; - - MP_MUL_DxD(a_i, b, a1b1, a0b0); - - a0b0 += carry; - if (a0b0 < carry) - ++a1b1; - - a0b0 += a_i = *c; - if (a0b0 < a_i) - ++a1b1; - - *c++ = a0b0; - carry = a1b1; - } - while (carry) { - mp_digit c_i = *c; - carry += c_i; - *c++ = carry; - carry = carry < c_i; - } -#endif -} -#endif - -#if defined(MP_USE_UINT_DIGIT) && defined(MP_USE_LONG_LONG_MULTIPLY) -/* This trick works on Sparc V8 CPUs with the Workshop compilers. */ -#define MP_SQR_D(a, Phi, Plo) \ - { unsigned long long square = (unsigned long long)a * a; \ - Plo = (mp_digit)square; \ - Phi = (mp_digit)(square >> MP_DIGIT_BIT); } -#elif defined(OSF1) -#define MP_SQR_D(a, Phi, Plo) \ - { Plo = asm ("mulq %a0, %a0, %v0", a);\ - Phi = asm ("umulh %a0, %a0, %v0", a); } -#else -#define MP_SQR_D(a, Phi, Plo) \ - { mp_digit Pmid; \ - Plo = (a & MP_HALF_DIGIT_MAX) * (a & MP_HALF_DIGIT_MAX); \ - Phi = (a >> MP_HALF_DIGIT_BIT) * (a >> MP_HALF_DIGIT_BIT); \ - Pmid = (a & MP_HALF_DIGIT_MAX) * (a >> MP_HALF_DIGIT_BIT); \ - Phi += Pmid >> (MP_HALF_DIGIT_BIT - 1); \ - Pmid <<= (MP_HALF_DIGIT_BIT + 1); \ - Plo += Pmid; \ - if (Plo < Pmid) \ - ++Phi; \ - } -#endif - -#if !defined(MP_ASSEMBLY_SQUARE) -/* Add the squares of the digits of a to the digits of b. */ -void s_mpv_sqr_add_prop(const mp_digit *pa, mp_size a_len, mp_digit *ps) -{ -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD) - mp_word w; - mp_digit d; - mp_size ix; - - w = 0; -#define ADD_SQUARE(n) \ - d = pa[n]; \ - w += (d * (mp_word)d) + ps[2*n]; \ - ps[2*n] = ACCUM(w); \ - w = (w >> DIGIT_BIT) + ps[2*n+1]; \ - ps[2*n+1] = ACCUM(w); \ - w = (w >> DIGIT_BIT) - - for (ix = a_len; ix >= 4; ix -= 4) { - ADD_SQUARE(0); - ADD_SQUARE(1); - ADD_SQUARE(2); - ADD_SQUARE(3); - pa += 4; - ps += 8; - } - if (ix) { - ps += 2*ix; - pa += ix; - switch (ix) { - case 3: ADD_SQUARE(-3); /* FALLTHRU */ - case 2: ADD_SQUARE(-2); /* FALLTHRU */ - case 1: ADD_SQUARE(-1); /* FALLTHRU */ - case 0: break; - } - } - while (w) { - w += *ps; - *ps++ = ACCUM(w); - w = (w >> DIGIT_BIT); - } -#else - mp_digit carry = 0; - while (a_len--) { - mp_digit a_i = *pa++; - mp_digit a0a0, a1a1; - - MP_SQR_D(a_i, a1a1, a0a0); - - /* here a1a1 and a0a0 constitute a_i ** 2 */ - a0a0 += carry; - if (a0a0 < carry) - ++a1a1; - - /* now add to ps */ - a0a0 += a_i = *ps; - if (a0a0 < a_i) - ++a1a1; - *ps++ = a0a0; - a1a1 += a_i = *ps; - carry = (a1a1 < a_i); - *ps++ = a1a1; - } - while (carry) { - mp_digit s_i = *ps; - carry += s_i; - *ps++ = carry; - carry = carry < s_i; - } -#endif -} -#endif - -#if (defined(MP_NO_MP_WORD) || defined(MP_NO_DIV_WORD)) \ -&& !defined(MP_ASSEMBLY_DIV_2DX1D) -/* -** Divide 64-bit (Nhi,Nlo) by 32-bit divisor, which must be normalized -** so its high bit is 1. This code is from NSPR. -*/ -mp_err s_mpv_div_2dx1d(mp_digit Nhi, mp_digit Nlo, mp_digit divisor, - mp_digit *qp, mp_digit *rp) -{ - mp_digit d1, d0, q1, q0; - mp_digit r1, r0, m; - - d1 = divisor >> MP_HALF_DIGIT_BIT; - d0 = divisor & MP_HALF_DIGIT_MAX; - r1 = Nhi % d1; - q1 = Nhi / d1; - m = q1 * d0; - r1 = (r1 << MP_HALF_DIGIT_BIT) | (Nlo >> MP_HALF_DIGIT_BIT); - if (r1 < m) { - q1--, r1 += divisor; - if (r1 >= divisor && r1 < m) { - q1--, r1 += divisor; - } - } - r1 -= m; - r0 = r1 % d1; - q0 = r1 / d1; - m = q0 * d0; - r0 = (r0 << MP_HALF_DIGIT_BIT) | (Nlo & MP_HALF_DIGIT_MAX); - if (r0 < m) { - q0--, r0 += divisor; - if (r0 >= divisor && r0 < m) { - q0--, r0 += divisor; - } - } - if (qp) - *qp = (q1 << MP_HALF_DIGIT_BIT) | q0; - if (rp) - *rp = r0 - m; - return MP_OKAY; -} -#endif - -#if MP_SQUARE -/* {{{ s_mp_sqr(a) */ - -mp_err s_mp_sqr(mp_int *a) -{ - mp_err res; - mp_int tmp; - tmp.flag = (mp_sign)0; - - if((res = mp_init_size(&tmp, 2 * USED(a), FLAG(a))) != MP_OKAY) - return res; - res = mp_sqr(a, &tmp); - if (res == MP_OKAY) { - s_mp_exch(&tmp, a); - } - mp_clear(&tmp); - return res; -} - -/* }}} */ -#endif - -/* {{{ s_mp_div(a, b) */ - -/* - s_mp_div(a, b) - - Compute a = a / b and b = a mod b. Assumes b > a. - */ - -mp_err s_mp_div(mp_int *rem, /* i: dividend, o: remainder */ - mp_int *div, /* i: divisor */ - mp_int *quot) /* i: 0; o: quotient */ -{ - mp_int part, t; -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_DIV_WORD) - mp_word q_msd; -#else - mp_digit q_msd; -#endif - mp_err res; - mp_digit d; - mp_digit div_msd; - int ix; - - t.dp = (mp_digit *)NULL; - - if(mp_cmp_z(div) == 0) - return MP_RANGE; - - /* Shortcut if divisor is power of two */ - if((ix = s_mp_ispow2(div)) >= 0) { - MP_CHECKOK( mp_copy(rem, quot) ); - s_mp_div_2d(quot, (mp_digit)ix); - s_mp_mod_2d(rem, (mp_digit)ix); - - return MP_OKAY; - } - - DIGITS(&t) = 0; - MP_SIGN(rem) = ZPOS; - MP_SIGN(div) = ZPOS; - - /* A working temporary for division */ - MP_CHECKOK( mp_init_size(&t, MP_ALLOC(rem), FLAG(rem))); - - /* Normalize to optimize guessing */ - MP_CHECKOK( s_mp_norm(rem, div, &d) ); - - part = *rem; - - /* Perform the division itself...woo! */ - MP_USED(quot) = MP_ALLOC(quot); - - /* Find a partial substring of rem which is at least div */ - /* If we didn't find one, we're finished dividing */ - while (MP_USED(rem) > MP_USED(div) || s_mp_cmp(rem, div) >= 0) { - int i; - int unusedRem; - - unusedRem = MP_USED(rem) - MP_USED(div); - MP_DIGITS(&part) = MP_DIGITS(rem) + unusedRem; - MP_ALLOC(&part) = MP_ALLOC(rem) - unusedRem; - MP_USED(&part) = MP_USED(div); - if (s_mp_cmp(&part, div) < 0) { - -- unusedRem; -#if MP_ARGCHK == 2 - assert(unusedRem >= 0); -#endif - -- MP_DIGITS(&part); - ++ MP_USED(&part); - ++ MP_ALLOC(&part); - } - - /* Compute a guess for the next quotient digit */ - q_msd = MP_DIGIT(&part, MP_USED(&part) - 1); - div_msd = MP_DIGIT(div, MP_USED(div) - 1); - if (q_msd >= div_msd) { - q_msd = 1; - } else if (MP_USED(&part) > 1) { -#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_DIV_WORD) - q_msd = (q_msd << MP_DIGIT_BIT) | MP_DIGIT(&part, MP_USED(&part) - 2); - q_msd /= div_msd; - if (q_msd == RADIX) - --q_msd; -#else - mp_digit r; - MP_CHECKOK( s_mpv_div_2dx1d(q_msd, MP_DIGIT(&part, MP_USED(&part) - 2), - div_msd, &q_msd, &r) ); -#endif - } else { - q_msd = 0; - } -#if MP_ARGCHK == 2 - assert(q_msd > 0); /* This case should never occur any more. */ -#endif - if (q_msd <= 0) - break; - - /* See what that multiplies out to */ - mp_copy(div, &t); - MP_CHECKOK( s_mp_mul_d(&t, (mp_digit)q_msd) ); - - /* - If it's too big, back it off. We should not have to do this - more than once, or, in rare cases, twice. Knuth describes a - method by which this could be reduced to a maximum of once, but - I didn't implement that here. - * When using s_mpv_div_2dx1d, we may have to do this 3 times. - */ - for (i = 4; s_mp_cmp(&t, &part) > 0 && i > 0; --i) { - --q_msd; - s_mp_sub(&t, div); /* t -= div */ - } - if (i < 0) { - res = MP_RANGE; - goto CLEANUP; - } - - /* At this point, q_msd should be the right next digit */ - MP_CHECKOK( s_mp_sub(&part, &t) ); /* part -= t */ - s_mp_clamp(rem); - - /* - Include the digit in the quotient. We allocated enough memory - for any quotient we could ever possibly get, so we should not - have to check for failures here - */ - MP_DIGIT(quot, unusedRem) = (mp_digit)q_msd; - } - - /* Denormalize remainder */ - if (d) { - s_mp_div_2d(rem, d); - } - - s_mp_clamp(quot); - -CLEANUP: - mp_clear(&t); - - return res; - -} /* end s_mp_div() */ - - -/* }}} */ - -/* {{{ s_mp_2expt(a, k) */ - -mp_err s_mp_2expt(mp_int *a, mp_digit k) -{ - mp_err res; - mp_size dig, bit; - - dig = k / DIGIT_BIT; - bit = k % DIGIT_BIT; - - mp_zero(a); - if((res = s_mp_pad(a, dig + 1)) != MP_OKAY) - return res; - - DIGIT(a, dig) |= ((mp_digit)1 << bit); - - return MP_OKAY; - -} /* end s_mp_2expt() */ - -/* }}} */ - -/* {{{ s_mp_reduce(x, m, mu) */ - -/* - Compute Barrett reduction, x (mod m), given a precomputed value for - mu = b^2k / m, where b = RADIX and k = #digits(m). This should be - faster than straight division, when many reductions by the same - value of m are required (such as in modular exponentiation). This - can nearly halve the time required to do modular exponentiation, - as compared to using the full integer divide to reduce. - - This algorithm was derived from the _Handbook of Applied - Cryptography_ by Menezes, Oorschot and VanStone, Ch. 14, - pp. 603-604. - */ - -mp_err s_mp_reduce(mp_int *x, const mp_int *m, const mp_int *mu) -{ - mp_int q; - mp_err res; - - if((res = mp_init_copy(&q, x)) != MP_OKAY) - return res; - - s_mp_rshd(&q, USED(m) - 1); /* q1 = x / b^(k-1) */ - s_mp_mul(&q, mu); /* q2 = q1 * mu */ - s_mp_rshd(&q, USED(m) + 1); /* q3 = q2 / b^(k+1) */ - - /* x = x mod b^(k+1), quick (no division) */ - s_mp_mod_2d(x, DIGIT_BIT * (USED(m) + 1)); - - /* q = q * m mod b^(k+1), quick (no division) */ - s_mp_mul(&q, m); - s_mp_mod_2d(&q, DIGIT_BIT * (USED(m) + 1)); - - /* x = x - q */ - if((res = mp_sub(x, &q, x)) != MP_OKAY) - goto CLEANUP; - - /* If x < 0, add b^(k+1) to it */ - if(mp_cmp_z(x) < 0) { - mp_set(&q, 1); - if((res = s_mp_lshd(&q, USED(m) + 1)) != MP_OKAY) - goto CLEANUP; - if((res = mp_add(x, &q, x)) != MP_OKAY) - goto CLEANUP; - } - - /* Back off if it's too big */ - while(mp_cmp(x, m) >= 0) { - if((res = s_mp_sub(x, m)) != MP_OKAY) - break; - } - - CLEANUP: - mp_clear(&q); - - return res; - -} /* end s_mp_reduce() */ - -/* }}} */ - -/* }}} */ - -/* {{{ Primitive comparisons */ - -/* {{{ s_mp_cmp(a, b) */ - -/* Compare |a| <=> |b|, return 0 if equal, <0 if a<b, >0 if a>b */ -int s_mp_cmp(const mp_int *a, const mp_int *b) -{ - mp_size used_a = MP_USED(a); - { - mp_size used_b = MP_USED(b); - - if (used_a > used_b) - goto IS_GT; - if (used_a < used_b) - goto IS_LT; - } - { - mp_digit *pa, *pb; - mp_digit da = 0, db = 0; - -#define CMP_AB(n) if ((da = pa[n]) != (db = pb[n])) goto done - - pa = MP_DIGITS(a) + used_a; - pb = MP_DIGITS(b) + used_a; - while (used_a >= 4) { - pa -= 4; - pb -= 4; - used_a -= 4; - CMP_AB(3); - CMP_AB(2); - CMP_AB(1); - CMP_AB(0); - } - while (used_a-- > 0 && ((da = *--pa) == (db = *--pb))) - /* do nothing */; -done: - if (da > db) - goto IS_GT; - if (da < db) - goto IS_LT; - } - return MP_EQ; -IS_LT: - return MP_LT; -IS_GT: - return MP_GT; -} /* end s_mp_cmp() */ - -/* }}} */ - -/* {{{ s_mp_cmp_d(a, d) */ - -/* Compare |a| <=> d, return 0 if equal, <0 if a<d, >0 if a>d */ -int s_mp_cmp_d(const mp_int *a, mp_digit d) -{ - if(USED(a) > 1) - return MP_GT; - - if(DIGIT(a, 0) < d) - return MP_LT; - else if(DIGIT(a, 0) > d) - return MP_GT; - else - return MP_EQ; - -} /* end s_mp_cmp_d() */ - -/* }}} */ - -/* {{{ s_mp_ispow2(v) */ - -/* - Returns -1 if the value is not a power of two; otherwise, it returns - k such that v = 2^k, i.e. lg(v). - */ -int s_mp_ispow2(const mp_int *v) -{ - mp_digit d; - int extra = 0, ix; - - ix = MP_USED(v) - 1; - d = MP_DIGIT(v, ix); /* most significant digit of v */ - - extra = s_mp_ispow2d(d); - if (extra < 0 || ix == 0) - return extra; - - while (--ix >= 0) { - if (DIGIT(v, ix) != 0) - return -1; /* not a power of two */ - extra += MP_DIGIT_BIT; - } - - return extra; - -} /* end s_mp_ispow2() */ - -/* }}} */ - -/* {{{ s_mp_ispow2d(d) */ - -int s_mp_ispow2d(mp_digit d) -{ - if ((d != 0) && ((d & (d-1)) == 0)) { /* d is a power of 2 */ - int pow = 0; -#if defined (MP_USE_UINT_DIGIT) - if (d & 0xffff0000U) - pow += 16; - if (d & 0xff00ff00U) - pow += 8; - if (d & 0xf0f0f0f0U) - pow += 4; - if (d & 0xccccccccU) - pow += 2; - if (d & 0xaaaaaaaaU) - pow += 1; -#elif defined(MP_USE_LONG_LONG_DIGIT) - if (d & 0xffffffff00000000ULL) - pow += 32; - if (d & 0xffff0000ffff0000ULL) - pow += 16; - if (d & 0xff00ff00ff00ff00ULL) - pow += 8; - if (d & 0xf0f0f0f0f0f0f0f0ULL) - pow += 4; - if (d & 0xccccccccccccccccULL) - pow += 2; - if (d & 0xaaaaaaaaaaaaaaaaULL) - pow += 1; -#elif defined(MP_USE_LONG_DIGIT) - if (d & 0xffffffff00000000UL) - pow += 32; - if (d & 0xffff0000ffff0000UL) - pow += 16; - if (d & 0xff00ff00ff00ff00UL) - pow += 8; - if (d & 0xf0f0f0f0f0f0f0f0UL) - pow += 4; - if (d & 0xccccccccccccccccUL) - pow += 2; - if (d & 0xaaaaaaaaaaaaaaaaUL) - pow += 1; -#else -#error "unknown type for mp_digit" -#endif - return pow; - } - return -1; - -} /* end s_mp_ispow2d() */ - -/* }}} */ - -/* }}} */ - -/* {{{ Primitive I/O helpers */ - -/* {{{ s_mp_tovalue(ch, r) */ - -/* - Convert the given character to its digit value, in the given radix. - If the given character is not understood in the given radix, -1 is - returned. Otherwise the digit's numeric value is returned. - - The results will be odd if you use a radix < 2 or > 62, you are - expected to know what you're up to. - */ -int s_mp_tovalue(char ch, int r) -{ - int val, xch; - - if(r > 36) - xch = ch; - else - xch = toupper(ch); - - if(isdigit(xch)) - val = xch - '0'; - else if(isupper(xch)) - val = xch - 'A' + 10; - else if(islower(xch)) - val = xch - 'a' + 36; - else if(xch == '+') - val = 62; - else if(xch == '/') - val = 63; - else - return -1; - - if(val < 0 || val >= r) - return -1; - - return val; - -} /* end s_mp_tovalue() */ - -/* }}} */ - -/* {{{ s_mp_todigit(val, r, low) */ - -/* - Convert val to a radix-r digit, if possible. If val is out of range - for r, returns zero. Otherwise, returns an ASCII character denoting - the value in the given radix. - - The results may be odd if you use a radix < 2 or > 64, you are - expected to know what you're doing. - */ - -char s_mp_todigit(mp_digit val, int r, int low) -{ - char ch; - - if(val >= (unsigned int)r) - return 0; - - ch = s_dmap_1[val]; - - if(r <= 36 && low) - ch = tolower(ch); - - return ch; - -} /* end s_mp_todigit() */ - -/* }}} */ - -/* {{{ s_mp_outlen(bits, radix) */ - -/* - Return an estimate for how long a string is needed to hold a radix - r representation of a number with 'bits' significant bits, plus an - extra for a zero terminator (assuming C style strings here) - */ -int s_mp_outlen(int bits, int r) -{ - return (int)((double)bits * LOG_V_2(r) + 1.5) + 1; - -} /* end s_mp_outlen() */ - -/* }}} */ - -/* }}} */ - -/* {{{ mp_read_unsigned_octets(mp, str, len) */ -/* mp_read_unsigned_octets(mp, str, len) - Read in a raw value (base 256) into the given mp_int - No sign bit, number is positive. Leading zeros ignored. - */ - -mp_err -mp_read_unsigned_octets(mp_int *mp, const unsigned char *str, mp_size len) -{ - int count; - mp_err res; - mp_digit d; - - ARGCHK(mp != NULL && str != NULL && len > 0, MP_BADARG); - - mp_zero(mp); - - count = len % sizeof(mp_digit); - if (count) { - for (d = 0; count-- > 0; --len) { - d = (d << 8) | *str++; - } - MP_DIGIT(mp, 0) = d; - } - - /* Read the rest of the digits */ - for(; len > 0; len -= sizeof(mp_digit)) { - for (d = 0, count = sizeof(mp_digit); count > 0; --count) { - d = (d << 8) | *str++; - } - if (MP_EQ == mp_cmp_z(mp)) { - if (!d) - continue; - } else { - if((res = s_mp_lshd(mp, 1)) != MP_OKAY) - return res; - } - MP_DIGIT(mp, 0) = d; - } - return MP_OKAY; -} /* end mp_read_unsigned_octets() */ -/* }}} */ - -/* {{{ mp_unsigned_octet_size(mp) */ -int -mp_unsigned_octet_size(const mp_int *mp) -{ - int bytes; - int ix; - mp_digit d = 0; - - ARGCHK(mp != NULL, MP_BADARG); - ARGCHK(MP_ZPOS == SIGN(mp), MP_BADARG); - - bytes = (USED(mp) * sizeof(mp_digit)); - - /* subtract leading zeros. */ - /* Iterate over each digit... */ - for(ix = USED(mp) - 1; ix >= 0; ix--) { - d = DIGIT(mp, ix); - if (d) - break; - bytes -= sizeof(d); - } - if (!bytes) - return 1; - - /* Have MSD, check digit bytes, high order first */ - for(ix = sizeof(mp_digit) - 1; ix >= 0; ix--) { - unsigned char x = (unsigned char)(d >> (ix * CHAR_BIT)); - if (x) - break; - --bytes; - } - return bytes; -} /* end mp_unsigned_octet_size() */ -/* }}} */ - -/* {{{ mp_to_unsigned_octets(mp, str) */ -/* output a buffer of big endian octets no longer than specified. */ -mp_err -mp_to_unsigned_octets(const mp_int *mp, unsigned char *str, mp_size maxlen) -{ - int ix, pos = 0; - unsigned int bytes; - - ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG); - - bytes = mp_unsigned_octet_size(mp); - ARGCHK(bytes <= maxlen, MP_BADARG); - - /* Iterate over each digit... */ - for(ix = USED(mp) - 1; ix >= 0; ix--) { - mp_digit d = DIGIT(mp, ix); - int jx; - - /* Unpack digit bytes, high order first */ - for(jx = sizeof(mp_digit) - 1; jx >= 0; jx--) { - unsigned char x = (unsigned char)(d >> (jx * CHAR_BIT)); - if (!pos && !x) /* suppress leading zeros */ - continue; - str[pos++] = x; - } - } - if (!pos) - str[pos++] = 0; - return pos; -} /* end mp_to_unsigned_octets() */ -/* }}} */ - -/* {{{ mp_to_signed_octets(mp, str) */ -/* output a buffer of big endian octets no longer than specified. */ -mp_err -mp_to_signed_octets(const mp_int *mp, unsigned char *str, mp_size maxlen) -{ - int ix, pos = 0; - unsigned int bytes; - - ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG); - - bytes = mp_unsigned_octet_size(mp); - ARGCHK(bytes <= maxlen, MP_BADARG); - - /* Iterate over each digit... */ - for(ix = USED(mp) - 1; ix >= 0; ix--) { - mp_digit d = DIGIT(mp, ix); - int jx; - - /* Unpack digit bytes, high order first */ - for(jx = sizeof(mp_digit) - 1; jx >= 0; jx--) { - unsigned char x = (unsigned char)(d >> (jx * CHAR_BIT)); - if (!pos) { - if (!x) /* suppress leading zeros */ - continue; - if (x & 0x80) { /* add one leading zero to make output positive. */ - ARGCHK(bytes + 1 <= maxlen, MP_BADARG); - if (bytes + 1 > maxlen) - return MP_BADARG; - str[pos++] = 0; - } - } - str[pos++] = x; - } - } - if (!pos) - str[pos++] = 0; - return pos; -} /* end mp_to_signed_octets() */ -/* }}} */ - -/* {{{ mp_to_fixlen_octets(mp, str) */ -/* output a buffer of big endian octets exactly as long as requested. */ -mp_err -mp_to_fixlen_octets(const mp_int *mp, unsigned char *str, mp_size length) -{ - int ix, pos = 0; - unsigned int bytes; - - ARGCHK(mp != NULL && str != NULL && !SIGN(mp), MP_BADARG); - - bytes = mp_unsigned_octet_size(mp); - ARGCHK(bytes <= length, MP_BADARG); - - /* place any needed leading zeros */ - for (;length > bytes; --length) { - *str++ = 0; - } - - /* Iterate over each digit... */ - for(ix = USED(mp) - 1; ix >= 0; ix--) { - mp_digit d = DIGIT(mp, ix); - int jx; - - /* Unpack digit bytes, high order first */ - for(jx = sizeof(mp_digit) - 1; jx >= 0; jx--) { - unsigned char x = (unsigned char)(d >> (jx * CHAR_BIT)); - if (!pos && !x) /* suppress leading zeros */ - continue; - str[pos++] = x; - } - } - if (!pos) - str[pos++] = 0; - return MP_OKAY; -} /* end mp_to_fixlen_octets() */ -/* }}} */ - - -/*------------------------------------------------------------------------*/ -/* HERE THERE BE DRAGONS */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/mpi.h b/src/jdk.crypto.ec/share/native/libsunec/impl/mpi.h deleted file mode 100644 index 4a8eb2c5c03..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/mpi.h +++ /dev/null @@ -1,387 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library. - * - * The Initial Developer of the Original Code is - * Michael J. Fromberger. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Netscape Communications Corporation - * - *********************************************************************** */ - -/* Arbitrary precision integer arithmetic library */ - -#ifndef _MPI_H -#define _MPI_H - -/* $Id: mpi.h,v 1.22 2004/04/27 23:04:36 gerv%gerv.net Exp $ */ - -#include "mpi-config.h" - -#ifndef _WIN32 -#include <sys/param.h> -#endif /* _WIN32 */ - -#ifdef _KERNEL -#include <sys/debug.h> -#include <sys/systm.h> -#define assert ASSERT -#define labs(a) (a >= 0 ? a : -a) -#define UCHAR_MAX 255 -#define memset(s, c, n) bzero(s, n) -#define memcpy(a,b,c) bcopy((caddr_t)b, (caddr_t)a, c) -/* - * Generic #define's to cover missing things in the kernel - */ -#ifndef isdigit -#define isdigit(x) ((x) >= '0' && (x) <= '9') -#endif -#ifndef isupper -#define isupper(x) (((unsigned)(x) >= 'A') && ((unsigned)(x) <= 'Z')) -#endif -#ifndef islower -#define islower(x) (((unsigned)(x) >= 'a') && ((unsigned)(x) <= 'z')) -#endif -#ifndef isalpha -#define isalpha(x) (isupper(x) || islower(x)) -#endif -#ifndef toupper -#define toupper(x) (islower(x) ? (x) - 'a' + 'A' : (x)) -#endif -#ifndef tolower -#define tolower(x) (isupper(x) ? (x) + 'a' - 'A' : (x)) -#endif -#ifndef isspace -#define isspace(x) (((x) == ' ') || ((x) == '\r') || ((x) == '\n') || \ - ((x) == '\t') || ((x) == '\b')) -#endif -#endif /* _KERNEL */ - -#if MP_DEBUG -#undef MP_IOFUNC -#define MP_IOFUNC 1 -#endif - -#if MP_IOFUNC -#include <stdio.h> -#include <ctype.h> -#endif - -#ifndef _KERNEL -#include <limits.h> -#endif - -#if defined(BSDI) -#undef ULLONG_MAX -#endif - -#if defined( macintosh ) -#include <Types.h> -#elif defined( _WIN32_WCE) -/* #include <sys/types.h> What do we need here ?? */ -#else -#include <sys/types.h> -#endif - -#define MP_NEG 1 -#define MP_ZPOS 0 - -#define MP_OKAY 0 /* no error, all is well */ -#define MP_YES 0 /* yes (boolean result) */ -#define MP_NO -1 /* no (boolean result) */ -#define MP_MEM -2 /* out of memory */ -#define MP_RANGE -3 /* argument out of range */ -#define MP_BADARG -4 /* invalid parameter */ -#define MP_UNDEF -5 /* answer is undefined */ -#define MP_LAST_CODE MP_UNDEF - -typedef unsigned int mp_sign; -typedef unsigned int mp_size; -typedef int mp_err; -typedef int mp_flag; - -#define MP_32BIT_MAX 4294967295U - -#if !defined(ULONG_MAX) -#error "ULONG_MAX not defined" -#elif !defined(UINT_MAX) -#error "UINT_MAX not defined" -#elif !defined(USHRT_MAX) -#error "USHRT_MAX not defined" -#endif - -#if defined(ULONG_LONG_MAX) /* GCC, HPUX */ -#define MP_ULONG_LONG_MAX ULONG_LONG_MAX -#elif defined(ULLONG_MAX) /* Solaris */ -#define MP_ULONG_LONG_MAX ULLONG_MAX -/* MP_ULONG_LONG_MAX was defined to be ULLONG_MAX */ -#elif defined(ULONGLONG_MAX) /* IRIX, AIX */ -#define MP_ULONG_LONG_MAX ULONGLONG_MAX -#endif - -/* We only use unsigned long for mp_digit iff long is more than 32 bits. */ -#if !defined(MP_USE_UINT_DIGIT) && ULONG_MAX > MP_32BIT_MAX -typedef unsigned long mp_digit; -#define MP_DIGIT_MAX ULONG_MAX -#define MP_DIGIT_FMT "%016lX" /* printf() format for 1 digit */ -#define MP_HALF_DIGIT_MAX UINT_MAX -#undef MP_NO_MP_WORD -#define MP_NO_MP_WORD 1 -#undef MP_USE_LONG_DIGIT -#define MP_USE_LONG_DIGIT 1 -#undef MP_USE_LONG_LONG_DIGIT - -#elif !defined(MP_USE_UINT_DIGIT) && defined(MP_ULONG_LONG_MAX) -typedef unsigned long long mp_digit; -#define MP_DIGIT_MAX MP_ULONG_LONG_MAX -#define MP_DIGIT_FMT "%016llX" /* printf() format for 1 digit */ -#define MP_HALF_DIGIT_MAX UINT_MAX -#undef MP_NO_MP_WORD -#define MP_NO_MP_WORD 1 -#undef MP_USE_LONG_LONG_DIGIT -#define MP_USE_LONG_LONG_DIGIT 1 -#undef MP_USE_LONG_DIGIT - -#else -typedef unsigned int mp_digit; -#define MP_DIGIT_MAX UINT_MAX -#define MP_DIGIT_FMT "%08X" /* printf() format for 1 digit */ -#define MP_HALF_DIGIT_MAX USHRT_MAX -#undef MP_USE_UINT_DIGIT -#define MP_USE_UINT_DIGIT 1 -#undef MP_USE_LONG_LONG_DIGIT -#undef MP_USE_LONG_DIGIT -#endif - -#if !defined(MP_NO_MP_WORD) -#if defined(MP_USE_UINT_DIGIT) && \ - (defined(MP_ULONG_LONG_MAX) || (ULONG_MAX > UINT_MAX)) - -#if (ULONG_MAX > UINT_MAX) -typedef unsigned long mp_word; -typedef long mp_sword; -#define MP_WORD_MAX ULONG_MAX - -#else -typedef unsigned long long mp_word; -typedef long long mp_sword; -#define MP_WORD_MAX MP_ULONG_LONG_MAX -#endif - -#else -#define MP_NO_MP_WORD 1 -#endif -#endif /* !defined(MP_NO_MP_WORD) */ - -#if !defined(MP_WORD_MAX) && defined(MP_DEFINE_SMALL_WORD) -typedef unsigned int mp_word; -typedef int mp_sword; -#define MP_WORD_MAX UINT_MAX -#endif - -#ifndef CHAR_BIT -#define CHAR_BIT 8 -#endif - -#define MP_DIGIT_BIT (CHAR_BIT*sizeof(mp_digit)) -#define MP_WORD_BIT (CHAR_BIT*sizeof(mp_word)) -#define MP_RADIX (1+(mp_word)MP_DIGIT_MAX) - -#define MP_HALF_DIGIT_BIT (MP_DIGIT_BIT/2) -#define MP_HALF_RADIX (1+(mp_digit)MP_HALF_DIGIT_MAX) -/* MP_HALF_RADIX really ought to be called MP_SQRT_RADIX, but it's named -** MP_HALF_RADIX because it's the radix for MP_HALF_DIGITs, and it's -** consistent with the other _HALF_ names. -*/ - - -/* Macros for accessing the mp_int internals */ -#define MP_FLAG(MP) ((MP)->flag) -#define MP_SIGN(MP) ((MP)->sign) -#define MP_USED(MP) ((MP)->used) -#define MP_ALLOC(MP) ((MP)->alloc) -#define MP_DIGITS(MP) ((MP)->dp) -#define MP_DIGIT(MP,N) (MP)->dp[(N)] - -/* This defines the maximum I/O base (minimum is 2) */ -#define MP_MAX_RADIX 64 - -typedef struct { - mp_sign flag; /* KM_SLEEP/KM_NOSLEEP */ - mp_sign sign; /* sign of this quantity */ - mp_size alloc; /* how many digits allocated */ - mp_size used; /* how many digits used */ - mp_digit *dp; /* the digits themselves */ -} mp_int; - -/* Default precision */ -mp_size mp_get_prec(void); -void mp_set_prec(mp_size prec); - -/* Memory management */ -mp_err mp_init(mp_int *mp, int kmflag); -mp_err mp_init_size(mp_int *mp, mp_size prec, int kmflag); -mp_err mp_init_copy(mp_int *mp, const mp_int *from); -mp_err mp_copy(const mp_int *from, mp_int *to); -void mp_exch(mp_int *mp1, mp_int *mp2); -void mp_clear(mp_int *mp); -void mp_zero(mp_int *mp); -void mp_set(mp_int *mp, mp_digit d); -mp_err mp_set_int(mp_int *mp, long z); -#define mp_set_long(mp,z) mp_set_int(mp,z) -mp_err mp_set_ulong(mp_int *mp, unsigned long z); - -/* Single digit arithmetic */ -mp_err mp_add_d(const mp_int *a, mp_digit d, mp_int *b); -mp_err mp_sub_d(const mp_int *a, mp_digit d, mp_int *b); -mp_err mp_mul_d(const mp_int *a, mp_digit d, mp_int *b); -mp_err mp_mul_2(const mp_int *a, mp_int *c); -mp_err mp_div_d(const mp_int *a, mp_digit d, mp_int *q, mp_digit *r); -mp_err mp_div_2(const mp_int *a, mp_int *c); -mp_err mp_expt_d(const mp_int *a, mp_digit d, mp_int *c); - -/* Sign manipulations */ -mp_err mp_abs(const mp_int *a, mp_int *b); -mp_err mp_neg(const mp_int *a, mp_int *b); - -/* Full arithmetic */ -mp_err mp_add(const mp_int *a, const mp_int *b, mp_int *c); -mp_err mp_sub(const mp_int *a, const mp_int *b, mp_int *c); -mp_err mp_mul(const mp_int *a, const mp_int *b, mp_int *c); -#if MP_SQUARE -mp_err mp_sqr(const mp_int *a, mp_int *b); -#else -#define mp_sqr(a, b) mp_mul(a, a, b) -#endif -mp_err mp_div(const mp_int *a, const mp_int *b, mp_int *q, mp_int *r); -mp_err mp_div_2d(const mp_int *a, mp_digit d, mp_int *q, mp_int *r); -mp_err mp_expt(mp_int *a, mp_int *b, mp_int *c); -mp_err mp_2expt(mp_int *a, mp_digit k); -mp_err mp_sqrt(const mp_int *a, mp_int *b); - -/* Modular arithmetic */ -#if MP_MODARITH -mp_err mp_mod(const mp_int *a, const mp_int *m, mp_int *c); -mp_err mp_mod_d(const mp_int *a, mp_digit d, mp_digit *c); -mp_err mp_addmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c); -mp_err mp_submod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c); -mp_err mp_mulmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c); -#if MP_SQUARE -mp_err mp_sqrmod(const mp_int *a, const mp_int *m, mp_int *c); -#else -#define mp_sqrmod(a, m, c) mp_mulmod(a, a, m, c) -#endif -mp_err mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *m, mp_int *c); -mp_err mp_exptmod_d(const mp_int *a, mp_digit d, const mp_int *m, mp_int *c); -#endif /* MP_MODARITH */ - -/* Comparisons */ -int mp_cmp_z(const mp_int *a); -int mp_cmp_d(const mp_int *a, mp_digit d); -int mp_cmp(const mp_int *a, const mp_int *b); -int mp_cmp_mag(mp_int *a, mp_int *b); -int mp_cmp_int(const mp_int *a, long z, int kmflag); -int mp_isodd(const mp_int *a); -int mp_iseven(const mp_int *a); - -/* Number theoretic */ -#if MP_NUMTH -mp_err mp_gcd(mp_int *a, mp_int *b, mp_int *c); -mp_err mp_lcm(mp_int *a, mp_int *b, mp_int *c); -mp_err mp_xgcd(const mp_int *a, const mp_int *b, mp_int *g, mp_int *x, mp_int *y); -mp_err mp_invmod(const mp_int *a, const mp_int *m, mp_int *c); -mp_err mp_invmod_xgcd(const mp_int *a, const mp_int *m, mp_int *c); -#endif /* end MP_NUMTH */ - -/* Input and output */ -#if MP_IOFUNC -void mp_print(mp_int *mp, FILE *ofp); -#endif /* end MP_IOFUNC */ - -/* Base conversion */ -mp_err mp_read_raw(mp_int *mp, char *str, int len); -int mp_raw_size(mp_int *mp); -mp_err mp_toraw(mp_int *mp, char *str); -mp_err mp_read_radix(mp_int *mp, const char *str, int radix); -mp_err mp_read_variable_radix(mp_int *a, const char * str, int default_radix); -int mp_radix_size(mp_int *mp, int radix); -mp_err mp_toradix(mp_int *mp, char *str, int radix); -int mp_tovalue(char ch, int r); - -#define mp_tobinary(M, S) mp_toradix((M), (S), 2) -#define mp_tooctal(M, S) mp_toradix((M), (S), 8) -#define mp_todecimal(M, S) mp_toradix((M), (S), 10) -#define mp_tohex(M, S) mp_toradix((M), (S), 16) - -/* Error strings */ -const char *mp_strerror(mp_err ec); - -/* Octet string conversion functions */ -mp_err mp_read_unsigned_octets(mp_int *mp, const unsigned char *str, mp_size len); -int mp_unsigned_octet_size(const mp_int *mp); -mp_err mp_to_unsigned_octets(const mp_int *mp, unsigned char *str, mp_size maxlen); -mp_err mp_to_signed_octets(const mp_int *mp, unsigned char *str, mp_size maxlen); -mp_err mp_to_fixlen_octets(const mp_int *mp, unsigned char *str, mp_size len); - -/* Miscellaneous */ -mp_size mp_trailing_zeros(const mp_int *mp); - -#define MP_CHECKOK(x) if (MP_OKAY > (res = (x))) goto CLEANUP -#define MP_CHECKERR(x) if (MP_OKAY > (res = (x))) goto CLEANUP - -#if defined(MP_API_COMPATIBLE) -#define NEG MP_NEG -#define ZPOS MP_ZPOS -#define DIGIT_MAX MP_DIGIT_MAX -#define DIGIT_BIT MP_DIGIT_BIT -#define DIGIT_FMT MP_DIGIT_FMT -#define RADIX MP_RADIX -#define MAX_RADIX MP_MAX_RADIX -#define FLAG(MP) MP_FLAG(MP) -#define SIGN(MP) MP_SIGN(MP) -#define USED(MP) MP_USED(MP) -#define ALLOC(MP) MP_ALLOC(MP) -#define DIGITS(MP) MP_DIGITS(MP) -#define DIGIT(MP,N) MP_DIGIT(MP,N) - -#if MP_ARGCHK == 1 -#define ARGCHK(X,Y) {if(!(X)){return (Y);}} -#elif MP_ARGCHK == 2 -#ifdef _KERNEL -#define ARGCHK(X,Y) ASSERT(X) -#else -#include <assert.h> -#define ARGCHK(X,Y) assert(X) -#endif -#else -#define ARGCHK(X,Y) /* */ -#endif -#endif /* defined MP_API_COMPATIBLE */ - -#endif /* _MPI_H */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/mplogic.c b/src/jdk.crypto.ec/share/native/libsunec/impl/mplogic.c deleted file mode 100644 index ba4408633c3..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/mplogic.c +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library. - * - * The Initial Developer of the Original Code is - * Michael J. Fromberger. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - *********************************************************************** */ - -/* Bitwise logical operations on MPI values */ - -#include "mpi-priv.h" -#include "mplogic.h" - -/* {{{ Lookup table for population count */ - -static unsigned char bitc[] = { - 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 -}; - -/* }}} */ - -/* - mpl_rsh(a, b, d) - b = a >> d - mpl_lsh(a, b, d) - b = a << d - */ - -/* {{{ mpl_rsh(a, b, d) */ - -mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d) -{ - mp_err res; - - ARGCHK(a != NULL && b != NULL, MP_BADARG); - - if((res = mp_copy(a, b)) != MP_OKAY) - return res; - - s_mp_div_2d(b, d); - - return MP_OKAY; - -} /* end mpl_rsh() */ - -/* }}} */ - -/* {{{ mpl_lsh(a, b, d) */ - -mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d) -{ - mp_err res; - - ARGCHK(a != NULL && b != NULL, MP_BADARG); - - if((res = mp_copy(a, b)) != MP_OKAY) - return res; - - return s_mp_mul_2d(b, d); - -} /* end mpl_lsh() */ - -/* }}} */ - -/*------------------------------------------------------------------------*/ -/* - mpl_set_bit - - Returns MP_OKAY or some error code. - Grows a if needed to set a bit to 1. - */ -mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value) -{ - mp_size ix; - mp_err rv; - mp_digit mask; - - ARGCHK(a != NULL, MP_BADARG); - - ix = bitNum / MP_DIGIT_BIT; - if (ix + 1 > MP_USED(a)) { - rv = s_mp_pad(a, ix + 1); - if (rv != MP_OKAY) - return rv; - } - - bitNum = bitNum % MP_DIGIT_BIT; - mask = (mp_digit)1 << bitNum; - if (value) - MP_DIGIT(a,ix) |= mask; - else - MP_DIGIT(a,ix) &= ~mask; - s_mp_clamp(a); - return MP_OKAY; -} - -/* - mpl_get_bit - - returns 0 or 1 or some (negative) error code. - */ -mp_err mpl_get_bit(const mp_int *a, mp_size bitNum) -{ - mp_size bit, ix; - mp_err rv; - - ARGCHK(a != NULL, MP_BADARG); - - ix = bitNum / MP_DIGIT_BIT; - ARGCHK(ix <= MP_USED(a) - 1, MP_RANGE); - - bit = bitNum % MP_DIGIT_BIT; - rv = (mp_err)(MP_DIGIT(a, ix) >> bit) & 1; - return rv; -} - -/* - mpl_get_bits - - Extracts numBits bits from a, where the least significant extracted bit - is bit lsbNum. Returns a negative value if error occurs. - - Because sign bit is used to indicate error, maximum number of bits to - be returned is the lesser of (a) the number of bits in an mp_digit, or - (b) one less than the number of bits in an mp_err. - - lsbNum + numbits can be greater than the number of significant bits in - integer a, as long as bit lsbNum is in the high order digit of a. - */ -mp_err mpl_get_bits(const mp_int *a, mp_size lsbNum, mp_size numBits) -{ - mp_size rshift = (lsbNum % MP_DIGIT_BIT); - mp_size lsWndx = (lsbNum / MP_DIGIT_BIT); - mp_digit * digit = MP_DIGITS(a) + lsWndx; - mp_digit mask = ((1 << numBits) - 1); - - ARGCHK(numBits < CHAR_BIT * sizeof mask, MP_BADARG); - ARGCHK(MP_HOWMANY(lsbNum, MP_DIGIT_BIT) <= MP_USED(a), MP_RANGE); - - if ((numBits + lsbNum % MP_DIGIT_BIT <= MP_DIGIT_BIT) || - (lsWndx + 1 >= MP_USED(a))) { - mask &= (digit[0] >> rshift); - } else { - mask &= ((digit[0] >> rshift) | (digit[1] << (MP_DIGIT_BIT - rshift))); - } - return (mp_err)mask; -} - -/* - mpl_significant_bits - returns number of significnant bits in abs(a). - returns 1 if value is zero. - */ -mp_err mpl_significant_bits(const mp_int *a) -{ - mp_err bits = 0; - int ix; - - ARGCHK(a != NULL, MP_BADARG); - - ix = MP_USED(a); - for (ix = MP_USED(a); ix > 0; ) { - mp_digit d; - d = MP_DIGIT(a, --ix); - if (d) { - while (d) { - ++bits; - d >>= 1; - } - break; - } - } - bits += ix * MP_DIGIT_BIT; - if (!bits) - bits = 1; - return bits; -} - -/*------------------------------------------------------------------------*/ -/* HERE THERE BE DRAGONS */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/mplogic.h b/src/jdk.crypto.ec/share/native/libsunec/impl/mplogic.h deleted file mode 100644 index fda4f32d649..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/mplogic.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library. - * - * The Initial Developer of the Original Code is - * Michael J. Fromberger. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - *********************************************************************** */ - -/* Bitwise logical operations on MPI values */ - -#ifndef _MPLOGIC_H -#define _MPLOGIC_H - -/* $Id: mplogic.h,v 1.7 2004/04/27 23:04:36 gerv%gerv.net Exp $ */ - -#include "mpi.h" - -/* - The logical operations treat an mp_int as if it were a bit vector, - without regard to its sign (an mp_int is represented in a signed - magnitude format). Values are treated as if they had an infinite - string of zeros left of the most-significant bit. - */ - -/* Parity results */ - -#define MP_EVEN MP_YES -#define MP_ODD MP_NO - -/* Bitwise functions */ - -mp_err mpl_not(mp_int *a, mp_int *b); /* one's complement */ -mp_err mpl_and(mp_int *a, mp_int *b, mp_int *c); /* bitwise AND */ -mp_err mpl_or(mp_int *a, mp_int *b, mp_int *c); /* bitwise OR */ -mp_err mpl_xor(mp_int *a, mp_int *b, mp_int *c); /* bitwise XOR */ - -/* Shift functions */ - -mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d); /* right shift */ -mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d); /* left shift */ - -/* Bit count and parity */ - -mp_err mpl_num_set(mp_int *a, int *num); /* count set bits */ -mp_err mpl_num_clear(mp_int *a, int *num); /* count clear bits */ -mp_err mpl_parity(mp_int *a); /* determine parity */ - -/* Get & Set the value of a bit */ - -mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value); -mp_err mpl_get_bit(const mp_int *a, mp_size bitNum); -mp_err mpl_get_bits(const mp_int *a, mp_size lsbNum, mp_size numBits); -mp_err mpl_significant_bits(const mp_int *a); - -#endif /* _MPLOGIC_H */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/mpmontg.c b/src/jdk.crypto.ec/share/native/libsunec/impl/mpmontg.c deleted file mode 100644 index 4c848a39276..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/mpmontg.c +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Sheueling Chang Shantz <sheueling.chang@sun.com>, - * Stephen Fung <stephen.fung@sun.com>, and - * Douglas Stebila <douglas@stebila.ca> of Sun Laboratories. - * - *********************************************************************** */ - -/* This file implements moduluar exponentiation using Montgomery's - * method for modular reduction. This file implements the method - * described as "Improvement 1" in the paper "A Cryptogrpahic Library for - * the Motorola DSP56000" by Stephen R. Dusse' and Burton S. Kaliski Jr. - * published in "Advances in Cryptology: Proceedings of EUROCRYPT '90" - * "Lecture Notes in Computer Science" volume 473, 1991, pg 230-244, - * published by Springer Verlag. - */ - -#define MP_USING_CACHE_SAFE_MOD_EXP 1 -#ifndef _KERNEL -#include <string.h> -#include <stddef.h> /* ptrdiff_t */ -#endif -#include "mpi-priv.h" -#include "mplogic.h" -#include "mpprime.h" -#ifdef MP_USING_MONT_MULF -#include "montmulf.h" -#endif - -/* if MP_CHAR_STORE_SLOW is defined, we */ -/* need to know endianness of this platform. */ -#ifdef MP_CHAR_STORE_SLOW -#if !defined(MP_IS_BIG_ENDIAN) && !defined(MP_IS_LITTLE_ENDIAN) -#error "You must define MP_IS_BIG_ENDIAN or MP_IS_LITTLE_ENDIAN\n" \ - " if you define MP_CHAR_STORE_SLOW." -#endif -#endif - -#ifndef STATIC -#define STATIC -#endif - -#define MAX_ODD_INTS 32 /* 2 ** (WINDOW_BITS - 1) */ - -#ifndef _KERNEL -#if defined(_WIN32_WCE) -#define ABORT res = MP_UNDEF; goto CLEANUP -#else -#define ABORT abort() -#endif -#else -#define ABORT res = MP_UNDEF; goto CLEANUP -#endif /* _KERNEL */ - -/* computes T = REDC(T), 2^b == R */ -mp_err s_mp_redc(mp_int *T, mp_mont_modulus *mmm) -{ - mp_err res; - mp_size i; - - i = MP_USED(T) + MP_USED(&mmm->N) + 2; - MP_CHECKOK( s_mp_pad(T, i) ); - for (i = 0; i < MP_USED(&mmm->N); ++i ) { - mp_digit m_i = MP_DIGIT(T, i) * mmm->n0prime; - /* T += N * m_i * (MP_RADIX ** i); */ - MP_CHECKOK( s_mp_mul_d_add_offset(&mmm->N, m_i, T, i) ); - } - s_mp_clamp(T); - - /* T /= R */ - s_mp_div_2d(T, mmm->b); - - if ((res = s_mp_cmp(T, &mmm->N)) >= 0) { - /* T = T - N */ - MP_CHECKOK( s_mp_sub(T, &mmm->N) ); -#ifdef DEBUG - if ((res = mp_cmp(T, &mmm->N)) >= 0) { - res = MP_UNDEF; - goto CLEANUP; - } -#endif - } - res = MP_OKAY; -CLEANUP: - return res; -} - -#if !defined(MP_ASSEMBLY_MUL_MONT) && !defined(MP_MONT_USE_MP_MUL) -mp_err s_mp_mul_mont(const mp_int *a, const mp_int *b, mp_int *c, - mp_mont_modulus *mmm) -{ - mp_digit *pb; - mp_digit m_i; - mp_err res; - mp_size ib; - mp_size useda, usedb; - - ARGCHK(a != NULL && b != NULL && c != NULL, MP_BADARG); - - if (MP_USED(a) < MP_USED(b)) { - const mp_int *xch = b; /* switch a and b, to do fewer outer loops */ - b = a; - a = xch; - } - - MP_USED(c) = 1; MP_DIGIT(c, 0) = 0; - ib = MP_USED(a) + MP_MAX(MP_USED(b), MP_USED(&mmm->N)) + 2; - if((res = s_mp_pad(c, ib)) != MP_OKAY) - goto CLEANUP; - - useda = MP_USED(a); - pb = MP_DIGITS(b); - s_mpv_mul_d(MP_DIGITS(a), useda, *pb++, MP_DIGITS(c)); - s_mp_setz(MP_DIGITS(c) + useda + 1, ib - (useda + 1)); - m_i = MP_DIGIT(c, 0) * mmm->n0prime; - s_mp_mul_d_add_offset(&mmm->N, m_i, c, 0); - - /* Outer loop: Digits of b */ - usedb = MP_USED(b); - for (ib = 1; ib < usedb; ib++) { - mp_digit b_i = *pb++; - - /* Inner product: Digits of a */ - if (b_i) - s_mpv_mul_d_add_prop(MP_DIGITS(a), useda, b_i, MP_DIGITS(c) + ib); - m_i = MP_DIGIT(c, ib) * mmm->n0prime; - s_mp_mul_d_add_offset(&mmm->N, m_i, c, ib); - } - if (usedb < MP_USED(&mmm->N)) { - for (usedb = MP_USED(&mmm->N); ib < usedb; ++ib ) { - m_i = MP_DIGIT(c, ib) * mmm->n0prime; - s_mp_mul_d_add_offset(&mmm->N, m_i, c, ib); - } - } - s_mp_clamp(c); - s_mp_div_2d(c, mmm->b); - if (s_mp_cmp(c, &mmm->N) >= 0) { - MP_CHECKOK( s_mp_sub(c, &mmm->N) ); - } - res = MP_OKAY; - -CLEANUP: - return res; -} -#endif diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/mpprime.h b/src/jdk.crypto.ec/share/native/libsunec/impl/mpprime.h deleted file mode 100644 index d4cea948618..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/mpprime.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the MPI Arbitrary Precision Integer Arithmetic library. - * - * The Initial Developer of the Original Code is - * Michael J. Fromberger. - * Portions created by the Initial Developer are Copyright (C) 1997 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - *********************************************************************** */ - -/* Utilities for finding and working with prime and pseudo-prime integers */ - -#ifndef _MP_PRIME_H -#define _MP_PRIME_H - -#include "mpi.h" - -extern const int prime_tab_size; /* number of primes available */ -extern const mp_digit prime_tab[]; - -/* Tests for divisibility */ -mp_err mpp_divis(mp_int *a, mp_int *b); -mp_err mpp_divis_d(mp_int *a, mp_digit d); - -/* Random selection */ -mp_err mpp_random(mp_int *a); -mp_err mpp_random_size(mp_int *a, mp_size prec); - -/* Pseudo-primality testing */ -mp_err mpp_divis_vector(mp_int *a, const mp_digit *vec, int size, int *which); -mp_err mpp_divis_primes(mp_int *a, mp_digit *np); -mp_err mpp_fermat(mp_int *a, mp_digit w); -mp_err mpp_fermat_list(mp_int *a, const mp_digit *primes, mp_size nPrimes); -mp_err mpp_pprime(mp_int *a, int nt); -mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, mp_size nPrimes, - unsigned char *sieve, mp_size nSieve); -mp_err mpp_make_prime(mp_int *start, mp_size nBits, mp_size strong, - unsigned long * nTries); - -#endif /* _MP_PRIME_H */ diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/oid.c b/src/jdk.crypto.ec/share/native/libsunec/impl/oid.c deleted file mode 100644 index 3d899dcf1f7..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/oid.c +++ /dev/null @@ -1,538 +0,0 @@ -/* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1994-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories - * - * Last Modified Date from the Original Code: March 2012 - *********************************************************************** */ - -#include <sys/types.h> - -#ifndef _WIN32 -#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) -#include <sys/systm.h> -#endif /* __linux__ || _ALLBSD_SOURCE */ -#include <sys/param.h> -#endif /* _WIN32 */ - -#ifdef _KERNEL -#include <sys/kmem.h> -#else -#include <string.h> -#endif -#include "ec.h" -#include "ecl-curve.h" -#include "ecc_impl.h" -#include "secoidt.h" - -#define CERTICOM_OID 0x2b, 0x81, 0x04 -#define SECG_OID CERTICOM_OID, 0x00 - -#define ANSI_X962_OID 0x2a, 0x86, 0x48, 0xce, 0x3d -#define ANSI_X962_CURVE_OID ANSI_X962_OID, 0x03 -#define ANSI_X962_GF2m_OID ANSI_X962_CURVE_OID, 0x00 -#define ANSI_X962_GFp_OID ANSI_X962_CURVE_OID, 0x01 - -#define TELETRUST_ALGO_OID 0x2b, 0x24, 0x03 -#define ECC_BRAINPOOL TELETRUST_ALGO_OID, 0x03, 0x02, 0x08 -#define ECC_BRAINPOOL_EC_V1 ECC_BRAINPOOL, 0x01, 0x01 - -#define CONST_OID static const unsigned char - -/* ANSI X9.62 prime curve OIDs */ -/* NOTE: prime192v1 is the same as secp192r1, prime256v1 is the - * same as secp256r1 - */ -CONST_OID ansiX962prime192v1[] = { ANSI_X962_GFp_OID, 0x01 }; -CONST_OID ansiX962prime192v2[] = { ANSI_X962_GFp_OID, 0x02 }; -CONST_OID ansiX962prime192v3[] = { ANSI_X962_GFp_OID, 0x03 }; -CONST_OID ansiX962prime239v1[] = { ANSI_X962_GFp_OID, 0x04 }; -CONST_OID ansiX962prime239v2[] = { ANSI_X962_GFp_OID, 0x05 }; -CONST_OID ansiX962prime239v3[] = { ANSI_X962_GFp_OID, 0x06 }; -CONST_OID ansiX962prime256v1[] = { ANSI_X962_GFp_OID, 0x07 }; - -/* SECG prime curve OIDs */ -CONST_OID secgECsecp112r1[] = { SECG_OID, 0x06 }; -CONST_OID secgECsecp112r2[] = { SECG_OID, 0x07 }; -CONST_OID secgECsecp128r1[] = { SECG_OID, 0x1c }; -CONST_OID secgECsecp128r2[] = { SECG_OID, 0x1d }; -CONST_OID secgECsecp160k1[] = { SECG_OID, 0x09 }; -CONST_OID secgECsecp160r1[] = { SECG_OID, 0x08 }; -CONST_OID secgECsecp160r2[] = { SECG_OID, 0x1e }; -CONST_OID secgECsecp192k1[] = { SECG_OID, 0x1f }; -CONST_OID secgECsecp224k1[] = { SECG_OID, 0x20 }; -CONST_OID secgECsecp224r1[] = { SECG_OID, 0x21 }; -CONST_OID secgECsecp256k1[] = { SECG_OID, 0x0a }; -CONST_OID secgECsecp384r1[] = { SECG_OID, 0x22 }; -CONST_OID secgECsecp521r1[] = { SECG_OID, 0x23 }; - -/* SECG characterisitic two curve OIDs */ -CONST_OID secgECsect113r1[] = {SECG_OID, 0x04 }; -CONST_OID secgECsect113r2[] = {SECG_OID, 0x05 }; -CONST_OID secgECsect131r1[] = {SECG_OID, 0x16 }; -CONST_OID secgECsect131r2[] = {SECG_OID, 0x17 }; -CONST_OID secgECsect163k1[] = {SECG_OID, 0x01 }; -CONST_OID secgECsect163r1[] = {SECG_OID, 0x02 }; -CONST_OID secgECsect163r2[] = {SECG_OID, 0x0f }; -CONST_OID secgECsect193r1[] = {SECG_OID, 0x18 }; -CONST_OID secgECsect193r2[] = {SECG_OID, 0x19 }; -CONST_OID secgECsect233k1[] = {SECG_OID, 0x1a }; -CONST_OID secgECsect233r1[] = {SECG_OID, 0x1b }; -CONST_OID secgECsect239k1[] = {SECG_OID, 0x03 }; -CONST_OID secgECsect283k1[] = {SECG_OID, 0x10 }; -CONST_OID secgECsect283r1[] = {SECG_OID, 0x11 }; -CONST_OID secgECsect409k1[] = {SECG_OID, 0x24 }; -CONST_OID secgECsect409r1[] = {SECG_OID, 0x25 }; -CONST_OID secgECsect571k1[] = {SECG_OID, 0x26 }; -CONST_OID secgECsect571r1[] = {SECG_OID, 0x27 }; - -/* ANSI X9.62 characteristic two curve OIDs */ -CONST_OID ansiX962c2pnb163v1[] = { ANSI_X962_GF2m_OID, 0x01 }; -CONST_OID ansiX962c2pnb163v2[] = { ANSI_X962_GF2m_OID, 0x02 }; -CONST_OID ansiX962c2pnb163v3[] = { ANSI_X962_GF2m_OID, 0x03 }; -CONST_OID ansiX962c2pnb176v1[] = { ANSI_X962_GF2m_OID, 0x04 }; -CONST_OID ansiX962c2tnb191v1[] = { ANSI_X962_GF2m_OID, 0x05 }; -CONST_OID ansiX962c2tnb191v2[] = { ANSI_X962_GF2m_OID, 0x06 }; -CONST_OID ansiX962c2tnb191v3[] = { ANSI_X962_GF2m_OID, 0x07 }; -CONST_OID ansiX962c2onb191v4[] = { ANSI_X962_GF2m_OID, 0x08 }; -CONST_OID ansiX962c2onb191v5[] = { ANSI_X962_GF2m_OID, 0x09 }; -CONST_OID ansiX962c2pnb208w1[] = { ANSI_X962_GF2m_OID, 0x0a }; -CONST_OID ansiX962c2tnb239v1[] = { ANSI_X962_GF2m_OID, 0x0b }; -CONST_OID ansiX962c2tnb239v2[] = { ANSI_X962_GF2m_OID, 0x0c }; -CONST_OID ansiX962c2tnb239v3[] = { ANSI_X962_GF2m_OID, 0x0d }; -CONST_OID ansiX962c2onb239v4[] = { ANSI_X962_GF2m_OID, 0x0e }; -CONST_OID ansiX962c2onb239v5[] = { ANSI_X962_GF2m_OID, 0x0f }; -CONST_OID ansiX962c2pnb272w1[] = { ANSI_X962_GF2m_OID, 0x10 }; -CONST_OID ansiX962c2pnb304w1[] = { ANSI_X962_GF2m_OID, 0x11 }; -CONST_OID ansiX962c2tnb359v1[] = { ANSI_X962_GF2m_OID, 0x12 }; -CONST_OID ansiX962c2pnb368w1[] = { ANSI_X962_GF2m_OID, 0x13 }; -CONST_OID ansiX962c2tnb431r1[] = { ANSI_X962_GF2m_OID, 0x14 }; - -/* TeleTrusT ECC Brainpool prime curve OIDs */ -CONST_OID brainpoolP160r1[] = { ECC_BRAINPOOL_EC_V1, 0x01 }; -CONST_OID brainpoolP160t1[] = { ECC_BRAINPOOL_EC_V1, 0x02 }; -CONST_OID brainpoolP192r1[] = { ECC_BRAINPOOL_EC_V1, 0x03 }; -CONST_OID brainpoolP192t1[] = { ECC_BRAINPOOL_EC_V1, 0x04 }; -CONST_OID brainpoolP224r1[] = { ECC_BRAINPOOL_EC_V1, 0x05 }; -CONST_OID brainpoolP224t1[] = { ECC_BRAINPOOL_EC_V1, 0x06 }; -CONST_OID brainpoolP256r1[] = { ECC_BRAINPOOL_EC_V1, 0x07 }; -CONST_OID brainpoolP256t1[] = { ECC_BRAINPOOL_EC_V1, 0x08 }; -CONST_OID brainpoolP320r1[] = { ECC_BRAINPOOL_EC_V1, 0x09 }; -CONST_OID brainpoolP320t1[] = { ECC_BRAINPOOL_EC_V1, 0x0a }; -CONST_OID brainpoolP384r1[] = { ECC_BRAINPOOL_EC_V1, 0x0b }; -CONST_OID brainpoolP384t1[] = { ECC_BRAINPOOL_EC_V1, 0x0c }; -CONST_OID brainpoolP512r1[] = { ECC_BRAINPOOL_EC_V1, 0x0d }; -CONST_OID brainpoolP512t1[] = { ECC_BRAINPOOL_EC_V1, 0x0e }; - -#define OI(x) { siDEROID, (unsigned char *)x, sizeof x } -#ifndef SECOID_NO_STRINGS -#define OD(oid,tag,desc,mech,ext) { OI(oid), tag, desc, mech, ext } -#else -#define OD(oid,tag,desc,mech,ext) { OI(oid), tag, 0, mech, ext } -#endif - -#define CKM_INVALID_MECHANISM 0xffffffffUL - -/* XXX this is incorrect */ -#define INVALID_CERT_EXTENSION 1 - -#define CKM_ECDSA 0x00001041 -#define CKM_ECDSA_SHA1 0x00001042 -#define CKM_ECDH1_DERIVE 0x00001050 - -static SECOidData ANSI_prime_oids[] = { - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - - OD( ansiX962prime192v1, ECCurve_NIST_P192, - "ANSI X9.62 elliptic curve prime192v1 (aka secp192r1, NIST P-192)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962prime192v2, ECCurve_X9_62_PRIME_192V2, - "ANSI X9.62 elliptic curve prime192v2", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962prime192v3, ECCurve_X9_62_PRIME_192V3, - "ANSI X9.62 elliptic curve prime192v3", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962prime239v1, ECCurve_X9_62_PRIME_239V1, - "ANSI X9.62 elliptic curve prime239v1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962prime239v2, ECCurve_X9_62_PRIME_239V2, - "ANSI X9.62 elliptic curve prime239v2", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962prime239v3, ECCurve_X9_62_PRIME_239V3, - "ANSI X9.62 elliptic curve prime239v3", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962prime256v1, ECCurve_NIST_P256, - "ANSI X9.62 elliptic curve prime256v1 (aka secp256r1, NIST P-256)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ) -}; - -static SECOidData SECG_oids[] = { - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - - OD( secgECsect163k1, ECCurve_NIST_K163, - "SECG elliptic curve sect163k1 (aka NIST K-163)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect163r1, ECCurve_SECG_CHAR2_163R1, - "SECG elliptic curve sect163r1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect239k1, ECCurve_SECG_CHAR2_239K1, - "SECG elliptic curve sect239k1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect113r1, ECCurve_SECG_CHAR2_113R1, - "SECG elliptic curve sect113r1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect113r2, ECCurve_SECG_CHAR2_113R2, - "SECG elliptic curve sect113r2", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsecp112r1, ECCurve_SECG_PRIME_112R1, - "SECG elliptic curve secp112r1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsecp112r2, ECCurve_SECG_PRIME_112R2, - "SECG elliptic curve secp112r2", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsecp160r1, ECCurve_SECG_PRIME_160R1, - "SECG elliptic curve secp160r1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsecp160k1, ECCurve_SECG_PRIME_160K1, - "SECG elliptic curve secp160k1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsecp256k1, ECCurve_SECG_PRIME_256K1, - "SECG elliptic curve secp256k1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - OD( secgECsect163r2, ECCurve_NIST_B163, - "SECG elliptic curve sect163r2 (aka NIST B-163)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect283k1, ECCurve_NIST_K283, - "SECG elliptic curve sect283k1 (aka NIST K-283)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect283r1, ECCurve_NIST_B283, - "SECG elliptic curve sect283r1 (aka NIST B-283)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - OD( secgECsect131r1, ECCurve_SECG_CHAR2_131R1, - "SECG elliptic curve sect131r1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect131r2, ECCurve_SECG_CHAR2_131R2, - "SECG elliptic curve sect131r2", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect193r1, ECCurve_SECG_CHAR2_193R1, - "SECG elliptic curve sect193r1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect193r2, ECCurve_SECG_CHAR2_193R2, - "SECG elliptic curve sect193r2", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect233k1, ECCurve_NIST_K233, - "SECG elliptic curve sect233k1 (aka NIST K-233)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect233r1, ECCurve_NIST_B233, - "SECG elliptic curve sect233r1 (aka NIST B-233)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsecp128r1, ECCurve_SECG_PRIME_128R1, - "SECG elliptic curve secp128r1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsecp128r2, ECCurve_SECG_PRIME_128R2, - "SECG elliptic curve secp128r2", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsecp160r2, ECCurve_SECG_PRIME_160R2, - "SECG elliptic curve secp160r2", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsecp192k1, ECCurve_SECG_PRIME_192K1, - "SECG elliptic curve secp192k1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsecp224k1, ECCurve_SECG_PRIME_224K1, - "SECG elliptic curve secp224k1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsecp224r1, ECCurve_NIST_P224, - "SECG elliptic curve secp224r1 (aka NIST P-224)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsecp384r1, ECCurve_NIST_P384, - "SECG elliptic curve secp384r1 (aka NIST P-384)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsecp521r1, ECCurve_NIST_P521, - "SECG elliptic curve secp521r1 (aka NIST P-521)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect409k1, ECCurve_NIST_K409, - "SECG elliptic curve sect409k1 (aka NIST K-409)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect409r1, ECCurve_NIST_B409, - "SECG elliptic curve sect409r1 (aka NIST B-409)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect571k1, ECCurve_NIST_K571, - "SECG elliptic curve sect571k1 (aka NIST K-571)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( secgECsect571r1, ECCurve_NIST_B571, - "SECG elliptic curve sect571r1 (aka NIST B-571)", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ) -}; - -static SECOidData ANSI_oids[] = { - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - - /* ANSI X9.62 named elliptic curves (characteristic two field) */ - OD( ansiX962c2pnb163v1, ECCurve_X9_62_CHAR2_PNB163V1, - "ANSI X9.62 elliptic curve c2pnb163v1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962c2pnb163v2, ECCurve_X9_62_CHAR2_PNB163V2, - "ANSI X9.62 elliptic curve c2pnb163v2", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962c2pnb163v3, ECCurve_X9_62_CHAR2_PNB163V3, - "ANSI X9.62 elliptic curve c2pnb163v3", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962c2pnb176v1, ECCurve_X9_62_CHAR2_PNB176V1, - "ANSI X9.62 elliptic curve c2pnb176v1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962c2tnb191v1, ECCurve_X9_62_CHAR2_TNB191V1, - "ANSI X9.62 elliptic curve c2tnb191v1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962c2tnb191v2, ECCurve_X9_62_CHAR2_TNB191V2, - "ANSI X9.62 elliptic curve c2tnb191v2", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962c2tnb191v3, ECCurve_X9_62_CHAR2_TNB191V3, - "ANSI X9.62 elliptic curve c2tnb191v3", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - OD( ansiX962c2pnb208w1, ECCurve_X9_62_CHAR2_PNB208W1, - "ANSI X9.62 elliptic curve c2pnb208w1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962c2tnb239v1, ECCurve_X9_62_CHAR2_TNB239V1, - "ANSI X9.62 elliptic curve c2tnb239v1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962c2tnb239v2, ECCurve_X9_62_CHAR2_TNB239V2, - "ANSI X9.62 elliptic curve c2tnb239v2", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962c2tnb239v3, ECCurve_X9_62_CHAR2_TNB239V3, - "ANSI X9.62 elliptic curve c2tnb239v3", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - OD( ansiX962c2pnb272w1, ECCurve_X9_62_CHAR2_PNB272W1, - "ANSI X9.62 elliptic curve c2pnb272w1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962c2pnb304w1, ECCurve_X9_62_CHAR2_PNB304W1, - "ANSI X9.62 elliptic curve c2pnb304w1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962c2tnb359v1, ECCurve_X9_62_CHAR2_TNB359V1, - "ANSI X9.62 elliptic curve c2tnb359v1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962c2pnb368w1, ECCurve_X9_62_CHAR2_PNB368W1, - "ANSI X9.62 elliptic curve c2pnb368w1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - OD( ansiX962c2tnb431r1, ECCurve_X9_62_CHAR2_TNB431R1, - "ANSI X9.62 elliptic curve c2tnb431r1", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ) -}; - -static SECOidData BRAINPOOL_oids[] = { - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - - /* RFC 5639 Brainpool named elliptic curves */ - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - OD( brainpoolP256r1, ECCurve_BrainpoolP256r1, - "brainpoolP256r1 domain parameter set", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - OD( brainpoolP320r1, ECCurve_BrainpoolP320r1, - "brainpoolP320r1 domain parameter set", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - OD( brainpoolP384r1, ECCurve_BrainpoolP384r1, - "brainpoolP384r1 domain parameter set", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, INVALID_CERT_EXTENSION }, - OD( brainpoolP512r1, ECCurve_BrainpoolP512r1, - "brainpoolP512r1 domain parameter set", - CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION ), - { { siDEROID, NULL, 0 }, ECCurve_noName, - "Unknown OID", CKM_INVALID_MECHANISM, - INVALID_CERT_EXTENSION } -}; - -int -oideql(unsigned char *reqoid, unsigned char *foundoid, size_t reqlen, size_t foundlen) -{ - if (!reqoid || !foundoid) { - return 0; - } - - if (reqlen != foundlen) { - return 0; - } - - return memcmp(reqoid, foundoid, reqlen) == 0; -} - -SECOidData * -SECOID_FindOID(const SECItem *oid) -{ - SECOidData *po; - SECOidData *ret = NULL; - int reqlen = oid->len; - - if (reqlen == 8) { - if (oid->data[6] == 0x00) { - /* XXX bounds check */ - po = &ANSI_oids[oid->data[7]]; - if (oideql(oid->data, po->oid.data, reqlen, po->oid.len)) { - ret = po; - } - } - if (oid->data[6] == 0x01) { - /* XXX bounds check */ - po = &ANSI_prime_oids[oid->data[7]]; - if (oideql(oid->data, po->oid.data, reqlen, po->oid.len)) { - ret = po; - } - } - } else if (reqlen == 5) { - /* XXX bounds check */ - po = &SECG_oids[oid->data[4]]; - if (oideql(oid->data, po->oid.data, reqlen, po->oid.len)) { - ret = po; - } - } else if (reqlen == 9) { - /* XXX bounds check */ - po = &BRAINPOOL_oids[oid->data[8]]; - if (oideql(oid->data, po->oid.data, reqlen, po->oid.len)) { - ret = po; - } - } - return(ret); -} - -ECCurveName -SECOID_FindOIDTag(const SECItem *oid) -{ - SECOidData *oiddata; - - oiddata = SECOID_FindOID (oid); - if (oiddata == NULL) - return ECCurve_noName; - - return oiddata->offset; -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/secitem.c b/src/jdk.crypto.ec/share/native/libsunec/impl/secitem.c deleted file mode 100644 index fab4415f26b..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/secitem.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1994-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Last Modified Date from the Original Code: March 2012 - *********************************************************************** */ - -/* - * Support routines for SECItem data structure. - * - * $Id: secitem.c,v 1.14 2006/05/22 22:24:34 wtchang%redhat.com Exp $ - */ - -#include <sys/types.h> - -#ifndef _WIN32 -#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) -#include <sys/systm.h> -#endif /* __linux__ || _ALLBSD_SOURCE */ -#include <sys/param.h> -#endif /* _WIN32 */ - -#ifdef _KERNEL -#include <sys/kmem.h> -#else -#include <string.h> - -#ifndef _WIN32 -#include <strings.h> -#endif /* _WIN32 */ - -#include <assert.h> -#endif -#include "ec.h" -#include "ecl-curve.h" -#include "ecc_impl.h" - -void SECITEM_FreeItem(SECItem *, PRBool); - -SECItem * -SECITEM_AllocItem(PRArenaPool *arena, SECItem *item, unsigned int len, - int kmflag) -{ - SECItem *result = NULL; - void *mark = NULL; - - if (arena != NULL) { - mark = PORT_ArenaMark(arena); - } - - if (item == NULL) { - if (arena != NULL) { - result = PORT_ArenaZAlloc(arena, sizeof(SECItem), kmflag); - } else { - result = PORT_ZAlloc(sizeof(SECItem), kmflag); - } - if (result == NULL) { - goto loser; - } - } else { - PORT_Assert(item->data == NULL); - result = item; - } - - result->len = len; - if (len) { - if (arena != NULL) { - result->data = PORT_ArenaAlloc(arena, len, kmflag); - } else { - result->data = PORT_Alloc(len, kmflag); - } - if (result->data == NULL) { - goto loser; - } - } else { - result->data = NULL; - } - - if (mark) { - PORT_ArenaUnmark(arena, mark); - } - return(result); - -loser: - if ( arena != NULL ) { - if (mark) { - PORT_ArenaRelease(arena, mark); - } - if (item != NULL) { - item->data = NULL; - item->len = 0; - } - } else { - if (result != NULL) { - SECITEM_FreeItem(result, (item == NULL) ? PR_TRUE : PR_FALSE); - } - /* - * If item is not NULL, the above has set item->data and - * item->len to 0. - */ - } - return(NULL); -} - -SECStatus -SECITEM_CopyItem(PRArenaPool *arena, SECItem *to, const SECItem *from, - int kmflag) -{ - to->type = from->type; - if (from->data && from->len) { - if ( arena ) { - to->data = (unsigned char*) PORT_ArenaAlloc(arena, from->len, - kmflag); - } else { - to->data = (unsigned char*) PORT_Alloc(from->len, kmflag); - } - - if (!to->data) { - return SECFailure; - } - PORT_Memcpy(to->data, from->data, from->len); - to->len = from->len; - } else { - to->data = 0; - to->len = 0; - } - return SECSuccess; -} - -void -SECITEM_FreeItem(SECItem *zap, PRBool freeit) -{ - if (zap) { -#ifdef _KERNEL - kmem_free(zap->data, zap->len); -#else - free(zap->data); -#endif - zap->data = 0; - zap->len = 0; - if (freeit) { -#ifdef _KERNEL - kmem_free(zap, sizeof (SECItem)); -#else - free(zap); -#endif - } - } -} diff --git a/src/jdk.crypto.ec/share/native/libsunec/impl/secoidt.h b/src/jdk.crypto.ec/share/native/libsunec/impl/secoidt.h deleted file mode 100644 index 58dde3bbe3c..00000000000 --- a/src/jdk.crypto.ec/share/native/libsunec/impl/secoidt.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, 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. - */ - -/* ********************************************************************* - * - * The Original Code is the Netscape security libraries. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1994-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories - * - *********************************************************************** */ - -#ifndef _SECOIDT_H_ -#define _SECOIDT_H_ - -/* - * secoidt.h - public data structures for ASN.1 OID functions - * - * $Id: secoidt.h,v 1.23 2007/05/05 22:45:16 nelson%bolyard.com Exp $ - */ - -typedef struct SECOidDataStr SECOidData; -typedef struct SECAlgorithmIDStr SECAlgorithmID; - -/* -** An X.500 algorithm identifier -*/ -struct SECAlgorithmIDStr { - SECItem algorithm; - SECItem parameters; -}; - -#define SEC_OID_SECG_EC_SECP192R1 SEC_OID_ANSIX962_EC_PRIME192V1 -#define SEC_OID_SECG_EC_SECP256R1 SEC_OID_ANSIX962_EC_PRIME256V1 -#define SEC_OID_PKCS12_KEY_USAGE SEC_OID_X509_KEY_USAGE - -/* fake OID for DSS sign/verify */ -#define SEC_OID_SHA SEC_OID_MISS_DSS - -typedef enum { - INVALID_CERT_EXTENSION = 0, - UNSUPPORTED_CERT_EXTENSION = 1, - SUPPORTED_CERT_EXTENSION = 2 -} SECSupportExtenTag; - -struct SECOidDataStr { - SECItem oid; - ECCurveName offset; - const char * desc; - unsigned long mechanism; - SECSupportExtenTag supportedExtension; - /* only used for x.509 v3 extensions, so - that we can print the names of those - extensions that we don't even support */ -}; - -#endif /* _SECOIDT_H_ */ diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java index a9b2bbb85c9..37a12d8f0ac 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java @@ -530,8 +530,10 @@ private void setupDebuggerWin32() { machDesc = new MachineDescriptionIntelX86(); } else if (cpu.equals("amd64")) { machDesc = new MachineDescriptionAMD64(); + } else if (cpu.equals("aarch64")) { + machDesc = new MachineDescriptionAArch64(); } else { - throw new DebuggerException("Win32 supported under x86 and amd64 only"); + throw new DebuggerException("Win32 supported under x86, amd64 and aarch64 only"); } // Note we do not use a cache for the local debugger in server diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java index 06edec68037..55de9fc57ef 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java @@ -28,8 +28,10 @@ import java.net.*; import java.util.*; import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.aarch64.*; import sun.jvm.hotspot.debugger.amd64.*; import sun.jvm.hotspot.debugger.x86.*; +import sun.jvm.hotspot.debugger.windbg.aarch64.*; import sun.jvm.hotspot.debugger.windbg.amd64.*; import sun.jvm.hotspot.debugger.windbg.x86.*; import sun.jvm.hotspot.debugger.win32.coff.*; @@ -113,6 +115,8 @@ public void checkAlignment(long address, long alignment) { threadFactory = new WindbgX86ThreadFactory(this); } else if (cpu.equals("amd64")) { threadFactory = new WindbgAMD64ThreadFactory(this); + } else if (cpu.equals("aarch64")) { + threadFactory = new WindbgAARCH64ThreadFactory(this); } if (useCache) { diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windbg/aarch64/WindbgAARCH64Thread.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windbg/aarch64/WindbgAARCH64Thread.java new file mode 100644 index 00000000000..cbc34f4cc7d --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windbg/aarch64/WindbgAARCH64Thread.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +package sun.jvm.hotspot.debugger.windbg.aarch64; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.aarch64.*; +import sun.jvm.hotspot.debugger.windbg.*; + +class WindbgAARCH64Thread implements ThreadProxy { + private WindbgDebugger debugger; + private long sysId; + private boolean gotID; + private long id; + + // The address argument must be the address of the OSThread::_thread_id + WindbgAARCH64Thread(WindbgDebugger debugger, Address addr) { + this.debugger = debugger; + this.sysId = (long)addr.getCIntegerAt(0, 4, true); + gotID = false; + } + + WindbgAARCH64Thread(WindbgDebugger debugger, long sysId) { + this.debugger = debugger; + this.sysId = sysId; + gotID = false; + } + + public ThreadContext getContext() throws IllegalThreadStateException { + long[] data = debugger.getThreadIntegerRegisterSet(getThreadID()); + WindbgAARCH64ThreadContext context = new WindbgAARCH64ThreadContext(debugger); + for (int i = 0; i < data.length; i++) { + context.setRegister(i, data[i]); + } + return context; + } + + public boolean canSetContext() throws DebuggerException { + return false; + } + + public void setContext(ThreadContext thrCtx) + throws IllegalThreadStateException, DebuggerException { + throw new DebuggerException("Unimplemented"); + } + + public boolean equals(Object obj) { + if ((obj == null) || !(obj instanceof WindbgAARCH64Thread)) { + return false; + } + + return (((WindbgAARCH64Thread) obj).getThreadID() == getThreadID()); + } + + public int hashCode() { + return (int) getThreadID(); + } + + public String toString() { + return Long.toString(getThreadID()); + } + + /** Retrieves the thread ID of this thread by examining the Thread + Information Block. */ + private long getThreadID() { + if (!gotID) { + id = debugger.getThreadIdFromSysId(sysId); + } + + return id; + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windbg/aarch64/WindbgAARCH64ThreadContext.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windbg/aarch64/WindbgAARCH64ThreadContext.java new file mode 100644 index 00000000000..8da63ed1ad2 --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windbg/aarch64/WindbgAARCH64ThreadContext.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +package sun.jvm.hotspot.debugger.windbg.aarch64; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.aarch64.*; +import sun.jvm.hotspot.debugger.windbg.*; + +class WindbgAARCH64ThreadContext extends AARCH64ThreadContext { + private WindbgDebugger debugger; + + public WindbgAARCH64ThreadContext(WindbgDebugger debugger) { + super(); + this.debugger = debugger; + } + + public void setRegisterAsAddress(int index, Address value) { + setRegister(index, debugger.getAddressValue(value)); + } + + public Address getRegisterAsAddress(int index) { + return debugger.newAddress(getRegister(index)); + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windbg/aarch64/WindbgAARCH64ThreadFactory.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windbg/aarch64/WindbgAARCH64ThreadFactory.java new file mode 100644 index 00000000000..6f1e929deec --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/windbg/aarch64/WindbgAARCH64ThreadFactory.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +package sun.jvm.hotspot.debugger.windbg.aarch64; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.windbg.*; + +public class WindbgAARCH64ThreadFactory implements WindbgThreadFactory { + private WindbgDebugger debugger; + + public WindbgAARCH64ThreadFactory(WindbgDebugger debugger) { + this.debugger = debugger; + } + + public ThreadProxy createThreadWrapper(Address threadIdentifierAddr) { + return new WindbgAARCH64Thread(debugger, threadIdentifierAddr); + } + + public ThreadProxy createThreadWrapper(long id) { + return new WindbgAARCH64Thread(debugger, id); + } +} diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionManager.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionManager.java index 6b793fa6e90..2adeda4674e 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionManager.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionManager.java @@ -42,8 +42,6 @@ public class HeapRegionManager extends VMObject { // G1HeapRegionTable _regions static private long regionsFieldOffset; - // uint _committed_length - static private CIntegerField numCommittedField; static { VM.registerVMInitializedObserver(new Observer() { @@ -57,7 +55,6 @@ static private synchronized void initialize(TypeDataBase db) { Type type = db.lookupType("HeapRegionManager"); regionsFieldOffset = type.getField("_regions").getOffset(); - numCommittedField = type.getCIntegerField("_num_committed"); } private G1HeapRegionTable regions() { @@ -74,10 +71,6 @@ public long length() { return regions().length(); } - public long committedLength() { - return numCommittedField.getValue(addr); - } - public Iterator<HeapRegion> heapRegionIterator() { return regions().heapRegionIterator(length()); } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ObjectMonitor.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ObjectMonitor.java index 373db9a9868..af18075d3b2 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ObjectMonitor.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ObjectMonitor.java @@ -92,7 +92,11 @@ public boolean isEntered(sun.jvm.hotspot.runtime.Thread current) { public long recursions() { return recursionsField.getValue(addr); } public OopHandle object() { - return addr.getOopHandleAt(objectFieldOffset); + Address objAddr = addr.getAddressAt(objectFieldOffset); + if (objAddr == null) { + return null; + } + return objAddr.getOopHandleAt(0); } public int contentions() { diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java index 59d089ef6bb..80279b3d1c5 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Threads.java @@ -28,8 +28,9 @@ import sun.jvm.hotspot.debugger.*; import sun.jvm.hotspot.types.*; -import sun.jvm.hotspot.runtime.win32_amd64.Win32AMD64JavaThreadPDAccess; import sun.jvm.hotspot.runtime.win32_x86.Win32X86JavaThreadPDAccess; +import sun.jvm.hotspot.runtime.win32_amd64.Win32AMD64JavaThreadPDAccess; +import sun.jvm.hotspot.runtime.win32_aarch64.Win32AARCH64JavaThreadPDAccess; import sun.jvm.hotspot.runtime.linux_x86.LinuxX86JavaThreadPDAccess; import sun.jvm.hotspot.runtime.linux_amd64.LinuxAMD64JavaThreadPDAccess; import sun.jvm.hotspot.runtime.linux_aarch64.LinuxAARCH64JavaThreadPDAccess; @@ -99,6 +100,8 @@ private static synchronized void initialize(TypeDataBase db) { access = new Win32X86JavaThreadPDAccess(); } else if (cpu.equals("amd64")) { access = new Win32AMD64JavaThreadPDAccess(); + } else if (cpu.equals("aarch64")) { + access = new Win32AARCH64JavaThreadPDAccess(); } } else if (os.equals("linux")) { if (cpu.equals("x86")) { diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java index eaae166e29d..fa8bcd75315 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VM.java @@ -1002,6 +1002,27 @@ public Flag getCommandLineFlag(String name) { return (Flag) flagsMap.get(name); } + private static final String cmdFlagTypes[] = { + "bool", + "int", + "uint", + "intx", + "uintx", + "uint64_t", + "size_t", + "double", + "ccstr", + "ccstrlist" + }; + + private String getFlagTypeAsString(int typeIndex) { + if (0 <= typeIndex && typeIndex < cmdFlagTypes.length) { + return cmdFlagTypes[typeIndex]; + } else { + return "unknown"; + } + } + private void readCommandLineFlags() { // get command line flags TypeDataBase db = getTypeDataBase(); @@ -1011,8 +1032,7 @@ private void readCommandLineFlags() { commandLineFlags = new Flag[numFlags - 1]; Address flagAddr = flagType.getAddressField("flags").getValue(); - - AddressField typeFld = flagType.getAddressField("_type"); + CIntField typeFld = new CIntField(flagType.getCIntegerField("_type"), 0); AddressField nameFld = flagType.getAddressField("_name"); AddressField addrFld = flagType.getAddressField("_addr"); CIntField flagsFld = new CIntField(flagType.getCIntegerField("_flags"), 0); @@ -1021,7 +1041,8 @@ private void readCommandLineFlags() { // NOTE: last flag contains null values. for (int f = 0; f < numFlags - 1; f++) { - String type = CStringUtilities.getString(typeFld.getValue(flagAddr)); + int typeIndex = (int)typeFld.getValue(flagAddr); + String type = getFlagTypeAsString(typeIndex); String name = CStringUtilities.getString(nameFld.getValue(flagAddr)); Address addr = addrFld.getValue(flagAddr); int flags = (int)flagsFld.getValue(flagAddr); diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/win32_aarch64/Win32AARCH64JavaThreadPDAccess.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/win32_aarch64/Win32AARCH64JavaThreadPDAccess.java new file mode 100644 index 00000000000..70abbcefb6a --- /dev/null +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/win32_aarch64/Win32AARCH64JavaThreadPDAccess.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, Microsoft Corporation. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +package sun.jvm.hotspot.runtime.win32_aarch64; + +import java.io.*; +import java.util.*; +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.debugger.aarch64.*; +import sun.jvm.hotspot.runtime.*; +import sun.jvm.hotspot.runtime.aarch64.*; +import sun.jvm.hotspot.types.*; +import sun.jvm.hotspot.utilities.*; +import sun.jvm.hotspot.utilities.Observable; +import sun.jvm.hotspot.utilities.Observer; + +/** This class is only public to allow using the VMObjectFactory to + instantiate these. +*/ + +public class Win32AARCH64JavaThreadPDAccess implements JavaThreadPDAccess { + private static AddressField lastJavaFPField; + private static AddressField osThreadField; + + // Field from OSThread + private static Field osThreadThreadIDField; + + // This is currently unneeded but is being kept in case we change + // the currentFrameGuess algorithm + private static final long GUESS_SCAN_RANGE = 128 * 1024; + + static { + VM.registerVMInitializedObserver(new Observer() { + public void update(Observable o, Object data) { + initialize(VM.getVM().getTypeDataBase()); + } + }); + } + + private static synchronized void initialize(TypeDataBase db) { + Type type = db.lookupType("JavaThread"); + osThreadField = type.getAddressField("_osthread"); + + Type anchorType = db.lookupType("JavaFrameAnchor"); + lastJavaFPField = anchorType.getAddressField("_last_Java_fp"); + + Type osThreadType = db.lookupType("OSThread"); + osThreadThreadIDField = osThreadType.getField("_thread_id"); + } + + public Address getLastJavaFP(Address addr) { + return lastJavaFPField.getValue(addr.addOffsetTo(sun.jvm.hotspot.runtime.JavaThread.getAnchorField().getOffset())); + } + + public Address getLastJavaPC(Address addr) { + return null; + } + + public Address getBaseOfStackPointer(Address addr) { + return null; + } + + public Frame getLastFramePD(JavaThread thread, Address addr) { + Address fp = thread.getLastJavaFP(); + if (fp == null) { + return null; // no information + } + Address pc = thread.getLastJavaPC(); + if ( pc != null ) { + return new AARCH64Frame(thread.getLastJavaSP(), fp, pc); + } else { + return new AARCH64Frame(thread.getLastJavaSP(), fp); + } + } + + public RegisterMap newRegisterMap(JavaThread thread, boolean updateMap) { + return new AARCH64RegisterMap(thread, updateMap); + } + + public Frame getCurrentFrameGuess(JavaThread thread, Address addr) { + ThreadProxy t = getThreadProxy(addr); + AARCH64ThreadContext context = (AARCH64ThreadContext) t.getContext(); + AARCH64CurrentFrameGuess guesser = new AARCH64CurrentFrameGuess(context, thread); + if (!guesser.run(GUESS_SCAN_RANGE)) { + return null; + } + if (guesser.getPC() == null) { + return new AARCH64Frame(guesser.getSP(), guesser.getFP()); + } else { + return new AARCH64Frame(guesser.getSP(), guesser.getFP(), guesser.getPC()); + } + } + + public void printThreadIDOn(Address addr, PrintStream tty) { + tty.print(getThreadProxy(addr)); + } + + public void printInfoOn(Address threadAddr, PrintStream tty) { + } + + public Address getLastSP(Address addr) { + ThreadProxy t = getThreadProxy(addr); + AARCH64ThreadContext context = (AARCH64ThreadContext) t.getContext(); + return context.getRegisterAsAddress(AARCH64ThreadContext.SP); + } + + public ThreadProxy getThreadProxy(Address addr) { + // Addr is the address of the JavaThread. + // Fetch the OSThread (for now and for simplicity, not making a + // separate "OSThread" class in this package) + Address osThreadAddr = osThreadField.getValue(addr); + // Get the address of the thread_id within the OSThread + Address threadIdAddr = osThreadAddr.addOffsetTo(osThreadThreadIDField.getOffset()); + + JVMDebugger debugger = VM.getVM().getDebugger(); + return debugger.getThreadForIdentifierAddress(threadIdAddr); + } +} diff --git a/src/jdk.hotspot.agent/windows/native/libsaproc/sawindbg.cpp b/src/jdk.hotspot.agent/windows/native/libsaproc/sawindbg.cpp index c8ad8991b2f..52ce1f2d498 100644 --- a/src/jdk.hotspot.agent/windows/native/libsaproc/sawindbg.cpp +++ b/src/jdk.hotspot.agent/windows/native/libsaproc/sawindbg.cpp @@ -36,6 +36,9 @@ #elif _M_AMD64 #include "sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext.h" #define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG +#elif _M_ARM64 + #include "sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext.h" + #define NPRGREG sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_NPRGREG #else #error "SA windbg back-end is not supported for your cpu!" #endif diff --git a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Authenticator.java b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Authenticator.java index 5b7445da6de..d6482e19405 100644 --- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Authenticator.java +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Authenticator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -24,9 +24,6 @@ */ package com.sun.net.httpserver; -import java.net.*; -import java.io.*; -import java.util.*; /** * Authenticator represents an implementation of an HTTP authentication @@ -39,9 +36,20 @@ public abstract class Authenticator { /** - * Base class for return type from authenticate() method + * Constructor for subclasses to call. */ - public abstract static class Result {} + protected Authenticator () { } + + /** + * Base class for return type from {@link #authenticate(HttpExchange)} method. + */ + public abstract static class Result { + + /** + * Constructor for subclasses to call. + */ + protected Result () {} + } /** * Indicates an authentication failure. The authentication @@ -51,12 +59,20 @@ public static class Failure extends Result { private int responseCode; + /** + * Creates a {@code Failure} instance with given response code. + * + * @param responseCode the response code to associate with this + * {@code Failure} instance + */ public Failure (int responseCode) { this.responseCode = responseCode; } /** - * returns the response code to send to the client + * Returns the response code to send to the client. + * + * @return the response code associated with this {@code Failure} instance */ public int getResponseCode() { return responseCode; @@ -65,17 +81,26 @@ public int getResponseCode() { /** * Indicates an authentication has succeeded and the - * authenticated user principal can be acquired by calling - * getPrincipal(). + * authenticated user {@linkplain HttpPrincipal principal} can be acquired by calling + * {@link #getPrincipal()}. */ public static class Success extends Result { private HttpPrincipal principal; + /** + * Creates a {@code Success} instance with given {@code Principal}. + * + * @param p the authenticated user you wish to set as {@code Principal} + */ public Success (HttpPrincipal p) { principal = p; } + /** - * returns the authenticated user Principal + * Returns the authenticated user {@code Principal}. + * + * @return the {@code Principal} instance associated with the authenticated user + * */ public HttpPrincipal getPrincipal() { return principal; @@ -85,20 +110,28 @@ public HttpPrincipal getPrincipal() { /** * Indicates an authentication must be retried. The * response code to be sent back is as returned from - * getResponseCode(). The Authenticator must also have - * set any necessary response headers in the given HttpExchange - * before returning this Retry object. + * {@link #getResponseCode()}. The {@code Authenticator} must also have + * set any necessary response headers in the given {@link HttpExchange} + * before returning this {@code Retry} object. */ public static class Retry extends Result { private int responseCode; + /** + * Creates a {@code Retry} instance with given response code. + * + * @param responseCode the response code to associate with this + * {@code Retry} instance + */ public Retry (int responseCode) { this.responseCode = responseCode; } /** - * returns the response code to send to the client + * Returns the response code to send to the client. + * + * @return the response code associated with this {@code Retry} instance */ public int getResponseCode() { return responseCode; @@ -106,20 +139,22 @@ public int getResponseCode() { } /** - * called to authenticate each incoming request. The implementation - * must return a Failure, Success or Retry object as appropriate :- - * <p> - * Failure means the authentication has completed, but has failed - * due to invalid credentials. - * <p> - * Sucess means that the authentication - * has succeeded, and a Principal object representing the user - * can be retrieved by calling Sucess.getPrincipal() . - * <p> - * Retry means that another HTTP exchange is required. Any response - * headers needing to be sent back to the client are set in the - * given HttpExchange. The response code to be returned must be provided - * in the Retry object. Retry may occur multiple times. + * Called to authenticate each incoming request. The implementation + * must return a {@link Failure}, {@link Success} or {@link Retry} object as appropriate: + * <ul> + * <li> {@code Failure} means the authentication has completed, but has + * failed due to invalid credentials. + * <li> {@code Success} means that the authentication has succeeded, + * and a {@code Principal} object representing the user can be retrieved + * by calling {@link Success#getPrincipal()}. + * <li> {@code Retry} means that another HTTP {@linkplain HttpExchange exchange} + * is required. Any response headers needing to be sent back to the client are set + * in the given {@code HttpExchange}. The response code to be returned must be + * provided in the {@code Retry} object. {@code Retry} may occur multiple times. + * <ul/> + * + * @param exch the {@code HttpExchange} upon which authenticate is called + * @return the result */ public abstract Result authenticate (HttpExchange exch); } diff --git a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/BasicAuthenticator.java b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/BasicAuthenticator.java index c8c54bb873c..4b3faf10f8e 100644 --- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/BasicAuthenticator.java +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/BasicAuthenticator.java @@ -39,16 +39,17 @@ */ public abstract class BasicAuthenticator extends Authenticator { + /** The HTTP Basic authentication realm. */ protected final String realm; private final Charset charset; private final boolean isUTF8; /** - * Creates a BasicAuthenticator for the given HTTP realm. + * Creates a {@code BasicAuthenticator} for the given HTTP realm. * The Basic authentication credentials (username and password) are decoded * using the platform's {@link Charset#defaultCharset() default character set}. * - * @param realm The HTTP Basic authentication realm + * @param realm the HTTP Basic authentication realm * @throws NullPointerException if realm is {@code null} * @throws IllegalArgumentException if realm is an empty string */ @@ -57,7 +58,7 @@ public BasicAuthenticator (String realm) { } /** - * Creates a BasicAuthenticator for the given HTTP realm and using the + * Creates a {@code BasicAuthenticator} for the given HTTP realm and using the * given {@link Charset} to decode the Basic authentication credentials * (username and password). * @@ -65,8 +66,8 @@ public BasicAuthenticator (String realm) { * communicated to the client, and therefore more likely to be used also * by the client. * - * @param realm The HTTP Basic authentication realm - * @param charset The Charset to decode incoming credentials from the client + * @param realm the HTTP Basic authentication realm + * @param charset the {@code Charset} to decode incoming credentials from the client * @throws NullPointerException if realm or charset are {@code null} * @throws IllegalArgumentException if realm is an empty string */ @@ -80,8 +81,9 @@ public BasicAuthenticator (String realm, Charset charset) { } /** - * returns the realm this BasicAuthenticator was created with - * @return the authenticator's realm string. + * Returns the realm this {@code BasicAuthenticator} was created with. + * + * @return the authenticator's realm string */ public String getRealm () { return realm; @@ -129,14 +131,14 @@ private void setAuthHeader(HttpExchange t) { } /** - * called for each incoming request to verify the + * Called for each incoming request to verify the * given name and password in the context of this - * Authenticator's realm. Any caching of credentials - * must be done by the implementation of this method + * authenticator's realm. Any caching of credentials + * must be done by the implementation of this method. + * * @param username the username from the request * @param password the password from the request - * @return <code>true</code> if the credentials are valid, - * <code>false</code> otherwise. + * @return {@code true} if the credentials are valid, {@code false} otherwise */ public abstract boolean checkCredentials (String username, String password); } diff --git a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Filter.java b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Filter.java index 70ca21e4920..67e76e998fb 100644 --- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Filter.java +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Filter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -26,50 +26,66 @@ package com.sun.net.httpserver; import java.io.IOException; -import java.util.*; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; +import java.util.ListIterator; /** * A filter used to pre- and post-process incoming requests. Pre-processing occurs * before the application's exchange handler is invoked, and post-processing - * occurs after the exchange handler returns. Filters - * are organised in chains, and are associated with HttpContext instances. - * <p> - * Each Filter in the chain, invokes the next filter within its own - * doFilter() implementation. The final Filter in the chain invokes the applications - * exchange handler. + * occurs after the exchange handler returns. Filters are organised in chains, + * and are associated with {@link HttpContext} instances. + * + * <p> Each {@code Filter} in the chain, invokes the next filter within its own + * {@link #doFilter(HttpExchange, Chain)} implementation. The final {@code Filter} + * in the chain invokes the applications exchange handler. + * * @since 1.6 */ public abstract class Filter { + /** + * Constructor for subclasses to call. + */ protected Filter () {} /** - * a chain of filters associated with a HttpServer. - * Each filter in the chain is given one of these - * so it can invoke the next filter in the chain + * A chain of filters associated with a {@link HttpServer}. + * Each filter in the chain is given one of these so it can invoke the + * next filter in the chain. */ public static class Chain { - /* the last element in the chain must invoke the users - * handler + + /** + * The last element in the chain must invoke the user's + * handler. */ private ListIterator<Filter> iter; private HttpHandler handler; + /** + * Creates a {@code Chain} instance with given filters and handler. + * + * @param filters the filters that make up the {@code Chain} + * @param handler the {@link HttpHandler} that will be invoked after + * the final {@code Filter} has finished + */ public Chain (List<Filter> filters, HttpHandler handler) { iter = filters.listIterator(); this.handler = handler; } /** - * calls the next filter in the chain, or else - * the users exchange handler, if this is the - * final filter in the chain. The Filter may decide - * to terminate the chain, by not calling this method. - * In this case, the filter <b>must</b> send the - * response to the request, because the application's - * exchange handler will not be invoked. - * @param exchange the HttpExchange - * @throws IOException let exceptions pass up the stack + * Calls the next filter in the chain, or else the users exchange + * handler, if this is the final filter in the chain. The {@code Filter} + * may decide to terminate the chain, by not calling this method. + * In this case, the filter <b>must</b> send the response to the + * request, because the application's {@linkplain HttpExchange exchange} + * handler will not be invoked. + * + * @param exchange the {@code HttpExchange} + * @throws IOException if an I/O error occurs * @throws NullPointerException if exchange is {@code null} */ public void doFilter (HttpExchange exchange) throws IOException { @@ -85,35 +101,42 @@ public void doFilter (HttpExchange exchange) throws IOException { /** * Asks this filter to pre/post-process the given exchange. The filter * can: - * <ul><li>examine or modify the request headers</li> - * <li>filter the request body or the response body, by creating suitable - * filter streams and calling - * {@link HttpExchange#setStreams(InputStream,OutputStream)}</li> - * <li>set attribute Objects in the exchange, which other filters or the - * exchange handler can access.</li> - * <li>decide to either<ol> - * <li>invoke the next filter in the chain, by calling - * {@link Filter.Chain#doFilter(HttpExchange)}</li> - * <li>terminate the chain of invocation, by <b>not</b> calling - * {@link Filter.Chain#doFilter(HttpExchange)}</li></ol> - * <li>if option 1. above taken, then when doFilter() returns all subsequent - * filters in the Chain have been called, and the response headers can be - * examined or modified.</li> - * <li>if option 2. above taken, then this Filter must use the HttpExchange - * to send back an appropriate response</li></ul> * - * @param exchange the {@code HttpExchange} to be filtered. - * @param chain the Chain which allows the next filter to be invoked. - * @throws IOException may be thrown by any filter module, and if - * caught, must be rethrown again. + * <ul> + * <li> Examine or modify the request headers. + * <li> Filter the request body or the response body, by creating suitable + * filter streams and calling {@link HttpExchange#setStreams(InputStream, OutputStream)}. + * <li> Set attribute objects in the exchange, which other filters or + * the exchange handler can access. + * <li> Decide to either: + * + * <ol> + * <li> Invoke the next filter in the chain, by calling + * {@link Filter.Chain#doFilter(HttpExchange)}. + * <li> Terminate the chain of invocation, by <b>not</b> calling + * {@link Filter.Chain#doFilter(HttpExchange)}. + * </ol> + * + * <li> If option 1. above is taken, then when doFilter() returns all subsequent + * filters in the Chain have been called, and the response headers can be + * examined or modified. + * <li> If option 2. above is taken, then this Filter must use the HttpExchange + * to send back an appropriate response. + * </ul> + * + * @param exchange the {@code HttpExchange} to be filtered + * @param chain the {@code Chain} which allows the next filter to be invoked + * @throws IOException may be thrown by any filter module, and if caught, + * must be rethrown again * @throws NullPointerException if either exchange or chain are {@code null} */ public abstract void doFilter (HttpExchange exchange, Chain chain) throws IOException; /** - * returns a short description of this Filter - * @return a string describing the Filter + * Returns a short description of this {@code Filter}. + * + * @return a {@code String} describing the {@code Filter} */ public abstract String description (); diff --git a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java index f41845f7112..94cd6b62ea1 100644 --- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java @@ -25,51 +25,67 @@ package com.sun.net.httpserver; -import java.util.*; +import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; /** - * HTTP request and response headers are represented by this class which implements - * the interface - * {@link java.util.Map}{@literal <}{@link java.lang.String}, {@link java.util.List} - * {@literal <}{@link java.lang.String}{@literal >>}. + * HTTP request and response headers are represented by this class which + * implements the interface + * {@link java.util.Map}{@literal <}{@link java.lang.String}, + * {@link java.util.List} {@literal <}{@link java.lang.String}{@literal >>}. * The keys are case-insensitive Strings representing the header names and * the value associated with each key is * a {@link List}{@literal <}{@link String}{@literal >} with one * element for each occurrence of the header name in the request or response. - * <p> - * For example, if a response header instance contains + * + * <p> For example, if a response header instance contains * one key "HeaderName" with two values "value1 and value2" * then this object is output as two header lines: + * * <blockquote><pre> * HeaderName: value1 * HeaderName: value2 * </pre></blockquote> - * <p> - * All the normal {@link java.util.Map} methods are provided, but the following - * additional convenience methods are most likely to be used: + * + * All the normal {@link java.util.Map} methods are provided, but the + * following additional convenience methods are most likely to be used: + * * <ul> - * <li>{@link #getFirst(String)} returns a single valued header or the first value of - * a multi-valued header.</li> - * <li>{@link #add(String,String)} adds the given header value to the list for the given key</li> - * <li>{@link #set(String,String)} sets the given header field to the single value given - * overwriting any existing values in the value list. - * </ul><p> - * All methods in this class accept <code>null</code> values for keys and values. However, null - * keys will never will be present in HTTP request headers, and will not be output/sent in response headers. - * Null values can be represented as either a null entry for the key (i.e. the list is null) or - * where the key has a list, but one (or more) of the list's values is null. Null values are output - * as a header line containing the key but no associated value. + * <li>{@link #getFirst(String)} returns a single valued header or the first + * value of a multi-valued header. + * <li>{@link #add(String,String)} adds the given header value to the list + * for the given key. + * <li>{@link #set(String,String)} sets the given header field to the single + * value given overwriting any existing values in the value list. + * </ul> + * + * <p> All methods in this class accept {@code null} values for keys and values. + * However, {@code null} keys will never will be present in HTTP request + * headers, and will not be output/sent in response headers. Null values can be + * represented as either a {@code null} entry for the key (i.e. the list is + * {@code null}) or where the key has a list, but one (or more) of the list's + * values is {@code null}. Null values are output as a header line containing + * the key but no associated value. + * * @since 1.6 */ public class Headers implements Map<String,List<String>> { HashMap<String,List<String>> map; + /** + * Creates an empty instance of {@code Headers}. + */ public Headers () {map = new HashMap<String,List<String>>(32);} - /* Normalize the key by converting to following form. - * First char upper case, rest lower case. - * key is presumed to be ASCII + /** + * Normalize the key by converting to following form. + * First {@code char} upper case, rest lower case. + * key is presumed to be {@code ASCII}. */ private String normalize (String key) { if (key == null) { @@ -117,10 +133,11 @@ public List<String> get(Object key) { } /** - * returns the first value from the List of String values - * for the given key (if at least one exists). + * Returns the first value from the {@link List} of {@code String} + * values for the given key (if at least one exists). + * * @param key the key to search for - * @return the first string value associated with the key + * @return the first {@code String} value associated with the key */ public String getFirst (String key) { List<String> l = map.get(normalize(key)); @@ -137,11 +154,11 @@ public List<String> put(String key, List<String> value) { } /** - * adds the given value to the list of headers - * for the given key. If the mapping does not - * already exist, then it is created + * Adds the given value to the list of headers for the given key. If + * the mapping does not already exist, then it is created. + * * @param key the header name - * @param value the header value to add to the header + * @param value the value to add to the header */ public void add (String key, String value) { checkValue(value); @@ -179,11 +196,11 @@ private static void checkValue(String value) { } /** - * sets the given value as the sole header value - * for the given key. If the mapping does not - * already exist, then it is created + * Sets the given value as the sole header value for the given + * key. If the mapping does not already exist, then it is created. + * * @param key the header name - * @param value the header value to set. + * @param value the header value to set */ public void set (String key, String value) { LinkedList<String> l = new LinkedList<String>(); diff --git a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpContext.java b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpContext.java index 12ffdcce384..a6161e5b674 100644 --- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpContext.java +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,9 +24,8 @@ */ package com.sun.net.httpserver; -import java.net.*; -import java.io.*; -import java.util.*; +import java.util.List; +import java.util.Map; /** * HttpContext represents a mapping between the root URI path of an application @@ -42,6 +41,9 @@ */ public abstract class HttpContext { + /** + * Constructor for subclasses to call. + */ protected HttpContext () { } @@ -78,6 +80,8 @@ protected HttpContext () { * <p> * Every attribute stored in this Map will be visible to * every HttpExchange processed by this context + * + * @return a map containing the attributes of this context */ public abstract Map<String,Object> getAttributes() ; diff --git a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java index 57e02a1b170..32e664cd2ee 100644 --- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -25,152 +25,173 @@ package com.sun.net.httpserver; -import java.io.*; -import java.nio.*; -import java.nio.channels.*; -import java.net.*; -import javax.net.ssl.*; -import java.util.*; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.InetSocketAddress; +import java.net.URI; /** * This class encapsulates a HTTP request received and a * response to be generated in one exchange. It provides methods * for examining the request from the client, and for building and * sending the response. - * <p> - * The typical life-cycle of a HttpExchange is shown in the sequence - * below. - * <ol><li>{@link #getRequestMethod()} to determine the command - * <li>{@link #getRequestHeaders()} to examine the request headers (if needed) - * <li>{@link #getRequestBody()} returns a {@link java.io.InputStream} for reading the request body. - * After reading the request body, the stream should be closed. - * <li>{@link #getResponseHeaders()} to set any response headers, except content-length - * <li>{@link #sendResponseHeaders(int,long)} to send the response headers. Must be called before - * next step. - * <li>{@link #getResponseBody()} to get a {@link java.io.OutputStream} to send the response body. - * When the response body has been written, the stream must be closed to terminate the exchange. + * + * <p> The typical life-cycle of a {@code HttpExchange} is shown in the sequence + * below: + * <ol> + * <li>{@link #getRequestMethod()} to determine the command. + * <li>{@link #getRequestHeaders()} to examine the request headers (if + * needed). + * <li>{@link #getRequestBody()} returns an {@link InputStream} for + * reading the request body. After reading the request body, the stream + * should be closed. + * <li>{@link #getResponseHeaders()} to set any response headers, except + * content-length. + * <li>{@link #sendResponseHeaders(int,long)} to send the response headers. + * Must be called before next step. + * <li>{@link #getResponseBody()} to get a {@link OutputStream} to + * send the response body. When the response body has been written, the + * stream must be closed to terminate the exchange. * </ol> + * * <b>Terminating exchanges</b> - * <br> - * Exchanges are terminated when both the request InputStream and response OutputStream are closed. - * Closing the OutputStream, implicitly closes the InputStream (if it is not already closed). - * However, it is recommended - * to consume all the data from the InputStream before closing it. - * The convenience method {@link #close()} does all of these tasks. - * Closing an exchange without consuming all of the request body is not an error - * but may make the underlying TCP connection unusable for following exchanges. - * The effect of failing to terminate an exchange is undefined, but will typically - * result in resources failing to be freed/reused. + * <br>Exchanges are terminated when both the request {@code InputStream} and + * response {@code OutputStream} are closed. Closing the {@code OutputStream}, + * implicitly closes the {@code InputStream} (if it is not already closed). + * However, it is recommended to consume all the data from the {@code InputStream} + * before closing it. The convenience method {@link #close()} does all of these + * tasks. Closing an exchange without consuming all of the request body is not + * an error but may make the underlying TCP connection unusable for following + * exchanges. The effect of failing to terminate an exchange is undefined, but + * will typically result in resources failing to be freed/reused. + * * @since 1.6 */ public abstract class HttpExchange implements AutoCloseable { - protected HttpExchange () { + /** + * Constructor for subclasses to call. + */ + protected HttpExchange() { } /** - * Returns an immutable Map containing the HTTP headers that were - * included with this request. The keys in this Map will be the header - * names, while the values will be a List of Strings containing each value - * that was included (either for a header that was listed several times, - * or one that accepts a comma-delimited list of values on a single line). - * In either of these cases, the values for the header name will be - * presented in the order that they were included in the request. - * <p> - * The keys in Map are case-insensitive. - * @return a read-only Map which can be used to access request headers + * Returns an immutable {@link Map} containing the HTTP headers that were + * included with this request. The keys in this {@code Map} will be the header + * names, while the values will be a {@link java.util.List} of + * {@linkplain java.lang.String Strings} containing each value that was + * included (either for a header that was listed several times, or one that + * accepts a comma-delimited list of values on a single line). In either of + * these cases, the values for the header name will be presented in the + * order that they were included in the request. + * + * <p> The keys in {@code Map} are case-insensitive. + * + * @return a read-only {@code Map} which can be used to access request headers */ - public abstract Headers getRequestHeaders () ; + public abstract Headers getRequestHeaders(); /** - * Returns a mutable Map into which the HTTP response headers can be stored - * and which will be transmitted as part of this response. The keys in the - * Map will be the header names, while the values must be a List of Strings - * containing each value that should be included multiple times - * (in the order that they should be included). - * <p> - * The keys in Map are case-insensitive. - * @return a writable Map which can be used to set response headers. + * Returns a mutable {@link Map} into which the HTTP response headers can be + * stored and which will be transmitted as part of this response. The keys in + * the {@code Map} will be the header names, while the values must be a + * {@link java.util.List} of {@linkplain java.lang.String Strings} containing + * each value that should be included multiple times (in the order that they + * should be included). + * + * <p> The keys in {@code Map} are case-insensitive. + * + * @return a writable {@code Map} which can be used to set response headers. */ - public abstract Headers getResponseHeaders () ; + public abstract Headers getResponseHeaders(); /** - * Get the request URI + * Get the request {@link URI}. * - * @return the request URI + * @return the request {@code URI} */ - public abstract URI getRequestURI () ; + public abstract URI getRequestURI(); /** - * Get the request method + * Get the request method. + * * @return the request method */ - public abstract String getRequestMethod (); + public abstract String getRequestMethod(); /** - * Get the HttpContext for this exchange - * @return the HttpContext + * Get the {@link HttpContext} for this exchange. + * + * @return the {@code HttpContext} */ - public abstract HttpContext getHttpContext (); + public abstract HttpContext getHttpContext(); /** - * Ends this exchange by doing the following in sequence:<ol> - * <li>close the request InputStream, if not already closed;</li> - * <li>close the response OutputStream, if not already closed.</li> + * Ends this exchange by doing the following in sequence: + * <ol> + * <li> close the request {@link InputStream}, if not already closed. + * <li> close the response {@link OutputStream}, if not already closed. * </ol> */ - public abstract void close () ; + public abstract void close(); /** - * returns a stream from which the request body can be read. + * Returns a stream from which the request body can be read. * Multiple calls to this method will return the same stream. - * It is recommended that applications should consume (read) all of the - * data from this stream before closing it. If a stream is closed - * before all data has been read, then the close() call will - * read and discard remaining data (up to an implementation specific - * number of bytes). - * @return the stream from which the request body can be read. + * It is recommended that applications should consume (read) all of the data + * from this stream before closing it. If a stream is closed before all data + * has been read, then the {@link InputStream#close()} call will read + * and discard remaining data (up to an implementation specific number of + * bytes). + * + * @return the stream from which the request body can be read */ - public abstract InputStream getRequestBody () ; + public abstract InputStream getRequestBody(); /** - * returns a stream to which the response body must be - * written. {@link #sendResponseHeaders(int,long)}) must be called prior to calling - * this method. Multiple calls to this method (for the same exchange) - * will return the same stream. In order to correctly terminate - * each exchange, the output stream must be closed, even if no - * response body is being sent. - * <p> - * Closing this stream implicitly - * closes the InputStream returned from {@link #getRequestBody()} - * (if it is not already closed). - * <P> - * If the call to sendResponseHeaders() specified a fixed response - * body length, then the exact number of bytes specified in that - * call must be written to this stream. If too many bytes are written, - * then write() will throw an IOException. If too few bytes are written - * then the stream close() will throw an IOException. In both cases, - * the exchange is aborted and the underlying TCP connection closed. + * Returns a stream to which the response body must be + * written. {@link #sendResponseHeaders(int,long)}) must be called prior to + * calling this method. Multiple calls to this method (for the same exchange) + * will return the same stream. In order to correctly terminate each exchange, + * the output stream must be closed, even if no response body is being sent. + * + * <p> Closing this stream implicitly closes the {@link InputStream} + * returned from {@link #getRequestBody()} (if it is not already closed). + * + * <p> If the call to {@link #sendResponseHeaders(int, long)} specified a + * fixed response body length, then the exact number of bytes specified in + * that call must be written to this stream. If too many bytes are written, + * then {@link OutputStream#write()} will throw an {@code IOException}. + * If too few bytes are written then the stream + * {@link OutputStream#close()} will throw an {@code IOException}. + * In both cases, the exchange is aborted and the underlying TCP connection + * closed. + * * @return the stream to which the response body is written */ - public abstract OutputStream getResponseBody () ; + public abstract OutputStream getResponseBody(); /** - * Starts sending the response back to the client using the current set of response headers - * and the numeric response code as specified in this method. The response body length is also specified - * as follows. If the response length parameter is greater than zero, this specifies an exact - * number of bytes to send and the application must send that exact amount of data. - * If the response length parameter is {@code zero}, then chunked transfer encoding is - * used and an arbitrary amount of data may be sent. The application terminates the - * response body by closing the OutputStream. If response length has the value {@code -1} - * then no response body is being sent. - * <p> - * If the content-length response header has not already been set then - * this is set to the appropriate value depending on the response length parameter. - * <p> - * This method must be called prior to calling {@link #getResponseBody()}. + * Starts sending the response back to the client using the current set of + * response headers and the numeric response code as specified in this + * method. The response body length is also specified as follows. If the + * response length parameter is greater than {@code zero}, this specifies an + * exact number of bytes to send and the application must send that exact + * amount of data. If the response length parameter is {@code zero}, then + * chunked transfer encoding is used and an arbitrary amount of data may be + * sent. The application terminates the response body by closing the + * {@link OutputStream}. + * If response length has the value {@code -1} then no response body is + * being sent. + * + * <p> If the content-length response header has not already been set then + * this is set to the appropriate value depending on the response length + * parameter. + * + * <p> This method must be called prior to calling {@link #getResponseBody()}. * * @implNote This implementation allows the caller to instruct the * server to force a connection close after the exchange terminates, by @@ -178,94 +199,102 @@ protected HttpExchange () { * #getResponseHeaders() response headers} before {@code sendResponseHeaders} * is called. * - * @param rCode the response code to send - * @param responseLength if {@literal > 0}, specifies a fixed response - * body length and that exact number of bytes must be written - * to the stream acquired from getResponseBody(), or else - * if equal to 0, then chunked encoding is used, - * and an arbitrary number of bytes may be written. - * if {@literal <= -1}, then no response body length is specified and - * no response body may be written. - * @see HttpExchange#getResponseBody() + * @param rCode the response code to send + * @param responseLength if {@literal > 0}, specifies a fixed response body + * length and that exact number of bytes must be written + * to the stream acquired from {@link #getResponseCode()} + * If {@literal == 0}, then chunked encoding is used, + * and an arbitrary number of bytes may be written. + * If {@literal <= -1}, then no response body length is + * specified and no response body may be written. + * + * @see HttpExchange#getResponseBody() */ - public abstract void sendResponseHeaders (int rCode, long responseLength) throws IOException ; + public abstract void sendResponseHeaders(int rCode, long responseLength) throws IOException; /** - * Returns the address of the remote entity invoking this request - * @return the InetSocketAddress of the caller + * Returns the address of the remote entity invoking this request. + * + * @return the {@link InetSocketAddress} of the caller */ - public abstract InetSocketAddress getRemoteAddress (); + public abstract InetSocketAddress getRemoteAddress(); /** - * Returns the response code, if it has already been set + * Returns the response code, if it has already been set. + * * @return the response code, if available. {@code -1} if not available yet. */ - public abstract int getResponseCode (); + public abstract int getResponseCode(); /** - * Returns the local address on which the request was received - * @return the InetSocketAddress of the local interface + * Returns the local address on which the request was received. + * + * @return the {@link InetSocketAddress} of the local interface */ - public abstract InetSocketAddress getLocalAddress (); + public abstract InetSocketAddress getLocalAddress(); /** * Returns the protocol string from the request in the form * <i>protocol/majorVersion.minorVersion</i>. For example, - * "HTTP/1.1" + * "{@code HTTP/1.1}". + * * @return the protocol string from the request */ - public abstract String getProtocol (); + public abstract String getProtocol(); /** - * Filter modules may store arbitrary objects with HttpExchange - * instances as an out-of-band communication mechanism. Other Filters + * {@Link Filter} modules may store arbitrary objects with {@code HttpExchange} + * instances as an out-of-band communication mechanism. Other filters * or the exchange handler may then access these objects. - * <p> - * Each Filter class will document the attributes which they make + * + * <p> Each {@code Filter} class will document the attributes which they make * available. + * * @param name the name of the attribute to retrieve - * @return the attribute object, or null if it does not exist + * @return the attribute object, or {@code null} if it does not exist * @throws NullPointerException if name is {@code null} */ - public abstract Object getAttribute (String name) ; + public abstract Object getAttribute(String name); /** - * Filter modules may store arbitrary objects with HttpExchange - * instances as an out-of-band communication mechanism. Other Filters + * {@link Filter} modules may store arbitrary objects with {@code HttpExchange} + * instances as an out-of-band communication mechanism. Other filters * or the exchange handler may then access these objects. - * <p> - * Each Filter class will document the attributes which they make + * + * <p> Each {@code Filter} class will document the attributes which they make * available. - * @param name the name to associate with the attribute value + * + * @param name the name to associate with the attribute value * @param value the object to store as the attribute value. {@code null} - * value is permitted. + * value is permitted. * @throws NullPointerException if name is {@code null} */ - public abstract void setAttribute (String name, Object value) ; + public abstract void setAttribute(String name, Object value); /** - * Used by Filters to wrap either (or both) of this exchange's InputStream - * and OutputStream, with the given filtered streams so - * that subsequent calls to {@link #getRequestBody()} will - * return the given {@link java.io.InputStream}, and calls to - * {@link #getResponseBody()} will return the given - * {@link java.io.OutputStream}. The streams provided to this - * call must wrap the original streams, and may be (but are not - * required to be) sub-classes of {@link java.io.FilterInputStream} - * and {@link java.io.FilterOutputStream}. - * @param i the filtered input stream to set as this object's inputstream, - * or {@code null} if no change. - * @param o the filtered output stream to set as this object's outputstream, - * or {@code null} if no change. + * Used by {@linkplain com.sun.net.httpserver.Filter Filters} to wrap either + * (or both) of this exchange's {@link InputStream} and + * {@link OutputStream}, with the given filtered streams so that + * subsequent calls to {@link #getRequestBody()} will return the given + * {@code InputStream}, and calls to {@link #getResponseBody()} will return + * the given {@code OutputStream}. The streams provided to this call must wrap + * the original streams, and may be (but are not required to be) sub-classes + * of {@link java.io.FilterInputStream} and {@link java.io.FilterOutputStream}. + * + * @param i the filtered input stream to set as this object's + * {@code Inputstream}, or {@code null} if no change + * @param o the filtered output stream to set as this object's + * {@code Outputstream}, or {@code null} if no change */ - public abstract void setStreams (InputStream i, OutputStream o); + public abstract void setStreams(InputStream i, OutputStream o); /** - * If an authenticator is set on the HttpContext that owns this exchange, + * If an authenticator is set on the {@link HttpContext} that owns this exchange, * then this method will return the {@link HttpPrincipal} that represents - * the authenticated user for this HttpExchange. - * @return the HttpPrincipal, or {@code null} if no authenticator is set. + * the authenticated user for this {@code HttpExchange}. + * + * @return the {@code HttpPrincipal}, or {@code null} if no authenticator is set */ - public abstract HttpPrincipal getPrincipal (); + public abstract HttpPrincipal getPrincipal(); } diff --git a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpPrincipal.java b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpPrincipal.java index b0b6bdc84a8..863c74c9a38 100644 --- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpPrincipal.java +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpPrincipal.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -24,9 +24,6 @@ */ package com.sun.net.httpserver; -import java.net.*; -import java.io.*; -import java.util.*; import java.security.Principal; /** @@ -75,6 +72,8 @@ public String getName() { /** * returns the username this object was created with. + * + * @return The name of the user assoicated with this object */ public String getUsername() { return username; @@ -82,6 +81,8 @@ public String getUsername() { /** * returns the realm this object was created with. + * + * @return The realm associated with this object */ public String getRealm() { return realm; diff --git a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java index fb3fcc7da11..0067334f417 100644 --- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -25,246 +25,274 @@ package com.sun.net.httpserver; -import java.net.*; -import java.io.*; -import java.nio.*; -import java.security.*; -import java.nio.channels.*; -import java.util.*; -import java.util.concurrent.*; -import javax.net.ssl.*; import com.sun.net.httpserver.spi.HttpServerProvider; +import java.io.IOException; +import java.net.BindException; +import java.net.InetSocketAddress; +import java.util.concurrent.Executor; + /** - * This class implements a simple HTTP server. A HttpServer is bound to an IP address + * This class implements a simple HTTP server. A {@code HttpServer} is bound to an IP address * and port number and listens for incoming TCP connections from clients on this address. * The sub-class {@link HttpsServer} implements a server which handles HTTPS requests. - * <p> - * One or more {@link HttpHandler} objects must be associated with a server - * in order to process requests. Each such HttpHandler is registered - * with a root URI path which represents the - * location of the application or service on this server. The mapping of a handler - * to a HttpServer is encapsulated by a {@link HttpContext} object. HttpContexts - * are created by calling {@link #createContext(String,HttpHandler)}. + * + * <p>One or more {@link HttpHandler} objects must be associated with a server + * in order to process requests. Each such {@code HttpHandler} is registered with + * a root URI path which represents the location of the application or service + * on this server. The mapping of a handler to a {@code HttpServer} is + * encapsulated by a {@link HttpContext} object. HttpContexts are created by + * calling {@link #createContext(String,HttpHandler)}. * Any request for which no handler can be found is rejected with a 404 response. * Management of threads can be done external to this object by providing a * {@link java.util.concurrent.Executor} object. If none is provided a default * implementation is used. - * <p> - * <a id="mapping_description"></a> - * <b>Mapping request URIs to HttpContext paths</b><p> - * When a HTTP request is received, - * the appropriate HttpContext (and handler) is located by finding the context - * whose path is the longest matching prefix of the request URI's path. - * Paths are matched literally, which means that the strings are compared - * case sensitively, and with no conversion to or from any encoded forms. - * For example. Given a HttpServer with the following HttpContexts configured. + * + * <p> <a id="mapping_description"></a> <b>Mapping request URIs to HttpContext paths</b> + * + * <p>When a HTTP request is received, the appropriate {@code HttpContext} + * (and handler) is located by finding the context whose path is the longest + * matching prefix of the request URI's path. Paths are matched literally, + * which means that the strings are compared case sensitively, and with no + * conversion to or from any encoded forms. For example, given a {@code HttpServer} + * with the following HttpContexts configured: + * * <table class="striped"><caption style="display:none">description</caption> - * <thead> - * <tr><th scope="col"><i>Context</i></th><th scope="col"><i>Context path</i></th></tr> - * </thead> - * <tbody> - * <tr><th scope="row">ctx1</th><td>"/"</td></tr> - * <tr><th scope="row">ctx2</th><td>"/apps/"</td></tr> - * <tr><th scope="row">ctx3</th><td>"/apps/foo/"</td></tr> - * </tbody> + * <thead> + * <tr> + * <th scope="col"><i>Context</i></th> + * <th scope="col"><i>Context path</i></th> + * </tr> + * </thead> + * <tbody> + * <tr><th scope="row">ctx1</th><td>"/"</td></tr> + * <tr><th scope="row">ctx2</th><td>"/apps/"</td></tr> + * <tr><th scope="row">ctx3</th><td>"/apps/foo/"</td></tr> + * </tbody> * </table> - * <p> - * the following table shows some request URIs and which, if any context they would - * match with. + * + * <p>The following table shows some request URIs and which, if any context they would + * match with: * <table class="striped"><caption style="display:none">description</caption> - * <thead> - * <tr><th scope="col"><i>Request URI</i></th><th scope="col"><i>Matches context</i></th></tr> - * </thead> - * <tbody> - * <tr><th scope="row">"http://foo.com/apps/foo/bar"</th><td>ctx3</td></tr> - * <tr><th scope="row">"http://foo.com/apps/Foo/bar"</th><td>no match, wrong case</td></tr> - * <tr><th scope="row">"http://foo.com/apps/app1"</th><td>ctx2</td></tr> - * <tr><th scope="row">"http://foo.com/foo"</th><td>ctx1</td></tr> - * </tbody> + * <thead> + * <tr> + * <th scope="col"><i>Request URI</i></th> + * <th scope="col"><i>Matches context</i></th> + * </tr> + * </thead> + * <tbody> + * <tr><th scope="row">"http://foo.com/apps/foo/bar"</th><td>ctx3</td></tr> + * <tr><th scope="row">"http://foo.com/apps/Foo/bar"</th><td>no match, wrong case</td></tr> + * <tr><th scope="row">"http://foo.com/apps/app1"</th><td>ctx2</td></tr> + * <tr><th scope="row">"http://foo.com/foo"</th><td>ctx1</td></tr> + * </tbody> * </table> - * <p> - * <b>Note about socket backlogs</b><p> - * When binding to an address and port number, the application can also specify an integer - * <i>backlog</i> parameter. This represents the maximum number of incoming TCP connections - * which the system will queue internally. Connections are queued while they are waiting to - * be accepted by the HttpServer. When the limit is reached, further connections may be - * rejected (or possibly ignored) by the underlying TCP implementation. Setting the right - * backlog value is a compromise between efficient resource usage in the TCP layer (not setting - * it too high) and allowing adequate throughput of incoming requests (not setting it too low). + * + * <p><b>Note about socket backlogs</b> + * + * <p>When binding to an address and port number, the application can also + * specify an integer <i>backlog</i> parameter. This represents the maximum + * number of incoming TCP connections which the system will queue internally. + * Connections are queued while they are waiting to be accepted by the + * {@code HttpServer}. When the limit is reached, further connections may be + * rejected (or possibly ignored) by the underlying TCP implementation. Setting + * the right backlog value is a compromise between efficient resource usage in + * the TCP layer (not setting it too high) and allowing adequate throughput of + * incoming requests (not setting it too low). + * * @since 1.6 */ public abstract class HttpServer { /** + * Constructor for subclasses to call. */ - protected HttpServer () { + protected HttpServer() { } /** - * creates a HttpServer instance which is initially not bound to any local address/port. - * The HttpServer is acquired from the currently installed {@link HttpServerProvider} - * The server must be bound using {@link #bind(InetSocketAddress,int)} before it can be used. - * @throws IOException + * Creates a {@code HttpServer} instance which is initially not bound to any + * local address/port. The {@code HttpServer} is acquired from the currently + * installed {@link HttpServerProvider}. The server must be bound using + * {@link #bind(InetSocketAddress,int)} before it can be used. + * + * @throws IOException if an I/O error occurs + * @return an instance of {@code HttpServer} */ - public static HttpServer create () throws IOException { + public static HttpServer create() throws IOException { return create (null, 0); } /** - * Create a <code>HttpServer</code> instance which will bind to the - * specified {@link java.net.InetSocketAddress} (IP address and port number) + * Create a {@code HttpServer} instance which will bind to the + * specified {@link java.net.InetSocketAddress} (IP address and port number). * * A maximum backlog can also be specified. This is the maximum number of * queued incoming connections to allow on the listening socket. - * Queued TCP connections exceeding this limit may be rejected by the TCP implementation. - * The HttpServer is acquired from the currently installed {@link HttpServerProvider} + * Queued TCP connections exceeding this limit may be rejected by the TCP + * implementation. The {@code HttpServer} is acquired from the currently + * installed {@link HttpServerProvider} * - * @param addr the address to listen on, if <code>null</code> then bind() must be called - * to set the address + * @param addr the address to listen on, if {@code null} then + * {@link #bind(InetSocketAddress, int)} must be called to set + * the address * @param backlog the socket backlog. If this value is less than or equal to zero, - * then a system default value is used. + * then a system default value is used + * @throws IOException if an I/O error occurs * @throws BindException if the server cannot bind to the requested address, - * or if the server is already bound. - * @throws IOException + * or if the server is already bound + * @return an instance of {@code HttpServer} */ - public static HttpServer create ( - InetSocketAddress addr, int backlog - ) throws IOException { + public static HttpServer create(InetSocketAddress addr, int backlog) throws IOException { HttpServerProvider provider = HttpServerProvider.provider(); return provider.createHttpServer (addr, backlog); } /** - * Binds a currently unbound HttpServer to the given address and port number. - * A maximum backlog can also be specified. This is the maximum number of - * queued incoming connections to allow on the listening socket. - * Queued TCP connections exceeding this limit may be rejected by the TCP implementation. + * Binds a currently unbound {@code HttpServer} to the given address and + * port number. A maximum backlog can also be specified. This is the maximum + * number of queued incoming connections to allow on the listening socket. + * Queued TCP connections exceeding this limit may be rejected by the TCP + * implementation. + * * @param addr the address to listen on - * @param backlog the socket backlog. If this value is less than or equal to zero, - * then a system default value is used. - * @throws BindException if the server cannot bind to the requested address or if the server - * is already bound. - * @throws NullPointerException if addr is <code>null</code> + * @param backlog the socket backlog. If this value is less than or equal to + * zero, then a system default value is used + * @throws BindException if the server cannot bind to the requested address + * or if the server is already bound + * @throws NullPointerException if addr is {@code null} */ - public abstract void bind (InetSocketAddress addr, int backlog) throws IOException; + public abstract void bind(InetSocketAddress addr, int backlog) throws IOException; /** * Starts this server in a new background thread. The background thread * inherits the priority, thread group and context class loader * of the caller. */ - public abstract void start () ; + public abstract void start(); /** - * sets this server's {@link java.util.concurrent.Executor} object. An - * Executor must be established before {@link #start()} is called. + * Sets this server's {@link java.util.concurrent.Executor} object. An + * {@code Executor} must be established before {@link #start()} is called. * All HTTP requests are handled in tasks given to the executor. - * If this method is not called (before start()) or if it is - * called with a <code>null</code> Executor, then - * a default implementation is used, which uses the thread - * which was created by the {@link #start()} method. - * @param executor the Executor to set, or <code>null</code> for default - * implementation + * If this method is not called (before {@link #start()}) or if it is called + * with a {@code null Executor}, then a default implementation is used, + * which uses the thread which was created by the {@link #start()} method. + * + * @param executor the {@code Executor} to set, or {@code null} for default + * implementation * @throws IllegalStateException if the server is already started */ - public abstract void setExecutor (Executor executor); + public abstract void setExecutor(Executor executor); /** - * returns this server's Executor object if one was specified with - * {@link #setExecutor(Executor)}, or <code>null</code> if none was - * specified. - * @return the Executor established for this server or <code>null</code> if not set. + * Returns this server's {@code Executor} object if one was specified with + * {@link #setExecutor(Executor)}, or {@code null} if none was specified. + * + * @return the {@code Executor} established for this server or {@code null} if not set. */ - public abstract Executor getExecutor () ; + public abstract Executor getExecutor() ; /** - * stops this server by closing the listening socket and disallowing + * Stops this server by closing the listening socket and disallowing * any new exchanges from being processed. The method will then block * until all current exchange handlers have completed or else when * approximately <i>delay</i> seconds have elapsed (whichever happens * sooner). Then, all open TCP connections are closed, the background - * thread created by start() exits, and the method returns. - * Once stopped, a HttpServer cannot be re-used. + * thread created by {@link #start()} exits, and the method returns. + * Once stopped, a {@code HttpServer} cannot be re-used. * - * @param delay the maximum time in seconds to wait until exchanges have finished. - * @throws IllegalArgumentException if delay is less than zero. + * @param delay the maximum time in seconds to wait until exchanges have finished + * @throws IllegalArgumentException if delay is less than zero */ - public abstract void stop (int delay); + public abstract void stop(int delay); /** - * Creates a HttpContext. A HttpContext represents a mapping from a - * URI path to a exchange handler on this HttpServer. Once created, all requests - * received by the server for the path will be handled by calling - * the given handler object. The context is identified by the path, and - * can later be removed from the server using this with the {@link #removeContext(String)} method. - * <p> - * The path specifies the root URI path for this context. The first character of path must be - * '/'. <p> - * The class overview describes how incoming request URIs are <a href="#mapping_description">mapped</a> - * to HttpContext instances. - * @apiNote The path should generally, but is not required to, end with '/'. If the path does not - * end with '/', eg such as with {@code "/foo"} then this would match requests with a path of - * {@code "/foobar"} or {@code "/foo/bar"}. + * Creates a {@code HttpContext}. A {@code HttpContext} represents a mapping + * from a URI path to a exchange handler on this {@code HttpServer}. Once + * created, all requests received by the server for the path will be handled + * by calling the given handler object. The context is identified by the + * path, and can later be removed from the server using this with the + * {@link #removeContext(String)} method. + * + * <p> The path specifies the root URI path for this context. The first + * character of path must be '/'. + * + * <p>The class overview describes how incoming request URIs are + * <a href="#mapping_description">mapped</a> to HttpContext instances. + * + * @apiNote The path should generally, but is not required to, end with '/'. + * If the path does not end with '/', eg such as with {@code "/foo"} then + * this would match requests with a path of {@code "/foobar"} or + * {@code "/foo/bar"}. * * @param path the root URI path to associate the context with - * @param handler the handler to invoke for incoming requests. + * @param handler the handler to invoke for incoming requests * @throws IllegalArgumentException if path is invalid, or if a context - * already exists for this path - * @throws NullPointerException if either path, or handler are <code>null</code> + * already exists for this path + * @throws NullPointerException if either path, or handler are {@code null} + * @return an instance of {@code HttpContext} */ - public abstract HttpContext createContext (String path, HttpHandler handler) ; + public abstract HttpContext createContext(String path, HttpHandler handler); /** - * Creates a HttpContext without initially specifying a handler. The handler must later be specified using - * {@link HttpContext#setHandler(HttpHandler)}. A HttpContext represents a mapping from a - * URI path to an exchange handler on this HttpServer. Once created, and when - * the handler has been set, all requests - * received by the server for the path will be handled by calling - * the handler object. The context is identified by the path, and - * can later be removed from the server using this with the {@link #removeContext(String)} method. - * <p> - * The path specifies the root URI path for this context. The first character of path must be - * '/'. <p> - * The class overview describes how incoming request URIs are <a href="#mapping_description">mapped</a> - * to HttpContext instances. - * @apiNote The path should generally, but is not required to, end with '/'. If the path does not - * end with '/', eg such as with {@code "/foo"} then this would match requests with a path of - * {@code "/foobar"} or {@code "/foo/bar"}. + * Creates a HttpContext without initially specifying a handler. The handler + * must later be specified using {@link HttpContext#setHandler(HttpHandler)}. + * A {@code HttpContext} represents a mapping from a URI path to an exchange + * handler on this {@code HttpServer}. Once created, and when the handler has + * been set, all requests received by the server for the path will be handled + * by calling the handler object. The context is identified by the path, and + * can later be removed from the server using this with the + * {@link #removeContext(String)} method. + * + * <p>The path specifies the root URI path for this context. The first character of path must be + * '/'. + * + * <p>The class overview describes how incoming request URIs are + * <a href="#mapping_description">mapped</a> to {@code HttpContext} instances. + * + * @apiNote The path should generally, but is not required to, end with '/'. + * If the path does not end with '/', eg such as with {@code "/foo"} then + * this would match requests with a path of {@code "/foobar"} or + * {@code "/foo/bar"}. * * @param path the root URI path to associate the context with * @throws IllegalArgumentException if path is invalid, or if a context - * already exists for this path - * @throws NullPointerException if path is <code>null</code> + * already exists for this path + * @throws NullPointerException if path is {@code null} + * @return an instance of {@code HttpContext} */ - public abstract HttpContext createContext (String path) ; + public abstract HttpContext createContext(String path); /** * Removes the context identified by the given path from the server. * Removing a context does not affect exchanges currently being processed * but prevents new ones from being accepted. + * * @param path the path of the handler to remove * @throws IllegalArgumentException if no handler corresponding to this - * path exists. - * @throws NullPointerException if path is <code>null</code> + * path exists. + * @throws NullPointerException if path is {@code null} */ - public abstract void removeContext (String path) throws IllegalArgumentException ; + public abstract void removeContext(String path) throws IllegalArgumentException; /** * Removes the given context from the server. * Removing a context does not affect exchanges currently being processed * but prevents new ones from being accepted. + * * @param context the context to remove - * @throws NullPointerException if context is <code>null</code> + * @throws NullPointerException if context is {@code null} */ - public abstract void removeContext (HttpContext context) ; + public abstract void removeContext(HttpContext context); /** - * returns the address this server is listening on - * @return the address/port number the server is listening on + * Returns the address this server is listening on + * + * @return the {@code InetSocketAddress} the server is listening on */ - public abstract InetSocketAddress getAddress() ; + public abstract InetSocketAddress getAddress(); } diff --git a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsParameters.java b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsParameters.java index 0aabee08be1..2066aca62b2 100644 --- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsParameters.java +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,7 +24,9 @@ */ package com.sun.net.httpserver; + import java.net.InetSocketAddress; + //BEGIN_TIGER_EXCLUDE import javax.net.ssl.SSLParameters; //END_TIGER_EXCLUDE @@ -56,16 +58,23 @@ public abstract class HttpsParameters { private boolean wantClientAuth; private boolean needClientAuth; + /** + * Constructor for subclasses to call. + */ protected HttpsParameters() {} /** * Returns the HttpsConfigurator for this HttpsParameters. + * + * @return HttpsConfigurator for this instance of HttpsParameters */ public abstract HttpsConfigurator getHttpsConfigurator(); /** * Returns the address of the remote client initiating the * connection. + * + * @return Address of the remote client initiating the connection */ public abstract InetSocketAddress getClientAddress(); diff --git a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/spi/HttpServerProvider.java b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/spi/HttpServerProvider.java index ef281e1d239..99ded405d00 100644 --- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/spi/HttpServerProvider.java +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/spi/HttpServerProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -25,14 +25,16 @@ package com.sun.net.httpserver.spi; +import com.sun.net.httpserver.HttpServer; +import com.sun.net.httpserver.HttpsServer; + import java.io.IOException; -import java.net.*; +import java.net.InetSocketAddress; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Iterator; -import java.util.ServiceLoader; import java.util.ServiceConfigurationError; -import com.sun.net.httpserver.*; +import java.util.ServiceLoader; /** * Service provider class for HttpServer. @@ -50,6 +52,8 @@ public abstract class HttpServerProvider { * * @param backlog * the socket backlog. A value of {@code zero} means the systems default + * @throws IOException if an I/O error occurs + * @return An instance of HttpServer */ public abstract HttpServer createHttpServer(InetSocketAddress addr, int backlog) @@ -63,6 +67,8 @@ public abstract HttpServer createHttpServer(InetSocketAddress addr, * * @param backlog * the socket backlog. A value of {@code zero} means the systems default + * @throws IOException if an I/O error occurs + * @return An instance of HttpServer */ public abstract HttpsServer createHttpsServer(InetSocketAddress addr, int backlog) diff --git a/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/DesktopIntegration.java b/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/DesktopIntegration.java index 41246d4c4ee..9396bfb93c3 100644 --- a/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/DesktopIntegration.java +++ b/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/DesktopIntegration.java @@ -46,6 +46,7 @@ import javax.imageio.ImageIO; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; +import jdk.incubator.jpackage.internal.Arguments.CLIOptions; import static jdk.incubator.jpackage.internal.LinuxAppImageBuilder.DEFAULT_ICON; import static jdk.incubator.jpackage.internal.LinuxAppImageBuilder.ICON_PNG; import static jdk.incubator.jpackage.internal.OverridableResource.createResource; @@ -54,6 +55,7 @@ import static jdk.incubator.jpackage.internal.StandardBundlerParam.DESCRIPTION; import static jdk.incubator.jpackage.internal.StandardBundlerParam.FILE_ASSOCIATIONS; import static jdk.incubator.jpackage.internal.StandardBundlerParam.ICON; +import static jdk.incubator.jpackage.internal.StandardBundlerParam.PREDEFINED_APP_IMAGE; /** * Helper to create files for desktop integration. @@ -133,12 +135,32 @@ private DesktopIntegration(PlatformPackage thePackage, createDataForDesktopFile(params)); nestedIntegrations = new ArrayList<>(); - for (var launcherParams : launchers) { - launcherParams = AddLauncherArguments.merge(params, launcherParams, + // Read launchers information from predefine app image + if (launchers.isEmpty() && + PREDEFINED_APP_IMAGE.fetchFrom(params) != null) { + List<String> launcherPaths = AppImageFile.getLauncherNames( + PREDEFINED_APP_IMAGE.fetchFrom(params), params); + if (!launcherPaths.isEmpty()) { + launcherPaths.remove(0); // Remove main launcher + } + for (var launcherPath : launcherPaths) { + Map<String, ? super Object> launcherParams = new HashMap<>(); + Arguments.putUnlessNull(launcherParams, CLIOptions.NAME.getId(), + launcherPath); + launcherParams = AddLauncherArguments.merge(params, launcherParams, ICON.getID(), ICON_PNG.getID(), ADD_LAUNCHERS.getID(), - FILE_ASSOCIATIONS.getID()); - nestedIntegrations.add(new DesktopIntegration(thePackage, - launcherParams, params)); + FILE_ASSOCIATIONS.getID(), PREDEFINED_APP_IMAGE.getID()); + nestedIntegrations.add(new DesktopIntegration(thePackage, + launcherParams, params)); + } + } else { + for (var launcherParams : launchers) { + launcherParams = AddLauncherArguments.merge(params, launcherParams, + ICON.getID(), ICON_PNG.getID(), ADD_LAUNCHERS.getID(), + FILE_ASSOCIATIONS.getID()); + nestedIntegrations.add(new DesktopIntegration(thePackage, + launcherParams, params)); + } } } diff --git a/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/LinuxPackageBundler.java b/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/LinuxPackageBundler.java index a10119491bc..5d67234180a 100644 --- a/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/LinuxPackageBundler.java +++ b/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/LinuxPackageBundler.java @@ -27,6 +27,7 @@ import java.io.IOException; import java.nio.file.InvalidPathException; import java.nio.file.Path; +import java.nio.file.Files; import java.text.MessageFormat; import java.util.Collections; import java.util.HashMap; @@ -182,13 +183,17 @@ private List<String> getListOfNeededPackages( } final List<String> neededLibPackages; - if (withFindNeededPackages) { + if (withFindNeededPackages && Files.exists(thePackage.sourceRoot())) { LibProvidersLookup lookup = new LibProvidersLookup(); initLibProvidersLookup(params, lookup); neededLibPackages = lookup.execute(thePackage.sourceRoot()); } else { neededLibPackages = Collections.emptyList(); + if (!Files.exists(thePackage.sourceRoot())) { + Log.info(I18N.getString("warning.foreign-app-image")); + + } } // Merge all package lists together. diff --git a/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/resources/LinuxResources.properties b/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/resources/LinuxResources.properties index 9ad1b2d6a4b..0474234e171 100644 --- a/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/resources/LinuxResources.properties +++ b/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/resources/LinuxResources.properties @@ -61,6 +61,8 @@ message.ldd-not-available=ldd command not found. Package dependencies will not b message.deb-ldd-not-available.advice=Install "libc-bin" DEB package to get ldd. message.rpm-ldd-not-available.advice=Install "glibc-common" RPM package to get ldd. +warning.foreign-app-image=Warning: app-image dir not generated by jpackage. + error.unexpected-package-property=Expected value of "{0}" property is [{1}]. Actual value in output package is [{2}]. Looks like custom "{3}" file from resource directory contained hard coded value of "{0}" property error.unexpected-package-property.advice=Use [{0}] pattern string instead of hard coded value [{1}] of {2} property in custom "{3}" file error.unexpected-default-package-property.advice=Don't explicitly set value of {0} property in custom "{1}" file diff --git a/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/resources/LinuxResources_ja.properties b/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/resources/LinuxResources_ja.properties index 5c751db4468..48a0f3438a9 100644 --- a/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/resources/LinuxResources_ja.properties +++ b/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/resources/LinuxResources_ja.properties @@ -40,6 +40,8 @@ resource.menu-shortcut-descriptor=\u30E1\u30CB\u30E5\u30FC\u30FB\u30B7\u30E7\u30 resource.menu-icon=\u30E1\u30CB\u30E5\u30FC\u30FB\u30A2\u30A4\u30B3\u30F3 resource.rpm-spec-file=RPM\u4ED5\u69D8\u30D5\u30A1\u30A4\u30EB +warning.foreign-app-image=Warning: app-image dir not generated by jpackage. + error.tool-not-found.advice=\u5FC5\u8981\u306A\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u304F\u3060\u3055\u3044 error.tool-old-version.advice=\u5FC5\u8981\u306A\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u304F\u3060\u3055\u3044 diff --git a/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/resources/LinuxResources_zh_CN.properties b/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/resources/LinuxResources_zh_CN.properties index c636d584a15..52feabd13f4 100644 --- a/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/resources/LinuxResources_zh_CN.properties +++ b/src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/resources/LinuxResources_zh_CN.properties @@ -40,6 +40,8 @@ resource.menu-shortcut-descriptor=\u83DC\u5355\u5FEB\u6377\u65B9\u5F0F\u63CF\u8F resource.menu-icon=\u83DC\u5355\u56FE\u6807 resource.rpm-spec-file=RPM \u89C4\u8303\u6587\u4EF6 +warning.foreign-app-image=Warning: app-image dir not generated by jpackage. + error.tool-not-found.advice=\u8BF7\u5B89\u88C5\u6240\u9700\u7684\u7A0B\u5E8F\u5305 error.tool-old-version.advice=\u8BF7\u5B89\u88C5\u6240\u9700\u7684\u7A0B\u5E8F\u5305 diff --git a/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacBaseInstallerBundler.java b/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacBaseInstallerBundler.java index 8184cc49fe6..1d7c999ba2d 100644 --- a/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacBaseInstallerBundler.java +++ b/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacBaseInstallerBundler.java @@ -187,7 +187,6 @@ public static String findKey(String keyPrefix, String teamName, String keychainN Log.error(MessageFormat.format(I18N.getString( "error.multiple.certs.found"), key, keychainName)); } - Log.verbose("Using key '" + matchedKey + "'"); return matchedKey; } catch (IOException ioe) { Log.verbose(ioe); diff --git a/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacDmgBundler.java b/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacDmgBundler.java index c599bc1e040..709f6f1a530 100644 --- a/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacDmgBundler.java +++ b/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacDmgBundler.java @@ -82,9 +82,6 @@ public Path bundle(Map<String, ? super Object> params, if (appLocation != null && prepareConfigFiles(params)) { Path configScript = getConfig_Script(params); if (IOUtils.exists(configScript)) { - Log.verbose(MessageFormat.format( - I18N.getString("message.running-script"), - configScript.toAbsolutePath().toString())); IOUtils.run("bash", configScript); } diff --git a/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacPkgBundler.java b/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacPkgBundler.java index c5f5fa0b2f3..5b5b8189234 100644 --- a/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacPkgBundler.java +++ b/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacPkgBundler.java @@ -142,9 +142,6 @@ public Path bundle(Map<String, ? super Object> params, Path configScript = getConfig_Script(params); if (IOUtils.exists(configScript)) { - Log.verbose(MessageFormat.format(I18N.getString( - "message.running-script"), - configScript.toAbsolutePath().toString())); IOUtils.run("bash", configScript); } diff --git a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/AddLauncherArguments.java b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/AddLauncherArguments.java index 79e3689a734..ade19cd2c3a 100644 --- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/AddLauncherArguments.java +++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/AddLauncherArguments.java @@ -30,6 +30,7 @@ import java.util.Map; import java.util.List; import jdk.incubator.jpackage.internal.Arguments.CLIOptions; +import static jdk.incubator.jpackage.internal.StandardBundlerParam.LAUNCHER_DATA; /* * AddLauncherArguments @@ -157,6 +158,9 @@ private String getOptionValue(CLIOptions option) { Map<String, ? super Object> tmp = new HashMap<>(original); List.of(exclude).forEach(tmp::remove); + // remove LauncherData from map so it will re-run the defaultValueFunction + tmp.remove(LAUNCHER_DATA.getID()); + if (additional.containsKey(CLIOptions.MODULE.getId())) { tmp.remove(CLIOptions.MAIN_JAR.getId()); tmp.remove(CLIOptions.APPCLASS.getId()); diff --git a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/AppImageFile.java b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/AppImageFile.java index 94072561fa7..d51f40fa825 100644 --- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/AppImageFile.java +++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/AppImageFile.java @@ -27,6 +27,8 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.nio.file.NoSuchFileException; +import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -214,8 +216,15 @@ static List<String> getLauncherNames(Path appImageDir, launchers.addAll(appImageInfo.getAddLauncherNames()); return launchers; } + } catch (NoSuchFileException nsfe) { + // non jpackage generated app-image (no app/.jpackage.xml) + Log.info(MessageFormat.format(I18N.getString( + "warning.foreign-app-image"), appImageDir)); } catch (IOException ioe) { Log.verbose(ioe); + Log.info(MessageFormat.format(I18N.getString( + "warning.invalid-app-image"), appImageDir)); + } launchers.add(APP_NAME.fetchFrom(params)); diff --git a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/Executor.java b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/Executor.java index 117563f042f..0ada00dec68 100644 --- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/Executor.java +++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/Executor.java @@ -75,6 +75,11 @@ Executor setCommandLine(String... cmdline) { return setProcessBuilder(new ProcessBuilder(cmdline)); } + Executor setQuiet(boolean v) { + quietCommand = v; + return this; + } + List<String> getOutput() { return output; } @@ -84,7 +89,7 @@ Executor executeExpectSuccess() throws IOException { if (0 != ret) { throw new IOException( String.format("Command %s exited with %d code", - createLogMessage(pb), ret)); + createLogMessage(pb, false), ret)); } return this; } @@ -108,7 +113,7 @@ int execute() throws IOException { pb.redirectOutput(ProcessBuilder.Redirect.DISCARD); } - Log.verbose(String.format("Running %s", createLogMessage(pb))); + Log.verbose(String.format("Running %s", createLogMessage(pb, true))); Process p = pb.start(); int code = 0; @@ -126,7 +131,7 @@ int execute() throws IOException { Supplier<Stream<String>> outputStream; if (writeOutputToFile) { - savedOutput = Files.readAllLines(outputFile); + output = savedOutput = Files.readAllLines(outputFile); Files.delete(outputFile); outputStream = () -> { if (savedOutput != null) { @@ -134,27 +139,20 @@ int execute() throws IOException { } return null; }; - - if (Log.isVerbose()) { - outputStream.get().forEach(Log::verbose); - } - if (outputConsumer != null) { outputConsumer.accept(outputStream.get()); } } else { try (var br = new BufferedReader(new InputStreamReader( p.getInputStream()))) { - // Need to save output if explicitely requested (saveOutput=true) or - // if will be used used by multiple consumers - if ((outputConsumer != null && Log.isVerbose()) || saveOutput) { + + if ((outputConsumer != null || Log.isVerbose()) + || saveOutput) { savedOutput = br.lines().collect(Collectors.toList()); - if (saveOutput) { - output = savedOutput; - } } else { savedOutput = null; } + output = savedOutput; outputStream = () -> { if (savedOutput != null) { @@ -162,11 +160,6 @@ int execute() throws IOException { } return br.lines(); }; - - if (Log.isVerbose()) { - outputStream.get().forEach(Log::verbose); - } - if (outputConsumer != null) { outputConsumer.accept(outputStream.get()); } @@ -188,6 +181,9 @@ int execute() throws IOException { if (!writeOutputToFile) { code = p.waitFor(); } + if (!quietCommand) { + Log.verbose(pb.command(), getOutput(), code); + } return code; } catch (InterruptedException ex) { Log.verbose(ex); @@ -203,7 +199,7 @@ private int waitForProcess(Process p) throws InterruptedException { return p.exitValue(); } else { Log.verbose(String.format("Command %s timeout after %d seconds", - createLogMessage(pb), timeout)); + createLogMessage(pb, false), timeout)); p.destroy(); return -1; } @@ -218,9 +214,9 @@ static Executor of(ProcessBuilder pb) { return new Executor().setProcessBuilder(pb); } - private static String createLogMessage(ProcessBuilder pb) { + private static String createLogMessage(ProcessBuilder pb, boolean quiet) { StringBuilder sb = new StringBuilder(); - sb.append(String.format("%s", pb.command())); + sb.append((quiet) ? pb.command().get(0) : pb.command()); if (pb.directory() != null) { sb.append(String.format("in %s", pb.directory().getAbsolutePath())); } @@ -232,6 +228,7 @@ private static String createLogMessage(ProcessBuilder pb) { private ProcessBuilder pb; private boolean saveOutput; private boolean writeOutputToFile; + private boolean quietCommand; private long timeout = INFINITE_TIMEOUT; private List<String> output; private Consumer<Stream<String>> outputConsumer; diff --git a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/IOUtils.java b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/IOUtils.java index b17aa5d8624..27ae1f175b9 100644 --- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/IOUtils.java +++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/IOUtils.java @@ -228,6 +228,7 @@ public static int getProcessOutput(List<String> result, String... args) t.start(); int ret = p.waitFor(); + Log.verbose(pb.command(), list, ret); result.clear(); result.addAll(list); diff --git a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/JLinkBundlerHelper.java b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/JLinkBundlerHelper.java index a3aecc1a3a2..cbd9eda8d43 100644 --- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/JLinkBundlerHelper.java +++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/JLinkBundlerHelper.java @@ -188,15 +188,16 @@ private static void runJLink(Path output, List<Path> modulePath, StringWriter writer = new StringWriter(); PrintWriter pw = new PrintWriter(writer); - Log.verbose("jlink arguments: " + args); int retVal = LazyLoad.JLINK_TOOL.run(pw, pw, args.toArray(new String[0])); String jlinkOut = writer.toString(); + args.add(0, "jlink"); + Log.verbose(args, List.of(jlinkOut), retVal); + + if (retVal != 0) { throw new PackagerException("error.jlink.failed" , jlinkOut); } - - Log.verbose("jlink output: " + jlinkOut); } private static String getPathList(List<Path> pathList) { diff --git a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/Log.java b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/Log.java index d69a3edd884..e1e6b1bff05 100644 --- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/Log.java +++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/Log.java @@ -28,6 +28,7 @@ import java.io.PrintWriter; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.List; /** * Log @@ -115,6 +116,25 @@ public void verbose(String msg) { } } + public void verbose(List<String> strings, + List<String> output, int returnCode) { + if (verbose) { + StringBuffer sb = new StringBuffer("Command:\n "); + for (String s : strings) { + sb.append(" " + s); + } + verbose(new String(sb)); + if (output != null && !output.isEmpty()) { + sb = new StringBuffer("Output:"); + for (String s : output) { + sb.append("\n " + s); + } + verbose(new String(sb)); + } + verbose("Returned: " + returnCode + "\n"); + } + } + private String addTimestamp(String msg) { SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss.SSS"); Date time = new Date(System.currentTimeMillis()); @@ -173,4 +193,11 @@ public static void verbose(Throwable t) { delegate.verbose(t); } } + + public static void verbose(List<String> strings, List<String> out, int ret) { + if (delegate != null) { + delegate.verbose(strings, out, ret); + } + } + } diff --git a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/ToolValidator.java b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/ToolValidator.java index 0bd52d6b4ac..497d46e19be 100644 --- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/ToolValidator.java +++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/ToolValidator.java @@ -94,7 +94,7 @@ ConfigException validate() { } String[] version = new String[1]; - Executor.of(pb).setOutputConsumer(lines -> { + Executor.of(pb).setQuiet(true).setOutputConsumer(lines -> { if (versionParser != null && minimalVersion != null) { version[0] = versionParser.apply(lines); if (minimalVersion.compareTo(version[0]) < 0) { diff --git a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/MainResources.properties b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/MainResources.properties index e4e949b6880..37fa371f3e8 100644 --- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/MainResources.properties +++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/MainResources.properties @@ -74,6 +74,8 @@ error.jlink.failed=jlink failed with: {0} error.blocked.option=jlink option [{0}] is not permitted in --jlink-options warning.no.jdk.modules.found=Warning: No JDK Modules found +warning.foreign-app-image=Warning: app-image dir ({0}) not generated by jpackage. +warning.invalid-app-image=Warning: cannot parse .jpackage.xml in app-image dir ({0}) MSG_BundlerFailed=Error: Bundler "{1}" ({0}) failed to produce a package MSG_BundlerConfigException=Bundler {0} skipped because of a configuration problem: {1} \n\ diff --git a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/MainResources_ja.properties b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/MainResources_ja.properties index fbdee54023b..62ffe2d521e 100644 --- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/MainResources_ja.properties +++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/MainResources_ja.properties @@ -74,6 +74,8 @@ error.jlink.failed=jlink\u304C\u6B21\u3067\u5931\u6557\u3057\u307E\u3057\u305F: error.blocked.option=jlink\u30AA\u30D7\u30B7\u30E7\u30F3[{0}]\u306F--jlink-options\u3067\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093 warning.no.jdk.modules.found=\u8B66\u544A: JDK\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +warning.foreign-app-image=Warning: app-image dir ({0}) not generated by jpackage. +warning.invalid-app-image=Warning: cannot parse .jpackage.xml in app-image dir ({0}) MSG_BundlerFailed=\u30A8\u30E9\u30FC: \u30D0\u30F3\u30C9\u30E9"{1}" ({0})\u304C\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F MSG_BundlerConfigException=\u69CB\u6210\u306E\u554F\u984C\u306E\u305F\u3081\u3001\u30D0\u30F3\u30C9\u30E9{0}\u304C\u30B9\u30AD\u30C3\u30D7\u3055\u308C\u307E\u3057\u305F: {1} \n\u6B21\u306E\u4FEE\u6B63\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044: {2} diff --git a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/MainResources_zh_CN.properties b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/MainResources_zh_CN.properties index ac17730e530..41e7e09fbb4 100644 --- a/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/MainResources_zh_CN.properties +++ b/src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/resources/MainResources_zh_CN.properties @@ -74,6 +74,8 @@ error.jlink.failed=jlink \u5931\u8D25\uFF0C\u51FA\u73B0 {0} error.blocked.option=\u4E0D\u5141\u8BB8\u5728 --jlink-options \u4E2D\u4F7F\u7528 jlink \u9009\u9879 [{0}] warning.no.jdk.modules.found=\u8B66\u544A: \u672A\u627E\u5230 JDK \u6A21\u5757 +warning.foreign-app-image=Warning: app-image dir ({0}) not generated by jpackage. +warning.invalid-app-image=Warning: cannot parse .jpackage.xml in app-image dir ({0}) MSG_BundlerFailed=\u9519\u8BEF\uFF1A\u6253\u5305\u7A0B\u5E8F "{1}" ({0}) \u65E0\u6CD5\u751F\u6210\u7A0B\u5E8F\u5305 MSG_BundlerConfigException=\u7531\u4E8E\u914D\u7F6E\u95EE\u9898, \u8DF3\u8FC7\u4E86\u6253\u5305\u7A0B\u5E8F{0}: {1} \n\u4FEE\u590D\u5EFA\u8BAE: {2} diff --git a/src/jdk.incubator.jpackage/windows/classes/jdk/incubator/jpackage/internal/WinMsiBundler.java b/src/jdk.incubator.jpackage/windows/classes/jdk/incubator/jpackage/internal/WinMsiBundler.java index 91444580d05..bc684368c61 100644 --- a/src/jdk.incubator.jpackage/windows/classes/jdk/incubator/jpackage/internal/WinMsiBundler.java +++ b/src/jdk.incubator.jpackage/windows/classes/jdk/incubator/jpackage/internal/WinMsiBundler.java @@ -406,7 +406,9 @@ private Map<String, String> prepareMainProjectFile( data.put("JpAppDescription", DESCRIPTION.fetchFrom(params)); data.put("JpAppVendor", VENDOR.fetchFrom(params)); data.put("JpAppVersion", PRODUCT_VERSION.fetchFrom(params)); - data.put("JpIcon", installerIcon.toString()); + if (Files.exists(installerIcon)) { + data.put("JpIcon", installerIcon.toString()); + } final Path configDir = CONFIG_ROOT.fetchFrom(params); diff --git a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ImplicitExceptionDispatch.java b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ImplicitExceptionDispatch.java new file mode 100644 index 00000000000..2d4bf6eec45 --- /dev/null +++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/ImplicitExceptionDispatch.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package jdk.vm.ci.code.site; + +import jdk.vm.ci.code.DebugInfo; + +/** + * Represents an implicit exception dispatch in the code. Implicit exception dispatch is a + * platform-specific optimization that makes use of an operating system's trap mechanism, to turn + * specific branches into sequential code with implicit traps. Information contained in this class + * will be used by the runtime to register implicit exception dispatch, i.e., a mapping from an + * exceptional PC offset to a continuation PC offset. + */ +public final class ImplicitExceptionDispatch extends Infopoint { + + public final int dispatchOffset; + + /** + * Construct an implicit exception dispatch. + * + * @param pcOffset the exceptional PC offset + * @param dispatchOffset the continuation PC offset + * @param debugInfo debugging information at the exceptional PC + */ + public ImplicitExceptionDispatch(int pcOffset, int dispatchOffset, DebugInfo debugInfo) { + super(pcOffset, debugInfo, InfopointReason.IMPLICIT_EXCEPTION); + this.dispatchOffset = dispatchOffset; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj instanceof ImplicitExceptionDispatch && super.equals(obj)) { + ImplicitExceptionDispatch that = (ImplicitExceptionDispatch) obj; + if (this.dispatchOffset == that.dispatchOffset) { + return true; + } + } + return false; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(pcOffset); + sb.append("->"); + sb.append(dispatchOffset); + + if (debugInfo != null) { + appendDebugInfo(sb, debugInfo); + } + + return sb.toString(); + } +} diff --git a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java index 01fba5744ca..4b8b7a26e10 100644 --- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java +++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -109,8 +109,8 @@ default boolean isDefault() { /** * Determines if this method denotes itself as a candidate for intrinsification. As of JDK 9, - * this is denoted by the {@code HotSpotIntrinsicCandidate} annotation. In earlier JDK versions, - * this method returns true. + * this is denoted by the {@code IntrinsicCandidate} annotation. In earlier JDK versions, this + * method returns true. * * @see <a href="https://bugs.openjdk.java.net/browse/JDK-8076112">JDK-8076112</a> */ diff --git a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java index aa7cd43aa6a..e4ca3c46ca4 100644 --- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java +++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java @@ -77,6 +77,7 @@ final class HotSpotResolvedObjectTypeImpl extends HotSpotResolvedJavaType implem private HotSpotConstantPool constantPool; private final JavaConstant mirror; private HotSpotResolvedObjectTypeImpl superClass; + private HotSpotResolvedJavaType componentType; /** * Managed exclusively by {@link HotSpotJDKReflection#getField}. @@ -157,7 +158,14 @@ public int getAccessFlags() { @Override public ResolvedJavaType getComponentType() { - return runtime().compilerToVm.getComponentType(this); + if (componentType == null) { + if (isArray()) { + componentType = runtime().compilerToVm.getComponentType(this); + } else { + componentType = this; + } + } + return this.equals(componentType) ? null : componentType; } @Override @@ -299,12 +307,12 @@ public HotSpotResolvedObjectTypeImpl getSingleImplementor() { @Override public HotSpotResolvedObjectTypeImpl getSupertype() { - if (isArray()) { - ResolvedJavaType componentType = getComponentType(); - if (componentType.equals(getJavaLangObject()) || componentType.isPrimitive()) { + ResolvedJavaType component = getComponentType(); + if (component != null) { + if (component.equals(getJavaLangObject()) || component.isPrimitive()) { return getJavaLangObject(); } - HotSpotResolvedObjectTypeImpl supertype = ((HotSpotResolvedObjectTypeImpl) componentType).getSupertype(); + HotSpotResolvedObjectTypeImpl supertype = ((HotSpotResolvedObjectTypeImpl) component).getSupertype(); return (HotSpotResolvedObjectTypeImpl) supertype.getArrayClass(); } if (isInterface()) { @@ -472,6 +480,11 @@ public ResolvedJavaMethod resolveMethod(ResolvedJavaMethod method, ResolvedJavaT if (!method.getDeclaringClass().isAssignableFrom(this)) { return null; } + if (method.isConstructor()) { + // Constructor calls should have been checked in the verifier and method's + // declaring class is assignable from this (see above) so treat it as resolved. + return method; + } HotSpotResolvedJavaMethodImpl hotSpotMethod = (HotSpotResolvedJavaMethodImpl) method; HotSpotResolvedObjectTypeImpl hotSpotCallerType = (HotSpotResolvedObjectTypeImpl) callerType; return compilerToVM().resolveMethod(this, hotSpotMethod, hotSpotCallerType); diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/LIRCompilerBackend.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/LIRCompilerBackend.java index 4db96954afa..4d60afae854 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/LIRCompilerBackend.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/LIRCompilerBackend.java @@ -79,7 +79,7 @@ public class LIRCompilerBackend { public static <T extends CompilationResult> void emitBackEnd(StructuredGraph graph, Object stub, ResolvedJavaMethod installedCodeOwner, Backend backend, T compilationResult, CompilationResultBuilderFactory factory, RegisterConfig registerConfig, LIRSuites lirSuites) { DebugContext debug = graph.getDebug(); - try (DebugContext.Scope s = debug.scope("BackEnd", graph.getLastSchedule()); DebugCloseable a = BackEnd.start(debug)) { + try (DebugContext.Scope s = debug.scope("BackEnd", graph, graph.getLastSchedule()); DebugCloseable a = BackEnd.start(debug)) { LIRGenerationResult lirGen = null; lirGen = emitLIR(backend, graph, stub, registerConfig, lirSuites); try (DebugContext.Scope s2 = debug.scope("CodeGen", lirGen, lirGen.getLIR())) { diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java index 6f197f47d5e..0139bbc4124 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java @@ -551,14 +551,22 @@ public LIRInstruction createZapArgumentSpace(StackSlot[] zappedStack, JavaConsta @Override public void emitZeroMemory(Value address, Value length, boolean isAligned) { - int dczidValue = config.psrInfoDczidValue; - EnumSet<AArch64.Flag> flags = ((AArch64) target().arch).getFlags(); - - // ARMv8-A architecture reference manual D12.2.35 Data Cache Zero ID register says: - // * BS, bits [3:0] indicate log2 of the DC ZVA block size in (4-byte) words. - // * DZP, bit [4] of indicates whether use of DC ZVA instruction is prohibited. - int zvaLength = 4 << (dczidValue & 0xF); - boolean isDcZvaProhibited = ((dczidValue & 0x10) != 0); + final EnumSet<AArch64.Flag> flags = ((AArch64) target().arch).getFlags(); + + boolean isDcZvaProhibited = true; + int zvaLength = 0; + if (GraalHotSpotVMConfig.JDK >= 16) { + zvaLength = config.zvaLength; + isDcZvaProhibited = 0 == config.zvaLength; + } else { + int dczidValue = config.psrInfoDczidValue; + + // ARMv8-A architecture reference manual D12.2.35 Data Cache Zero ID register says: + // * BS, bits [3:0] indicate log2 of the DC ZVA block size in (4-byte) words. + // * DZP, bit [4] of indicates whether use of DC ZVA instruction is prohibited. + zvaLength = 4 << (dczidValue & 0xF); + isDcZvaProhibited = ((dczidValue & 0x10) != 0); + } // Use DC ZVA if it's not prohibited and AArch64 HotSpot flag UseBlockZeroing is on. boolean useDcZva = !isDcZvaProhibited && flags.contains(AArch64.Flag.UseBlockZeroing); diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ArrayCopyIntrinsificationTest.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ArrayCopyIntrinsificationTest.java index 84e0c85d6c2..c124af209ed 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ArrayCopyIntrinsificationTest.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ArrayCopyIntrinsificationTest.java @@ -28,14 +28,15 @@ import java.util.ArrayList; import java.util.HashMap; +import org.graalvm.compiler.api.directives.GraalDirectives; import org.graalvm.compiler.core.test.GraalCompilerTest; import org.graalvm.compiler.graph.Node; -import org.graalvm.compiler.replacements.arraycopy.ArrayCopySnippets; import org.graalvm.compiler.nodes.DirectCallTargetNode; import org.graalvm.compiler.nodes.Invoke; import org.graalvm.compiler.nodes.LoweredCallTargetNode; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.options.OptionValues; +import org.graalvm.compiler.replacements.arraycopy.ArrayCopySnippets; import org.junit.Assert; import org.junit.Test; @@ -370,4 +371,22 @@ public void testObjectArrayExceptions() { test("objectArraycopyCatchArrayStoreException", longSource, 4, integerDest, 2, 3); test("objectArraycopyCatchArrayIndexException", new Integer[128], 0, new Integer[128], Integer.MAX_VALUE, 1); } + + @Test + public void testArraycopyDeoptWithSideEffect() { + ArgSupplier s = () -> new int[4]; + int[] b = new int[]{1, 1, 1, 1}; + int[] c = new int[]{2, 2, 2, 2}; + test("arraycopyAndDeopt", s, b, c); + } + + public static int[] arraycopyAndDeopt(int[] a, int[] b, int[] c) { + if (a[0] == 0) { + System.arraycopy(b, 0, a, 0, b.length); + GraalDirectives.deoptimize(); + } else { + System.arraycopy(c, 0, a, 0, b.length); + } + return a; + } } diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java index 91e8fbdb01f..d662290c8a2 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java @@ -47,6 +47,7 @@ import org.graalvm.compiler.debug.DebugDumpScope; import org.graalvm.compiler.debug.DebugHandlersFactory; import org.graalvm.compiler.debug.TimerKey; +import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.options.OptionKey; import org.graalvm.compiler.options.OptionValues; import org.graalvm.compiler.printer.GraalDebugHandlersFactory; @@ -165,15 +166,17 @@ protected HotSpotCompilationRequestResult performCompilation(DebugContext debug) final CompilationPrinter printer = CompilationPrinter.begin(debug.getOptions(), compilationId, method, entryBCI); + StructuredGraph graph; try (DebugContext.Scope s = debug.scope("Compiling", new DebugDumpScope(getIdString(), true))) { - result = compiler.compile(method, entryBCI, useProfilingInfo, shouldRetainLocalVariables, compilationId, debug); + graph = compiler.createGraph(method, entryBCI, useProfilingInfo, compilationId, debug.getOptions(), debug); + result = compiler.compile(graph, method, entryBCI, useProfilingInfo, shouldRetainLocalVariables, compilationId, debug); } catch (Throwable e) { throw debug.handle(e); } if (result != null) { try (DebugCloseable b = CodeInstallationTime.start(debug)) { - installMethod(debug, result); + installMethod(debug, graph, result); } // Installation is included in compilation time and memory usage reported by printer printer.finish(result); @@ -352,12 +355,12 @@ public HotSpotCompilationRequestResult runCompilation(DebugContext debug) { } @SuppressWarnings("try") - private void installMethod(DebugContext debug, final CompilationResult compResult) { + private void installMethod(DebugContext debug, StructuredGraph graph, final CompilationResult compResult) { final CodeCacheProvider codeCache = jvmciRuntime.getHostJVMCIBackend().getCodeCache(); HotSpotBackend backend = compiler.getGraalRuntime().getHostBackend(); installedCode = null; Object[] context = {new DebugDumpScope(getIdString(), true), codeCache, getMethod(), compResult}; - try (DebugContext.Scope s = debug.scope("CodeInstall", context)) { + try (DebugContext.Scope s = debug.scope("CodeInstall", context, graph)) { HotSpotCompilationRequest request = getRequest(); installedCode = (HotSpotInstalledCode) backend.createInstalledCode(debug, request.getMethod(), diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java index 000a0043ee9..6d7d8941afd 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java @@ -719,7 +719,10 @@ public int threadTlabPfTopOffset() { // ARMv8-A architecture reference manual D12.2.35 Data Cache Zero ID register says: // * BS, bits [3:0] indicate log2 of the DC ZVA block size in (4-byte) words. // * DZP, bit [4] of indicates whether use of DC ZVA instruction is prohibited. - public final int psrInfoDczidValue = getFieldValue("VM_Version::_psr_info.dczid_el0", Integer.class, "uint32_t", 0x10, (JVMCI ? jvmciGE(JVMCI_19_3_b04) : JDK >= 14) && osArch.equals("aarch64")); + public final int psrInfoDczidValue = getFieldValue("VM_Version::_psr_info.dczid_el0", Integer.class, "uint32_t", 0x10, + (JVMCI ? jvmciGE(JVMCI_19_3_b04) : (JDK == 14 || JDK == 15)) && osArch.equals("aarch64")); + + public final int zvaLength = getFieldValue("VM_Version::_zva_length", Integer.class, "int", 0, JDK >= 16 && osArch.equals("aarch64")); // FIXME This is only temporary until the GC code is changed. public final boolean inlineContiguousAllocationSupported = getFieldValue("CompilerToVM::Data::_supports_inline_contig_alloc", Boolean.class); diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java index 58b84fedede..f61528b37b0 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalCompiler.java @@ -235,13 +235,13 @@ public CompilationResult compileHelper(CompilationResultBuilderFactory crbf, Com return result; } - public CompilationResult compile(ResolvedJavaMethod method, + public CompilationResult compile(StructuredGraph graph, + ResolvedJavaMethod method, int entryBCI, boolean useProfilingInfo, boolean shouldRetainLocalVariables, CompilationIdentifier compilationId, DebugContext debug) { - StructuredGraph graph = createGraph(method, entryBCI, useProfilingInfo, compilationId, debug.getOptions(), debug); CompilationResult result = new CompilationResult(compilationId); return compileHelper(CompilationResultBuilderFactory.Default, result, graph, method, entryBCI, useProfilingInfo, shouldRetainLocalVariables, debug.getOptions()); } diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayCompareToOp.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayCompareToOp.java index 8c64732eae2..242265a2a6e 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayCompareToOp.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayCompareToOp.java @@ -84,7 +84,6 @@ public final class AMD64ArrayCompareToOp extends AMD64LIRInstruction { public AMD64ArrayCompareToOp(LIRGeneratorTool tool, int useAVX3Threshold, JavaKind kind1, JavaKind kind2, Value result, Value array1, Value array2, Value length1, Value length2) { super(TYPE); - assert CodeUtil.isPowerOf2(useAVX3Threshold) : "AVX3Threshold must be power of 2"; this.useAVX3Threshold = useAVX3Threshold; this.kind1 = kind1; this.kind2 = kind2; diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64StringLatin1InflateOp.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64StringLatin1InflateOp.java index 6c82fb2e7e8..938ca78f942 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64StringLatin1InflateOp.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64StringLatin1InflateOp.java @@ -71,7 +71,6 @@ public final class AMD64StringLatin1InflateOp extends AMD64LIRInstruction { public AMD64StringLatin1InflateOp(LIRGeneratorTool tool, int useAVX3Threshold, Value src, Value dst, Value len) { super(TYPE); - assert CodeUtil.isPowerOf2(useAVX3Threshold) : "AVX3Threshold must be power of 2"; this.useAVX3Threshold = useAVX3Threshold; assert asRegister(src).equals(rsi); diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64StringUTF16CompressOp.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64StringUTF16CompressOp.java index 8b04f272b70..e45f0d7c13f 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64StringUTF16CompressOp.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64StringUTF16CompressOp.java @@ -76,7 +76,6 @@ public final class AMD64StringUTF16CompressOp extends AMD64LIRInstruction { public AMD64StringUTF16CompressOp(LIRGeneratorTool tool, int useAVX3Threshold, Value res, Value src, Value dst, Value len) { super(TYPE); - assert CodeUtil.isPowerOf2(useAVX3Threshold) : "AVX3Threshold must be power of 2"; this.useAVX3Threshold = useAVX3Threshold; assert asRegister(src).equals(rsi); diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/SnippetFrameStateAssignment.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/SnippetFrameStateAssignment.java index 4826014f5a7..2f064b1e0fa 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/SnippetFrameStateAssignment.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/SnippetFrameStateAssignment.java @@ -216,13 +216,20 @@ protected EconomicMap<LoopExitNode, NodeStateAssignment> processLoop(LoopBeginNo afterCount++; } } + NodeStateAssignment selected = null; if (invalidCount > 0) { - stateMapping.put(loop, NodeStateAssignment.INVALID); + selected = NodeStateAssignment.INVALID; } else { if (afterCount > 0) { - stateMapping.put(loop, NodeStateAssignment.AFTER_BCI); + selected = NodeStateAssignment.AFTER_BCI; } else { - stateMapping.put(loop, NodeStateAssignment.BEFORE_BCI); + selected = NodeStateAssignment.BEFORE_BCI; + } + } + stateMapping.put(loop, selected); + if (selected != initialState) { + for (LoopExitNode exit : loop.loopExits()) { + loopInfo.exitStates.put(exit, selected); } } return loopInfo.exitStates; diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64StringLatin1Substitutions.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64StringLatin1Substitutions.java index 138593a93c5..94ee1932781 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64StringLatin1Substitutions.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64StringLatin1Substitutions.java @@ -150,7 +150,7 @@ public static int indexOf(byte[] source, int sourceCount, byte[] target, int tar * Intrinsic for {@code java.lang.StringLatin1.inflate([BI[CII)V}. * * <pre> - * @HotSpotIntrinsicCandidate + * @IntrinsicCandidate * public static void inflate(byte[] src, int src_indx, char[] dst, int dst_indx, int len) * </pre> */ @@ -174,7 +174,7 @@ public static void inflate(byte[] src, int srcIndex, char[] dest, int destIndex, * Intrinsic for {@code }java.lang.StringLatin1.inflate([BI[BII)V}. * * <pre> - * @HotSpotIntrinsicCandidate + * @IntrinsicCandidate * public static void inflate(byte[] src, int src_indx, byte[] dst, int dst_indx, int len) * </pre> * diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64StringUTF16Substitutions.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64StringUTF16Substitutions.java index b761cd9e2b7..06ac0bd8de1 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64StringUTF16Substitutions.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64StringUTF16Substitutions.java @@ -171,7 +171,7 @@ public static int indexOfLatin1Unsafe(byte[] source, int sourceCount, byte[] tar * Intrinsic for {@code java.lang.StringUTF16.compress([CI[BII)I}. * * <pre> - * @HotSpotIntrinsicCandidate + * @IntrinsicCandidate * public static int compress(char[] src, int src_indx, byte[] dst, int dst_indx, int len) * </pre> */ @@ -188,7 +188,7 @@ public static int compress(char[] src, int srcIndex, byte[] dest, int destIndex, * Intrinsic for {@code }java.lang.StringUTF16.compress([BI[BII)I}. * * <pre> - * @HotSpotIntrinsicCandidate + * @IntrinsicCandidate * public static int compress(byte[] src, int src_indx, byte[] dst, int dst_indx, int len) * </pre> * <p> diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/arraycopy/ArrayCopyCallNode.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/arraycopy/ArrayCopyCallNode.java index 61782da8d2d..4ba990c8ff5 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/arraycopy/ArrayCopyCallNode.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/arraycopy/ArrayCopyCallNode.java @@ -51,6 +51,7 @@ import org.graalvm.compiler.nodes.calc.IntegerConvertNode; import org.graalvm.compiler.nodes.calc.LeftShiftNode; import org.graalvm.compiler.nodes.extended.ForeignCallNode; +import org.graalvm.compiler.nodes.memory.AbstractMemoryCheckpoint; import org.graalvm.compiler.nodes.memory.MemoryAccess; import org.graalvm.compiler.nodes.memory.MemoryKill; import org.graalvm.compiler.nodes.memory.SingleMemoryKill; @@ -67,7 +68,7 @@ import jdk.vm.ci.meta.PrimitiveConstant; @NodeInfo(allowedUsageTypes = {Memory}, cycles = CYCLES_UNKNOWN, size = SIZE_UNKNOWN) -public final class ArrayCopyCallNode extends FixedWithNextNode implements Lowerable, SingleMemoryKill, MemoryAccess, Canonicalizable { +public final class ArrayCopyCallNode extends AbstractMemoryCheckpoint implements Lowerable, SingleMemoryKill, MemoryAccess, Canonicalizable { public static final NodeClass<ArrayCopyCallNode> TYPE = NodeClass.create(ArrayCopyCallNode.class); @Input protected ValueNode src; @@ -214,6 +215,11 @@ public LocationIdentity getKilledLocationIdentity() { return killedLocationIdentity; } + @Override + public boolean hasSideEffect() { + return !killedLocationIdentity.isInit(); + } + @NodeIntrinsic(hasSideEffect = true) private static native void arraycopy(Object src, int srcPos, Object dest, int destPos, int length, @ConstantNodeParameter JavaKind elementKind, @ConstantNodeParameter boolean aligned, @ConstantNodeParameter boolean disjoint, @ConstantNodeParameter boolean uninitialized, @ConstantNodeParameter int heapWordSize); diff --git a/src/jdk.jartool/share/classes/sun/tools/jar/Main.java b/src/jdk.jartool/share/classes/sun/tools/jar/Main.java index 66e05f4d688..4c1010dfa53 100644 --- a/src/jdk.jartool/share/classes/sun/tools/jar/Main.java +++ b/src/jdk.jartool/share/classes/sun/tools/jar/Main.java @@ -1737,7 +1737,7 @@ static class ZipFileModuleInfoEntry implements ModuleInfoEntry { /** Returns an optional containing the effective URI. */ @Override public Optional<String> uriString() { String uri = (Paths.get(zipFile.getName())).toUri().toString(); - uri = "jar:" + uri + "/!" + entry.getName(); + uri = "jar:" + uri + "!/" + entry.getName(); return Optional.of(uri); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java index 1759c0c7263..df4a7c8bca9 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java @@ -51,6 +51,7 @@ import static jdk.javadoc.internal.doclets.formats.html.LinkInfoImpl.Kind.MEMBER; import static jdk.javadoc.internal.doclets.formats.html.LinkInfoImpl.Kind.MEMBER_TYPE_PARAMS; import static jdk.javadoc.internal.doclets.formats.html.LinkInfoImpl.Kind.RECEIVER_TYPE; +import static jdk.javadoc.internal.doclets.formats.html.LinkInfoImpl.Kind.THROWS_TYPE; /** * Print method and constructor info. @@ -254,19 +255,16 @@ protected Content getParameters(ExecutableElement member, boolean includeAnnotat */ protected Content getExceptions(ExecutableElement member) { List<? extends TypeMirror> exceptions = utils.asInstantiatedMethodType(typeElement, member).getThrownTypes(); - Content htmltree = new ContentBuilder(); - if (!exceptions.isEmpty()) { - Content link = writer.getLink(new LinkInfoImpl(configuration, MEMBER, exceptions.get(0))); - htmltree.add(link); - for (int i = 1; i < exceptions.size(); i++) { - htmltree.add(","); - htmltree.add(DocletConstants.NL); - Content exceptionLink = writer.getLink(new LinkInfoImpl(configuration, MEMBER, - exceptions.get(i))); - htmltree.add(exceptionLink); + Content htmlTree = new ContentBuilder(); + for (TypeMirror t : exceptions) { + if (!htmlTree.isEmpty()) { + htmlTree.add(","); + htmlTree.add(DocletConstants.NL); } + Content link = writer.getLink(new LinkInfoImpl(configuration, THROWS_TYPE, t)); + htmlTree.add(link); } - return htmltree; + return htmlTree; } protected TypeElement implementsMethodInIntfac(ExecutableElement method, @@ -294,7 +292,7 @@ protected TypeElement implementsMethodInIntfac(ExecutableElement method, * @return the 1.4.x style anchor for the executable element. */ protected String getErasureAnchor(ExecutableElement executableElement) { - final StringBuilder buf = new StringBuilder(writer.anchorName(executableElement)); + final StringBuilder buf = new StringBuilder(executableElement.getSimpleName()); buf.append("("); List<? extends VariableElement> parameters = executableElement.getParameters(); boolean foundTypeVariable = false; @@ -303,7 +301,7 @@ protected String getErasureAnchor(ExecutableElement executableElement) { buf.append(","); } TypeMirror t = parameters.get(i).asType(); - SimpleTypeVisitor9<Boolean, Void> stv = new SimpleTypeVisitor9<Boolean, Void>() { + SimpleTypeVisitor9<Boolean, Void> stv = new SimpleTypeVisitor9<>() { boolean foundTypeVariable = false; @Override diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java index f09743332ae..294ee5f5883 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java @@ -25,24 +25,17 @@ package jdk.javadoc.internal.doclets.formats.html; -import java.io.IOException; -import java.io.Writer; -import java.util.HashMap; -import java.util.Iterator; import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import java.util.stream.Stream; +import java.util.SortedSet; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; -import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.ModuleElement; import javax.lang.model.element.PackageElement; import javax.lang.model.element.TypeElement; import com.sun.source.doctree.DocTree; -import jdk.javadoc.internal.doclets.formats.html.SearchIndexItem.Category; + import jdk.javadoc.internal.doclets.formats.html.markup.Entity; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle; import jdk.javadoc.internal.doclets.formats.html.markup.TagName; @@ -50,10 +43,7 @@ import jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode; import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; import jdk.javadoc.internal.doclets.toolkit.Content; -import jdk.javadoc.internal.doclets.toolkit.util.DocFile; -import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException; import jdk.javadoc.internal.doclets.toolkit.util.DocPath; -import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; import jdk.javadoc.internal.doclets.toolkit.util.IndexBuilder; import jdk.javadoc.internal.doclets.toolkit.util.IndexItem; @@ -68,50 +58,35 @@ * This code and its internal interfaces are subject to change or * deletion without notice.</b> * - * @see IndexBuilder + * @see IndexBuilder */ public class AbstractIndexWriter extends HtmlDocletWriter { - /** - * The index of all the members with unicode character. - */ - protected IndexBuilder indexBuilder; - - protected Navigation navBar; + protected final IndexBuilder mainIndex; - protected final Map<Character, List<SearchIndexItem>> tagSearchIndexMap; + protected final Navigation navBar; /** - * This constructor will be used by {@link SplitIndexWriter}. Initializes - * path to this file and relative path from this file. + * Initializes the common data for writers that can generate index files + * based on the information in {@code configuration.mainIndex}. * - * @param configuration The current configuration - * @param path Path to the file which is getting generated. - * @param indexBuilder Unicode based Index from {@link IndexBuilder} + * @param configuration the current configuration + * @param path path to the file which is getting generated. */ protected AbstractIndexWriter(HtmlConfiguration configuration, - DocPath path, - IndexBuilder indexBuilder) { + DocPath path) { super(configuration, path); - this.indexBuilder = indexBuilder; + this.mainIndex = configuration.mainIndex; this.navBar = new Navigation(null, configuration, PageMode.INDEX, path); - Stream<SearchIndexItem> items = - searchItems.itemsOfCategories(Category.INDEX, Category.SYSTEM_PROPERTY) - .sorted(comparators.makeGenericSearchIndexComparator()); - this.tagSearchIndexMap = buildSearchTagIndex(items); } - protected void addContents(Character uc, List<IndexItem> memberlist, + protected void addContents(Character uc, SortedSet<IndexItem> memberlist, Content contentTree) { addHeading(uc, contentTree); HtmlTree dl = HtmlTree.DL(HtmlStyle.index); - Map<String,Integer> duplicateLabelCheck = new HashMap<>(); - memberlist.forEach(e -> duplicateLabelCheck.compute(e.getFullyQualifiedLabel(utils), - (k, v) -> v == null ? 1 : v + 1)); - for (IndexItem indexItem : memberlist) { - addDescription(indexItem, dl, - duplicateLabelCheck.get(indexItem.getFullyQualifiedLabel(utils)) > 1); + for (IndexItem item : memberlist) { + addDescription(item, dl); } contentTree.add(dl); } @@ -125,79 +100,62 @@ protected void addHeading(Character uc, Content contentTree) { contentTree.add(heading); } - protected void addDescription(IndexItem indexItem, Content dl, boolean addModuleInfo) { - SearchIndexItem si = indexItem.getSearchTag(); - if (si != null) { - addDescription(si, dl); - } else { - si = new SearchIndexItem(); - si.setLabel(indexItem.getLabel()); - addElementDescription(indexItem, dl, si, addModuleInfo); - searchItems.add(si); + protected void addDescription(IndexItem indexItem, Content dl) { + if (indexItem.isTagItem()) { + addTagDescription(indexItem, dl); + } else if (indexItem.isElementItem()) { + addElementDescription(indexItem, dl); } } /** * Add one line summary comment for the element. * - * @param indexItem the element to be documented + * @param item the element to be documented * @param dlTree the content tree to which the description will be added - * @param si the search index item - * @param addModuleInfo whether to include module information */ - protected void addElementDescription(IndexItem indexItem, Content dlTree, SearchIndexItem si, - boolean addModuleInfo) { + protected void addElementDescription(IndexItem item, Content dlTree) { Content dt; - Element element = indexItem.getElement(); - String label = indexItem.getLabel(); + Element element = item.getElement(); + String label = item.getLabel(); switch (element.getKind()) { case MODULE: - dt = HtmlTree.DT(getModuleLink((ModuleElement)element, new StringContent(label))); - si.setCategory(Category.MODULES); + dt = HtmlTree.DT(getModuleLink((ModuleElement) element, new StringContent(label))); dt.add(" - ").add(contents.module_).add(" " + label); break; + case PACKAGE: - dt = HtmlTree.DT(getPackageLink((PackageElement)element, new StringContent(label))); + dt = HtmlTree.DT(getPackageLink((PackageElement) element, new StringContent(label))); if (configuration.showModules) { - si.setContainingModule(utils.getFullyQualifiedName(utils.containingModule(element))); + item.setContainingModule(utils.getFullyQualifiedName(utils.containingModule(element))); } - si.setCategory(Category.PACKAGES); dt.add(" - ").add(contents.package_).add(" " + label); break; + case CLASS: case ENUM: case RECORD: case ANNOTATION_TYPE: case INTERFACE: dt = HtmlTree.DT(getLink(new LinkInfoImpl(configuration, - LinkInfoImpl.Kind.INDEX, (TypeElement)element).strong(true))); - si.setContainingPackage(utils.getPackageName(utils.containingPackage(element))); - if (configuration.showModules && addModuleInfo) { - si.setContainingModule(utils.getFullyQualifiedName(utils.containingModule(element))); - } - si.setCategory(Category.TYPES); + LinkInfoImpl.Kind.INDEX, (TypeElement) element).strong(true))); dt.add(" - "); - addClassInfo((TypeElement)element, dt); + addClassInfo((TypeElement) element, dt); break; - default: - TypeElement containingType = indexItem.getTypeElement(); + + case CONSTRUCTOR: + case METHOD: + case FIELD: + case ENUM_CONSTANT: + TypeElement containingType = item.getContainingTypeElement(); dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.memberNameLink, getDocLink(LinkInfoImpl.Kind.INDEX, containingType, element, new StringContent(label)))); - si.setContainingPackage(utils.getPackageName(utils.containingPackage(element))); - si.setContainingClass(utils.getSimpleName(containingType)); - if (configuration.showModules && addModuleInfo) { - si.setContainingModule(utils.getFullyQualifiedName(utils.containingModule(element))); - } - if (utils.isExecutableElement(element)) { - String url = HtmlTree.encodeURL(links.getName(getAnchor((ExecutableElement)element))); - if (!label.equals(url)) { - si.setUrl(url); - } - } - si.setCategory(Category.MEMBERS); dt.add(" - "); addMemberDesc(element, containingType, dt); break; + + default: + throw new Error(); } dlTree.add(dt); Content dd = new HtmlTree(TagName.DD); @@ -224,19 +182,19 @@ protected void addClassInfo(TypeElement te, Content contentTree) { )); } - protected void addDescription(SearchIndexItem sii, Content dlTree) { - String siiPath = pathToRoot.isEmpty() ? "" : pathToRoot.getPath() + "/"; - siiPath += sii.getUrl(); - HtmlTree labelLink = HtmlTree.A(siiPath, new StringContent(sii.getLabel())); + protected void addTagDescription(IndexItem item, Content dlTree) { + String itemPath = pathToRoot.isEmpty() ? "" : pathToRoot.getPath() + "/"; + itemPath += item.getUrl(); + HtmlTree labelLink = HtmlTree.A(itemPath, new StringContent(item.getLabel())); Content dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.searchTagLink, labelLink)); dt.add(" - "); - dt.add(contents.getContent("doclet.Search_tag_in", sii.getHolder())); + dt.add(contents.getContent("doclet.Search_tag_in", item.getHolder())); dlTree.add(dt); Content dd = new HtmlTree(TagName.DD); - if (sii.getDescription().isEmpty()) { + if (item.getDescription().isEmpty()) { dd.add(Entity.NO_BREAK_SPACE); } else { - dd.add(sii.getDescription()); + dd.add(item.getDescription()); } dlTree.add(dd); } @@ -313,85 +271,4 @@ public String getNameForIndex(String unicode) { return "I:" + links.getName(unicode); } - /** - * @throws DocFileIOException if there is a problem creating any of the search index files - */ - protected void createSearchIndexFiles() throws DocFileIOException { - createSearchIndexFile(DocPaths.MODULE_SEARCH_INDEX_JS, - searchItems.itemsOfCategories(Category.MODULES), - "moduleSearchIndex"); - if (!configuration.packages.isEmpty()) { - SearchIndexItem si = new SearchIndexItem(); - si.setCategory(Category.PACKAGES); - si.setLabel(resources.getText("doclet.All_Packages")); - si.setUrl(DocPaths.ALLPACKAGES_INDEX.getPath()); - searchItems.add(si); - } - createSearchIndexFile(DocPaths.PACKAGE_SEARCH_INDEX_JS, - searchItems.itemsOfCategories(Category.PACKAGES), - "packageSearchIndex"); - SearchIndexItem si = new SearchIndexItem(); - si.setCategory(Category.TYPES); - si.setLabel(resources.getText("doclet.All_Classes")); - si.setUrl(DocPaths.ALLCLASSES_INDEX.getPath()); - searchItems.add(si); - createSearchIndexFile(DocPaths.TYPE_SEARCH_INDEX_JS, - searchItems.itemsOfCategories(Category.TYPES), - "typeSearchIndex"); - createSearchIndexFile(DocPaths.MEMBER_SEARCH_INDEX_JS, - searchItems.itemsOfCategories(Category.MEMBERS), - "memberSearchIndex"); - createSearchIndexFile(DocPaths.TAG_SEARCH_INDEX_JS, - searchItems.itemsOfCategories(Category.INDEX, Category.SYSTEM_PROPERTY), - "tagSearchIndex"); - } - - /** - * Creates a search index file. - * - * @param searchIndexJS the file for the JavaScript to be generated - * @param searchIndex the search index items - * @param varName the variable name to write in the JavaScript file - * @throws DocFileIOException if there is a problem creating the search index file - */ - protected void createSearchIndexFile(DocPath searchIndexJS, - Stream<SearchIndexItem> searchIndex, - String varName) - throws DocFileIOException - { - // The file needs to be created even if there are no searchIndex items - // File could be written straight-through, without an intermediate StringBuilder - Iterator<SearchIndexItem> index = searchIndex.iterator(); - StringBuilder searchVar = new StringBuilder("["); - boolean first = true; - while (index.hasNext()) { - SearchIndexItem item = index.next(); - if (first) { - searchVar.append(item.toString()); - first = false; - } else { - searchVar.append(",").append(item.toString()); - } - } - searchVar.append("];"); - DocFile jsFile = DocFile.createFileForOutput(configuration, searchIndexJS); - try (Writer wr = jsFile.openWriter()) { - wr.write(varName); - wr.write(" = "); - wr.write(searchVar.toString()); - wr.write("updateSearchResults();"); - } catch (IOException ie) { - throw new DocFileIOException(jsFile, DocFileIOException.Mode.WRITE, ie); - } - } - - private static Map<Character, List<SearchIndexItem>> buildSearchTagIndex( - Stream<? extends SearchIndexItem> searchItems) - { - return searchItems.collect(Collectors.groupingBy(i -> keyCharacter(i.getLabel()))); - } - - protected static Character keyCharacter(String s) { - return s.isEmpty() ? '*' : Character.toUpperCase(s.charAt(0)); - } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java index f5c140bd5ac..c2a32c0f541 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java @@ -98,26 +98,20 @@ public AbstractMemberWriter(SubWriterHolderWriter writer) { this(writer, null); } - /*** abstracts ***/ + /* ----- abstracts ----- */ /** - * Add the summary label for the member. + * Adds the summary label for the member. * * @param memberTree the content tree to which the label will be added */ public abstract void addSummaryLabel(Content memberTree); /** - * Get the summary for the member summary table. - * - * @return a string for the table summary - */ - private String getTableSummaryX() { return null; } - - /** - * Get the summary table header for the member. + * Returns the summary table header for the member. * * @param member the member to be documented + * * @return the summary table header */ public abstract TableHeader getSummaryTableHeader(Element member); @@ -132,7 +126,7 @@ private Table getSummaryTable() { } /** - * Create the summary table for this element. + * Creates the summary table for this element. * The table should be created and initialized if needed, and configured * so that it is ready to add content with {@link Table#addRow(Content[])} * and similar methods. @@ -142,66 +136,67 @@ private Table getSummaryTable() { protected abstract Table createSummaryTable(); /** - * Add inherited summary label for the member. + * Adds inherited summary label for the member. * - * @param typeElement the TypeElement to which to link to + * @param typeElement the type element to which to link to * @param inheritedTree the content tree to which the inherited summary label will be added */ public abstract void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree); /** - * Add the summary type for the member. + * Adds the summary type for the member. * - * @param member the member to be documented + * @param member the member to be documented * @param tdSummaryType the content tree to which the type will be added */ protected abstract void addSummaryType(Element member, Content tdSummaryType); /** - * Add the summary link for the member. + * Adds the summary link for the member. * - * @param typeElement the TypeElement to be documented - * @param member the member to be documented - * @param tdSummary the content tree to which the link will be added + * @param typeElement the type element to be documented + * @param member the member to be documented + * @param tdSummary the content tree to which the link will be added */ protected void addSummaryLink(TypeElement typeElement, Element member, Content tdSummary) { addSummaryLink(LinkInfoImpl.Kind.MEMBER, typeElement, member, tdSummary); } /** - * Add the summary link for the member. + * Adds the summary link for the member. * - * @param context the id of the context where the link will be printed - * @param typeElement the TypeElement to be documented - * @param member the member to be documented - * @param tdSummary the content tree to which the summary link will be added + * @param context the id of the context where the link will be printed + * @param typeElement the type element to be documented + * @param member the member to be documented + * @param tdSummary the content tree to which the summary link will be added */ protected abstract void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member, Content tdSummary); /** - * Add the inherited summary link for the member. + * Adds the inherited summary link for the member. * - * @param typeElement the TypeElement to be documented - * @param member the member to be documented - * @param linksTree the content tree to which the inherited summary link will be added + * @param typeElement the type element to be documented + * @param member the member to be documented + * @param linksTree the content tree to which the inherited summary link will be added */ protected abstract void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree); /** - * Get the deprecated link. + * Returns the deprecated link. * * @param member the member being linked to + * * @return a content tree representing the link */ protected abstract Content getDeprecatedLink(Element member); /** - * Add the modifier and type for the member in the member summary. + * Adds the modifier and type for the member in the member summary. * - * @param member the member to add the type for - * @param type the type to add + * @param member the member to add the type for + * @param type the type to add * @param tdSummaryType the content tree to which the modified and type will be added */ protected void addModifierAndType(Element member, TypeMirror type, @@ -225,24 +220,19 @@ protected void addModifierAndType(Element member, TypeMirror type, } else { code.add(Entity.NO_BREAK_SPACE); } - code.add( - writer.getLink(new LinkInfoImpl(configuration, - LinkInfoImpl.Kind.SUMMARY_RETURN_TYPE, type))); - } else { - code.add( - writer.getLink(new LinkInfoImpl(configuration, - LinkInfoImpl.Kind.SUMMARY_RETURN_TYPE, type))); } - + code.add( + writer.getLink(new LinkInfoImpl(configuration, + LinkInfoImpl.Kind.SUMMARY_RETURN_TYPE, type))); } tdSummaryType.add(code); } /** - * Add the modifier for the member. + * Adds the modifier for the member. * * @param member the member to add the type for - * @param code the content tree to which the modified will be added + * @param code the content tree to which the modifier will be added */ private void addModifier(Element member, Content code) { if (utils.isProtected(member)) { @@ -268,30 +258,28 @@ private void addModifier(Element member, Content code) { } /** - * Add the deprecated information for the given member. + * Adds the deprecated information for the given member. * - * @param member the member being documented. + * @param member the member being documented. * @param contentTree the content tree to which the deprecated information will be added. */ protected void addDeprecatedInfo(Element member, Content contentTree) { - Content output = (new DeprecatedTaglet()).getTagletOutput(member, + Content output = (new DeprecatedTaglet()).getAllBlockTagOutput(member, writer.getTagletWriterInstance(false)); if (!output.isEmpty()) { - Content deprecatedContent = output; - Content div = HtmlTree.DIV(HtmlStyle.deprecationBlock, deprecatedContent); - contentTree.add(div); + contentTree.add(HtmlTree.DIV(HtmlStyle.deprecationBlock, output)); } } /** - * Add the comment for the given member. + * Adds the comment for the given member. * - * @param member the member being documented. - * @param htmltree the content tree to which the comment will be added. + * @param member the member being documented. + * @param htmlTree the content tree to which the comment will be added. */ - protected void addComment(Element member, Content htmltree) { + protected void addComment(Element member, Content htmlTree) { if (!utils.getFullBody(member).isEmpty()) { - writer.addInlineComment(member, htmltree); + writer.addInlineComment(member, htmlTree); } } @@ -300,14 +288,13 @@ protected String name(Element member) { } /** - * Return true if the given <code>ProgramElement</code> is inherited - * by the class that is being documented. - * - * @param ped The <code>ProgramElement</code> being checked. - * return true if the <code>ProgramElement</code> is being inherited and - * false otherwise. - *@return true if inherited - */ + * Returns {@code true} if the given element is inherited + * by the class that is being documented. + * + * @param ped the element being checked + * + * @return {@code true} if inherited + */ protected boolean isInherited(Element ped){ return (!utils.isPrivate(ped) && (!utils.isPackagePrivate(ped) || @@ -315,54 +302,51 @@ protected boolean isInherited(Element ped){ } /** - * Add use information to the documentation tree. + * Adds use information to the documentation tree. * - * @param mems list of program elements for which the use information will be added - * @param heading the section heading + * @param members list of program elements for which the use information will be added + * @param heading the section heading * @param contentTree the content tree to which the use information will be added */ - protected void addUseInfo(List<? extends Element> mems, Content heading, Content contentTree) { - if (mems == null || mems.isEmpty()) { + protected void addUseInfo(List<? extends Element> members, Content heading, Content contentTree) { + if (members == null || members.isEmpty()) { return; } - List<? extends Element> members = mems; boolean printedUseTableHeader = false; - if (members.size() > 0) { - Table useTable = new Table(HtmlStyle.useSummary, HtmlStyle.summaryTable) - .setCaption(heading) - .setRowScopeColumn(1) - .setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colSecond, HtmlStyle.colLast); - for (Element element : members) { - TypeElement te = (typeElement == null) - ? utils.getEnclosingTypeElement(element) - : typeElement; - if (!printedUseTableHeader) { - useTable.setHeader(getSummaryTableHeader(element)); - printedUseTableHeader = true; - } - Content summaryType = new ContentBuilder(); - addSummaryType(element, summaryType); - Content typeContent = new ContentBuilder(); - if (te != null - && !utils.isConstructor(element) - && !utils.isClass(element) - && !utils.isInterface(element) - && !utils.isAnnotationType(element)) { - HtmlTree name = new HtmlTree(TagName.SPAN); - name.setStyle(HtmlStyle.typeNameLabel); - name.add(name(te) + "."); - typeContent.add(name); - } - addSummaryLink(utils.isClass(element) || utils.isInterface(element) - ? LinkInfoImpl.Kind.CLASS_USE - : LinkInfoImpl.Kind.MEMBER, - te, element, typeContent); - Content desc = new ContentBuilder(); - writer.addSummaryLinkComment(this, element, desc); - useTable.addRow(summaryType, typeContent, desc); + Table useTable = new Table(HtmlStyle.useSummary, HtmlStyle.summaryTable) + .setCaption(heading) + .setRowScopeColumn(1) + .setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colSecond, HtmlStyle.colLast); + for (Element element : members) { + TypeElement te = (typeElement == null) + ? utils.getEnclosingTypeElement(element) + : typeElement; + if (!printedUseTableHeader) { + useTable.setHeader(getSummaryTableHeader(element)); + printedUseTableHeader = true; + } + Content summaryType = new ContentBuilder(); + addSummaryType(element, summaryType); + Content typeContent = new ContentBuilder(); + if (te != null + && !utils.isConstructor(element) + && !utils.isClass(element) + && !utils.isInterface(element) + && !utils.isAnnotationType(element)) { + HtmlTree name = new HtmlTree(TagName.SPAN); + name.setStyle(HtmlStyle.typeNameLabel); + name.add(name(te) + "."); + typeContent.add(name); } - contentTree.add(useTable); + addSummaryLink(utils.isClass(element) || utils.isInterface(element) + ? LinkInfoImpl.Kind.CLASS_USE + : LinkInfoImpl.Kind.MEMBER, + te, element, typeContent); + Content desc = new ContentBuilder(); + writer.addSummaryLinkComment(this, element, desc); + useTable.addRow(summaryType, typeContent, desc); } + contentTree.add(useTable); } protected void serialWarning(Element e, String key, String a1, String a2) { @@ -371,16 +355,9 @@ protected void serialWarning(Element e, String key, String a1, String a2) { } } - /** - * Add the member summary for the given class. - * - * @param tElement the class that is being documented - * @param member the member being documented - * @param firstSentenceTags the first sentence tags to be added to the summary - */ @Override public void addMemberSummary(TypeElement tElement, Element member, - List<? extends DocTree> firstSentenceTags) { + List<? extends DocTree> firstSentenceTrees) { if (tElement != typeElement) { throw new IllegalStateException(); } @@ -394,34 +371,18 @@ public void addMemberSummary(TypeElement tElement, Element member, addSummaryLink(tElement, member, summaryLink); rowContents.add(summaryLink); Content desc = new ContentBuilder(); - writer.addSummaryLinkComment(this, member, firstSentenceTags, desc); + writer.addSummaryLinkComment(this, member, firstSentenceTrees, desc); rowContents.add(desc); table.addRow(member, rowContents); } - /** - * Add inherited member summary for the given class and member. - * - * @param tElement the class the inherited member belongs to - * @param nestedClass the inherited member that is summarized - * @param isFirst true if this is the first member in the list - * @param isLast true if this is the last member in the list - * @param linksTree the content tree to which the summary will be added - */ @Override public void addInheritedMemberSummary(TypeElement tElement, Element nestedClass, boolean isFirst, boolean isLast, Content linksTree) { - writer.addInheritedMemberSummary(this, tElement, nestedClass, isFirst, - linksTree); + writer.addInheritedMemberSummary(this, tElement, nestedClass, isFirst, linksTree); } - /** - * Get the inherited summary header for the given class. - * - * @param tElement the class the inherited member belongs to - * @return a content tree for the inherited summary header - */ @Override public Content getInheritedSummaryHeader(TypeElement tElement) { Content inheritedTree = writer.getMemberInheritedTree(); @@ -429,22 +390,11 @@ public Content getInheritedSummaryHeader(TypeElement tElement) { return inheritedTree; } - /** - * Get the inherited summary links tree. - * - * @return a content tree for the inherited summary links - */ @Override public Content getInheritedSummaryLinksTree() { return new HtmlTree(TagName.CODE); } - /** - * Get the summary table tree for the given class. - * - * @param tElement the class for which the summary table is generated - * @return a content tree for the summary table - */ @Override public Content getSummaryTableTree(TypeElement tElement) { if (tElement != typeElement) { @@ -457,12 +407,6 @@ public Content getSummaryTableTree(TypeElement tElement) { return table; } - /** - * Get the member tree to be documented. - * - * @param memberTree the content tree of member to be documented - * @return a content tree that will be added to the class documentation - */ @Override public Content getMemberTree(Content memberTree) { return writer.getMemberTree(memberTree); @@ -483,7 +427,7 @@ public Content getMemberListItem(Content memberTree) { */ class MemberSignature { - private Element element; + private final Element element; private Content typeParameters; private Content returnType; private Content parameters; @@ -497,19 +441,20 @@ class MemberSignature { private static final int RETURN_TYPE_MAX_LINE_LENGTH = 50; /** - * Create a new member signature builder. + * Creates a new member signature builder. * - * @param element The element for which to create a signature. + * @param element the element for which to create a signature */ MemberSignature(Element element) { this.element = element; } /** - * Add the type parameters for an executable member. + * Adds the type parameters for an executable member. * * @param typeParameters the content tree containing the type parameters to add. - * @return this MemberSignature instance + * + * @return this instance */ MemberSignature addTypeParameters(Content typeParameters) { this.typeParameters = typeParameters; @@ -517,10 +462,11 @@ MemberSignature addTypeParameters(Content typeParameters) { } /** - * Add the return type for an executable member. + * Adds the return type for an executable member. * * @param returnType the content tree containing the return type to add. - * @return this MemberSignature instance + * + * @return this instance */ MemberSignature addReturnType(Content returnType) { this.returnType = returnType; @@ -528,10 +474,11 @@ MemberSignature addReturnType(Content returnType) { } /** - * Add the type information for a non-executable member. + * Adds the type information for a non-executable member. * * @param type the type of the member. - * @return this MemberSignature instance + * + * @return this instance */ MemberSignature addType(TypeMirror type) { this.returnType = writer.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, type)); @@ -539,10 +486,11 @@ MemberSignature addType(TypeMirror type) { } /** - * Add the parameter information of an executable member. + * Adds the parameter information of an executable member. * * @param paramTree the content tree containing the parameter information. - * @return this MemberSignature instance + * + * @return this instance */ MemberSignature addParameters(Content paramTree) { this.parameters = paramTree; @@ -550,10 +498,11 @@ MemberSignature addParameters(Content paramTree) { } /** - * Add the exception information of an executable member. + * Adds the exception information of an executable member. * * @param exceptionTree the content tree containing the exception information - * @return this MemberSignature instance + * + * @return this instance */ MemberSignature addExceptions(Content exceptionTree) { this.exceptions = exceptionTree; @@ -561,9 +510,9 @@ MemberSignature addExceptions(Content exceptionTree) { } /** - * Return a HTML tree containing the member signature. + * Returns an HTML tree containing the member signature. * - * @return a HTML tree containing the member signature + * @return an HTML tree containing the member signature */ Content toContent() { Content content = new ContentBuilder(); @@ -602,7 +551,6 @@ Content toContent() { } content.add(nameSpan); - // Parameters and exceptions if (parameters != null) { appendParametersAndExceptions(content, lastLineSeparator); @@ -612,12 +560,12 @@ Content toContent() { } /** - * Add the modifier for the member. The modifiers are ordered as specified + * Adds the modifier for the member. The modifiers are ordered as specified * by <em>The Java Language Specification</em>. * - * @param htmltree the content tree to which the modifier information will be added. + * @param htmlTree the content tree to which the modifier information will be added */ - private void appendModifiers(Content htmltree) { + private void appendModifiers(Content htmlTree) { Set<Modifier> set = new TreeSet<>(element.getModifiers()); // remove the ones we really don't need @@ -639,68 +587,69 @@ private void appendModifiers(Content htmltree) { } if (!set.isEmpty()) { String mods = set.stream().map(Modifier::toString).collect(Collectors.joining(" ")); - htmltree.add(HtmlTree.SPAN(HtmlStyle.modifiers, new StringContent(mods))); - htmltree.add(Entity.NO_BREAK_SPACE); + htmlTree.add(HtmlTree.SPAN(HtmlStyle.modifiers, new StringContent(mods))) + .add(Entity.NO_BREAK_SPACE); } } /** - * Append the type parameter information to the HTML tree. + * Appends the type parameter information to the HTML tree. + * + * @param htmlTree the HTML tree + * @param lastLineSeparator index of last line separator in the HTML tree * - * @param htmltree the HTML tree - * @param lastLineSeparator index of last line separator in HTML tree * @return the new index of the last line separator */ - private int appendTypeParameters(Content htmltree, int lastLineSeparator) { + private int appendTypeParameters(Content htmlTree, int lastLineSeparator) { // Apply different wrapping strategies for type parameters // depending of combined length of type parameters and return type. int typeParamLength = typeParameters.charCount(); if (typeParamLength >= TYPE_PARAMS_MAX_INLINE_LENGTH) { - htmltree.add(HtmlTree.SPAN(HtmlStyle.typeParametersLong, typeParameters)); + htmlTree.add(HtmlTree.SPAN(HtmlStyle.typeParametersLong, typeParameters)); } else { - htmltree.add(HtmlTree.SPAN(HtmlStyle.typeParameters, typeParameters)); + htmlTree.add(HtmlTree.SPAN(HtmlStyle.typeParameters, typeParameters)); } - int lineLength = htmltree.charCount() - lastLineSeparator; + int lineLength = htmlTree.charCount() - lastLineSeparator; int newLastLineSeparator = lastLineSeparator; // sum below includes length of modifiers plus type params added above if (lineLength + returnType.charCount()> RETURN_TYPE_MAX_LINE_LENGTH) { - htmltree.add(DocletConstants.NL); - newLastLineSeparator = htmltree.charCount(); + htmlTree.add(DocletConstants.NL); + newLastLineSeparator = htmlTree.charCount(); } else { - htmltree.add(Entity.NO_BREAK_SPACE); + htmlTree.add(Entity.NO_BREAK_SPACE); } return newLastLineSeparator; } /** - * Append the parameters and exceptions information to the HTML tree. + * Appends the parameters and exceptions information to the HTML tree. * - * @param htmltree the HTML tree - * @param lastLineSeparator the index of the last line separator in HTML tree + * @param htmlTree the HTML tree + * @param lastLineSeparator the index of the last line separator in the HTML tree */ - private void appendParametersAndExceptions(Content htmltree, int lastLineSeparator) { + private void appendParametersAndExceptions(Content htmlTree, int lastLineSeparator) { // Record current position for indentation of exceptions - int indentSize = htmltree.charCount() - lastLineSeparator; + int indentSize = htmlTree.charCount() - lastLineSeparator; if (parameters.charCount() == 2) { // empty parameters are added without packing - htmltree.add(parameters); + htmlTree.add(parameters); } else { - htmltree.add(Entity.ZERO_WIDTH_SPACE); - htmltree.add(HtmlTree.SPAN(HtmlStyle.parameters, parameters)); + htmlTree.add(Entity.ZERO_WIDTH_SPACE) + .add(HtmlTree.SPAN(HtmlStyle.parameters, parameters)); } // Exceptions if (exceptions != null && !exceptions.isEmpty()) { CharSequence indent = " ".repeat(Math.max(0, indentSize + 1 - 7)); - htmltree.add(DocletConstants.NL); - htmltree.add(indent); - htmltree.add("throws "); - htmltree.add(HtmlTree.SPAN(HtmlStyle.exceptions, exceptions)); + htmlTree.add(DocletConstants.NL) + .add(indent) + .add("throws ") + .add(HtmlTree.SPAN(HtmlStyle.exceptions, exceptions)); } } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java index 6e213d228c7..d4b8a93c193 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java @@ -133,13 +133,12 @@ protected void addContents(Content content) { .addTab(resources.errorSummary, e -> utils.isError((TypeElement)e)) .addTab(resources.annotationTypeSummary, utils::isAnnotationType) .setTabScript(i -> "show(" + i + ");"); - for (Character unicode : indexBuilder.keys()) { - for (IndexItem indexItem : indexBuilder.getMemberList(unicode)) { + for (Character unicode : indexBuilder.getFirstCharacters()) { + for (IndexItem indexItem : indexBuilder.getItems(unicode)) { TypeElement typeElement = (TypeElement) indexItem.getElement(); - if (typeElement == null || !utils.isCoreClass(typeElement)) { - continue; + if (typeElement != null && utils.isCoreClass(typeElement)) { + addTableRow(table, typeElement); } - addTableRow(table, typeElement); } } Content titleContent = contents.allClassesLabel; diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java index 5999d7ab5af..cb8acb741ff 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java @@ -376,7 +376,7 @@ public void addClassTree(Content classContentTree) { @Override public void addParamInfo(Content classInfoTree) { if (utils.hasBlockTag(typeElement, DocTree.Kind.PARAM)) { - Content paramInfo = (new ParamTaglet()).getTagletOutput(typeElement, + Content paramInfo = (new ParamTaglet()).getAllBlockTagOutput(typeElement, getTagletWriterInstance(false)); if (!paramInfo.isEmpty()) { classInfoTree.add(HtmlTree.DL(HtmlStyle.notes, paramInfo)); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java index 53f85f07092..d13df69683e 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java @@ -258,7 +258,7 @@ private Content getNameColumn(VariableElement member) { * @return the value column of the constant table row */ private Content getValue(VariableElement member) { - String value = utils.constantValueExpresion(member); + String value = utils.constantValueExpression(member); Content valueContent = new StringContent(value); return HtmlTree.CODE(valueContent); } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java index 43483c8ad33..687d4d21bc3 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java @@ -125,7 +125,7 @@ public Content getConstructorDocTreeHeader(ExecutableElement constructor) { } constructorDocTree.add(heading); return HtmlTree.SECTION(HtmlStyle.detail, constructorDocTree) - .setId(links.getName(writer.getAnchor(constructor))); + .setId(links.getAnchor(constructor)); } @Override diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandlerImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandlerImpl.java index 08ec9782a74..162b35a4dcf 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandlerImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandlerImpl.java @@ -29,7 +29,6 @@ import com.sun.source.doctree.EndElementTree; import com.sun.source.doctree.StartElementTree; import com.sun.source.util.DocTreeFactory; -import com.sun.tools.doclint.HtmlTag; import jdk.javadoc.internal.doclets.formats.html.markup.BodyContents; import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; @@ -42,6 +41,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants; import jdk.javadoc.internal.doclets.toolkit.util.Utils; +import jdk.javadoc.internal.doclint.HtmlTag; import javax.lang.model.element.Element; import javax.lang.model.element.ModuleElement; diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java index 743c72b1826..3770f6cc7ca 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java @@ -25,9 +25,13 @@ package jdk.javadoc.internal.doclets.formats.html; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; import java.util.stream.Collectors; - import javax.lang.model.element.Element; import javax.lang.model.element.PackageElement; import javax.lang.model.element.TypeElement; @@ -36,7 +40,6 @@ import javax.tools.StandardJavaFileManager; import com.sun.source.util.DocTreePath; - import jdk.javadoc.doclet.Doclet; import jdk.javadoc.doclet.DocletEnvironment; import jdk.javadoc.doclet.Reporter; @@ -51,6 +54,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocFile; import jdk.javadoc.internal.doclets.toolkit.util.DocPath; import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; +import jdk.javadoc.internal.doclets.toolkit.util.IndexBuilder; /** * Configure the output based on the command-line options. @@ -90,7 +94,16 @@ public class HtmlConfiguration extends BaseConfiguration { */ public TypeElement currentTypeElement = null; // Set this TypeElement in the ClassWriter. - protected SearchIndexItems searchItems; + /** + * The collections of items for the main index. + * This field is only initialized if {@code options.createIndex()} + * is {@code true}. + * This index is populated somewhat lazily: + * 1. items found in doc comments are found while generating declaration pages + * 2. items for elements are added in bulk before generating the index files + * 3. additional items are added as needed + */ + protected HtmlIndexBuilder mainIndex; public final Contents contents; @@ -198,10 +211,13 @@ public boolean finishOptionSettings() { } } } + if (options.createIndex()) { + mainIndex = new HtmlIndexBuilder(this); + } docPaths = new DocPaths(utils); setCreateOverview(); setTopFile(docEnv); - workArounds.initDocLint(options.doclintOpts(), tagletManager.getAllTagletNames()); + initDocLint(options.doclintOpts(), tagletManager.getAllTagletNames()); return true; } @@ -321,12 +337,12 @@ public JavaFileManager getFileManager() { @Override public boolean showMessage(DocTreePath path, String key) { - return (path == null || workArounds.haveDocLint()); + return (path == null || !haveDocLint()); } @Override public boolean showMessage(Element e, String key) { - return (e == null || workArounds.haveDocLint()); + return (e == null || !haveDocLint()); } @Override @@ -349,10 +365,4 @@ protected boolean finishOptionSettings0() throws DocletException { } return super.finishOptionSettings0(); } - - @Override - protected void initConfiguration(DocletEnvironment docEnv) { - super.initConfiguration(docEnv); - searchItems = new SearchIndexItems(utils); - } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java index 4cc2da80a96..b1501fc7056 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java @@ -169,18 +169,20 @@ protected void generateOtherFiles(DocletEnvironment docEnv, ClassTree classtree) } if (options.createIndex()) { - IndexBuilder indexBuilder = new IndexBuilder(configuration, nodeprecated); + SystemPropertiesWriter.generate(configuration); + configuration.mainIndex.addElements(); if (options.splitIndex()) { - SplitIndexWriter.generate(configuration, indexBuilder); + SplitIndexWriter.generate(configuration); } else { - SingleIndexWriter.generate(configuration, indexBuilder); + SingleIndexWriter.generate(configuration); } - AllClassesIndexWriter.generate(configuration, - new IndexBuilder(configuration, nodeprecated, true)); + IndexBuilder allClassesIndex = new IndexBuilder(configuration, nodeprecated, true); + allClassesIndex.addElements(); + AllClassesIndexWriter.generate(configuration, allClassesIndex); if (!configuration.packages.isEmpty()) { AllPackagesIndexWriter.generate(configuration); } - SystemPropertiesWriter.generate(configuration); + configuration.mainIndex.createSearchIndexFiles(); } if (options.createOverview()) { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java index 9c37719498b..2cc37855bb3 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java @@ -73,6 +73,8 @@ import com.sun.source.doctree.SystemPropertyTree; import com.sun.source.doctree.TextTree; import com.sun.source.util.SimpleDocTreeVisitor; + +import jdk.javadoc.internal.doclint.HtmlTag; import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder; import jdk.javadoc.internal.doclets.formats.html.markup.Entity; import jdk.javadoc.internal.doclets.formats.html.markup.FixedStringContent; @@ -92,6 +94,7 @@ import jdk.javadoc.internal.doclets.toolkit.PackageSummaryWriter; import jdk.javadoc.internal.doclets.toolkit.Resources; import jdk.javadoc.internal.doclets.toolkit.taglets.DocRootTaglet; +import jdk.javadoc.internal.doclets.toolkit.taglets.Taglet; import jdk.javadoc.internal.doclets.toolkit.taglets.TagletWriter; import jdk.javadoc.internal.doclets.toolkit.util.Comparators; import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper; @@ -152,8 +155,6 @@ public class HtmlDocletWriter { */ public final HtmlConfiguration configuration; - protected final SearchIndexItems searchItems; - protected final HtmlOptions options; protected final Utils utils; @@ -213,12 +214,11 @@ public class HtmlDocletWriter { */ public HtmlDocletWriter(HtmlConfiguration configuration, DocPath path) { this.configuration = configuration; - this.searchItems = configuration.searchItems; this.options = configuration.getOptions(); this.contents = configuration.contents; this.messages = configuration.messages; this.resources = configuration.docResources; - this.links = new Links(path); + this.links = new Links(path, configuration.utils); this.utils = configuration.utils; this.comparators = utils.comparators; this.path = path; @@ -330,29 +330,54 @@ protected void addTagsInfo(Element e, Content htmlTree) { if (utils.isExecutableElement(e) && !utils.isConstructor(e)) { addMethodInfo((ExecutableElement)e, dl); } - Content output = new ContentBuilder(); - TagletWriter.genTagOutput(configuration.tagletManager, e, - configuration.tagletManager.getBlockTaglets(e), - getTagletWriterInstance(false), output); + Content output = getBlockTagOutput(e); dl.add(output); htmlTree.add(dl); } /** - * Check whether there are any tags for Serialization Overview - * section to be printed. + * Returns the content generated from the default supported set of block tags + * for this element. * - * @param field the VariableElement object to check for tags. - * @return true if there are tags to be printed else return false. + * @param element the element + * + * @return the content + */ + protected Content getBlockTagOutput(Element element) { + return getBlockTagOutput(element, configuration.tagletManager.getBlockTaglets(element)); + } + + /** + * Returns the content generated from a specified set of block tags + * for this element. + * + * @param element the element + * @param taglets the taglets to handle the required set of tags + * + * @return the content + */ + protected Content getBlockTagOutput(Element element, List<Taglet> taglets) { + return getTagletWriterInstance(false) + .getBlockTagOutput(configuration.tagletManager, element, taglets); + } + + /** + * Returns whether there are any tags in a field for the Serialization Overview + * section to be generated. + * + * @param field the field to check + * @return {@code true} if and only if there are tags to be included */ protected boolean hasSerializationOverviewTags(VariableElement field) { - Content output = new ContentBuilder(); - TagletWriter.genTagOutput(configuration.tagletManager, field, - configuration.tagletManager.getBlockTaglets(field), - getTagletWriterInstance(false), output); + Content output = getBlockTagOutput(field); return !output.isEmpty(); } + private Content getInlineTagOutput(Element element, DocTree holder, DocTree tree, boolean isFirstSentence, boolean inSummary) { + return getTagletWriterInstance(isFirstSentence, inSummary) + .getInlineTagOutput(element, configuration.tagletManager, holder, tree); + } + /** * Returns a TagletWriter that knows how to write HTML. * @@ -927,7 +952,7 @@ public Content getDocLink(LinkInfoImpl.Kind context, TypeElement typeElement, El ExecutableElement ee = (ExecutableElement)element; return getLink(new LinkInfoImpl(configuration, context, typeElement) .label(label) - .where(links.getName(getAnchor(ee, isProperty))) + .where(links.getAnchor(ee, isProperty)) .strong(strong)); } @@ -960,7 +985,7 @@ public Content getDocLink(LinkInfoImpl.Kind context, TypeElement typeElement, El ExecutableElement emd = (ExecutableElement) element; return getLink(new LinkInfoImpl(configuration, context, typeElement) .label(label) - .where(links.getName(getAnchor(emd)))); + .where(links.getAnchor(emd))); } else if (utils.isVariableElement(element) || utils.isTypeElement(element)) { return getLink(new LinkInfoImpl(configuration, context, typeElement) .label(label).where(links.getName(element.getSimpleName().toString()))); @@ -969,27 +994,6 @@ public Content getDocLink(LinkInfoImpl.Kind context, TypeElement typeElement, El } } - public String getAnchor(ExecutableElement executableElement) { - return getAnchor(executableElement, false); - } - - public String getAnchor(ExecutableElement executableElement, boolean isProperty) { - if (isProperty) { - return executableElement.getSimpleName().toString(); - } - String member = anchorName(executableElement); - String erasedSignature = utils.makeSignature(executableElement, null, true, true); - return member + erasedSignature; - } - - public String anchorName(Element member) { - if (member.getKind() == ElementKind.CONSTRUCTOR) { - return "<init>"; - } else { - return utils.getSimpleName(member); - } - } - public Content seeTagToContent(Element element, DocTree see) { Kind kind = see.getKind(); if (!(kind == LINK || kind == SEE || kind == LINK_PLAIN)) { @@ -1262,9 +1266,9 @@ boolean ignoreNonInlineTag(DocTree dtree) { } if (name != null) { - com.sun.tools.doclint.HtmlTag htmlTag = com.sun.tools.doclint.HtmlTag.get(name); + HtmlTag htmlTag = HtmlTag.get(name); if (htmlTag != null && - htmlTag.blockType != com.sun.tools.doclint.HtmlTag.BlockType.INLINE) { + htmlTag.blockType != jdk.javadoc.internal.doclint.HtmlTag.BlockType.INLINE) { return true; } } @@ -1364,9 +1368,9 @@ private boolean inAnAtag() { StartElementTree st = (StartElementTree)tag; Name name = st.getName(); if (name != null) { - com.sun.tools.doclint.HtmlTag htag = - com.sun.tools.doclint.HtmlTag.get(name); - return htag != null && htag.equals(com.sun.tools.doclint.HtmlTag.A); + jdk.javadoc.internal.doclint.HtmlTag htag = + jdk.javadoc.internal.doclint.HtmlTag.get(name); + return htag != null && htag.equals(jdk.javadoc.internal.doclint.HtmlTag.A); } } return false; @@ -1438,11 +1442,8 @@ private Content copyDocRootContent(Content content) { @Override public Boolean visitDocRoot(DocRootTree node, Content c) { - Content docRootContent = TagletWriter.getInlineTagOutput(element, - configuration.tagletManager, - holderTag, - node, - getTagletWriterInstance(isFirstSentence)); + Content docRootContent = getInlineTagOutput(element, holderTag, node, + isFirstSentence, false); if (c != null) { c.add(docRootContent); } else { @@ -1474,9 +1475,8 @@ public Boolean visitErroneous(ErroneousTree node, Content c) { @Override public Boolean visitInheritDoc(InheritDocTree node, Content c) { - Content output = TagletWriter.getInlineTagOutput(element, - configuration.tagletManager, holderTag, - tag, getTagletWriterInstance(isFirstSentence)); + Content output = getInlineTagOutput(element, holderTag, node, + isFirstSentence, false); result.add(output); // if we obtained the first sentence successfully, nothing more to do return (isFirstSentence && !output.isEmpty()); @@ -1484,9 +1484,7 @@ public Boolean visitInheritDoc(InheritDocTree node, Content c) { @Override public Boolean visitIndex(IndexTree node, Content p) { - Content output = TagletWriter.getInlineTagOutput(element, - configuration.tagletManager, holderTag, tag, - getTagletWriterInstance(isFirstSentence, inSummary)); + Content output = getInlineTagOutput(element, holderTag, node, isFirstSentence, inSummary); if (output != null) { result.add(output); } @@ -1533,18 +1531,14 @@ public Boolean visitStartElement(StartElementTree node, Content c) { @Override public Boolean visitSummary(SummaryTree node, Content c) { - Content output = TagletWriter.getInlineTagOutput(element, - configuration.tagletManager, holderTag, tag, - getTagletWriterInstance(isFirstSentence)); + Content output = getInlineTagOutput(element, holderTag, node, isFirstSentence, false); result.add(output); return false; } @Override public Boolean visitSystemProperty(SystemPropertyTree node, Content p) { - Content output = TagletWriter.getInlineTagOutput(element, - configuration.tagletManager, holderTag, tag, - getTagletWriterInstance(isFirstSentence, inSummary)); + Content output = getInlineTagOutput(element, holderTag, node, isFirstSentence, inSummary); if (output != null) { result.add(output); } @@ -1577,9 +1571,7 @@ public Boolean visitText(TextTree node, Content c) { @Override protected Boolean defaultAction(DocTree node, Content c) { - Content output = TagletWriter.getInlineTagOutput(element, - configuration.tagletManager, holderTag, tag, - getTagletWriterInstance(isFirstSentence)); + Content output = getInlineTagOutput(element, holderTag, node, isFirstSentence, false); if (output != null) { result.add(output); } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlIndexBuilder.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlIndexBuilder.java new file mode 100644 index 00000000000..0e35063a17c --- /dev/null +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlIndexBuilder.java @@ -0,0 +1,241 @@ +/* + * Copyright (c) 1998, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.javadoc.internal.doclets.formats.html; + +import java.io.IOException; +import java.io.Writer; +import java.util.HashMap; +import java.util.Map; +import java.util.SortedSet; +import javax.lang.model.element.Element; +import javax.lang.model.element.ExecutableElement; +import javax.lang.model.element.TypeElement; + +import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; +import jdk.javadoc.internal.doclets.formats.html.markup.Links; +import jdk.javadoc.internal.doclets.toolkit.Resources; +import jdk.javadoc.internal.doclets.toolkit.util.DocFile; +import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException; +import jdk.javadoc.internal.doclets.toolkit.util.DocPath; +import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; +import jdk.javadoc.internal.doclets.toolkit.util.IndexBuilder; +import jdk.javadoc.internal.doclets.toolkit.util.IndexItem; +import jdk.javadoc.internal.doclets.toolkit.util.Utils; + +/** + * Extensions to {@code IndexBuilder} to fill in remaining fields + * in index items: {@code containingModule}, {@code containingPackage}, + * {@code containingClass}, and {@code url}, and to write out the + * JavaScript files. + * + * <p><b>This is NOT part of any supported API. + * If you write code that depends on this, you do so at your own risk. + * This code and its internal interfaces are subject to change or + * deletion without notice.</b> + */ +public class HtmlIndexBuilder extends IndexBuilder { + private final HtmlConfiguration configuration; + + private final Links links; + private final Resources resources; + private final Utils utils; + + /** + * Creates a new {@code HtmlIndexBuilder}. + * + * @param configuration the current configuration of the doclet + */ + HtmlIndexBuilder(HtmlConfiguration configuration) { + super(configuration, configuration.getOptions().noDeprecated()); + this.configuration = configuration; + links = new Links(DocPath.empty, configuration.utils); + resources = configuration.docResources; + utils = configuration.utils; + } + + /** + * {@inheritDoc} + * + * After the initial work to add the element items, the remaining fields in + * the items are also initialized. + */ + public void addElements() { + super.addElements(); + if (classesOnly) { + return; + } + + + Map<String,Integer> duplicateLabelCheck = new HashMap<>(); + for (Character ch : getFirstCharacters()) { + for (IndexItem item : getItems(ch)) { + duplicateLabelCheck.compute(item.getFullyQualifiedLabel(utils), + (k, v) -> v == null ? 1 : v + 1); + } + } + + for (Character ch : getFirstCharacters()) { + for (IndexItem item : getItems(ch)) { + if (item.isElementItem()) { + boolean addModuleInfo = + duplicateLabelCheck.get(item.getFullyQualifiedLabel(utils)) > 1; + addContainingInfo(item, addModuleInfo); + } + } + } + } + + private void addContainingInfo(IndexItem item, boolean addModuleInfo) { + Element element = item.getElement(); + switch (element.getKind()) { + case MODULE: + break; + + case PACKAGE: + if (configuration.showModules) { + item.setContainingModule(utils.getFullyQualifiedName(utils.containingModule(element))); + } + break; + + case CLASS: + case ENUM: + case RECORD: + case ANNOTATION_TYPE: + case INTERFACE: + item.setContainingPackage(utils.getPackageName(utils.containingPackage(element))); + if (configuration.showModules && addModuleInfo) { + item.setContainingModule(utils.getFullyQualifiedName(utils.containingModule(element))); + } + break; + + case CONSTRUCTOR: + case METHOD: + case FIELD: + case ENUM_CONSTANT: + TypeElement containingType = item.getContainingTypeElement(); + item.setContainingPackage(utils.getPackageName(utils.containingPackage(element))); + item.setContainingClass(utils.getSimpleName(containingType)); + if (configuration.showModules && addModuleInfo) { + item.setContainingModule(utils.getFullyQualifiedName(utils.containingModule(element))); + } + if (utils.isExecutableElement(element)) { + String url = HtmlTree.encodeURL(links.getAnchor((ExecutableElement) element)); + if (!url.equals(item.getLabel())) { + item.setUrl(url); + } + } + break; + + default: + throw new Error(); + } + } + + + /** + * Generates the set of index files used by interactive search. + * + * @throws DocFileIOException if there is a problem creating any of the search index files + */ + public void createSearchIndexFiles() throws DocFileIOException { + // add last-minute items + if (!configuration.packages.isEmpty()) { + IndexItem item = IndexItem.of(IndexItem.Category.PACKAGES, + resources.getText("doclet.All_Packages"), + DocPaths.ALLPACKAGES_INDEX); + add(item); + } + IndexItem item = IndexItem.of(IndexItem.Category.TYPES, + resources.getText("doclet.All_Classes"), + DocPaths.ALLCLASSES_INDEX); + add(item); + + for (IndexItem.Category category : IndexItem.Category.values()) { + DocPath file; + String varName; + switch (category) { + case MODULES -> { + file = DocPaths.MODULE_SEARCH_INDEX_JS; + varName = "moduleSearchIndex"; + } + case PACKAGES -> { + file = DocPaths.PACKAGE_SEARCH_INDEX_JS; + varName = "packageSearchIndex"; + } + case TYPES -> { + file = DocPaths.TYPE_SEARCH_INDEX_JS; + varName = "typeSearchIndex"; + } + case MEMBERS -> { + file = DocPaths.MEMBER_SEARCH_INDEX_JS; + varName = "memberSearchIndex"; + } + case TAGS -> { + file = DocPaths.TAG_SEARCH_INDEX_JS; + varName = "tagSearchIndex"; + } + default -> throw new Error(); + } + + createSearchIndexFile(file, getItems(category), varName); + } + } + + /** + * Creates a search index file. + * + * @param searchIndexJS the file for the JavaScript to be generated + * @param indexItems the search index items + * @param varName the variable name to write in the JavaScript file + * + * @throws DocFileIOException if there is a problem creating the search index file + */ + private void createSearchIndexFile(DocPath searchIndexJS, + SortedSet<IndexItem> indexItems, + String varName) + throws DocFileIOException + { + // The file needs to be created even if there are no searchIndex items + DocFile jsFile = DocFile.createFileForOutput(configuration, searchIndexJS); + try (Writer wr = jsFile.openWriter()) { + wr.write(varName); + wr.write(" = ["); + boolean first = true; + for (IndexItem item : indexItems) { + if (first) { + first = false; + } else { + wr.write(","); + } + wr.write(item.toJSON()); + } + wr.write("];"); + wr.write("updateSearchResults();"); + } catch (IOException ie) { + throw new DocFileIOException(jsFile, DocFileIOException.Mode.WRITE, ie); + } + } +} diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlOptions.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlOptions.java index 8f1b9051de3..61ddf053c0e 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlOptions.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlOptions.java @@ -411,7 +411,7 @@ public boolean process(String opt, List<String> args) { messages.error("doclet.Option_doclint_no_qualifiers"); return false; } - if (!DocLint.isValidOption(dopt)) { + if (!DocLint.newDocLint().isValidOption(dopt)) { messages.error("doclet.Option_doclint_invalid_arg"); return false; } @@ -424,7 +424,7 @@ public boolean process(String opt, List<String> args) { @Override public boolean process(String opt, List<String> args) { String dopt = opt.replace("-Xdoclint/package:", DocLint.XCHECK_PACKAGE); - if (!DocLint.isValidOption(dopt)) { + if (!DocLint.newDocLint().isValidOption(dopt)) { messages.error("doclet.Option_doclint_package_invalid_arg"); return false; } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java index 9eb3eec46ba..013028288bd 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java @@ -196,13 +196,12 @@ public void addMemberDescription(VariableElement field, DocTree serialFieldTag, */ @Override public void addMemberTags(VariableElement field, Content contentTree) { - Content tagContent = new ContentBuilder(); - TagletWriter.genTagOutput(configuration.tagletManager, field, - configuration.tagletManager.getBlockTaglets(field), - writer.getTagletWriterInstance(false), tagContent); - HtmlTree dl = HtmlTree.DL(HtmlStyle.notes); - dl.add(tagContent); - contentTree.add(dl); // TODO: what if empty? + Content tagContent = writer.getBlockTagOutput(field); + if (!tagContent.isEmpty()) { + HtmlTree dl = HtmlTree.DL(HtmlStyle.notes); + dl.add(tagContent); + contentTree.add(dl); + } } /** diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java index c0037d7c243..b272973381c 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java @@ -153,16 +153,12 @@ public void addMemberDescription(ExecutableElement member, Content methodsConten */ @Override public void addMemberTags(ExecutableElement member, Content methodsContentTree) { - Content tagContent = new ContentBuilder(); - TagletManager tagletManager = - configuration.tagletManager; - TagletWriter.genTagOutput(tagletManager, member, - tagletManager.getSerializedFormTaglets(), - writer.getTagletWriterInstance(false), tagContent); + TagletManager tagletManager = configuration.tagletManager; + Content tagContent = writer.getBlockTagOutput(member, tagletManager.getSerializedFormTaglets()); HtmlTree dl = HtmlTree.DL(HtmlStyle.notes); dl.add(tagContent); methodsContentTree.add(dl); - if (name(member).compareTo("writeExternal") == 0 + if (name(member).equals("writeExternal") && utils.getSerialDataTrees(member).isEmpty()) { serialWarning(member, "doclet.MissingSerialDataTag", utils.getFullyQualifiedName(member.getEnclosingElement()), name(member)); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkInfoImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkInfoImpl.java index 7ab8c39c632..8e886f9b88c 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkInfoImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkInfoImpl.java @@ -208,14 +208,19 @@ public enum Kind { PROPERTY_COPY, /** - * A receiver type + * A receiver type. */ RECEIVER_TYPE, /** - * A record component within a class signature + * A record component within a class signature. */ - RECORD_COMPONENT + RECORD_COMPONENT, + + /** + * A type thrown from a method. + */ + THROWS_TYPE } public final HtmlConfiguration configuration; @@ -389,9 +394,8 @@ public final void setContext(Kind c) { case RETURN_TYPE: case SUMMARY_RETURN_TYPE: - excludeTypeBounds = true; - break; case EXECUTABLE_MEMBER_PARAM: + case THROWS_TYPE: excludeTypeBounds = true; break; } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java index d41a3e0c6a9..782c2ea758b 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java @@ -111,7 +111,7 @@ public Content getMethodDocTreeHeader(ExecutableElement method) { } methodDocTree.add(heading); return HtmlTree.SECTION(HtmlStyle.detail, methodDocTree) - .setId(links.getName(writer.getAnchor(method))); + .setId(links.getAnchor(method)); } /** @@ -284,7 +284,7 @@ protected static void addOverridden(HtmlDocletWriter writer, Content codeOverriddenTypeLink = HtmlTree.CODE(overriddenTypeLink); Content methlink = writer.getLink( new LinkInfoImpl(writer.configuration, LinkInfoImpl.Kind.MEMBER, holder) - .where(writer.links.getName(writer.getAnchor(method))) + .where(writer.links.getAnchor(method)) .label(method.getSimpleName())); Content codeMethLink = HtmlTree.CODE(methlink); Content dd = HtmlTree.DD(codeMethLink); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java index 4b8eeeebcca..a1234c2cd6d 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java @@ -142,7 +142,7 @@ public Navigation(Element element, HtmlConfiguration configuration, PageMode pag this.documentedPage = page; this.path = path; this.pathToRoot = path.parent().invert(); - this.links = new Links(path); + this.links = new Links(path, configuration.utils); this.rowListTitle = configuration.getDocResources().getText("doclet.Navigation"); this.searchLabel = contents.getContent("doclet.search"); } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SearchIndexItem.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SearchIndexItem.java deleted file mode 100644 index 0f2c6181d00..00000000000 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SearchIndexItem.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright (c) 2015, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package jdk.javadoc.internal.doclets.formats.html; - -import javax.lang.model.element.Element; - -/** - * Index item for search. - * - * <p><b>This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice.</b> - */ -public class SearchIndexItem { - - enum Category { - MODULES, - PACKAGES, - TYPES, - MEMBERS, - /** - * The category of items corresponding to {@code {@index}} tags. - */ - INDEX, - /** - * The category of items corresponding to {@code {@systemProperty}} tags. - */ - SYSTEM_PROPERTY - } - - private Category category; - private String label = ""; - private String url = ""; - private String containingModule = ""; - private String containingPackage = ""; - private String containingClass = ""; - private String holder = ""; - private String description = ""; - private Element element; - - public void setLabel(String l) { - label = l; - } - - public String getLabel() { - return label; - } - - public void setUrl(String u) { - url = u; - } - - public String getUrl() { - return url; - } - - public void setContainingModule(String m) { - containingModule = m; - } - - public void setContainingPackage(String p) { - containingPackage = p; - } - - public void setContainingClass(String c) { - containingClass = c; - } - - public void setCategory(Category c) { - category = c; - } - - public void setHolder(String h) { - holder = h; - } - - public String getHolder() { - return holder; - } - - public void setDescription(String d) { - description = d; - } - - public String getDescription() { - return description; - } - - protected Category getCategory() { - return category; - } - - public void setElement(Element element) { - this.element = element; - } - - public Element getElement() { - return element; - } - - @Override - public String toString() { - // TODO: Additional processing is required, see JDK-8238495 - StringBuilder item = new StringBuilder(); - switch (category) { - case MODULES: - item.append("{") - .append("\"l\":\"").append(label).append("\"") - .append("}"); - break; - case PACKAGES: - item.append("{"); - if (!containingModule.isEmpty()) { - item.append("\"m\":\"").append(containingModule).append("\","); - } - item.append("\"l\":\"").append(label).append("\""); - if (!url.isEmpty()) { - item.append(",\"u\":\"").append(url).append("\""); - } - item.append("}"); - break; - case TYPES: - item.append("{"); - if (!containingPackage.isEmpty()) { - item.append("\"p\":\"").append(containingPackage).append("\","); - } - if (!containingModule.isEmpty()) { - item.append("\"m\":\"").append(containingModule).append("\","); - } - item.append("\"l\":\"").append(label).append("\""); - if (!url.isEmpty()) { - item.append(",\"u\":\"").append(url).append("\""); - } - item.append("}"); - break; - case MEMBERS: - item.append("{"); - if (!containingModule.isEmpty()) { - item.append("\"m\":\"").append(containingModule).append("\","); - } - item.append("\"p\":\"").append(containingPackage).append("\",") - .append("\"c\":\"").append(containingClass).append("\",") - .append("\"l\":\"").append(label).append("\""); - if (!url.isEmpty()) { - item.append(",\"u\":\"").append(url).append("\""); - } - item.append("}"); - break; - case INDEX: - case SYSTEM_PROPERTY: - item.append("{") - .append("\"l\":\"").append(label).append("\",") - .append("\"h\":\"").append(holder).append("\","); - if (!description.isEmpty()) { - item.append("\"d\":\"").append(description).append("\","); - } - item.append("\"u\":\"").append(url).append("\"") - .append("}"); - break; - default: - throw new AssertionError("Unexpected category: " + category); - } - return item.toString(); - } - - /** - * Get the part of the label after the last dot, or whole label if no dots. - * - * @return the simple name - */ - public String getSimpleName() { - return label.substring(label.lastIndexOf('.') + 1); - } -} diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SearchIndexItems.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SearchIndexItems.java deleted file mode 100644 index 3a0a6286edc..00000000000 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SearchIndexItems.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package jdk.javadoc.internal.doclets.formats.html; - -import jdk.javadoc.internal.doclets.formats.html.SearchIndexItem.Category; -import jdk.javadoc.internal.doclets.toolkit.util.Utils; - -import java.util.Comparator; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeSet; -import java.util.stream.Stream; - -/** - * A container for organizing {@linkplain SearchIndexItem search items} - * by {@linkplain Category category}. - * - * <p><b>This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice.</b> - */ -public final class SearchIndexItems { - - private final Map<Category, Set<SearchIndexItem>> items = new HashMap<>(); - private final Utils utils; - - public SearchIndexItems(Utils utils) { - this.utils = Objects.requireNonNull(utils); - } - - /** - * Adds the specified item to this container. - * - * @param item - * the item to add - */ - public void add(SearchIndexItem item) { - Objects.requireNonNull(item); - items.computeIfAbsent(item.getCategory(), this::newSetForCategory) - .add(item); - } - - private Set<SearchIndexItem> newSetForCategory(Category category) { - final Comparator<SearchIndexItem> cmp; - if (category == Category.TYPES) { - cmp = utils.comparators.makeTypeSearchIndexComparator(); - } else { - cmp = utils.comparators.makeGenericSearchIndexComparator(); - } - return new TreeSet<>(cmp); - } - - /** - * Checks if there are items of any of the specified categories - * in this container. - * - * <p> Iff there exists an item {@code i} for which there is a category - * {@code c} from the specified categories such that - * {@code i.getCategory().equals(c)}, then {@code true} is returned. - * - * @param firstCategory - * the first category - * @param otherCategories - * other categories (optional) - * - * @return {@code true} if there are items of any of the specified categories, - * {@code false} otherwise - * - * @throws NullPointerException - * if there are {@code null} categories - */ - public boolean containsAnyOfCategories(Category firstCategory, - Category... otherCategories) - { - return itemsOfCategories(firstCategory, otherCategories) - .findAny() - .isPresent(); - } - - /** - * Returns a stream of items of any of the specified categories - * from this container. - * - * <p> The returned stream consists of all items {@code i} for which there - * is a category {@code c} from the specified categories such that - * {@code i.getCategory().equals(c)}. The stream may be empty. - * - * @param firstCategory - * the first category - * @param otherCategories - * other categories (optional) - * - * @return a stream of items of the specified categories - * - * @throws NullPointerException - * if there are {@code null} categories - */ - public Stream<SearchIndexItem> itemsOfCategories(Category firstCategory, - Category... otherCategories) - { - return concatenatedStreamOf(firstCategory, otherCategories) - .distinct() - .flatMap(this::itemsOf); - } - - private Stream<SearchIndexItem> itemsOf(Category cat) { - Objects.requireNonNull(cat); - return items.getOrDefault(cat, Set.of()).stream(); - } - - /** - * Returns a concatenated stream of elements. - * - * <p> The elements of the returned stream are encountered in the following order: - * {@code first, remaining[0], remaining[1], ..., remaining[remaining.length - 1]}. - * - * @param first - * the first element - * @param remaining - * the remaining elements, if any - * @param <T> - * the type of elements - * - * @return the stream of elements - * - * @throws NullPointerException - * if {@code remaining} is {@code null} - */ - private static <T> Stream<T> concatenatedStreamOf(T first, T[] remaining) { - return Stream.concat(Stream.of(first), Stream.of(remaining)); - } -} diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SingleIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SingleIndexWriter.java index 64fae0f07be..fb0c2ca3b3e 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SingleIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SingleIndexWriter.java @@ -28,7 +28,7 @@ import java.util.Set; import java.util.TreeSet; -import jdk.javadoc.internal.doclets.formats.html.SearchIndexItem.Category; +import com.sun.source.doctree.DocTree; import jdk.javadoc.internal.doclets.formats.html.markup.BodyContents; import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder; import jdk.javadoc.internal.doclets.formats.html.markup.Entity; @@ -38,9 +38,9 @@ import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; import jdk.javadoc.internal.doclets.toolkit.Content; import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException; -import jdk.javadoc.internal.doclets.toolkit.util.DocPath; import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; import jdk.javadoc.internal.doclets.toolkit.util.IndexBuilder; +import jdk.javadoc.internal.doclets.toolkit.util.IndexItem.Category; /** @@ -57,34 +57,26 @@ */ public class SingleIndexWriter extends AbstractIndexWriter { - private Set<Character> elements; + private Set<Character> firstCharacters; /** * Construct the SingleIndexWriter with filename "index-all.html" and the * {@link IndexBuilder} * * @param configuration the configuration for this doclet - * @param filename Name of the index file to be generated. - * @param indexBuilder Unicode based Index from {@link IndexBuilder} */ - public SingleIndexWriter(HtmlConfiguration configuration, - DocPath filename, - IndexBuilder indexBuilder) { - super(configuration, filename, indexBuilder); + public SingleIndexWriter(HtmlConfiguration configuration) { + super(configuration, DocPaths.INDEX_ALL); } /** * Generate single index file, for all Unicode characters. * * @param configuration the configuration for this doclet - * @param indexBuilder IndexBuilder built by {@link IndexBuilder} * @throws DocFileIOException if there is a problem generating the index */ - public static void generate(HtmlConfiguration configuration, - IndexBuilder indexBuilder) throws DocFileIOException { - DocPath filename = DocPaths.INDEX_ALL; - SingleIndexWriter indexgen = new SingleIndexWriter(configuration, - filename, indexBuilder); + public static void generate(HtmlConfiguration configuration) throws DocFileIOException { + SingleIndexWriter indexgen = new SingleIndexWriter(configuration); indexgen.generateIndexFile(); } @@ -101,14 +93,10 @@ protected void generateIndexFile() throws DocFileIOException { navBar.setUserHeader(getUserHeaderFooter(true)); headerContent.add(navBar.getContent(Navigation.Position.TOP)); Content mainContent = new ContentBuilder(); - elements = new TreeSet<>(indexBuilder.asMap().keySet()); - elements.addAll(tagSearchIndexMap.keySet()); + firstCharacters = new TreeSet<>(mainIndex.getFirstCharacters()); addLinksForIndexes(mainContent); - for (Character unicode : elements) { - if (tagSearchIndexMap.get(unicode) != null) { - indexBuilder.addSearchTags(unicode, tagSearchIndexMap.get(unicode)); - } - addContents(unicode, indexBuilder.getMemberList(unicode), mainContent); + for (Character ch : firstCharacters) { + addContents(ch, mainIndex.getItems(ch), mainContent); } addLinksForIndexes(mainContent); HtmlTree footer = HtmlTree.FOOTER(); @@ -122,7 +110,6 @@ protected void generateIndexFile() throws DocFileIOException { contents.getContent("doclet.Index")))) .addMainContent(mainContent) .setFooter(footer)); - createSearchIndexFiles(); printHtmlDocument(null, "index", body); } @@ -132,7 +119,7 @@ protected void generateIndexFile() throws DocFileIOException { * @param contentTree the content tree to which the links for indexes will be added */ protected void addLinksForIndexes(Content contentTree) { - for (Character ch : elements) { + for (Character ch : firstCharacters) { String unicode = ch.toString(); contentTree.add( links.createLink(getNameForIndex(unicode), @@ -147,7 +134,8 @@ protected void addLinksForIndexes(Content contentTree) { contentTree.add(links.createLink(DocPaths.ALLPACKAGES_INDEX, contents.allPackagesLabel)); } - if (searchItems.containsAnyOfCategories(Category.SYSTEM_PROPERTY)) { + boolean anySystemProperties = !mainIndex.getItems(DocTree.Kind.SYSTEM_PROPERTY).isEmpty(); + if (anySystemProperties) { contentTree.add(getVerticalSeparator()); contentTree.add(links.createLink(DocPaths.SYSTEM_PROPERTIES, contents.systemPropertiesLabel)); } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SplitIndexWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SplitIndexWriter.java index a5f79021f92..48980de2678 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SplitIndexWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SplitIndexWriter.java @@ -29,12 +29,10 @@ import java.util.Collection; import java.util.List; import java.util.ListIterator; -import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; -import java.util.stream.Collectors; -import jdk.javadoc.internal.doclets.formats.html.SearchIndexItem.Category; +import com.sun.source.doctree.DocTree; import jdk.javadoc.internal.doclets.formats.html.markup.BodyContents; import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder; import jdk.javadoc.internal.doclets.formats.html.markup.Entity; @@ -47,6 +45,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPath; import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; import jdk.javadoc.internal.doclets.toolkit.util.IndexBuilder; +import jdk.javadoc.internal.doclets.toolkit.util.IndexItem.Category; /** * Generate Separate Index Files for all the member names with Indexing in @@ -70,14 +69,12 @@ public class SplitIndexWriter extends AbstractIndexWriter { * * @param configuration the configuration for this doclet * @param path Path to the file which is getting generated. - * @param indexBuilder Unicode based Index from {@link IndexBuilder} * @param elements the collection of characters for which to generate index files */ public SplitIndexWriter(HtmlConfiguration configuration, DocPath path, - IndexBuilder indexBuilder, Collection<Character> elements) { - super(configuration, path, indexBuilder); + super(configuration, path); this.indexElements = new ArrayList<>(elements); } @@ -86,30 +83,19 @@ public SplitIndexWriter(HtmlConfiguration configuration, * the members starting with the particular unicode character. * * @param configuration the configuration for this doclet - * @param indexBuilder IndexBuilder built by {@link IndexBuilder} * @throws DocFileIOException if there is a problem generating the index files */ - public static void generate(HtmlConfiguration configuration, - IndexBuilder indexBuilder) throws DocFileIOException - { + public static void generate(HtmlConfiguration configuration) throws DocFileIOException { DocPath path = DocPaths.INDEX_FILES; - SortedSet<Character> keys = new TreeSet<>(indexBuilder.asMap().keySet()); - Set<Character> searchItemsKeys = configuration.searchItems - .itemsOfCategories(Category.INDEX, Category.SYSTEM_PROPERTY) - .map(i -> keyCharacter(i.getLabel())) - .collect(Collectors.toSet()); - keys.addAll(searchItemsKeys); + IndexBuilder mainIndex = configuration.mainIndex; + SortedSet<Character> keys = new TreeSet<>(mainIndex.getFirstCharacters()); ListIterator<Character> li = new ArrayList<>(keys).listIterator(); while (li.hasNext()) { Character ch = li.next(); DocPath filename = DocPaths.indexN(li.nextIndex()); SplitIndexWriter indexgen = new SplitIndexWriter(configuration, - path.resolve(filename), - indexBuilder, keys); + path.resolve(filename), keys); indexgen.generateIndexFile(ch); - if (!li.hasNext()) { - indexgen.createSearchIndexFiles(); - } } } @@ -135,10 +121,7 @@ protected void generateIndexFile(Character unicode) throws DocFileIOException { contents.getContent("doclet.Index")))); Content mainContent = new ContentBuilder(); addLinksForIndexes(mainContent); - if (tagSearchIndexMap.get(unicode) != null) { - indexBuilder.addSearchTags(unicode, tagSearchIndexMap.get(unicode)); - } - addContents(unicode, indexBuilder.getMemberList(unicode), mainContent); + addContents(unicode, mainIndex.getItems(unicode), mainContent); addLinksForIndexes(mainContent); main.add(mainContent); HtmlTree footer = HtmlTree.FOOTER(); @@ -173,7 +156,8 @@ protected void addLinksForIndexes(Content contentTree) { contentTree.add(links.createLink(pathToRoot.resolve(DocPaths.ALLPACKAGES_INDEX), contents.allPackagesLabel)); } - if (searchItems.containsAnyOfCategories(Category.SYSTEM_PROPERTY)) { + boolean anySystemProperties = !mainIndex.getItems(DocTree.Kind.SYSTEM_PROPERTY).isEmpty(); + if (anySystemProperties) { contentTree.add(getVerticalSeparator()); contentTree.add(links.createLink(pathToRoot.resolve(DocPaths.SYSTEM_PROPERTIES), contents.systemPropertiesLabel)); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SystemPropertiesWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SystemPropertiesWriter.java index 98c61974a35..6d2c5162584 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SystemPropertiesWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SystemPropertiesWriter.java @@ -24,7 +24,7 @@ */ package jdk.javadoc.internal.doclets.formats.html; -import jdk.javadoc.internal.doclets.formats.html.SearchIndexItem.Category; +import com.sun.source.doctree.DocTree; import jdk.javadoc.internal.doclets.formats.html.markup.BodyContents; import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder; import jdk.javadoc.internal.doclets.formats.html.markup.FixedStringContent; @@ -40,6 +40,8 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException; import jdk.javadoc.internal.doclets.toolkit.util.DocPath; import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; +import jdk.javadoc.internal.doclets.toolkit.util.IndexItem; +import jdk.javadoc.internal.doclets.toolkit.util.IndexItem.Category; import javax.lang.model.element.Element; import java.nio.file.Path; @@ -85,8 +87,8 @@ public static void generate(HtmlConfiguration configuration) throws DocFileIOExc } private static void generate(HtmlConfiguration configuration, DocPath fileName) throws DocFileIOException { - boolean hasSystemProperties = configuration.searchItems - .containsAnyOfCategories(Category.SYSTEM_PROPERTY); + boolean hasSystemProperties = configuration.mainIndex != null + && !configuration.mainIndex.getItems(DocTree.Kind.SYSTEM_PROPERTY).isEmpty(); if (!hasSystemProperties) { // Cannot defer this check any further, because of the super() call // that prints out notices on creating files, etc. @@ -132,15 +134,15 @@ protected void buildSystemPropertiesPage() throws DocFileIOException { * @param content HtmlTree content to which the links will be added */ protected void addSystemProperties(Content content) { - Map<String, List<SearchIndexItem>> searchIndexMap = groupSystemProperties(); + Map<String, List<IndexItem>> searchIndexMap = groupSystemProperties(); Content separator = new StringContent(", "); Table table = new Table(HtmlStyle.systemPropertiesSummary, HtmlStyle.summaryTable) .setCaption(contents.systemPropertiesSummaryLabel) .setHeader(new TableHeader(contents.propertyLabel, contents.referencedIn)) .setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast); - for (Entry<String, List<SearchIndexItem>> entry : searchIndexMap.entrySet()) { + for (Entry<String, List<IndexItem>> entry : searchIndexMap.entrySet()) { Content propertyName = new StringContent(entry.getKey()); - List<SearchIndexItem> searchIndexItems = entry.getValue(); + List<IndexItem> searchIndexItems = entry.getValue(); Content separatedReferenceLinks = new ContentBuilder(); separatedReferenceLinks.add(createLink(searchIndexItems.get(0))); for (int i = 1; i < searchIndexItems.size(); i++) { @@ -152,24 +154,23 @@ protected void addSystemProperties(Content content) { content.add(table); } - private Map<String, List<SearchIndexItem>> groupSystemProperties() { - return searchItems - .itemsOfCategories(Category.SYSTEM_PROPERTY) - .collect(groupingBy(SearchIndexItem::getLabel, TreeMap::new, toList())); + private Map<String, List<IndexItem>> groupSystemProperties() { + return configuration.mainIndex.getItems(DocTree.Kind.SYSTEM_PROPERTY).stream() + .collect(groupingBy(IndexItem::getLabel, TreeMap::new, toList())); } - private Content createLink(SearchIndexItem i) { - assert i.getCategory() == Category.SYSTEM_PROPERTY : i; - if (i.getElement() != null) { - if (i.getElement() instanceof OverviewElement) { - return links.createLink(pathToRoot.resolve(i.getUrl()), - resources.getText("doclet.Overview")); - } - DocletElement e = ((DocletElement) i.getElement()); + private Content createLink(IndexItem i) { + assert i.getDocTree().getKind() == DocTree.Kind.SYSTEM_PROPERTY : i; + Element element = i.getElement(); + if (element instanceof OverviewElement) { + return links.createLink(pathToRoot.resolve(i.getUrl()), + resources.getText("doclet.Overview")); + } else if (element instanceof DocletElement) { + DocletElement e = (DocletElement) element; // Implementations of DocletElement do not override equals and // hashCode; putting instances of DocletElement in a map is not // incorrect, but might well be inefficient - String t = titles.computeIfAbsent(i.getElement(), utils::getHTMLTitle); + String t = titles.computeIfAbsent(element, utils::getHTMLTitle); if (t.isBlank()) { // The user should probably be notified (a warning?) that this // file does not have a title diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java index 1cabb9fadff..2773bfc7c15 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java @@ -41,7 +41,6 @@ import com.sun.source.doctree.IndexTree; import com.sun.source.doctree.ParamTree; import com.sun.source.doctree.SystemPropertyTree; -import jdk.javadoc.internal.doclets.formats.html.SearchIndexItem.Category; import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; @@ -59,6 +58,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPath; import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants; +import jdk.javadoc.internal.doclets.toolkit.util.IndexItem; import jdk.javadoc.internal.doclets.toolkit.util.Utils; /** @@ -111,7 +111,7 @@ protected Content codeTagOutput(Element element, DocTree tag) { @Override protected Content indexTagOutput(Element element, DocTree tag) { CommentHelper ch = utils.getCommentHelper(element); - IndexTree itt = (IndexTree)tag; + IndexTree itt = (IndexTree) tag; String tagText = ch.getText(itt.getSearchTerm()); if (tagText.charAt(0) == '"' && tagText.charAt(tagText.length() - 1) == '"') { @@ -120,7 +120,7 @@ protected Content indexTagOutput(Element element, DocTree tag) { } String desc = ch.getText(itt.getDescription()); - return createAnchorAndSearchIndex(element, tagText, desc, false); + return createAnchorAndSearchIndex(element, tagText, desc, tag); } @Override @@ -143,9 +143,9 @@ public Content deprecatedTagOutput(Element element) { result.add(HtmlTree.SPAN(HtmlStyle.deprecatedLabel, htmlWriter.getDeprecatedPhrase(element))); if (!deprs.isEmpty()) { - List<? extends DocTree> commentTags = ch.getDescription(deprs.get(0)); - if (!commentTags.isEmpty()) { - result.add(commentTagsToOutput(null, element, commentTags, false)); + List<? extends DocTree> commentTrees = ch.getDescription(deprs.get(0)); + if (!commentTrees.isEmpty()) { + result.add(commentTagsToOutput(element, null, commentTrees, false)); } } } @@ -154,8 +154,8 @@ public Content deprecatedTagOutput(Element element) { result.add(HtmlTree.SPAN(HtmlStyle.deprecatedLabel, htmlWriter.getDeprecatedPhrase(element))); if (!deprs.isEmpty()) { - List<? extends DocTree> bodyTags = ch.getBody(deprs.get(0)); - Content body = commentTagsToOutput(null, element, bodyTags, false); + List<? extends DocTree> bodyTrees = ch.getBody(deprs.get(0)); + Content body = commentTagsToOutput(element, null, bodyTrees, false); if (!body.isEmpty()) result.add(HtmlTree.DIV(HtmlStyle.deprecationComment, body)); } @@ -205,18 +205,6 @@ public Content paramTagOutput(Element element, DocTree paramTag, String paramNam return HtmlTree.DD(body); } - @Override - public Content propertyTagOutput(Element element, DocTree tag, String prefix) { - Content body = new ContentBuilder(); - CommentHelper ch = utils.getCommentHelper(element); - body.add(new RawHtml(prefix)); - body.add(" "); - body.add(HtmlTree.CODE(new RawHtml(ch.getText(tag)))); - body.add("."); - Content result = HtmlTree.P(body); - return result; - } - @Override public Content returnTagOutput(Element element, DocTree returnTag) { CommentHelper ch = utils.getCommentHelper(element); @@ -273,7 +261,7 @@ private void appendSeparatorIfNotEmpty(ContentBuilder body) { } @Override - public Content simpleTagOutput(Element element, List<? extends DocTree> simpleTags, String header) { + public Content simpleBlockTagOutput(Element element, List<? extends DocTree> simpleTags, String header) { CommentHelper ch = utils.getCommentHelper(element); ContentBuilder body = new ContentBuilder(); boolean many = false; @@ -290,22 +278,12 @@ public Content simpleTagOutput(Element element, List<? extends DocTree> simpleTa HtmlTree.DD(body)); } - @Override - public Content simpleTagOutput(Element element, DocTree simpleTag, String header) { - CommentHelper ch = utils.getCommentHelper(element); - List<? extends DocTree> description = ch.getDescription(simpleTag); - Content body = htmlWriter.commentTagsToContent(simpleTag, element, description, false, inSummary); - return new ContentBuilder( - HtmlTree.DT(new RawHtml(header)), - HtmlTree.DD(body)); - } - @Override protected Content systemPropertyTagOutput(Element element, DocTree tag) { SystemPropertyTree itt = (SystemPropertyTree) tag; String tagText = itt.getPropertyName().toString(); return HtmlTree.CODE(createAnchorAndSearchIndex(element, tagText, - resources.getText("doclet.System_Property"), true)); + resources.getText("doclet.System_Property"), tag)); } @Override @@ -358,18 +336,18 @@ public Content valueTagOutput(VariableElement field, String constantVal, boolean } @Override - public Content commentTagsToOutput(DocTree holderTag, List<? extends DocTree> tags) { - return commentTagsToOutput(holderTag, null, tags, false); + public Content commentTagsToOutput(DocTree holder, List<? extends DocTree> tags) { + return commentTagsToOutput(null, holder, tags, false); } @Override - public Content commentTagsToOutput(Element holder, List<? extends DocTree> tags) { - return commentTagsToOutput(null, holder, tags, false); + public Content commentTagsToOutput(Element element, List<? extends DocTree> tags) { + return commentTagsToOutput(element, null, tags, false); } @Override - public Content commentTagsToOutput(DocTree holderTag, - Element holder, + public Content commentTagsToOutput(Element holder, + DocTree holderTag, List<? extends DocTree> tags, boolean isFirstSentence) { @@ -388,7 +366,7 @@ protected TypeElement getCurrentPageElement() { } @SuppressWarnings("preview") - private Content createAnchorAndSearchIndex(Element element, String tagText, String desc, boolean isSystemProperty) { + private Content createAnchorAndSearchIndex(Element element, String tagText, String desc, DocTree tree) { Content result = null; if (isFirstSentence && inSummary) { result = new StringContent(tagText); @@ -401,77 +379,60 @@ private Content createAnchorAndSearchIndex(Element element, String tagText, Stri } result = HtmlTree.SPAN(anchorName, HtmlStyle.searchTagResult, new StringContent(tagText)); if (options.createIndex() && !tagText.isEmpty()) { - SearchIndexItem si = new SearchIndexItem(); - si.setLabel(tagText); - si.setDescription(desc); - si.setUrl(htmlWriter.path.getPath() + "#" + anchorName); - new SimpleElementVisitor14<Void, Void>() { + String holder = new SimpleElementVisitor14<String, Void>() { @Override - public Void visitModule(ModuleElement e, Void p) { - si.setHolder(resources.getText("doclet.module") - + " " + utils.getFullyQualifiedName(e)); - return null; + public String visitModule(ModuleElement e, Void p) { + return resources.getText("doclet.module") + + " " + utils.getFullyQualifiedName(e); } @Override - public Void visitPackage(PackageElement e, Void p) { - si.setHolder(resources.getText("doclet.package") - + " " + utils.getFullyQualifiedName(e)); - return null; + public String visitPackage(PackageElement e, Void p) { + return resources.getText("doclet.package") + + " " + utils.getFullyQualifiedName(e); } @Override - public Void visitType(TypeElement e, Void p) { - si.setHolder(utils.getTypeElementName(e, true) - + " " + utils.getFullyQualifiedName(e)); - return null; + public String visitType(TypeElement e, Void p) { + return utils.getTypeElementName(e, true) + + " " + utils.getFullyQualifiedName(e); } @Override - public Void visitExecutable(ExecutableElement e, Void p) { - si.setHolder(utils.getFullyQualifiedName(utils.getEnclosingTypeElement(e)) - + "." + utils.getSimpleName(e) - + utils.flatSignature(e, htmlWriter.getCurrentPageElement())); - return null; + public String visitExecutable(ExecutableElement e, Void p) { + return utils.getFullyQualifiedName(utils.getEnclosingTypeElement(e)) + + "." + utils.getSimpleName(e) + + utils.flatSignature(e, htmlWriter.getCurrentPageElement()); } @Override - public Void visitVariable(VariableElement e, Void p) { - TypeElement te = utils.getEnclosingTypeElement(e); - si.setHolder(utils.getFullyQualifiedName(te) + "." + utils.getSimpleName(e)); - return null; + public String visitVariable(VariableElement e, Void p) { + return utils.getFullyQualifiedName(utils.getEnclosingTypeElement(e)) + + "." + utils.getSimpleName(e); } @Override - public Void visitUnknown(Element e, Void p) { + public String visitUnknown(Element e, Void p) { if (e instanceof DocletElement) { DocletElement de = (DocletElement) e; - si.setElement(de); - switch (de.getSubKind()) { - case OVERVIEW: - si.setHolder(resources.getText("doclet.Overview")); - break; - case DOCFILE: - si.setHolder(getHolderName(de)); - break; - default: - throw new IllegalStateException(); - } - return null; + return switch (de.getSubKind()) { + case OVERVIEW -> resources.getText("doclet.Overview"); + case DOCFILE -> getHolderName(de); + }; } else { return super.visitUnknown(e, p); } } @Override - protected Void defaultAction(Element e, Void p) { - si.setHolder(utils.getFullyQualifiedName(e)); - return null; + protected String defaultAction(Element e, Void p) { + return utils.getFullyQualifiedName(e); } }.visit(element); - si.setCategory(isSystemProperty ? Category.SYSTEM_PROPERTY : Category.INDEX); - configuration.searchItems.add(si); + IndexItem item = IndexItem.of(element, tree, tagText, holder, desc, + new DocLink(htmlWriter.path, anchorName)); + configuration.mainIndex.add(item); } } return result; diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Links.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Links.java index bedfe910dc9..cc8d6828d6e 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Links.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Links.java @@ -25,10 +25,13 @@ package jdk.javadoc.internal.doclets.formats.html.markup; +import javax.lang.model.element.ExecutableElement; + import jdk.javadoc.internal.doclets.formats.html.SectionName; import jdk.javadoc.internal.doclets.toolkit.Content; import jdk.javadoc.internal.doclets.toolkit.util.DocLink; import jdk.javadoc.internal.doclets.toolkit.util.DocPath; +import jdk.javadoc.internal.doclets.toolkit.util.Utils; /** * Factory for HTML A elements, both links (with a {@code href} attribute) @@ -47,6 +50,7 @@ public class Links { private final DocPath file; + private final Utils utils; /** * Creates a {@code Links} object for a specific file, to be written in a specific HTML version. @@ -56,8 +60,9 @@ public class Links { * * @param file the file */ - public Links(DocPath file) { + public Links(DocPath file, Utils utils) { this.file = file; + this.utils = utils; } /** @@ -260,10 +265,36 @@ public Content createLink(DocLink link, Content label, boolean isExternal) { } /** - * Converts a name to a valid HTML name (id). - * This depends on the HTML version specified when the {@code Links} object was created. + * Returns the HTML id to use for an executable element. + * + * @param executableElement the element + * + * @return the id + */ + public String getAnchor(ExecutableElement executableElement) { + return getAnchor(executableElement, false); + } + + /** + * Returns the HTML id to use for an executable element. + * + * @param executableElement the element + * @param isProperty whether or not the element represents a property + * + * @return the id + */ + public String getAnchor(ExecutableElement executableElement, boolean isProperty) { + String a = isProperty + ? executableElement.getSimpleName().toString() + : executableElement.getSimpleName() + + utils.makeSignature(executableElement, null, true, true); + return getName(a); + } + + /** + * Converts a name to a valid HTML id. * - * @param name the string that needs to be converted to a valid HTML name + * @param name the string that needs to be converted to a valid HTML id * @return a valid HTML name */ public String getName(String name) { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties index a3356bdb1fa..dd54a68b1de 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties @@ -85,6 +85,7 @@ doclet.package=package doclet.MalformedURL=Malformed URL: {0} doclet.File_error=Error reading file: {0} doclet.URL_error=Error fetching URL: {0} +doclet.Resource_error=Error reading resource: {0} doclet.see.class_or_package_not_found=Tag {0}: reference not found: {1} doclet.see.class_or_package_not_accessible=Tag {0}: reference not accessible: {1} doclet.tag.invalid_usage=invalid usage of tag {0} @@ -340,8 +341,13 @@ doclet.usage.linkoffline.parameters=\ doclet.usage.linkoffline.description=\ Link to docs at <url1> using package list at <url2> +doclet.usage.link-platform-properties.parameters=\ + <url> +doclet.usage.link-platform-properties.description=\ + Link to platform documentation URLs declared in properties file at <url> + doclet.usage.excludedocfilessubdir.parameters=\ - <name>:.. + <name>:... doclet.usage.excludedocfilessubdir.description=\ Exclude any doc-files subdirectories with given name @@ -357,7 +363,7 @@ doclet.usage.nodeprecated.description=\ Do not include @deprecated information doclet.usage.noqualifier.parameters=\ - <name1>:<name2>:.. + <name1>:<name2>:... doclet.usage.noqualifier.description=\ Exclude the list of qualifiers from the output @@ -374,6 +380,9 @@ doclet.usage.no-module-directories.description=\ Do not group files for module documentation into \n\ module-specific directories +doclet.usage.no-platform-links.description=\ + Do not generate links to the platform documentation + doclet.usage.notree.description=\ Do not generate class hierarchy diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java index f11a03ae871..ab3fac18242 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java @@ -25,18 +25,36 @@ package jdk.javadoc.internal.doclets.toolkit; -import java.io.*; -import java.util.*; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; +import java.util.SortedMap; +import java.util.SortedSet; +import java.util.TreeMap; +import java.util.TreeSet; + +import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.ModuleElement; import javax.lang.model.element.PackageElement; import javax.lang.model.element.TypeElement; +import javax.lang.model.util.Elements; import javax.lang.model.util.SimpleElementVisitor14; import javax.tools.JavaFileManager; import javax.tools.JavaFileObject; +import com.sun.source.tree.CompilationUnitTree; import com.sun.source.util.DocTreePath; +import com.sun.source.util.TreePath; import com.sun.tools.javac.util.DefinedBy; import com.sun.tools.javac.util.DefinedBy.Api; import jdk.javadoc.doclet.Doclet; @@ -44,7 +62,6 @@ import jdk.javadoc.doclet.Reporter; import jdk.javadoc.doclet.StandardDoclet; import jdk.javadoc.doclet.Taglet; -import jdk.javadoc.internal.doclets.formats.html.HtmlDoclet; import jdk.javadoc.internal.doclets.toolkit.builders.BuilderFactory; import jdk.javadoc.internal.doclets.toolkit.taglets.TagletManager; import jdk.javadoc.internal.doclets.toolkit.util.Comparators; @@ -60,6 +77,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.Utils.Pair; import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberCache; import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable; +import jdk.javadoc.internal.doclint.DocLint; /** * Configure the output based on the options. Doclets should sub-class @@ -201,7 +219,7 @@ public abstract class BaseConfiguration { * @apiNote The {@code doclet} parameter is used when * {@link Taglet#init(DocletEnvironment, Doclet) initializing tags}. * Some doclets (such as the {@link StandardDoclet}), may delegate to another - * (such as the {@link HtmlDoclet}). In such cases, the primary doclet (i.e + * (such as the {@code HtmlDoclet}). In such cases, the primary doclet (i.e * {@code StandardDoclet}) should be provided here, and not any internal * class like {@code HtmlDoclet}. * @@ -358,6 +376,9 @@ protected boolean finishOptionSettings0() throws DocletException { for (Pair<String, String> linkOfflinePair : options.linkOfflineList()) { extern.link(linkOfflinePair.first, linkOfflinePair.second, reporter); } + if (!options.noPlatformLinks()) { + extern.checkPlatformLinks(options.linkPlatformProperties(), reporter); + } typeElementCatalog = new TypeElementCatalog(includedTypeElements, this); initTagletManager(options.customTagStrs()); options.groupPairs().forEach(grp -> { @@ -367,7 +388,16 @@ protected boolean finishOptionSettings0() throws DocletException { group.checkPackageGroups(grp.first, grp.second); } }); - overviewElement = new OverviewElement(workArounds.getUnnamedPackage(), getOverviewPath()); + + PackageElement unnamedPackage; + Elements elementUtils = utils.elementUtils; + if (docEnv.getSourceVersion().compareTo(SourceVersion.RELEASE_9) >= 0) { + ModuleElement unnamedModule = elementUtils.getModuleElement(""); + unnamedPackage = elementUtils.getPackageElement(unnamedModule, ""); + } else { + unnamedPackage = elementUtils.getPackageElement(""); + } + overviewElement = new OverviewElement(unnamedPackage, getOverviewPath()); return true; } @@ -380,10 +410,8 @@ protected boolean finishOptionSettings0() throws DocletException { public boolean setOptions() throws DocletException { initPackages(); initModules(); - if (!finishOptionSettings0() || !finishOptionSettings()) - return false; - - return true; + return finishOptionSettings0() + && finishOptionSettings(); } private void initDestDirectory() throws DocletException { @@ -690,4 +718,91 @@ public boolean isJavaFXMode() { || javafxModule.isUnnamed() || javafxModule.getQualifiedName().contentEquals("javafx.base"); } + + + //<editor-fold desc="DocLint support"> + + private DocLint doclint; + + Map<CompilationUnitTree, Boolean> shouldCheck = new HashMap<>(); + + public void runDocLint(TreePath path) { + CompilationUnitTree unit = path.getCompilationUnit(); + if (doclint != null && shouldCheck.computeIfAbsent(unit, doclint::shouldCheck)) { + doclint.scan(path); + } + } + + /** + * Initializes DocLint, if appropriate, depending on options derived + * from the doclet command-line options, and the set of custom tags + * that should be ignored by DocLint. + * + * DocLint is not enabled if the option {@code -Xmsgs:none} is given, + * and it is not followed by any options to enable any groups. + * Note that arguments for {@code -Xmsgs:} can be given individually + * in separate {@code -Xmsgs:} options, or in a comma-separated list + * for a single option. For example, the following are equivalent: + * <ul> + * <li>{@code -Xmsgs:all} {@code -Xmsgs:-html} + * <li>{@code -Xmsgs:all,-html} + * </ul> + * + * @param opts options for DocLint, derived from the corresponding doclet + * command-line options + * @param customTagNames the names of custom tags, to be ignored by doclint + */ + public void initDocLint(List<String> opts, Set<String> customTagNames) { + List<String> doclintOpts = new ArrayList<>(); + + // basic analysis of -Xmsgs and -Xmsgs: options to see if doclint is enabled + Set<String> groups = new HashSet<>(); + boolean seenXmsgs = false; + for (String opt : opts) { + if (opt.equals(DocLint.XMSGS_OPTION)) { + groups.add("all"); + seenXmsgs = true; + } else if (opt.startsWith(DocLint.XMSGS_CUSTOM_PREFIX)) { + String[] args = opt.substring(DocLint.XMSGS_CUSTOM_PREFIX.length()) + .split(DocLint.SEPARATOR); + for (String a : args) { + if (a.equals("none")) { + groups.clear(); + } else if (a.startsWith("-")) { + groups.remove(a.substring(1)); + } else { + groups.add(a); + } + } + seenXmsgs = true; + } + doclintOpts.add(opt); + } + + if (seenXmsgs) { + if (groups.isEmpty()) { + // no groups enabled; do not init doclint + return; + } + } else { + // no -Xmsgs options of any kind, use default + doclintOpts.add(DocLint.XMSGS_OPTION); + } + + if (!customTagNames.isEmpty()) { + String customTags = String.join(DocLint.SEPARATOR, customTagNames); + doclintOpts.add(DocLint.XCUSTOM_TAGS_PREFIX + customTags); + } + + doclintOpts.add(DocLint.XHTML_VERSION_PREFIX + "html5"); + + doclint = new DocLint(); + doclint.init(docEnv.getDocTrees(), docEnv.getElementUtils(), docEnv.getTypeUtils(), + doclintOpts.toArray(new String[0])); + } + + public boolean haveDocLint() { + return (doclint != null); + } + //</editor-fold> } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java index 087398ed918..cf62bf17565 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java @@ -164,6 +164,11 @@ public abstract class BaseOptions { // A list of pairs containing urls and package list private final List<Utils.Pair<String, String>> linkOfflineList = new ArrayList<>(); + /** + * Location of alternative platform link properties file. + */ + private String linkPlatformProperties; + /** * Argument for command-line option {@code -linksource}. * True if we should generate browsable sources. @@ -185,6 +190,13 @@ public abstract class BaseOptions { */ private boolean noDeprecated = false; + /** + * Argument for command-line option {@code --no-platform-links}. + * True if command-line option "--no-platform-links" is used. Default value is + * false. + */ + private boolean noPlatformLinks = false; + /** * Argument for command-line option {@code -nosince}. * True if command-line option "-nosince" is used. Default value is @@ -371,6 +383,15 @@ public boolean process(String opt, List<String> args) { return true; } }, + + new Option(resources, "--link-platform-properties", 1) { + @Override + public boolean process(String opt, List<String> args) { + linkPlatformProperties = args.get(0); + return true; + } + }, + new Option(resources, "-nocomment") { @Override public boolean process(String opt, List<String> args) { @@ -411,6 +432,14 @@ public boolean process(String opt, List<String> args) { } }, + new Option(resources, "--no-platform-links") { + @Override + public boolean process(String opt, List<String> args) { + noPlatformLinks = true; + return true; + } + }, + new Option(resources, "--override-methods", 1) { @Override public boolean process(String opt, List<String> args) { @@ -755,6 +784,13 @@ List<Utils.Pair<String, String>> linkOfflineList() { return linkOfflineList; } + /** + * Argument for command-line option {@code --link-platform-properties}. + */ + String linkPlatformProperties() { + return linkPlatformProperties; + } + /** * Argument for command-line option {@code -linksource}. * True if we should generate browsable sources. @@ -782,6 +818,15 @@ public boolean noDeprecated() { return noDeprecated; } + /** + * Argument for command-line option {@code --no-platform-links}. + * True if command-line option {@code --no-platform-links"} is used. + * Default value is false. + */ + public boolean noPlatformLinks() { + return noPlatformLinks; + } + /** * Argument for command-line option {@code -nosince}. * True if command-line option {@code -nosince"} is used. diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/CommentUtils.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/CommentUtils.java index 92f732b8a54..38f84e751d2 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/CommentUtils.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/CommentUtils.java @@ -427,8 +427,8 @@ public DocCommentInfo getHtmlCommentInfo(Element e) { } break; case PACKAGE: - fo = configuration.workArounds.getJavaFileObject((PackageElement)e); - pe = (PackageElement)e; + pe = (PackageElement) e; + fo = configuration.workArounds.getJavaFileObject(pe); break; default: return null; diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/MemberSummaryWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/MemberSummaryWriter.java index dd1b51b2f6f..81e68fa1d61 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/MemberSummaryWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/MemberSummaryWriter.java @@ -44,42 +44,45 @@ public interface MemberSummaryWriter { /** - * Get the member summary header for the given class. + * Returns the member summary header for the given class. * - * @param typeElement the class the summary belongs to + * @param typeElement the class the summary belongs to * @param memberSummaryTree the content tree to which the member summary will be added + * * @return a content tree for the member summary header */ Content getMemberSummaryHeader(TypeElement typeElement, Content memberSummaryTree); /** - * Get the summary table for the given class. + * Returns the summary table for the given class. * * @param typeElement the class the summary table belongs to + * * @return a content tree for the member summary table */ Content getSummaryTableTree(TypeElement typeElement); /** - * Add the member summary for the given class and member. + * Adds the member summary for the given class and member. * - * @param typeElement the class the summary belongs to - * @param member the member that is documented - * @param firstSentenceTags the tags for the sentence being documented + * @param typeElement the class the summary belongs to + * @param member the member that is documented + * @param firstSentenceTrees the tags for the sentence being documented */ void addMemberSummary(TypeElement typeElement, Element member, - List<? extends DocTree> firstSentenceTags); + List<? extends DocTree> firstSentenceTrees); /** - * Get the inherited member summary header for the given class. + * Returns the inherited member summary header for the given class. * * @param typeElement the class the summary belongs to + * * @return a content tree containing the inherited summary header */ Content getInheritedSummaryHeader(TypeElement typeElement); /** - * Add the inherited member summary for the given class and member. + * Adds the inherited member summary for the given class and member. * * @param typeElement the class the inherited member belongs to * @param member the inherited member that is being documented @@ -92,7 +95,7 @@ void addInheritedMemberSummary(TypeElement typeElement, Content linksTree); /** - * Get inherited summary links. + * Returns the inherited summary links. * * @return a content tree containing the inherited summary links */ @@ -107,9 +110,10 @@ void addInheritedMemberSummary(TypeElement typeElement, void addSummary(Content summariesList, Content content); /** - * Get the member tree. + * Returns the member tree. * * @param memberTree the content tree representing the member + * * @return a content tree for the member */ Content getMemberTree(Content memberTree); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Messages.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Messages.java index 838d7b56a25..1b19794e3bb 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Messages.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Messages.java @@ -116,8 +116,9 @@ public void warning(String key, Object... args) { * @param args optional arguments to be replaced in the message. */ public void warning(DocTreePath path, String key, Object... args) { - if (configuration.showMessage(path, key)) + if (configuration.showMessage(path, key)) { report(WARNING, path, resources.getText(key, args)); + } } /** diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java index 02255122427..8957d1956c4 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java @@ -44,13 +44,13 @@ import javax.lang.model.element.VariableElement; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.Elements; +import javax.lang.model.util.Types; import javax.tools.FileObject; import javax.tools.JavaFileManager.Location; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.util.JavacTask; import com.sun.source.util.TreePath; -import com.sun.tools.doclint.DocLint; import com.sun.tools.javac.api.BasicJavacTask; import com.sun.tools.javac.code.Attribute; import com.sun.tools.javac.code.Flags; @@ -70,6 +70,7 @@ import com.sun.tools.javac.util.Names; import jdk.javadoc.internal.doclets.toolkit.util.Utils; +import jdk.javadoc.internal.doclint.DocLint; import jdk.javadoc.internal.tool.ToolEnvironment; import jdk.javadoc.internal.tool.DocEnvImpl; @@ -94,110 +95,36 @@ public class WorkArounds { public final BaseConfiguration configuration; public final ToolEnvironment toolEnv; public final Utils utils; - - private DocLint doclint; + public final Elements elementUtils; + public final Types typeUtils; + public final com.sun.tools.javac.code.Types javacTypes; public WorkArounds(BaseConfiguration configuration) { this.configuration = configuration; this.utils = this.configuration.utils; - this.toolEnv = ((DocEnvImpl)this.configuration.docEnv).toolEnv; - } - - Map<CompilationUnitTree, Boolean> shouldCheck = new HashMap<>(); - // TODO: fix this up correctly - public void runDocLint(TreePath path) { - CompilationUnitTree unit = path.getCompilationUnit(); - if (doclint != null && shouldCheck.computeIfAbsent(unit, doclint::shouldCheck)) { - doclint.scan(path); - } - } - - /** - * Initializes doclint, if appropriate, depending on options derived - * from the doclet command-line options, and the set of custom tags - * that should be ignored by doclint. - * - * DocLint is not enabled if the option {@code -Xmsgs:none} is given, - * and it is not followed by any options to enable any groups. - * Note that arguments for {@code -Xmsgs:} can be given individually - * in separate {@code -Xmsgs:} options, or in a comma-separated list - * for a single option. For example, the following are equivalent: - * <ul> - * <li>{@code -Xmsgs:all} {@code -Xmsgs:-html} - * <li>{@code -Xmsgs:all,-html} - * </ul> - * - * @param opts options for doclint, derived from the corresponding doclet - * command-line options - * @param customTagNames the names of custom tags, to be ignored by doclint - */ - public void initDocLint(List<String> opts, Set<String> customTagNames) { - List<String> doclintOpts = new ArrayList<>(); - - // basic analysis of -Xmsgs and -Xmsgs: options to see if doclint is enabled - Set<String> groups = new HashSet<>(); - boolean seenXmsgs = false; - for (String opt : opts) { - if (opt.equals(DocLint.XMSGS_OPTION)) { - groups.add("all"); - seenXmsgs = true; - } else if (opt.startsWith(DocLint.XMSGS_CUSTOM_PREFIX)) { - String[] args = opt.substring(DocLint.XMSGS_CUSTOM_PREFIX.length()) - .split(DocLint.SEPARATOR); - for (String a : args) { - if (a.equals("none")) { - groups.clear(); - } else if (a.startsWith("-")) { - groups.remove(a.substring(1)); - } else { - groups.add(a); - } - } - seenXmsgs = true; - } - doclintOpts.add(opt); - } - - if (seenXmsgs) { - if (groups.isEmpty()) { - // no groups enabled; do not init doclint - return; - } - } else { - // no -Xmsgs options of any kind, use default - doclintOpts.add(DocLint.XMSGS_OPTION); - } - - if (!customTagNames.isEmpty()) { - String customTags = String.join(DocLint.SEPARATOR, customTagNames); - doclintOpts.add(DocLint.XCUSTOM_TAGS_PREFIX + customTags); - } - - doclintOpts.add(DocLint.XHTML_VERSION_PREFIX + "html5"); - JavacTask t = BasicJavacTask.instance(toolEnv.context); - doclint = new DocLint(); - doclint.init(t, doclintOpts.toArray(new String[0]), false); - } + elementUtils = configuration.docEnv.getElementUtils(); + typeUtils = configuration.docEnv.getTypeUtils(); - // TODO: fix this up correctly - public boolean haveDocLint() { - return (doclint == null); + // Note: this one use of DocEnvImpl is what prevents us tunnelling extra + // info from a doclet to its taglets via a doclet-specific subtype of + // DocletEnvironment. + toolEnv = ((DocEnvImpl)this.configuration.docEnv).toolEnv; + javacTypes = toolEnv.getTypes(); } /* * TODO: This method exists because of a bug in javac which does not - * handle "@deprecated tag in package-info.java", when this issue - * is fixed this method and its uses must be jettisoned. + * handle "@deprecated tag in package-info.java", when this issue + * is fixed this method and its uses must be jettisoned. */ public boolean isDeprecated0(Element e) { if (!utils.getDeprecatedTrees(e).isEmpty()) { return true; } - JavacTypes jctypes = ((DocEnvImpl)configuration.docEnv).toolEnv.typeutils; TypeMirror deprecatedType = utils.getDeprecatedType(); for (AnnotationMirror anno : e.getAnnotationMirrors()) { - if (jctypes.isSameType(anno.getAnnotationType().asElement().asType(), deprecatedType)) + if (typeUtils.isSameType(anno.getAnnotationType().asElement().asType(), deprecatedType)) return true; } return false; @@ -208,24 +135,11 @@ public boolean isSynthesized(AnnotationMirror aDesc) { return ((Attribute)aDesc).isSynthesized(); } - // TODO: fix the caller - public Object getConstValue(VariableElement ve) { - return ((VarSymbol)ve).getConstValue(); - } - // TODO: DocTrees: Trees.getPath(Element e) is slow a factor 4-5 times. public Map<Element, TreePath> getElementToTreePath() { return toolEnv.elementToTreePath; } - // TODO: we need ElementUtils.getPackage to cope with input strings - // to return the proper unnamedPackage for all supported releases. - PackageElement getUnnamedPackage() { - return (Feature.MODULES.allowedInSource(toolEnv.source)) - ? toolEnv.syms.unnamedModule.unnamedPackage - : toolEnv.syms.noModule.unnamedPackage; - } - // TODO: implement in either jx.l.m API (preferred) or DocletEnvironment. FileObject getJavaFileObject(PackageElement packageElement) { return ((PackageSymbol)packageElement).sourcefile; @@ -238,7 +152,7 @@ public TypeElement searchClass(TypeElement klass, String className) { // search by qualified name in current module first ModuleElement me = utils.containingModule(klass); if (me != null) { - te = configuration.docEnv.getElementUtils().getTypeElement(me, className); + te = elementUtils.getTypeElement(me, className); if (te != null) { return te; } @@ -290,17 +204,12 @@ public TypeElement searchClass(TypeElement klass, String className) { } // finally, search by qualified name in all modules - te = configuration.docEnv.getElementUtils().getTypeElement(className); - if (te != null) { - return te; - } - - return null; // not found + return elementUtils.getTypeElement(className); } // TODO: need to re-implement this using j.l.m. correctly!, this has - // implications on testInterface, the note here is that javac's supertype - // does the right thing returning Parameters in scope. + // implications on testInterface, the note here is that javac's supertype + // does the right thing returning Parameters in scope. /** * Return the type containing the method that this method overrides. * It may be a <code>TypeElement</code> or a <code>TypeParameterElement</code>. @@ -311,14 +220,14 @@ public TypeMirror overriddenType(ExecutableElement method) { if (utils.isStatic(method)) { return null; } - MethodSymbol sym = (MethodSymbol)method; + MethodSymbol sym = (MethodSymbol) method; ClassSymbol origin = (ClassSymbol) sym.owner; - for (com.sun.tools.javac.code.Type t = toolEnv.getTypes().supertype(origin.type); + for (com.sun.tools.javac.code.Type t = javacTypes.supertype(origin.type); t.hasTag(TypeTag.CLASS); - t = toolEnv.getTypes().supertype(t)) { + t = javacTypes.supertype(t)) { ClassSymbol c = (ClassSymbol) t.tsym; for (com.sun.tools.javac.code.Symbol sym2 : c.members().getSymbolsByName(sym.name)) { - if (sym.overrides(sym2, origin, toolEnv.getTypes(), true)) { + if (sym.overrides(sym2, origin, javacTypes, true)) { // Ignore those methods that may be a simple override // and allow the real API method to be found. if (sym2.type.hasTag(TypeTag.METHOD) && @@ -353,10 +262,10 @@ public boolean overrides(ExecutableElement e1, ExecutableElement e2, TypeElement !rider.isStatic() && // Symbol.overrides assumes the following - ridee.isMemberOf(origin, toolEnv.getTypes()) && + ridee.isMemberOf(origin, javacTypes) && // check access, signatures and check return types - rider.overrides(ridee, origin, toolEnv.getTypes(), true); + rider.overrides(ridee, origin, javacTypes, true); } // TODO: jx.l.m ? diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java index 6326964e214..595810f74fd 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java @@ -238,7 +238,7 @@ protected void buildSerialUIDInfo(Content classTree) { if (field.getSimpleName().toString().compareTo(SERIAL_VERSION_UID) == 0 && field.getConstantValue() != null) { writer.addSerialUIDInfo(SERIAL_VERSION_UID_HEADER, - utils.constantValueExpresion(field), serialUidTree); + utils.constantValueExpression(field), serialUidTree); break; } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties index 62246eba3ed..589ee9b5756 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties @@ -326,3 +326,7 @@ doclet.record_accessor_doc.return=\ doclet.record_field_doc.fullbody=\ The field for the {0} record component. + +doclet.platform.docs.old=https://docs.oracle.com/javase/{0}/docs/api/ +doclet.platform.docs.new=https://docs.oracle.com/en/java/javase/{0}/docs/api/ +doclet.platform.docs.ea=https://download.java.net/java/early_access/jdk{0}/docs/api/ diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/releases/element-list-10.txt b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/releases/element-list-10.txt new file mode 100644 index 00000000000..16518f6620e --- /dev/null +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/releases/element-list-10.txt @@ -0,0 +1,314 @@ +javax.activation +java.io +java.lang +java.lang.annotation +java.lang.invoke +java.lang.module +java.lang.ref +java.lang.reflect +java.math +java.net +java.net.spi +java.nio +java.nio.channels +java.nio.channels.spi +java.nio.charset +java.nio.charset.spi +java.nio.file +java.nio.file.attribute +java.nio.file.spi +java.security +java.security.acl +java.security.cert +java.security.interfaces +java.security.spec +java.text +java.text.spi +java.time +java.time.chrono +java.time.format +java.time.temporal +java.time.zone +java.util +java.util.concurrent +java.util.concurrent.atomic +java.util.concurrent.locks +java.util.function +java.util.jar +java.util.regex +java.util.spi +java.util.stream +java.util.zip +javax.crypto +javax.crypto.interfaces +javax.crypto.spec +javax.net +javax.net.ssl +javax.security.auth +javax.security.auth.callback +javax.security.auth.login +javax.security.auth.spi +javax.security.auth.x500 +javax.security.cert +javax.annotation.processing +javax.lang.model +javax.lang.model.element +javax.lang.model.type +javax.lang.model.util +javax.tools +javax.activity +javax.rmi +javax.rmi.CORBA +org.omg.CORBA +org.omg.CORBA_2_3 +org.omg.CORBA_2_3.portable +org.omg.CORBA.DynAnyPackage +org.omg.CORBA.ORBPackage +org.omg.CORBA.portable +org.omg.CORBA.TypeCodePackage +org.omg.CosNaming +org.omg.CosNaming.NamingContextExtPackage +org.omg.CosNaming.NamingContextPackage +org.omg.Dynamic +org.omg.DynamicAny +org.omg.DynamicAny.DynAnyFactoryPackage +org.omg.DynamicAny.DynAnyPackage +org.omg.IOP +org.omg.IOP.CodecFactoryPackage +org.omg.IOP.CodecPackage +org.omg.Messaging +org.omg.PortableInterceptor +org.omg.PortableInterceptor.ORBInitInfoPackage +org.omg.PortableServer +org.omg.PortableServer.CurrentPackage +org.omg.PortableServer.POAManagerPackage +org.omg.PortableServer.POAPackage +org.omg.PortableServer.portable +org.omg.PortableServer.ServantLocatorPackage +org.omg.SendingContext +org.omg.stub.java.rmi +java.awt.datatransfer +java.applet +java.awt +java.awt.color +java.awt.desktop +java.awt.dnd +java.awt.event +java.awt.font +java.awt.geom +java.awt.im +java.awt.im.spi +java.awt.image +java.awt.image.renderable +java.awt.print +java.beans +java.beans.beancontext +javax.accessibility +javax.imageio +javax.imageio.event +javax.imageio.metadata +javax.imageio.plugins.bmp +javax.imageio.plugins.jpeg +javax.imageio.plugins.tiff +javax.imageio.spi +javax.imageio.stream +javax.print +javax.print.attribute +javax.print.attribute.standard +javax.print.event +javax.sound.midi +javax.sound.midi.spi +javax.sound.sampled +javax.sound.sampled.spi +javax.swing +javax.swing.border +javax.swing.colorchooser +javax.swing.event +javax.swing.filechooser +javax.swing.plaf +javax.swing.plaf.basic +javax.swing.plaf.metal +javax.swing.plaf.multi +javax.swing.plaf.nimbus +javax.swing.plaf.synth +javax.swing.table +javax.swing.text +javax.swing.text.html +javax.swing.text.html.parser +javax.swing.text.rtf +javax.swing.tree +javax.swing.undo +java.lang.instrument +javax.jnlp +java.util.logging +java.lang.management +javax.management +javax.management.loading +javax.management.modelmbean +javax.management.monitor +javax.management.openmbean +javax.management.relation +javax.management.remote +javax.management.timer +javax.management.remote.rmi +javax.naming +javax.naming.directory +javax.naming.event +javax.naming.ldap +javax.naming.spi +java.util.prefs +java.rmi +java.rmi.activation +java.rmi.dgc +java.rmi.registry +java.rmi.server +javax.rmi.ssl +javax.script +javax.security.auth.kerberos +org.ietf.jgss +javax.security.sasl +javax.smartcardio +java.sql +javax.sql +javax.transaction.xa +javax.sql.rowset +javax.sql.rowset.serial +javax.sql.rowset.spi +javax.transaction +javax.xml +javax.xml.catalog +javax.xml.datatype +javax.xml.namespace +javax.xml.parsers +javax.xml.stream +javax.xml.stream.events +javax.xml.stream.util +javax.xml.transform +javax.xml.transform.dom +javax.xml.transform.sax +javax.xml.transform.stax +javax.xml.transform.stream +javax.xml.validation +javax.xml.xpath +org.w3c.dom +org.w3c.dom.bootstrap +org.w3c.dom.events +org.w3c.dom.ls +org.w3c.dom.ranges +org.w3c.dom.traversal +org.w3c.dom.views +org.xml.sax +org.xml.sax.ext +org.xml.sax.helpers +javax.xml.bind +javax.xml.bind.annotation +javax.xml.bind.annotation.adapters +javax.xml.bind.attachment +javax.xml.bind.helpers +javax.xml.bind.util +javax.xml.crypto +javax.xml.crypto.dom +javax.xml.crypto.dsig +javax.xml.crypto.dsig.dom +javax.xml.crypto.dsig.keyinfo +javax.xml.crypto.dsig.spec +javax.jws +javax.jws.soap +javax.xml.soap +javax.xml.ws +javax.xml.ws.handler +javax.xml.ws.handler.soap +javax.xml.ws.http +javax.xml.ws.soap +javax.xml.ws.spi +javax.xml.ws.spi.http +javax.xml.ws.wsaddressing +javax.annotation +javafx.beans +javafx.beans.binding +javafx.beans.property +javafx.beans.property.adapter +javafx.beans.value +javafx.collections +javafx.collections.transformation +javafx.event +javafx.util +javafx.util.converter +javafx.scene.chart +javafx.scene.control +javafx.scene.control.cell +javafx.scene.control.skin +javafx.fxml +javafx.animation +javafx.application +javafx.concurrent +javafx.css +javafx.css.converter +javafx.geometry +javafx.print +javafx.scene +javafx.scene.canvas +javafx.scene.effect +javafx.scene.image +javafx.scene.input +javafx.scene.layout +javafx.scene.paint +javafx.scene.shape +javafx.scene.text +javafx.scene.transform +javafx.stage +javafx.scene.media +javafx.embed.swing +javafx.scene.web +com.sun.java.accessibility.util +com.sun.tools.attach +com.sun.tools.attach.spi +com.sun.source.doctree +com.sun.source.tree +com.sun.source.util +com.sun.tools.javac +jdk.dynalink +jdk.dynalink.beans +jdk.dynalink.linker +jdk.dynalink.linker.support +jdk.dynalink.support +com.sun.net.httpserver +com.sun.net.httpserver.spi +jdk.incubator.http +com.sun.jarsigner +jdk.security.jarsigner +com.sun.javadoc +com.sun.tools.javadoc +jdk.javadoc.doclet +com.sun.tools.jconsole +com.sun.jdi +com.sun.jdi.connect +com.sun.jdi.connect.spi +com.sun.jdi.event +com.sun.jdi.request +jdk.jfr +jdk.jfr.consumer +jdk.jshell +jdk.jshell.execution +jdk.jshell.spi +jdk.jshell.tool +netscape.javascript +com.sun.management +jdk.management.cmm +jdk.management.jfr +jdk.management.resource +jdk.net +jdk.packager.services +jdk.packager.services.singleton +jdk.nashorn.api.scripting +jdk.nashorn.api.tree +com.sun.nio.sctp +com.sun.security.auth +com.sun.security.auth.callback +com.sun.security.auth.login +com.sun.security.auth.module +com.sun.security.jgss +org.w3c.dom.css +org.w3c.dom.html +org.w3c.dom.stylesheets +org.w3c.dom.xpath diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/releases/package-list-7.txt b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/releases/package-list-7.txt new file mode 100644 index 00000000000..b52fe94b6a1 --- /dev/null +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/releases/package-list-7.txt @@ -0,0 +1,209 @@ +java.applet +java.awt +java.awt.color +java.awt.datatransfer +java.awt.dnd +java.awt.event +java.awt.font +java.awt.geom +java.awt.im +java.awt.im.spi +java.awt.image +java.awt.image.renderable +java.awt.print +java.beans +java.beans.beancontext +java.io +java.lang +java.lang.annotation +java.lang.instrument +java.lang.invoke +java.lang.management +java.lang.ref +java.lang.reflect +java.math +java.net +java.nio +java.nio.channels +java.nio.channels.spi +java.nio.charset +java.nio.charset.spi +java.nio.file +java.nio.file.attribute +java.nio.file.spi +java.rmi +java.rmi.activation +java.rmi.dgc +java.rmi.registry +java.rmi.server +java.security +java.security.acl +java.security.cert +java.security.interfaces +java.security.spec +java.sql +java.text +java.text.spi +java.util +java.util.concurrent +java.util.concurrent.atomic +java.util.concurrent.locks +java.util.jar +java.util.logging +java.util.prefs +java.util.regex +java.util.spi +java.util.zip +javax.accessibility +javax.activation +javax.activity +javax.annotation +javax.annotation.processing +javax.crypto +javax.crypto.interfaces +javax.crypto.spec +javax.imageio +javax.imageio.event +javax.imageio.metadata +javax.imageio.plugins.bmp +javax.imageio.plugins.jpeg +javax.imageio.spi +javax.imageio.stream +javax.jws +javax.jws.soap +javax.lang.model +javax.lang.model.element +javax.lang.model.type +javax.lang.model.util +javax.management +javax.management.loading +javax.management.modelmbean +javax.management.monitor +javax.management.openmbean +javax.management.relation +javax.management.remote +javax.management.remote.rmi +javax.management.timer +javax.naming +javax.naming.directory +javax.naming.event +javax.naming.ldap +javax.naming.spi +javax.net +javax.net.ssl +javax.print +javax.print.attribute +javax.print.attribute.standard +javax.print.event +javax.rmi +javax.rmi.CORBA +javax.rmi.ssl +javax.script +javax.security.auth +javax.security.auth.callback +javax.security.auth.kerberos +javax.security.auth.login +javax.security.auth.spi +javax.security.auth.x500 +javax.security.cert +javax.security.sasl +javax.sound.midi +javax.sound.midi.spi +javax.sound.sampled +javax.sound.sampled.spi +javax.sql +javax.sql.rowset +javax.sql.rowset.serial +javax.sql.rowset.spi +javax.swing +javax.swing.border +javax.swing.colorchooser +javax.swing.event +javax.swing.filechooser +javax.swing.plaf +javax.swing.plaf.basic +javax.swing.plaf.metal +javax.swing.plaf.multi +javax.swing.plaf.nimbus +javax.swing.plaf.synth +javax.swing.table +javax.swing.text +javax.swing.text.html +javax.swing.text.html.parser +javax.swing.text.rtf +javax.swing.tree +javax.swing.undo +javax.tools +javax.transaction +javax.transaction.xa +javax.xml +javax.xml.bind +javax.xml.bind.annotation +javax.xml.bind.annotation.adapters +javax.xml.bind.attachment +javax.xml.bind.helpers +javax.xml.bind.util +javax.xml.crypto +javax.xml.crypto.dom +javax.xml.crypto.dsig +javax.xml.crypto.dsig.dom +javax.xml.crypto.dsig.keyinfo +javax.xml.crypto.dsig.spec +javax.xml.datatype +javax.xml.namespace +javax.xml.parsers +javax.xml.soap +javax.xml.stream +javax.xml.stream.events +javax.xml.stream.util +javax.xml.transform +javax.xml.transform.dom +javax.xml.transform.sax +javax.xml.transform.stax +javax.xml.transform.stream +javax.xml.validation +javax.xml.ws +javax.xml.ws.handler +javax.xml.ws.handler.soap +javax.xml.ws.http +javax.xml.ws.soap +javax.xml.ws.spi +javax.xml.ws.spi.http +javax.xml.ws.wsaddressing +javax.xml.xpath +org.ietf.jgss +org.omg.CORBA +org.omg.CORBA.DynAnyPackage +org.omg.CORBA.ORBPackage +org.omg.CORBA.TypeCodePackage +org.omg.CORBA.portable +org.omg.CORBA_2_3 +org.omg.CORBA_2_3.portable +org.omg.CosNaming +org.omg.CosNaming.NamingContextExtPackage +org.omg.CosNaming.NamingContextPackage +org.omg.Dynamic +org.omg.DynamicAny +org.omg.DynamicAny.DynAnyFactoryPackage +org.omg.DynamicAny.DynAnyPackage +org.omg.IOP +org.omg.IOP.CodecFactoryPackage +org.omg.IOP.CodecPackage +org.omg.Messaging +org.omg.PortableInterceptor +org.omg.PortableInterceptor.ORBInitInfoPackage +org.omg.PortableServer +org.omg.PortableServer.CurrentPackage +org.omg.PortableServer.POAManagerPackage +org.omg.PortableServer.POAPackage +org.omg.PortableServer.ServantLocatorPackage +org.omg.PortableServer.portable +org.omg.SendingContext +org.omg.stub.java.rmi +org.w3c.dom +org.w3c.dom.bootstrap +org.w3c.dom.events +org.w3c.dom.ls +org.xml.sax +org.xml.sax.ext +org.xml.sax.helpers diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/releases/package-list-8.txt b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/releases/package-list-8.txt new file mode 100644 index 00000000000..351c1868559 --- /dev/null +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/releases/package-list-8.txt @@ -0,0 +1,217 @@ +java.applet +java.awt +java.awt.color +java.awt.datatransfer +java.awt.dnd +java.awt.event +java.awt.font +java.awt.geom +java.awt.im +java.awt.im.spi +java.awt.image +java.awt.image.renderable +java.awt.print +java.beans +java.beans.beancontext +java.io +java.lang +java.lang.annotation +java.lang.instrument +java.lang.invoke +java.lang.management +java.lang.ref +java.lang.reflect +java.math +java.net +java.nio +java.nio.channels +java.nio.channels.spi +java.nio.charset +java.nio.charset.spi +java.nio.file +java.nio.file.attribute +java.nio.file.spi +java.rmi +java.rmi.activation +java.rmi.dgc +java.rmi.registry +java.rmi.server +java.security +java.security.acl +java.security.cert +java.security.interfaces +java.security.spec +java.sql +java.text +java.text.spi +java.time +java.time.chrono +java.time.format +java.time.temporal +java.time.zone +java.util +java.util.concurrent +java.util.concurrent.atomic +java.util.concurrent.locks +java.util.function +java.util.jar +java.util.logging +java.util.prefs +java.util.regex +java.util.spi +java.util.stream +java.util.zip +javax.accessibility +javax.activation +javax.activity +javax.annotation +javax.annotation.processing +javax.crypto +javax.crypto.interfaces +javax.crypto.spec +javax.imageio +javax.imageio.event +javax.imageio.metadata +javax.imageio.plugins.bmp +javax.imageio.plugins.jpeg +javax.imageio.spi +javax.imageio.stream +javax.jws +javax.jws.soap +javax.lang.model +javax.lang.model.element +javax.lang.model.type +javax.lang.model.util +javax.management +javax.management.loading +javax.management.modelmbean +javax.management.monitor +javax.management.openmbean +javax.management.relation +javax.management.remote +javax.management.remote.rmi +javax.management.timer +javax.naming +javax.naming.directory +javax.naming.event +javax.naming.ldap +javax.naming.spi +javax.net +javax.net.ssl +javax.print +javax.print.attribute +javax.print.attribute.standard +javax.print.event +javax.rmi +javax.rmi.CORBA +javax.rmi.ssl +javax.script +javax.security.auth +javax.security.auth.callback +javax.security.auth.kerberos +javax.security.auth.login +javax.security.auth.spi +javax.security.auth.x500 +javax.security.cert +javax.security.sasl +javax.sound.midi +javax.sound.midi.spi +javax.sound.sampled +javax.sound.sampled.spi +javax.sql +javax.sql.rowset +javax.sql.rowset.serial +javax.sql.rowset.spi +javax.swing +javax.swing.border +javax.swing.colorchooser +javax.swing.event +javax.swing.filechooser +javax.swing.plaf +javax.swing.plaf.basic +javax.swing.plaf.metal +javax.swing.plaf.multi +javax.swing.plaf.nimbus +javax.swing.plaf.synth +javax.swing.table +javax.swing.text +javax.swing.text.html +javax.swing.text.html.parser +javax.swing.text.rtf +javax.swing.tree +javax.swing.undo +javax.tools +javax.transaction +javax.transaction.xa +javax.xml +javax.xml.bind +javax.xml.bind.annotation +javax.xml.bind.annotation.adapters +javax.xml.bind.attachment +javax.xml.bind.helpers +javax.xml.bind.util +javax.xml.crypto +javax.xml.crypto.dom +javax.xml.crypto.dsig +javax.xml.crypto.dsig.dom +javax.xml.crypto.dsig.keyinfo +javax.xml.crypto.dsig.spec +javax.xml.datatype +javax.xml.namespace +javax.xml.parsers +javax.xml.soap +javax.xml.stream +javax.xml.stream.events +javax.xml.stream.util +javax.xml.transform +javax.xml.transform.dom +javax.xml.transform.sax +javax.xml.transform.stax +javax.xml.transform.stream +javax.xml.validation +javax.xml.ws +javax.xml.ws.handler +javax.xml.ws.handler.soap +javax.xml.ws.http +javax.xml.ws.soap +javax.xml.ws.spi +javax.xml.ws.spi.http +javax.xml.ws.wsaddressing +javax.xml.xpath +org.ietf.jgss +org.omg.CORBA +org.omg.CORBA.DynAnyPackage +org.omg.CORBA.ORBPackage +org.omg.CORBA.TypeCodePackage +org.omg.CORBA.portable +org.omg.CORBA_2_3 +org.omg.CORBA_2_3.portable +org.omg.CosNaming +org.omg.CosNaming.NamingContextExtPackage +org.omg.CosNaming.NamingContextPackage +org.omg.Dynamic +org.omg.DynamicAny +org.omg.DynamicAny.DynAnyFactoryPackage +org.omg.DynamicAny.DynAnyPackage +org.omg.IOP +org.omg.IOP.CodecFactoryPackage +org.omg.IOP.CodecPackage +org.omg.Messaging +org.omg.PortableInterceptor +org.omg.PortableInterceptor.ORBInitInfoPackage +org.omg.PortableServer +org.omg.PortableServer.CurrentPackage +org.omg.PortableServer.POAManagerPackage +org.omg.PortableServer.POAPackage +org.omg.PortableServer.ServantLocatorPackage +org.omg.PortableServer.portable +org.omg.SendingContext +org.omg.stub.java.rmi +org.w3c.dom +org.w3c.dom.bootstrap +org.w3c.dom.events +org.w3c.dom.ls +org.w3c.dom.views +org.xml.sax +org.xml.sax.ext +org.xml.sax.helpers diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/releases/package-list-9.txt b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/releases/package-list-9.txt new file mode 100644 index 00000000000..24c17a899bb --- /dev/null +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/releases/package-list-9.txt @@ -0,0 +1,315 @@ +com.sun.jarsigner +com.sun.java.accessibility.util +com.sun.javadoc +com.sun.jdi +com.sun.jdi.connect +com.sun.jdi.connect.spi +com.sun.jdi.event +com.sun.jdi.request +com.sun.management +com.sun.net.httpserver +com.sun.net.httpserver.spi +com.sun.nio.sctp +com.sun.security.auth +com.sun.security.auth.callback +com.sun.security.auth.login +com.sun.security.auth.module +com.sun.security.jgss +com.sun.source.doctree +com.sun.source.tree +com.sun.source.util +com.sun.tools.attach +com.sun.tools.attach.spi +com.sun.tools.doclets +com.sun.tools.doclets.standard +com.sun.tools.javac +com.sun.tools.javadoc +com.sun.tools.jconsole +java.applet +java.awt +java.awt.color +java.awt.datatransfer +java.awt.desktop +java.awt.dnd +java.awt.event +java.awt.font +java.awt.geom +java.awt.im +java.awt.im.spi +java.awt.image +java.awt.image.renderable +java.awt.print +java.beans +java.beans.beancontext +java.io +java.lang +java.lang.annotation +java.lang.instrument +java.lang.invoke +java.lang.management +java.lang.module +java.lang.ref +java.lang.reflect +java.math +java.net +java.net.spi +java.nio +java.nio.channels +java.nio.channels.spi +java.nio.charset +java.nio.charset.spi +java.nio.file +java.nio.file.attribute +java.nio.file.spi +java.rmi +java.rmi.activation +java.rmi.dgc +java.rmi.registry +java.rmi.server +java.security +java.security.acl +java.security.cert +java.security.interfaces +java.security.spec +java.sql +java.text +java.text.spi +java.time +java.time.chrono +java.time.format +java.time.temporal +java.time.zone +java.util +java.util.concurrent +java.util.concurrent.atomic +java.util.concurrent.locks +java.util.function +java.util.jar +java.util.logging +java.util.prefs +java.util.regex +java.util.spi +java.util.stream +java.util.zip +javafx.animation +javafx.application +javafx.beans +javafx.beans.binding +javafx.beans.property +javafx.beans.property.adapter +javafx.beans.value +javafx.collections +javafx.collections.transformation +javafx.concurrent +javafx.css +javafx.css.converter +javafx.embed.swing +javafx.event +javafx.fxml +javafx.geometry +javafx.print +javafx.scene +javafx.scene.canvas +javafx.scene.chart +javafx.scene.control +javafx.scene.control.cell +javafx.scene.control.skin +javafx.scene.effect +javafx.scene.image +javafx.scene.input +javafx.scene.layout +javafx.scene.media +javafx.scene.paint +javafx.scene.shape +javafx.scene.text +javafx.scene.transform +javafx.scene.web +javafx.stage +javafx.util +javafx.util.converter +javax.accessibility +javax.activation +javax.activity +javax.annotation +javax.annotation.processing +javax.crypto +javax.crypto.interfaces +javax.crypto.spec +javax.imageio +javax.imageio.event +javax.imageio.metadata +javax.imageio.plugins.bmp +javax.imageio.plugins.jpeg +javax.imageio.plugins.tiff +javax.imageio.spi +javax.imageio.stream +javax.jnlp +javax.jws +javax.jws.soap +javax.lang.model +javax.lang.model.element +javax.lang.model.type +javax.lang.model.util +javax.management +javax.management.loading +javax.management.modelmbean +javax.management.monitor +javax.management.openmbean +javax.management.relation +javax.management.remote +javax.management.remote.rmi +javax.management.timer +javax.naming +javax.naming.directory +javax.naming.event +javax.naming.ldap +javax.naming.spi +javax.net +javax.net.ssl +javax.print +javax.print.attribute +javax.print.attribute.standard +javax.print.event +javax.rmi +javax.rmi.CORBA +javax.rmi.ssl +javax.script +javax.security.auth +javax.security.auth.callback +javax.security.auth.kerberos +javax.security.auth.login +javax.security.auth.spi +javax.security.auth.x500 +javax.security.cert +javax.security.sasl +javax.smartcardio +javax.sound.midi +javax.sound.midi.spi +javax.sound.sampled +javax.sound.sampled.spi +javax.sql +javax.sql.rowset +javax.sql.rowset.serial +javax.sql.rowset.spi +javax.swing +javax.swing.border +javax.swing.colorchooser +javax.swing.event +javax.swing.filechooser +javax.swing.plaf +javax.swing.plaf.basic +javax.swing.plaf.metal +javax.swing.plaf.multi +javax.swing.plaf.nimbus +javax.swing.plaf.synth +javax.swing.table +javax.swing.text +javax.swing.text.html +javax.swing.text.html.parser +javax.swing.text.rtf +javax.swing.tree +javax.swing.undo +javax.tools +javax.transaction +javax.transaction.xa +javax.xml +javax.xml.bind +javax.xml.bind.annotation +javax.xml.bind.annotation.adapters +javax.xml.bind.attachment +javax.xml.bind.helpers +javax.xml.bind.util +javax.xml.catalog +javax.xml.crypto +javax.xml.crypto.dom +javax.xml.crypto.dsig +javax.xml.crypto.dsig.dom +javax.xml.crypto.dsig.keyinfo +javax.xml.crypto.dsig.spec +javax.xml.datatype +javax.xml.namespace +javax.xml.parsers +javax.xml.soap +javax.xml.stream +javax.xml.stream.events +javax.xml.stream.util +javax.xml.transform +javax.xml.transform.dom +javax.xml.transform.sax +javax.xml.transform.stax +javax.xml.transform.stream +javax.xml.validation +javax.xml.ws +javax.xml.ws.handler +javax.xml.ws.handler.soap +javax.xml.ws.http +javax.xml.ws.soap +javax.xml.ws.spi +javax.xml.ws.spi.http +javax.xml.ws.wsaddressing +javax.xml.xpath +jdk.dynalink +jdk.dynalink.beans +jdk.dynalink.linker +jdk.dynalink.linker.support +jdk.dynalink.support +jdk.incubator.http +jdk.javadoc.doclet +jdk.jfr +jdk.jfr.consumer +jdk.jshell +jdk.jshell.execution +jdk.jshell.spi +jdk.jshell.tool +jdk.management.cmm +jdk.management.jfr +jdk.management.resource +jdk.nashorn.api.scripting +jdk.nashorn.api.tree +jdk.net +jdk.packager.services +jdk.security.jarsigner +netscape.javascript +org.ietf.jgss +org.omg.CORBA +org.omg.CORBA_2_3 +org.omg.CORBA_2_3.portable +org.omg.CORBA.DynAnyPackage +org.omg.CORBA.ORBPackage +org.omg.CORBA.portable +org.omg.CORBA.TypeCodePackage +org.omg.CosNaming +org.omg.CosNaming.NamingContextExtPackage +org.omg.CosNaming.NamingContextPackage +org.omg.Dynamic +org.omg.DynamicAny +org.omg.DynamicAny.DynAnyFactoryPackage +org.omg.DynamicAny.DynAnyPackage +org.omg.IOP +org.omg.IOP.CodecFactoryPackage +org.omg.IOP.CodecPackage +org.omg.Messaging +org.omg.PortableInterceptor +org.omg.PortableInterceptor.ORBInitInfoPackage +org.omg.PortableServer +org.omg.PortableServer.CurrentPackage +org.omg.PortableServer.POAManagerPackage +org.omg.PortableServer.POAPackage +org.omg.PortableServer.portable +org.omg.PortableServer.ServantLocatorPackage +org.omg.SendingContext +org.omg.stub.java.rmi +org.w3c.dom +org.w3c.dom.bootstrap +org.w3c.dom.css +org.w3c.dom.events +org.w3c.dom.html +org.w3c.dom.ls +org.w3c.dom.ranges +org.w3c.dom.stylesheets +org.w3c.dom.traversal +org.w3c.dom.views +org.w3c.dom.xpath +org.xml.sax +org.xml.sax.ext +org.xml.sax.helpers diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/BaseTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/BaseTaglet.java index 721b0328bcc..b0a77320944 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/BaseTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/BaseTaglet.java @@ -143,7 +143,7 @@ public boolean accepts(DocTree tree) { * @implSpec This implementation throws {@link UnsupportedTagletOperationException}. */ @Override - public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer) { + public Content getInlineTagOutput(Element element, DocTree tag, TagletWriter writer) { throw new UnsupportedTagletOperationException("Method not supported in taglet " + getName() + "."); } @@ -153,7 +153,7 @@ public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer * @implSpec This implementation throws {@link UnsupportedTagletOperationException} */ @Override - public Content getTagletOutput(Element holder, TagletWriter writer) { + public Content getAllBlockTagOutput(Element holder, TagletWriter writer) { throw new UnsupportedTagletOperationException("Method not supported in taglet " + getName() + "."); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/CodeTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/CodeTaglet.java index c4933e3aea7..1c9dfd31d5c 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/CodeTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/CodeTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -58,7 +58,7 @@ public class CodeTaglet extends BaseTaglet { } @Override - public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer) { + public Content getInlineTagOutput(Element element, DocTree tag, TagletWriter writer) { return writer.codeTagOutput(element, tag); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/DeprecatedTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/DeprecatedTaglet.java index d3530304914..9039580fe94 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/DeprecatedTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/DeprecatedTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -49,7 +49,7 @@ public DeprecatedTaglet() { } @Override - public Content getTagletOutput(Element holder, TagletWriter writer) { + public Content getAllBlockTagOutput(Element holder, TagletWriter writer) { return writer.deprecatedTagOutput(holder); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/DocRootTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/DocRootTaglet.java index ce9a195ff3e..46f481ed826 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/DocRootTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/DocRootTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -53,7 +53,7 @@ public DocRootTaglet() { } @Override - public Content getTagletOutput(Element holder, DocTree tag, TagletWriter writer) { + public Content getInlineTagOutput(Element holder, DocTree tag, TagletWriter writer) { return writer.getDocRootOutput(); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/IndexTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/IndexTaglet.java index 592cfeadaef..e2307aacfba 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/IndexTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/IndexTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -45,7 +45,7 @@ public class IndexTaglet extends BaseTaglet { } @Override - public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer) { + public Content getInlineTagOutput(Element element, DocTree tag, TagletWriter writer) { return writer.indexTagOutput(element, tag); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/InheritDocTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/InheritDocTaglet.java index ebc0aabbdf2..730de373b65 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/InheritDocTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/InheritDocTaglet.java @@ -95,8 +95,8 @@ private Content retrieveInheritedDocumentation(TagletWriter writer, DocFinder.Output inheritedDoc = DocFinder.search(configuration, input); if (inheritedDoc.isValidInheritDocTag) { if (!inheritedDoc.inlineTags.isEmpty()) { - replacement = writer.commentTagsToOutput(inheritedDoc.holderTag, - inheritedDoc.holder, inheritedDoc.inlineTags, isFirstSentence); + replacement = writer.commentTagsToOutput(inheritedDoc.holder, inheritedDoc.holderTag, + inheritedDoc.inlineTags, isFirstSentence); ch.setOverrideElement(inheritedDoc.holder); } @@ -111,7 +111,7 @@ private Content retrieveInheritedDocumentation(TagletWriter writer, } @Override - public Content getTagletOutput(Element e, DocTree tag, TagletWriter tagletWriter) { + public Content getInlineTagOutput(Element e, DocTree tag, TagletWriter tagletWriter) { DocTree inheritTag = (tag.getKind() == DocTree.Kind.INHERIT_DOC) ? null : tag; return retrieveInheritedDocumentation(tagletWriter, e, inheritTag, tagletWriter.isFirstSentence); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/LiteralTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/LiteralTaglet.java index 3325b2bb157..3c1e9b6639b 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/LiteralTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/LiteralTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -51,7 +51,7 @@ public class LiteralTaglet extends BaseTaglet { } @Override - public Content getTagletOutput(Element e, DocTree tag, TagletWriter writer) { + public Content getInlineTagOutput(Element e, DocTree tag, TagletWriter writer) { return writer.literalTagOutput(e, tag); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ParamTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ParamTaglet.java index 142b56c99ce..f1f617a154e 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ParamTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ParamTaglet.java @@ -134,7 +134,7 @@ public void inherit(DocFinder.Input input, DocFinder.Output output) { @Override @SuppressWarnings("preview") - public Content getTagletOutput(Element holder, TagletWriter writer) { + public Content getAllBlockTagOutput(Element holder, TagletWriter writer) { Utils utils = writer.configuration().utils; if (utils.isExecutableElement(holder)) { ExecutableElement member = (ExecutableElement) holder; diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ReturnTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ReturnTaglet.java index 1f3f5cc63e3..3aebf49fe71 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ReturnTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ReturnTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -70,7 +70,7 @@ public void inherit(DocFinder.Input input, DocFinder.Output output) { } @Override - public Content getTagletOutput(Element holder, TagletWriter writer) { + public Content getAllBlockTagOutput(Element holder, TagletWriter writer) { Messages messages = writer.configuration().getMessages(); Utils utils = writer.configuration().utils; TypeMirror returnType = utils.getReturnType(writer.getCurrentPageElement(), (ExecutableElement)holder); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SeeTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SeeTaglet.java index 076c704736a..24222758ee7 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SeeTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SeeTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -66,7 +66,7 @@ public void inherit(DocFinder.Input input, DocFinder.Output output) { } @Override - public Content getTagletOutput(Element holder, TagletWriter writer) { + public Content getAllBlockTagOutput(Element holder, TagletWriter writer) { Utils utils = writer.configuration().utils; List<? extends DocTree> tags = utils.getSeeTrees(holder); Element e = holder; diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SimpleTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SimpleTaglet.java index d0ec029aaa8..eefd95d6bb6 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SimpleTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SimpleTaglet.java @@ -40,7 +40,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.Utils; /** - * A custom single-argument tag. + * A custom single-argument block tag. * * <p><b>This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. @@ -178,17 +178,12 @@ public void inherit(DocFinder.Input input, DocFinder.Output output) { } @Override - public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer) { - return header == null || tag == null ? null : writer.simpleTagOutput(element, tag, header); - } - - @Override - public Content getTagletOutput(Element holder, TagletWriter writer) { + public Content getAllBlockTagOutput(Element holder, TagletWriter writer) { Utils utils = writer.configuration().utils; List<? extends DocTree> tags = utils.getBlockTags(holder, this); if (header == null || tags.isEmpty()) { return null; } - return writer.simpleTagOutput(holder, tags, header); + return writer.simpleBlockTagOutput(holder, tags, header); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SummaryTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SummaryTaglet.java index 2893f923b6d..71a22ddc7d2 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SummaryTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SummaryTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -49,7 +49,7 @@ public SummaryTaglet() { } @Override - public Content getTagletOutput(Element holder, DocTree tag, TagletWriter writer) { + public Content getInlineTagOutput(Element holder, DocTree tag, TagletWriter writer) { return writer.commentTagsToOutput(holder, ((SummaryTree)tag).getSummary()); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SystemPropertyTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SystemPropertyTaglet.java index 2615b28cf31..c94c7172b65 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SystemPropertyTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SystemPropertyTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 @@ -49,7 +49,7 @@ public class SystemPropertyTaglet extends BaseTaglet { } @Override - public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer) { + public Content getInlineTagOutput(Element element, DocTree tag, TagletWriter writer) { return writer.systemPropertyTagOutput(element, tag); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/Taglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/Taglet.java index e9c59760e6f..74da3d25929 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/Taglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/Taglet.java @@ -127,27 +127,29 @@ default boolean isBlockTag() { /** * Returns the content to be included in the generated output for an - * instance of a tag handled by this taglet. + * instance of an inline tag handled by this taglet. + * + * @param owner the element for the enclosing doc comment + * @param tag the tag + * @param writer the taglet-writer used in this doclet * - * @param element the element for the enclosing doc comment - * @param tag the tag - * @param writer the taglet-writer used in this doclet * @return the output for this tag - * @throws UnsupportedTagletOperationException thrown when the method is not supported by the taglet + * @throws UnsupportedTagletOperationException if the method is not supported by the taglet */ - Content getTagletOutput(Element element, DocTree tag, TagletWriter writer) throws + Content getInlineTagOutput(Element owner, DocTree tag, TagletWriter writer) throws UnsupportedTagletOperationException; /** * Returns the content to be included in the generated output for - * instances of a tag handled by this taglet. + * all instances of block tags handled by this taglet. + * + * @param owner the element for the enclosing doc comment + * @param writer the taglet-writer used in this doclet * - * @param element the element for the enclosing doc comment - * @param writer the taglet-writer used in this doclet * @return the output for this tag - * @throws UnsupportedTagletOperationException thrown when the method is not supported by the taglet + * @throws UnsupportedTagletOperationException if the method is not supported by the taglet */ - Content getTagletOutput(Element element, TagletWriter writer) throws + Content getAllBlockTagOutput(Element owner, TagletWriter writer) throws UnsupportedTagletOperationException; class UnsupportedTagletOperationException extends UnsupportedOperationException { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletManager.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletManager.java index 057a1583f2c..343b1b84615 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletManager.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletManager.java @@ -110,7 +110,7 @@ public class TagletManager { /** * The taglets that can appear inline in descriptive text. */ - private List<Taglet> inlineTags; + private Map<String, Taglet> inlineTags; /** * The taglets that can appear in the serialized form. @@ -288,7 +288,7 @@ private void registerTaglet(jdk.javadoc.doclet.Taglet instance) { } /** - * Add a new {@code SimpleTaglet}. + * Adds a new {@code SimpleTaglet}. * * If this tag already exists and the header passed as an argument is {@code null}, * move tag to the back of the list. If this tag already exists and the @@ -332,11 +332,12 @@ private void checkTagName(String name) { } /** - * Given a name of a seen custom tag, remove it from the set of unseen - * custom tags. - * @param name the name of the seen custom tag + * Reports that a tag was seen in a doc comment. + * It is removed from the list of custom tags that have not yet been seen. + * + * @param name the name of the tag */ - void seenCustomTag(String name) { + void seenTag(String name) { unseenCustomTags.remove(name); } @@ -497,9 +498,9 @@ private void printTagMisuseWarn(CommentHelper ch, Taglet taglet, DocTree tag, St * Returns the taglets that can appear inline, in descriptive text. * @return the taglets that can appear inline */ - List<Taglet> getInlineTaglets() { + Map<String, Taglet> getInlineTaglets() { if (inlineTags == null) { - initBlockTaglets(); + initTaglets(); } return inlineTags; } @@ -510,7 +511,7 @@ List<Taglet> getInlineTaglets() { */ public List<Taglet> getSerializedFormTaglets() { if (serializedFormTags == null) { - initBlockTaglets(); + initTaglets(); } return serializedFormTags; } @@ -525,7 +526,7 @@ public List<Taglet> getSerializedFormTaglets() { @SuppressWarnings("fallthrough") public List<Taglet> getBlockTaglets(Element e) { if (blockTagletsByLocation == null) { - initBlockTaglets(); + initTaglets(); } switch (e.getKind()) { @@ -565,30 +566,30 @@ public List<Taglet> getBlockTaglets(Element e) { } /** - * Initialize the custom tag Lists. + * Initialize the tag collections. */ - private void initBlockTaglets() { + private void initTaglets() { blockTagletsByLocation = new EnumMap<>(Location.class); for (Location site : Location.values()) { blockTagletsByLocation.put(site, new ArrayList<>()); } - inlineTags = new ArrayList<>(); + inlineTags = new LinkedHashMap<>(); - for (Taglet current : allTaglets.values()) { - if (current.isInlineTag()) { - inlineTags.add(current); + for (Taglet t : allTaglets.values()) { + if (t.isInlineTag()) { + inlineTags.put(t.getName(), t); } - if (current.isBlockTag()) { - for (Location l : current.getAllowedLocations()) { - blockTagletsByLocation.get(l).add(current); + if (t.isBlockTag()) { + for (Location l : t.getAllowedLocations()) { + blockTagletsByLocation.get(l).add(t); } } } - //Init the serialized form tags + // init the serialized form tags for the serialized form page serializedFormTags = new ArrayList<>(); serializedFormTags.add(allTaglets.get(SERIAL_DATA.tagName)); serializedFormTags.add(allTaglets.get(THROWS.tagName)); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletWriter.java index 618bb155078..d0defd1c2ff 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletWriter.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletWriter.java @@ -26,6 +26,7 @@ package jdk.javadoc.internal.doclets.toolkit.taglets; import java.util.List; +import java.util.Map; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; import javax.lang.model.element.TypeElement; @@ -60,186 +61,191 @@ protected TagletWriter(boolean isFirstSentence) { } /** - * @return an instance of an output object. + * Returns an instance of an output object. + * + * @return an instance of an output object */ public abstract Content getOutputInstance(); /** - * Return the output for a {@code {@code ...}} tag. + * Returns the output for a {@code {@code ...}} tag. + * + * @param element The element that owns the doc comment + * @param tag the tag * - * @param element - * @param tag the tag. - * @return the output of the taglet. + * @return the output */ protected abstract Content codeTagOutput(Element element, DocTree tag); /** - * Return the output for a {@code {@index...}} tag. + * Returns the output for a {@code {@index...}} tag. + * + * @param element The element that owns the doc comment + * @param tag the tag * - * @param tag the tag. - * @return the output of the taglet. + * @return the output */ protected abstract Content indexTagOutput(Element element, DocTree tag); /** - * Returns the output for the DocRoot inline tag. - * @return the output for the DocRoot inline tag. + * Returns the output for a {@code {@docRoot}} tag. + * + * @return the output */ protected abstract Content getDocRootOutput(); /** - * Return the deprecated tag output. + * Returns the output for a {@code @deprecated} tag. + * + * @param element The element that owns the doc comment * - * @param element the element to write deprecated documentation for. - * @return the output of the deprecated tag. + * @return the output */ protected abstract Content deprecatedTagOutput(Element element); /** - * Return the output for a {@code {@literal ...}} tag. + * Returns the output for a {@code {@literal ...}} tag. + * + * @param element The element that owns the doc comment + * @param tag the tag * - * @param element - * @param tag the tag. - * @return the output of the taglet. + * @return the output */ protected abstract Content literalTagOutput(Element element, DocTree tag); /** - * Return the header for the param tags. + * Returns the header for the {@code @param} tags. * * @param kind the kind of header that is required - * @return the header for the param tags + * + * @return the header */ protected abstract Content getParamHeader(ParamTaglet.ParamKind kind); /** - * Return the output for param tags. + * Returns the output for a {@code @param} tag. + * Note we cannot rely on the name in the tag, because we might be + * inheriting the tag. + * + * @param element The element that owns the doc comment + * @param paramTag the parameter to document + * @param paramName the name of the parameter * - * @param element - * @param paramTag the parameter to document. - * @param paramName the name of the parameter. - * @return the output of the param tag. + * @return the output */ protected abstract Content paramTagOutput(Element element, DocTree paramTag, String paramName); /** - * Return the output for property tags. + * Returns the output for a {@code @return} tag. * - * @param element - * @param propertyTag the parameter to document. - * @param prefix the text with which to prefix the property name. - * @return the output of the param tag. - */ - protected abstract Content propertyTagOutput(Element element, DocTree propertyTag, String prefix); - - /** - * Return the return tag output. + * @param element The element that owns the doc comment + * @param returnTag the return tag to document * - * @param element - * @param returnTag the return tag to output. - * @return the output of the return tag. + * @return the output */ protected abstract Content returnTagOutput(Element element, DocTree returnTag); /** - * Return the see tag output. + * Returns the output for {@code @see} tags. * - * @param holder - * @param seeTags the array of See tags. - * @return the output of the see tags. - */ - protected abstract Content seeTagOutput(Element holder, List<? extends DocTree> seeTags); - - /** - * Return the output for a simple tag. + * @param element The element that owns the doc comment + * @param seeTags the list of tags * - * @param element - * @param simpleTags the array of simple tags. - * @param header - * @return the output of the simple tags. + * @return the output */ - protected abstract Content simpleTagOutput(Element element, List<? extends DocTree> simpleTags, String header); + protected abstract Content seeTagOutput(Element element, List<? extends DocTree> seeTags); /** - * Return the output for a simple tag. + * Returns the output for a series of simple tags. * - * @param element - * @param simpleTag the simple tag. - * @param header - * @return the output of the simple tag. + * @param element The element that owns the doc comment + * @param simpleTags the list of simple tags + * @param header the header for the series of tags + * + * @return the output */ - protected abstract Content simpleTagOutput(Element element, DocTree simpleTag, String header); + protected abstract Content simpleBlockTagOutput(Element element, List<? extends DocTree> simpleTags, String header); /** - * Return the system property tag output. + * Returns the output for a {@code {@systemProperty...}} tag. * - * @param element + * @param element The element that owns the doc comment * @param systemPropertyTag the system property tag - * @return the output of system property tag + * + * @return the output */ protected abstract Content systemPropertyTagOutput(Element element, DocTree systemPropertyTag); /** - * Return the header for the throws tag. + * Returns the header for the {@code @throws} tag. * - * @return the header for the throws tag. + * @return the header for the throws tag */ protected abstract Content getThrowsHeader(); /** - * Return the header for the throws tag. + * Returns the output for a {@code @throws} tag. * - * @param element - * @param throwsTag the throws tag. - * @param substituteType instantiated type of a generic type-variable, or null. - * @return the output of the throws tag. + * @param element The element that owns the doc comment + * @param throwsTag the throws tag + * @param substituteType instantiated type of a generic type-variable, or null + * + * @return the output */ protected abstract Content throwsTagOutput(Element element, DocTree throwsTag, TypeMirror substituteType); /** - * Return the output for the throws tag. + * Returns the output for a default {@code @throws} tag. + * + * @param throwsType the type that is thrown * - * @param throwsType the throws type. - * @return the output of the throws type. + * @return the output */ protected abstract Content throwsTagOutput(TypeMirror throwsType); /** - * Return the output for the value tag. + * Returns the output for a {@code {@value}} tag. * - * @param field the constant field that holds the value tag. - * @param constantVal the constant value to document. + * @param field the constant field that holds the value tag + * @param constantVal the constant value to document * @param includeLink true if we should link the constant text to the - * constant field itself. - * @return the output of the value tag. + * constant field itself + * + * @return the output */ protected abstract Content valueTagOutput(VariableElement field, String constantVal, boolean includeLink); /** - * Return the main type element of the current page or null for pages that don't have one. + * Returns the main type element of the current page or null for pages that don't have one. * * @return the type element of the current page or null. */ protected abstract TypeElement getCurrentPageElement(); /** - * Given an output object, append to it the tag documentation for - * the given member. - * - * @param tagletManager the manager that manages the taglets. - * @param element the element that we are print tags for. - * @param taglets the taglets to print. - * @param writer the writer that will generate the output strings. - * @param output the output buffer to store the output in. + * Returns the content generated from the block tags for a given element. + * The content is generated according to the order of the list of taglets. + * The result is a possibly-empty list of the output generated by each + * of the given taglets for all of the tags they individually support. + * + * @param tagletManager the manager that manages the taglets + * @param element the element that we are to write tags for + * @param taglets the taglets for the tags to write + * + * @return the content */ - public static void genTagOutput(TagletManager tagletManager, + public Content getBlockTagOutput(TagletManager tagletManager, Element element, - List<Taglet> taglets, - TagletWriter writer, - Content output) - { - Utils utils = writer.configuration().utils; + List<Taglet> taglets) { + for (Taglet t : taglets) { + if (!t.isBlockTag()) { + throw new IllegalArgumentException(t.getName()); + } + } + + Content output = getOutputInstance(); + Utils utils = configuration().utils; tagletManager.checkTags(element, utils.getBlockTags(element), false); tagletManager.checkTags(element, utils.getFullBody(element), true); for (Taglet taglet : taglets) { @@ -248,6 +254,7 @@ public static void genTagOutput(TagletManager tagletManager, // section away from the tag info, so skip here. continue; } + if (element.getKind() == ElementKind.MODULE && taglet instanceof BaseTaglet) { BaseTaglet t = (BaseTaglet) taglet; switch (t.getTagKind()) { @@ -258,111 +265,121 @@ public static void genTagOutput(TagletManager tagletManager, continue; } } + if (taglet instanceof DeprecatedTaglet) { //Deprecated information is documented "inline", not in tag info //section. continue; } + if (taglet instanceof SimpleTaglet && !((SimpleTaglet) taglet).enabled) { // taglet has been disabled continue; } - Content currentOutput = null; + try { - currentOutput = taglet.getTagletOutput(element, writer); - } catch (UnsupportedTagletOperationException utoe) { - //The taglet does not take a member as an argument. Let's try - //a single tag. - List<? extends DocTree> tags = utils.getBlockTags(element, taglet); - if (!tags.isEmpty()) { - currentOutput = taglet.getTagletOutput(element, tags.get(0), writer); + Content tagletOutput = taglet.getAllBlockTagOutput(element, this); + if (tagletOutput != null) { + tagletManager.seenTag(taglet.getName()); + output.add(tagletOutput); } - } - if (currentOutput != null) { - tagletManager.seenCustomTag(taglet.getName()); - output.add(currentOutput); + } catch (UnsupportedTagletOperationException e) { + // malformed taglet: + // claims to support block tags (see Taglet.isBlockTag) but does not provide the + // appropriate method, Taglet.getAllBlockTagOutput. } } + return output; } + /** - * Given an inline tag, return its output. - * @param holder - * @param tagletManager The taglet manager for the current doclet. - * @param holderTag The tag that holds this inline tag, or {@code null} if - * there is no tag that holds it. - * @param inlineTag The inline tag to be documented. - * @param tagletWriter The taglet writer to write the output. - * @return The output of the inline tag. + * Returns the content generated from an inline tag in the doc comment for a given element, + * or {@code null} if the tag is not supported or does not return any output. + * + * @param holder the element associated with the doc comment + * @param tagletManager the taglet manager for the current doclet + * @param holderTag the tag that holds this inline tag, or {@code null} if + * there is no tag that holds it + * @param inlineTag the inline tag to be documented + * + * @return the content, or {@code null} */ - public static Content getInlineTagOutput(Element holder, - TagletManager tagletManager, - DocTree holderTag, - DocTree inlineTag, - TagletWriter tagletWriter) - { - List<Taglet> definedTags = tagletManager.getInlineTaglets(); - CommentHelper ch = tagletWriter.configuration().utils.getCommentHelper(holder); + public Content getInlineTagOutput(Element holder, + TagletManager tagletManager, + DocTree holderTag, + DocTree inlineTag) { + + Map<String, Taglet> inlineTags = tagletManager.getInlineTaglets(); + CommentHelper ch = configuration().utils.getCommentHelper(holder); final String inlineTagName = ch.getTagName(inlineTag); - //This is a custom inline tag. - for (Taglet definedTag : definedTags) { - if ((definedTag.getName()).equals(inlineTagName)) { - // Given a name of a seen custom tag, remove it from the - // set of unseen custom tags. - tagletManager.seenCustomTag(definedTag.getName()); - Content output = definedTag.getTagletOutput(holder, - holderTag != null && - definedTag.getName().equals("inheritDoc") ? - holderTag : inlineTag, tagletWriter); - return output; - } + Taglet t = inlineTags.get(inlineTagName); + if (t == null) { + return null; + } + + try { + Content tagletOutput = t.getInlineTagOutput(holder, + holderTag != null && t.getName().equals("inheritDoc") ? holderTag : inlineTag, + this); + tagletManager.seenTag(t.getName()); + return tagletOutput; + } catch (UnsupportedTagletOperationException e) { + // malformed taglet: + // claims to support inline tags (see Taglet.isInlineTag) but does not provide the + // appropriate method, Taglet.getInlineTagOutput. + return null; } - return null; } /** - * Converts inline tags and text to TagOutput, expanding the + * Converts inline tags and text to content, expanding the * inline tags along the way. Called wherever text can contain * an inline tag, such as in comments or in free-form text arguments - * to non-inline tags. + * to block tags. * - * @param holderTag the tag that holds the documentation. - * @param tags array of text tags and inline tags (often alternating) - * present in the text of interest for this doc. - * @return the {@link Content} representing the comments. + * @param holderTree the tree that holds the documentation + * @param trees list of {@code DocTree} nodes containing text and inline tags (often alternating) + * present in the text of interest for this doc + * + * @return the generated content */ - public abstract Content commentTagsToOutput(DocTree holderTag, List<? extends DocTree> tags); + public abstract Content commentTagsToOutput(DocTree holderTree, List<? extends DocTree> trees); /** - * Converts inline tags and text to TagOutput, expanding the + * Converts inline tags and text to content, expanding the * inline tags along the way. Called wherever text can contain * an inline tag, such as in comments or in free-form text arguments - * to non-inline tags. + * to block tags. + * + * @param element The element that owns the documentation + * @param trees list of {@code DocTree} nodes containing text and inline tags (often alternating) + * present in the text of interest for this doc * - * @param holder the element where comment resides. - * @param tags array of text tags and inline tags (often alternating) - * present in the text of interest for this doc. - * @return the {@link Content} representing the comments. + * @return the generated content */ - public abstract Content commentTagsToOutput(Element holder, List<? extends DocTree> tags); + public abstract Content commentTagsToOutput(Element element, List<? extends DocTree> trees); /** - * Converts inline tags and text to TagOutput, expanding the + * Converts inline tags and text to content, expanding the * inline tags along the way. Called wherever text can contain * an inline tag, such as in comments or in free-form text arguments * to non-inline tags. * - * @param holderTag the tag that holds the documentation. - * @param holder the element where comment resides. - * @param tags array of text tags and inline tags (often alternating) - * present in the text of interest for this doc. - * @param isFirstSentence true if this is the first sentence. - * @return the {@link Content} representing the comments. + * @param element the element where comment resides + * @param holder the tag that holds the documentation + * @param trees array of text tags and inline tags (often alternating) + * present in the text of interest for this doc + * @param isFirstSentence true if this is the first sentence + * + * @return the generated content */ - public abstract Content commentTagsToOutput(DocTree holderTag, - Element holder, List<? extends DocTree> tags, boolean isFirstSentence); + public abstract Content commentTagsToOutput(Element element, DocTree holder, + List<? extends DocTree> trees, boolean isFirstSentence); /** - * @return an instance of the configuration used for this doclet. + * Returns an instance of the configuration used for this doclet. + * + * @return an instance of the configuration used for this doclet */ public abstract BaseConfiguration configuration(); } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ThrowsTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ThrowsTaglet.java index ebcb1b547d7..bf2ab199e37 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ThrowsTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ThrowsTaglet.java @@ -153,7 +153,7 @@ private Content inheritThrowsDocumentation(Element holder, } @Override - public Content getTagletOutput(Element holder, TagletWriter writer) { + public Content getAllBlockTagOutput(Element holder, TagletWriter writer) { Utils utils = writer.configuration().utils; ExecutableElement execHolder = (ExecutableElement) holder; ExecutableType instantiatedType = utils.asInstantiatedMethodType( diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java index 90a084b6077..4a5c3c69801 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java @@ -25,7 +25,6 @@ package jdk.javadoc.internal.doclets.toolkit.taglets; -import java.util.Collections; import java.util.List; import java.util.Set; @@ -111,14 +110,14 @@ public String getName() { } @Override - public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer) { + public Content getInlineTagOutput(Element element, DocTree tag, TagletWriter writer) { Content output = writer.getOutputInstance(); - output.add(new RawHtml(userTaglet.toString(Collections.singletonList(tag), element))); + output.add(new RawHtml(userTaglet.toString(List.of(tag), element))); return output; } @Override - public Content getTagletOutput(Element holder, TagletWriter writer) { + public Content getAllBlockTagOutput(Element holder, TagletWriter writer) { Content output = writer.getOutputInstance(); Utils utils = writer.configuration().utils; List<? extends DocTree> tags = utils.getBlockTags(holder, this); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ValueTaglet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ValueTaglet.java index 0d362f7e902..bdc6cf46ef0 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ValueTaglet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ValueTaglet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -85,10 +85,11 @@ private VariableElement getVariableElement(Element holder, BaseConfiguration con } @Override - public Content getTagletOutput(Element holder, DocTree tag, TagletWriter writer) { - Utils utils = writer.configuration().utils; - Messages messages = writer.configuration().getMessages(); - VariableElement field = getVariableElement(holder, writer.configuration(), tag); + public Content getInlineTagOutput(Element holder, DocTree tag, TagletWriter writer) { + BaseConfiguration configuration = writer.configuration(); + Utils utils = configuration.utils; + Messages messages = configuration.getMessages(); + VariableElement field = getVariableElement(holder, configuration, tag); if (field == null) { if (tag.toString().isEmpty()) { //Invalid use of @value @@ -101,7 +102,7 @@ public Content getTagletOutput(Element holder, DocTree tag, TagletWriter writer) } } else if (field.getConstantValue() != null) { return writer.valueTagOutput(field, - utils.constantValueExpresion(field), + utils.constantValueExpression(field), // TODO: investigate and cleanup // in the j.l.m world, equals will not be accurate // !field.equals(tag.holder()) diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Comparators.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Comparators.java index 3a2931c6886..8c8d14e40db 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Comparators.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Comparators.java @@ -26,7 +26,6 @@ package jdk.javadoc.internal.doclets.toolkit.util; import com.sun.source.doctree.SerialFieldTree; -import jdk.javadoc.internal.doclets.formats.html.SearchIndexItem; import javax.lang.model.element.Element; import javax.lang.model.element.ExecutableElement; @@ -279,44 +278,12 @@ public int compare(Element e1, Element e2) { return indexUseComparator; } - /** - * Returns a comparator for the {@code IndexItem}s in the index page. This is a composite - * comparator that must be able to compare all kinds {@code Element}s as well as - * {@code SearchIndexItem}s. - * - * @return a comparator for index page items. - */ - public Comparator<IndexItem> makeIndexComparator(boolean classesOnly) { - Comparator<Element> elementComparator = classesOnly - ? makeAllClassesComparator() - : makeIndexElementComparator(); - Comparator<SearchIndexItem> searchTagComparator = - makeGenericSearchIndexComparator(); - - return (o1, o2) -> { - // Compare two elements - if (o1.getElement() != null && o2.getElement() != null) { - return elementComparator.compare(o1.getElement(), o2.getElement()); - } - // Compare two search tags - if (o1.getSearchTag() != null && o2.getSearchTag() != null) { - return searchTagComparator.compare(o1.getSearchTag(), o2.getSearchTag()); - } - // Compare an element with a search tag. - // Compares labels, if those are equal put the search tag first. - int d = utils.compareStrings(o1.getLabel(), o2.getLabel()); - if (d == 0) { - d = o1.getElement() == null ? 1 : -1; - } - return d; - }; - } - private Comparator<TypeMirror> typeMirrorClassUseComparator = null; /** - * Compares the FullyQualifiedNames of two TypeMirrors - * @return + * Returns a comparator that compares the fully qualified names of two type mirrors. + * + * @return the comparator */ public Comparator<TypeMirror> makeTypeMirrorClassUseComparator() { if (typeMirrorClassUseComparator == null) { @@ -332,10 +299,10 @@ public Comparator<TypeMirror> makeTypeMirrorClassUseComparator() { private Comparator<TypeMirror> typeMirrorIndexUseComparator = null; /** - * Compares the SimpleNames of TypeMirrors if equal then the - * FullyQualifiedNames of TypeMirrors. + * Returns a comparator that compares the simple names of two type mirrors, + * or the fully qualified names if the simple names are equal. * - * @return + * @return the comparator */ public Comparator<TypeMirror> makeTypeMirrorIndexUseComparator() { if (typeMirrorIndexUseComparator == null) { @@ -468,7 +435,7 @@ protected int compareNames(Element e1, Element e2) { * argument is less than, equal to, or greater than the second. */ protected int compareFullyQualifiedNames(Element e1, Element e2) { - // add simplename to be compatible + // add simple name to be compatible String thisElement = getFullyQualifiedName(e1); String thatElement = getFullyQualifiedName(e2); return utils.compareStrings(thisElement, thatElement); @@ -527,20 +494,20 @@ protected int compareElementKinds(Element e1, Element e2) { } private int getKindIndex(Element e) { - switch (e.getKind()) { - case MODULE: return 0; - case PACKAGE: return 1; - case CLASS: return 2; - case ENUM: return 3; - case ENUM_CONSTANT: return 4; - case RECORD: return 5; - case INTERFACE: return 6; - case ANNOTATION_TYPE: return 7; - case FIELD: return 8; - case CONSTRUCTOR: return 9; - case METHOD: return 10; - default: throw new IllegalArgumentException(e.getKind().toString()); - } + return switch (e.getKind()) { + case MODULE -> 0; + case PACKAGE -> 1; + case CLASS -> 2; + case ENUM -> 3; + case ENUM_CONSTANT -> 4; + case RECORD -> 5; + case INTERFACE -> 6; + case ANNOTATION_TYPE -> 7; + case FIELD -> 8; + case CONSTRUCTOR -> 9; + case METHOD -> 10; + default -> throw new IllegalArgumentException(e.getKind().toString()); + }; } @SuppressWarnings("preview") @@ -598,48 +565,4 @@ protected String defaultAction(Element e, Void p) { }.visit(e); } } - - /** - * Returns a Comparator for SearchIndexItems representing types. Items are - * compared by short name, or full string representation if names are equal. - * - * @return a Comparator - */ - public Comparator<SearchIndexItem> makeTypeSearchIndexComparator() { - return (SearchIndexItem sii1, SearchIndexItem sii2) -> { - int result = utils.compareStrings(sii1.getSimpleName(), sii2.getSimpleName()); - if (result == 0) { - // TreeSet needs this to be consistent with equal so we do - // a plain comparison of string representations as fallback. - result = sii1.toString().compareTo(sii2.toString()); - } - return result; - }; - } - - private Comparator<SearchIndexItem> genericSearchIndexComparator = null; - - /** - * Returns a Comparator for SearchIndexItems representing modules, packages, or members. - * Items are compared by label (member name plus signature for members, package name for - * packages, and module name for modules). If labels are equal then full string - * representation is compared. - * - * @return a Comparator - */ - public Comparator<SearchIndexItem> makeGenericSearchIndexComparator() { - if (genericSearchIndexComparator == null) { - genericSearchIndexComparator = (SearchIndexItem sii1, SearchIndexItem sii2) -> { - int result = utils.compareStrings(sii1.getLabel(), sii2.getLabel()); - if (result == 0) { - // TreeSet needs this to be consistent with equal so we do - // a plain comparison of string representations as fallback. - result = sii1.toString().compareTo(sii2.toString()); - } - return result; - }; - } - return genericSearchIndexComparator; - } - } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java index 645a09e042d..19b1e8483d8 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java @@ -36,8 +36,10 @@ import java.net.URLConnection; import java.util.HashMap; import java.util.Map; +import java.util.Properties; import java.util.TreeMap; +import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.ModuleElement; import javax.lang.model.element.PackageElement; @@ -48,6 +50,7 @@ import com.sun.tools.javac.code.Flags; import com.sun.tools.javac.code.Symbol.ModuleSymbol; import jdk.javadoc.doclet.Reporter; +import jdk.javadoc.internal.doclets.toolkit.AbstractDoclet; import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration; import jdk.javadoc.internal.doclets.toolkit.Resources; @@ -223,6 +226,134 @@ public boolean link(String url, String elemlisturl, Reporter reporter) throws Do return link(url, elemlisturl, reporter, true); } + /** + * Check whether links to platform documentation are configured. If not then configure + * links using the the documentation URL defined in {@code linkPlatformProperties} or the + * default documentation URL if that parameter is {@code null}. + * + * @param linkPlatformProperties path or URL to properties file containing + * platform documentation URLs, or null + * @param reporter the {@code DocErrorReporter} used to report errors + */ + public void checkPlatformLinks(String linkPlatformProperties, Reporter reporter) { + PackageElement javaLang = utils.elementUtils.getPackageElement("java.lang"); + if (utils.isIncluded(javaLang)) { + return; + } + DocLink link = getExternalLink(javaLang, DocPath.empty, DocPaths.PACKAGE_SUMMARY.getPath()); + if (link != null) { + // Links to platform docs are already configure, nothing to do here. + return; + } + try { + int versionNumber = getSourceVersionNumber(); + String docUrl; + + if (linkPlatformProperties != null) { + docUrl = getCustomPlatformDocs(versionNumber, linkPlatformProperties); + } else { + docUrl = getDefaultPlatformDocs(versionNumber); + } + if (docUrl == null) { + return; + } + DocPath elementListPath = getPlatformElementList(versionNumber); + URL elementListUrl = AbstractDoclet.class.getResource(elementListPath.getPath()); + if (elementListUrl == null) { + reporter.print(Kind.WARNING, resources.getText("doclet.Resource_error", elementListPath.getPath())); + } else { + try { + readListFromURL(docUrl, elementListUrl); + } catch (IOException exc) { + throw new Fault(resources.getText( + "doclet.Resource_error", elementListPath.getPath()), exc); + } + } + } catch (Fault f) { + reporter.print(Kind.ERROR, f.getMessage()); + } + } + + /** + * Return the resource path for the package or element list for the given {@code version}. + * @param version the platform version number + * @return the resource path + */ + private DocPath getPlatformElementList(int version) { + String filename = version <= 9 + ? "package-list-" + version + ".txt" + : "element-list-" + version + ".txt"; + return DocPaths.RESOURCES.resolve("releases").resolve(filename); + } + + /** + * Return the default URL for the platform API documentation for the given {@code version}. + * @param version the platform version number + * @return the URL as String + */ + private String getDefaultPlatformDocs(int version) { + Resources resources = configuration.getDocResources(); + return version <= 10 + ? resources.getText("doclet.platform.docs.old", version) + : isPrerelease(version) + ? resources.getText("doclet.platform.docs.ea", version) + : resources.getText("doclet.platform.docs.new", version); + } + + /** + * Retrieve and return the custom URL for the platform API documentation for the given + * {@code version} from the properties file at {@code linkPlatformProperties}. + * @param version the platform version number + * @param linkPlatformProperties path pointing to a properties file + * @return the custom URL as String + */ + private String getCustomPlatformDocs(int version, String linkPlatformProperties) throws Fault { + String url; + try { + Properties props = new Properties(); + InputStream inputStream; + if (isUrl(linkPlatformProperties)) { + inputStream = toURL(linkPlatformProperties).openStream(); + } else { + inputStream = DocFile.createFileForInput(configuration, linkPlatformProperties).openInputStream(); + } + try (inputStream) { + props.load(inputStream); + } + url = props.getProperty("doclet.platform.docs." + version); + } catch (MalformedURLException exc) { + throw new Fault(resources.getText("doclet.MalformedURL", linkPlatformProperties), exc); + } catch (IOException exc) { + throw new Fault(resources.getText("doclet.URL_error", linkPlatformProperties), exc); + } catch (DocFileIOException exc) { + throw new Fault(resources.getText("doclet.File_error", linkPlatformProperties), exc); + } + return url; + } + + /** + * Return the source version number used in the current execution of javadoc. + * @return the source version number + */ + private int getSourceVersionNumber() { + SourceVersion sourceVersion = configuration.docEnv.getSourceVersion(); + // TODO it would be nice if this was provided by SourceVersion + String versionNumber = sourceVersion.name().substring(8); + assert SourceVersion.valueOf("RELEASE_" + versionNumber) == sourceVersion; + return Integer.parseInt(versionNumber); + } + + /** + * Return true if the given {@code sourceVersion} is the same as the current doclet version + * and is a pre-release version. + * @param sourceVersion the source version number + * @return true if it is a pre-release version + */ + private boolean isPrerelease(int sourceVersion) { + Runtime.Version docletVersion = configuration.getDocletVersion(); + return docletVersion.feature() == sourceVersion && docletVersion.pre().isPresent(); + } + /* * Build the extern element list from given URL or the directory path. * Flag error if the "-link" or "-linkoffline" option is already used. @@ -295,13 +426,11 @@ private String adjustEndFileSeparator(String url) { private void readElementListFromURL(String urlpath, URL elemlisturlpath) throws Fault { try { URL link = elemlisturlpath.toURI().resolve(DocPaths.ELEMENT_LIST.getPath()).toURL(); - try (InputStream in = open(link)) { - readElementList(in, urlpath, false); - } + readListFromURL(urlpath, link); } catch (URISyntaxException | MalformedURLException exc) { throw new Fault(resources.getText("doclet.MalformedURL", elemlisturlpath.toString()), exc); } catch (IOException exc) { - readAlternateURL(urlpath, elemlisturlpath); + readPackageListFromURL(urlpath, elemlisturlpath); } } @@ -311,12 +440,10 @@ private void readElementListFromURL(String urlpath, URL elemlisturlpath) throws * @param urlpath Path to the packages. * @param elemlisturlpath URL or the path to the "package-list" file. */ - private void readAlternateURL(String urlpath, URL elemlisturlpath) throws Fault { + private void readPackageListFromURL(String urlpath, URL elemlisturlpath) throws Fault { try { URL link = elemlisturlpath.toURI().resolve(DocPaths.PACKAGE_LIST.getPath()).toURL(); - try (InputStream in = open(link)) { - readElementList(in, urlpath, false); - } + readListFromURL(urlpath, link); } catch (URISyntaxException | MalformedURLException exc) { throw new Fault(resources.getText("doclet.MalformedURL", elemlisturlpath.toString()), exc); } catch (IOException exc) { @@ -324,6 +451,18 @@ private void readAlternateURL(String urlpath, URL elemlisturlpath) throws Fault } } + /** + * Read an element or package list from file. + * + * @param urlpath URL or path to the packages + * @param elementlistpath URL to read "element-list" file from + */ + private void readListFromURL(String urlpath, URL elementlistpath) throws IOException { + try (InputStream in = open(elementlistpath)) { + readElementList(in, urlpath, false); + } + } + /** * Read the "element-list" file which is available locally. * diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/IndexBuilder.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/IndexBuilder.java index 2f6e852f2a5..21cc1246fef 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/IndexBuilder.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/IndexBuilder.java @@ -33,14 +33,18 @@ import javax.lang.model.element.PackageElement; import javax.lang.model.element.TypeElement; -import jdk.javadoc.internal.doclets.formats.html.SearchIndexItem; +import com.sun.source.doctree.DocTree; import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration; import jdk.javadoc.internal.doclets.toolkit.Messages; import static jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable.Kind.*; /** - * An alphabetical index of {@link Element elements}. + * An alphabetical index of elements, search tags, and other items. + * Two tables are maintained: + * one is indexed by the first character of each items name; + * the other is index by the item's category, indicating the JavaScript + * file in which the item should be written. * * <p><b>This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. @@ -50,10 +54,16 @@ public class IndexBuilder { /** - * Sets of elements keyed by the first character of the names of the - * elements in those sets. + * Sets of items keyed by the first character of the names (labels) + * of the items in those sets. */ - private final Map<Character, SortedSet<IndexItem>> indexMap; + private final Map<Character, SortedSet<IndexItem>> itemsByFirstChar; + + /** + * Sets of items keyed by the {@link IndexItem.Category category} + * of the items in those sets. + */ + private final Map<IndexItem.Category, SortedSet<IndexItem>> itemsByCategory; /** * Don't generate deprecated information if true. @@ -63,11 +73,15 @@ public class IndexBuilder { /** * Build this index only for classes? */ - private final boolean classesOnly; + protected final boolean classesOnly; private final BaseConfiguration configuration; private final Utils utils; - private final Comparator<IndexItem> comparator; + + /** + * The comparator used for the sets in {@code itemsByFirstChar}. + */ + private final Comparator<IndexItem> mainComparator; /** * Creates a new {@code IndexBuilder}. @@ -106,15 +120,18 @@ public IndexBuilder(BaseConfiguration configuration, this.noDeprecated = noDeprecated; this.classesOnly = classesOnly; - this.indexMap = new TreeMap<>(); - comparator = utils.comparators.makeIndexComparator(classesOnly); - buildIndex(); + + itemsByFirstChar = new TreeMap<>(); + itemsByCategory = new EnumMap<>(IndexItem.Category.class); + + mainComparator = makeIndexComparator(classesOnly); } /** - * Indexes all the members in all the packages and all the classes. + * Adds all the selected modules, packages, types and their members to the index, + * or just the type elements if {@code classesOnly} is {@code true}. */ - private void buildIndex() { + public void addElements() { Set<TypeElement> classes = configuration.getIncludedTypeElements(); indexTypeElements(classes); if (classesOnly) { @@ -138,6 +155,65 @@ private void buildIndex() { } } + /** + * Adds an individual item to the two collections of items. + * + * @param item the item to add + */ + public void add(IndexItem item) { + Objects.requireNonNull(item); + + itemsByFirstChar.computeIfAbsent(keyCharacter(item.getLabel()), + c -> new TreeSet<>(mainComparator)) + .add(item); + + itemsByCategory.computeIfAbsent(item.getCategory(), + c -> new TreeSet<>(mainComparator)) + .add(item); + } + + /** + * Returns a sorted list of items whose names start with the + * provided character. + * + * @param key index key + * @return list of items keyed by the provided character + */ + public SortedSet<IndexItem> getItems(Character key) { + return itemsByFirstChar.get(key); + } + + /** + * Returns a list of index keys. + */ + public List<Character> getFirstCharacters() { + return new ArrayList<>(itemsByFirstChar.keySet()); + } + + /** + * Returns a sorted list of items in a given category. + * + * @param cat the category + * @return list of items keyed by the provided character + */ + public SortedSet<IndexItem> getItems(IndexItem.Category cat) { + Objects.requireNonNull(cat); + return itemsByCategory.getOrDefault(cat, Collections.emptySortedSet()); + } + + /** + * Returns a sorted list of items with a given kind of doc tree. + * + * @param kind the kind + * @return list of items keyed by the provided character + */ + public SortedSet<IndexItem> getItems(DocTree.Kind kind) { + Objects.requireNonNull(kind); + return itemsByCategory.getOrDefault(IndexItem.Category.TAGS, Collections.emptySortedSet()).stream() + .filter(i -> i.getDocTree().getKind() == kind) + .collect(Collectors.toCollection(() -> new TreeSet<>(mainComparator))); + } + /** * Indexes all the members (fields, methods, constructors, etc.) of the * provided type element. @@ -146,26 +222,23 @@ private void buildIndex() { */ private void indexMembers(TypeElement te) { VisibleMemberTable vmt = configuration.getVisibleMemberTable(te); - indexElements(vmt.getVisibleMembers(FIELDS), te); - indexElements(vmt.getVisibleMembers(ANNOTATION_TYPE_MEMBER_OPTIONAL), te); - indexElements(vmt.getVisibleMembers(ANNOTATION_TYPE_MEMBER_REQUIRED), te); - indexElements(vmt.getVisibleMembers(METHODS), te); - indexElements(vmt.getVisibleMembers(CONSTRUCTORS), te); - indexElements(vmt.getVisibleMembers(ENUM_CONSTANTS), te); + indexMembers(te, vmt.getVisibleMembers(FIELDS)); + indexMembers(te, vmt.getVisibleMembers(ANNOTATION_TYPE_MEMBER_OPTIONAL)); + indexMembers(te, vmt.getVisibleMembers(ANNOTATION_TYPE_MEMBER_REQUIRED)); + indexMembers(te, vmt.getVisibleMembers(METHODS)); + indexMembers(te, vmt.getVisibleMembers(CONSTRUCTORS)); + indexMembers(te, vmt.getVisibleMembers(ENUM_CONSTANTS)); } /** * Indexes the provided elements. * - * @param elements a collection of elements + * @param members a collection of elements */ - private void indexElements(Iterable<? extends Element> elements, TypeElement typeElement) { - for (Element element : elements) { - if (shouldIndex(element)) { - String name = utils.getSimpleName(element); - Character ch = keyCharacter(name); - SortedSet<IndexItem> set = indexMap.computeIfAbsent(ch, c -> new TreeSet<>(comparator)); - set.add(new IndexItem(element, typeElement, configuration.utils)); + private void indexMembers(TypeElement typeElement, Iterable<? extends Element> members) { + for (Element member : members) { + if (shouldIndex(member)) { + add(IndexItem.of(typeElement, member, utils)); } } } @@ -178,26 +251,17 @@ private void indexElements(Iterable<? extends Element> elements, TypeElement typ private void indexTypeElements(Iterable<TypeElement> elements) { for (TypeElement typeElement : elements) { if (shouldIndex(typeElement)) { - String name = utils.getSimpleName(typeElement); - Character ch = keyCharacter(name); - SortedSet<IndexItem> set = indexMap.computeIfAbsent(ch, c -> new TreeSet<>(comparator)); - set.add(new IndexItem(typeElement, configuration.utils)); + add(IndexItem.of(typeElement, utils)); } } } - private static Character keyCharacter(String s) { - return s.isEmpty() ? '*' : Character.toUpperCase(s.charAt(0)); - } - /** * Indexes all the modules. */ private void indexModules() { for (ModuleElement m : configuration.modules) { - Character ch = keyCharacter(m.getQualifiedName().toString()); - SortedSet<IndexItem> set = indexMap.computeIfAbsent(ch, c -> new TreeSet<>(comparator)); - set.add(new IndexItem(m, configuration.utils)); + add(IndexItem.of(m, utils)); } } @@ -208,9 +272,7 @@ private void indexModules() { */ private void indexPackage(PackageElement packageElement) { if (shouldIndex(packageElement)) { - Character ch = keyCharacter(utils.getPackageName(packageElement)); - SortedSet<IndexItem> set = indexMap.computeIfAbsent(ch, c -> new TreeSet<>(comparator)); - set.add(new IndexItem(packageElement, configuration.utils)); + add(IndexItem.of(packageElement, utils)); } } @@ -225,59 +287,57 @@ private boolean shouldIndex(Element element) { if (utils.isPackage(element)) { // Do not add to index map if -nodeprecated option is set and the // package is marked as deprecated. - return !(noDeprecated && configuration.utils.isDeprecated(element)); + return !(noDeprecated && utils.isDeprecated(element)); } else { // Do not add to index map if -nodeprecated option is set and if the // element is marked as deprecated or the containing package is marked as // deprecated. return !(noDeprecated && - (configuration.utils.isDeprecated(element) || - configuration.utils.isDeprecated(utils.containingPackage(element)))); + (utils.isDeprecated(element) || + utils.isDeprecated(utils.containingPackage(element)))); } } - /** - * Returns a map representation of this index. - * - * @return map - */ - public Map<Character, SortedSet<IndexItem>> asMap() { - return indexMap; + private static Character keyCharacter(String s) { + return s.isEmpty() ? '*' : Character.toUpperCase(s.charAt(0)); } + /** - * Returns a sorted list of elements whose names start with the - * provided character. + * Returns a comparator for the {@code IndexItem}s in the index page. + * This is a composite comparator that must be able to compare all kinds of items: + * for element items, tag items, and others. * - * @param key index key - * @return list of elements keyed by the provided character + * @return a comparator for index page items */ - public List<IndexItem> getMemberList(Character key) { - SortedSet<IndexItem> set = indexMap.get(key); - if (set == null) { - return null; - } - return new ArrayList<>(set); - } + private Comparator<IndexItem> makeIndexComparator(boolean classesOnly) { + Comparator<Element> elementComparator = classesOnly + ? utils.comparators.makeAllClassesComparator() + : utils.comparators.makeIndexElementComparator(); - /** - * Returns a list of index keys. - */ - public List<Character> keys() { - return new ArrayList<>(indexMap.keySet()); - } + Comparator<IndexItem> labelComparator = + (ii1, ii2) -> utils.compareStrings(ii1.getLabel(), ii2.getLabel()); + Comparator<IndexItem> searchTagComparator = + labelComparator + .thenComparing(IndexItem::getHolder) + .thenComparing(IndexItem::getDescription) + .thenComparing(IndexItem::getUrl); - /** - * Add search tags for the key {@code key}. - * - * @param key the index key - * @param searchTags the search tags - */ - public void addSearchTags(char key, List<SearchIndexItem> searchTags) { - searchTags.forEach(searchTag -> { - SortedSet<IndexItem> set = indexMap.computeIfAbsent(key, c -> new TreeSet<>(comparator)); - set.add(new IndexItem(searchTag)); - }); + return (ii1, ii2) -> { + // If both are element items, compare the elements + if (ii1.isElementItem() && ii2.isElementItem()) { + return elementComparator.compare(ii1.getElement(), ii2.getElement()); + } + + // If one is an element item, compare labels; if equal, put element item last + if (ii1.isElementItem() || ii2.isElementItem()) { + int d = labelComparator.compare(ii1, ii2); + return d != 0 ? d : ii1.isElementItem() ? 1 : -1; + } + + // Otherwise, compare labels and other fields of the items + return searchTagComparator.compare(ii1, ii2); + }; } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/IndexItem.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/IndexItem.java index 75e818c8d24..486bdd2c11a 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/IndexItem.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/IndexItem.java @@ -25,16 +25,56 @@ package jdk.javadoc.internal.doclets.toolkit.util; -import jdk.javadoc.internal.doclets.formats.html.SearchIndexItem; - +import java.util.Objects; import javax.lang.model.element.Element; import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.ModuleElement; import javax.lang.model.element.PackageElement; import javax.lang.model.element.TypeElement; +import javax.lang.model.element.VariableElement; +import javax.lang.model.util.SimpleElementVisitor14; + +import com.sun.source.doctree.DocTree; /** - * A holder for an indexed {@link Element} or {@link SearchIndexItem}. + * An item to be included in the index pages and in interactive search. + * + * <p> + * Items are primarily defined by their position in the documentation, + * which is one of: + * + * <ul> + * <li>An element (module, package, type or member) + * <li>One of a small set of tags in the doc comment for an element: + * {@code {@index ...}}, {@code {@systemProperty ...}}, etc + * <li>One of a small set of outliers, corresponding to summary pages: + * "All Classes", "All Packages", etc + * </ul> + * + * <p> + * All items have a "label", which is the presentation string used + * to display the item in the list of matching choices. The + * label is specified when the item is created. Items also + * have a "url" and a "description", which are provided by + * the specific doclet. + * + * <p> + * Each item provides details to be included in the search index files + * read and processed by JavaScript. + * Items have a "category", which is normally derived from the element + * kind or doc tree kind; it corresponds to the JavaScript file + * in which this item will be written. + * + * <p> + * Items for an element may have one or more of the following: + * "containing module", "containing package", "containing type". + * + * <p> + * Items for a node in a doc tree have a "holder", which is a + * text form of the enclosing element or page. + * They will typically also have a "description" derived from + * content in the doc tree node. + * * * <p><b>This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. @@ -43,71 +83,494 @@ */ public class IndexItem { + /** + * The "category" used to group items for the interactive search index. + * Categories correspond directly to the JavaScript files that will be generated. + */ + public enum Category { + MODULES, + PACKAGES, + TYPES, + MEMBERS, + TAGS + } + + /** + * The presentation string for the item. It must be non-empty. + */ + private final String label; + + /** + * The element for the item. It is only null for items for summary pages that are not + * associated with any specific element. + * + */ private final Element element; - private final SearchIndexItem searchTag; - private String label; - private TypeElement typeElement; - public IndexItem(SearchIndexItem searchTag) { - this.element = null; - this.searchTag = searchTag; - this.label = searchTag.getLabel(); - } + /** + * The URL pointing to the element, doc tree or page being indexed. + * It may be empty if the information can be determined from other fields. + */ + private String url = ""; - private IndexItem(Element element) { - this.element = element; - this.searchTag = null; - } + /** + * The containing module, if any, for the item. + * It will be empty if the element is not in a package, and may be omitted if the + * name of the package is unique. + */ + private String containingModule = ""; + + /** + * The containing package, if any, for the item. + */ + private String containingPackage = ""; - public IndexItem(TypeElement typeElement, Utils utils) { - this(typeElement); - this.label = utils.getSimpleName(typeElement); + /** + * The containing class, if any, for the item. + */ + private String containingClass = ""; + + /** + * Creates an index item for a module element. + * + * @param moduleElement the element + * @param utils the common utilities class + * + * @return the item + */ + public static IndexItem of(ModuleElement moduleElement, Utils utils) { + return new IndexItem(moduleElement, utils.getFullyQualifiedName(moduleElement)); } - public IndexItem(ModuleElement moduleElement, Utils utils) { - this(moduleElement); - this.label = utils.getFullyQualifiedName(moduleElement); + /** + * Creates an index item for a package element. + * + * @param packageElement the element + * @param utils the common utilities class + * + * @return the item + */ + public static IndexItem of(PackageElement packageElement, Utils utils) { + return new IndexItem(packageElement, utils.getPackageName(packageElement)); } - public IndexItem(PackageElement packageElement, Utils utils) { - this(packageElement); - this.label = utils.getPackageName(packageElement); + /** + * Creates an index item for a type element. + * Note: use {@code getElement()} to access this value, not {@code getTypeElement}. + * + * @param typeElement the element + * @param utils the common utilities class + * + * @return the item + */ + public static IndexItem of(TypeElement typeElement, Utils utils) { + return new IndexItem(typeElement, utils.getSimpleName(typeElement)); } - public IndexItem(Element member, TypeElement typeElement, Utils utils) { - this(member); - this.typeElement = typeElement; + /** + * Creates an index item for a member element. + * Note: the given type element may not be the same as the enclosing element of the member + * in cases where the enclosing element is not visible in the documentation. + * + * @param typeElement the element that contains the member + * @param member the member + * @param utils the common utilities class + * + * @return the item + * + * @see #getContainingTypeElement() + */ + public static IndexItem of(TypeElement typeElement, Element member, Utils utils) { String name = utils.getSimpleName(member); if (utils.isExecutableElement(member)) { ExecutableElement ee = (ExecutableElement)member; name += utils.flatSignature(ee, typeElement); } - this.label = name; + return new IndexItem(member, name) { + @Override + public TypeElement getContainingTypeElement() { + return typeElement; + } + }; } + /** + * Creates an index item for a node in the doc comment for an element. + * The node should only be one that gives rise to an entry in the index. + * + * @param element the element + * @param docTree the node in the doc comment + * @param label the label + * @param holder the holder for the comment + * @param description the description of the item + * @param link the root-relative link to the item in the generated docs + * + * @return the item + */ + public static IndexItem of(Element element, DocTree docTree, String label, + String holder, String description, DocLink link) { + Objects.requireNonNull(element); + Objects.requireNonNull(holder); + Objects.requireNonNull(description); + Objects.requireNonNull(link); + + switch (docTree.getKind()) { + case INDEX, SYSTEM_PROPERTY -> { } + default -> throw new IllegalArgumentException(docTree.getKind().toString()); + } + + return new IndexItem(element, label, link.toString()) { + @Override + public DocTree getDocTree() { + return docTree; + } + @Override + public Category getCategory() { + return getCategory(docTree); + } + @Override + public String getHolder() { + return holder; + } + @Override + public String getDescription() { + return description; + } + }; + } + + /** + * Creates an index item for a summary page, that is not associated with any element or + * node in a doc comment. + * + * @param category the category for the item + * @param label the label for the item + * @param path the path for the page + * + * @return the item + */ + public static IndexItem of(Category category, String label, DocPath path) { + Objects.requireNonNull(category); + return new IndexItem(null, label, path.getPath()) { + @Override + public DocTree getDocTree() { + return null; + } + @Override + public Category getCategory() { + return category; + } + @Override + public String getHolder() { + return ""; + } + @Override + public String getDescription() { + return ""; + } + }; + } + + private IndexItem(Element element, String label) { + if (label.isEmpty()) { + throw new IllegalArgumentException(); + } + + this.element = element; + this.label = label; + } + + private IndexItem(Element element, String label, String url) { + this(element, label); + setUrl(url); + } + + /** + * Returns the label of the item. + * + * @return the label + */ public String getLabel() { return label; } + /** + * Returns the part of the label after the last dot, or the whole label if there are no dots. + * + * @return the simple name + */ + public String getSimpleName() { + return label.substring(label.lastIndexOf('.') + 1); + } + + /** + * Returns the label with a fully-qualified type name. + * (Used to determine if labels are unique or need to be qualified.) + * + * @param utils the common utilities class + * + * @return the fully qualified name + */ public String getFullyQualifiedLabel(Utils utils) { + TypeElement typeElement = getContainingTypeElement(); if (typeElement != null) { return utils.getFullyQualifiedName(typeElement) + "." + label; - } else if (element != null) { + } else if (isElementItem()) { return utils.getFullyQualifiedName(element); } else { return label; } } + /** + * Returns the element associate with this item, or {@code null}. + * + * @return the element + */ public Element getElement() { return element; } - public SearchIndexItem getSearchTag() { - return searchTag; + /** + * Returns the category for this item, that indicates the JavaScript file + * in which this item should be written. + * + * @return the category + */ + public Category getCategory() { + return getCategory(element); + } + + protected Category getCategory(DocTree docTree) { + return switch (docTree.getKind()) { + case INDEX, SYSTEM_PROPERTY -> Category.TAGS; + default -> throw new IllegalArgumentException(docTree.getKind().toString()); + }; } - public TypeElement getTypeElement() { - return typeElement; + @SuppressWarnings("preview") + protected Category getCategory(Element element) { + return new SimpleElementVisitor14<Category, Void>() { + @Override + public Category visitModule(ModuleElement t, Void v) { + return Category.MODULES; + } + + @Override + public Category visitPackage(PackageElement e, Void v) { + return Category.PACKAGES; + } + + @Override + public Category visitType(TypeElement e, Void v) { + return Category.TYPES; + } + + @Override + public Category visitVariable(VariableElement e, Void v) { + return Category.MEMBERS; + } + + @Override + public Category visitExecutable(ExecutableElement e, Void v) { + return Category.MEMBERS; + } + + @Override + public Category defaultAction(Element e, Void v) { + throw new IllegalArgumentException(e.toString()); + } + }.visit(element); + } + + /** + * Returns the type element that is documented as containing a member element, + * or {@code null} if this item does not represent a member element. + * + * @return the type element + */ + public TypeElement getContainingTypeElement() { + return null; + } + + /** + * Returns the documentation tree node for this item, of {@code null} if this item + * does not represent a documentation tree node. + * + * @return the documentation tree node + */ + public DocTree getDocTree() { + return null; + } + + /** + * Returns {@code true} if this index is for an element. + * + * @return {@code true} if this index is for an element + */ + public boolean isElementItem() { + return element != null && getDocTree() == null; + } + + /** + * Returns {@code true} if this index is for a tag in a doc comment. + * + * @return {@code true} if this index is for a tag in a doc comment + */ + public boolean isTagItem() { + return getDocTree() != null; + } + + /** + * Sets the URL for the item, when it cannot otherwise be inferred from other fields. + * + * @param u the url + * + * @return this item + */ + public IndexItem setUrl(String u) { + url = Objects.requireNonNull(u); + return this; + } + + /** + * Returns the URL for this item, or an empty string if no value has been set. + * + * @return the URL for this item, or an empty string if no value has been set + */ + public String getUrl() { + return url; + } + + /** + * Sets the name of the containing module for this item. + * + * @param m the module + * + * @return this item + */ + public IndexItem setContainingModule(String m) { + containingModule = Objects.requireNonNull(m); + return this; + } + + /** + * Sets the name of the containing package for this item. + * + * @param p the package + * + * @return this item + */ + public IndexItem setContainingPackage(String p) { + containingPackage = Objects.requireNonNull(p); + return this; + } + + /** + * Sets the name of the containing class for this item. + * + * @param c the class + * + * @return this item + */ + public IndexItem setContainingClass(String c) { + containingClass = Objects.requireNonNull(c); + return this; + } + + /** + * Returns a description of the element owning the documentation comment for this item, + * or {@code null} if this is not a item for a tag for an item in a documentation tag. + * + * @return the description of the element that owns this item + */ + public String getHolder() { + return null; + } + + /** + * Returns a description of the tag for this item or {@code null} if this is not a item + * for a tag for an item in a documentation tag. + * + * @return the description of the tag + */ + public String getDescription() { + return null; + } + + /** + * Returns a string representing this item in JSON notation. + * + * @return a string representing this item in JSON notation + */ + public String toJSON() { + // TODO: Additional processing is required, see JDK-8238495 + StringBuilder item = new StringBuilder(); + Category category = getCategory(); + switch (category) { + case MODULES: + item.append("{") + .append("\"l\":\"").append(label).append("\"") + .append("}"); + break; + + case PACKAGES: + item.append("{"); + if (!containingModule.isEmpty()) { + item.append("\"m\":\"").append(containingModule).append("\","); + } + item.append("\"l\":\"").append(label).append("\""); + if (!url.isEmpty()) { + item.append(",\"u\":\"").append(url).append("\""); + } + item.append("}"); + break; + + case TYPES: + item.append("{"); + if (!containingPackage.isEmpty()) { + item.append("\"p\":\"").append(containingPackage).append("\","); + } + if (!containingModule.isEmpty()) { + item.append("\"m\":\"").append(containingModule).append("\","); + } + item.append("\"l\":\"").append(label).append("\""); + if (!url.isEmpty()) { + item.append(",\"u\":\"").append(url).append("\""); + } + item.append("}"); + break; + + case MEMBERS: + item.append("{"); + if (!containingModule.isEmpty()) { + item.append("\"m\":\"").append(containingModule).append("\","); + } + item.append("\"p\":\"").append(containingPackage).append("\",") + .append("\"c\":\"").append(containingClass).append("\",") + .append("\"l\":\"").append(label).append("\""); + if (!url.isEmpty()) { + item.append(",\"u\":\"").append(url).append("\""); + } + item.append("}"); + break; + + case TAGS: + String holder = getHolder(); + String description = getDescription(); + item.append("{") + .append("\"l\":\"").append(label).append("\",") + .append("\"h\":\"").append(holder).append("\","); + if (!description.isEmpty()) { + item.append("\"d\":\"").append(description).append("\","); + } + item.append("\"u\":\"").append(url).append("\"") + .append("}"); + break; + + default: + throw new AssertionError("Unexpected category: " + category); + } + return item.toString(); } } diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java index 94fa7a77545..4212a93ac38 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java @@ -107,9 +107,9 @@ import com.sun.tools.javac.model.JavacTypes; import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration; import jdk.javadoc.internal.doclets.toolkit.BaseOptions; +import jdk.javadoc.internal.doclets.toolkit.CommentUtils; import jdk.javadoc.internal.doclets.toolkit.CommentUtils.DocCommentInfo; import jdk.javadoc.internal.doclets.toolkit.Resources; -import jdk.javadoc.internal.doclets.toolkit.WorkArounds; import jdk.javadoc.internal.doclets.toolkit.taglets.BaseTaglet; import jdk.javadoc.internal.doclets.toolkit.taglets.Taglet; import jdk.javadoc.internal.tool.DocEnvImpl; @@ -282,8 +282,7 @@ public boolean executableMembersEqual(ExecutableElement e1, ExecutableElement e2 } /** - * According to - * <cite>The Java Language Specification</cite>, + * According to <cite>The Java Language Specification</cite>, * all the outer classes and static inner classes are core classes. */ public boolean isCoreClass(TypeElement e) { @@ -2268,63 +2267,59 @@ public TypeElement getEnclosingTypeElement(Element e) { private ConstantValueExpression cve = null; - public String constantValueExpresion(VariableElement ve) { + public String constantValueExpression(VariableElement ve) { if (cve == null) cve = new ConstantValueExpression(); - return cve.constantValueExpression(configuration.workArounds, ve); - } - - private static class ConstantValueExpression { - public String constantValueExpression(WorkArounds workArounds, VariableElement ve) { - return new TypeKindVisitor9<String, Object>() { - /* TODO: we need to fix this correctly. - * we have a discrepancy here, note the use of getConstValue - * vs. getConstantValue, at some point we need to use - * getConstantValue. - * In the legacy world byte and char primitives appear as Integer values, - * thus a byte value of 127 will appear as 127, but in the new world, - * a byte value appears as Byte thus 0x7f will be printed, similarly - * chars will be translated to \n, \r etc. however, in the new world, - * they will be printed as decimal values. The new world is correct, - * and we should fix this by using getConstantValue and the visitor to - * address this in the future. - */ - @Override - public String visitPrimitiveAsBoolean(PrimitiveType t, Object val) { - return (int)val == 0 ? "false" : "true"; - } + return cve.visit(ve.asType(), ve.getConstantValue()); + } - @Override - public String visitPrimitiveAsDouble(PrimitiveType t, Object val) { - return sourceForm(((Double)val), 'd'); - } + // We could also use Elements.getConstantValueExpression, which provides + // similar functionality, but which also includes casts to provide valid + // compilable constants: e.g. (byte) 0x7f + private static class ConstantValueExpression extends TypeKindVisitor9<String, Object> { + @Override + public String visitPrimitiveAsBoolean(PrimitiveType t, Object val) { + return ((boolean) val) ? "true" : "false"; + } - @Override - public String visitPrimitiveAsFloat(PrimitiveType t, Object val) { - return sourceForm(((Float)val).doubleValue(), 'f'); - } + @Override + public String visitPrimitiveAsByte(PrimitiveType t, Object val) { + return "0x" + Integer.toString(((Byte) val) & 0xff, 16); + } - @Override - public String visitPrimitiveAsLong(PrimitiveType t, Object val) { - return val + "L"; - } + @Override + public String visitPrimitiveAsChar(PrimitiveType t, Object val) { + StringBuilder buf = new StringBuilder(8); + buf.append('\''); + sourceChar((char) val, buf); + buf.append('\''); + return buf.toString(); + } - @Override - protected String defaultAction(TypeMirror e, Object val) { - if (val == null) - return null; - else if (val instanceof Character) - return sourceForm(((Character)val)); - else if (val instanceof Byte) - return sourceForm(((Byte)val)); - else if (val instanceof String) - return sourceForm((String)val); - return val.toString(); // covers int, short - } - }.visit(ve.asType(), workArounds.getConstValue(ve)); + @Override + public String visitPrimitiveAsDouble(PrimitiveType t, Object val) { + return sourceForm(((Double) val), 'd'); + } + + @Override + public String visitPrimitiveAsFloat(PrimitiveType t, Object val) { + return sourceForm(((Float) val).doubleValue(), 'f'); + } + + @Override + public String visitPrimitiveAsLong(PrimitiveType t, Object val) { + return val + "L"; + } + + @Override + protected String defaultAction(TypeMirror e, Object val) { + if (val == null) + return null; + else if (val instanceof String) + return sourceForm((String) val); + return val.toString(); // covers int, short } - // where private String sourceForm(double v, char suffix) { if (Double.isNaN(v)) return "0" + suffix + "/0" + suffix; @@ -2335,22 +2330,10 @@ private String sourceForm(double v, char suffix) { return v + (suffix == 'f' || suffix == 'F' ? "" + suffix : ""); } - private String sourceForm(char c) { - StringBuilder buf = new StringBuilder(8); - buf.append('\''); - sourceChar(c, buf); - buf.append('\''); - return buf.toString(); - } - - private String sourceForm(byte c) { - return "0x" + Integer.toString(c & 0xff, 16); - } - private String sourceForm(String s) { StringBuilder buf = new StringBuilder(s.length() + 5); buf.append('\"'); - for (int i=0; i<s.length(); i++) { + for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); sourceChar(c, buf); } @@ -2360,31 +2343,33 @@ private String sourceForm(String s) { private void sourceChar(char c, StringBuilder buf) { switch (c) { - case '\b': buf.append("\\b"); return; - case '\t': buf.append("\\t"); return; - case '\n': buf.append("\\n"); return; - case '\f': buf.append("\\f"); return; - case '\r': buf.append("\\r"); return; - case '\"': buf.append("\\\""); return; - case '\'': buf.append("\\\'"); return; - case '\\': buf.append("\\\\"); return; - default: - if (isPrintableAscii(c)) { - buf.append(c); return; + case '\b' -> buf.append("\\b"); + case '\t' -> buf.append("\\t"); + case '\n' -> buf.append("\\n"); + case '\f' -> buf.append("\\f"); + case '\r' -> buf.append("\\r"); + case '\"' -> buf.append("\\\""); + case '\'' -> buf.append("\\\'"); + case '\\' -> buf.append("\\\\"); + default -> { + if (isPrintableAscii(c)) { + buf.append(c); + return; + } + unicodeEscape(c, buf); } - unicodeEscape(c, buf); - return; } } private void unicodeEscape(char c, StringBuilder buf) { final String chars = "0123456789abcdef"; buf.append("\\u"); - buf.append(chars.charAt(15 & (c>>12))); - buf.append(chars.charAt(15 & (c>>8))); - buf.append(chars.charAt(15 & (c>>4))); - buf.append(chars.charAt(15 & (c>>0))); + buf.append(chars.charAt(15 & (c >> 12))); + buf.append(chars.charAt(15 & (c >> 8))); + buf.append(chars.charAt(15 & (c >> 4))); + buf.append(chars.charAt(15 & (c >> 0))); } + private boolean isPrintableAscii(char c) { return c >= ' ' && c <= '~'; } @@ -2722,7 +2707,7 @@ public DocCommentTree getDocCommentTree0(Element element) { } } // run doclint even if docCommentTree is null, to trigger checks for missing comments - configuration.workArounds.runDocLint(path); + configuration.runDocLint(path); } dcTreeCache.put(element, info); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/doclint/Checker.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Checker.java similarity index 99% rename from src/jdk.compiler/share/classes/com/sun/tools/doclint/Checker.java rename to src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Checker.java index 479cb26e934..7e8a5eea6d0 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/doclint/Checker.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Checker.java @@ -23,7 +23,7 @@ * questions. */ -package com.sun.tools.doclint; +package jdk.javadoc.internal.doclint; import java.io.IOException; import java.io.StringWriter; @@ -85,14 +85,13 @@ import com.sun.source.util.DocTreePath; import com.sun.source.util.DocTreePathScanner; import com.sun.source.util.TreePath; -import com.sun.tools.doclint.HtmlTag.AttrKind; import com.sun.tools.javac.tree.DocPretty; import com.sun.tools.javac.util.Assert; import com.sun.tools.javac.util.DefinedBy; import com.sun.tools.javac.util.DefinedBy.Api; -import com.sun.tools.javac.util.StringUtils; -import static com.sun.tools.doclint.Messages.Group.*; +import jdk.javadoc.internal.doclint.HtmlTag.AttrKind; +import static jdk.javadoc.internal.doclint.Messages.Group.*; /** diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/DocLint.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/DocLint.java new file mode 100644 index 00000000000..a7c5f8df8fd --- /dev/null +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/DocLint.java @@ -0,0 +1,460 @@ +/* + * Copyright (c) 2012, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.javadoc.internal.doclint; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +import javax.lang.model.element.Name; +import javax.lang.model.util.Elements; +import javax.lang.model.util.Types; +import javax.tools.StandardLocation; + +import com.sun.source.doctree.DocCommentTree; +import com.sun.source.tree.BlockTree; +import com.sun.source.tree.ClassTree; +import com.sun.source.tree.CompilationUnitTree; +import com.sun.source.tree.LambdaExpressionTree; +import com.sun.source.tree.ModuleTree; +import com.sun.source.tree.PackageTree; +import com.sun.source.tree.MethodTree; +import com.sun.source.tree.Tree; +import com.sun.source.tree.VariableTree; +import com.sun.source.util.DocTrees; +import com.sun.source.util.JavacTask; +import com.sun.source.util.TaskEvent; +import com.sun.source.util.TaskListener; +import com.sun.source.util.TreePath; +import com.sun.source.util.TreePathScanner; +import com.sun.tools.javac.api.JavacTaskImpl; +import com.sun.tools.javac.api.JavacTool; +import com.sun.tools.javac.file.JavacFileManager; +import com.sun.tools.javac.main.JavaCompiler; +import com.sun.tools.javac.util.Context; +import com.sun.tools.javac.util.DefinedBy; +import com.sun.tools.javac.util.DefinedBy.Api; + +/** + * Multi-function entry point for the doc check utility. + * + * This class can be invoked in the following ways: + * <ul> + * <li>From the command line + * <li>From javac, as a plugin + * <li>Directly, via a simple API + * </ul> + * + * <p><b>This is NOT part of any supported API. + * If you write code that depends on this, you do so at your own + * risk. This code and its internal interfaces are subject to change + * or deletion without notice.</b></p> + */ +public class DocLint extends com.sun.tools.doclint.DocLint { + + public static final String XMSGS_OPTION = "-Xmsgs"; + public static final String XMSGS_CUSTOM_PREFIX = "-Xmsgs:"; + private static final String STATS = "-stats"; + public static final String XCUSTOM_TAGS_PREFIX = "-XcustomTags:"; + public static final String XHTML_VERSION_PREFIX = "-XhtmlVersion:"; + public static final String XCHECK_PACKAGE = "-XcheckPackage:"; + public static final String SEPARATOR = ","; + + // <editor-fold defaultstate="collapsed" desc="Command-line entry point"> + public static void main(String... args) { + DocLint dl = new DocLint(); + try { + dl.run(args); + } catch (BadArgs e) { + System.err.println(e.getMessage()); + System.exit(1); + } catch (IOException e) { + System.err.println(dl.localize("dc.main.ioerror", e.getLocalizedMessage())); + System.exit(2); + } + } + + // </editor-fold> + + // <editor-fold defaultstate="collapsed" desc="Simple API"> + + public class BadArgs extends Exception { + private static final long serialVersionUID = 0; + BadArgs(String code, Object... args) { + super(localize(code, args)); + this.code = code; + this.args = args; + } + + final String code; + final transient Object[] args; + } + + /** + * Simple API entry point. + * @param args Options and operands for doclint + * @throws BadArgs if an error is detected in any args + * @throws IOException if there are problems with any of the file arguments + */ + public void run(String... args) throws BadArgs, IOException { + PrintWriter out = new PrintWriter(System.out); + try { + run(out, args); + } finally { + out.flush(); + } + } + + public void run(PrintWriter out, String... args) throws BadArgs, IOException { + env = new Env(); + processArgs(args); + + boolean noFiles = javacFiles.isEmpty(); + if (needHelp) { + showHelp(out); + if (noFiles) + return; + } else if (noFiles) { + out.println(localize("dc.main.no.files.given")); + return; + } + + JavacTool tool = JavacTool.create(); + + JavacFileManager fm = new JavacFileManager(new Context(), false, null); + fm.setSymbolFileEnabled(false); + if (javacBootClassPath != null) { + fm.setLocation(StandardLocation.PLATFORM_CLASS_PATH, javacBootClassPath); + } + if (javacClassPath != null) { + fm.setLocation(StandardLocation.CLASS_PATH, javacClassPath); + } + if (javacSourcePath != null) { + fm.setLocation(StandardLocation.SOURCE_PATH, javacSourcePath); + } + + JavacTask task = tool.getTask(out, fm, null, javacOpts, null, + fm.getJavaFileObjectsFromFiles(javacFiles)); + Iterable<? extends CompilationUnitTree> units = task.parse(); + ((JavacTaskImpl) task).enter(); + + env.init(task); + checker = new Checker(env); + + DeclScanner ds = new DeclScanner(env) { + @Override + void visitDecl(Tree tree, Name name) { + TreePath p = getCurrentPath(); + DocCommentTree dc = env.trees.getDocCommentTree(p); + + checker.scan(dc, p); + } + }; + + ds.scan(units, null); + + reportStats(out); + + Context ctx = ((JavacTaskImpl) task).getContext(); + JavaCompiler c = JavaCompiler.instance(ctx); + c.printCount("error", c.errorCount()); + c.printCount("warn", c.warningCount()); + } + + void processArgs(String... args) throws BadArgs { + javacOpts = new ArrayList<>(); + javacFiles = new ArrayList<>(); + + if (args.length == 0) + needHelp = true; + + for (int i = 0; i < args.length; i++) { + String arg = args[i]; + if (arg.matches("-Xmax(errs|warns)") && i + 1 < args.length) { + if (args[++i].matches("[0-9]+")) { + javacOpts.add(arg); + javacOpts.add(args[i]); + } else { + throw new BadArgs("dc.bad.value.for.option", arg, args[i]); + } + } else if ((arg.equals("-target") || arg.equals("-source")) && i + 1 < args.length) { + javacOpts.add(arg); + javacOpts.add(args[++i]); + } else if (arg.equals(STATS)) { + env.messages.setStatsEnabled(true); + } else if (arg.equals("-bootclasspath") && i + 1 < args.length) { + javacBootClassPath = splitPath(args[++i]); + } else if (arg.equals("-classpath") && i + 1 < args.length) { + javacClassPath = splitPath(args[++i]); + } else if (arg.equals("-cp") && i + 1 < args.length) { + javacClassPath = splitPath(args[++i]); + } else if (arg.equals("-sourcepath") && i + 1 < args.length) { + javacSourcePath = splitPath(args[++i]); + } else if (arg.equals(XMSGS_OPTION)) { + env.messages.setOptions(null); + } else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) { + env.messages.setOptions(arg.substring(arg.indexOf(":") + 1)); + } else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) { + env.setCustomTags(arg.substring(arg.indexOf(":") + 1)); + } else if (arg.startsWith(XHTML_VERSION_PREFIX)) { + String argsVersion = arg.substring(arg.indexOf(":") + 1); + HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion); + if (htmlVersion != null) { + env.setHtmlVersion(htmlVersion); + } else { + throw new BadArgs("dc.bad.value.for.option", arg, argsVersion); + } + } else if (arg.equals("-h") || arg.equals("-help") || arg.equals("--help") + || arg.equals("-?") || arg.equals("-usage")) { + needHelp = true; + } else if (arg.startsWith("-")) { + throw new BadArgs("dc.bad.option", arg); + } else { + while (i < args.length) + javacFiles.add(new File(args[i++])); + } + } + } + + void showHelp(PrintWriter out) { + String msg = localize("dc.main.usage"); + for (String line: msg.split("\n")) + out.println(line); + } + + List<File> splitPath(String path) { + List<File> files = new ArrayList<>(); + for (String f: path.split(File.pathSeparator)) { + if (f.length() > 0) + files.add(new File(f)); + } + return files; + } + + List<File> javacBootClassPath; + List<File> javacClassPath; + List<File> javacSourcePath; + List<String> javacOpts; + List<File> javacFiles; + boolean needHelp = false; + + // </editor-fold> + + // <editor-fold defaultstate="collapsed" desc="javac Plugin"> + + @Override @DefinedBy(Api.COMPILER_TREE) + public String getName() { + return "doclint"; + } + + @Override @DefinedBy(Api.COMPILER_TREE) + public void init(JavacTask task, String... args) { + init(task, args, true); + } + + // </editor-fold> + + // <editor-fold defaultstate="collapsed" desc="Embedding API"> + + public void init(JavacTask task, String[] args, boolean addTaskListener) { + env = new Env(); + env.init(task); + processArgs(env, args); + + checker = new Checker(env); + + if (addTaskListener) { + final DeclScanner ds = new DeclScanner(env) { + @Override + void visitDecl(Tree tree, Name name) { + TreePath p = getCurrentPath(); + DocCommentTree dc = env.trees.getDocCommentTree(p); + + checker.scan(dc, p); + } + }; + + TaskListener tl = new TaskListener() { + @Override @DefinedBy(Api.COMPILER_TREE) + public void started(TaskEvent e) { + switch (e.getKind()) { + case ANALYZE: + CompilationUnitTree tree; + while ((tree = todo.poll()) != null) + ds.scan(tree, null); + break; + } + } + + @Override @DefinedBy(Api.COMPILER_TREE) + public void finished(TaskEvent e) { + switch (e.getKind()) { + case PARSE: + todo.add(e.getCompilationUnit()); + break; + } + } + + Queue<CompilationUnitTree> todo = new LinkedList<>(); + }; + + task.addTaskListener(tl); + } + } + + public void init(DocTrees trees, Elements elements, Types types, String... args) { + env = new Env(); + env.init(trees, elements, types); + processArgs(env, args); + + checker = new Checker(env); + } + + private void processArgs(Env env, String... args) { + for (String arg : args) { + if (arg.equals(XMSGS_OPTION)) { + env.messages.setOptions(null); + } else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) { + env.messages.setOptions(arg.substring(arg.indexOf(":") + 1)); + } else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) { + env.setCustomTags(arg.substring(arg.indexOf(":") + 1)); + } else if (arg.startsWith(XHTML_VERSION_PREFIX)) { + String argsVersion = arg.substring(arg.indexOf(":") + 1); + HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion); + if (htmlVersion != null) { + env.setHtmlVersion(htmlVersion); + } else { + throw new IllegalArgumentException(argsVersion); + } + } else if (arg.startsWith(XCHECK_PACKAGE)) { + env.setCheckPackages(arg.substring(arg.indexOf(":") + 1)); + } else + throw new IllegalArgumentException(arg); + } + } + + public void scan(TreePath p) { + DocCommentTree dc = env.trees.getDocCommentTree(p); + checker.scan(dc, p); + } + + public boolean shouldCheck(CompilationUnitTree unit) { + return env.shouldCheck(unit); + } + + public void reportStats(PrintWriter out) { + env.messages.reportStats(out); + } + + // </editor-fold> + + Env env; + Checker checker; + + public boolean isValidOption(String opt) { + if (opt.equals(XMSGS_OPTION)) + return true; + if (opt.startsWith(XMSGS_CUSTOM_PREFIX)) + return Messages.Options.isValidOptions(opt.substring(XMSGS_CUSTOM_PREFIX.length())); + if (opt.startsWith(XCHECK_PACKAGE)) { + return Env.validatePackages(opt.substring(opt.indexOf(":") + 1)); + } + return false; + } + + private String localize(String code, Object... args) { + Messages m = (env != null) ? env.messages : new Messages(null); + return m.localize(code, args); + } + + // <editor-fold defaultstate="collapsed" desc="DeclScanner"> + + static abstract class DeclScanner extends TreePathScanner<Void, Void> { + final Env env; + + public DeclScanner(Env env) { + this.env = env; + } + + abstract void visitDecl(Tree tree, Name name); + + @Override @DefinedBy(Api.COMPILER_TREE) + public Void visitPackage(PackageTree tree, Void ignore) { + visitDecl(tree, null); + return super.visitPackage(tree, ignore); + } + + @Override @DefinedBy(Api.COMPILER_TREE) + public Void visitClass(ClassTree tree, Void ignore) { + visitDecl(tree, tree.getSimpleName()); + return super.visitClass(tree, ignore); + } + + @Override @DefinedBy(Api.COMPILER_TREE) + public Void visitMethod(MethodTree tree, Void ignore) { + visitDecl(tree, tree.getName()); + return null; + } + + @Override @DefinedBy(Api.COMPILER_TREE) + public Void visitModule(ModuleTree tree, Void ignore) { + visitDecl(tree, null); + return super.visitModule(tree, ignore); + } + + @Override @DefinedBy(Api.COMPILER_TREE) + public Void visitVariable(VariableTree tree, Void ignore) { + visitDecl(tree, tree.getName()); + return super.visitVariable(tree, ignore); + } + + @Override @DefinedBy(Api.COMPILER_TREE) + public Void visitCompilationUnit(CompilationUnitTree node, Void p) { + if (!env.shouldCheck(node)) { + return null; + } + return super.visitCompilationUnit(node, p); + } + + @Override @DefinedBy(Api.COMPILER_TREE) + public Void visitBlock(BlockTree tree, Void ignore) { + return null; + } + + @Override @DefinedBy(Api.COMPILER_TREE) + public Void visitLambdaExpression(LambdaExpressionTree tree, Void ignore) { + return null; + } + + } + + // </editor-fold> + +} diff --git a/src/jdk.compiler/share/classes/com/sun/tools/doclint/Env.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Env.java similarity index 99% rename from src/jdk.compiler/share/classes/com/sun/tools/doclint/Env.java rename to src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Env.java index e13b9436335..321cd708043 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/doclint/Env.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Env.java @@ -23,7 +23,7 @@ * questions. */ -package com.sun.tools.doclint; +package jdk.javadoc.internal.doclint; import java.util.Arrays; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/doclint/HtmlTag.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/HtmlTag.java similarity index 99% rename from src/jdk.compiler/share/classes/com/sun/tools/doclint/HtmlTag.java rename to src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/HtmlTag.java index 32bc9a3a1ea..a5107017da7 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/doclint/HtmlTag.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/HtmlTag.java @@ -23,7 +23,7 @@ * questions. */ -package com.sun.tools.doclint; +package jdk.javadoc.internal.doclint; import java.util.Collections; import java.util.EnumMap; @@ -35,7 +35,7 @@ import com.sun.tools.javac.util.StringUtils; -import static com.sun.tools.doclint.HtmlTag.Attr.*; +import static jdk.javadoc.internal.doclint.HtmlTag.Attr.*; /** * Enum representing HTML tags. diff --git a/src/jdk.compiler/share/classes/com/sun/tools/doclint/HtmlVersion.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/HtmlVersion.java similarity index 97% rename from src/jdk.compiler/share/classes/com/sun/tools/doclint/HtmlVersion.java rename to src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/HtmlVersion.java index cfa40ba30b9..6fadc3ccfd5 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/doclint/HtmlVersion.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/HtmlVersion.java @@ -23,7 +23,7 @@ * questions. */ -package com.sun.tools.doclint; +package jdk.javadoc.internal.doclint; /** * Enum representing HTML version of the documentation comment. diff --git a/src/jdk.compiler/share/classes/com/sun/tools/doclint/Messages.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Messages.java similarity index 99% rename from src/jdk.compiler/share/classes/com/sun/tools/doclint/Messages.java rename to src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Messages.java index 6a5e92c8f0f..a588233df28 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/doclint/Messages.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Messages.java @@ -23,7 +23,7 @@ * questions. */ -package com.sun.tools.doclint; +package jdk.javadoc.internal.doclint; import java.io.PrintWriter; import java.text.MessageFormat; @@ -41,8 +41,8 @@ import com.sun.source.doctree.DocTree; import com.sun.source.tree.Tree; -import com.sun.tools.doclint.Env.AccessKind; import com.sun.tools.javac.util.StringUtils; +import jdk.javadoc.internal.doclint.Env.AccessKind; /** * Message reporting for DocLint. diff --git a/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/resources/doclint.properties similarity index 100% rename from src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint.properties rename to src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/resources/doclint.properties diff --git a/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_ja.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/resources/doclint_ja.properties similarity index 100% rename from src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_ja.properties rename to src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/resources/doclint_ja.properties diff --git a/src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_zh_CN.properties b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/resources/doclint_zh_CN.properties similarity index 100% rename from src/jdk.compiler/share/classes/com/sun/tools/doclint/resources/doclint_zh_CN.properties rename to src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/resources/doclint_zh_CN.properties diff --git a/src/jdk.javadoc/share/classes/module-info.java b/src/jdk.javadoc/share/classes/module-info.java index 5c7ec0c0a63..cd15f00994b 100644 --- a/src/jdk.javadoc/share/classes/module-info.java +++ b/src/jdk.javadoc/share/classes/module-info.java @@ -70,4 +70,7 @@ provides javax.tools.Tool with jdk.javadoc.internal.api.JavadocTool; + + provides com.sun.tools.doclint.DocLint with + jdk.javadoc.internal.doclint.DocLint; } diff --git a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/Env.java b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/Env.java index e5d513f75a7..de8e6877edf 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/Env.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/Env.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -57,8 +57,8 @@ class Env { private static HashMap<String, Value> savedValues = new HashMap<String, Value>(); private static Method atExitMethod; - static void init(String connectSpec, boolean openNow, int flags) { - connection = new VMConnection(connectSpec, flags); + static void init(String connectSpec, boolean openNow, int flags, String extraOptions) { + connection = new VMConnection(connectSpec, flags, extraOptions); if (!connection.isLaunch() || openNow) { connection.open(); } diff --git a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java index 2e57632a3ec..f6bd858d9be 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -1069,8 +1069,8 @@ public static void main(String argv[]) throws MissingResourceException { /* * Here are examples of jdb command lines and how the options * are interpreted as arguments to the program being debugged. - * arg1 arg2 - * ---- ---- + * arg1 arg2 + * ---- ---- * jdb hello a b a b * jdb hello "a b" a b * jdb hello a,b a,b @@ -1107,14 +1107,10 @@ public static void main(String argv[]) throws MissingResourceException { connectSpec); return; } - connectSpec += "options=" + javaArgs + ","; } try { - if (! connectSpec.endsWith(",")) { - connectSpec += ","; // (Bug ID 4285874) - } - Env.init(connectSpec, launchImmediately, traceFlags); + Env.init(connectSpec, launchImmediately, traceFlags, javaArgs); new TTY(); } catch(Exception e) { MessageOutput.printException("Internal exception:", e); diff --git a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/VMConnection.java b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/VMConnection.java index f0f821fe891..b4141e2955d 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/VMConnection.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/VMConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -78,7 +78,8 @@ private Connector findConnector(String name) { return null; } - private Map <String, com.sun.jdi.connect.Connector.Argument> parseConnectorArgs(Connector connector, String argString) { + private Map <String, com.sun.jdi.connect.Connector.Argument> + parseConnectorArgs(Connector connector, String argString, String extraOptions) { Map<String, com.sun.jdi.connect.Connector.Argument> arguments = connector.defaultArguments(); /* @@ -121,10 +122,20 @@ private Map <String, com.sun.jdi.connect.Connector.Argument> parseConnectorArgs( */ if (name.equals("options")) { StringBuilder sb = new StringBuilder(); + if (extraOptions != null) { + sb.append(extraOptions).append(" "); + // set extraOptions to null to avoid appending it again + extraOptions = null; + } for (String s : splitStringAtNonEnclosedWhiteSpace(value)) { + boolean wasEnclosed = false; while (isEnclosed(s, "\"") || isEnclosed(s, "'")) { + wasEnclosed = true; s = s.substring(1, s.length() - 1); } + if (wasEnclosed && hasWhitespace(s)) { + s = "\"" + s + "\""; + } sb.append(s); sb.append(" "); } @@ -150,9 +161,26 @@ private Map <String, com.sun.jdi.connect.Connector.Argument> parseConnectorArgs( throw new IllegalArgumentException (MessageOutput.format("Illegal connector argument", argString)); } + if (extraOptions != null) { + // there was no "options" specified in argString + Connector.Argument argument = arguments.get("options"); + if (argument != null) { + argument.setValue(extraOptions); + } + } return arguments; } + private static boolean hasWhitespace(String string) { + int length = string.length(); + for (int i = 0; i < length; i++) { + if (Character.isWhitespace(string.charAt(i))) { + return true; + } + } + return false; + } + private static boolean isEnclosed(String value, String enclosingChar) { if (value.indexOf(enclosingChar) == 0) { int lastIndex = value.lastIndexOf(enclosingChar); @@ -299,7 +327,7 @@ static private boolean isLastChar(char[] arr, int pos) { return (pos + 1 == arr.length); } - VMConnection(String connectSpec, int traceFlags) { + VMConnection(String connectSpec, int traceFlags, String extraOptions) { String nameString; String argString; int index = connectSpec.indexOf(':'); @@ -317,7 +345,7 @@ static private boolean isLastChar(char[] arr, int pos) { (MessageOutput.format("No connector named:", nameString)); } - connectorArgs = parseConnectorArgs(connector, argString); + connectorArgs = parseConnectorArgs(connector, argString, extraOptions); this.traceFlags = traceFlags; } diff --git a/src/jdk.jdwp.agent/unix/native/libjdwp/linker_md.c b/src/jdk.jdwp.agent/unix/native/libjdwp/linker_md.c index f6dd9f42c60..ba97527f725 100644 --- a/src/jdk.jdwp.agent/unix/native/libjdwp/linker_md.c +++ b/src/jdk.jdwp.agent/unix/native/libjdwp/linker_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -49,11 +49,12 @@ static void dll_build_name(char* buffer, size_t buflen, *buffer = '\0'; paths_copy = jvmtiAllocate((int)strlen(paths) + 1); - strcpy(paths_copy, paths); if (paths_copy == NULL) { return; } + strcpy(paths_copy, paths); + next_token = NULL; path = strtok_r(paths_copy, PATH_SEPARATOR, &next_token); diff --git a/src/jdk.jdwp.agent/windows/native/libjdwp/linker_md.c b/src/jdk.jdwp.agent/windows/native/libjdwp/linker_md.c index 525d8c5778f..6d9319ad812 100644 --- a/src/jdk.jdwp.agent/windows/native/libjdwp/linker_md.c +++ b/src/jdk.jdwp.agent/windows/native/libjdwp/linker_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -46,11 +46,12 @@ static void dll_build_name(char* buffer, size_t buflen, *buffer = '\0'; paths_copy = jvmtiAllocate((int)strlen(paths) + 1); - strcpy(paths_copy, paths); if (paths_copy == NULL) { return; } + strcpy(paths_copy, paths); + next_token = NULL; path = strtok_s(paths_copy, PATH_SEPARATOR, &next_token); diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/JVM.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/JVM.java index 4bfc7cc1f44..c850fcce8a0 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/JVM.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/JVM.java @@ -27,7 +27,7 @@ import java.util.List; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; import jdk.jfr.Event; import jdk.jfr.internal.handlers.EventHandler; @@ -102,7 +102,7 @@ private JVM() { * @return the time, in ticks * */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native long counterTime(); /** @@ -139,7 +139,7 @@ private JVM() { * * @return a unique class identifier */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native long getClassId(Class<?> clazz); // temporary workaround until we solve intrinsics supporting epoch shift tagging @@ -438,7 +438,7 @@ public boolean hasNativeJFR() { * * @return thread local EventWriter */ - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public static native Object getEventWriter(); /** diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/tool/Disassemble.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/tool/Disassemble.java index f6fd0110592..aaa11b64c40 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/tool/Disassemble.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/tool/Disassemble.java @@ -182,19 +182,13 @@ private List<Long> combineChunkSizes(List<Long> sizes, int maxChunks, long maxSi long fileSize = sizes.get(0); for (int i = 1; i < sizes.size(); i++) { long size = sizes.get(i); - if (fileSize + size > maxSize) { + if (fileSize + size > maxSize || chunks == maxChunks) { reduced.add(fileSize); chunks = 1; fileSize = size; continue; } fileSize += size; - if (chunks == maxChunks) { - reduced.add(fileSize); - fileSize = 0; - chunks = 1; - continue; - } chunks++; } if (fileSize != 0) { diff --git a/src/jdk.jlink/linux/classes/jdk/tools/jlink/internal/plugins/StripNativeDebugSymbolsPlugin.java b/src/jdk.jlink/linux/classes/jdk/tools/jlink/internal/plugins/StripNativeDebugSymbolsPlugin.java index 58a32b43857..d2f2307768d 100644 --- a/src/jdk.jlink/linux/classes/jdk/tools/jlink/internal/plugins/StripNativeDebugSymbolsPlugin.java +++ b/src/jdk.jlink/linux/classes/jdk/tools/jlink/internal/plugins/StripNativeDebugSymbolsPlugin.java @@ -45,7 +45,6 @@ import java.util.Optional; import java.util.ResourceBundle; -import jdk.tools.jlink.plugin.Plugin; import jdk.tools.jlink.plugin.PluginException; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; @@ -56,7 +55,7 @@ * libraries and binaries. * */ -public final class StripNativeDebugSymbolsPlugin implements Plugin { +public final class StripNativeDebugSymbolsPlugin extends AbstractPlugin { public static final String NAME = "strip-native-debug-symbols"; private static final boolean DEBUG = Boolean.getBoolean("jlink.debug"); @@ -92,14 +91,10 @@ public StripNativeDebugSymbolsPlugin() { } public StripNativeDebugSymbolsPlugin(ObjCopyCmdBuilder cmdBuilder) { + super(NAME, resourceBundle); this.cmdBuilder = cmdBuilder; } - @Override - public String getName() { - return NAME; - } - @Override public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) { StrippedDebugInfoBinaryBuilder builder = new StrippedDebugInfoBinaryBuilder( @@ -137,10 +132,9 @@ public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) { } private void logError(ResourcePoolEntry resource, String msgKey) { - String msg = PluginsResourceBundle.getMessage(resourceBundle, - msgKey, - NAME, - resource.path()); + String msg = getMessage(msgKey, + NAME, + resource.path()); System.err.println(msg); } @@ -149,23 +143,11 @@ public Category getType() { return Category.TRANSFORMER; } - @Override - public String getDescription() { - String key = NAME + ".description"; - return PluginsResourceBundle.getMessage(resourceBundle, key); - } - @Override public boolean hasArguments() { return true; } - @Override - public String getArgumentsDescription() { - String key = NAME + ".argument"; - return PluginsResourceBundle.getMessage(resourceBundle, key); - } - @Override public void configure(Map<String, String> config) { doConfigure(true, config); @@ -196,8 +178,7 @@ public void doConfigure(boolean withChecks, Map<String, String> orig) { String[] tokens = arg.split("="); if (tokens.length != 2 || !KEEP_DEBUG_INFO_ARG.equals(tokens[0])) { throw new IllegalArgumentException( - PluginsResourceBundle.getMessage(resourceBundle, - NAME + ".iae", NAME, arg)); + getMessage(NAME + ".iae", NAME, arg)); } hasKeepDebugInfo = true; debuginfoExt = tokens[1]; @@ -211,8 +192,7 @@ public void doConfigure(boolean withChecks, Map<String, String> orig) { String[] tokens = arg.split("="); if (tokens.length != 2 || !STRIP_CMD_ARG.equals(tokens[0])) { throw new IllegalArgumentException( - PluginsResourceBundle.getMessage(resourceBundle, - NAME + ".iae", NAME, arg)); + getMessage(NAME + ".iae", NAME, arg)); } if (withChecks) { validateStripArg(tokens[1]); @@ -246,26 +226,23 @@ public void doConfigure(boolean withChecks, Map<String, String> orig) { // on the same plugin instance multiple times. Plugin option can // repeat. throw new IllegalArgumentException( - PluginsResourceBundle.getMessage(resourceBundle, - NAME + ".iae.conflict", - NAME, - EXCLUDE_DEBUG_INFO_ARG, - KEEP_DEBUG_INFO_ARG)); + getMessage(NAME + ".iae.conflict", + NAME, + EXCLUDE_DEBUG_INFO_ARG, + KEEP_DEBUG_INFO_ARG)); } if (!arg.startsWith(STRIP_CMD_ARG) && !arg.startsWith(KEEP_DEBUG_INFO_ARG) && !arg.startsWith(EXCLUDE_DEBUG_INFO_ARG)) { // unknown arg value; case --strip-native-debug-symbols foobar throw new IllegalArgumentException( - PluginsResourceBundle.getMessage(resourceBundle, - NAME + ".iae", NAME, arg)); + getMessage(NAME + ".iae", NAME, arg)); } if (!config.isEmpty()) { // extraneous values; --strip-native-debug-symbols keep-debuginfo-files:foo=bar throw new IllegalArgumentException( - PluginsResourceBundle.getMessage(resourceBundle, - NAME + ".iae", NAME, - config.toString())); + getMessage(NAME + ".iae", NAME, + config.toString())); } includeDebugSymbols = hasKeepDebugInfo; } @@ -275,15 +252,13 @@ private void validateStripArg(String stripArg) throws IllegalArgumentException { Path strip = Paths.get(stripArg); // verify it's a resonable path if (!Files.isExecutable(strip)) { throw new IllegalArgumentException( - PluginsResourceBundle.getMessage(resourceBundle, - NAME + ".invalidstrip", - stripArg)); + getMessage(NAME + ".invalidstrip", + stripArg)); } } catch (InvalidPathException e) { throw new IllegalArgumentException( - PluginsResourceBundle.getMessage(resourceBundle, - NAME + ".invalidstrip", - e.getInput())); + getMessage(NAME + ".invalidstrip", + e.getInput())); } } diff --git a/src/jdk.jlink/linux/classes/jdk/tools/jlink/resources/strip_native_debug_symbols_plugin.properties b/src/jdk.jlink/linux/classes/jdk/tools/jlink/resources/strip_native_debug_symbols_plugin.properties index ccc3205421e..a3784b63d0a 100644 --- a/src/jdk.jlink/linux/classes/jdk/tools/jlink/resources/strip_native_debug_symbols_plugin.properties +++ b/src/jdk.jlink/linux/classes/jdk/tools/jlink/resources/strip_native_debug_symbols_plugin.properties @@ -35,6 +35,24 @@ Strip debug symbols from native libraries (if any). \n\ strip-native-debug-symbols.argument=\ <exclude-debuginfo-files|keep-debuginfo-files|objcopy=/path/to/objcopy> + +strip-native-debug-symbols.usage=\ +\ --strip-native-debug-symbols \ +\ <exclude-debuginfo-files|keep-debuginfo-files|objcopy=PATH_TO_OBJ>\n\ +\ Strip debug symbols from native libraries (if any). \n\ +\ This plugin requires at least one option:\n\ +\ objcopy: The path to the 'objcopy' binary.\n\ +\ Defaults to 'objcopy' in PATH.\n\ +\ exclude-debuginfo-files: Exclude debug info \n\ +\ files. Defaults to true.\n\ +\ keep-debuginfo-files[=<ext>]: Keep debug info\n\ +\ files in <file>.<ext>.\n\ +\ Defaults to <file>.debuginfo \n\ +\ Examples: --strip-native-debug-symbols \n\ +\ keep-debuginfo-files:objcopy=OBJPATH\n\ +\ --strip-native-debug-symbols\n\ +\ exclude-debuginfo-files + strip-native-debug-symbols.invalidstrip=Invalid objcopy command: {0} strip-native-debug-symbols.iae={0}: Unrecognized argument ''{1}'' diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageFileCreator.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageFileCreator.java index 93625f71b82..8ec9c3df61b 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageFileCreator.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImageFileCreator.java @@ -262,14 +262,14 @@ public String getString(int id) { return writer.getString(id); } }); - - for (Archive archive : archives) { - String mn = archive.moduleName(); - entriesForModule.get(mn).stream() - .map(e -> new ArchiveEntryResourcePoolEntry(mn, - e.getResourcePoolEntryName(), e)) + archives.stream() + .map(Archive::moduleName) + .sorted() + .flatMap(mn -> + entriesForModule.get(mn).stream() + .map(e -> new ArchiveEntryResourcePoolEntry(mn, + e.getResourcePoolEntryName(), e))) .forEach(resources::add); - } return resources; } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java index 75f44ef6356..3604e646518 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java @@ -229,7 +229,7 @@ int run(String[] args) { List<String> remaining = optionsHelper.handleOptions(this, args); if (remaining.size() > 0 && !options.suggestProviders) { throw taskHelper.newBadArgs("err.orphan.arguments", - remaining.stream().collect(Collectors.joining(" "))) + remaining.stream().collect(Collectors.joining(" "))) .showUsage(true); } if (options.help) { @@ -259,8 +259,8 @@ int run(String[] args) { } if (options.modulePath.isEmpty()) { - throw taskHelper.newBadArgs("err.modulepath.must.be.specified") - .showUsage(true); + throw taskHelper.newBadArgs("err.modulepath.must.be.specified") + .showUsage(true); } } @@ -275,8 +275,12 @@ int run(String[] args) { } return EXIT_OK; + } catch (FindException e) { + log.println(taskHelper.getMessage("error.prefix") + " " + e.getMessage()); + e.printStackTrace(log); + return EXIT_ERROR; } catch (PluginException | IllegalArgumentException | - UncheckedIOException |IOException | FindException | ResolutionException e) { + UncheckedIOException |IOException | ResolutionException e) { log.println(taskHelper.getMessage("error.prefix") + " " + e.getMessage()); if (DEBUG) { e.printStackTrace(log); diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java index 72694f7184d..0e8dc45b933 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java @@ -30,20 +30,22 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.text.MessageFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Locale; import java.util.Map; +import java.util.HashMap; import java.util.Map.Entry; -import java.util.MissingResourceException; -import java.util.ResourceBundle; import java.util.Set; +import java.util.HashSet; +import java.util.List; +import java.util.ArrayList; +import java.util.Arrays; import java.util.stream.Collectors; import java.util.stream.Stream; +import java.util.Collections; +import java.util.Locale; +import java.util.ResourceBundle; +import java.util.MissingResourceException; +import java.util.Comparator; + import jdk.tools.jlink.builder.DefaultImageBuilder; import jdk.tools.jlink.builder.ImageBuilder; @@ -373,7 +375,7 @@ private void addOrderedPluginOptions(Plugin plugin, = new PluginOption(false, (task, opt, arg) -> { Map<String, String> m = addArgumentMap(plugin); - m.put(DefaultCompressPlugin.NAME, DefaultCompressPlugin.LEVEL_2); + m.put(plugin.getName(), DefaultCompressPlugin.LEVEL_2); }, false, "--compress", "-c"); mainOptions.add(plugOption); } else if (plugin instanceof DefaultStripDebugPlugin) { @@ -386,14 +388,14 @@ private void addOrderedPluginOptions(Plugin plugin, } else if (plugin instanceof ExcludeJmodSectionPlugin) { plugOption = new PluginOption(false, (task, opt, arg) -> { Map<String, String> m = addArgumentMap(plugin); - m.put(ExcludeJmodSectionPlugin.NAME, + m.put(plugin.getName(), ExcludeJmodSectionPlugin.MAN_PAGES); }, false, "--no-man-pages"); mainOptions.add(plugOption); plugOption = new PluginOption(false, (task, opt, arg) -> { Map<String, String> m = addArgumentMap(plugin); - m.put(ExcludeJmodSectionPlugin.NAME, + m.put(plugin.getName(), ExcludeJmodSectionPlugin.INCLUDE_HEADER_FILES); }, false, "--no-header-files"); mainOptions.add(plugOption); @@ -450,8 +452,8 @@ private PluginsConfiguration getPluginsConfig(Path output, Map<String, String> l // aren't being used at the same time. --strip-debug invokes --strip-native-debug-symbols on // platforms that support it, so it makes little sense to allow both at the same time. if ((plugin instanceof DefaultStripDebugPlugin && seenPlugins.contains(STRIP_NATIVE_DEBUG_SYMBOLS_NAME)) || - (STRIP_NATIVE_DEBUG_SYMBOLS_NAME.equals(plugin.getName()) && seenPlugins.contains(DefaultStripDebugPlugin.NAME))) { - throw new BadArgs("err.plugin.conflicts", "--" + DefaultStripDebugPlugin.NAME, + (STRIP_NATIVE_DEBUG_SYMBOLS_NAME.equals(plugin.getName()) && seenPlugins.contains(plugin.getName()))) { + throw new BadArgs("err.plugin.conflicts", "--" + plugin.getName(), "-G", "--" + STRIP_NATIVE_DEBUG_SYMBOLS_NAME); } @@ -606,42 +608,50 @@ public void listPlugins() { List<Plugin> pluginList = PluginRepository. getPlugins(pluginOptions.pluginsLayer); - for (Plugin plugin : Utils.getSortedPlugins(pluginList)) { - showPlugin(plugin, log); - } + pluginList.stream() + .sorted(Comparator.comparing((Plugin plugin) -> plugin.getUsage().isEmpty(), + (Boolean res1, Boolean res2) -> Boolean.compare(res2,res1)) + .thenComparing(Plugin::getName) + ) + .forEach((plugin) -> showPlugin(plugin, log)); log.println("\n" + bundleHelper.getMessage("main.extended.help.footer")); } private void showPlugin(Plugin plugin, PrintWriter log) { if (showsPlugin(plugin)) { - log.println("\n" + bundleHelper.getMessage("main.plugin.name") - + ": " + plugin.getName()); - - // print verbose details for non-builtin plugins - if (!Utils.isBuiltin(plugin)) { - log.println(bundleHelper.getMessage("main.plugin.class") - + ": " + plugin.getClass().getName()); - log.println(bundleHelper.getMessage("main.plugin.module") - + ": " + plugin.getClass().getModule().getName()); - Category category = plugin.getType(); - log.println(bundleHelper.getMessage("main.plugin.category") - + ": " + category.getName()); - log.println(bundleHelper.getMessage("main.plugin.state") - + ": " + plugin.getStateDescription()); - } + if(!plugin.getUsage().isEmpty()) { + log.println(plugin.getUsage()); + } else { + log.println("\n" + bundleHelper.getMessage("main.plugin.name") + + ": " + plugin.getName()); + + // print verbose details for non-builtin plugins + if (!Utils.isBuiltin(plugin)) { + log.println(bundleHelper.getMessage("main.plugin.class") + + ": " + plugin.getClass().getName()); + log.println(bundleHelper.getMessage("main.plugin.module") + + ": " + plugin.getClass().getModule().getName()); + Category category = plugin.getType(); + log.println(bundleHelper.getMessage("main.plugin.category") + + ": " + category.getName()); + log.println(bundleHelper.getMessage("main.plugin.state") + + ": " + plugin.getStateDescription()); + } + + String option = plugin.getOption(); + if (option != null) { + log.println(bundleHelper.getMessage("main.plugin.option") + + ": --" + plugin.getOption() + + (plugin.hasArguments()? ("=" + plugin.getArgumentsDescription()) : "")); + } - String option = plugin.getOption(); - if (option != null) { - log.println(bundleHelper.getMessage("main.plugin.option") - + ": --" + plugin.getOption() - + (plugin.hasArguments()? ("=" + plugin.getArgumentsDescription()) : "")); + // description can be long spanning more than one line and so + // print a newline after description label. + log.println(bundleHelper.getMessage("main.plugin.description") + + ": " + plugin.getDescription()); } - // description can be long spanning more than one line and so - // print a newline after description label. - log.println(bundleHelper.getMessage("main.plugin.description") - + ": " + plugin.getDescription()); } } @@ -725,6 +735,6 @@ public String version(String key) { // Display all plugins private static boolean showsPlugin(Plugin plugin) { - return (!Utils.isDisabled(plugin) && plugin.getOption() != null); + return (!Utils.isDisabled(plugin) && (plugin.getOption() != null) || !(plugin.getUsage().isEmpty())); } } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/AbstractPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/AbstractPlugin.java new file mode 100644 index 00000000000..fd4fdcd39dd --- /dev/null +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/AbstractPlugin.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.tools.jlink.internal.plugins; + +import jdk.tools.jlink.plugin.Plugin; + +import java.util.Locale; +import java.util.MissingResourceException; +import java.util.ResourceBundle; + +public abstract class AbstractPlugin implements Plugin { + + static final String DESCRIPTION = "description"; + static final String USAGE = "usage"; + + private static final ResourceBundle standardPluginsBundle; + + static { + Locale locale = Locale.getDefault(); + try { + standardPluginsBundle = ResourceBundle.getBundle("jdk.tools.jlink." + + "resources.plugins", locale); + } catch (MissingResourceException e) { + throw new InternalError("Cannot find jlink resource bundle for " + + "locale " + locale); + } + } + + private final ResourceBundle pluginsBundle; + private final String name; + + protected AbstractPlugin(String name) { + this.name = name; + this.pluginsBundle = standardPluginsBundle; + } + + protected AbstractPlugin(String name, ResourceBundle bundle) { + this.name = name; + this.pluginsBundle = bundle; + } + @Override + public String getName() { + return name; + } + + @Override + public String getDescription() { + return getMessage(getName() + "." + DESCRIPTION, getName()); + } + + @Override + public String getUsage() { + return getMessage(getName() + "." + USAGE, getName()); + } + + @Override + public String getArgumentsDescription() { + return PluginsResourceBundle.getArgument(getName()); + } + + protected String getMessage(String key, Object...args) { + return PluginsResourceBundle.getMessage(this.pluginsBundle, key, args); + } +} diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/AddResourcePlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/AddResourcePlugin.java index fd9ad8176ce..f7de6151826 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/AddResourcePlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/AddResourcePlugin.java @@ -29,7 +29,6 @@ import java.util.Map; import java.util.function.Function; -import jdk.tools.jlink.plugin.Plugin; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; import jdk.tools.jlink.plugin.ResourcePoolEntry; @@ -37,27 +36,16 @@ /** * Base plugin to add a resource */ -abstract class AddResourcePlugin implements Plugin { +abstract class AddResourcePlugin extends AbstractPlugin { - private final String name; private final String path; private String value; - protected AddResourcePlugin(String n, String p) { - name = n; + protected AddResourcePlugin(String name, String p) { + super(name); path = p; } - @Override - public String getName() { - return name; - } - - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(name); - } - @Override public Category getType() { return Category.ADDER; @@ -73,14 +61,10 @@ public boolean hasRawArgument() { return true; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(name); - } @Override public void configure(Map<String, String> config) { - var v = config.get(name); + var v = config.get(getName()); if (v == null) throw new AssertionError(); value = v; diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultCompressPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultCompressPlugin.java index 69add478c18..ff263aca56e 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultCompressPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultCompressPlugin.java @@ -30,7 +30,6 @@ import jdk.tools.jlink.internal.ResourcePoolManager.ResourcePoolImpl; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; -import jdk.tools.jlink.plugin.Plugin; import jdk.tools.jlink.internal.ImagePluginStack; import jdk.tools.jlink.internal.ResourcePoolManager; import jdk.tools.jlink.internal.ResourcePrevisitor; @@ -40,8 +39,7 @@ * * ZIP and String Sharing compression plugin */ -public final class DefaultCompressPlugin implements Plugin, ResourcePrevisitor { - public static final String NAME = "compress"; +public final class DefaultCompressPlugin extends AbstractPlugin implements ResourcePrevisitor { public static final String FILTER = "filter"; public static final String LEVEL_0 = "0"; public static final String LEVEL_1 = "1"; @@ -50,9 +48,8 @@ public final class DefaultCompressPlugin implements Plugin, ResourcePrevisitor { private StringSharingPlugin ss; private ZipPlugin zip; - @Override - public String getName() { - return NAME; + public DefaultCompressPlugin() { + super("compress"); } @Override @@ -83,25 +80,15 @@ public Category getType() { return Category.COMPRESSOR; } - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); - } - @Override public boolean hasArguments() { return true; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(NAME); - } - @Override public void configure(Map<String, String> config) { ResourceFilter resFilter = ResourceFilter.includeFilter(config.get(FILTER)); - String level = config.get(NAME); + String level = config.get(getName()); if (level != null) { switch (level) { case LEVEL_0: diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultStripDebugPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultStripDebugPlugin.java index a2ffc14dec0..e497083cc94 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultStripDebugPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultStripDebugPlugin.java @@ -39,9 +39,8 @@ * symbols. * */ -public final class DefaultStripDebugPlugin implements Plugin { +public final class DefaultStripDebugPlugin extends AbstractPlugin { - public static final String NAME = "strip-debug"; private static final String STRIP_NATIVE_DEBUG_PLUGIN = "strip-native-debug-symbols"; private static final String EXCLUDE_DEBUGINFO = "exclude-debuginfo-files"; @@ -55,20 +54,11 @@ public DefaultStripDebugPlugin() { public DefaultStripDebugPlugin(Plugin javaStripPlugin, NativePluginFactory nativeStripPluginFact) { + super("strip-debug"); this.javaStripPlugin = javaStripPlugin; this.stripNativePluginFactory = nativeStripPluginFact; } - @Override - public String getName() { - return NAME; - } - - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); - } - @Override public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) { Plugin stripNativePlugin = stripNativePluginFactory.create(); diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeFilesPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeFilesPlugin.java index d263d1b8bf3..d9f2fc9744e 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeFilesPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeFilesPlugin.java @@ -26,7 +26,7 @@ import java.util.Map; import java.util.function.Predicate; -import jdk.tools.jlink.plugin.Plugin; + import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; import jdk.tools.jlink.plugin.ResourcePoolEntry; @@ -35,14 +35,12 @@ * * Exclude files plugin */ -public final class ExcludeFilesPlugin implements Plugin { +public final class ExcludeFilesPlugin extends AbstractPlugin { - public static final String NAME = "exclude-files"; private Predicate<String> predicate; - @Override - public String getName() { - return NAME; + public ExcludeFilesPlugin () { + super("exclude-files"); } @Override @@ -61,23 +59,13 @@ public Category getType() { return Category.FILTER; } - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); - } - @Override public boolean hasArguments() { return true; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(NAME); - } - @Override public void configure(Map<String, String> config) { - predicate = ResourceFilter.excludeFilter(config.get(NAME)); + predicate = ResourceFilter.excludeFilter(config.get(getName())); } } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeJmodSectionPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeJmodSectionPlugin.java index e38032a0745..d86e1d1267e 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeJmodSectionPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeJmodSectionPlugin.java @@ -28,7 +28,6 @@ import java.util.Map; import java.util.Set; -import jdk.tools.jlink.plugin.Plugin; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; import jdk.tools.jlink.plugin.ResourcePoolEntry.Type; @@ -37,22 +36,20 @@ * * A plugin to exclude a JMOD section such as man pages or header files */ -public final class ExcludeJmodSectionPlugin implements Plugin { +public final class ExcludeJmodSectionPlugin extends AbstractPlugin { - public static final String NAME = "exclude-jmod-section"; public static final String MAN_PAGES = "man"; public static final String INCLUDE_HEADER_FILES = "headers"; private final Set<Type> filters = new HashSet<>(); - @Override - public String getName() { - return NAME; + public ExcludeJmodSectionPlugin() { + super("exclude-jmod-section"); } @Override public void configure(Map<String, String> config) { - String arg = config.get(NAME); + String arg = config.get(getName()); if (arg.isEmpty()) { throw new IllegalArgumentException("Section name must be specified"); } @@ -86,18 +83,9 @@ public Category getType() { return Category.FILTER; } - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); - } - @Override public boolean hasArguments() { return true; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(NAME); - } } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludePlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludePlugin.java index 0e6ef944cc8..c41bb9b6a5d 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludePlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludePlugin.java @@ -26,7 +26,7 @@ import java.util.Map; import java.util.function.Predicate; -import jdk.tools.jlink.plugin.Plugin; + import jdk.tools.jlink.plugin.PluginException; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; @@ -36,14 +36,13 @@ * * Exclude resources plugin */ -public final class ExcludePlugin implements Plugin { +public final class ExcludePlugin extends AbstractPlugin { - public static final String NAME = "exclude-resources"; private Predicate<String> predicate; - @Override - public String getName() { - return NAME; + + public ExcludePlugin() { + super("exclude-resources"); } @Override @@ -63,21 +62,11 @@ public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) { return out.build(); } - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); - } - @Override public boolean hasArguments() { return true; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(NAME); - } - @Override public Category getType() { return Category.FILTER; @@ -85,6 +74,6 @@ public Category getType() { @Override public void configure(Map<String, String> config) { - predicate = ResourceFilter.excludeFilter(config.get(NAME)); + predicate = ResourceFilter.excludeFilter(config.get(getName())); } } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java index 9526f8144a5..b2a759a0ad4 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java @@ -37,7 +37,6 @@ import java.util.stream.Collectors; import jdk.tools.jlink.internal.Platform; -import jdk.tools.jlink.plugin.Plugin; import jdk.tools.jlink.plugin.PluginException; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; @@ -48,7 +47,7 @@ * * Exclude VM plugin */ -public final class ExcludeVMPlugin implements Plugin { +public final class ExcludeVMPlugin extends AbstractPlugin { private static final class JvmComparator implements Comparator<Jvm> { @@ -80,7 +79,6 @@ private int getEfficience() { private static final String JVM_CFG = "jvm.cfg"; - public static final String NAME = "vm"; private static final String ALL = "all"; private static final String CLIENT = "client"; private static final String SERVER = "server"; @@ -90,9 +88,8 @@ private int getEfficience() { private Jvm target; private boolean keepAll; - @Override - public String getName() { - return NAME; + public ExcludeVMPlugin() { + super("vm"); } /** @@ -172,24 +169,14 @@ public Category getType() { return Category.FILTER; } - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); - } - @Override public boolean hasArguments() { return true; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(NAME); - } - @Override public void configure(Map<String, String> config) { - String value = config.get(NAME); + String value = config.get(getName()); String exclude = ""; switch (value) { case ALL: { diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java index 41a3ecac99f..dcc9c3acdea 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java @@ -37,7 +37,6 @@ import jdk.internal.access.JavaLangInvokeAccess; import jdk.internal.access.SharedSecrets; -import jdk.tools.jlink.plugin.Plugin; import jdk.tools.jlink.plugin.PluginException; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; @@ -61,11 +60,8 @@ * feeding that into jlink using {@code --generate-jli-classes=@trace_file} can * help improve startup time. */ -public final class GenerateJLIClassesPlugin implements Plugin { +public final class GenerateJLIClassesPlugin extends AbstractPlugin { - private static final String NAME = "generate-jli-classes"; - - private static final String DESCRIPTION = PluginsResourceBundle.getDescription(NAME); private static final String DEFAULT_TRACE_FILE = "default_jli_trace.txt"; @@ -76,16 +72,7 @@ public final class GenerateJLIClassesPlugin implements Plugin { private Stream<String> traceFileStream; public GenerateJLIClassesPlugin() { - } - - @Override - public String getName() { - return NAME; - } - - @Override - public String getDescription() { - return DESCRIPTION; + super("generate-jli-classes"); } @Override @@ -98,14 +85,9 @@ public boolean hasArguments() { return true; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(NAME); - } - @Override public void configure(Map<String, String> config) { - mainArgument = config.get(NAME); + mainArgument = config.get(getName()); } public void initialize(ResourcePool in) { diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/IncludeLocalesPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/IncludeLocalesPlugin.java index 99635d988d4..8d327530d91 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/IncludeLocalesPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/IncludeLocalesPlugin.java @@ -48,7 +48,6 @@ import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; import jdk.tools.jlink.plugin.ResourcePoolEntry; -import jdk.tools.jlink.plugin.Plugin; import sun.util.cldr.CLDRBaseLocaleDataMetaInfo; import sun.util.locale.provider.LocaleProviderAdapter; import sun.util.locale.provider.LocaleProviderAdapter.Type; @@ -76,9 +75,8 @@ * start with at least one white space character, e.g., " ar ar-EG ..." * ^ */ -public final class IncludeLocalesPlugin implements Plugin, ResourcePrevisitor { +public final class IncludeLocalesPlugin extends AbstractPlugin implements ResourcePrevisitor { - public static final String NAME = "include-locales"; private static final String MODULENAME = "jdk.localedata"; private static final Set<String> LOCALEDATA_PACKAGES = Set.of( "sun.text.resources.cldr.ext", @@ -147,9 +145,8 @@ public final class IncludeLocalesPlugin implements Plugin, ResourcePrevisitor { private static final Locale noNONY = new Locale("no", "NO", "NY"); private static final Locale thTHTH = new Locale("th", "TH", "TH"); - @Override - public String getName() { - return NAME; + public IncludeLocalesPlugin() { + super("include-locales"); } @Override @@ -180,30 +177,20 @@ public Category getType() { return Category.FILTER; } - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); - } - @Override public boolean hasArguments() { return true; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(NAME); - } - @Override public void configure(Map<String, String> config) { - userParam = config.get(NAME); + userParam = config.get(getName()); try { priorityList = Locale.LanguageRange.parse(userParam, EQUIV_MAP); } catch (IllegalArgumentException iae) { throw new IllegalArgumentException(String.format( - PluginsResourceBundle.getMessage(NAME + ".invalidtag"), + PluginsResourceBundle.getMessage(getName() + ".invalidtag"), iae.getMessage().replaceFirst("^range=", ""))); } } @@ -218,7 +205,7 @@ public void previsit(ResourcePool resources, StringTable strings) { ResourcePoolModule module = optMod.get(); Set<String> packages = module.packages(); if (!packages.containsAll(LOCALEDATA_PACKAGES)) { - throw new PluginException(PluginsResourceBundle.getMessage(NAME + ".missingpackages") + + throw new PluginException(PluginsResourceBundle.getMessage(getName()+ ".missingpackages") + LOCALEDATA_PACKAGES.stream() .filter(pn -> !packages.contains(pn)) .collect(Collectors.joining(",\n\t"))); @@ -235,14 +222,14 @@ public void previsit(ResourcePool resources, StringTable strings) { .collect(Collectors.toList()); } else { // jdk.localedata is not added. - throw new PluginException(PluginsResourceBundle.getMessage(NAME + ".localedatanotfound")); + throw new PluginException(PluginsResourceBundle.getMessage(getName() + ".localedatanotfound")); } filtered = filterLocales(available); if (filtered.isEmpty()) { throw new PluginException( - String.format(PluginsResourceBundle.getMessage(NAME + ".nomatchinglocales"), userParam)); + String.format(PluginsResourceBundle.getMessage(getName() + ".nomatchinglocales"), userParam)); } List<String> value = Stream.concat( diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/LegalNoticeFilePlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/LegalNoticeFilePlugin.java index 4cf5b0c6186..5b6c23a6563 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/LegalNoticeFilePlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/LegalNoticeFilePlugin.java @@ -36,7 +36,6 @@ import jdk.tools.jlink.internal.ModuleSorter; import jdk.tools.jlink.internal.Utils; -import jdk.tools.jlink.plugin.Plugin; import jdk.tools.jlink.plugin.PluginException; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; @@ -52,18 +51,16 @@ * On platform that does not support symbolic links, a file * will be created to contain the path to the linked target. */ -public final class LegalNoticeFilePlugin implements Plugin { +public final class LegalNoticeFilePlugin extends AbstractPlugin { - private static final String NAME = "dedup-legal-notices"; private static final String ERROR_IF_NOT_SAME_CONTENT = "error-if-not-same-content"; private final Map<String, List<ResourcePoolEntry>> licenseOrNotice = new HashMap<>(); private boolean errorIfNotSameContent = false; - @Override - public String getName() { - return NAME; + public LegalNoticeFilePlugin() { + super("dedup-legal-notices"); } @Override @@ -73,12 +70,12 @@ public Set<State> getState() { @Override public void configure(Map<String, String> config) { - String arg = config.get(NAME); + String arg = config.get(getName()); if (arg != null) { if (arg.equals(ERROR_IF_NOT_SAME_CONTENT)) { errorIfNotSameContent = true; } else { - throw new IllegalArgumentException(NAME + ": " + arg); + throw new IllegalArgumentException(getName() + ": " + arg); } } } @@ -140,18 +137,8 @@ public Category getType() { return Category.TRANSFORMER; } - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); - } - @Override public boolean hasArguments() { return true; } - - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(NAME); - } } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/OrderResourcesPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/OrderResourcesPlugin.java index 7cbc15818fb..81d06f3e576 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/OrderResourcesPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/OrderResourcesPlugin.java @@ -37,7 +37,6 @@ import java.util.function.ToIntFunction; import jdk.tools.jlink.internal.Utils; -import jdk.tools.jlink.plugin.Plugin; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; import jdk.tools.jlink.plugin.ResourcePoolEntry; @@ -46,23 +45,18 @@ * * Order Resources plugin */ -public final class OrderResourcesPlugin implements Plugin { - public static final String NAME = "order-resources"; +public final class OrderResourcesPlugin extends AbstractPlugin { private static final FileSystem JRT_FILE_SYSTEM = Utils.jrtFileSystem(); private final List<ToIntFunction<String>> filters; private final Map<String, Integer> orderedPaths; public OrderResourcesPlugin() { + super("order-resources"); this.filters = new ArrayList<>(); this.orderedPaths = new HashMap<>(); } - @Override - public String getName() { - return NAME; - } - static class SortWrapper { private final ResourcePoolEntry resource; private final int ordinal; @@ -148,24 +142,14 @@ public Category getType() { return Category.SORTER; } - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); - } - @Override public boolean hasArguments() { return true; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(NAME); - } - @Override public void configure(Map<String, String> config) { - List<String> patterns = Utils.parseList(config.get(NAME)); + List<String> patterns = Utils.parseList(config.get(getName())); int ordinal = 0; for (String pattern : patterns) { diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/PluginsResourceBundle.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/PluginsResourceBundle.java index 09ed1530612..4d1eb46b4ff 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/PluginsResourceBundle.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/PluginsResourceBundle.java @@ -33,6 +33,7 @@ public final class PluginsResourceBundle { static final String DESCRIPTION = "description"; static final String ARGUMENT = "argument"; + static final String USAGE = "usage"; private static final ResourceBundle pluginsBundle; static { @@ -57,6 +58,10 @@ public static String getDescription(String name) { return getMessage(name + "." + DESCRIPTION, name); } + public static String getUsage(String name) { + return getMessage(name + "." + USAGE, name); + } + public static String getOption(String name, String option) { return getMessage(name + "." + option); } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ReleaseInfoPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ReleaseInfoPlugin.java index b0be07116fc..30edf916a2c 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ReleaseInfoPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ReleaseInfoPlugin.java @@ -44,30 +44,22 @@ import jdk.tools.jlink.plugin.ResourcePoolBuilder; import jdk.tools.jlink.plugin.ResourcePoolEntry; import jdk.tools.jlink.plugin.ResourcePoolModule; -import jdk.tools.jlink.plugin.Plugin; /** * This plugin adds/deletes information for 'release' file. */ -public final class ReleaseInfoPlugin implements Plugin { +public final class ReleaseInfoPlugin extends AbstractPlugin { // option name - public static final String NAME = "release-info"; public static final String KEYS = "keys"; private final Map<String, String> release = new HashMap<>(); - @Override - public Category getType() { - return Category.METAINFO_ADDER; - } - - @Override - public String getName() { - return NAME; + public ReleaseInfoPlugin() { + super("release-info"); } @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); + public Category getType() { + return Category.METAINFO_ADDER; } @Override @@ -80,14 +72,9 @@ public boolean hasArguments() { return true; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(NAME); - } - @Override public void configure(Map<String, String> config) { - String operation = config.get(NAME); + String operation = config.get(getName()); if (operation == null) { return; } @@ -101,7 +88,7 @@ public void configure(Map<String, String> config) { // and put whatever value that was passed in command line. config.keySet().stream() - .filter(s -> !NAME.equals(s)) + .filter(s -> !getName().equals(s)) .forEach(s -> release.put(s, config.get(s))); } break; diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StringSharingPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StringSharingPlugin.java index d2967fe21e0..737e85cfa68 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StringSharingPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StringSharingPlugin.java @@ -56,7 +56,6 @@ import jdk.internal.jimage.decompressor.SignatureParser; import jdk.internal.jimage.decompressor.StringSharingDecompressor; import jdk.tools.jlink.internal.ResourcePoolManager.ResourcePoolImpl; -import jdk.tools.jlink.plugin.Plugin; import jdk.tools.jlink.plugin.PluginException; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; @@ -70,9 +69,7 @@ * A Plugin that stores the image classes constant pool UTF_8 entries into the * Image StringsTable. */ -public class StringSharingPlugin implements Plugin, ResourcePrevisitor { - - public static final String NAME = "compact-cp"; +public class StringSharingPlugin extends AbstractPlugin implements ResourcePrevisitor { private static final int[] SIZES; @@ -340,6 +337,7 @@ public StringSharingPlugin() { } StringSharingPlugin(Predicate<String> predicate) { + super("compact-cp"); this.predicate = predicate; } @@ -370,29 +368,14 @@ public ResourcePool transform(ResourcePool in, ResourcePoolBuilder result) { return result.build(); } - @Override - public String getName() { - return NAME; - } - - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); - } - @Override public boolean hasArguments() { return true; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(NAME); - } - @Override public void configure(Map<String, String> config) { - predicate = ResourceFilter.includeFilter(config.get(NAME)); + predicate = ResourceFilter.includeFilter(config.get(getName())); } @Override diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StripJavaDebugAttributesPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StripJavaDebugAttributesPlugin.java index 4ed09aedbbe..c7c39799921 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StripJavaDebugAttributesPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StripJavaDebugAttributesPlugin.java @@ -28,7 +28,6 @@ import jdk.internal.org.objectweb.asm.ClassReader; import jdk.internal.org.objectweb.asm.ClassWriter; -import jdk.tools.jlink.plugin.Plugin; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; import jdk.tools.jlink.plugin.ResourcePoolEntry; @@ -37,8 +36,7 @@ * * Strip java debug attributes plugin */ -public final class StripJavaDebugAttributesPlugin implements Plugin { - public static final String NAME = "strip-java-debug-attributes"; +public final class StripJavaDebugAttributesPlugin extends AbstractPlugin { private final Predicate<String> predicate; public StripJavaDebugAttributesPlugin() { @@ -46,19 +44,10 @@ public StripJavaDebugAttributesPlugin() { } StripJavaDebugAttributesPlugin(Predicate<String> predicate) { + super("strip-java-debug-attributes"); this.predicate = predicate; } - @Override - public String getName() { - return NAME; - } - - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); - } - @Override public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) { //remove *.diz files as well as debug attributes. diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StripNativeCommandsPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StripNativeCommandsPlugin.java index 143b36d4859..4bcb7d1ff04 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StripNativeCommandsPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StripNativeCommandsPlugin.java @@ -27,19 +27,15 @@ import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; import jdk.tools.jlink.plugin.ResourcePoolEntry; -import jdk.tools.jlink.plugin.Plugin; /** * * Strip Native Commands plugin */ -public final class StripNativeCommandsPlugin implements Plugin { +public final class StripNativeCommandsPlugin extends AbstractPlugin { - public static final String NAME = "strip-native-commands"; - - @Override - public String getName() { - return NAME; + public StripNativeCommandsPlugin() { + super("strip-native-commands"); } @Override @@ -55,9 +51,4 @@ public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) { return out.build(); } - - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); - } } diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java index 784851cac6a..a1a1836f87f 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java @@ -78,7 +78,6 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; import jdk.tools.jlink.internal.ModuleSorter; -import jdk.tools.jlink.plugin.Plugin; import jdk.tools.jlink.plugin.PluginException; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; @@ -97,10 +96,7 @@ * @see jdk.internal.module.SystemModules */ -public final class SystemModulesPlugin implements Plugin { - private static final String NAME = "system-modules"; - private static final String DESCRIPTION = - PluginsResourceBundle.getDescription(NAME); +public final class SystemModulesPlugin extends AbstractPlugin { private static final String SYSTEM_MODULES_MAP_CLASS = "jdk/internal/module/SystemModulesMap"; private static final String SYSTEM_MODULES_CLASS_PREFIX = @@ -113,19 +109,10 @@ public final class SystemModulesPlugin implements Plugin { private boolean enabled; public SystemModulesPlugin() { + super("system-modules"); this.enabled = true; } - @Override - public String getName() { - return NAME; - } - - @Override - public String getDescription() { - return DESCRIPTION; - } - @Override public Set<State> getState() { return enabled ? EnumSet.of(State.AUTO_ENABLED, State.FUNCTIONAL) @@ -137,23 +124,18 @@ public boolean hasArguments() { return true; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(NAME); - } - @Override public void configure(Map<String, String> config) { - String arg = config.get(NAME); + String arg = config.get(getName()); if (arg != null) { - throw new IllegalArgumentException(NAME + ": " + arg); + throw new IllegalArgumentException(getName() + ": " + arg); } } @Override public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) { if (!enabled) { - throw new PluginException(NAME + " was set"); + throw new PluginException(getName() + " was set"); } // validate, transform (if needed), and add the module-info.class files diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/VersionPropsPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/VersionPropsPlugin.java index cafaafc5001..8c1c8374faf 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/VersionPropsPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/VersionPropsPlugin.java @@ -32,7 +32,6 @@ import jdk.internal.org.objectweb.asm.ClassWriter; import jdk.internal.org.objectweb.asm.MethodVisitor; import jdk.internal.org.objectweb.asm.Opcodes; -import jdk.tools.jlink.plugin.Plugin; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; import jdk.tools.jlink.plugin.ResourcePoolEntry; @@ -45,12 +44,11 @@ * We assume that the initialization code only has ldcs, method calls and * field instructions. */ -abstract class VersionPropsPlugin implements Plugin { +abstract class VersionPropsPlugin extends AbstractPlugin { private static final String VERSION_PROPS_CLASS = "/java.base/java/lang/VersionProps.class"; - private final String name; private final String field; private String value; @@ -59,8 +57,8 @@ abstract class VersionPropsPlugin implements Plugin { * @param option The option name */ protected VersionPropsPlugin(String field, String option) { + super(option); this.field = field; - this.name = option; } /** @@ -73,16 +71,6 @@ protected VersionPropsPlugin(String field) { this(field, field.toLowerCase().replace('_', '-')); } - @Override - public String getName() { - return name; - } - - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(name); - } - @Override public Category getType() { return Category.TRANSFORMER; @@ -98,14 +86,9 @@ public boolean hasRawArgument() { return true; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(name); - } - @Override public void configure(Map<String, String> config) { - var v = config.get(name); + var v = config.get(getName()); if (v == null) throw new AssertionError(); value = v; diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ZipPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ZipPlugin.java index 5f8598fdc05..c733392690b 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ZipPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ZipPlugin.java @@ -36,19 +36,17 @@ import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.ResourcePoolBuilder; import jdk.tools.jlink.plugin.ResourcePoolEntry; -import jdk.tools.jlink.plugin.Plugin; /** * * ZIP Compression plugin */ -public final class ZipPlugin implements Plugin { +public final class ZipPlugin extends AbstractPlugin { - public static final String NAME = "zip"; private Predicate<String> predicate; public ZipPlugin() { - + this((Predicate<String>) null); } ZipPlugin(String[] patterns) { @@ -56,37 +54,23 @@ public ZipPlugin() { } ZipPlugin(Predicate<String> predicate) { + super("zip"); this.predicate = predicate; } - @Override - public String getName() { - return NAME; - } - @Override public Category getType() { return Category.COMPRESSOR; } - @Override - public String getDescription() { - return PluginsResourceBundle.getDescription(NAME); - } - @Override public boolean hasArguments() { return false; } - @Override - public String getArgumentsDescription() { - return PluginsResourceBundle.getArgument(NAME); - } - @Override public void configure(Map<String, String> config) { - predicate = ResourceFilter.includeFilter(config.get(NAME)); + predicate = ResourceFilter.includeFilter(config.get(getName())); } static byte[] compress(byte[] bytesIn) { diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/plugin/Plugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/plugin/Plugin.java index 0c46c030b04..5abedddffaa 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/plugin/Plugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/plugin/Plugin.java @@ -124,6 +124,14 @@ public default String getDescription() { return ""; } + /** + * The plugin usage for printing to console. + * @return The usage. + */ + public default String getUsage() { + return ""; + } + /** * The option that identifies this plugin. This may be null. * "--" is prefixed to the String (when non-null) when invoking diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties index e993657e330..d49dd1d38bd 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties @@ -30,6 +30,11 @@ Prepend the specified <options> string, which may include\n\ whitespace, before any other options when invoking the virtual machine\n\ in the resulting image. +add-options.usage=\ +\ --add-options <options> Prepend the specified <options> string, which may\n\ +\ include whitespace, before any other options when\n\ +\ invoking the virtual machine in the resulting image. + release-info.argument=<file>|add:<key1>=<value1>:<key2>=<value2>:...|del:<key list> release-info.description=\ @@ -38,11 +43,22 @@ add: is to add properties to the 'release' file.\n\ Any number of <key>=<value> pairs can be passed.\n\ del: is to delete the list of keys in release file. +release-info.usage=\ +\ --release-info <file>|add:<key1>=<value1>:<key2>=<value2>:...|del:<key list>\n\ +\ <file> option is to load release properties from\n\ +\ the supplied file.\n\ +\ add: is to add properties to the 'release' file.\n\ +\ Any number of <key>=<value> pairs can be passed.\n\ +\ del: is to delete the list of keys in release file. + class-for-name.argument= class-for-name.description=\ Class optimization: convert Class.forName calls to constant loads. +class-for-name.usage=\ +\ --class-for-name Class optimization: convert Class.forName calls to constant loads. + compress.argument=<0|1|2>[:filter=<pattern-list>] compress.description=\ @@ -53,12 +69,29 @@ Level 2: ZIP.\n\ An optional <pattern-list> filter can be specified to list the pattern of\n\ files to be included. +compress.usage=\ +\ --compress <0|1|2>[:filter=<pattern-list>]\n\ +\ Compress all resources in the output image.\n\ +\ Level 0: No compression\n\ +\ Level 1: Constant string sharing\n\ +\ Level 2: ZIP.\n\ +\ An optional <pattern-list> filter can be\n\ +\ specified to list the pattern of \n\ +\ files to be included. + compact-cp.argument=<resource paths> compact-cp.description=Constant Pool strings sharing.\n\ By default, all resources are compressed. You can express the set \n\ of resources to compress or not compress (use ^ for negation). +compact-cp.usage=\ +\ --compact-cp <resource paths>\n\ +\ Constant Pool strings sharing.\n\ +\ By default, all resources are compressed.\n\ +\ You can express the set of resources to\n\ +\ compress or not compress (use ^ for negation). + dedup-legal-notices.argument=[error-if-not-same-content] dedup-legal-notices.description=\ @@ -66,22 +99,44 @@ De-duplicate all legal notices. If error-if-not-same-content is\n\ specified then it will be an error if two files of the same filename\n\ are different. +dedup-legal-notices.usage=\ +\ --dedup-legal-notices [error-if-not-same-content]\n\ +\ De-duplicate all legal notices.\n\ +\ If error-if-not-same-content is specified then\n\ +\ it will be an error if two files of the same\n\ +\ filename are different. + exclude-files.argument=<pattern-list> of files to exclude exclude-files.description=\ Specify files to exclude. e.g.: **.java,glob:/java.base/lib/client/** +exclude-files.usage=\ +\ --exclude-files <pattern-list>\n\ +\ Specify files to exclude.\n\ +\ e.g.: **.java,glob:/java.base/lib/client/** + exclude-resources.argument=<pattern-list> resources to exclude exclude-resources.description=\ Specify resources to exclude. e.g.: **.jcov,glob:**/META-INF/** +exclude-resources.usage=\ +\ --exclude-resources <pattern-list>\n\ +\ Specify resources to exclude.\n\ +\ e.g.: **.jcov,glob:**/META-INF/** + exclude-jmod-section.argument=<section-name>\n\ where <section-name> is \"man\" or \"headers". exclude-jmod-section.description=\ Specify a JMOD section to exclude +exclude-jmod-section.usage=\ +\ --exclude-jmod-section <section-name>\n\ +\ Specify a JMOD section to exclude.\n\ +\ Where <section-name> is \"man\" or \"headers\". + generate-jli-classes.argument=@filename generate-jli-classes.description=\ @@ -91,10 +146,25 @@ If this plugin runs on a different runtime version than the image being \n\ created then code generation will be disabled by default to guarantee \n\ correctness - add ignore-version=true to override this. +generate-jli-classes.usage=\ +\ --generate-jli-classes @filename\n\ +\ Specify a file listing the java.lang.invoke\n\ +\ classes to pre-generate. By default, this plugin\n\ +\ may use a builtin list of classes to pre-generate.\n\ +\ If this plugin runs on a different runtime version\n\ +\ than the image being created then code generation\n\ +\ will be disabled by default to guarantee \n\ +\ correctness add ignore-version=true\n\ +\ to override this. + system-modules.argument=retainModuleTarget system-modules.description=Fast loading of module descriptors (always enabled) +system-modules.usage=\ +\ --system-modules retainModuleTarget\n\ +\ Fast loading of module descriptors (always enabled) + onoff.argument=<on|off> order-resources.argument=<pattern-list> of paths in priority order. If a @file\n\ @@ -103,42 +173,87 @@ is specified, then each line should be an exact match for the path to be ordered order-resources.description=\ Order resources. e.g.: **/module-info.class,@classlist,/java.base/java/lang/** +order-resources.usage=\ +\ --order-resources <pattern-list>\n\ +\ Order resources. \n\ +\ e.g.: **/module-info.class,@classlist,\n\ +\ /java.base/java/lang/** + strip-debug.description=\ Strip debug information from the output image +strip-debug.usage=\ +\ --strip-debug Strip debug information from the output image + strip-java-debug-attributes.description=\ Strip Java debug attributes from classes in the output image +strip-java-debug-attributes.usage=\ +\ --strip-java-debug-attributes \n\ +\ Strip Java debug attributes from\n\ +\ classes in the output image + strip-native-commands.description=\ Exclude native commands (such as java/java.exe) from the image +strip-native-commands.usage=\ +\ --strip-native-commands Exclude native commands (such as java/java.exe)\n\ +\ from the image. + vendor-version.argument=<vendor-version> vendor-version.description=\ Override the vendor version string baked into the build, if any.\n\ The value of the system property "java.vendor.version" will be <vendor-version>. +vendor-version.usage=\ +\ --vendor-version <vendor-version>\n\ +\ Override the vendor version string baked into the\n\ +\ build,if any. The value of the system property\n\ +\ "java.vendor.version" will be <vendor-version>. + vendor-bug-url.argument=<vendor-bug-url> vendor-bug-url.description=\ Override the vendor bug URL baked into the build. The value\n\ of the system property "java.vendor.url.bug" will be <vendor-url-bug>. +vendor-bug-url.usage=\ +\ --vendor-bug-url <vendor-bug-url>\n\ +\ Override the vendor bug URL baked into the build.\n\ +\ The value of the system property\n\ +\ "java.vendor.url.bug" will be <vendor-url-bug>. + vendor-vm-bug-url.argument=<vendor-vm-bug-url> vendor-vm-bug-url.description=\ Override the vendor VM bug URL baked into the build. The URL\n\ displayed in VM error logs will be <vendor-vm-bug-url>. +vendor-vm-bug-url.usage=\ +\ --vendor-vm-bug-url <vendor-vm-bug-url>\n\ +\ Override the vendor VM bug URL baked \n\ +\ into the build. The URL displayed in VM error\n\ +\ logs will be <vendor-vm-bug-url>. + vm.argument=<client|server|minimal|all> vm.description=\ Select the HotSpot VM in the output image. Default is all +vm.usage=\ +\ --vm <client|server|minimal|all>\n\ +\ Select the HotSpot VM in the output image.\n\ +\ Default is all + zip.argument=[comma separated list of resource paths] zip.description=ZIP Compression +zip.usage=\ +\ --zip [comma separated list of resource paths]\n\ +\ ZIP Compression + include-locales.argument=\ <langtag>[,<langtag>]* @@ -146,6 +261,13 @@ include-locales.description=\ BCP 47 language tags separated by a comma, allowing locale matching\n\ defined in RFC 4647. e.g.: en,ja,*-IN +include-locales.usage=\ +\ --include-locales <langtag>[,<langtag>]*\n\ +\ BCP 47 language tags separated by a comma,\n\ +\ allowing\n\ +\ locale matching defined in RFC 4647.\n\ +\ e.g.: en,ja,*-IN + include-locales.missingpackages=\ Missing locale data packages in jdk.localedata:\n\t diff --git a/src/jdk.security.jgss/share/classes/com/sun/security/sasl/gsskerb/GssKrb5Client.java b/src/jdk.security.jgss/share/classes/com/sun/security/sasl/gsskerb/GssKrb5Client.java index 8534e242f00..4d1b57d14cd 100644 --- a/src/jdk.security.jgss/share/classes/com/sun/security/sasl/gsskerb/GssKrb5Client.java +++ b/src/jdk.security.jgss/share/classes/com/sun/security/sasl/gsskerb/GssKrb5Client.java @@ -35,6 +35,7 @@ import javax.security.auth.callback.CallbackHandler; // JGSS +import sun.security.jgss.krb5.internal.TlsChannelBindingImpl; import org.ietf.jgss.*; /** @@ -150,6 +151,16 @@ final class GssKrb5Client extends GssKrb5Base implements SaslClient { } secCtx.requestMutualAuth(mutual); + if (props != null) { + // TLS Channel Binding + // Property name is defined in the TLSChannelBinding class of + // the java.naming module + byte[] tlsCB = (byte[])props.get("jdk.internal.sasl.tlschannelbinding"); + if (tlsCB != null) { + secCtx.setChannelBinding(new TlsChannelBindingImpl(tlsCB)); + } + } + // Always specify potential need for integrity and confidentiality // Decision will be made during final handshake secCtx.requestConf(true); diff --git a/test/hotspot/gtest/gc/shared/test_partialArrayTaskStepper.cpp b/test/hotspot/gtest/gc/shared/test_partialArrayTaskStepper.cpp new file mode 100644 index 00000000000..fb797ba12c1 --- /dev/null +++ b/test/hotspot/gtest/gc/shared/test_partialArrayTaskStepper.cpp @@ -0,0 +1,87 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "gc/shared/partialArrayTaskStepper.inline.hpp" +#include "memory/allStatic.hpp" +#include "unittest.hpp" + +using Step = PartialArrayTaskStepper::Step; +using Stepper = PartialArrayTaskStepper; + +class PartialArrayTaskStepper::TestSupport : AllStatic { +public: + static Step start(const Stepper* stepper, + int length, + int* to_length_addr, + uint chunk_size) { + return stepper->start_impl(length, to_length_addr, chunk_size); + } + + static Step next(const Stepper* stepper, + int length, + int* to_length_addr, + uint chunk_size) { + return stepper->next_impl(length, to_length_addr, chunk_size); + } +}; + +using StepperSupport = PartialArrayTaskStepper::TestSupport; + +static int simulate(const Stepper* stepper, + int length, + int* to_length_addr, + uint chunk_size) { + Step init = StepperSupport::start(stepper, length, to_length_addr, chunk_size); + uint queue_count = init._ncreate; + int task = 0; + for ( ; queue_count > 0; ++task) { + --queue_count; + Step step = StepperSupport::next(stepper, length, to_length_addr, chunk_size); + queue_count += step._ncreate; + } + return task; +} + +static void run_test(int length, int chunk_size, uint n_workers) { + const PartialArrayTaskStepper stepper(n_workers); + int to_length; + int tasks = simulate(&stepper, length, &to_length, chunk_size); + ASSERT_EQ(length, to_length); + ASSERT_EQ(tasks, length / chunk_size); +} + +TEST(PartialArrayTaskStepperTest, doit) { + for (int chunk_size = 50; chunk_size <= 500; chunk_size += 50) { + for (uint n_workers = 1; n_workers <= 256; n_workers = (n_workers * 3 / 2 + 1)) { + for (int length = 0; length <= 1000000; length = (length * 2 + 1)) { + run_test(length, chunk_size, n_workers); + } + // Ensure we hit boundary cases for length % chunk_size == 0. + for (uint i = 0; i < 2 * n_workers; ++i) { + run_test(i * chunk_size, chunk_size, n_workers); + } + } + } +} diff --git a/test/hotspot/gtest/gc/shared/test_preservedMarks.cpp b/test/hotspot/gtest/gc/shared/test_preservedMarks.cpp index 3f2d7b9a65b..c5fd1680f5a 100644 --- a/test/hotspot/gtest/gc/shared/test_preservedMarks.cpp +++ b/test/hotspot/gtest/gc/shared/test_preservedMarks.cpp @@ -39,14 +39,14 @@ class FakeOop { oopDesc _oop; public: - FakeOop() : _oop() { _oop.set_mark_raw(originalMark()); } + FakeOop() : _oop() { _oop.set_mark(originalMark()); } oop get_oop() { return &_oop; } - markWord mark() { return _oop.mark_raw(); } - void set_mark(markWord m) { _oop.set_mark_raw(m); } + markWord mark() { return _oop.mark(); } + void set_mark(markWord m) { _oop.set_mark(m); } void forward_to(oop obj) { markWord m = markWord::encode_pointer_as_mark(obj); - _oop.set_mark_raw(m); + _oop.set_mark(m); } static markWord originalMark() { return markWord(markWord::lock_mask_in_place); } diff --git a/test/hotspot/gtest/gtestMain.cpp b/test/hotspot/gtest/gtestMain.cpp index e4ff1ebc95d..c52e64ac107 100644 --- a/test/hotspot/gtest/gtestMain.cpp +++ b/test/hotspot/gtest/gtestMain.cpp @@ -94,6 +94,10 @@ static int init_jvm(int argc, char **argv, bool disable_error_handling) { return JNI_CreateJavaVM(&jvm, (void**)&env, &args); } +static bool is_same_vm_test(const char* name) { + return is_suffix("_vm", name) && !is_suffix("_other_vm", name); +} + class JVMInitializerListener : public ::testing::EmptyTestEventListener { private: int _argc; @@ -110,7 +114,7 @@ class JVMInitializerListener : public ::testing::EmptyTestEventListener { virtual void OnTestStart(const ::testing::TestInfo& test_info) { const char* name = test_info.name(); - if (!_is_initialized && is_suffix("_test_vm", name)) { + if (!_is_initialized && is_same_vm_test(name)) { // we want to have hs_err and core files when we execute regular tests int ret_val = init_jvm(_argc, _argv, false); if (ret_val != 0) { @@ -205,8 +209,8 @@ static void runUnitTestsInner(int argc, char** argv) { if (::testing::internal::GTEST_FLAG(internal_run_death_test).length() > 0) { // when we execute death test, filter value equals to test name const char* test_name = ::testing::GTEST_FLAG(filter).c_str(); - const char* const othervm_suffix = "_other_vm_test"; // TEST_OTHER_VM - const char* const vmassert_suffix = "_vm_assert_test"; // TEST_VM_ASSERT(_MSG) + const char* const othervm_suffix = "_other_vm"; // TEST_OTHER_VM + const char* const vmassert_suffix = "_vm_assert"; // TEST_VM_ASSERT(_MSG) if (is_suffix(othervm_suffix, test_name)) { is_othervm_test = true; } else if (is_suffix(vmassert_suffix, test_name)) { diff --git a/test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp b/test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp index 12fa3f2b8d9..d2539b73382 100644 --- a/test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp +++ b/test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp @@ -101,7 +101,7 @@ class CommittedVirtualMemoryTest { static void test_committed_region_impl(size_t num_pages, size_t touch_pages, int* page_num) { const size_t page_sz = os::vm_page_size(); const size_t size = num_pages * page_sz; - char* base = os::reserve_memory(size, NULL, page_sz, mtThreadStack); + char* base = os::reserve_memory(size, mtThreadStack); bool result = os::commit_memory(base, size, false); size_t index; ASSERT_NE(base, (char*)NULL); @@ -169,7 +169,7 @@ class CommittedVirtualMemoryTest { const size_t page_sz = os::vm_page_size(); const size_t num_pages = 4; const size_t size = num_pages * page_sz; - char* base = os::reserve_memory(size, NULL, page_sz, mtTest); + char* base = os::reserve_memory(size, mtTest); ASSERT_NE(base, (char*)NULL); result = os::commit_memory(base, size, false); diff --git a/test/hotspot/gtest/unittest.hpp b/test/hotspot/gtest/unittest.hpp index 357c8efdcec..3911a1e6836 100644 --- a/test/hotspot/gtest/unittest.hpp +++ b/test/hotspot/gtest/unittest.hpp @@ -70,12 +70,12 @@ #define CONCAT(a, b) a ## b -#define TEST(category, name) GTEST_TEST(category, CONCAT(name, _test)) +#define TEST(category, name) GTEST_TEST(category, name) -#define TEST_VM(category, name) GTEST_TEST(category, CONCAT(name, _test_vm)) +#define TEST_VM(category, name) GTEST_TEST(category, CONCAT(name, _vm)) #define TEST_VM_F(test_fixture, name) \ - GTEST_TEST_(test_fixture, name ## _test_vm, test_fixture, \ + GTEST_TEST_(test_fixture, name ## _vm, test_fixture, \ ::testing::internal::GetTypeId<test_fixture>()) #define TEST_OTHER_VM(category, name) \ @@ -131,7 +131,7 @@ TEST(category, CONCAT(name, _vm_assert)) { \ ASSERT_EXIT(child_ ## category ## _ ## name ## _(), \ ::testing::ExitedWithCode(1), \ - "^assert failed: " msg); \ + "^assert failed: " msg); \ } \ \ void test_ ## category ## _ ## name ## _() diff --git a/test/hotspot/gtest/utilities/test_filterQueue.cpp b/test/hotspot/gtest/utilities/test_filterQueue.cpp new file mode 100644 index 00000000000..39b0a9dcd8b --- /dev/null +++ b/test/hotspot/gtest/utilities/test_filterQueue.cpp @@ -0,0 +1,186 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include "precompiled.hpp" +#include "runtime/mutex.hpp" +#include "utilities/filterQueue.inline.hpp" +#include "threadHelper.inline.hpp" +#include "unittest.hpp" + +// EXPECT_EQ(cht_get_copy(cht, thr, stl2), val2) << "Get did not find value."; + +static bool match_all(uintptr_t val) { + return true; +} + +static bool match_1(uintptr_t val) { + return 1 == val; +} + +static bool match_2(uintptr_t val) { + return 2 == val; +} + +static bool match_3(uintptr_t val) { + return 3 == val; +} + +static bool match_4(uintptr_t val) { + return 4 == val; +} + +static bool match_even(uintptr_t val) { + return (val & 0x1) == 0x0; +} + +static void is_empty(FilterQueue<uintptr_t>& queue) { + EXPECT_EQ(queue.is_empty(), true) << "Must be empty."; + EXPECT_EQ(queue.contains(match_1), false) << "Must be empty."; + EXPECT_EQ(queue.contains(match_all), false) << "Must be empty."; + EXPECT_EQ(queue.pop(match_all), (uintptr_t)0) << "Must be empty."; +} + +TEST_VM(FilterQueue, one) { + FilterQueue<uintptr_t> queue; + is_empty(queue); + queue.push(1); + EXPECT_EQ(queue.is_empty(), false) << "Must be not empty."; + EXPECT_EQ(queue.contains(match_1), true) << "Must contain a value."; + EXPECT_EQ(queue.contains(match_all), true) << "Must contain a value."; + EXPECT_EQ(queue.contains(match_even), false) << "Must not contain a value."; + EXPECT_EQ(queue.pop(match_all), (uintptr_t)1) << "Must not be empty."; + is_empty(queue); +} + +TEST_VM(FilterQueue, two) { + FilterQueue<uintptr_t> queue; + + queue.push(1); + queue.push(2); + + EXPECT_EQ(queue.is_empty(), false) << "Must be not empty."; + EXPECT_EQ(queue.contains(match_1), true) << "Must contain a value."; + EXPECT_EQ(queue.contains(match_2), true) << "Must contain a value."; + EXPECT_EQ(queue.contains(match_all), true) << "Must contain a value."; + EXPECT_EQ(queue.contains(match_even), true) << "Must contain a value."; + + EXPECT_EQ(queue.pop(match_all), (uintptr_t)1) << "Must not be empty."; + + EXPECT_EQ(queue.is_empty(), false) << "Must be not empty."; + EXPECT_EQ(queue.contains(match_1), false) << "Must not contain a value."; + EXPECT_EQ(queue.contains(match_2), true) << "Must contain a value."; + EXPECT_EQ(queue.contains(match_all), true) << "Must contain a value."; + EXPECT_EQ(queue.contains(match_even), true) << "Must contain a value."; + + queue.push(3); + + EXPECT_EQ(queue.pop(match_even), (uintptr_t)2) << "Must not be empty."; + + queue.push(2); + + EXPECT_EQ(queue.pop(match_even), (uintptr_t)2) << "Must not be empty."; + + EXPECT_EQ(queue.is_empty(), false) << "Must be not empty."; + EXPECT_EQ(queue.contains(match_3), true) << "Must contain a value."; + EXPECT_EQ(queue.contains(match_2), false) << "Must not contain a value."; + EXPECT_EQ(queue.contains(match_all), true) << "Must contain a value."; + EXPECT_EQ(queue.contains(match_even), false) << "Must not contain a value."; + + EXPECT_EQ(queue.pop(match_even), (uintptr_t)0) << "Must be empty."; + EXPECT_EQ(queue.pop(match_all), (uintptr_t)3) << "Must not be empty."; + + is_empty(queue); +} + +TEST_VM(FilterQueue, three) { + FilterQueue<uintptr_t> queue; + + queue.push(1); + queue.push(2); + queue.push(3); + + EXPECT_EQ(queue.is_empty(), false) << "Must be not empty."; + EXPECT_EQ(queue.contains(match_1), true) << "Must contain a value."; + EXPECT_EQ(queue.contains(match_2), true) << "Must contain a value."; + EXPECT_EQ(queue.contains(match_3), true) << "Must contain a value."; + EXPECT_EQ(queue.contains(match_4), false) << "Must not contain a value."; + + EXPECT_EQ(queue.contains(match_all), true) << "Must contain a value."; + EXPECT_EQ(queue.contains(match_even), true) << "Must contain a value."; + + EXPECT_EQ(queue.pop(match_even), (uintptr_t)2) << "Must not be empty."; + EXPECT_EQ(queue.pop(match_even), (uintptr_t)0) << "Must be empty."; + EXPECT_EQ(queue.pop(match_all), (uintptr_t)1) << "Must not be empty."; + EXPECT_EQ(queue.pop(match_all), (uintptr_t)3) << "Must not be empty."; + + is_empty(queue); +} + +class FilterQueueTestThread : public JavaTestThread { + FilterQueue<uintptr_t>* _fq; + Mutex* _lock; + uintptr_t _val; + uintptr_t _pop; +public: + FilterQueueTestThread(Semaphore* post, FilterQueue<uintptr_t>* fq, Mutex* lock, uintptr_t val, uintptr_t pop) + : JavaTestThread(post), _fq(fq), _lock(lock), _val(val), _pop(pop) { + } + virtual void main_run() { + for (int i = 0; i < 1000; i++) { + for (int j = 0; j < 10; j++) { + _fq->push(_val); + } + { + do { + MutexLocker ml(_lock, Mutex::_no_safepoint_check_flag); + if (_fq->contains(*this) != 0) { + break; + } + } while (true); + } + for (int j = 0; j < 10; j++) { + MutexLocker ml(_lock, Mutex::_no_safepoint_check_flag); + while (_fq->pop(*this) == 0) {} + } + } + } + bool operator()(uintptr_t val) { + return val == _pop; + } +}; + +TEST_VM(FilterQueue, stress) { + FilterQueue<uintptr_t> queue; + Mutex lock(Mutex::leaf, "Test Lock", true, Mutex::_safepoint_check_never); + static const int nthreads = 4; + Semaphore post; + FilterQueueTestThread* threads[nthreads] = {}; + for (int i = 0; i < nthreads; ++i) { + threads[i] = new FilterQueueTestThread(&post, &queue, &lock, i + 1, i + 2 > nthreads ? 1 : i + 2); + threads[i]->doit(); + } + for (uint i = 0; i < nthreads; ++i) { + post.wait(); + } + EXPECT_EQ(queue.is_empty(), true) << "Must be empty."; +} diff --git a/test/hotspot/gtest/utilities/test_powerOfTwo.cpp b/test/hotspot/gtest/utilities/test_powerOfTwo.cpp index 54802a37b7b..3cf22fb032a 100644 --- a/test/hotspot/gtest/utilities/test_powerOfTwo.cpp +++ b/test/hotspot/gtest/utilities/test_powerOfTwo.cpp @@ -29,11 +29,6 @@ #include <type_traits> #include "unittest.hpp" -template <typename T> static constexpr T max_pow2() { - T max_val = std::numeric_limits<T>::max(); - return max_val - (max_val >> 1); -} - struct StaticTestIsPowerOf2Result { uint64_t _value; int _status; // 0: success, > 0 indicates which failure case @@ -60,7 +55,7 @@ static constexpr StaticTestIsPowerOf2Result static_test_is_power_of_2_aux(T v) { template<typename T> static void static_test_is_power_of_2() { constexpr StaticTestIsPowerOf2Result result - = static_test_is_power_of_2_aux(max_pow2<T>()); + = static_test_is_power_of_2_aux(max_power_of_2<T>()); EXPECT_EQ(0, result._status) << "value = " << result._value << ", status = " << result._status; @@ -78,17 +73,17 @@ template <typename T> static void test_is_power_of_2() { static_assert(!is_power_of_2(std::numeric_limits<T>::min()), ""); // Test true - for (T i = max_pow2<T>(); i > 0; i = (i >> 1)) { + for (T i = max_power_of_2<T>(); i > 0; i = (i >> 1)) { EXPECT_TRUE(is_power_of_2(i)) << "value = " << T(i); } // Test one less - for (T i = max_pow2<T>(); i > 2; i = (i >> 1)) { + for (T i = max_power_of_2<T>(); i > 2; i = (i >> 1)) { EXPECT_FALSE(is_power_of_2(i - 1)) << "value = " << T(i - 1); } // Test one more - for (T i = max_pow2<T>(); i > 1; i = (i >> 1)) { + for (T i = max_power_of_2<T>(); i > 1; i = (i >> 1)) { EXPECT_FALSE(is_power_of_2(i + 1)) << "value = " << T(i + 1); } @@ -140,7 +135,7 @@ template <typename T> void round_up_power_of_2() { EXPECT_EQ(round_up_power_of_2(T(9)), T(16)) << "value = " << T(9); EXPECT_EQ(round_up_power_of_2(T(10)), T(16)) << "value = " << T(10); - T t_max_pow2 = max_pow2<T>(); + T t_max_pow2 = max_power_of_2<T>(); // round_up(any power of two) should return input for (T pow2 = T(1); pow2 < t_max_pow2; pow2 *= 2) { @@ -183,7 +178,7 @@ template <typename T> void round_down_power_of_2() { EXPECT_EQ(round_down_power_of_2(T(9)), T(8)) << "value = " << T(9); EXPECT_EQ(round_down_power_of_2(T(10)), T(8)) << "value = " << T(10); - T t_max_pow2 = max_pow2<T>(); + T t_max_pow2 = max_power_of_2<T>(); // For each pow2 >= 2: // - round_down(pow2) should return pow2 @@ -229,7 +224,7 @@ template <typename T> void next_power_of_2() { EXPECT_EQ(next_power_of_2(T(9)), T(16)) << "value = " << T(9); EXPECT_EQ(next_power_of_2(T(10)), T(16)) << "value = " << T(10); - T t_max_pow2 = max_pow2<T>(); + T t_max_pow2 = max_power_of_2<T>(); // next(pow2 - 1) should return pow2 for (T pow2 = T(1); pow2 < t_max_pow2; pow2 = pow2 * 2) { @@ -256,3 +251,14 @@ TEST(power_of_2, next_power_of_2) { next_power_of_2<uint32_t>(); next_power_of_2<uint64_t>(); } + +TEST(power_of_2, max) { + EXPECT_EQ(max_power_of_2<int8_t>(), 0x40); + EXPECT_EQ(max_power_of_2<int16_t>(), 0x4000); + EXPECT_EQ(max_power_of_2<int32_t>(), 0x40000000); + EXPECT_EQ(max_power_of_2<int64_t>(), CONST64(0x4000000000000000)); + EXPECT_EQ(max_power_of_2<uint8_t>(), 0x80u); + EXPECT_EQ(max_power_of_2<uint16_t>(), 0x8000u); + EXPECT_EQ(max_power_of_2<uint32_t>(), 0x80000000u); + EXPECT_EQ(max_power_of_2<uint64_t>(), UCONST64(0x8000000000000000)); +} diff --git a/test/hotspot/gtest/utilities/test_sizes.cpp b/test/hotspot/gtest/utilities/test_sizes.cpp new file mode 100644 index 00000000000..9458124ee2b --- /dev/null +++ b/test/hotspot/gtest/utilities/test_sizes.cpp @@ -0,0 +1,41 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include "precompiled.hpp" +#include "utilities/sizes.hpp" +#include "unittest.hpp" + +TEST(ByteSize, constructors) { + EXPECT_EQ(in_bytes(in_ByteSize(10)), 10); +} + +TEST(ByteSize, operators) { + ByteSize s = in_ByteSize(7); + ASSERT_EQ(in_bytes(s + in_ByteSize(3)), 10); + ASSERT_EQ(in_bytes(s - in_ByteSize(3)), 4); + ASSERT_EQ(in_bytes(s * 3), 21); +} + +TEST(WordSize, constructors) { + EXPECT_EQ(in_words(in_WordSize(10)), 10); +} diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt index e671093c7a2..488c2bf9ab5 100644 --- a/test/hotspot/jtreg/ProblemList.txt +++ b/test/hotspot/jtreg/ProblemList.txt @@ -159,9 +159,10 @@ gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java 8241293 macosx-x64 # :hotspot_runtime +runtime/cds/DeterministicDump.java 8253495 generic-all +runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.java 8253081 generic-all runtime/jni/terminatedThread/TestTerminatedThread.java 8219652 aix-ppc64 runtime/ReservedStack/ReservedStackTest.java 8231031 generic-all -containers/docker/TestMemoryAwareness.java 8250984 linux-5.4.0-1019-oracle # Valhalla TODO: runtime/CompressedOops/CompressedClassPointers.java 8210258 generic-all @@ -270,7 +271,6 @@ vmTestbase/jit/escape/LockCoarsening/LockCoarsening002.java 8208259 generic-all vmTestbase/vm/mlvm/indy/func/jvmti/redefineClassInBootstrap/TestDescription.java 8013267 generic-all vmTestbase/vm/mlvm/meth/func/java/throwException/Test.java 8058176 generic-all -vmTestbase/vm/mlvm/meth/func/jdi/breakpointOtherStratum/Test.java 8208257,8058176 generic-all vmTestbase/vm/mlvm/meth/stress/compiler/deoptimize/Test.java#id1 8058176 generic-all vmTestbase/vm/mlvm/meth/stress/compiler/i2c_c2i/Test.java 8058176 generic-all vmTestbase/vm/mlvm/meth/stress/compiler/sequences/Test.java 8058176 generic-all diff --git a/test/hotspot/jtreg/applications/ctw/modules/java_instrument.java b/test/hotspot/jtreg/applications/ctw/modules/java_instrument.java index 56d7a6b2517..005508731f7 100644 --- a/test/hotspot/jtreg/applications/ctw/modules/java_instrument.java +++ b/test/hotspot/jtreg/applications/ctw/modules/java_instrument.java @@ -31,6 +31,7 @@ * java.base/jdk.internal.misc * java.base/jdk.internal.reflect * @modules java.instrument + * @requires vm.jvmti * * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox diff --git a/test/hotspot/jtreg/gc/shenandoah/options/TestCodeCacheRootStyles.java b/test/hotspot/jtreg/compiler/arguments/TestStressIGVNOptions.java similarity index 55% rename from test/hotspot/jtreg/gc/shenandoah/options/TestCodeCacheRootStyles.java rename to test/hotspot/jtreg/compiler/arguments/TestStressIGVNOptions.java index c207b3999e6..d55bc640e24 100644 --- a/test/hotspot/jtreg/gc/shenandoah/options/TestCodeCacheRootStyles.java +++ b/test/hotspot/jtreg/compiler/arguments/TestStressIGVNOptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Red Hat, Inc. All rights reserved. + * Copyright (c) 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 @@ -19,21 +19,26 @@ * 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. - * */ -/* @test TestCodeCacheRootStyles - * @requires vm.gc.Shenandoah - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions - * -XX:+UseShenandoahGC -XX:ShenandoahCodeRootsStyle=0 TestCodeCacheRootStyles - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions - * -XX:+UseShenandoahGC -XX:ShenandoahCodeRootsStyle=1 TestCodeCacheRootStyles - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions - * -XX:+UseShenandoahGC -XX:ShenandoahCodeRootsStyle=2 TestCodeCacheRootStyles +/* + * @test + * @bug 8252219 + * @requires vm.compiler2.enabled + * @summary Tests that different combinations of the options -XX:+StressIGVN and + * -XX:StressSeed=N are accepted. + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+StressIGVN + * compiler.arguments.TestStressIGVNOptions + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+StressIGVN -XX:StressSeed=42 + * compiler.arguments.TestStressIGVNOptions */ -public class TestCodeCacheRootStyles { - public static void main(String[] args) { - // Bug should crash before we get here. +package compiler.arguments; + +public class TestStressIGVNOptions { + + static public void main(String[] args) { + System.out.println("Passed"); } } + diff --git a/test/hotspot/jtreg/compiler/c2/cr6340864/TestIntVect.java b/test/hotspot/jtreg/compiler/c2/cr6340864/TestIntVect.java index 1c7129392b7..2ba6a29a3d1 100644 --- a/test/hotspot/jtreg/compiler/c2/cr6340864/TestIntVect.java +++ b/test/hotspot/jtreg/compiler/c2/cr6340864/TestIntVect.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -42,8 +42,6 @@ public class TestIntVect { private static final int BIT_MASK = 0xEC80F731; private static final int VALUE = 15; private static final int SHIFT = 32; - private static final int SHIFT_LT_IMM8 = -128; - private static final int SHIFT_GT_IMM8 = 128; public static void main(String args[]) { System.out.println("Testing Integer vectors"); @@ -151,13 +149,6 @@ static int test() { test_srac_and(a0, a1); test_srav_and(a0, a1, BIT_MASK); - test1_ror(a0, a1); - test1_rol(a0, a1); - test2_ror(a0, a1); - test2_rol(a0, a1); - test3_ror(a0, a1, SHIFT); - test3_rol(a0, a1, SHIFT); - test_pack2(p2, a1); test_unpack2(a0, p2); test_pack2_swap(p2, a1); @@ -385,30 +376,6 @@ static int test() { for (int i=0; i<ARRLEN; i++) { errn += verify("test_srav_o: ", i, a0[i], (int)((int)(ADD_INIT+i)>>SHIFT)); } - test1_ror(a0, a1); - for (int i=0; i<ARRLEN; i++) { - errn += verify("test1_ror: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>SHIFT_GT_IMM8) | (int)(ADD_INIT+i)<<-SHIFT_GT_IMM8)); - } - test1_rol(a0, a1); - for (int i=0; i<ARRLEN; i++) { - errn += verify("test1_rol: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<SHIFT_GT_IMM8) | (int)(ADD_INIT+i)>>>-SHIFT_GT_IMM8)); - } - test2_ror(a0, a1); - for (int i=0; i<ARRLEN; i++) { - errn += verify("test2_ror: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>SHIFT_LT_IMM8) | (int)(ADD_INIT+i)<<-SHIFT_LT_IMM8)); - } - test2_rol(a0, a1); - for (int i=0; i<ARRLEN; i++) { - errn += verify("test2_rol: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<SHIFT_LT_IMM8) | (int)(ADD_INIT+i)>>>-SHIFT_LT_IMM8)); - } - test3_rol(a0, a1, SHIFT); - for (int i=0; i<ARRLEN; i++) { - errn += verify("test3_rol: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<SHIFT) | (int)(ADD_INIT+i)>>>-SHIFT)); - } - test3_ror(a0, a1, SHIFT); - for (int i=0; i<ARRLEN; i++) { - errn += verify("test3_ror: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>SHIFT) | (int)(ADD_INIT+i)<<-SHIFT)); - } test_sllc_on(a0, a1); for (int i=0; i<ARRLEN; i++) { @@ -937,48 +904,6 @@ static int test() { end = System.currentTimeMillis(); System.out.println("test_srlc_and: " + (end - start)); - start = System.currentTimeMillis(); - for (int i=0; i<ITERS; i++) { - test1_rol(a0, a1); - } - end = System.currentTimeMillis(); - System.out.println("test1_rol: " + (end - start)); - - start = System.currentTimeMillis(); - for (int i=0; i<ITERS; i++) { - test1_ror(a0, a1); - } - end = System.currentTimeMillis(); - System.out.println("test1_ror: " + (end - start)); - - start = System.currentTimeMillis(); - for (int i=0; i<ITERS; i++) { - test2_rol(a0, a1); - } - end = System.currentTimeMillis(); - System.out.println("test2_rol: " + (end - start)); - - start = System.currentTimeMillis(); - for (int i=0; i<ITERS; i++) { - test2_ror(a0, a1); - } - end = System.currentTimeMillis(); - System.out.println("test2_ror: " + (end - start)); - - start = System.currentTimeMillis(); - for (int i=0; i<ITERS; i++) { - test3_rol(a0, a1, SHIFT); - } - end = System.currentTimeMillis(); - System.out.println("test3_rol: " + (end - start)); - - start = System.currentTimeMillis(); - for (int i=0; i<ITERS; i++) { - test3_ror(a0, a1, SHIFT); - } - end = System.currentTimeMillis(); - System.out.println("test3_ror: " + (end - start)); - start = System.currentTimeMillis(); for (int i=0; i<ITERS; i++) { test_srlv_and(a0, a1, BIT_MASK); @@ -999,7 +924,6 @@ static int test() { end = System.currentTimeMillis(); System.out.println("test_srav_and: " + (end - start)); - start = System.currentTimeMillis(); for (int i=0; i<ITERS; i++) { test_pack2(p2, a1); @@ -1175,36 +1099,7 @@ static void test_notc(int[] a0, int[] a1) { a0[i] = (int)(~a1[i]); } } - static void test1_rol(int[] a0, int[] a1) { - for (int i = 0; i < a0.length; i+=1) { - a0[i] = (int)(Integer.rotateLeft(a1[i], SHIFT_GT_IMM8)); - } - } - static void test1_ror(int[] a0, int[] a1) { - for (int i = 0; i < a0.length; i+=1) { - a0[i] = (int)(Integer.rotateRight(a1[i], SHIFT_GT_IMM8)); - } - } - static void test2_rol(int[] a0, int[] a1) { - for (int i = 0; i < a0.length; i+=1) { - a0[i] = (int)(Integer.rotateLeft(a1[i], SHIFT_LT_IMM8)); - } - } - static void test2_ror(int[] a0, int[] a1) { - for (int i = 0; i < a0.length; i+=1) { - a0[i] = (int)(Integer.rotateRight(a1[i], SHIFT_LT_IMM8)); - } - } - static void test3_rol(int[] a0, int[] a1, int shift) { - for (int i = 0; i < a0.length; i+=1) { - a0[i] = (int)(Integer.rotateLeft(a1[i], shift)); - } - } - static void test3_ror(int[] a0, int[] a1, int shift) { - for (int i = 0; i < a0.length; i+=1) { - a0[i] = (int)(Integer.rotateRight(a1[i], shift)); - } - } + static void test_sllc(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]<<VALUE); diff --git a/test/hotspot/jtreg/compiler/c2/cr6340864/TestIntVectRotate.java b/test/hotspot/jtreg/compiler/c2/cr6340864/TestIntVectRotate.java new file mode 100644 index 00000000000..cc03d0bb616 --- /dev/null +++ b/test/hotspot/jtreg/compiler/c2/cr6340864/TestIntVectRotate.java @@ -0,0 +1,467 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8248830 + * @summary Implement Rotate vectorization optimizations in hotspot-server + * + * @run main/othervm/timeout=400 -Xbatch -Xmx128m compiler.c2.cr6340864.TestIntVectRotate + * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:MaxVectorSize=8 compiler.c2.cr6340864.TestIntVectRotate + * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:MaxVectorSize=16 compiler.c2.cr6340864.TestIntVectRotate + * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:MaxVectorSize=32 compiler.c2.cr6340864.TestIntVectRotate + * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:+IgnoreUnrecognizedVMOptions -XX:UseAVX=3 compiler.c2.cr6340864.TestIntVectRotate + */ + +package compiler.c2.cr6340864; + +public class TestIntVectRotate { + private static final int ARRLEN = 997; + private static final int ITERS = 11000; + private static final int ADD_INIT = Integer.MAX_VALUE-500; + private static final int VALUE = 15; + private static final int SHIFT = 32; + private static final int SHIFT_LT_IMM8 = -128; + private static final int SHIFT_GT_IMM8 = 128; + + public static void main(String args[]) { + System.out.println("Testing Integer Rotate vectors"); + test(); + int errn = verify(); + if (errn > 0) { + System.err.println("FAILED: " + errn + " errors"); + System.exit(97); + } + times(); + System.out.println("PASSED"); + } + + static int[] a0 = new int[ARRLEN]; + static int[] a1 = new int[ARRLEN]; + + static void test() { + // Initialize + for (int i=0; i<ARRLEN; i++) { + int val = (int)(ADD_INIT+i); + a1[i] = val; + } + System.out.println("Warmup"); + for (int i=0; i<ITERS; i++) { + test1_ror(a0, a1); + test1_rol(a0, a1); + test2_ror(a0, a1); + test2_rol(a0, a1); + test3_ror(a0, a1, SHIFT); + test3_rol(a0, a1, SHIFT); + + test_rolc(a0, a1); + test_rolv(a0, a1, VALUE); + test_rorc(a0, a1); + test_rorv(a0, a1, VALUE); + + test_rolc_n(a0, a1); + test_rolv(a0, a1, -VALUE); + test_rorc_n(a0, a1); + test_rorv(a0, a1, -VALUE); + + test_rolc_o(a0, a1); + test_rolv(a0, a1, SHIFT); + test_rorc_o(a0, a1); + test_rorv(a0, a1, SHIFT); + + test_rolc_on(a0, a1); + test_rolv(a0, a1, -SHIFT); + test_rorc_on(a0, a1); + test_rorv(a0, a1, -SHIFT); + } + } + + // Test and verify results + static int verify() { + System.out.println("Verification"); + int errn = 0; + + test1_ror(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test1_ror: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>SHIFT_GT_IMM8) | (int)(ADD_INIT+i)<<-SHIFT_GT_IMM8)); + } + test1_rol(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test1_rol: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<SHIFT_GT_IMM8) | (int)(ADD_INIT+i)>>>-SHIFT_GT_IMM8)); + } + test2_ror(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test2_ror: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>SHIFT_LT_IMM8) | (int)(ADD_INIT+i)<<-SHIFT_LT_IMM8)); + } + test2_rol(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test2_rol: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<SHIFT_LT_IMM8) | (int)(ADD_INIT+i)>>>-SHIFT_LT_IMM8)); + } + test3_rol(a0, a1, SHIFT); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test3_rol: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<SHIFT) | (int)(ADD_INIT+i)>>>-SHIFT)); + } + test3_ror(a0, a1, SHIFT); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test3_ror: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>SHIFT) | (int)(ADD_INIT+i)<<-SHIFT)); + } + + test_rolc(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolc: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<VALUE) | (int)(ADD_INIT+i)>>>(-VALUE))); + } + test_rolv(a0, a1, VALUE); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolv: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<VALUE) | (int)(ADD_INIT+i)>>>(-VALUE))); + } + + test_rorc(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorc: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>VALUE) | (int)(ADD_INIT+i)<<(-VALUE))); + } + test_rorv(a0, a1, VALUE); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorv: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>VALUE) | (int)(ADD_INIT+i)<<(-VALUE))); + } + + test_rolc_n(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolc_n: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<(-VALUE)) | (int)(ADD_INIT+i)>>>VALUE)); + } + test_rolv(a0, a1, -VALUE); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolv_n: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<(-VALUE)) | (int)(ADD_INIT+i)>>>VALUE)); + } + + test_rorc_n(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorc_n: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>(-VALUE)) | (int)(ADD_INIT+i)<<VALUE)); + } + test_rorv(a0, a1, -VALUE); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorv_n: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>(-VALUE)) | (int)(ADD_INIT+i)<<VALUE)); + } + + test_rolc_o(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolc_o: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<SHIFT) | (int)(ADD_INIT+i)>>>(-SHIFT))); + } + test_rolv(a0, a1, SHIFT); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolv_o: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<SHIFT) | (int)(ADD_INIT+i)>>>(-SHIFT))); + } + + test_rorc_o(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorc_o: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>SHIFT) | (int)(ADD_INIT+i)<<(-SHIFT))); + } + test_rorv(a0, a1, SHIFT); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorv_o: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>SHIFT) | (int)(ADD_INIT+i)<<(-SHIFT))); + } + + test_rolc_on(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolc_on: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<(-SHIFT)) | (int)(ADD_INIT+i)>>>SHIFT)); + } + test_rolv(a0, a1, -SHIFT); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolv_on: ", i, a0[i], (int)(((int)(ADD_INIT+i)<<(-SHIFT)) | (int)(ADD_INIT+i)>>>SHIFT)); + } + + test_rorc_on(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorc_on: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>(-SHIFT)) | (int)(ADD_INIT+i)<<SHIFT)); + } + test_rorv(a0, a1, -SHIFT); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorc_on: ", i, a0[i], (int)(((int)(ADD_INIT+i)>>>(-SHIFT)) | (int)(ADD_INIT+i)<<SHIFT)); + } + + return errn; + } + + static void times() { + System.out.println("Time"); + long start, end; + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test1_rol(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test1_rol: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test1_ror(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test1_ror: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test2_rol(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test2_rol: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test2_ror(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test2_ror: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test3_rol(a0, a1, SHIFT); + } + end = System.currentTimeMillis(); + System.out.println("test3_rol: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test3_ror(a0, a1, SHIFT); + } + end = System.currentTimeMillis(); + System.out.println("test3_ror: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolc(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rolc: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolv(a0, a1, VALUE); + } + end = System.currentTimeMillis(); + System.out.println("test_rolv: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorc(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rorc: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorv(a0, a1, VALUE); + } + end = System.currentTimeMillis(); + System.out.println("test_rorv: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolc_n(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rolc_n: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolv(a0, a1, -VALUE); + } + end = System.currentTimeMillis(); + System.out.println("test_rolv_n: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorc_n(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rorc_n: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorv(a0, a1, -VALUE); + } + end = System.currentTimeMillis(); + System.out.println("test_rorv_n: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolc_o(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rolc_o: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolv(a0, a1, SHIFT); + } + end = System.currentTimeMillis(); + System.out.println("test_rolv_o: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorc_o(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rorc_o: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorv(a0, a1, SHIFT); + } + end = System.currentTimeMillis(); + System.out.println("test_rorv_o: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolc_on(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rolc_on: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolv(a0, a1, -SHIFT); + } + end = System.currentTimeMillis(); + System.out.println("test_rolv_on: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorc_on(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rorc_on: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorv(a0, a1, -SHIFT); + } + end = System.currentTimeMillis(); + System.out.println("test_rorv_on: " + (end - start)); + } + + static void test_rolc(int[] a0, int[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateLeft(a1[i], VALUE)); + } + } + + static void test_rolc_n(int[] a0, int[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateLeft(a1[i], (-VALUE))); + } + } + + static void test_rolc_o(int[] a0, int[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateLeft(a1[i], SHIFT)); + } + } + + static void test_rolc_on(int[] a0, int[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateLeft(a1[i], (-SHIFT))); + } + } + + static void test_rolv(int[] a0, int[] a1, int shift) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateLeft(a1[i], shift)); + } + } + + static void test_rorc(int[] a0, int[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateRight(a1[i], VALUE)); + } + } + + static void test_rorc_n(int[] a0, int[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateRight(a1[i], (-VALUE))); + } + } + + static void test_rorc_o(int[] a0, int[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateRight(a1[i], SHIFT)); + } + } + + static void test_rorc_on(int[] a0, int[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateRight(a1[i], (-SHIFT))); + } + } + + static void test_rorv(int[] a0, int[] a1, int shift) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateRight(a1[i], shift)); + } + } + + static void test1_rol(int[] a0, int[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateLeft(a1[i], SHIFT_GT_IMM8)); + } + } + + static void test1_ror(int[] a0, int[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateRight(a1[i], SHIFT_GT_IMM8)); + } + } + + static void test2_rol(int[] a0, int[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateLeft(a1[i], SHIFT_LT_IMM8)); + } + } + + static void test2_ror(int[] a0, int[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateRight(a1[i], SHIFT_LT_IMM8)); + } + } + + static void test3_rol(int[] a0, int[] a1, int shift) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateLeft(a1[i], shift)); + } + } + + static void test3_ror(int[] a0, int[] a1, int shift) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (int)(Integer.rotateRight(a1[i], shift)); + } + } + + static int verify(String text, int i, int elem, int val) { + if (elem != val) { + System.err.println(text + "[" + i + "] = " + elem + " != " + val); + return 1; + } + return 0; + } + +} diff --git a/test/hotspot/jtreg/compiler/c2/cr6340864/TestLongVect.java b/test/hotspot/jtreg/compiler/c2/cr6340864/TestLongVect.java index b26e0730d15..bff24367c30 100644 --- a/test/hotspot/jtreg/compiler/c2/cr6340864/TestLongVect.java +++ b/test/hotspot/jtreg/compiler/c2/cr6340864/TestLongVect.java @@ -42,8 +42,6 @@ public class TestLongVect { private static final long BIT_MASK = 0xEC80F731EC80F731L; private static final int VALUE = 31; private static final int SHIFT = 64; - private static final int SHIFT_LT_IMM8 = -128; - private static final int SHIFT_GT_IMM8 = 128; public static void main(String args[]) { System.out.println("Testing Long vectors"); @@ -145,13 +143,6 @@ static int test() { test_srlv_and(a0, a1, BIT_MASK); test_srac_and(a0, a1); test_srav_and(a0, a1, BIT_MASK); - - test1_ror(a0, a1); - test1_rol(a0, a1); - test2_ror(a0, a1); - test2_rol(a0, a1); - test3_ror(a0, a1, SHIFT); - test3_rol(a0, a1, SHIFT); } // Test and verify results System.out.println("Verification"); @@ -442,30 +433,6 @@ static int test() { errn += verify("test_srav_and: ", i, a0[i], (long)(((long)(ADD_INIT+i) & BIT_MASK)>>VALUE)); } - test1_ror(a0, a1); - for (int i=0; i<ARRLEN; i++) { - errn += verify("test1_ror: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>SHIFT_GT_IMM8) | (long)(ADD_INIT+i)<<-SHIFT_GT_IMM8)); - } - test1_rol(a0, a1); - for (int i=0; i<ARRLEN; i++) { - errn += verify("test1_rol: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<SHIFT_GT_IMM8) | (long)(ADD_INIT+i)>>>-SHIFT_GT_IMM8)); - } - test2_ror(a0, a1); - for (int i=0; i<ARRLEN; i++) { - errn += verify("test2_ror: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>SHIFT_LT_IMM8) | (long)(ADD_INIT+i)<<-SHIFT_LT_IMM8)); - } - test2_rol(a0, a1); - for (int i=0; i<ARRLEN; i++) { - errn += verify("test2_rol: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<SHIFT_LT_IMM8) | (long)(ADD_INIT+i)>>>-SHIFT_LT_IMM8)); - } - test3_rol(a0, a1, SHIFT); - for (int i=0; i<ARRLEN; i++) { - errn += verify("test3_rol: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<SHIFT) | (long)(ADD_INIT+i)>>>-SHIFT)); - } - test3_ror(a0, a1, SHIFT); - for (int i=0; i<ARRLEN; i++) { - errn += verify("test3_ror: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>SHIFT) | (long)(ADD_INIT+i)<<-SHIFT)); - } } if (errn > 0) @@ -886,48 +853,6 @@ static int test() { end = System.currentTimeMillis(); System.out.println("test_srav_and: " + (end - start)); - start = System.currentTimeMillis(); - for (int i=0; i<ITERS; i++) { - test1_rol(a0, a1); - } - end = System.currentTimeMillis(); - System.out.println("test1_rol: " + (end - start)); - - start = System.currentTimeMillis(); - for (int i=0; i<ITERS; i++) { - test1_ror(a0, a1); - } - end = System.currentTimeMillis(); - System.out.println("test1_ror: " + (end - start)); - - start = System.currentTimeMillis(); - for (int i=0; i<ITERS; i++) { - test2_rol(a0, a1); - } - end = System.currentTimeMillis(); - System.out.println("test2_rol: " + (end - start)); - - start = System.currentTimeMillis(); - for (int i=0; i<ITERS; i++) { - test2_ror(a0, a1); - } - end = System.currentTimeMillis(); - System.out.println("test2_ror: " + (end - start)); - - start = System.currentTimeMillis(); - for (int i=0; i<ITERS; i++) { - test3_rol(a0, a1, SHIFT); - } - end = System.currentTimeMillis(); - System.out.println("test3_rol: " + (end - start)); - - start = System.currentTimeMillis(); - for (int i=0; i<ITERS; i++) { - test3_ror(a0, a1, SHIFT); - } - end = System.currentTimeMillis(); - System.out.println("test3_ror: " + (end - start)); - return errn; } @@ -1198,36 +1123,6 @@ static void test_srav_and(long[] a0, long[] a1, long b) { a0[i] = (long)((a1[i] & b)>>VALUE); } } - static void test1_rol(long[] a0, long[] a1) { - for (int i = 0; i < a0.length; i+=1) { - a0[i] = (long)(Long.rotateLeft(a1[i], SHIFT_GT_IMM8)); - } - } - static void test1_ror(long[] a0, long[] a1) { - for (int i = 0; i < a0.length; i+=1) { - a0[i] = (long)(Long.rotateRight(a1[i], SHIFT_GT_IMM8)); - } - } - static void test2_rol(long[] a0, long[] a1) { - for (int i = 0; i < a0.length; i+=1) { - a0[i] = (long)(Long.rotateLeft(a1[i], SHIFT_LT_IMM8)); - } - } - static void test2_ror(long[] a0, long[] a1) { - for (int i = 0; i < a0.length; i+=1) { - a0[i] = (long)(Long.rotateRight(a1[i], SHIFT_LT_IMM8)); - } - } - static void test3_rol(long[] a0, long[] a1, int shift) { - for (int i = 0; i < a0.length; i+=1) { - a0[i] = (long)(Long.rotateLeft(a1[i], shift)); - } - } - static void test3_ror(long[] a0, long[] a1, int shift) { - for (int i = 0; i < a0.length; i+=1) { - a0[i] = (long)(Long.rotateRight(a1[i], shift)); - } - } static int verify(String text, int i, long elem, long val) { if (elem != val) { diff --git a/test/hotspot/jtreg/compiler/c2/cr6340864/TestLongVectRotate.java b/test/hotspot/jtreg/compiler/c2/cr6340864/TestLongVectRotate.java new file mode 100644 index 00000000000..d926df12545 --- /dev/null +++ b/test/hotspot/jtreg/compiler/c2/cr6340864/TestLongVectRotate.java @@ -0,0 +1,467 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8248830 + * @summary Implement Rotate vectorization optimizations in hotspot-server + * + * @run main/othervm/timeout=400 -Xbatch -Xmx128m compiler.c2.cr6340864.TestLongVectRotate + * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:MaxVectorSize=8 compiler.c2.cr6340864.TestLongVectRotate + * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:MaxVectorSize=16 compiler.c2.cr6340864.TestLongVectRotate + * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:MaxVectorSize=32 compiler.c2.cr6340864.TestLongVectRotate + * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:+IgnoreUnrecognizedVMOptions -XX:UseAVX=3 compiler.c2.cr6340864.TestLongVectRotate + */ + +package compiler.c2.cr6340864; + +public class TestLongVectRotate { + private static final int ARRLEN = 997; + private static final int ITERS = 11000; + private static final long ADD_INIT = Long.MAX_VALUE-500; + private static final int VALUE = 31; + private static final int SHIFT = 64; + private static final int SHIFT_LT_IMM8 = -128; + private static final int SHIFT_GT_IMM8 = 128; + + public static void main(String args[]) { + System.out.println("Testing Long Rotate vectors"); + test(); + int errn = verify(); + if (errn > 0) { + System.err.println("FAILED: " + errn + " errors"); + System.exit(97); + } + times(); + System.out.println("PASSED"); + } + + static long[] a0 = new long[ARRLEN]; + static long[] a1 = new long[ARRLEN]; + + static void test() { + // Initialize + for (int i=0; i<ARRLEN; i++) { + long val = (long)(ADD_INIT+i); + a1[i] = val; + } + System.out.println("Warmup"); + for (int i=0; i<ITERS; i++) { + test1_ror(a0, a1); + test1_rol(a0, a1); + test2_ror(a0, a1); + test2_rol(a0, a1); + test3_ror(a0, a1, SHIFT); + test3_rol(a0, a1, SHIFT); + + test_rolc(a0, a1); + test_rolv(a0, a1, VALUE); + test_rorc(a0, a1); + test_rorv(a0, a1, VALUE); + + test_rolc_n(a0, a1); + test_rolv(a0, a1, -VALUE); + test_rorc_n(a0, a1); + test_rorv(a0, a1, -VALUE); + + test_rolc_o(a0, a1); + test_rolv(a0, a1, SHIFT); + test_rorc_o(a0, a1); + test_rorv(a0, a1, SHIFT); + + test_rolc_on(a0, a1); + test_rolv(a0, a1, -SHIFT); + test_rorc_on(a0, a1); + test_rorv(a0, a1, -SHIFT); + } + } + + // Test and verify results + static int verify() { + System.out.println("Verification"); + int errn = 0; + + test1_ror(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test1_ror: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>SHIFT_GT_IMM8) | (long)(ADD_INIT+i)<<-SHIFT_GT_IMM8)); + } + test1_rol(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test1_rol: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<SHIFT_GT_IMM8) | (long)(ADD_INIT+i)>>>-SHIFT_GT_IMM8)); + } + test2_ror(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test2_ror: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>SHIFT_LT_IMM8) | (long)(ADD_INIT+i)<<-SHIFT_LT_IMM8)); + } + test2_rol(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test2_rol: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<SHIFT_LT_IMM8) | (long)(ADD_INIT+i)>>>-SHIFT_LT_IMM8)); + } + test3_rol(a0, a1, SHIFT); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test3_rol: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<SHIFT) | (long)(ADD_INIT+i)>>>-SHIFT)); + } + test3_ror(a0, a1, SHIFT); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test3_ror: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>SHIFT) | (long)(ADD_INIT+i)<<-SHIFT)); + } + + test_rolc(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolc: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<VALUE) | (long)(ADD_INIT+i)>>>(-VALUE))); + } + test_rolv(a0, a1, VALUE); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolv: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<VALUE) | (long)(ADD_INIT+i)>>>(-VALUE))); + } + + test_rorc(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorc: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>VALUE) | (long)(ADD_INIT+i)<<(-VALUE))); + } + test_rorv(a0, a1, VALUE); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorv: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>VALUE) | (long)(ADD_INIT+i)<<(-VALUE))); + } + + test_rolc_n(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolc_n: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<(-VALUE)) | (long)(ADD_INIT+i)>>>VALUE)); + } + test_rolv(a0, a1, -VALUE); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolv_n: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<(-VALUE)) | (long)(ADD_INIT+i)>>>VALUE)); + } + + test_rorc_n(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorc_n: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>(-VALUE)) | (long)(ADD_INIT+i)<<VALUE)); + } + test_rorv(a0, a1, -VALUE); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorv_n: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>(-VALUE)) | (long)(ADD_INIT+i)<<VALUE)); + } + + test_rolc_o(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolc_o: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<SHIFT) | (long)(ADD_INIT+i)>>>(-SHIFT))); + } + test_rolv(a0, a1, SHIFT); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolv_o: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<SHIFT) | (long)(ADD_INIT+i)>>>(-SHIFT))); + } + + test_rorc_o(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorc_o: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>SHIFT) | (long)(ADD_INIT+i)<<(-SHIFT))); + } + test_rorv(a0, a1, SHIFT); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorv_o: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>SHIFT) | (long)(ADD_INIT+i)<<(-SHIFT))); + } + + test_rolc_on(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolc_on: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<(-SHIFT)) | (long)(ADD_INIT+i)>>>SHIFT)); + } + test_rolv(a0, a1, -SHIFT); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rolv_on: ", i, a0[i], (long)(((long)(ADD_INIT+i)<<(-SHIFT)) | (long)(ADD_INIT+i)>>>SHIFT)); + } + + test_rorc_on(a0, a1); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorc_on: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>(-SHIFT)) | (long)(ADD_INIT+i)<<SHIFT)); + } + test_rorv(a0, a1, -SHIFT); + for (int i=0; i<ARRLEN; i++) { + errn += verify("test_rorc_on: ", i, a0[i], (long)(((long)(ADD_INIT+i)>>>(-SHIFT)) | (long)(ADD_INIT+i)<<SHIFT)); + } + + return errn; + } + + static void times() { + System.out.println("Time"); + long start, end; + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test1_rol(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test1_rol: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test1_ror(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test1_ror: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test2_rol(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test2_rol: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test2_ror(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test2_ror: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test3_rol(a0, a1, SHIFT); + } + end = System.currentTimeMillis(); + System.out.println("test3_rol: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test3_ror(a0, a1, SHIFT); + } + end = System.currentTimeMillis(); + System.out.println("test3_ror: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolc(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rolc: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolv(a0, a1, VALUE); + } + end = System.currentTimeMillis(); + System.out.println("test_rolv: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorc(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rorc: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorv(a0, a1, VALUE); + } + end = System.currentTimeMillis(); + System.out.println("test_rorv: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolc_n(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rolc_n: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolv(a0, a1, -VALUE); + } + end = System.currentTimeMillis(); + System.out.println("test_rolv_n: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorc_n(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rorc_n: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorv(a0, a1, -VALUE); + } + end = System.currentTimeMillis(); + System.out.println("test_rorv_n: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolc_o(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rolc_o: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolv(a0, a1, SHIFT); + } + end = System.currentTimeMillis(); + System.out.println("test_rolv_o: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorc_o(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rorc_o: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorv(a0, a1, SHIFT); + } + end = System.currentTimeMillis(); + System.out.println("test_rorv_o: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolc_on(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rolc_on: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rolv(a0, a1, -SHIFT); + } + end = System.currentTimeMillis(); + System.out.println("test_rolv_on: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorc_on(a0, a1); + } + end = System.currentTimeMillis(); + System.out.println("test_rorc_on: " + (end - start)); + + start = System.currentTimeMillis(); + for (int i=0; i<ITERS; i++) { + test_rorv(a0, a1, -SHIFT); + } + end = System.currentTimeMillis(); + System.out.println("test_rorv_on: " + (end - start)); + } + + static void test_rolc(long[] a0, long[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateLeft(a1[i], VALUE)); + } + } + + static void test_rolc_n(long[] a0, long[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateLeft(a1[i], (-VALUE))); + } + } + + static void test_rolc_o(long[] a0, long[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateLeft(a1[i], SHIFT)); + } + } + + static void test_rolc_on(long[] a0, long[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateLeft(a1[i], (-SHIFT))); + } + } + + static void test_rolv(long[] a0, long[] a1, int shift) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateLeft(a1[i], shift)); + } + } + + static void test_rorc(long[] a0, long[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateRight(a1[i], VALUE)); + } + } + + static void test_rorc_n(long[] a0, long[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateRight(a1[i], (-VALUE))); + } + } + + static void test_rorc_o(long[] a0, long[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateRight(a1[i], SHIFT)); + } + } + + static void test_rorc_on(long[] a0, long[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateRight(a1[i], (-SHIFT))); + } + } + + static void test_rorv(long[] a0, long[] a1, int shift) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateRight(a1[i], shift)); + } + } + + static void test1_rol(long[] a0, long[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateLeft(a1[i], SHIFT_GT_IMM8)); + } + } + + static void test1_ror(long[] a0, long[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateRight(a1[i], SHIFT_GT_IMM8)); + } + } + + static void test2_rol(long[] a0, long[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateLeft(a1[i], SHIFT_LT_IMM8)); + } + } + + static void test2_ror(long[] a0, long[] a1) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateRight(a1[i], SHIFT_LT_IMM8)); + } + } + + static void test3_rol(long[] a0, long[] a1, int shift) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateLeft(a1[i], shift)); + } + } + + static void test3_ror(long[] a0, long[] a1, int shift) { + for (int i = 0; i < a0.length; i+=1) { + a0[i] = (long)(Long.rotateRight(a1[i], shift)); + } + } + + static int verify(String text, int i, long elem, long val) { + if (elem != val) { + System.err.println(text + "[" + i + "] = " + elem + " != " + val); + return 1; + } + return 0; + } + +} diff --git a/test/hotspot/jtreg/compiler/c2/cr7200264/TestDriver.java b/test/hotspot/jtreg/compiler/c2/cr7200264/TestDriver.java index bc8a987ffb2..3f9ddcd168f 100644 --- a/test/hotspot/jtreg/compiler/c2/cr7200264/TestDriver.java +++ b/test/hotspot/jtreg/compiler/c2/cr7200264/TestDriver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -56,7 +56,7 @@ private List<String> executeApplication() throws Throwable { private void verifyVectorizationNumber(List<String> vectorizationLog) { for (Map.Entry<String, Long> entry : expectedVectorizationNumbers.entrySet()) { - String v = "\t" + entry.getKey(); + String v = entry.getKey(); long actualNum = vectorizationLog.stream() .filter(s -> s.contains(v)).count(); long expectedNum = entry.getValue(); diff --git a/test/hotspot/jtreg/compiler/debug/TestGenerateStressSeed.java b/test/hotspot/jtreg/compiler/debug/TestGenerateStressSeed.java new file mode 100644 index 00000000000..a477f590d70 --- /dev/null +++ b/test/hotspot/jtreg/compiler/debug/TestGenerateStressSeed.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package compiler.debug; + +import java.nio.file.Paths; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.Asserts; + +/* + * @test + * @bug 8252219 + * @requires vm.compiler2.enabled + * @summary Tests that using -XX:+StressIGVN without -XX:StressSeed=N generates + * and logs a random seed. + * @library /test/lib / + * @run driver compiler.debug.TestGenerateStressSeed + */ + +public class TestGenerateStressSeed { + + static void sum(int n) { + int acc = 0; + for (int i = 0; i < n; i++) acc += i; + System.out.println(acc); + } + + public static void main(String[] args) throws Exception { + if (args.length == 0) { + String className = TestGenerateStressSeed.class.getName(); + String log = "test.log"; + String[] procArgs = { + "-Xcomp", "-XX:-TieredCompilation", "-XX:+UnlockDiagnosticVMOptions", + "-XX:CompileOnly=" + className + "::sum", "-XX:+StressIGVN", + "-XX:+LogCompilation", "-XX:LogFile=" + log, className, "10"}; + ProcessTools.createJavaProcessBuilder(procArgs).start().waitFor(); + new OutputAnalyzer(Paths.get(log)) + .shouldContain("stress_test seed"); + } else if (args.length > 0) { + sum(Integer.parseInt(args[0])); + } + } +} diff --git a/test/hotspot/jtreg/compiler/debug/TestStressIGVN.java b/test/hotspot/jtreg/compiler/debug/TestStressIGVN.java new file mode 100644 index 00000000000..37103bd6ef5 --- /dev/null +++ b/test/hotspot/jtreg/compiler/debug/TestStressIGVN.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package compiler.debug; + +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.Asserts; + +/* + * @test + * @bug 8252219 + * @requires vm.debug == true & vm.compiler2.enabled + * @summary Tests that compilations with the same seed yield the same IGVN + * trace, and compilations with different seeds yield different IGVN + * traces. + * @library /test/lib / + * @run driver compiler.debug.TestStressIGVN + */ + +public class TestStressIGVN { + + static String igvnTrace(int stressSeed) throws Exception { + String className = TestStressIGVN.class.getName(); + String[] procArgs = { + "-Xcomp", "-XX:-TieredCompilation", + "-XX:CompileOnly=" + className + "::sum", "-XX:+TraceIterativeGVN", + "-XX:+StressIGVN", "-XX:StressSeed=" + stressSeed, + className, "10"}; + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(procArgs); + OutputAnalyzer out = new OutputAnalyzer(pb.start()); + return out.getStdout(); + } + + static void sum(int n) { + int acc = 0; + for (int i = 0; i < n; i++) acc += i; + System.out.println(acc); + } + + public static void main(String[] args) throws Exception { + if (args.length == 0) { + Asserts.assertEQ(igvnTrace(10), igvnTrace(10), + "got different IGVN traces for the same seed"); + Asserts.assertNE(igvnTrace(10), igvnTrace(20), + "got the same IGVN trace for different seeds"); + } else if (args.length > 0) { + sum(Integer.parseInt(args[0])); + } + } +} diff --git a/test/hotspot/jtreg/compiler/dependencies/MonomorphicObjectCall/java.base/java/lang/Object.java b/test/hotspot/jtreg/compiler/dependencies/MonomorphicObjectCall/java.base/java/lang/Object.java index cbe46303e08..b36cd24dc6a 100644 --- a/test/hotspot/jtreg/compiler/dependencies/MonomorphicObjectCall/java.base/java/lang/Object.java +++ b/test/hotspot/jtreg/compiler/dependencies/MonomorphicObjectCall/java.base/java/lang/Object.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -23,7 +23,7 @@ package java.lang; -import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.IntrinsicCandidate; /** * Slightly modified version of java.lang.Object that replaces @@ -31,30 +31,30 @@ */ public class Object { - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public Object() {} - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native Class<?> getClass(); - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public native int hashCode(); public boolean equals(Object obj) { return (this == obj); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate protected native Object clone() throws CloneNotSupportedException; public String toString() { return getClass().getName() + "@" + Integer.toHexString(hashCode()); } - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native void notify(); - @HotSpotIntrinsicCandidate + @IntrinsicCandidate public final native void notifyAll(); public final native void wait(long timeout) throws InterruptedException; diff --git a/test/hotspot/jtreg/compiler/jsr292/NonInlinedCall/RedefineTest.java b/test/hotspot/jtreg/compiler/jsr292/NonInlinedCall/RedefineTest.java index 0ee91c31a07..1357b49f4e6 100644 --- a/test/hotspot/jtreg/compiler/jsr292/NonInlinedCall/RedefineTest.java +++ b/test/hotspot/jtreg/compiler/jsr292/NonInlinedCall/RedefineTest.java @@ -28,7 +28,7 @@ * java.base/jdk.internal.misc * java.base/jdk.internal.vm.annotation * @library /test/lib / ../patches - * @requires vm.flavor != "minimal" + * @requires vm.jvmti * * @build sun.hotspot.WhiteBox * java.base/java.lang.invoke.MethodHandleHelper diff --git a/test/hotspot/jtreg/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java b/test/hotspot/jtreg/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java index a0979704f5f..99b195fb0ff 100644 --- a/test/hotspot/jtreg/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java +++ b/test/hotspot/jtreg/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java @@ -31,6 +31,7 @@ * java.instrument * java.management * jdk.attach + * @requires vm.jvmti * * @run main/othervm -Djdk.attach.allowAttachSelf compiler.jsr292.RedefineMethodUsedByMultipleMethodHandles */ diff --git a/test/hotspot/jtreg/compiler/jsr292/cr8026328/Test8026328.java b/test/hotspot/jtreg/compiler/jsr292/cr8026328/Test8026328.java index b745e49a592..f32291f91ed 100644 --- a/test/hotspot/jtreg/compiler/jsr292/cr8026328/Test8026328.java +++ b/test/hotspot/jtreg/compiler/jsr292/cr8026328/Test8026328.java @@ -24,6 +24,7 @@ /* * @test * @bug 8026328 + * @requires vm.jvmti * @run main/othervm/native -agentlib:Test8026328 compiler.jsr292.cr8026328.Test8026328 */ diff --git a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java index 758293a4c5b..20bea206337 100644 --- a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java +++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java @@ -24,6 +24,7 @@ /** * @test * @requires vm.jvmci + * @requires vm.jvmti * @library ../../../../../ * @modules jdk.internal.vm.ci/jdk.vm.ci.meta * jdk.internal.vm.ci/jdk.vm.ci.runtime diff --git a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java index 4a73e2b2aa2..4afe869305a 100644 --- a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java +++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java @@ -83,13 +83,13 @@ /** * Tests for {@link ResolvedJavaType}. */ -@SuppressWarnings("unchecked") public class TestResolvedJavaType extends TypeUniverse { private static final Class<? extends Annotation> SIGNATURE_POLYMORPHIC_CLASS = findPolymorphicSignatureClass(); public TestResolvedJavaType() { } + @SuppressWarnings("unchecked") private static Class<? extends Annotation> findPolymorphicSignatureClass() { Class<? extends Annotation> signaturePolyAnnotation = null; try { @@ -185,8 +185,10 @@ public void getHostClassTest() throws Exception { } } - class LocalClass {} - Cloneable clone = new Cloneable() {}; + class LocalClass { + } + Cloneable clone = new Cloneable() { + }; assertNull(metaAccess.lookupJavaType(LocalClass.class).getHostClass()); assertNull(metaAccess.lookupJavaType(clone.getClass()).getHostClass()); @@ -773,17 +775,36 @@ public void resolveMethodTest() { for (Method decl : decls) { ResolvedJavaMethod m = metaAccess.lookupJavaMethod(decl); if (m.isPublic()) { - ResolvedJavaMethod resolvedmethod = type.resolveMethod(m, context); + ResolvedJavaMethod resolvedMethod = type.resolveMethod(m, context); if (isSignaturePolymorphic(m)) { // Signature polymorphic methods must not be resolved - assertNull(resolvedmethod); + assertNull(resolvedMethod); } else { ResolvedJavaMethod i = metaAccess.lookupJavaMethod(impl); - assertEquals(m.toString(), i, resolvedmethod); + assertEquals(m.toString(), i, resolvedMethod); } } } } + // For backwards compatibility treat constructors as resolvable even though they + // aren't virtually dispatched. + ResolvedJavaType declaringClass = metaAccess.lookupJavaType(c); + for (Constructor<?> m : c.getDeclaredConstructors()) { + ResolvedJavaMethod decl = metaAccess.lookupJavaMethod(m); + ResolvedJavaMethod impl = type.resolveMethod(decl, declaringClass); + assertEquals(m.toString(), decl, impl); + } + for (Method m : c.getDeclaredMethods()) { + if (isStatic(m.getModifiers())) { + // resolveMethod really shouldn't be called with static methods and the + // result is is somewhat inconsistent so just ignore them + continue; + } + ResolvedJavaMethod decl = metaAccess.lookupJavaMethod(m); + ResolvedJavaMethod impl = type.resolveMethod(decl, declaringClass); + ResolvedJavaMethod expected = isSignaturePolymorphic(decl) ? null : decl; + assertEquals(m.toString(), expected, impl); + } } } } diff --git a/test/hotspot/jtreg/compiler/loopopts/UseCountedLoopSafepointsTest.java b/test/hotspot/jtreg/compiler/loopopts/UseCountedLoopSafepointsTest.java index abfc77f2648..19ff05f6890 100644 --- a/test/hotspot/jtreg/compiler/loopopts/UseCountedLoopSafepointsTest.java +++ b/test/hotspot/jtreg/compiler/loopopts/UseCountedLoopSafepointsTest.java @@ -73,12 +73,12 @@ private static void check(boolean enabled) { List<Node> safePoints = new ArrayList<>(); List<Node> loopEnds = new ArrayList<>(); for (String line : oa.getOutput().split("\\n")) { - int separatorIndex = line.indexOf("\t==="); + int separatorIndex = line.indexOf(" ==="); if (separatorIndex > -1) { String header = line.substring(0, separatorIndex); - if (header.endsWith("\tSafePoint")) { + if (header.endsWith("SafePoint")) { safePoints.add(new Node("SafePoint", line)); - } else if (header.endsWith("\tCountedLoopEnd")) { + } else if (header.endsWith("CountedLoopEnd")) { loopEnds.add(new Node("CountedLoopEnd", line)); } } @@ -110,7 +110,7 @@ public Node(String name, String str) { List<Integer> tmpFrom = new ArrayList<>(); List<Integer> tmpTo = new ArrayList<>(); // parse string like: " $id $name === $to1 $to2 ... [[ $from1 $from2 ... ]] $anything" - // example: 318 SafePoint === 317 1 304 1 1 10 308 [[ 97 74 ]] ... + // example: 318 SafePoint === 317 1 304 1 1 10 308 [[ 97 74 ]] ... id = Integer.parseInt(str.substring(1, str.indexOf(name)).trim()); Arrays.stream(str.substring(str.indexOf("===") + 4, str.indexOf("[[")).trim().split("\\s+")) .map(Integer::parseInt) diff --git a/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass/Launcher.java b/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass/Launcher.java index 6220aacf74f..f487da11cda 100644 --- a/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass/Launcher.java +++ b/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass/Launcher.java @@ -28,6 +28,7 @@ * @modules java.base/jdk.internal.misc * java.instrument * java.management + * @requires vm.jvmti * @build compiler.profiling.spectrapredefineclass.Agent * @run driver ClassFileInstaller compiler.profiling.spectrapredefineclass.Agent * @run driver compiler.profiling.spectrapredefineclass.Launcher diff --git a/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java b/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java index 58a5967a204..d504f653071 100644 --- a/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java +++ b/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java @@ -28,6 +28,7 @@ * @modules java.base/jdk.internal.misc * java.instrument * java.management + * @requires vm.jvmti * @build compiler.profiling.spectrapredefineclass_classloaders.Agent * compiler.profiling.spectrapredefineclass_classloaders.Test * compiler.profiling.spectrapredefineclass_classloaders.A diff --git a/test/hotspot/jtreg/compiler/unsafe/TestUnsafeUnalignedSwap.java b/test/hotspot/jtreg/compiler/unsafe/TestUnsafeUnalignedSwap.java deleted file mode 100644 index fa68477ccdb..00000000000 --- a/test/hotspot/jtreg/compiler/unsafe/TestUnsafeUnalignedSwap.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2020 Alibaba Group Holding 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* @test - * @library / /test/lib - * @bug 8246051 - * @summary A test for SIGBUS in aarch64 by unalgined unsafe access - * @requires os.arch=="aarch64" - * @run main/othervm/timeout=200 -XX:-Inline TestUnsafeUnalignedSwap - */ - -import sun.misc.Unsafe; -import java.lang.reflect.Field; -import java.util.*; -import jdk.test.lib.Asserts; - -public class TestUnsafeUnalignedSwap { - private final static Unsafe U; - private static long sum = 4; - static volatile long[] arrayLong = new long[1001]; - static volatile int[] arrayInt = new int[1001]; - static { - try { - Field f = Unsafe.class.getDeclaredField("theUnsafe"); - f.setAccessible(true); - U = (Unsafe) f.get(null); - } catch (ReflectiveOperationException e) { - throw new InternalError(e); - } - } - // Bug 8246051 : Unsafe.compareAndSwapLong should not crash - public static void testCompareAndSwapLong() { - try { - if (U.compareAndSwapLong(arrayLong, Unsafe.ARRAY_LONG_BASE_OFFSET + 1, 3243, 2334)) { - sum++; - } else { - sum--; - } - } catch (InternalError e) { - System.out.println(e.getMessage()); - } - } - public static void testCompareAndSwapInt() { - try { - if (U.compareAndSwapInt(arrayInt, Unsafe.ARRAY_INT_BASE_OFFSET + 1, 3243, 2334)) { - sum++; - } else { - sum--; - } - } catch (InternalError e) { - System.out.println(e.getMessage()); - } - } - public static void test() { - testCompareAndSwapLong(); - testCompareAndSwapInt(); - } - public static void main(String[] args) { - test(); - } -} diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/InlineTypeTest.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/InlineTypeTest.java index 67f0e00b8e2..4fcf3533a86 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/InlineTypeTest.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/InlineTypeTest.java @@ -131,7 +131,7 @@ public abstract class InlineTypeTest { private static final boolean PRINT_GRAPH = true; private static final boolean VERBOSE = Boolean.parseBoolean(System.getProperty("Verbose", "false")); private static final boolean PRINT_TIMES = Boolean.parseBoolean(System.getProperty("PrintTimes", "false")); - private static final boolean COMPILE_COMMANDS = Boolean.parseBoolean(System.getProperty("CompileCommands", "true")); + private static final boolean COMPILE_COMMANDS = Boolean.parseBoolean(System.getProperty("CompileCommands", "true")) && !XCOMP; private static boolean VERIFY_IR = Boolean.parseBoolean(System.getProperty("VerifyIR", "true")) && !XCOMP && !TEST_C1 && COMPILE_COMMANDS; private static final boolean VERIFY_VM = Boolean.parseBoolean(System.getProperty("VerifyVM", "false")); private static final String SCENARIOS = System.getProperty("Scenarios", ""); @@ -143,7 +143,7 @@ public abstract class InlineTypeTest { private static final boolean GC_AFTER = Boolean.parseBoolean(System.getProperty("GCAfter", "false")); private static final int OSR_TEST_TIMEOUT = Integer.parseInt(System.getProperty("OSRTestTimeOut", "5000")); protected static final boolean STRESS_CC = Boolean.parseBoolean(System.getProperty("StressCC", "false")); - private static final boolean SHUFFLE_TESTS = Boolean.parseBoolean(System.getProperty("ShuffleTests", "false")); + private static final boolean SHUFFLE_TESTS = Boolean.parseBoolean(System.getProperty("ShuffleTests", "true")); // "jtreg -DXcomp=true" runs all the scenarios with -Xcomp. This is faster than "jtreg -javaoptions:-Xcomp". protected static final boolean RUN_SCENARIOS_WITH_XCOMP = Boolean.parseBoolean(System.getProperty("Xcomp", "false")); @@ -195,8 +195,8 @@ public abstract class InlineTypeTest { protected static final boolean PRINT_IDEAL = WHITE_BOX.getBooleanVMFlag("PrintIdeal"); // Regular expressions used to match nodes in the PrintIdeal output - protected static final String START = "(\\d+\\t(.*"; - protected static final String MID = ".*)+\\t===.*"; + protected static final String START = "(\\d+ (.*"; + protected static final String MID = ".*)+ ===.*"; protected static final String END = ")|"; // Generic allocation protected static final String ALLOC_G = "(.*call,static wrapper for: _new_instance_Java" + END; @@ -231,6 +231,7 @@ public abstract class InlineTypeTest { protected static final String CHECKCAST_ARRAY = "(cmp.*precise klass \\[(L|Q)compiler/valhalla/inlinetypes/MyValue.*" + END; protected static final String CHECKCAST_ARRAYCOPY = "(.*call_leaf_nofp,runtime checkcast_arraycopy.*" + END; protected static final String JLONG_ARRAYCOPY = "(.*call_leaf_nofp,runtime jlong_disjoint_arraycopy.*" + END; + protected static final String FIELD_ACCESS = "(.*Field: *" + END; public static String[] concat(String prefix[], String... extra) { ArrayList<String> list = new ArrayList<String>(); @@ -263,32 +264,31 @@ public int getNumScenarios() { public String[] getVMParameters(int scenario) { switch (scenario) { case 0: return new String[] { - "-XX:-UseArrayLoadStoreProfile", "-XX:+AlwaysIncrementalInline", "-XX:FlatArrayElementMaxOops=5", "-XX:FlatArrayElementMaxSize=-1", + "-XX:-UseArrayLoadStoreProfile", "-XX:InlineFieldMaxFlatSize=-1", "-XX:+InlineTypePassFieldsAsArgs", "-XX:+InlineTypeReturnedAsFields"}; case 1: return new String[] { - "-XX:-UseArrayLoadStoreProfile", "-XX:-UseCompressedOops", "-XX:FlatArrayElementMaxOops=5", "-XX:FlatArrayElementMaxSize=-1", + "-XX:-UseArrayLoadStoreProfile", "-XX:InlineFieldMaxFlatSize=-1", "-XX:-InlineTypePassFieldsAsArgs", "-XX:-InlineTypeReturnedAsFields"}; case 2: return new String[] { - "-XX:-UseArrayLoadStoreProfile", "-XX:-UseCompressedOops", "-XX:FlatArrayElementMaxOops=0", "-XX:FlatArrayElementMaxSize=0", + "-XX:-UseArrayLoadStoreProfile", "-XX:InlineFieldMaxFlatSize=-1", "-XX:+InlineTypePassFieldsAsArgs", "-XX:+InlineTypeReturnedAsFields", "-XX:+StressInlineTypeReturnedAsFields"}; case 3: return new String[] { - "-XX:-UseArrayLoadStoreProfile", "-DVerifyIR=false", "-XX:+AlwaysIncrementalInline", "-XX:FlatArrayElementMaxOops=0", @@ -297,7 +297,6 @@ public String[] getVMParameters(int scenario) { "-XX:+InlineTypePassFieldsAsArgs", "-XX:+InlineTypeReturnedAsFields"}; case 4: return new String[] { - "-XX:-UseArrayLoadStoreProfile", "-DVerifyIR=false", "-XX:FlatArrayElementMaxOops=-1", "-XX:FlatArrayElementMaxSize=-1", @@ -306,10 +305,10 @@ public String[] getVMParameters(int scenario) { "-XX:-InlineTypeReturnedAsFields", "-XX:-ReduceInitialCardMarks"}; case 5: return new String[] { - "-XX:-UseArrayLoadStoreProfile", "-XX:+AlwaysIncrementalInline", "-XX:FlatArrayElementMaxOops=5", "-XX:FlatArrayElementMaxSize=-1", + "-XX:-UseArrayLoadStoreProfile", "-XX:InlineFieldMaxFlatSize=-1", "-XX:-InlineTypePassFieldsAsArgs", "-XX:-InlineTypeReturnedAsFields"}; diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrays.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrays.java index d931be2ce7b..c53ecbd6879 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrays.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestArrays.java @@ -340,6 +340,7 @@ public int test12() { } } + @DontCompile public void test12_verifier(boolean warmup) { Asserts.assertEQ(test12(), rI); } @@ -361,6 +362,7 @@ public int test13() { } } + @DontCompile public void test13_verifier(boolean warmup) { Asserts.assertEQ(test13(), rI); } @@ -371,6 +373,7 @@ public int test14(MyValue1[] va, int index) { return va[index].x; } + @DontCompile public void test14_verifier(boolean warmup) { int arraySize = Math.abs(rI) % 10; MyValue1[] va = new MyValue1[arraySize]; @@ -406,6 +409,7 @@ public int test15() { } } + @DontCompile public void test15_verifier(boolean warmup) { Asserts.assertEQ(test15(), rI); } @@ -426,6 +430,7 @@ public int test16() { } } + @DontCompile public void test16_verifier(boolean warmup) { Asserts.assertEQ(test16(), rI); } @@ -3008,4 +3013,96 @@ public void test129_verifier(boolean warmup) { // expected } } + + // Empty inline type array access + @Test(failOn = ALLOC + ALLOCA + LOAD + STORE) + public MyValueEmpty test130(MyValueEmpty[] array) { + array[0] = new MyValueEmpty(); + return array[1]; + } + + @DontCompile + public void test130_verifier(boolean warmup) { + MyValueEmpty[] array = new MyValueEmpty[2]; + MyValueEmpty empty = test130(array); + Asserts.assertEquals(array[0], MyValueEmpty.default); + Asserts.assertEquals(empty, MyValueEmpty.default); + } + + static inline class EmptyContainer { + MyValueEmpty empty = MyValueEmpty.default; + } + + // TODO disabled until JDK-8253893 is fixed +/* + // Empty inline type container array access + @Test(failOn = ALLOC + ALLOCA + LOAD + STORE) + public MyValueEmpty test131(EmptyContainer[] array) { + array[0] = new EmptyContainer(); + return array[1].empty; + } + + @DontCompile + public void test131_verifier(boolean warmup) { + EmptyContainer[] array = new EmptyContainer[2]; + MyValueEmpty empty = test131(array); + Asserts.assertEquals(array[0], EmptyContainer.default); + Asserts.assertEquals(empty, MyValueEmpty.default); + } +*/ + + // Empty inline type array access with unknown array type + @Test() + public Object test132(Object[] array) { + array[0] = new MyValueEmpty(); + return array[1]; + } + + @DontCompile + public void test132_verifier(boolean warmup) { + Object[] array = new MyValueEmpty[2]; + Object empty = test132(array); + Asserts.assertEquals(array[0], MyValueEmpty.default); + Asserts.assertEquals(empty, MyValueEmpty.default); + array = new Object[2]; + empty = test132(array); + Asserts.assertEquals(array[0], MyValueEmpty.default); + Asserts.assertEquals(empty, null); + } + + // TODO disabled until JDK-8253893 is fixed +/* + // Empty inline type container array access with unknown array type + @Test() + public Object test133(Object[] array) { + array[0] = new EmptyContainer(); + return array[1]; + } + + @DontCompile + public void test133_verifier(boolean warmup) { + Object[] array = new EmptyContainer[2]; + Object empty = test133(array); + Asserts.assertEquals(array[0], EmptyContainer.default); + Asserts.assertEquals(empty, EmptyContainer.default); + array = new Object[2]; + empty = test133(array); + Asserts.assertEquals(array[0], EmptyContainer.default); + Asserts.assertEquals(empty, null); + } +*/ + + // Non-escaping empty inline type array access + @Test(failOn = ALLOC + ALLOCA + LOAD + STORE) + public static MyValueEmpty test134(MyValueEmpty val) { + MyValueEmpty[] array = new MyValueEmpty[1]; + array[0] = val; + return array[0]; + } + + @DontCompile + public void test134_verifier(boolean warmup) { + MyValueEmpty empty = test134(MyValueEmpty.default); + Asserts.assertEquals(empty, MyValueEmpty.default); + } } diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestCallingConvention.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestCallingConvention.java index cd8a71c6e76..fffbbf608f8 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestCallingConvention.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestCallingConvention.java @@ -74,7 +74,8 @@ public String[] getExtraVMParameters(int scenario) { public static void main(String[] args) throws Throwable { TestCallingConvention test = new TestCallingConvention(); - test.run(args, MyValue1.class, MyValue2.class, MyValue2Inline.class, MyValue3.class, MyValue3Inline.class, MyValue4.class, Test27Value1.class, Test27Value2.class, Test27Value3.class, Test37Value.class); + test.run(args, MyValue1.class, MyValue2.class, MyValue2Inline.class, MyValue3.class, MyValue3Inline.class, MyValue4.class, + Test27Value1.class, Test27Value2.class, Test27Value3.class, Test37Value.class, EmptyContainer.class, MixedContainer.class); } // Test interpreter to compiled code with various signatures @@ -901,4 +902,137 @@ public void test40_verifier(boolean warmup) { LargeValueWithoutOops res = test40(vt); Asserts.assertEQ(res, vt); } + + // Test passing/returning an empty inline type together with non-empty + // inline types such that only some inline type arguments are scalarized. + @Test(failOn = ALLOC + LOAD + STORE + TRAP) + public MyValueEmpty test41(MyValue1 vt1, MyValueEmpty vt2, MyValue1 vt3) { + return vt2.copy(vt2); + } + + @DontCompile + public void test41_verifier(boolean warmup) { + MyValueEmpty res = test41(MyValue1.default, MyValueEmpty.default, MyValue1.default); + Asserts.assertEQ(res, MyValueEmpty.default); + } + + // More empty inline type tests with containers + + static inline class EmptyContainer { + private MyValueEmpty empty; + + EmptyContainer(MyValueEmpty empty) { + this.empty = empty; + } + + @ForceInline + MyValueEmpty getInline() { return empty; } + + @DontInline + MyValueEmpty getNoInline() { return empty; } + } + + static inline class MixedContainer { + public int val; + private EmptyContainer empty; + + MixedContainer(int val, EmptyContainer empty) { + this.val = val; + this.empty = empty; + } + + @ForceInline + EmptyContainer getInline() { return empty; } + + @DontInline + EmptyContainer getNoInline() { return empty; } + } + + // Empty inline type return + @Test(failOn = ALLOC + LOAD + STORE + TRAP) + public MyValueEmpty test42() { + EmptyContainer c = new EmptyContainer(MyValueEmpty.default); + return c.getInline(); + } + + @DontCompile + public void test42_verifier(boolean warmup) { + MyValueEmpty empty = test42(); + Asserts.assertEquals(empty, MyValueEmpty.default); + } + + // Empty inline type container return + @Test(failOn = ALLOC + LOAD + STORE + TRAP) + public EmptyContainer test43(EmptyContainer c) { + return c; + } + + @DontCompile + public void test43_verifier(boolean warmup) { + EmptyContainer c = test43(EmptyContainer. default); + Asserts.assertEquals(c, EmptyContainer.default); + } + + // Empty inline type container (mixed) return + @Test(failOn = ALLOC + LOAD + STORE + TRAP) + public MixedContainer test44() { + MixedContainer c = new MixedContainer(rI, EmptyContainer.default); + c = new MixedContainer(rI, c.getInline()); + return c; + } + + @DontCompile + public void test44_verifier(boolean warmup) { + MixedContainer c = test44(); + Asserts.assertEquals(c, new MixedContainer(rI, EmptyContainer.default)); + } + + // Empty inline type container argument + @Test(failOn = ALLOC + LOAD + STORE + TRAP) + public EmptyContainer test45(EmptyContainer c) { + return new EmptyContainer(c.getInline()); + } + + @DontCompile + public void test45_verifier(boolean warmup) { + EmptyContainer empty = test45(EmptyContainer.default); + Asserts.assertEquals(empty, EmptyContainer.default); + } + + // Empty inline type container and mixed container arguments + @Test(failOn = ALLOC + LOAD + STORE + TRAP) + public MyValueEmpty test46(EmptyContainer c1, MixedContainer c2, MyValueEmpty empty) { + c2 = new MixedContainer(c2.val, c1); + return c2.getNoInline().getNoInline(); + } + + @DontCompile + public void test46_verifier(boolean warmup) { + MyValueEmpty empty = test46(EmptyContainer.default, MixedContainer.default, MyValueEmpty.default); + Asserts.assertEquals(empty, MyValueEmpty.default); + } + + // No receiver and only empty argument + @Test(failOn = ALLOC + LOAD + STORE + TRAP) + public static MyValueEmpty test47(MyValueEmpty empty) { + return empty; + } + + @DontCompile + public void test47_verifier(boolean warmup) { + MyValueEmpty empty = test47(MyValueEmpty.default); + Asserts.assertEquals(empty, MyValueEmpty.default); + } + + // No receiver and only empty container argument + @Test(failOn = ALLOC + LOAD + STORE + TRAP) + public static MyValueEmpty test48(EmptyContainer empty) { + return empty.getNoInline(); + } + + @DontCompile + public void test48_verifier(boolean warmup) { + MyValueEmpty empty = test48(EmptyContainer.default); + Asserts.assertEquals(empty, MyValueEmpty.default); + } } diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestGetfieldChains.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestGetfieldChains.java index 38d10d80a2c..0445cc66c03 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestGetfieldChains.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestGetfieldChains.java @@ -96,19 +96,19 @@ public String[] getVMParameters(int scenario) { // Simple chain of getfields ending with primitive field @Test(compLevel=C1) public int test1() { - return NamedRectangle.getP1X(new NamedRectangle()); + return NamedRectangle.getP1X(new NamedRectangle()); } @DontCompile public void test1_verifier(boolean warmup) { - int res = test1(); - Asserts.assertEQ(res, 4); + int res = test1(); + Asserts.assertEQ(res, 4); } // Simple chain of getfields ending with a flattened field @Test(compLevel=C1) public Point test2() { - return NamedRectangle.getP1(new NamedRectangle()); + return NamedRectangle.getP1(new NamedRectangle()); } @DontCompile @@ -182,4 +182,38 @@ public void test5_verifier(boolean warmup) { Asserts.assertEQ(st.getLineNumber(), 31); // line number depends on jcod file generated from NamedRectangle.java Asserts.assertEQ(nsfe.getMessage(), "x"); } + + static inline class EmptyType { } + static inline class EmptyContainer { + int i = 0; + EmptyType et = new EmptyType(); + } + static inline class Container { + EmptyContainer container0 = new EmptyContainer(); + EmptyContainer container1 = new EmptyContainer(); + } + + @Test(compLevel=C1) + public EmptyType test6() { + Container c = new Container(); + return c.container1.et; + } + + @DontCompile + public void test6_verifier(boolean warmup) { + EmptyType et = test6(); + Asserts.assertEQ(et, EmptyType.default); + } + + @Test(compLevel=C1) + public EmptyType test7() { + Container[] ca = new Container[10]; + return ca[3].container0.et; + } + + @DontCompile + public void test7_verifier(boolean warmup) { + EmptyType et = test7(); + Asserts.assertEQ(et, EmptyType.default); + } } diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestIntrinsics.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestIntrinsics.java index cb9d68f458e..14b575c4618 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestIntrinsics.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestIntrinsics.java @@ -67,6 +67,7 @@ public boolean test1(Class<?> supercls, Class<?> subcls) { return supercls.isAssignableFrom(subcls); } + @DontCompile public void test1_verifier(boolean warmup) { Asserts.assertTrue(test1(java.util.AbstractList.class, java.util.ArrayList.class), "test1_1 failed"); Asserts.assertTrue(test1(MyValue1.ref.class, MyValue1.ref.class), "test1_2 failed"); @@ -96,6 +97,7 @@ public boolean test2() { return check1 && check2 && check3 && check4 && check5 && check6 && check7 && check8 && check9 && check10; } + @DontCompile public void test2_verifier(boolean warmup) { Asserts.assertTrue(test2(), "test2 failed"); } @@ -106,6 +108,7 @@ public Class<?> test3(Class<?> cls) { return cls.getSuperclass(); } + @DontCompile public void test3_verifier(boolean warmup) { Asserts.assertTrue(test3(Object.class) == null, "test3_1 failed"); Asserts.assertTrue(test3(MyValue1.ref.class) == MyAbstract.class, "test3_2 failed"); @@ -125,6 +128,7 @@ public boolean test4() { return check1 && check2 && check3 && check4; } + @DontCompile public void test4_verifier(boolean warmup) { Asserts.assertTrue(test4(), "test4 failed"); } diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorld.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorld.java index 37937bf0e05..f0809298025 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorld.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorld.java @@ -3290,19 +3290,98 @@ public void test118_verifier(boolean warmup) { Asserts.assertTrue(res); } + static inline class EmptyContainer { + private MyValueEmpty empty = MyValueEmpty.default; + } + + static inline class MixedContainer { + public int val = rI; + private EmptyContainer empty = EmptyContainer.default; + } + // Test re-allocation of empty inline type array during deoptimization @Test public void test119(boolean deopt) { - MyValueEmpty[] arr = new MyValueEmpty[]{MyValueEmpty.default}; + MyValueEmpty[] array1 = new MyValueEmpty[]{MyValueEmpty.default}; +// TODO disabled until JDK-8253893 is fixed +// EmptyContainer[] array2 = new EmptyContainer[]{EmptyContainer.default}; +// MixedContainer[] array3 = new MixedContainer[]{MixedContainer.default}; if (deopt) { // uncommon trap WHITE_BOX.deoptimizeMethod(tests.get(getClass().getSimpleName() + "::test119")); } - Asserts.assertEquals(arr[0], MyValueEmpty.default); + Asserts.assertEquals(array1[0], MyValueEmpty.default); +// TODO disabled until JDK-8253893 is fixed +// Asserts.assertEquals(array2[0], EmptyContainer.default); +// Asserts.assertEquals(array3[0], MixedContainer.default); } @DontCompile public void test119_verifier(boolean warmup) { test119(!warmup); } + + // Test removal of empty inline type field stores + @Test(failOn = ALLOC + ALLOC_G + LOAD + STORE + FIELD_ACCESS + NULL_CHECK_TRAP + TRAP) + public void test120(MyValueEmpty empty) { + fEmpty1 = empty; + fEmpty3 = empty; + // fEmpty2 and fEmpty4 could be null, store can't be removed + } + + @DontCompile + public void test120_verifier(boolean warmup) { + test120(MyValueEmpty.default); + Asserts.assertEquals(fEmpty1, MyValueEmpty.default); + Asserts.assertEquals(fEmpty2, MyValueEmpty.default); + } + + // Test removal of empty inline type field loads + @Test(failOn = ALLOC + ALLOC_G + LOAD + STORE + FIELD_ACCESS + NULL_CHECK_TRAP + TRAP) + public boolean test121() { + return fEmpty1.equals(fEmpty3); + // fEmpty2 and fEmpty4 could be null, load can't be removed + } + + @DontCompile + public void test121_verifier(boolean warmup) { + boolean res = test121(); + Asserts.assertTrue(res); + } + + // Verify that empty inline type field loads check for null holder + @Test() + public MyValueEmpty test122(TestLWorld t) { + return t.fEmpty3; + } + + @DontCompile + public void test122_verifier(boolean warmup) { + MyValueEmpty res = test122(this); + Asserts.assertEquals(res, MyValueEmpty.default); + try { + test122(null); + throw new RuntimeException("No NPE thrown"); + } catch (NullPointerException e) { + // Expected + } + } + + // Verify that empty inline type field stores check for null holder + @Test() + public void test123(TestLWorld t) { + t.fEmpty3 = MyValueEmpty.default; + } + + @DontCompile + public void test123_verifier(boolean warmup) { + test123(this); + Asserts.assertEquals(fEmpty3, MyValueEmpty.default); + try { + test123(null); + throw new RuntimeException("No NPE thrown"); + } catch (NullPointerException e) { + // Expected + } + } } diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNestmateAccess.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNestmateAccess.java new file mode 100644 index 00000000000..fe5701d9a15 --- /dev/null +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNestmateAccess.java @@ -0,0 +1,206 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package compiler.valhalla.inlinetypes; +import jdk.test.lib.Asserts; + +/** + * @test + * @bug 8253416 + * @summary Test nestmate access to flattened field if nest-host is not loaded. + * @library /test/lib + * @run main/othervm -Xcomp + * -XX:CompileCommand=compileonly,compiler.valhalla.inlinetypes.Test*::<init> + * compiler.valhalla.inlinetypes.TestNestmateAccess + * @run main/othervm -Xcomp -XX:TieredStopAtLevel=1 + * -XX:CompileCommand=compileonly,compiler.valhalla.inlinetypes.Test*::<init> + * compiler.valhalla.inlinetypes.TestNestmateAccess + */ + +interface MyInterface { + int hash(); +} + +inline class MyValue implements MyInterface { + int x = 42; + int y = 43; + + @Override + public int hash() { return x + y; } +} + +// Test load from flattened field in nestmate when nest-host is not loaded. +class Test1 { + private MyValue vt; + + public Test1(final MyValue vt) { + this.vt = vt; + } + + public MyInterface test() { + return new MyInterface() { + // The vt field load does not link. + private int x = (Test1.this).vt.hash(); + + @Override + public int hash() { return x; } + }; + } +} + +// Same as Test1 but outer class is an inline type +inline class Test2 { + private MyValue vt; + + public Test2(final MyValue vt) { + this.vt = vt; + } + + public MyInterface test() { + return new MyInterface() { + // Delayed flattened load of Test2.this. + // The vt field load does not link. + private int x = (Test2.this).vt.hash(); + + @Override + public int hash() { return x; } + }; + } +} + +// Test store to flattened field in nestmate when nest-host is not loaded. +class Test3 { + private MyValue vt; + + public MyInterface test(MyValue init) { + return new MyInterface() { + // Store to the vt field does not link. + private MyValue tmp = (vt = init); + + @Override + public int hash() { return tmp.hash() + vt.hash(); } + }; + } +} + +// Same as Test1 but with static field +class Test4 { + private static MyValue vt; + + public Test4(final MyValue vt) { + this.vt = vt; + } + + public MyInterface test() { + return new MyInterface() { + // The vt field load does not link. + private int x = (Test4.this).vt.hash(); + + @Override + public int hash() { return x; } + }; + } +} + +// Same as Test2 but with static field +inline class Test5 { + private static MyValue vt; + + public Test5(final MyValue vt) { + this.vt = vt; + } + + public MyInterface test() { + return new MyInterface() { + // Delayed flattened load of Test5.this. + // The vt field load does not link. + private int x = (Test5.this).vt.hash(); + + @Override + public int hash() { return x; } + }; + } +} + +// Same as Test3 but with static field +class Test6 { + private static MyValue vt; + + public MyInterface test(MyValue init) { + return new MyInterface() { + // Store to the vt field does not link. + private MyValue tmp = (vt = init); + + @Override + public int hash() { return tmp.hash() + vt.hash(); } + }; + } +} + +// Same as Test6 but outer class is an inline type +inline class Test7 { + private static MyValue vt; + + public MyInterface test(MyValue init) { + return new MyInterface() { + // Store to the vt field does not link. + private MyValue tmp = (vt = init); + + @Override + public int hash() { return tmp.hash() + vt.hash(); } + }; + } +} + +public class TestNestmateAccess { + + public static void main(String[] args) { + Test1 t1 = new Test1(new MyValue()); + int res = t1.test().hash(); + Asserts.assertEQ(res, 85); + + Test2 t2 = new Test2(new MyValue()); + res = t2.test().hash(); + Asserts.assertEQ(res, 85); + + Test3 t3 = new Test3(); + res = t3.test(new MyValue()).hash(); + Asserts.assertEQ(res, 170); + + Test4 t4 = new Test4(new MyValue()); + res = t4.test().hash(); + Asserts.assertEQ(res, 85); + + Test5 t5 = new Test5(new MyValue()); + res = t5.test().hash(); + Asserts.assertEQ(res, 85); + + Test6 t6 = new Test6(); + res = t6.test(new MyValue()).hash(); + Asserts.assertEQ(res, 170); + + Test7 t7 = new Test7(); + res = t7.test(new MyValue()).hash(); + Asserts.assertEQ(res, 170); + } +} diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNullableArrays.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNullableArrays.java index e938575039d..d1107e2983c 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNullableArrays.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestNullableArrays.java @@ -361,6 +361,7 @@ public int test12() { } } + @DontCompile public void test12_verifier(boolean warmup) { Asserts.assertEQ(test12(), rI); } @@ -382,6 +383,7 @@ public int test13() { } } + @DontCompile public void test13_verifier(boolean warmup) { Asserts.assertEQ(test13(), rI); } @@ -392,6 +394,7 @@ public int test14(MyValue1.ref[] va, int index) { return va[index].x; } + @DontCompile public void test14_verifier(boolean warmup) { int arraySize = Math.abs(rI) % 10; MyValue1.ref[] va = new MyValue1.ref[arraySize]; @@ -427,6 +430,7 @@ public int test15() { } } + @DontCompile public void test15_verifier(boolean warmup) { Asserts.assertEQ(test15(), rI); } @@ -447,6 +451,7 @@ public int test16() { } } + @DontCompile public void test16_verifier(boolean warmup) { Asserts.assertEQ(test16(), rI); } diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnloadedInlineTypeField.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnloadedInlineTypeField.java index 02fa8248e5d..265203885e0 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnloadedInlineTypeField.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestUnloadedInlineTypeField.java @@ -39,6 +39,12 @@ */ public class TestUnloadedInlineTypeField extends InlineTypeTest { + // Only prevent loading of classes when testing with C1. Load classes + // early when executing with C2 to prevent uncommon traps. It's still + // beneficial to execute this test with C2 because it also checks handling + // of type mismatches. + private static final boolean PREVENT_LOADING = TEST_C1; + public static void main(String[] args) throws Throwable { TestUnloadedInlineTypeField test = new TestUnloadedInlineTypeField(); test.run(args); @@ -46,7 +52,9 @@ public static void main(String[] args) throws Throwable { static final String[][] scenarios = { {}, - {"-XX:InlineFieldMaxFlatSize=0"} + {"-XX:InlineFieldMaxFlatSize=0"}, + {"-XX:+PatchALot"}, + {"-XX:InlineFieldMaxFlatSize=0", "-XX:+PatchALot"} }; @Override @@ -72,7 +80,7 @@ static final inline class MyValue1 { final int foo; MyValue1() { - foo = 1234; + foo = rI; } } @@ -89,20 +97,22 @@ static MyValue1 test1_precondition() { } @Test - public int test1(MyValue1Holder holder) { + public int test1(Object holder) { if (holder != null) { - return holder.v.foo + 1; + // Don't use MyValue1Holder in the signature, it might trigger class loading + return ((MyValue1Holder)holder).v.foo; } else { return 0; } } + @DontCompile public void test1_verifier(boolean warmup) { - if (warmup) { + if (warmup && PREVENT_LOADING) { test1(null); } else { MyValue1Holder holder = new MyValue1Holder(); - Asserts.assertEQ(test1(holder), 1235); + Asserts.assertEQ(test1(holder), rI); } } @@ -110,7 +120,7 @@ public void test1_verifier(boolean warmup) { // Both the inline type field class, and the holder class have not been loaded. // // aload_0 - // getfield MyValueHolder2.v:QMyValue2; + // getfield MyValue2Holder.v:QMyValue2; // ^ not loaded ^ not loaded // // MyValue2 has not been loaded, because it is not explicitly referenced by @@ -127,26 +137,27 @@ static class MyValue2Holder { MyValue2 v; public MyValue2Holder() { - v = new MyValue2(1234); + v = new MyValue2(rI); } } - @Test - public int test2(MyValue2Holder holder) { + public int test2(Object holder) { if (holder != null) { - return holder.v.foo + 2; + // Don't use MyValue2Holder in the signature, it might trigger class loading + return ((MyValue2Holder)holder).v.foo; } else { return 0; } } + @DontCompile public void test2_verifier(boolean warmup) { - if (warmup) { + if (warmup && PREVENT_LOADING) { test2(null); } else { - MyValue2Holder holder2 = new MyValue2Holder(); - Asserts.assertEQ(test2(holder2), 1236); + MyValue2Holder holder = new MyValue2Holder(); + Asserts.assertEQ(test2(holder), rI); } } @@ -156,7 +167,7 @@ public void test2_verifier(boolean warmup) { // // GetUnresolvedInlineFieldWrongSignature::test3() { // aload_0 - // getfield MyValueHolder3.v:LMyValue3; + // getfield MyValue3Holder.v:LMyValue3; // ^ not loaded ^ already loaded (but should have been "Q") // ... // } @@ -167,7 +178,7 @@ static final inline class MyValue3 { final int foo; public MyValue3() { - foo = 1234; + foo = rI; } } @@ -184,20 +195,25 @@ static MyValue3 test3_precondition() { } @Test - public int test3(MyValue3Holder holder) { + public int test3(Object holder) { + // Don't use MyValue3Holder in the signature, it might trigger class loading return GetUnresolvedInlineFieldWrongSignature.test3(holder); } + @DontCompile public void test3_verifier(boolean warmup) { - if (warmup) { + if (warmup && PREVENT_LOADING) { test3(null); } else { - MyValue3Holder holder = new MyValue3Holder(); - try { - test3(holder); - Asserts.fail("Should have thrown NoSuchFieldError"); - } catch (NoSuchFieldError e) { - // OK + // Make sure klass is resolved + for (int i = 0; i < 10; ++i) { + MyValue3Holder holder = new MyValue3Holder(); + try { + test3(holder); + Asserts.fail("Should have thrown NoSuchFieldError"); + } catch (NoSuchFieldError e) { + // OK + } } } } @@ -220,25 +236,23 @@ public MyValue4Holder() { } } - static MyValue4 test4_precondition() { - return new MyValue4(0); - } - @Test - public void test4(MyValue4Holder holder, MyValue4 v) { + public void test4(Object holder, MyValue4 v) { if (holder != null) { - holder.v = v; + // Don't use MyValue4Holder in the signature, it might trigger class loading + ((MyValue4Holder)holder).v = v; } } + @DontCompile public void test4_verifier(boolean warmup) { - MyValue4 v = new MyValue4(5678); - if (warmup) { + MyValue4 v = new MyValue4(rI); + if (warmup && PREVENT_LOADING) { test4(null, v); } else { MyValue4Holder holder = new MyValue4Holder(); test4(holder, v); - Asserts.assertEQ(holder.v.foo, 5678); + Asserts.assertEQ(holder.v.foo, rI); } } @@ -258,81 +272,283 @@ static class MyValue5Holder { public MyValue5Holder() { v = new MyValue5(0); } + public Object make(int n) { return new MyValue5(n); } } @Test - public void test5(MyValue5Holder holder, Object o) { + public void test5(Object holder, Object o) { if (holder != null) { + // Don't use MyValue5 and MyValue5Holder in the signature, it might trigger class loading MyValue5 v = (MyValue5)o; - holder.v = v; + ((MyValue5Holder)holder).v = v; } } + @DontCompile public void test5_verifier(boolean warmup) { - if (warmup) { + if (warmup && PREVENT_LOADING) { test5(null, null); } else { MyValue5Holder holder = new MyValue5Holder(); - Object v = holder.make(5679); + Object v = holder.make(rI); test5(holder, v); - Asserts.assertEQ(holder.v.foo, 5679); + Asserts.assertEQ(holder.v.foo, rI); } } - // Test case 11: (same as test1, except we use getstatic instead of getfield) + // Test case 6: (same as test1, except we use getstatic instead of getfield) // The inline type field class has been loaded, but the holder class has not been loaded. // - // getstatic MyValue11Holder.v:QMyValue1; + // getstatic MyValue6Holder.v:QMyValue1; // ^ not loaded ^ already loaded // - // MyValue11 has already been loaded, because it's in the InlineType attribute of + // MyValue6 has already been loaded, because it's in the InlineType attribute of // TestUnloadedInlineTypeField, due to TestUnloadedInlineTypeField.test1_precondition(). - static final inline class MyValue11 { + static final inline class MyValue6 { final int foo; - MyValue11() { - foo = 1234; + MyValue6() { + foo = rI; } } - static class MyValue11Holder { - static MyValue11 v = new MyValue11(); + static class MyValue6Holder { + static MyValue6 v = new MyValue6(); } - static MyValue11 test11_precondition() { - return new MyValue11(); + static MyValue6 test6_precondition() { + return new MyValue6(); } @Test - public int test11(int n) { + public int test6(int n) { if (n == 0) { return 0; } else { - return MyValue11Holder.v.foo + n; + return MyValue6Holder.v.foo + n; } } - public void test11_verifier(boolean warmup) { - if (warmup) { - test11(0); + @DontCompile + public void test6_verifier(boolean warmup) { + if (warmup && PREVENT_LOADING) { + test6(0); } else { - Asserts.assertEQ(test11(2), 1236); + Asserts.assertEQ(test6(rI), 2*rI); } } - // Test case 12: (same as test2, except we use getstatic instead of getfield) + // Test case 7: (same as test2, except we use getstatic instead of getfield) // Both the inline type field class, and the holder class have not been loaded. // - // getstatic MyValueHolder12.v:QMyValue12; + // getstatic MyValue7Holder.v:QMyValue7; // ^ not loaded ^ not loaded // - // MyValue12 has not been loaded, because it is not explicitly referenced by + // MyValue7 has not been loaded, because it is not explicitly referenced by // TestUnloadedInlineTypeField. + static final inline class MyValue7 { + final int foo; + + MyValue7(int n) { + foo = n; + } + } + + static class MyValue7Holder { + static MyValue7 v = new MyValue7(rI); + } + + @Test + public int test7(int n) { + if (n == 0) { + return 0; + } else { + return MyValue7Holder.v.foo + n; + } + } + + @DontCompile + public void test7_verifier(boolean warmup) { + if (warmup && PREVENT_LOADING) { + test7(0); + } else { + Asserts.assertEQ(test7(rI), 2*rI); + } + } + + // Test case 8: + // Same as case 1, except holder is allocated in test method (-> no holder null check required) + static final inline class MyValue8 { + final int foo; + + MyValue8() { + foo = rI; + } + } + + static class MyValue8Holder { + MyValue8 v; + + public MyValue8Holder() { + v = new MyValue8(); + } + } + + static MyValue8 test8_precondition() { + return new MyValue8(); + } + + @Test + public int test8(boolean warmup) { + if (!warmup) { + MyValue8Holder holder = new MyValue8Holder(); + return holder.v.foo; + } else { + return 0; + } + } + + @DontCompile + public void test8_verifier(boolean warmup) { + if (warmup && PREVENT_LOADING) { + test8(true); + } else { + Asserts.assertEQ(test8(false), rI); + } + } + + // Test case 9: + // Same as case 2, except holder is allocated in test method (-> no holder null check required) + static final inline class MyValue9 { + final int foo; + + public MyValue9(int n) { + foo = n; + } + } + + static class MyValue9Holder { + MyValue9 v; + + public MyValue9Holder() { + v = new MyValue9(rI); + } + } + + @Test + public int test9(boolean warmup) { + if (!warmup) { + MyValue9Holder holder = new MyValue9Holder(); + return holder.v.foo; + } else { + return 0; + } + } + + @DontCompile + public void test9_verifier(boolean warmup) { + if (warmup && PREVENT_LOADING) { + test9(true); + } else { + Asserts.assertEQ(test9(false), rI); + } + } + + // Test case 10: + // Same as case 4, but with putfield + static final inline class MyValue10 { + final int foo; + + public MyValue10() { + foo = rI; + } + } + + static class MyValue10Holder { + MyValue10 v1; + MyValue10 v2; + + public MyValue10Holder() { + v1 = new MyValue10(); + v2 = new MyValue10(); + } + } + + static MyValue10 test10_precondition() { + return new MyValue10(); + } + + @Test + public void test10(Object holder) { + // Don't use MyValue10Holder in the signature, it might trigger class loading + GetUnresolvedInlineFieldWrongSignature.test10(holder); + } + + @DontCompile + public void test10_verifier(boolean warmup) { + if (warmup && PREVENT_LOADING) { + test10(null); + } else { + // Make sure klass is resolved + for (int i = 0; i < 10; ++i) { + MyValue10Holder holder = new MyValue10Holder(); + try { + test10(holder); + Asserts.fail("Should have thrown NoSuchFieldError"); + } catch (NoSuchFieldError e) { + // OK + } + } + } + } + + // Test case 11: + // Same as case 4, except holder is allocated in test method (-> no holder null check required) + static final inline class MyValue11 { + final int foo; + + MyValue11(int n) { + foo = n; + } + } + + static class MyValue11Holder { + MyValue11 v; + + public MyValue11Holder() { + v = new MyValue11(0); + } + } + + @Test + public Object test11(boolean warmup, MyValue11 v) { + if (!warmup) { + MyValue11Holder holder = new MyValue11Holder(); + holder.v = v; + return holder; + } else { + return null; + } + } + + @DontCompile + public void test11_verifier(boolean warmup) { + MyValue11 v = new MyValue11(rI); + if (warmup && PREVENT_LOADING) { + test11(true, v); + } else { + MyValue11Holder holder = (MyValue11Holder)test11(false, v); + Asserts.assertEQ(holder.v.foo, rI); + } + } + + // Test case 12: + // Same as case 5, except holder is allocated in test method (-> no holder null check required) static final inline class MyValue12 { final int foo; @@ -342,23 +558,303 @@ static final inline class MyValue12 { } static class MyValue12Holder { - static MyValue12 v = new MyValue12(12); + MyValue12 v; + + public MyValue12Holder() { + v = new MyValue12(0); + } } @Test - public int test12(int n) { + public Object test12(boolean warmup, Object o) { + if (!warmup) { + // Don't use MyValue12 in the signature, it might trigger class loading + MyValue12Holder holder = new MyValue12Holder(); + holder.v = (MyValue12)o; + return holder; + } else { + return null; + } + } + + @DontCompile + public void test12_verifier(boolean warmup) { + if (warmup && PREVENT_LOADING) { + test12(true, null); + } else { + MyValue12 v = new MyValue12(rI); + MyValue12Holder holder = (MyValue12Holder)test12(false, v); + Asserts.assertEQ(holder.v.foo, rI); + } + } + + // Test case 13: + // Same as case 10, except MyValue13 is allocated in test method + static final inline class MyValue13 { + final int foo; + + public MyValue13() { + foo = rI; + } + } + + static class MyValue13Holder { + MyValue13 v; + + public MyValue13Holder() { + v = new MyValue13(); + } + } + + static MyValue13 test13_precondition() { + return new MyValue13(); + } + + @Test + public void test13(Object holder) { + // Don't use MyValue13Holder in the signature, it might trigger class loading + GetUnresolvedInlineFieldWrongSignature.test13(holder); + } + + @DontCompile + public void test13_verifier(boolean warmup) { + if (warmup && PREVENT_LOADING) { + test13(null); + } else { + // Make sure klass is resolved + for (int i = 0; i < 10; ++i) { + MyValue13Holder holder = new MyValue13Holder(); + try { + test13(holder); + Asserts.fail("Should have thrown InstantiationError"); + } catch (InstantiationError e) { + // OK + } + } + } + } + + // Test case 14: + // Same as case 10, except storing null + static final inline class MyValue14 { + final int foo; + + public MyValue14() { + foo = rI; + } + } + + static class MyValue14Holder { + MyValue14 v; + + public MyValue14Holder() { + v = new MyValue14(); + } + } + + static MyValue14 test14_precondition() { + return new MyValue14(); + } + + @Test + public void test14(Object holder) { + // Don't use MyValue14Holder in the signature, it might trigger class loading + GetUnresolvedInlineFieldWrongSignature.test14(holder); + } + + @DontCompile + public void test14_verifier(boolean warmup) { + if (warmup && PREVENT_LOADING) { + test14(null); + } else { + // Make sure klass is resolved + for (int i = 0; i < 10; ++i) { + MyValue14Holder holder = new MyValue14Holder(); + try { + test14(holder); + Asserts.fail("Should have thrown NoSuchFieldError"); + } catch (NoSuchFieldError e) { + // OK + } + } + } + } + + // Test case 15: + // Same as case 13, except MyValue15 is unloaded + static final inline class MyValue15 { + final int foo; + + public MyValue15() { + foo = rI; + } + } + + static class MyValue15Holder { + MyValue15 v; + + public MyValue15Holder() { + v = new MyValue15(); + } + } + + @Test + public void test15(Object holder) { + // Don't use MyValue15Holder in the signature, it might trigger class loading + GetUnresolvedInlineFieldWrongSignature.test15(holder); + } + + @DontCompile + public void test15_verifier(boolean warmup) { + if (warmup && PREVENT_LOADING) { + test15(null); + } else { + // Make sure klass is resolved + for (int i = 0; i < 10; ++i) { + MyValue15Holder holder = new MyValue15Holder(); + try { + test15(holder); + Asserts.fail("Should have thrown InstantiationError"); + } catch (InstantiationError e) { + // OK + } + } + } + } + + // Test case 16: + // Defaultvalue with type which is not an inline type + static final class MyValue16 { + final int foo; + + public MyValue16() { + foo = rI; + } + } + + static MyValue16 test16_precondition() { + return new MyValue16(); + } + + @Test + public Object test16(boolean warmup) { + return GetUnresolvedInlineFieldWrongSignature.test16(warmup); + } + + @DontCompile + public void test16_verifier(boolean warmup) { + if (warmup && PREVENT_LOADING) { + test16(true); + } else { + // Make sure klass is resolved + for (int i = 0; i < 10; ++i) { + try { + test16(false); + Asserts.fail("Should have thrown IncompatibleClassChangeError"); + } catch (IncompatibleClassChangeError e) { + // OK + } + } + } + } + + // Test case 17: + // Same as test16 but with unloaded type at defaultvalue + static final class MyValue17 { + final int foo; + + public MyValue17() { + foo = rI; + } + } + + @Test + public Object test17(boolean warmup) { + return GetUnresolvedInlineFieldWrongSignature.test17(warmup); + } + + @DontCompile + public void test17_verifier(boolean warmup) { + if (warmup && PREVENT_LOADING) { + test17(true); + } else { + // Make sure klass is resolved + for (int i = 0; i < 10; ++i) { + try { + test17(false); + Asserts.fail("Should have thrown IncompatibleClassChangeError"); + } catch (IncompatibleClassChangeError e) { + // OK + } + } + } + } + + // Test case 18: + // Same as test7 but with the holder being loaded + static final inline class MyValue18 { + final int foo; + + MyValue18(int n) { + foo = n; + } + } + + static class MyValue18Holder { + static MyValue18 v = new MyValue18(rI); + } + + @Test + public int test18(int n) { if (n == 0) { return 0; } else { - return MyValue12Holder.v.foo + n; + return MyValue18Holder.v.foo + n; } } - public void test12_verifier(boolean warmup) { - if (warmup) { - test12(0); + @DontCompile + public void test18_verifier(boolean warmup) { + // Make sure MyValue18Holder is loaded + MyValue18Holder holder = new MyValue18Holder(); + if (warmup && PREVENT_LOADING) { + test18(0); + } else { + Asserts.assertEQ(test18(rI), 2*rI); + } + } + + // Test case 19: + // Same as test18 but uninitialized (null) static inline type field + static final inline class MyValue19 { + final int foo; + + MyValue19(int n) { + foo = n; + } + } + + static class MyValue19Holder { + static MyValue19 v; + } + + @Test + public int test19(int n) { + if (n == 0) { + return 0; + } else { + return MyValue19Holder.v.foo + n; + } + } + + @DontCompile + public void test19_verifier(boolean warmup) { + // Make sure MyValue19Holder is loaded + MyValue19Holder holder = new MyValue19Holder(); + if (warmup && PREVENT_LOADING) { + test19(0); } else { - Asserts.assertEQ(test12(1), 13); + Asserts.assertEQ(test19(rI), rI); } } } diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/hack/GetUnresolvedInlineFieldWrongSignature.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/hack/GetUnresolvedInlineFieldWrongSignature.java index 58d4eda3761..46fcc3a4129 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/hack/GetUnresolvedInlineFieldWrongSignature.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/hack/GetUnresolvedInlineFieldWrongSignature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 @@ -31,14 +31,100 @@ static class MyValue3 { static class MyValue3Holder { MyValue3 v; } + + static class MyValue10 { + int foo; + } + + static class MyValue10Holder { + MyValue10 v1; + MyValue10 v2; + } + + static class MyValue13 { + int foo; + } + + static class MyValue13Holder { + MyValue13 v; + } + + static class MyValue14 { + int foo; + } + + static class MyValue14Holder { + MyValue14 v; + } + + static class MyValue15 { + int foo; + } + + static class MyValue15Holder { + MyValue15 v; + } + + static inline class MyValue16 { + int foo = 42; + } + + static inline class MyValue17 { + int foo = 42; + } } class GetUnresolvedInlineFieldWrongSignature { - static int test3(TestUnloadedInlineTypeField.MyValue3Holder holder3) { - if (holder3 != null) { - return holder3.v.foo + 3; + static int test3(Object holder) { + if (holder != null) { + // Don't use MyValue3Holder in the signature, it might trigger class loading + return ((TestUnloadedInlineTypeField.MyValue3Holder)holder).v.foo + 3; } else { return 0; } } + + static void test10(Object holder) { + if (holder != null) { + // Don't use MyValue10Holder in the signature, it might trigger class loading + ((TestUnloadedInlineTypeField.MyValue10Holder)holder).v1 = ((TestUnloadedInlineTypeField.MyValue10Holder)holder).v2; + } + } + + static void test13(Object holder) { + if (holder != null) { + // Don't use MyValue13Holder in the signature, it might trigger class loading + ((TestUnloadedInlineTypeField.MyValue13Holder)holder).v = new TestUnloadedInlineTypeField.MyValue13(); + } + } + + static void test14(Object holder) { + if (holder != null) { + // Don't use MyValue14Holder in the signature, it might trigger class loading + ((TestUnloadedInlineTypeField.MyValue14Holder)holder).v = null; + } + } + + static void test15(Object holder) { + if (holder != null) { + // Don't use MyValue15Holder in the signature, it might trigger class loading + ((TestUnloadedInlineTypeField.MyValue15Holder)holder).v = new TestUnloadedInlineTypeField.MyValue15(); + } + } + + static Object test16(boolean warmup) { + if (!warmup) { + return TestUnloadedInlineTypeField.MyValue16.default; + } else { + return null; + } + } + + static Object test17(boolean warmup) { + if (!warmup) { + return TestUnloadedInlineTypeField.MyValue17.default; + } else { + return null; + } + } } diff --git a/test/hotspot/jtreg/containers/cgroup/CgroupSubsystemFactory.java b/test/hotspot/jtreg/containers/cgroup/CgroupSubsystemFactory.java index 9e9f4b897a3..3bbd1278626 100644 --- a/test/hotspot/jtreg/containers/cgroup/CgroupSubsystemFactory.java +++ b/test/hotspot/jtreg/containers/cgroup/CgroupSubsystemFactory.java @@ -60,6 +60,8 @@ public class CgroupSubsystemFactory { private Path cgroupv1CgInfoNonZeroHierarchy; private Path cgroupv1MntInfoNonZeroHierarchyOtherOrder; private Path cgroupv1MntInfoNonZeroHierarchy; + private Path cgroupv1MntInfoDoubleCpuset; + private Path cgroupv1MntInfoDoubleCpuset2; private String mntInfoEmpty = ""; private Path cgroupV1SelfCgroup; private Path cgroupV2SelfCgroup; @@ -102,11 +104,14 @@ public class CgroupSubsystemFactory { "41 30 0:37 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime shared:13 - cgroup none rw,seclabel,devices\n" + "42 30 0:38 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime shared:14 - cgroup none rw,seclabel,cpuset\n" + "43 30 0:39 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime shared:15 - cgroup none rw,seclabel,blkio\n" + - "44 30 0:40 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime shared:16 - cgroup none rw,seclabel,freezer"; + "44 30 0:40 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime shared:16 - cgroup none rw,seclabel,freezer\n"; private String mntInfoHybridRest = cgroupv1MountInfoLineMemory + mntInfoHybridStub; private String mntInfoHybridMissingMemory = mntInfoHybridStub; private String mntInfoHybrid = cgroupV2LineHybrid + mntInfoHybridRest; private String mntInfoHybridFlippedOrder = mntInfoHybridRest + cgroupV2LineHybrid; + private String mntInfoCgroupv1MoreCpusetLine = "121 32 0:37 / /cpusets rw,relatime shared:69 - cgroup none rw,cpuset\n"; + private String mntInfoCgroupv1DoubleCpuset = mntInfoCgroupv1MoreCpusetLine + mntInfoHybrid; + private String mntInfoCgroupv1DoubleCpuset2 = mntInfoHybrid + mntInfoCgroupv1MoreCpusetLine; private String cgroupsNonZeroHierarchy = "#subsys_name hierarchy num_cgroups enabled\n" + "cpuset 3 1 1\n" + @@ -157,6 +162,12 @@ private void setup() { cgroupV2MntInfoMissingCgroupv2 = Paths.get(existingDirectory.toString(), "mnt_info_missing_cgroup2"); Files.writeString(cgroupV2MntInfoMissingCgroupv2, mntInfoHybridStub); + + cgroupv1MntInfoDoubleCpuset = Paths.get(existingDirectory.toString(), "mnt_info_cgroupv1_double_cpuset"); + Files.writeString(cgroupv1MntInfoDoubleCpuset, mntInfoCgroupv1DoubleCpuset); + + cgroupv1MntInfoDoubleCpuset2 = Paths.get(existingDirectory.toString(), "mnt_info_cgroupv1_double_cpuset2"); + Files.writeString(cgroupv1MntInfoDoubleCpuset2, mntInfoCgroupv1DoubleCpuset2); } catch (IOException e) { throw new RuntimeException(e); } @@ -174,6 +185,16 @@ private boolean isValidCgroup(int value) { return value == CGROUPS_V1 || value == CGROUPS_V2; } + public void testCgroupv1MultipleCpusetMounts(WhiteBox wb, Path mountInfo) { + String procCgroups = cgroupv1CgInfoNonZeroHierarchy.toString(); + String procSelfCgroup = cgroupV1SelfCgroup.toString(); + String procSelfMountinfo = mountInfo.toString(); + int retval = wb.validateCgroup(procCgroups, procSelfCgroup, procSelfMountinfo); + Asserts.assertEQ(CGROUPS_V1, retval, "Multiple cpuset controllers, but only one in /sys/fs/cgroup"); + Asserts.assertTrue(isValidCgroup(retval)); + System.out.println("testCgroupv1MultipleCpusetMounts PASSED!"); + } + public void testCgroupv1NoMounts(WhiteBox wb) { String procCgroups = cgroupv1CgInfoZeroHierarchy.toString(); String procSelfCgroup = cgroupV1SelfCgroup.toString(); @@ -246,6 +267,8 @@ public static void main(String[] args) throws Exception { test.testCgroupV1HybridMntInfoOrder(wb); test.testCgroupv1MissingMemoryController(wb); test.testCgroupv2NoCgroup2Fs(wb); + test.testCgroupv1MultipleCpusetMounts(wb, test.cgroupv1MntInfoDoubleCpuset); + test.testCgroupv1MultipleCpusetMounts(wb, test.cgroupv1MntInfoDoubleCpuset2); } finally { test.teardown(); } diff --git a/test/hotspot/jtreg/containers/cgroup/PlainRead.java b/test/hotspot/jtreg/containers/cgroup/PlainRead.java index e0c4a7e613a..74cf1cbff04 100644 --- a/test/hotspot/jtreg/containers/cgroup/PlainRead.java +++ b/test/hotspot/jtreg/containers/cgroup/PlainRead.java @@ -45,7 +45,7 @@ static public void noMatch(OutputAnalyzer oa, String what, String value) { oa.shouldNotMatch("^.*" + what + " *" + value + ".*$"); } - static final String good_value = "(\\d+|-1|Unlimited)"; + static final String good_value = "(\\d+|-1|-2|Unlimited)"; static final String bad_value = "(failed)"; static final String[] variables = {"Memory Limit is:", "CPU Shares is:", "CPU Quota is:", "CPU Period is:", "active_processor_count:"}; diff --git a/test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java b/test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java index cde1dde96a6..e261eebd661 100644 --- a/test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java +++ b/test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java @@ -153,18 +153,24 @@ private static void testOperatingSystemMXBeanAwareness(String memoryAllocation, out.shouldHaveExitValue(0) .shouldContain("Checking OperatingSystemMXBean") .shouldContain("OperatingSystemMXBean.getTotalPhysicalMemorySize: " + expectedMemory) - .shouldMatch("OperatingSystemMXBean\\.getFreePhysicalMemorySize: [1-9][0-9]+") .shouldContain("OperatingSystemMXBean.getTotalMemorySize: " + expectedMemory) .shouldMatch("OperatingSystemMXBean\\.getFreeMemorySize: [1-9][0-9]+") - .shouldMatch("OperatingSystemMXBean\\.getFreeSwapSpaceSize: [1-9][0-9]+"); - // in case of warnings like : "Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap." - // the getTotalSwapSpaceSize returns the system values as the container setup isn't supported in that case. + .shouldMatch("OperatingSystemMXBean\\.getFreePhysicalMemorySize: [1-9][0-9]+"); + + // in case of warnings like : "Your kernel does not support swap limit capabilities + // or the cgroup is not mounted. Memory limited without swap." + // the getTotalSwapSpaceSize and getFreeSwapSpaceSize return the system + // values as the container setup isn't supported in that case. try { out.shouldContain("OperatingSystemMXBean.getTotalSwapSpaceSize: " + expectedSwap); } catch(RuntimeException ex) { - out.shouldMatch("OperatingSystemMXBean.getTotalSwapSpaceSize: [1-9][0-9]+"); - out.shouldContain("Metrics.getMemoryLimit() == " + expectedMemory); - out.shouldContain("Metrics.getMemoryAndSwapLimit() == -1"); + out.shouldMatch("OperatingSystemMXBean.getTotalSwapSpaceSize: [0-9]+"); + } + + try { + out.shouldMatch("OperatingSystemMXBean\\.getFreeSwapSpaceSize: [1-9][0-9]+"); + } catch(RuntimeException ex) { + out.shouldMatch("OperatingSystemMXBean\\.getFreeSwapSpaceSize: 0"); } } diff --git a/test/hotspot/jtreg/gc/g1/TestGCLogMessages.java b/test/hotspot/jtreg/gc/g1/TestGCLogMessages.java index 3a6eee9528c..6849be5a1a7 100644 --- a/test/hotspot/jtreg/gc/g1/TestGCLogMessages.java +++ b/test/hotspot/jtreg/gc/g1/TestGCLogMessages.java @@ -121,7 +121,6 @@ public boolean isAvailable() { new LogMessageWithLevel("LAB Undo Waste", Level.DEBUG), // Ext Root Scan new LogMessageWithLevel("Thread Roots", Level.TRACE), - new LogMessageWithLevel("ObjectSynchronizer Roots", Level.TRACE), new LogMessageWithLevel("CLDG Roots", Level.TRACE), new LogMessageWithLevel("CM RefProcessor Roots", Level.TRACE), new LogMessageWithLevel("JNI Global Roots", Level.TRACE), diff --git a/test/hotspot/jtreg/gc/g1/TestHumongousConcurrentStartUndo.java b/test/hotspot/jtreg/gc/g1/TestHumongousConcurrentStartUndo.java new file mode 100644 index 00000000000..56bd25689e3 --- /dev/null +++ b/test/hotspot/jtreg/gc/g1/TestHumongousConcurrentStartUndo.java @@ -0,0 +1,129 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package gc.g1; + +/* + * @test TestHumongousConcurrentStartUndo + * @summary Tests an alternating sequence of Concurrent Mark and Concurrent Undo + * cycles. + * reclaim heap occupancy falls below the IHOP value. + * @requires vm.gc.G1 + * @library /test/lib /testlibrary / + * @modules java.base/jdk.internal.misc + * java.management + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * sun.hotspot.WhiteBox$WhiteBoxPermission + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * gc.g1.TestHumongousConcurrentStartUndo + */ + +import gc.testlibrary.Helpers; + +import sun.hotspot.WhiteBox; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +import java.util.Queue; +import java.util.concurrent.ArrayBlockingQueue; + +public class TestHumongousConcurrentStartUndo { + // Heap sizes < 224 MB are increased to 224 MB if vm_page_size == 64K to + // fulfill alignment constraints. + private static final int HeapSize = 224; // MB + private static final int HeapRegionSize = 1; // MB + private static final int InitiatingHeapOccupancyPercent = 50; // % + private static final int YoungSize = HeapSize / 8; + + public static void main(String[] args) throws Exception { + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( + "-Xbootclasspath/a:.", + "-XX:+UseG1GC", + "-Xms" + HeapSize + "m", + "-Xmx" + HeapSize + "m", + "-Xmn" + YoungSize + "m", + "-XX:G1HeapRegionSize=" + HeapRegionSize + "m", + "-XX:InitiatingHeapOccupancyPercent=" + InitiatingHeapOccupancyPercent, + "-XX:-G1UseAdaptiveIHOP", + "-XX:+UnlockDiagnosticVMOptions", + "-XX:+WhiteBoxAPI", + "-Xlog:gc*", + EdenObjectAllocatorWithHumongousAllocation.class.getName()); + + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + output.shouldContain("Pause Young (Concurrent Start) (G1 Humongous Allocation)"); + output.shouldContain("Concurrent Undo Cycle"); + output.shouldContain("Concurrent Mark Cycle"); + output.shouldHaveExitValue(0); + System.out.println(output.getStdout()); + } + + static class EdenObjectAllocatorWithHumongousAllocation { + private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox(); + + private static void allocateHumongous(int num, int objSize, Queue keeper) { + for (int i = 1; i <= num; i++) { + if (i % 10 == 0) { + System.out.println("Allocating humongous object " + i + "/" + num + + " of size " + objSize + " bytes"); + } + byte[] e = new byte[objSize]; + if (!keeper.offer(e)) { + keeper.remove(); + keeper.offer(e); + } + } + } + + public static void main(String [] args) throws Exception { + final int M = 1024 * 1024; + // Make humongous object size 75% of region size + final int humongousObjectSize = + (int)(HeapRegionSize * M * 0.75); + + // Number of objects to allocate to go above IHOP + final int humongousObjectAllocations = + (int)(((HeapSize - YoungSize) * 80 / 100.0) / HeapRegionSize); + + ArrayBlockingQueue a; + for (int iterate = 0; iterate < 3; iterate++) { + WHITE_BOX.fullGC(); + + a = new ArrayBlockingQueue(1); + allocateHumongous(humongousObjectAllocations, humongousObjectSize, a); + Helpers.waitTillCMCFinished(WHITE_BOX, 1); + a = null; + + a = new ArrayBlockingQueue(humongousObjectAllocations); + allocateHumongous(humongousObjectAllocations, humongousObjectSize, a); + Helpers.waitTillCMCFinished(WHITE_BOX, 1); + a = null; + + allocateHumongous(1, humongousObjectSize, new ArrayBlockingQueue(1)); + Helpers.waitTillCMCFinished(WHITE_BOX, 1); + } + } + } +} + diff --git a/test/hotspot/jtreg/gc/g1/humongousObjects/TestHumongousClassLoader.java b/test/hotspot/jtreg/gc/g1/humongousObjects/TestHumongousClassLoader.java index e2a494110e4..76160e426b8 100644 --- a/test/hotspot/jtreg/gc/g1/humongousObjects/TestHumongousClassLoader.java +++ b/test/hotspot/jtreg/gc/g1/humongousObjects/TestHumongousClassLoader.java @@ -203,10 +203,6 @@ public static void main(String[] args) throws ClassNotFoundException, Instantiat gc.provoke(); - boolean did_deflation = WB.deflateIdleMonitors(); - Asserts.assertEQ(did_deflation, true, - "deflateIdleMonitors() should have worked."); - // Test checks Asserts.assertEquals(WB.isClassAlive(HUMONGOUS_CLASSLOADER_NAME), false, String.format("Classloader class %s is loaded after we forget all references to it", diff --git a/test/hotspot/jtreg/gc/shenandoah/jvmti/TestHeapDump.java b/test/hotspot/jtreg/gc/shenandoah/jvmti/TestHeapDump.java index 1cdf8c2511a..eeaf9ed031e 100644 --- a/test/hotspot/jtreg/gc/shenandoah/jvmti/TestHeapDump.java +++ b/test/hotspot/jtreg/gc/shenandoah/jvmti/TestHeapDump.java @@ -26,6 +26,7 @@ * @test TestHeapDump * @summary Tests JVMTI heap dumps * @requires vm.gc.Shenandoah + * @requires vm.jvmti * @compile TestHeapDump.java * @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive TestHeapDump * @@ -35,6 +36,7 @@ * @test TestHeapDump * @summary Tests JVMTI heap dumps * @requires vm.gc.Shenandoah + * @requires vm.jvmti * @requires vm.bits == "64" * @compile TestHeapDump.java * @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive -XX:-UseCompressedOops TestHeapDump @@ -44,6 +46,7 @@ * @test TestHeapDump * @summary Tests JVMTI heap dumps * @requires vm.gc.Shenandoah + * @requires vm.jvmti * @compile TestHeapDump.java * @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive -XX:+UseStringDeduplication TestHeapDump */ diff --git a/test/hotspot/jtreg/gc/z/TestUncommit.java b/test/hotspot/jtreg/gc/z/TestUncommit.java index 17cb65dda6d..7b3374c2dfe 100644 --- a/test/hotspot/jtreg/gc/z/TestUncommit.java +++ b/test/hotspot/jtreg/gc/z/TestUncommit.java @@ -68,12 +68,12 @@ private static void reclaim() { private static void test(int objectSize) throws Exception { final var beforeAlloc = capacity(); + final var timeBeforeAlloc = System.nanoTime(); // Allocate memory log("Allocating"); allocate(objectSize); - final var timeAfterAlloc = System.nanoTime(); final var afterAlloc = capacity(); // Reclaim memory @@ -87,7 +87,7 @@ private static void test(int objectSize) throws Exception { log("Uncommit started"); final var timeUncommitStart = System.nanoTime(); - final var actualDelay = (timeUncommitStart - timeAfterAlloc) / 1_000_000; + final var actualDelay = (timeUncommitStart - timeBeforeAlloc) / 1_000_000; log("Waiting for uncommit to complete"); while (capacity() > beforeAlloc) { diff --git a/test/hotspot/jtreg/runtime/6294277/SourceDebugExtension.java b/test/hotspot/jtreg/runtime/6294277/SourceDebugExtension.java index bb650e673ca..9b86c86cee2 100644 --- a/test/hotspot/jtreg/runtime/6294277/SourceDebugExtension.java +++ b/test/hotspot/jtreg/runtime/6294277/SourceDebugExtension.java @@ -24,6 +24,7 @@ /* * @test * @bug 6294277 + * @requires vm.jvmti * @summary java -Xdebug crashes on SourceDebugExtension attribute larger than 64K * @run main/othervm -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n SourceDebugExtension */ diff --git a/test/hotspot/jtreg/runtime/7158988/FieldMonitor.java b/test/hotspot/jtreg/runtime/7158988/FieldMonitor.java index 3f398e5ec6d..bbf28c9eafd 100644 --- a/test/hotspot/jtreg/runtime/7158988/FieldMonitor.java +++ b/test/hotspot/jtreg/runtime/7158988/FieldMonitor.java @@ -24,6 +24,7 @@ /* * @test FieldMonitor.java * @bug 7158988 + * @requires vm.jvmti * @summary verify jvm does not crash while debugging * @run compile TestPostFieldModification.java * @run main/othervm FieldMonitor diff --git a/test/hotspot/jtreg/runtime/Metaspace/DefineClass.java b/test/hotspot/jtreg/runtime/Metaspace/DefineClass.java index 7b59a71aa6b..18c63eb1268 100644 --- a/test/hotspot/jtreg/runtime/Metaspace/DefineClass.java +++ b/test/hotspot/jtreg/runtime/Metaspace/DefineClass.java @@ -26,6 +26,7 @@ * @test * @bug 8173743 * @requires vm.compMode != "Xcomp" + * @requires vm.jvmti * @summary Failures during class definition can lead to memory leaks in metaspace * @requires vm.opt.final.ClassUnloading * @library /test/lib diff --git a/test/hotspot/jtreg/runtime/Safepoint/TestAbortVMOnSafepointTimeout.java b/test/hotspot/jtreg/runtime/Safepoint/TestAbortVMOnSafepointTimeout.java index 7dd229585e2..dd881ab796b 100644 --- a/test/hotspot/jtreg/runtime/Safepoint/TestAbortVMOnSafepointTimeout.java +++ b/test/hotspot/jtreg/runtime/Safepoint/TestAbortVMOnSafepointTimeout.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -23,70 +24,38 @@ import jdk.test.lib.*; import jdk.test.lib.process.*; +import sun.hotspot.WhiteBox; /* * @test TestAbortVMOnSafepointTimeout * @summary Check if VM can kill thread which doesn't reach safepoint. * @bug 8219584 8227528 - * @requires vm.compiler2.enabled - * @library /test/lib - * @modules java.base/jdk.internal.misc - * java.management - * @run driver TestAbortVMOnSafepointTimeout + * @library /testlibrary /test/lib + * @build TestAbortVMOnSafepointTimeout + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestAbortVMOnSafepointTimeout */ public class TestAbortVMOnSafepointTimeout { public static void main(String[] args) throws Exception { - if (args.length > 0) { - int result = test_loop(3); - System.out.println("This message would occur after some time with result " + result); - return; - } - - testWith(500, 500); - } - - static int test_loop(int x) { - int sum = 0; - if (x != 0) { - // Long running loop without safepoint. - for (int y = 1; y < Integer.MAX_VALUE; ++y) { - if (y % x == 0) ++sum; - } - } - return sum; - } - - public static void testWith(int sfpt_interval, int timeout_delay) throws Exception { - // -XX:-UseCountedLoopSafepoints - is used to prevent the loop - // in test_loop() to poll for safepoints. - // -XX:LoopStripMiningIter=0 and -XX:LoopUnrollLimit=0 - are - // used to prevent optimizations over the loop in test_loop() - // since we actually want it to provoke a safepoint timeout. - // -XX:-UseBiasedLocking - is used to prevent biased locking - // handshakes from changing the timing of this test. ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( + "-Xbootclasspath/a:.", "-XX:+UnlockDiagnosticVMOptions", - "-XX:-UseBiasedLocking", + "-XX:+WhiteBoxAPI", "-XX:+SafepointTimeout", "-XX:+SafepointALot", "-XX:+AbortVMOnSafepointTimeout", - "-XX:SafepointTimeoutDelay=" + timeout_delay, - "-XX:GuaranteedSafepointInterval=" + sfpt_interval, - "-XX:-TieredCompilation", - "-XX:-UseCountedLoopSafepoints", - "-XX:LoopStripMiningIter=0", - "-XX:LoopUnrollLimit=0", - "-XX:CompileCommand=compileonly,TestAbortVMOnSafepointTimeout::test_loop", - "-Xcomp", + "-XX:SafepointTimeoutDelay=50", + "-XX:GuaranteedSafepointInterval=1", "-XX:-CreateCoredumpOnCrash", "-Xms64m", - "TestAbortVMOnSafepointTimeout", - "runTestLoop" + "TestAbortVMOnSafepointTimeout$Test", + "999" /* 999 is max unsafe sleep */ ); OutputAnalyzer output = new OutputAnalyzer(pb.start()); + output.shouldMatch("Timed out while spinning to reach a safepoint."); if (Platform.isWindows()) { output.shouldMatch("Safepoint sync time longer than"); } else { @@ -94,8 +63,18 @@ public static void testWith(int sfpt_interval, int timeout_delay) throws Excepti if (Platform.isLinux()) { output.shouldMatch("(sent by kill)"); } - output.shouldMatch("TestAbortVMOnSafepointTimeout.test_loop"); } output.shouldNotHaveExitValue(0); } + + public static class Test { + public static void main(String[] args) throws Exception { + Integer waitTime = Integer.parseInt(args[0]); + WhiteBox wb = WhiteBox.getWhiteBox(); + // Loop here to cause a safepoint timeout. + while (true) { + wb.waitUnsafe(waitTime); + } + } + } } diff --git a/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/RedefineClassTest.java b/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/RedefineClassTest.java index 5fb1c637dc5..5261d103451 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/RedefineClassTest.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/RedefineClassTest.java @@ -27,6 +27,7 @@ * @summary Redefine shared class. GC should not cause crash with cached resolved_references. * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes /test/hotspot/jtreg/runtime/cds/appcds/jvmti * @requires vm.cds.archived.java.heap + * @requires vm.jvmti * @build sun.hotspot.WhiteBox * RedefineClassApp * InstrumentationClassFileTransformer diff --git a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDump.java b/test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDump.java index b5094f0d496..af388c75b8e 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDump.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/javaldr/AnonVmClassesDuringDump.java @@ -31,7 +31,7 @@ * See https://blogs.oracle.com/jrose/anonymous-classes-in-the-vm. * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes * @requires vm.cds - * @requires vm.flavor != "minimal" + * @requires vm.jvmti * @run driver AnonVmClassesDuringDump */ diff --git a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCDuringDump.java b/test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCDuringDump.java index 37f07ca8027..a9499866ebc 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCDuringDump.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCDuringDump.java @@ -27,7 +27,7 @@ * @summary When dumping the CDS archive, try to cause garbage collection while classes are being loaded. * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes * @requires vm.cds - * @requires vm.flavor != "minimal" + * @requires vm.jvmti * @run driver GCDuringDump */ diff --git a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCSharedStringsDuringDump.java b/test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCSharedStringsDuringDump.java index 2bccded40d3..beda2edd793 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCSharedStringsDuringDump.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCSharedStringsDuringDump.java @@ -28,6 +28,7 @@ * option for testing the interaction with GC and shared strings. * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes * @requires vm.cds.archived.java.heap + * @requires vm.jvmti * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run driver/timeout=480 GCSharedStringsDuringDump diff --git a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/HumongousDuringDump.java b/test/hotspot/jtreg/runtime/cds/appcds/javaldr/HumongousDuringDump.java index 1ea2399faab..f87534dae21 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/HumongousDuringDump.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/javaldr/HumongousDuringDump.java @@ -27,7 +27,7 @@ * @summary Test how CDS dumping handles the existence of humongous G1 regions. * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes * @requires vm.cds.archived.java.heap - * @requires vm.flavor != "minimal" + * @requires vm.jvmti * @run driver/timeout=240 HumongousDuringDump */ diff --git a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/LockDuringDump.java b/test/hotspot/jtreg/runtime/cds/appcds/javaldr/LockDuringDump.java index fbbf1ca10d3..0f8fcbc67ff 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/javaldr/LockDuringDump.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/javaldr/LockDuringDump.java @@ -29,7 +29,7 @@ * without the locking bits in the markWord. * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds * @requires vm.cds - * @requires vm.flavor != "minimal" + * @requires vm.jvmti * @modules java.instrument * @run driver LockDuringDump */ diff --git a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/ClassFileLoadHookTest.java b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/ClassFileLoadHookTest.java index 9791af31c75..8bbec56cb9e 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/ClassFileLoadHookTest.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/ClassFileLoadHookTest.java @@ -27,6 +27,7 @@ * @summary Test jvmti class file loader hook interaction with AppCDS * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds * @requires vm.cds + * @requires vm.jvmti * @build ClassFileLoadHook * @run main/othervm/native ClassFileLoadHookTest */ diff --git a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/InstrumentationTest.java b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/InstrumentationTest.java index bd43b067570..0837811a033 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/InstrumentationTest.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/InstrumentationTest.java @@ -28,7 +28,7 @@ * using CDS/AppCDSv1/AppCDSv2. * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes * @requires vm.cds - * @requires vm.flavor != "minimal" + * @requires vm.jvmti * @build sun.hotspot.WhiteBox * InstrumentationApp * InstrumentationClassFileTransformer diff --git a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/dumpingWithAgent/DumpingWithJavaAgent.java b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/dumpingWithAgent/DumpingWithJavaAgent.java index 4483ea4a656..f48a4507530 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/dumpingWithAgent/DumpingWithJavaAgent.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/dumpingWithAgent/DumpingWithJavaAgent.java @@ -27,7 +27,7 @@ * @summary CDS dumping with java agent. * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes * @requires vm.cds - * @requires vm.flavor != "minimal" + * @requires vm.jvmti * @build SimpleAgent Hello * @run main/othervm DumpingWithJavaAgent */ diff --git a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/dumpingWithAgent/DumpingWithJvmtiAgent.java b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/dumpingWithAgent/DumpingWithJvmtiAgent.java index c5ac5098afd..9f3c5864f1b 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/dumpingWithAgent/DumpingWithJvmtiAgent.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/dumpingWithAgent/DumpingWithJvmtiAgent.java @@ -25,7 +25,7 @@ * @test * @summary CDS dumping with JVMTI agent. * @requires vm.cds - * @requires vm.flavor != "minimal" + * @requires vm.jvmti * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds * @compile ../../test-classes/Hello.java * @run main/othervm/native DumpingWithJvmtiAgent diff --git a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/parallelLoad/ParallelLoadAndTransformTest.java b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/parallelLoad/ParallelLoadAndTransformTest.java index 14b668c4af0..489b796abd2 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/parallelLoad/ParallelLoadAndTransformTest.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/parallelLoad/ParallelLoadAndTransformTest.java @@ -31,6 +31,7 @@ * /test/hotspot/jtreg/testlibrary/jvmti * @requires vm.cds * @requires !vm.graal.enabled + * @requires vm.jvmti * @build TransformUtil TransformerAgent ParallelLoad * @run driver ParallelLoadAndTransformTest */ diff --git a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/transformRelatedClasses/TransformInterfaceImplementorAppCDS.java b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/transformRelatedClasses/TransformInterfaceImplementorAppCDS.java index e6098dbb787..f2f2f9bfdf2 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/transformRelatedClasses/TransformInterfaceImplementorAppCDS.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/transformRelatedClasses/TransformInterfaceImplementorAppCDS.java @@ -33,7 +33,7 @@ * /test/hotspot/jtreg/runtime/cds/appcds/customLoader * /test/hotspot/jtreg/runtime/cds/appcds/customLoader/test-classes * @requires vm.cds - * @requires vm.flavor != "minimal" + * @requires vm.jvmti * @requires !vm.graal.enabled * @build TransformUtil TransformerAgent Interface Implementor * @run main/othervm TransformRelatedClassesAppCDS Interface Implementor diff --git a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/transformRelatedClasses/TransformSuperSubAppCDS.java b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/transformRelatedClasses/TransformSuperSubAppCDS.java index 0fc4c11f69a..63d2244f03d 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/jvmti/transformRelatedClasses/TransformSuperSubAppCDS.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/jvmti/transformRelatedClasses/TransformSuperSubAppCDS.java @@ -33,7 +33,7 @@ * /test/hotspot/jtreg/runtime/cds/appcds/customLoader * /test/hotspot/jtreg/runtime/cds/appcds/customLoader/test-classes * @requires vm.cds - * @requires vm.flavor != "minimal" + * @requires vm.jvmti * @requires !vm.graal.enabled * @build TransformUtil TransformerAgent SubClass SuperClazz * @run main/othervm TransformRelatedClassesAppCDS SuperClazz SubClass diff --git a/test/hotspot/jtreg/runtime/cds/appcds/redefineClass/RedefineBasicTest.java b/test/hotspot/jtreg/runtime/cds/appcds/redefineClass/RedefineBasicTest.java index 948c4493efc..adc2489e719 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/redefineClass/RedefineBasicTest.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/redefineClass/RedefineBasicTest.java @@ -27,6 +27,7 @@ * @summary Run /serviceability/jvmti/RedefineClasses/RedefineRunningMethods in AppCDS mode to * make sure class redefinition works with CDS. * @requires vm.cds + * @requires vm.jvmti * @library /test/lib /test/hotspot/jtreg/serviceability/jvmti/RedefineClasses /test/hotspot/jtreg/runtime/cds/appcds * @run driver RedefineClassHelper * @build sun.hotspot.WhiteBox RedefineBasic diff --git a/test/hotspot/jtreg/runtime/cds/appcds/redefineClass/RedefineRunningMethods_Shared.java b/test/hotspot/jtreg/runtime/cds/appcds/redefineClass/RedefineRunningMethods_Shared.java index 3536486ea52..bff3896a6f5 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/redefineClass/RedefineRunningMethods_Shared.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/redefineClass/RedefineRunningMethods_Shared.java @@ -27,6 +27,7 @@ * @summary Run /serviceability/jvmti/RedefineClasses/RedefineRunningMethods in AppCDS mode to * make sure class redefinition works with CDS. * @requires vm.cds + * @requires vm.jvmti * @library /test/lib /test/hotspot/jtreg/serviceability/jvmti/RedefineClasses /test/hotspot/jtreg/runtime/cds/appcds * @run driver RedefineClassHelper * @build sun.hotspot.WhiteBox RedefineRunningMethods_SharedHelper diff --git a/test/hotspot/jtreg/runtime/cds/serviceability/transformRelatedClasses/TransformInterfaceAndImplementor.java b/test/hotspot/jtreg/runtime/cds/serviceability/transformRelatedClasses/TransformInterfaceAndImplementor.java index dade9c6d94b..9375903ee21 100644 --- a/test/hotspot/jtreg/runtime/cds/serviceability/transformRelatedClasses/TransformInterfaceAndImplementor.java +++ b/test/hotspot/jtreg/runtime/cds/serviceability/transformRelatedClasses/TransformInterfaceAndImplementor.java @@ -27,7 +27,7 @@ * with CDS with Interface/Implementor pair * @library /test/lib /runtime/cds /testlibrary/jvmti * @requires vm.cds - * @requires vm.flavor != "minimal" + * @requires vm.jvmti * @requires !vm.graal.enabled * @build TransformUtil TransformerAgent Interface Implementor * @run main/othervm TransformRelatedClasses Interface Implementor diff --git a/test/hotspot/jtreg/runtime/cds/serviceability/transformRelatedClasses/TransformSuperAndSubClasses.java b/test/hotspot/jtreg/runtime/cds/serviceability/transformRelatedClasses/TransformSuperAndSubClasses.java index 42aea10bd7b..588c994bae7 100644 --- a/test/hotspot/jtreg/runtime/cds/serviceability/transformRelatedClasses/TransformSuperAndSubClasses.java +++ b/test/hotspot/jtreg/runtime/cds/serviceability/transformRelatedClasses/TransformSuperAndSubClasses.java @@ -28,7 +28,7 @@ * with CDS with SubClass and SuperClass * @library /test/lib /runtime/cds /testlibrary/jvmti * @requires vm.cds - * @requires vm.flavor != "minimal" + * @requires vm.jvmti * @requires !vm.graal.enabled * @build TransformUtil TransformerAgent SubClass SuperClazz * @run main/othervm TransformRelatedClasses SuperClazz SubClass diff --git a/test/hotspot/jtreg/runtime/cds/serviceability/transformRelatedClasses/TransformSuperSubTwoPckgs.java b/test/hotspot/jtreg/runtime/cds/serviceability/transformRelatedClasses/TransformSuperSubTwoPckgs.java index 6c5cd7d37fc..6bc9dbc511b 100644 --- a/test/hotspot/jtreg/runtime/cds/serviceability/transformRelatedClasses/TransformSuperSubTwoPckgs.java +++ b/test/hotspot/jtreg/runtime/cds/serviceability/transformRelatedClasses/TransformSuperSubTwoPckgs.java @@ -28,7 +28,7 @@ * with CDS with SubClass and SuperClass, each lives in own separate package * @library /test/lib /runtime/cds /testlibrary/jvmti * @requires vm.cds - * @requires vm.flavor != "minimal" + * @requires vm.jvmti * @requires !vm.graal.enabled * @build TransformUtil TransformerAgent SubClass SuperClazz * @compile myPkg2/SubClass.java myPkg1/SuperClazz.java diff --git a/test/hotspot/jtreg/runtime/handshake/AsyncHandshakeWalkStackTest.java b/test/hotspot/jtreg/runtime/handshake/AsyncHandshakeWalkStackTest.java new file mode 100644 index 00000000000..6e81edf9661 --- /dev/null +++ b/test/hotspot/jtreg/runtime/handshake/AsyncHandshakeWalkStackTest.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * @test AsyncHandshakeWalkStackTest + * @library /testlibrary /test/lib + * @build AsyncHandshakeWalkStackTest + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AsyncHandshakeWalkStackTest + */ + +import jdk.test.lib.Asserts; +import sun.hotspot.WhiteBox; + +public class AsyncHandshakeWalkStackTest { + + public static void main(String... args) throws Exception { + int iterations = 3; + if (args.length > 0) { + iterations = Integer.parseInt(args[0]); + } + test(iterations); + } + + private static void test(int iterations) throws Exception { + Thread loop_thread = new Thread(() -> run_loop(create_list())); + Thread alloc_thread = new Thread(() -> run_alloc()); + Thread wait_thread = new Thread(() -> run_wait(new Object() {})); + loop_thread.start(); + alloc_thread.start(); + wait_thread.start(); + + WhiteBox wb = WhiteBox.getWhiteBox(); + for (int i = 0; i < iterations; i++) { + System.out.println("Iteration " + i); + System.out.flush(); + Thread.sleep(200); + wb.asyncHandshakeWalkStack(loop_thread); + Thread.sleep(200); + wb.asyncHandshakeWalkStack(alloc_thread); + Thread.sleep(200); + wb.asyncHandshakeWalkStack(wait_thread); + Thread.sleep(200); + wb.asyncHandshakeWalkStack(Thread.currentThread()); + } + } + + static class List { + List next; + + List(List next) { + this.next = next; + } + } + + public static List create_list() { + List head = new List(null); + List elem = new List(head); + List elem2 = new List(elem); + List elem3 = new List(elem2); + List elem4 = new List(elem3); + head.next = elem4; + + return head; + } + + public static void run_loop(List loop) { + while (loop.next != null) { + loop = loop.next; + } + } + + public static byte[] array; + + public static void run_alloc() { + while (true) { + // Write to public static to ensure the byte array escapes. + array = new byte[4096]; + } + } + + public static void run_wait(Object lock) { + synchronized (lock) { + try { + lock.wait(); + } catch (InterruptedException ie) {} + } + } +} diff --git a/test/hotspot/jtreg/runtime/handshake/HandshakeDirectTest.java b/test/hotspot/jtreg/runtime/handshake/HandshakeDirectTest.java index e54cd40ffb3..9939bc5a6a6 100644 --- a/test/hotspot/jtreg/runtime/handshake/HandshakeDirectTest.java +++ b/test/hotspot/jtreg/runtime/handshake/HandshakeDirectTest.java @@ -39,7 +39,7 @@ public class HandshakeDirectTest implements Runnable { static final int WORKING_THREADS = 32; - static final int DIRECT_HANDSHAKES_MARK = 50000; + static final int DIRECT_HANDSHAKES_MARK = 500000; static Thread[] workingThreads = new Thread[WORKING_THREADS]; static Semaphore[] handshakeSem = new Semaphore[WORKING_THREADS]; static Object[] locks = new Object[WORKING_THREADS]; diff --git a/test/hotspot/jtreg/runtime/handshake/MixedHandshakeWalkStackTest.java b/test/hotspot/jtreg/runtime/handshake/MixedHandshakeWalkStackTest.java new file mode 100644 index 00000000000..09c6affafed --- /dev/null +++ b/test/hotspot/jtreg/runtime/handshake/MixedHandshakeWalkStackTest.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * @test MixedHandshakeWalkStackTest + * @library /testlibrary /test/lib + * @build MixedHandshakeWalkStackTest + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI MixedHandshakeWalkStackTest + */ + +import jdk.test.lib.Asserts; +import sun.hotspot.WhiteBox; + +public class MixedHandshakeWalkStackTest { + public static Thread testThreads[]; + + public static void main(String... args) throws Exception { + testThreads = new Thread[Runtime.getRuntime().availableProcessors()]; + for (int i = 0; i < testThreads.length; i++) { + testThreads[i] = new Thread(() -> handshake()); + } + + for (Thread t : testThreads) { + t.start(); + } + + handshake(); + + for (Thread t : testThreads) { + t.join(); + } + } + + public static void handshake() { + WhiteBox wb = WhiteBox.getWhiteBox(); + java.util.concurrent.ThreadLocalRandom rand = java.util.concurrent.ThreadLocalRandom.current(); + long end = System.currentTimeMillis() + 20000; + while (end > System.currentTimeMillis()) { + wb.asyncHandshakeWalkStack(testThreads[rand.nextInt(testThreads.length)]); + wb.handshakeWalkStack(testThreads[rand.nextInt(testThreads.length)], false); + wb.handshakeWalkStack(testThreads[rand.nextInt(testThreads.length)], true); + } + } +} diff --git a/test/hotspot/jtreg/runtime/jni/FastGetField/FastGetField.java b/test/hotspot/jtreg/runtime/jni/FastGetField/FastGetField.java index e084e75e642..b67cc28ce93 100644 --- a/test/hotspot/jtreg/runtime/jni/FastGetField/FastGetField.java +++ b/test/hotspot/jtreg/runtime/jni/FastGetField/FastGetField.java @@ -26,6 +26,7 @@ * @bug 8227680 * @summary Tests that all FieldAccess notifications for Get*Field with primitive type are generated. + * @requires vm.jvmti * @compile FastGetField.java * @run main/othervm/native -agentlib:FastGetField -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyJNIFields FastGetField * @run main/othervm/native -agentlib:FastGetField -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyJNIFields -XX:+UnlockDiagnosticVMOptions -XX:+ForceUnreachable -XX:+SafepointALot -XX:GuaranteedSafepointInterval=1 FastGetField diff --git a/test/hotspot/jtreg/runtime/logging/RedefineClasses.java b/test/hotspot/jtreg/runtime/logging/RedefineClasses.java index d033532a602..1cabba35738 100644 --- a/test/hotspot/jtreg/runtime/logging/RedefineClasses.java +++ b/test/hotspot/jtreg/runtime/logging/RedefineClasses.java @@ -29,6 +29,7 @@ * @library /test/lib * @modules java.compiler * java.instrument + * @requires vm.jvmti * @run main RedefineClassHelper * @run main/othervm -Xmx256m -XX:MaxMetaspaceSize=64m -javaagent:redefineagent.jar -Xlog:all=trace:file=all.log RedefineClasses */ diff --git a/test/hotspot/jtreg/runtime/records/RedefineRecord.java b/test/hotspot/jtreg/runtime/records/RedefineRecord.java index 65d678cef4b..fc37a82f72e 100644 --- a/test/hotspot/jtreg/runtime/records/RedefineRecord.java +++ b/test/hotspot/jtreg/runtime/records/RedefineRecord.java @@ -28,6 +28,7 @@ * @modules java.base/jdk.internal.misc * @modules java.instrument * jdk.jartool/sun.tools.jar + * @requires vm.jvmti * @compile --enable-preview -source ${jdk.version} RedefineRecord.java * @run main/othervm --enable-preview RedefineRecord buildagent * @run main/othervm/timeout=6000 --enable-preview RedefineRecord runtest diff --git a/test/hotspot/jtreg/runtime/sealedClasses/RedefineSealedClass.java b/test/hotspot/jtreg/runtime/sealedClasses/RedefineSealedClass.java index 497dca892fa..97eeb2c7cec 100644 --- a/test/hotspot/jtreg/runtime/sealedClasses/RedefineSealedClass.java +++ b/test/hotspot/jtreg/runtime/sealedClasses/RedefineSealedClass.java @@ -29,6 +29,7 @@ * @modules java.base/jdk.internal.misc * @modules java.instrument * jdk.jartool/sun.tools.jar + * @requires vm.jvmti * @compile --enable-preview -source ${jdk.version} RedefineSealedClass.java * @run main/othervm --enable-preview RedefineSealedClass buildagent * @run main/othervm/timeout=6000 --enable-preview RedefineSealedClass runtest diff --git a/test/hotspot/jtreg/runtime/stringtable/StringTableCleaningTest.java b/test/hotspot/jtreg/runtime/stringtable/StringTableCleaningTest.java index b961cc2ad6e..75aad860a45 100644 --- a/test/hotspot/jtreg/runtime/stringtable/StringTableCleaningTest.java +++ b/test/hotspot/jtreg/runtime/stringtable/StringTableCleaningTest.java @@ -55,7 +55,7 @@ public class StringTableCleaningTest { public static void main(String[] args) throws Exception { List<String> subargs = new ArrayList<String>(); - subargs.addAll(List.of("-Xlog:gc,gc+start,stringtable*=trace", "-Xmx3G")); + subargs.addAll(List.of("-Xlog:gc,gc+start,stringtable*=trace", "-Xmx1g")); subargs.add(Tester.class.getName()); subargs.addAll(Arrays.asList(args)); OutputAnalyzer output = ProcessTools.executeTestJvm(subargs); diff --git a/test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestFieldTypeMismatch.java b/test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestFieldTypeMismatch.java new file mode 100644 index 00000000000..8efdf957cf7 --- /dev/null +++ b/test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestFieldTypeMismatch.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package compiler.valhalla.inlinetypes; + +import jdk.test.lib.Asserts; + +/** + * @test + * @library /test/lib + * @compile TestFieldTypeMismatchHelper.jasm + * @compile TestFieldTypeMismatch.java + * @run main/othervm compiler.valhalla.inlinetypes.TestFieldTypeMismatch + */ + +final class MyValue { + int foo = 42; +} + +public class TestFieldTypeMismatch { + + public static void main(String[] args) { + boolean exception = false; + try { + TestFieldTypeMismatchHelper t = new TestFieldTypeMismatchHelper(); + } catch(IncompatibleClassChangeError err) { + exception = true; + Asserts.assertEquals(err.getMessage(), + "Class compiler/valhalla/inlinetypes/TestFieldTypeMismatchHelper expects class compiler.valhalla.inlinetypes.MyValue to be an inline type, but it is not"); + } + Asserts.assertTrue(exception); + } +} + diff --git a/test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestFieldTypeMismatchHelper.jasm b/test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestFieldTypeMismatchHelper.jasm new file mode 100644 index 00000000000..c5abb096020 --- /dev/null +++ b/test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestFieldTypeMismatchHelper.jasm @@ -0,0 +1,44 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +public class compiler/valhalla/inlinetypes/TestFieldTypeMismatchHelper version 60:0 { + + Field field:"Qcompiler/valhalla/inlinetypes/MyValue;"; + + public Method "<init>":"()V" + stack 1 locals 1 + { + aload_0; + invokespecial Method java/lang/Object."<init>":"()V"; + return; + } + + public Method test:"()V" stack 2 locals 1 { + aload_0; + aconst_null; + putfield Field field:"Qcompiler/valhalla/inlinetypes/MyValue;"; + return; + } +} + diff --git a/test/hotspot/jtreg/runtime/valhalla/inlinetypes/identityObject/TestIdentityObject.java b/test/hotspot/jtreg/runtime/valhalla/inlinetypes/identityObject/TestIdentityObject.java index a9b119901de..05c3209e0f2 100644 --- a/test/hotspot/jtreg/runtime/valhalla/inlinetypes/identityObject/TestIdentityObject.java +++ b/test/hotspot/jtreg/runtime/valhalla/inlinetypes/identityObject/TestIdentityObject.java @@ -35,7 +35,7 @@ */ public class TestIdentityObject { - static void checkIdentityObject(Class c, boolean subtype, boolean visible) { + static void checkIdentityObject(Class c, boolean subtype) { boolean s; try { c.asSubclass(IdentityObject.class); @@ -50,30 +50,18 @@ static void checkIdentityObject(Class c, boolean subtype, boolean visible) { throw new RuntimeException("Type " + c.getName() + " should not implements IdentityObject"); } } - boolean found = false; - Class[] interfaces = c.getInterfaces(); - for(Class i : interfaces) { - if (i == IdentityObject.class) found = true; - } - if (found != visible) { - if (visible) { - throw new RuntimeException("Type " + c.getName() + " should have IdentityObject visible, but it hasn't"); - } else { - throw new RuntimeException("Type " + c.getName() + " should not have IdentityObject visible, but it has"); - } - } } public static void main(String[] args) { - checkIdentityObject(InlineType.class, false, false); - checkIdentityObject(IdentityType.class, true, false); - checkIdentityObject(IdentityTypeImplementingIdentityObject.class, true, true); - checkIdentityObject(Interface.class, false, false); - checkIdentityObject(InterfaceExtendingIdentityObject.class, true, true); - checkIdentityObject(AbstractTypeImplementingIdentityObject.class, true, true); - checkIdentityObject(AbstractTypeWithNonstaticFields.class, true, false); - checkIdentityObject(AbstractTypeWithStaticFields.class, false, false); - checkIdentityObject(AbstractTypeWithSynchronizedNonstaticMethod.class, true, false); - checkIdentityObject(AbstractTypeWithSynchronizedStaticMethod.class, false, false); + checkIdentityObject(InlineType.class, false); + checkIdentityObject(IdentityType.class, true); + checkIdentityObject(IdentityTypeImplementingIdentityObject.class, true); + checkIdentityObject(Interface.class, false); + checkIdentityObject(InterfaceExtendingIdentityObject.class, true); + checkIdentityObject(AbstractTypeImplementingIdentityObject.class, true); + checkIdentityObject(AbstractTypeWithNonstaticFields.class, true); + checkIdentityObject(AbstractTypeWithStaticFields.class, false); + checkIdentityObject(AbstractTypeWithSynchronizedNonstaticMethod.class, true); + checkIdentityObject(AbstractTypeWithSynchronizedStaticMethod.class, false); } } diff --git a/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java b/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java index d3aaa3dc6f4..5653b735273 100644 --- a/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java +++ b/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java @@ -30,6 +30,7 @@ * @compile ASGCTBaseTest.java * @requires os.family == "linux" * @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="arm" | os.arch=="aarch64" | os.arch=="ppc64" | os.arch=="s390" + * @requires vm.jvmti * @run main/othervm/native -agentlib:AsyncGetCallTraceTest MyPackage.ASGCTBaseTest */ diff --git a/test/hotspot/jtreg/serviceability/jdwp/AllModulesCommandTest.java b/test/hotspot/jtreg/serviceability/jdwp/AllModulesCommandTest.java index 76a6aa4a3e3..dc6c05338ea 100644 --- a/test/hotspot/jtreg/serviceability/jdwp/AllModulesCommandTest.java +++ b/test/hotspot/jtreg/serviceability/jdwp/AllModulesCommandTest.java @@ -34,6 +34,7 @@ * @library /test/lib * @modules jdk.jdwp.agent * @modules java.base/jdk.internal.misc + * @requires vm.jvmti * @compile AllModulesCommandTestDebuggee.java * @run main/othervm AllModulesCommandTest */ diff --git a/test/hotspot/jtreg/serviceability/jvmti/CanGenerateAllClassHook/CanGenerateAllClassHook.java b/test/hotspot/jtreg/serviceability/jvmti/CanGenerateAllClassHook/CanGenerateAllClassHook.java index c4e98c8b45f..cf84ed245af 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/CanGenerateAllClassHook/CanGenerateAllClassHook.java +++ b/test/hotspot/jtreg/serviceability/jvmti/CanGenerateAllClassHook/CanGenerateAllClassHook.java @@ -27,6 +27,7 @@ * @summary Tests that jvmtiEnv::GetPotentialCapabilities reports * can_generate_all_class_hook_events capability with CDS (-Xshare:on) * at ONLOAD and LIVE phases + * @requires vm.jvmti * @requires vm.cds * @library /test/lib * @compile CanGenerateAllClassHook.java diff --git a/test/hotspot/jtreg/serviceability/jvmti/GetLocalVariable/libGetLocalWithoutSuspendTest.cpp b/test/hotspot/jtreg/serviceability/jvmti/GetLocalVariable/libGetLocalWithoutSuspendTest.cpp index 5ae223aed5d..fe5e8c992fc 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/GetLocalVariable/libGetLocalWithoutSuspendTest.cpp +++ b/test/hotspot/jtreg/serviceability/jvmti/GetLocalVariable/libGetLocalWithoutSuspendTest.cpp @@ -154,7 +154,7 @@ void test_GetLocalObject(jvmtiEnv* jvmti, JNIEnv* env, int depth) { jobject obj; char* errMsg; - printf("AGENT: calling GetLocalObject()\n"); + printf("AGENT: calling GetLocalObject() with depth %d\n", depth); err = jvmti->GetLocalObject(target_thread, depth, 0, &obj); errMsg = GetErrorMessage(jvmti, err); printf("AGENT: GetLocalObject() result code %s (%d)\n", errMsg != NULL ? errMsg : "N/A", err); @@ -166,9 +166,13 @@ void test_GetLocalObject(jvmtiEnv* jvmti, JNIEnv* env, int depth) { // If the target thread wins the race we can get errors because we // don't find a frame at the given depth or we find a non-java frame // there (e.g. native frame). This is expected. + // JVMTI_ERROR_INVALID_SLOT can occur also because the target thread is + // running and the GetLocalObject() call might coincidentally refer to the + // frame of a static method without parameters. if (err != JVMTI_ERROR_NONE && err != JVMTI_ERROR_NO_MORE_FRAMES && - err != JVMTI_ERROR_OPAQUE_FRAME) { + err != JVMTI_ERROR_OPAQUE_FRAME && + err != JVMTI_ERROR_INVALID_SLOT) { ShowErrorMessage(jvmti, err, "AgentThreadLoop: error in JVMTI GetLocalObject"); env->FatalError("AgentThreadLoop: error in JVMTI GetLocalObject\n"); } @@ -260,7 +264,7 @@ AgentThreadLoop(jvmtiEnv * jvmti, JNIEnv* env, void * arg) { // It notifies the agent to do the GetLocalObject() call and then races // it to make its stack not walkable by returning from the native call. JNIEXPORT void JNICALL -Java_GetLocalWithoutSuspendTest_notifyAgentToGetLocal(JNIEnv *env, jclass cls, jint depth, jlong waitCycles) { +Java_GetLocalWithoutSuspendTest_notifyAgentToGetLocal(JNIEnv *env, jclass cls, jint depth, jint waitCycles) { monitor_enter(jvmti, env, AT_LINE); // Set depth_for_get_local and notify agent that the target thread is ready for the GetLocalObject() call diff --git a/test/hotspot/jtreg/serviceability/jvmti/HiddenClass/libHiddenClassSigTest.cpp b/test/hotspot/jtreg/serviceability/jvmti/HiddenClass/libHiddenClassSigTest.cpp index 5d94a3879fe..5be045c0482 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/HiddenClass/libHiddenClassSigTest.cpp +++ b/test/hotspot/jtreg/serviceability/jvmti/HiddenClass/libHiddenClassSigTest.cpp @@ -28,6 +28,7 @@ extern "C" { static const char* EXP_INTERF_SIG = "LP/Q/HCInterf;"; static const char* SIG_START = "LP/Q/HiddenClassSig"; +static const char* IDENTITYOBJECT_IF = "Ljava/lang/IdentityObject;"; static const size_t SIG_START_LEN = strlen(SIG_START); static const int ACC_INTERFACE = 0x0200; // Interface class modifiers bit @@ -192,20 +193,26 @@ check_hidden_class_impl_interf(jvmtiEnv* jvmti, JNIEnv* jni, jclass klass) { jclass* interfaces = NULL; jvmtiError err; - // check that hidden class implements just one interface + // check that hidden class implements just one interface (or two if IdentityObject has been injected) err = jvmti->GetImplementedInterfaces(klass, &count, &interfaces); CHECK_JVMTI_ERROR(jni, err, "check_hidden_class_impl_interf: Error in JVMTI GetImplementedInterfaces"); - if (count != 1) { - LOG1("check_hidden_class_impl_interf: FAIL: implemented interfaces count: %d, expected to be 1\n", count); + if (count != 1 && count != 2) { + LOG1("check_hidden_class_impl_interf: FAIL: implemented interfaces count: %d, expected to be in [1-2] range\n", count); failed = true; return; } - // get interface signature - err = jvmti->GetClassSignature(interfaces[0], &sig, NULL); - CHECK_JVMTI_ERROR(jni, err, "check_hidden_class_impl_interf: Error in JVMTI GetClassSignature for implemented interface"); + bool found = false; + for (int i = 0; i < count; i++) { + // get interface signature + err = jvmti->GetClassSignature(interfaces[i], &sig, NULL); + CHECK_JVMTI_ERROR(jni, err, "check_hidden_class_impl_interf: Error in JVMTI GetClassSignature for implemented interface"); + // check the interface signature is matching the expected + if (strcmp(sig, EXP_INTERF_SIG) == 0) { + found = true; + } + } - // check the interface signature is matching the expected - if (strcmp(sig, EXP_INTERF_SIG) != 0) { + if (!found) { LOG2("check_hidden_class_impl_interf: FAIL: implemented interface signature: %s, expected to be: %s\n", sig, EXP_INTERF_SIG); failed = true; diff --git a/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/TransformerDeadlockTest.java b/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/TransformerDeadlockTest.java new file mode 100644 index 00000000000..90abecd9d4c --- /dev/null +++ b/test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/TransformerDeadlockTest.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8241390 + * @summary Test recursively retransforms the same class. The test hangs if + * a deadlock happens. + * @requires vm.jvmti + * @library /test/lib + * @modules java.instrument + * @compile TransformerDeadlockTest.java + * @run driver TransformerDeadlockTest + */ + +import jdk.test.lib.process.ProcessTools; + +import java.lang.instrument.ClassFileTransformer; +import java.lang.instrument.IllegalClassFormatException; +import java.lang.instrument.Instrumentation; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.security.ProtectionDomain; + + +public class TransformerDeadlockTest { + + private static String manifest = "Premain-Class: " + + TransformerDeadlockTest.Agent.class.getName() + "\n" + + "Can-Retransform-Classes: true\n" + + "Can-Retransform-Classes: true\n"; + + private static String CP = System.getProperty("test.classes"); + + public static void main(String args[]) throws Throwable { + String agentJar = buildAgent(); + ProcessTools.executeProcess( + ProcessTools.createJavaProcessBuilder( + "-javaagent:" + agentJar, + TransformerDeadlockTest.Agent.class.getName()) + ).shouldHaveExitValue(0); + } + + private static String buildAgent() throws Exception { + Path jar = Files.createTempFile(Paths.get("."), null, ".jar"); + String jarPath = jar.toAbsolutePath().toString(); + ClassFileInstaller.writeJar(jarPath, + ClassFileInstaller.Manifest.fromString(manifest), + TransformerDeadlockTest.class.getName()); + return jarPath; + } + + public static class Agent implements ClassFileTransformer { + private static Instrumentation instrumentation; + + public static void premain(String agentArgs, Instrumentation inst) { + instrumentation = inst; + } + + @Override + public byte[] transform( + ClassLoader loader, + String className, + Class<?> classBeingRedefined, + ProtectionDomain protectionDomain, + byte[] classfileBuffer) + throws IllegalClassFormatException { + + if (!TransformerDeadlockTest.class.getName().replace(".", "/").equals(className)) { + return null; + } + invokeRetransform(); + return classfileBuffer; + + } + + public static void main(String[] args) throws Exception { + instrumentation.addTransformer(new TransformerDeadlockTest.Agent(), true); + + try { + instrumentation.retransformClasses(TransformerDeadlockTest.class); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + private static void invokeRetransform() { + try { + instrumentation.retransformClasses(TransformerDeadlockTest.class); + } catch (Exception e) { + throw new RuntimeException(e); + } finally { + } + } + } +} diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbPmap.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbPmap.java index ef9d3e056ed..54e732af76c 100644 --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbPmap.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbPmap.java @@ -45,7 +45,7 @@ * @summary Test clhsdb pmap command on a core file * @requires vm.hasSA * @library /test/lib - * @run main/othervm/timeout=240 ClhsdbPmap true + * @run main/othervm/timeout=480 ClhsdbPmap true */ public class ClhsdbPmap { diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java index b8409ec6eb8..5eb162f9585 100644 --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java @@ -45,7 +45,7 @@ * @summary Test clhsdb pstack command on a core file * @requires vm.hasSA * @library /test/lib - * @run main/othervm/timeout=240 ClhsdbPstack true + * @run main/othervm/timeout=480 ClhsdbPstack true */ public class ClhsdbPstack { diff --git a/test/hotspot/jtreg/serviceability/sa/TestPrintMdo.java b/test/hotspot/jtreg/serviceability/sa/TestPrintMdo.java index 1e022ee3ec2..11f162dd449 100644 --- a/test/hotspot/jtreg/serviceability/sa/TestPrintMdo.java +++ b/test/hotspot/jtreg/serviceability/sa/TestPrintMdo.java @@ -45,7 +45,7 @@ public static void main (String... args) throws Exception { LingeredApp app = null; try { ClhsdbLauncher test = new ClhsdbLauncher(); - app = LingeredApp.startApp("-XX:+ProfileInterpreter"); + app = LingeredApp.startApp("-XX:+ProfileInterpreter", "-XX:CompileThreshold=100"); System.out.println ("Started LingeredApp with pid " + app.getPid()); List<String> cmds = List.of("printmdo -a"); diff --git a/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java b/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java index fb13eb8d986..2f56dfd12ba 100644 --- a/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java +++ b/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -83,11 +83,6 @@ public static void compileClass(Class<?> aClass, long id, Executor executor) { executor.execute(new CompileMethodCommand(id, e)); } METHOD_COUNT.addAndGet(methodCount); - - if (Utils.DEOPTIMIZE_ALL_CLASSES_RATE > 0 - && (id % Utils.DEOPTIMIZE_ALL_CLASSES_RATE == 0)) { - WHITE_BOX.deoptimizeAll(); - } } private static void preloadClasses(String className, long id, diff --git a/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Utils.java b/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Utils.java index ff44618647c..7c4c749ccce 100644 --- a/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Utils.java +++ b/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Utils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -26,9 +26,6 @@ import com.sun.management.HotSpotDiagnosticMXBean; import java.lang.management.ManagementFactory; -import java.io.File; -import java.util.regex.Pattern; - /** * Auxiliary methods. */ @@ -57,18 +54,6 @@ public class Utils { * Initial compilation level. */ public static final int INITIAL_COMP_LEVEL; - /** - * Compiled path-separator regexp. - */ - public static final Pattern PATH_SEPARATOR = Pattern.compile( - File.pathSeparator, Pattern.LITERAL); - /** - * Value of {@code -DDeoptimizeAllClassesRate}. Frequency of - * {@code WB.deoptimizeAll()} invocation If it less that {@code 0}, - * {@code WB.deoptimizeAll()} will not be invoked. - */ - public static final int DEOPTIMIZE_ALL_CLASSES_RATE - = Integer.getInteger("DeoptimizeAllClassesRate", -1); /** * Value of {@code -DCompileTheWorldStopAt}. Last class to consider. */ diff --git a/test/hotspot/jtreg/vmTestbase/PropertyResolvingWrapper.java b/test/hotspot/jtreg/vmTestbase/PropertyResolvingWrapper.java deleted file mode 100644 index 4a2a99f71a0..00000000000 --- a/test/hotspot/jtreg/vmTestbase/PropertyResolvingWrapper.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2017, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.reflect.InvocationTargetException; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; - -/** - * Replaces all {@code ${<X>}} with value of corresponding property({@code X}), - * resulting string is handled similarly to {@code @run main} in jtreg. - * In other words, {@code main} of first token will be executed with the rest - * tokens as arguments. - * - * If one of properties can't be resolved, {@link Error} will be thrown. - */ -public class PropertyResolvingWrapper { - private static final Properties properties; - static { - Properties p = System.getProperties(); - String name = p.getProperty("os.name"); - String arch = p.getProperty("os.arch"); - String family; - String simple_arch; - - // copy from jtreg/src/share/classes/com/sun/javatest/regtest/config/OS.java - if (name.startsWith("AIX")) - family = "aix"; - else if (name.startsWith("Linux")) - family = "linux"; - else if (name.startsWith("Mac") || name.startsWith("Darwin")) - family = "mac"; - else if (name.startsWith("OS400") || name.startsWith("OS/400") ) - family = "os400"; - else if (name.startsWith("Windows")) - family = "windows"; - else - family = name.replaceFirst("^([^ ]+).*", "$1"); // use first word of name - - if (arch.contains("64") - && !arch.equals("ia64") - && !arch.equals("ppc64") - && !arch.equals("ppc64le") - && !arch.equals("zArch_64") - && !arch.equals("aarch64")) - simple_arch = "x64"; - else if (arch.contains("86")) - simple_arch = "i586"; - else if (arch.equals("ppc") || arch.equals("powerpc")) - simple_arch = "ppc"; - else if (arch.equals("s390x") || arch.equals("zArch_64")) - simple_arch = "s390x"; - else - simple_arch = arch; - - p.setProperty("os.family", family); - p.setProperty("os.simpleArch", simple_arch); - properties = p; - } - - public static void main(String[] args) throws Throwable { - List<String> command = new ArrayList<>(args.length); - for (int i = 0; i < args.length; ++i) { - StringBuilder arg = new StringBuilder(args[i]); - while (i < args.length - 1 - && (arg.chars() - .filter(c -> c == '"') - .count() % 2) != 0) { - arg.append(" ") - .append(args[++i]); - } - command.add(eval(arg.toString())); - } - System.out.println("run " + command); - try { - Class.forName(command.remove(0)) - .getMethod("main", String[].class) - .invoke(null, new Object[]{command.toArray(new String[0])}); - } catch (InvocationTargetException e) { - Throwable t = e.getCause(); - t = t != null ? t : e; - throw t; - } - } - - private static String eval(String string) { - int index; - int current = 0; - StringBuilder result = new StringBuilder(); - while (current < string.length() && (index = string.indexOf("${", current)) >= 0) { - result.append(string.substring(current, index)); - int endName = string.indexOf('}', index); - current = endName + 1; - String name = string.substring(index + 2, endName); - String value = properties.getProperty(name); - if (value == null) { - throw new Error("can't find property " + name); - } - result.append(value); - } - if (current < string.length()) { - result.append(string.substring(current)); - } - int length = result.length(); - - if (length > 1 && result.charAt(0) == '"' && result.charAt(length - 1) == '"') { - result.deleteCharAt(length - 1); - result.deleteCharAt(0); - } - return result.toString(); - } -} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/AttachProvider/AttachProvider01/AttachProvider01.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/AttachProvider/AttachProvider01/AttachProvider01.java index e68fb16def2..7e3f7a9687d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/AttachProvider/AttachProvider01/AttachProvider01.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/AttachProvider/AttachProvider01/AttachProvider01.java @@ -35,23 +35,25 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.aod.AttachProvider.AttachProvider01.AttachProvider01 - * nsk.share.aod.DummyTargetApplication - * @run main/othervm -XX:+UsePerfData PropertyResolvingWrapper + * @build nsk.share.aod.DummyTargetApplication + * @run main/othervm + * -XX:+UsePerfData * nsk.aod.AttachProvider.AttachProvider01.AttachProvider01 * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.DummyTargetApplication */ package nsk.aod.AttachProvider.AttachProvider01; -import java.util.List; -import com.sun.tools.attach.*; +import com.sun.tools.attach.VirtualMachine; +import com.sun.tools.attach.VirtualMachineDescriptor; import com.sun.tools.attach.spi.AttachProvider; -import nsk.share.aod.*; +import nsk.share.aod.AODTestRunner; import nsk.share.test.TestUtils; +import java.util.List; + /* * Test checks method AttachProvider.listVirtualMachines() * (test checks that collection returned by AttachProvider.listVirtualMachines() contains current VM @@ -63,7 +65,7 @@ public AttachProvider01(String[] args) { super(args); } - public void doTestActions(String targetVMId) throws Throwable { + public void doTestActions(String targetVMId) { String currentVMId = getCurrentVMId(); for (AttachProvider provider : AttachProvider.providers()) { diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/AttachProvider/AttachProvider02/AttachProvider02.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/AttachProvider/AttachProvider02/AttachProvider02.java index 45a0642b3be..9c9ba30aad5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/AttachProvider/AttachProvider02/AttachProvider02.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/AttachProvider/AttachProvider02/AttachProvider02.java @@ -37,24 +37,26 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.aod.AttachProvider.AttachProvider02.AttachProvider02 - * nsk.share.aod.DummyTargetApplication - * @run main/othervm -Djdk.attach.allowAttachSelf -XX:+UsePerfData - * PropertyResolvingWrapper + * @build nsk.share.aod.DummyTargetApplication + * @run main/othervm + * -Djdk.attach.allowAttachSelf + * -XX:+UsePerfData * nsk.aod.AttachProvider.AttachProvider02.AttachProvider02 * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.DummyTargetApplication */ package nsk.aod.AttachProvider.AttachProvider02; -import java.util.Properties; -import com.sun.tools.attach.*; +import com.sun.tools.attach.VirtualMachine; +import com.sun.tools.attach.VirtualMachineDescriptor; import com.sun.tools.attach.spi.AttachProvider; -import nsk.share.aod.*; +import nsk.share.aod.AODTestRunner; import nsk.share.test.TestUtils; +import java.util.Properties; + /* * Test checks following methods: * - AttachProvider.attachVirtualMachine(String id) @@ -80,11 +82,9 @@ public void doTestActions(String targetVMId) throws Throwable { TestUtils.assertNotNull(provider.type(), "Provider.type() returns null"); tryAttach(provider, currentVMId, false); - tryAttach(provider, currentVMId, true); tryAttach(provider, targetVMId, false); - tryAttach(provider, targetVMId, true); } } @@ -95,17 +95,17 @@ void tryAttach(AttachProvider provider, String vmId, boolean useVMDescriptor) th VirtualMachine vm; - if (useVMDescriptor) + if (useVMDescriptor) { vm = provider.attachVirtualMachine(new VirtualMachineDescriptor(provider, vmId)); - else + } else { vm = provider.attachVirtualMachine(vmId); + } try { log.display("Attached to vm: " + vm); TestUtils.assertEquals(vm.id(), vmId, "VirtualMachine.id() returns unexpected value for attached vm: " + vm.id()); // try to use created VirtualMachine - log.display("Trying to call VirtualMachine.getSystemProperties()"); Properties properties = vm.getSystemProperties(); TestUtils.assertNotNull(properties, "VirtualMachine.getSystemProperties() returns null"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/TEST.properties b/test/hotspot/jtreg/vmTestbase/nsk/aod/TEST.properties deleted file mode 100644 index d63be964852..00000000000 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/TEST.properties +++ /dev/null @@ -1,2 +0,0 @@ -# disabled till JDK-8251999 is fixed -allowSmartActionArgs=false diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine01/VirtualMachine01.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine01/VirtualMachine01.java index dc98240584d..257d4022d2b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine01/VirtualMachine01.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine01/VirtualMachine01.java @@ -39,21 +39,23 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.aod.VirtualMachine.VirtualMachine01.VirtualMachine01 - * nsk.share.aod.DummyTargetApplication - * @run main/othervm -XX:+UsePerfData PropertyResolvingWrapper + * @build nsk.share.aod.DummyTargetApplication + * @run main/othervm + * -XX:+UsePerfData * nsk.aod.VirtualMachine.VirtualMachine01.VirtualMachine01 * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.DummyTargetApplication */ package nsk.aod.VirtualMachine.VirtualMachine01; -import nsk.share.aod.*; -import nsk.share.test.TestUtils; -import com.sun.tools.attach.*; +import com.sun.tools.attach.AttachNotSupportedException; +import com.sun.tools.attach.VirtualMachine; +import com.sun.tools.attach.VirtualMachineDescriptor; import com.sun.tools.attach.spi.AttachProvider; +import nsk.share.aod.AODTestRunner; +import nsk.share.test.TestUtils; /* * Test provokes exception which should be thrown by VirtualMachine methods: diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine02/VirtualMachine02.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine02/VirtualMachine02.java index 8116ef96eed..a562b939b25 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine02/VirtualMachine02.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine02/VirtualMachine02.java @@ -39,30 +39,30 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.aod.VirtualMachine.VirtualMachine02.VirtualMachine02 - * nsk.share.aod.DummyTargetApplication - * @run main/othervm -Djdk.attach.allowAttachSelf -XX:+UsePerfData - * PropertyResolvingWrapper + * @build nsk.share.aod.DummyTargetApplication + * @run main/othervm + * -Djdk.attach.allowAttachSelf + * -XX:+UsePerfData * nsk.aod.VirtualMachine.VirtualMachine02.VirtualMachine02 * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.DummyTargetApplication */ package nsk.aod.VirtualMachine.VirtualMachine02; -import java.io.IOException; -import com.sun.tools.attach.*; +import com.sun.tools.attach.VirtualMachine; +import com.sun.tools.attach.VirtualMachineDescriptor; import com.sun.tools.attach.spi.AttachProvider; -import nsk.share.aod.*; +import nsk.share.aod.AODTestRunner; import nsk.share.test.TestUtils; +import java.io.IOException; + /* * Test checks following methods: * - VirtualMachine.attach(String) (test tries to attach to current and to another VM) - * * - VirtualMachine.attach(VirtualMachineDescriptor) (test tries to attach to current and to another VM) - * * - VirtualMachine.detach() (test checks that after detaching operations on VirtualMachine * throw IOException) */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine03/VirtualMachine03.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine03/VirtualMachine03.java index 7c9414613a3..3a1905faed5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine03/VirtualMachine03.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine03/VirtualMachine03.java @@ -34,20 +34,20 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.aod.VirtualMachine.VirtualMachine03.VirtualMachine03 - * nsk.share.aod.DummyTargetApplication - * @run main/othervm -Djdk.attach.allowAttachSelf -XX:+UsePerfData - * PropertyResolvingWrapper + * @build nsk.share.aod.DummyTargetApplication + * @run main/othervm + * -Djdk.attach.allowAttachSelf + * -XX:+UsePerfData * nsk.aod.VirtualMachine.VirtualMachine03.VirtualMachine03 * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.DummyTargetApplication */ package nsk.aod.VirtualMachine.VirtualMachine03; import com.sun.tools.attach.VirtualMachine; -import nsk.share.aod.*; +import nsk.share.aod.AODTestRunner; import nsk.share.test.TestUtils; /* @@ -63,23 +63,21 @@ public void doTestActions(String targetVMId) throws Throwable { String currentVMId = getCurrentVMId(); VirtualMachine vm1 = VirtualMachine.attach(currentVMId); - - VirtualMachine vm2 = VirtualMachine.attach(targetVMId); - try { - TestUtils.assertEquals(vm1.id(), currentVMId, "vm.id() returns unexpected value: " + vm1.id()); - - TestUtils.assertEquals(vm2.id(), targetVMId, "vm.id() returns unexpected value: " + vm2.id()); - - TestUtils.assertTrue(!vm1.equals(vm2), vm1 + ".equals(" + vm2 + ") returns 'true'"); - - checkVM(vm1); - - checkVM(vm2); + VirtualMachine vm2 = VirtualMachine.attach(targetVMId); + try { + TestUtils.assertEquals(vm1.id(), currentVMId, "vm.id() returns unexpected value: " + vm1.id()); + TestUtils.assertEquals(vm2.id(), targetVMId, "vm.id() returns unexpected value: " + vm2.id()); + + TestUtils.assertTrue(!vm1.equals(vm2), vm1 + ".equals(" + vm2 + ") returns 'true'"); + + checkVM(vm1); + checkVM(vm2); + } finally { + vm2.detach(); + } } finally { vm1.detach(); - - vm2.detach(); } } @@ -90,15 +88,13 @@ void checkVM(VirtualMachine vm1) throws Throwable { VirtualMachine vm2 = VirtualMachine.attach(vm1.id()); try { TestUtils.assertEquals(vm1, vm2, vm1 + ".equals(" + vm2 + ") returns 'false'"); - TestUtils.assertTrue(vm1.hashCode() == vm2.hashCode(), "vm.hashCode() returns different values for " + vm1 + " and " + vm2); - TestUtils.assertEquals(vm1.provider(), vm2.provider(), "vm.provider() returns non-equals objects for " + vm1 + " and " + vm2); } finally { vm2.detach(); } - TestUtils.assertTrue(!vm1.equals(new String()), "vm.equals(String) returns 'true'"); + TestUtils.assertTrue(!vm1.equals(""), "vm.equals(String) returns 'true'"); TestUtils.assertTrue(!vm1.equals(null), "vm.equals(null) returns 'true'"); } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine04/VM04Target.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine04/VM04Target.java index 005deb88116..0dcf9e2518c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine04/VM04Target.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine04/VM04Target.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -20,6 +20,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package nsk.aod.VirtualMachine.VirtualMachine04; import nsk.share.TestBug; @@ -30,28 +31,26 @@ * main test application tries to get this property using VirtualMachine.getSystemProperties() */ public class VM04Target extends DummyTargetApplication { - - static String testPropertyKey = "VirtualMachine04_testPropertyKey"; - - static String testPropertyValue = "VirtualMachine04_testPropertyValue"; - - static String changedTestPropertyValue = "VirtualMachine04_testPropertyValue_changed"; + static final String TEST_PROPERTY_KEY = "VirtualMachine04_testPropertyKey"; + static final String TEST_PROPERTY_VALUE = "VirtualMachine04_testPropertyValue"; + static final String CHANGED_TEST_PROPERTY_VALUE = "VirtualMachine04_testPropertyValue_changed"; VM04Target(String[] args) { super(args); - log.display("Setting property " + testPropertyKey + " = " + testPropertyValue); - System.setProperty(testPropertyKey, testPropertyValue); + log.display("Setting property " + TEST_PROPERTY_KEY + " = " + TEST_PROPERTY_VALUE); + System.setProperty(TEST_PROPERTY_KEY, TEST_PROPERTY_VALUE); } protected void targetApplicationActions() { String signal = pipe.readln(); - log.display("Received signal: " + signal); - if (!signal.equals(VirtualMachine04.SIGNAL_CHANGE_PROPERTY)) + log.display("Received signal: " + signal); + if (!signal.equals(VirtualMachine04.SIGNAL_CHANGE_PROPERTY)) { throw new TestBug("Received unexpected signal: " + signal); + } - log.display("Setting property " + testPropertyKey + " = " + changedTestPropertyValue); - System.setProperty(testPropertyKey, changedTestPropertyValue); + log.display("Setting property " + TEST_PROPERTY_KEY + " = " + CHANGED_TEST_PROPERTY_VALUE); + System.setProperty(TEST_PROPERTY_KEY, CHANGED_TEST_PROPERTY_VALUE); log.display("Sending signal " + VirtualMachine04.SIGNAL_PROPERTY_CHANGED); pipe.println(VirtualMachine04.SIGNAL_PROPERTY_CHANGED); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine04/VirtualMachine04.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine04/VirtualMachine04.java index 7fe22a069d0..3bd98cd5043 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine04/VirtualMachine04.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine04/VirtualMachine04.java @@ -38,33 +38,31 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.aod.VirtualMachine.VirtualMachine04.VirtualMachine04 - * nsk.aod.VirtualMachine.VirtualMachine04.VM04Target - * @run main/othervm -XX:+UsePerfData PropertyResolvingWrapper + * @build nsk.aod.VirtualMachine.VirtualMachine04.VM04Target + * @run main/othervm + * -XX:+UsePerfData * nsk.aod.VirtualMachine.VirtualMachine04.VirtualMachine04 * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.aod.VirtualMachine.VirtualMachine04.VM04Target */ package nsk.aod.VirtualMachine.VirtualMachine04; -import java.util.Properties; import com.sun.tools.attach.VirtualMachine; +import nsk.share.TestBug; import nsk.share.aod.AODTestRunner; import nsk.share.test.TestUtils; -import nsk.share.*; + +import java.util.Properties; /* * Test checks following methods: * - VirtualMachine.getSystemProperties() - * * - VirtualMachine.getAgentProperties() */ public class VirtualMachine04 extends AODTestRunner { - static final String SIGNAL_CHANGE_PROPERTY = "change_property"; - static final String SIGNAL_PROPERTY_CHANGED = "property_changed"; public VirtualMachine04(String[] args) { @@ -75,16 +73,16 @@ public void doTestActions(String targetVMId) throws Throwable { VirtualMachine vm = VirtualMachine.attach(targetVMId); try { - checkSystemProperties(vm, VM04Target.testPropertyKey, VM04Target.testPropertyValue); + checkSystemProperties(vm, VM04Target.TEST_PROPERTY_KEY, VM04Target.TEST_PROPERTY_VALUE); log.display("Sending signal " + SIGNAL_CHANGE_PROPERTY); pipe.println(SIGNAL_CHANGE_PROPERTY); String signal = pipe.readln(); log.display("Received signal " + signal); - if (!signal.equals(SIGNAL_PROPERTY_CHANGED)) + if (!signal.equals(SIGNAL_PROPERTY_CHANGED)) { throw new TestBug("Unexpected signal received: " + signal); - - checkSystemProperties(vm, VM04Target.testPropertyKey, VM04Target.changedTestPropertyValue); + } + checkSystemProperties(vm, VM04Target.TEST_PROPERTY_KEY, VM04Target.CHANGED_TEST_PROPERTY_VALUE); Properties properties = vm.getAgentProperties(); System.out.println("VirtualMachine.getAgentProperties(): " + properties); @@ -95,14 +93,14 @@ public void doTestActions(String targetVMId) throws Throwable { } void checkSystemProperties(VirtualMachine vm, - String propertyToCheck, - String expectedPropertyValue) throws Throwable { + String propertyToCheck, + String expectedPropertyValue) throws Throwable { Properties properties = vm.getSystemProperties(); System.out.println("VirtualMachine.getSystemProperties(): " + properties); checkProperties(properties); - String checkedPropertyValue = properties.getProperty(propertyToCheck); + String checkedPropertyValue = properties.getProperty(propertyToCheck); TestUtils.assertNotNull(checkedPropertyValue, "Properties doesn't contain property '" + propertyToCheck + "'"); TestUtils.assertEquals(checkedPropertyValue, expectedPropertyValue, "Unexpected value of the property '" + propertyToCheck + "': " + checkedPropertyValue + ", expected value is '" + expectedPropertyValue + "'"); @@ -120,7 +118,6 @@ void checkProperties(Properties properties) { log.display("Value of '" + key + "' = " + value); TestUtils.assertTrue(key instanceof String, "Property key isn't String: " + key.getClass().getName()); - TestUtils.assertTrue(value instanceof String, "Property value isn't String: " + value.getClass().getName()); } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine05/VirtualMachine05.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine05/VirtualMachine05.java index ae516c3f8b7..3c7e90a7ffa 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine05/VirtualMachine05.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine05/VirtualMachine05.java @@ -35,22 +35,24 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.aod.VirtualMachine.VirtualMachine05.VirtualMachine05 - * nsk.share.aod.DummyTargetApplication - * @run main/othervm -XX:+UsePerfData PropertyResolvingWrapper + * @build nsk.share.aod.DummyTargetApplication + * @run main/othervm + * -XX:+UsePerfData * nsk.aod.VirtualMachine.VirtualMachine05.VirtualMachine05 * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.DummyTargetApplication */ package nsk.aod.VirtualMachine.VirtualMachine05; -import java.util.List; -import com.sun.tools.attach.*; -import nsk.share.aod.*; +import com.sun.tools.attach.VirtualMachine; +import com.sun.tools.attach.VirtualMachineDescriptor; +import nsk.share.aod.AODTestRunner; import nsk.share.test.TestUtils; +import java.util.List; + /* * Test checks method VirtualMachine.list() * (test checks that collection returned by VirtualMachine.list() contains current VM @@ -62,14 +64,14 @@ public VirtualMachine05(String[] args) { super(args); } - public void doTestActions(String targetVMId) throws Throwable { + public void doTestActions(String targetVMId) { String currentVMId = getCurrentVMId(); log.display("Checking VirtualMachine.list()"); - checkList(VirtualMachine.list(), currentVMId, targetVMId); + checkList(currentVMId, targetVMId); } - private void checkList(List<VirtualMachineDescriptor> vmDescriptors, String currentVMId, String targetVMId) { + private void checkList(String currentVMId, String targetVMId) { VirtualMachineDescriptor currentVM = null; VirtualMachineDescriptor targetVM = null; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent00.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent00.java index 7f3f24affcf..0b961dc1e71 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent00.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent00.java @@ -20,12 +20,13 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package nsk.aod.VirtualMachine.VirtualMachine06; -import java.lang.instrument.Instrumentation; +package nsk.aod.VirtualMachine.VirtualMachine06; import nsk.share.aod.TargetApplicationWaitingAgents; +import java.lang.instrument.Instrumentation; + public class VM06Agent00 { public static void agentmain(String options, Instrumentation inst) { boolean success = true; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent01.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent01.java index e468e1f1d17..f863c196219 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent01.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent01.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -20,12 +20,13 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package nsk.aod.VirtualMachine.VirtualMachine06; -import java.lang.instrument.Instrumentation; +package nsk.aod.VirtualMachine.VirtualMachine06; import nsk.share.aod.TargetApplicationWaitingAgents; +import java.lang.instrument.Instrumentation; + public class VM06Agent01 { public static void agentmain(String options, Instrumentation inst) { boolean success = true; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent02.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent02.java index 04ae20a38ac..786f3f6d318 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent02.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent02.java @@ -20,12 +20,13 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package nsk.aod.VirtualMachine.VirtualMachine06; -import java.lang.instrument.Instrumentation; +package nsk.aod.VirtualMachine.VirtualMachine06; import nsk.share.aod.TargetApplicationWaitingAgents; +import java.lang.instrument.Instrumentation; + public class VM06Agent02 { public static void agentmain(String options, Instrumentation inst) { boolean success = true; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent03.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent03.java index 87558ec9e3a..a4053c73b59 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent03.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent03.java @@ -20,12 +20,13 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package nsk.aod.VirtualMachine.VirtualMachine06; -import java.lang.instrument.Instrumentation; +package nsk.aod.VirtualMachine.VirtualMachine06; import nsk.share.aod.TargetApplicationWaitingAgents; +import java.lang.instrument.Instrumentation; + public class VM06Agent03 { public static void agentmain(String options, Instrumentation inst) { TargetApplicationWaitingAgents.agentLoaded(VM06Agent03.class.getName()); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VirtualMachine06.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VirtualMachine06.java index d839fbe8524..58b9ac3fb98 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VirtualMachine06.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine06/VirtualMachine06.java @@ -53,51 +53,52 @@ * nsk.aod.VirtualMachine.VirtualMachine06.VM06Agent03 * * @comment create VM06Agent0[0-3].jar in current directory - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${test.jdk}/bin/jar * -cmf ${test.src}/VM06Agent00.mf * VM06Agent00.jar * nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent00.class - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${test.jdk}/bin/jar * -cmf ${test.src}/VM06Agent01.mf * VM06Agent01.jar * nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent01.class - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${test.jdk}/bin/jar * -cmf ${test.src}/VM06Agent02.mf * VM06Agent02.jar * nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent02.class - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${test.jdk}/bin/jar * -cmf ${test.src}/VM06Agent03.mf * VM06Agent03.jar * nsk/aod/VirtualMachine/VirtualMachine06/VM06Agent03.class * * - * @build nsk.aod.VirtualMachine.VirtualMachine06.VirtualMachine06 - * nsk.share.aod.TargetApplicationWaitingAgents - * @run main/othervm -XX:+UsePerfData PropertyResolvingWrapper + * @build nsk.share.aod.TargetApplicationWaitingAgents + * @run main/othervm + * -XX:+UsePerfData * nsk.aod.VirtualMachine.VirtualMachine06.VirtualMachine06 * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.TargetApplicationWaitingAgents * -ja VM06Agent00.jar,VM06Agent01.jar,VM06Agent02.jar,VM06Agent03.jar */ package nsk.aod.VirtualMachine.VirtualMachine06; +import com.sun.tools.attach.AgentInitializationException; +import com.sun.tools.attach.VirtualMachine; import nsk.share.TestBug; -import nsk.share.aod.*; +import nsk.share.aod.AODTestRunner; +import nsk.share.aod.AgentInformation; import nsk.share.test.TestUtils; -import java.util.*; -import com.sun.tools.attach.*; + +import java.util.List; /* * Test checks following methods: * - VirtualMachine.loadAgent(String) - * * - VirtualMachine.loadAgent(String, String) */ public class VirtualMachine06 extends AODTestRunner { @@ -109,12 +110,13 @@ public VirtualMachine06(String[] args) { public void doTestActions(String targetVMId) throws Throwable { // check that all required parameters were passed to the test List<AgentInformation> agents = argParser.getAgents(); - if (agents.size() != 4) + if (agents.size() != 4) { throw new TestBug("Test requires 4 agents, actually " + agents.size() + " were specified"); - + } for (AgentInformation agent : agents) { - if (!agent.jarAgent) + if (!agent.jarAgent) { throw new TestBug("Non JAR agent was specified"); + } } VirtualMachine vm = VirtualMachine.attach(targetVMId); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine07/VirtualMachine07.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine07/VirtualMachine07.java index bb2084760e1..73b4522ae6e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine07/VirtualMachine07.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine07/VirtualMachine07.java @@ -40,12 +40,12 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.aod.VirtualMachine.VirtualMachine07.VirtualMachine07 - * nsk.share.aod.TargetApplicationWaitingAgents - * @run main/othervm/native -XX:+UsePerfData PropertyResolvingWrapper + * @build nsk.share.aod.TargetApplicationWaitingAgents + * @run main/othervm/native + * -XX:+UsePerfData * nsk.aod.VirtualMachine.VirtualMachine07.VirtualMachine07 * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.TargetApplicationWaitingAgents * -na VirtualMachine07agent00,VirtualMachine07agent01,VirtualMachine07agent02,VirtualMachine07agent03 * -testedMethod loadAgentLibrary @@ -53,27 +53,26 @@ package nsk.aod.VirtualMachine.VirtualMachine07; -import nsk.share.*; -import nsk.share.aod.*; +import com.sun.tools.attach.AgentInitializationException; +import com.sun.tools.attach.VirtualMachine; +import nsk.share.TestBug; +import nsk.share.aod.AODRunnerArgParser; +import nsk.share.aod.AODTestRunner; +import nsk.share.aod.AgentInformation; import nsk.share.test.TestUtils; -import java.util.*; - -import com.sun.tools.attach.*; +import java.util.List; /* * Test is written to test following methods: * - VirtualMachine.loadAgentLibrary - * * - VirtualMachine.loadAgentPath * *(method to test is specified via command line parameter 'testedMethod') */ public class VirtualMachine07 extends AODTestRunner { - - static class ArgParser extends AODRunnerArgParser { - - final String testedMethodOpt = "testedMethod"; + private static class ArgParser extends AODRunnerArgParser { + private static final String TESTED_METHOD_OPT = "testedMethod"; ArgParser(String[] args) { super(args); @@ -83,11 +82,12 @@ protected boolean checkOption(String option, String value) { if (super.checkOption(option, value)) return true; - if (option.equals(testedMethodOpt)) { - if (value.equals("loadAgentLibrary") || value.equals("loadAgentPath")) + if (option.equals(TESTED_METHOD_OPT)) { + if ("loadAgentLibrary".equals(value) || "loadAgentPath".equals(value)) { return true; - else - throw new TestBug("Unexpected value of '" + testedMethodOpt + "': " + value); + } else { + throw new TestBug("Unexpected value of '" + TESTED_METHOD_OPT + "': " + value); + } } return false; @@ -98,13 +98,14 @@ protected void checkOptions() { // if test loadAgentPath parameter arch is needed if (!testLoadAgentLibrary()) { - if (!options.containsKey("arch")) + if (!options.containsKey("arch")) { throw new TestBug("Option 'arch' wasn't specified"); + } } } boolean testLoadAgentLibrary() { - return options.getProperty(testedMethodOpt).equals("loadAgentLibrary"); + return options.getProperty(TESTED_METHOD_OPT).equals("loadAgentLibrary"); } } @@ -141,10 +142,11 @@ protected AODRunnerArgParser createArgParser(String[] args) { protected void loadAgent(VirtualMachine vm, String agent) throws Throwable { boolean testLoadAgentLibrary = ((ArgParser) argParser).testLoadAgentLibrary(); - if (testLoadAgentLibrary) + if (testLoadAgentLibrary) { log.display("Test method VirtualMachine.loadAgentLibrary"); - else + } else { log.display("Test method VirtualMachine.loadAgentPath"); + } if (testLoadAgentLibrary) { log.display("Loading '" + agent + "'"); @@ -159,10 +161,11 @@ protected void loadAgent(VirtualMachine vm, String agent) throws Throwable { protected void loadAgent(VirtualMachine vm, String agent, String options) throws Throwable { boolean testLoadAgentLibrary = ((ArgParser) argParser).testLoadAgentLibrary(); - if (testLoadAgentLibrary) + if (testLoadAgentLibrary) { log.display("Test method VirtualMachine.loadAgentLibrary"); - else + } else { log.display("Test method VirtualMachine.loadAgentPath"); + } if (testLoadAgentLibrary) { log.display("Loading '" + agent + "'"); @@ -177,12 +180,13 @@ protected void loadAgent(VirtualMachine vm, String agent, String options) throws public void doTestActions(String targetVMId) throws Throwable { // check that all required parameters were passed to the test List<AgentInformation> agents = argParser.getAgents(); - if (agents.size() != 4) + if (agents.size() != 4) { throw new TestBug("Test requires 4 agents, actually " + agents.size() + " were specified"); - + } for (AgentInformation agent : agents) { - if (agent.jarAgent) + if (agent.jarAgent) { throw new TestBug("Non native agent was specified"); + } } VirtualMachine vm = VirtualMachine.attach(targetVMId); @@ -209,7 +213,7 @@ public void doTestActions(String targetVMId) throws Throwable { log.display("Expected AgentInitializationException was caught"); log.display("AgentInitializationException.returnValue(): " + e.returnValue()); TestUtils.assertEquals(e.returnValue(), 10, - "AgentInitializationException.returnValue() returns unexpected value: " + e.returnValue()+ ", expected value is 10"); + "AgentInitializationException.returnValue() returns unexpected value: " + e.returnValue() + ", expected value is 10"); } } finally { vm.detach(); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine08/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine08/TestDescription.java index d0c629b3163..e484641dd2a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine08/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine08/TestDescription.java @@ -41,12 +41,12 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.aod.VirtualMachine.VirtualMachine07.VirtualMachine07 - * nsk.share.aod.TargetApplicationWaitingAgents - * @run main/othervm/native -XX:+UsePerfData PropertyResolvingWrapper + * @build nsk.share.aod.TargetApplicationWaitingAgents + * @run main/othervm/native + * -XX:+UsePerfData * nsk.aod.VirtualMachine.VirtualMachine07.VirtualMachine07 * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.TargetApplicationWaitingAgents * -na ${test.nativepath}/VirtualMachine07agent00,${test.nativepath}/VirtualMachine07agent01,${test.nativepath}/VirtualMachine07agent02,${test.nativepath}/VirtualMachine07agent03 * -testedMethod loadAgentPath diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine09/VirtualMachine09.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine09/VirtualMachine09.java index 5488e4c79d1..47d1a718e88 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine09/VirtualMachine09.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine09/VirtualMachine09.java @@ -37,12 +37,12 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.aod.VirtualMachine.VirtualMachine09.VirtualMachine09 - * nsk.aod.VirtualMachine.VirtualMachine09.VM09Target - * @run main/othervm/native -XX:+UsePerfData PropertyResolvingWrapper + * @build nsk.aod.VirtualMachine.VirtualMachine09.VM09Target + * @run main/othervm/native + * -XX:+UsePerfData * nsk.aod.VirtualMachine.VirtualMachine09.VirtualMachine09 * -jdk ${test.jdk} - * "-javaOpts=-agentlib:VirtualMachine09agent00 -XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-agentlib:VirtualMachine09agent00 -XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.aod.VirtualMachine.VirtualMachine09.VM09Target * -na VirtualMachine09agent00 * -testedMethod loadAgentLibrary @@ -50,13 +50,12 @@ package nsk.aod.VirtualMachine.VirtualMachine09; +import com.sun.tools.attach.VirtualMachine; import nsk.aod.VirtualMachine.VirtualMachine07.VirtualMachine07; import nsk.share.TestBug; -import nsk.share.aod.*; +import nsk.share.aod.AgentInformation; -import java.util.*; - -import com.sun.tools.attach.*; +import java.util.List; /* * Test checks methods VirtualMachine.loadAgentLib and VirtualMachineloadAgentPath. @@ -73,12 +72,13 @@ public VirtualMachine09(String[] args) { public void doTestActions(String targetVMId) throws Throwable { // check that all required parameters were passed to the test List<AgentInformation> agents = argParser.getAgents(); - if (agents.size() != 1) + if (agents.size() != 1) { throw new TestBug("Test requires 1 agent, actually " + agents.size() + " were specified"); - + } for (AgentInformation agent : agents) { - if (agent.jarAgent) + if (agent.jarAgent) { throw new TestBug("Non native agent was specified"); + } } VirtualMachine vm = VirtualMachine.attach(targetVMId); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine10/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine10/TestDescription.java index e07fed3dd6c..c9c5b1ee64f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine10/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachine/VirtualMachine10/TestDescription.java @@ -38,12 +38,12 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.aod.VirtualMachine.VirtualMachine09.VirtualMachine09 - * nsk.aod.VirtualMachine.VirtualMachine09.VM09Target - * @run main/othervm/native -XX:+UsePerfData PropertyResolvingWrapper + * @build nsk.aod.VirtualMachine.VirtualMachine09.VM09Target + * @run main/othervm/native + * -XX:+UsePerfData * nsk.aod.VirtualMachine.VirtualMachine09.VirtualMachine09 * -jdk ${test.jdk} - * "-javaOpts=-agentlib:VirtualMachine09agent00 -XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-agentlib:VirtualMachine09agent00 -XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.aod.VirtualMachine.VirtualMachine09.VM09Target * -na ${test.nativepath}/VirtualMachine09agent00 * -testedMethod loadAgentPath diff --git a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachineDescriptor/VirtualMachineDescriptor01/VirtualMachineDescriptor01.java b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachineDescriptor/VirtualMachineDescriptor01/VirtualMachineDescriptor01.java index 8ab53fa931b..47f837a110f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachineDescriptor/VirtualMachineDescriptor01/VirtualMachineDescriptor01.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/aod/VirtualMachineDescriptor/VirtualMachineDescriptor01/VirtualMachineDescriptor01.java @@ -37,20 +37,21 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.aod.VirtualMachineDescriptor.VirtualMachineDescriptor01.VirtualMachineDescriptor01 - * nsk.share.aod.DummyTargetApplication - * @run main/othervm -XX:+UsePerfData PropertyResolvingWrapper + * @build nsk.share.aod.DummyTargetApplication + * @run main/othervm + * -XX:+UsePerfData * nsk.aod.VirtualMachineDescriptor.VirtualMachineDescriptor01.VirtualMachineDescriptor01 * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.DummyTargetApplication */ package nsk.aod.VirtualMachineDescriptor.VirtualMachineDescriptor01; -import com.sun.tools.attach.*; +import com.sun.tools.attach.VirtualMachine; +import com.sun.tools.attach.VirtualMachineDescriptor; import com.sun.tools.attach.spi.AttachProvider; -import nsk.share.aod.*; +import nsk.share.aod.AODTestRunner; import nsk.share.test.TestUtils; /* @@ -108,8 +109,7 @@ public void doTestActions(String targetVMId) throws Throwable { "VirtualMachineDescriptor.equals() returns 'false' for '" + targetVMDesc + "' and '" + targetVMDesc2 + "'"); TestUtils.assertEquals(targetVMDesc.hashCode(), targetVMDesc2.hashCode(), - "VirtualMachineDescriptor.hashCode() returns different values " + "(" + targetVMDesc.hashCode() + " and " + targetVMDesc2.hashCode() + ")" + - " for '" + targetVMDesc + "' and '" + targetVMDesc2 + "'"); + "VirtualMachineDescriptor.hashCode() returns different values for '" + targetVMDesc + "' and '" + targetVMDesc2 + "'"); } finally { targetVM.detach(); } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/TEST.properties b/test/hotspot/jtreg/vmTestbase/nsk/jdb/TEST.properties deleted file mode 100644 index 1f4ad32288e..00000000000 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/TEST.properties +++ /dev/null @@ -1,2 +0,0 @@ -# disabled till JDK-8252000 is fixed -allowSmartActionArgs=false diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/caught_exception/caught_exception002/caught_exception002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/caught_exception/caught_exception002/caught_exception002.java index 7ab8ef9ad8c..4eef7900d42 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/caught_exception/caught_exception002/caught_exception002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/caught_exception/caught_exception002/caught_exception002.java @@ -45,9 +45,8 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.caught_exception.caught_exception002.caught_exception002 - * nsk.jdb.caught_exception.caught_exception002.caught_exception002a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdb.caught_exception.caught_exception002.caught_exception002a + * @run main/othervm * nsk.jdb.caught_exception.caught_exception002.caught_exception002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/classes/classes001/classes001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/classes/classes001/classes001.java index 2e2f4e266da..40a5ebaa939 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/classes/classes001/classes001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/classes/classes001/classes001.java @@ -36,9 +36,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.classes.classes001.classes001 - * nsk.jdb.classes.classes001.classes001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.classes.classes001.classes001 + * @build nsk.jdb.classes.classes001.classes001a + * @run main/othervm + * nsk.jdb.classes.classes001.classes001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/classpath/classpath001/classpath001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/classpath/classpath001/classpath001.java index af77f08807a..0eea9a92ab2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/classpath/classpath001/classpath001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/classpath/classpath001/classpath001.java @@ -35,9 +35,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.classpath.classpath001.classpath001 - * nsk.jdb.classpath.classpath001.classpath001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.classpath.classpath001.classpath001 + * @build nsk.jdb.classpath.classpath001.classpath001a + * @run main/othervm + * nsk.jdb.classpath.classpath001.classpath001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/clear/clear002/clear002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/clear/clear002/clear002.java index 5590c771115..7869a1340a7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/clear/clear002/clear002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/clear/clear002/clear002.java @@ -37,9 +37,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.clear.clear002.clear002 - * nsk.jdb.clear.clear002.clear002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.clear.clear002.clear002 + * @build nsk.jdb.clear.clear002.clear002a + * @run main/othervm + * nsk.jdb.clear.clear002.clear002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/clear/clear003/clear003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/clear/clear003/clear003.java index b7f0830b766..cbbc851f29a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/clear/clear003/clear003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/clear/clear003/clear003.java @@ -38,9 +38,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.clear.clear003.clear003 - * nsk.jdb.clear.clear003.clear003a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.clear.clear003.clear003 + * @build nsk.jdb.clear.clear003.clear003a + * @run main/othervm + * nsk.jdb.clear.clear003.clear003 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/clear/clear004/clear004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/clear/clear004/clear004.java index 696139c514b..c0ec8d20370 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/clear/clear004/clear004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/clear/clear004/clear004.java @@ -39,9 +39,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.clear.clear004.clear004 - * nsk.jdb.clear.clear004.clear004a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.clear.clear004.clear004 + * @build nsk.jdb.clear.clear004.clear004a + * @run main/othervm + * nsk.jdb.clear.clear004.clear004 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/down/down002/down002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/down/down002/down002.java index 1372b2d2eed..29a40d9471d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/down/down002/down002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/down/down002/down002.java @@ -42,9 +42,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.down.down002.down002 - * nsk.jdb.down.down002.down002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.down.down002.down002 + * @build nsk.jdb.down.down002.down002a + * @run main/othervm + * nsk.jdb.down.down002.down002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/dump/dump002/dump002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/dump/dump002/dump002.java index b7e62ed0321..3e3b5b9b858 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/dump/dump002/dump002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/dump/dump002/dump002.java @@ -46,9 +46,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.dump.dump002.dump002 - * nsk.jdb.dump.dump002.dump002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.dump.dump002.dump002 + * @build nsk.jdb.dump.dump002.dump002a + * @run main/othervm + * nsk.jdb.dump.dump002.dump002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/eval/eval001/eval001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/eval/eval001/eval001.java index df0fb5c40e8..98848ced90b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/eval/eval001/eval001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/eval/eval001/eval001.java @@ -52,7 +52,8 @@ * @clean nsk.jdb.eval.eval001.eval001a * @compile -g:lines,source,vars eval001a.java * - * @run main/othervm PropertyResolvingWrapper nsk.jdb.eval.eval001.eval001 + * @run main/othervm + * nsk.jdb.eval.eval001.eval001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/exclude/exclude001/exclude001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/exclude/exclude001/exclude001.java index 2f59ea05ccf..cee8ca44d58 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/exclude/exclude001/exclude001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/exclude/exclude001/exclude001.java @@ -58,9 +58,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.exclude.exclude001.exclude001 - * nsk.jdb.exclude.exclude001.exclude001a - * @run main/othervm/timeout=600 PropertyResolvingWrapper nsk.jdb.exclude.exclude001.exclude001 + * @build nsk.jdb.exclude.exclude001.exclude001a + * @run main/othervm/timeout=600 + * nsk.jdb.exclude.exclude001.exclude001 * -arch=${os.family}-${os.simpleArch} * -waittime=10 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/fields/fields001/fields001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/fields/fields001/fields001.java index fdbf97e0612..b5e2ccb58e5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/fields/fields001/fields001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/fields/fields001/fields001.java @@ -40,9 +40,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.fields.fields001.fields001 - * nsk.jdb.fields.fields001.fields001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.fields.fields001.fields001 + * @build nsk.jdb.fields.fields001.fields001a + * @run main/othervm + * nsk.jdb.fields.fields001.fields001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/hidden_class/hc001/hc001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/hidden_class/hc001/hc001.java index d2544a80c38..5040eef9cef 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/hidden_class/hc001/hc001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/hidden_class/hc001/hc001.java @@ -29,10 +29,10 @@ * /test/lib * @modules jdk.jdi * jdk.jdwp.agent - * @build nsk.jdb.hidden_class.hc001.hc001 - * nsk.jdb.hidden_class.hc001.hc001a + * @build nsk.jdb.hidden_class.hc001.hc001a * - * @run main/othervm PropertyResolvingWrapper nsk.jdb.hidden_class.hc001.hc001 + * @run main/othervm + * nsk.jdb.hidden_class.hc001.hc001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/ignore/ignore001/ignore001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/ignore/ignore001/ignore001.java index 9763bcd47fd..6eb8c91e1eb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/ignore/ignore001/ignore001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/ignore/ignore001/ignore001.java @@ -39,9 +39,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.ignore.ignore001.ignore001 - * nsk.jdb.ignore.ignore001.ignore001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.ignore.ignore001.ignore001 + * @build nsk.jdb.ignore.ignore001.ignore001a + * @run main/othervm + * nsk.jdb.ignore.ignore001.ignore001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/interrupt/interrupt001/interrupt001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/interrupt/interrupt001/interrupt001.java index 47162adfedc..a2d46e4ac15 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/interrupt/interrupt001/interrupt001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/interrupt/interrupt001/interrupt001.java @@ -46,9 +46,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.interrupt.interrupt001.interrupt001 - * nsk.jdb.interrupt.interrupt001.interrupt001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.interrupt.interrupt001.interrupt001 + * @build nsk.jdb.interrupt.interrupt001.interrupt001a + * @run main/othervm + * nsk.jdb.interrupt.interrupt001.interrupt001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/kill/kill001/kill001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/kill/kill001/kill001.java index dbce2558a5e..15ec0902021 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/kill/kill001/kill001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/kill/kill001/kill001.java @@ -46,9 +46,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.kill.kill001.kill001 - * nsk.jdb.kill.kill001.kill001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.kill.kill001.kill001 + * @build nsk.jdb.kill.kill001.kill001a + * @run main/othervm + * nsk.jdb.kill.kill001.kill001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/kill/kill002/kill002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/kill/kill002/kill002.java index 60b59e2a337..230dcdf12ba 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/kill/kill002/kill002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/kill/kill002/kill002.java @@ -42,9 +42,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.kill.kill002.kill002 - * nsk.jdb.kill.kill002.kill002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.kill.kill002.kill002 + * @build nsk.jdb.kill.kill002.kill002a + * @run main/othervm + * nsk.jdb.kill.kill002.kill002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/klass/class001/class001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/klass/class001/class001.java index b291ff0860b..4c548348dc3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/klass/class001/class001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/klass/class001/class001.java @@ -39,9 +39,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.klass.class001.class001 - * nsk.jdb.klass.class001.class001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.klass.class001.class001 + * @build nsk.jdb.klass.class001.class001a + * @run main/othervm + * nsk.jdb.klass.class001.class001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/list/list002/list002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/list/list002/list002.java index eb4f95d6979..4180ea3bb45 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/list/list002/list002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/list/list002/list002.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -42,10 +42,10 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.list.list002.list002 - * nsk.jdb.list.list002.list002a + * @build nsk.jdb.list.list002.list002a * @run driver jdk.test.lib.FileInstaller list002a.java src/nsk/jdb/list/list002/list002a.java - * @run main/othervm PropertyResolvingWrapper nsk.jdb.list.list002.list002 + * @run main/othervm + * nsk.jdb.list.list002.list002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java @@ -53,7 +53,7 @@ * -jdb=${test.jdk}/bin/jdb * -java.options="${test.vm.opts} ${test.java.opts}" * -workdir=. - * "-jdb.option=-sourcepath src/" + * -jdb.option="-sourcepath src/" * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/locals/locals002/locals002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/locals/locals002/locals002.java index 3212484271b..793cdc04608 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/locals/locals002/locals002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/locals/locals002/locals002.java @@ -52,7 +52,8 @@ * @clean nsk.jdb.locals.locals002.locals002a * @compile -g:lines,source,vars locals002a.java * - * @run main/othervm PropertyResolvingWrapper nsk.jdb.locals.locals002.locals002 + * @run main/othervm + * nsk.jdb.locals.locals002.locals002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/methods/methods002/methods002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/methods/methods002/methods002.java index 73a94589da5..2bacbab101b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/methods/methods002/methods002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/methods/methods002/methods002.java @@ -49,9 +49,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.methods.methods002.methods002 - * nsk.jdb.methods.methods002.methods002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.methods.methods002.methods002 + * @build nsk.jdb.methods.methods002.methods002a + * @run main/othervm + * nsk.jdb.methods.methods002.methods002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/monitor/monitor001/monitor001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/monitor/monitor001/monitor001.java index 47c81df9d0f..181fe199dfe 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/monitor/monitor001/monitor001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/monitor/monitor001/monitor001.java @@ -45,9 +45,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.monitor.monitor001.monitor001 - * nsk.jdb.monitor.monitor001.monitor001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.monitor.monitor001.monitor001 + * @build nsk.jdb.monitor.monitor001.monitor001a + * @run main/othervm + * nsk.jdb.monitor.monitor001.monitor001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/monitor/monitor002/monitor002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/monitor/monitor002/monitor002.java index b65b195f286..53c856128ce 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/monitor/monitor002/monitor002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/monitor/monitor002/monitor002.java @@ -41,9 +41,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.monitor.monitor002.monitor002 - * nsk.jdb.monitor.monitor002.monitor002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.monitor.monitor002.monitor002 + * @build nsk.jdb.monitor.monitor002.monitor002a + * @run main/othervm + * nsk.jdb.monitor.monitor002.monitor002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/next/next001/next001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/next/next001/next001.java index cf21d2f713d..206199f0bb3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/next/next001/next001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/next/next001/next001.java @@ -45,9 +45,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.next.next001.next001 - * nsk.jdb.next.next001.next001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.next.next001.next001 + * @build nsk.jdb.next.next001.next001a + * @run main/othervm + * nsk.jdb.next.next001.next001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect001/connect001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect001/connect001.java index c6fe0bed751..a78f3a96db4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect001/connect001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect001/connect001.java @@ -45,9 +45,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.options.connect.connect001.connect001 - * nsk.jdb.options.connect.connect001.connect001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.options.connect.connect001.connect001 + * @build nsk.jdb.options.connect.connect001.connect001a + * @run main/othervm + * nsk.jdb.options.connect.connect001.connect001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect002/connect002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect002/connect002.java index 130c2924e19..78bcf2fb973 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect002/connect002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect002/connect002.java @@ -45,9 +45,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.options.connect.connect002.connect002 - * nsk.jdb.options.connect.connect002.connect002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.options.connect.connect002.connect002 + * @build nsk.jdb.options.connect.connect002.connect002a + * @run main/othervm + * nsk.jdb.options.connect.connect002.connect002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect003/connect003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect003/connect003.java index f6e3eee7167..701f611d2ff 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect003/connect003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect003/connect003.java @@ -45,9 +45,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.options.connect.connect003.connect003 - * nsk.jdb.options.connect.connect003.connect003a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.options.connect.connect003.connect003 + * @build nsk.jdb.options.connect.connect003.connect003a + * @run main/othervm + * nsk.jdb.options.connect.connect003.connect003 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect004/connect004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect004/connect004.java index 2a715bd6e26..adaa58627dd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect004/connect004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect004/connect004.java @@ -45,9 +45,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.options.connect.connect004.connect004 - * nsk.jdb.options.connect.connect004.connect004a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.options.connect.connect004.connect004 + * @build nsk.jdb.options.connect.connect004.connect004a + * @run main/othervm + * nsk.jdb.options.connect.connect004.connect004 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect005/connect005.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect005/connect005.java index 066c0414907..8a670392466 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect005/connect005.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/connect/connect005/connect005.java @@ -45,9 +45,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.options.connect.connect005.connect005 - * nsk.jdb.options.connect.connect005.connect005a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.options.connect.connect005.connect005 + * @build nsk.jdb.options.connect.connect005.connect005a + * @run main/othervm + * nsk.jdb.options.connect.connect005.connect005 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/listconnectors/listconnectors001/listconnectors001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/listconnectors/listconnectors001/listconnectors001.java index b54d1a011c5..d814df91cc6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/listconnectors/listconnectors001/listconnectors001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/options/listconnectors/listconnectors001/listconnectors001.java @@ -51,8 +51,7 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.options.listconnectors.listconnectors001.listconnectors001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdb.options.listconnectors.listconnectors001.listconnectors001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/pop/pop001/pop001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/pop/pop001/pop001.java index 1502dc6863f..e449a5771f2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/pop/pop001/pop001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/pop/pop001/pop001.java @@ -46,9 +46,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.pop.pop001.pop001 - * nsk.jdb.pop.pop001.pop001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.pop.pop001.pop001 + * @build nsk.jdb.pop.pop001.pop001a + * @run main/othervm + * nsk.jdb.pop.pop001.pop001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/pop_exception/pop_exception001/pop_exception001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/pop_exception/pop_exception001/pop_exception001.java index 02eb088a74e..f70a5ffb960 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/pop_exception/pop_exception001/pop_exception001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/pop_exception/pop_exception001/pop_exception001.java @@ -33,9 +33,8 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.pop_exception.pop_exception001.pop_exception001 - * nsk.jdb.pop_exception.pop_exception001.pop_exception001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdb.pop_exception.pop_exception001.pop_exception001a + * @run main/othervm * nsk.jdb.pop_exception.pop_exception001.pop_exception001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/print/print002/print002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/print/print002/print002.java index a9b5fd6d100..e339a0a321b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/print/print002/print002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/print/print002/print002.java @@ -52,7 +52,8 @@ * @clean nsk.jdb.print.print002.print002a * @compile -g:lines,source,vars print002a.java * - * @run main/othervm PropertyResolvingWrapper nsk.jdb.print.print002.print002 + * @run main/othervm + * nsk.jdb.print.print002.print002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/read/read001/read001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/read/read001/read001.java index a72314fd196..b5ca64334d7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/read/read001/read001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/read/read001/read001.java @@ -52,7 +52,8 @@ * @clean nsk.jdb.read.read001.read001a * @compile -g:lines,source,vars read001a.java * - * @run main/othervm PropertyResolvingWrapper nsk.jdb.read.read001.read001 + * @run main/othervm + * nsk.jdb.read.read001.read001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/redefine/redefine001/redefine001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/redefine/redefine001/redefine001.java index 60684543c6e..80ff33889a4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/redefine/redefine001/redefine001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/redefine/redefine001/redefine001.java @@ -45,19 +45,19 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.redefine.redefine001.redefine001 - * nsk.jdb.redefine.redefine001.redefine001a + * @build nsk.jdb.redefine.redefine001.redefine001a * * @comment compile newclass_g/RedefinedClass.java to newclass_g - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver + * ExecDriver --cmd * ${compile.jdk}/bin/javac * -d ${test.classes}/newclass_g * -g:lines,source,vars * -cp ${test.class.path} * ${test.src}/newclass_g/RedefinedClass.java * - * @run main/othervm PropertyResolvingWrapper nsk.jdb.redefine.redefine001.redefine001 + * @run main/othervm + * nsk.jdb.redefine.redefine001.redefine001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/reenter/reenter001/reenter001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/reenter/reenter001/reenter001.java index 3cf654cee54..ebc063942c6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/reenter/reenter001/reenter001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/reenter/reenter001/reenter001.java @@ -45,9 +45,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.reenter.reenter001.reenter001 - * nsk.jdb.reenter.reenter001.reenter001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.reenter.reenter001.reenter001 + * @build nsk.jdb.reenter.reenter001.reenter001a + * @run main/othervm + * nsk.jdb.reenter.reenter001.reenter001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/regression/b4689395/b4689395.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/regression/b4689395/b4689395.java index 91dc56c5ade..82d8235fee7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/regression/b4689395/b4689395.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/regression/b4689395/b4689395.java @@ -94,14 +94,15 @@ * nsk.jdb.regression.b4689395.b4689395a * * @comment compile newclass/b4689395a.java to newclass - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver + * ExecDriver --cmd * ${compile.jdk}/bin/javac * -d ${test.classes}/newclass * -cp ${test.class.path} * ${test.src}/newclass/b4689395a.java * - * @run main/othervm PropertyResolvingWrapper nsk.jdb.regression.b4689395.b4689395 + * @run main/othervm + * nsk.jdb.regression.b4689395.b4689395 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/resume/resume002/resume002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/resume/resume002/resume002.java index c081008bcf8..1643ff28fe5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/resume/resume002/resume002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/resume/resume002/resume002.java @@ -49,9 +49,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.resume.resume002.resume002 - * nsk.jdb.resume.resume002.resume002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.resume.resume002.resume002 + * @build nsk.jdb.resume.resume002.resume002a + * @run main/othervm + * nsk.jdb.resume.resume002.resume002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/run/run002/run002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/run/run002/run002.java index e2f4fb2c405..da837ab0f8b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/run/run002/run002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/run/run002/run002.java @@ -43,9 +43,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.run.run002.run002 - * nsk.jdb.run.run002.run002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.run.run002.run002 + * @build nsk.jdb.run.run002.run002a + * @run main/othervm + * nsk.jdb.run.run002.run002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/set/set001/set001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/set/set001/set001.java index 1026ab703cd..d00362b228c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/set/set001/set001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/set/set001/set001.java @@ -53,7 +53,8 @@ * @clean nsk.jdb.set.set001.set001a * @compile -g:lines,source,vars set001a.java * - * @run main/othervm PropertyResolvingWrapper nsk.jdb.set.set001.set001 + * @run main/othervm + * nsk.jdb.set.set001.set001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/set/set002/set002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/set/set002/set002.java index 797243801c7..dca4e554afa 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/set/set002/set002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/set/set002/set002.java @@ -53,7 +53,8 @@ * @clean nsk.jdb.set.set002.set002a * @compile -g:lines,source,vars set002a.java * - * @run main/othervm PropertyResolvingWrapper nsk.jdb.set.set002.set002 + * @run main/othervm + * nsk.jdb.set.set002.set002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/step/step002/step002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/step/step002/step002.java index c9d360e3863..4df163ca1a9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/step/step002/step002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/step/step002/step002.java @@ -56,7 +56,8 @@ * @clean nsk.jdb.step.step002.step002a * @compile -g:lines,source,vars step002a.java * - * @run main/othervm PropertyResolvingWrapper nsk.jdb.step.step002.step002 + * @run main/othervm + * nsk.jdb.step.step002.step002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/step_up/step_up001/step_up001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/step_up/step_up001/step_up001.java index a468d62ee75..590a476dbbe 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/step_up/step_up001/step_up001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/step_up/step_up001/step_up001.java @@ -44,9 +44,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.step_up.step_up001.step_up001 - * nsk.jdb.step_up.step_up001.step_up001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.step_up.step_up001.step_up001 + * @build nsk.jdb.step_up.step_up001.step_up001a + * @run main/othervm + * nsk.jdb.step_up.step_up001.step_up001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/stop_at/stop_at002/stop_at002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/stop_at/stop_at002/stop_at002.java index 7bf4f72b780..620c50fa2ae 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/stop_at/stop_at002/stop_at002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/stop_at/stop_at002/stop_at002.java @@ -36,9 +36,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.stop_at.stop_at002.stop_at002 - * nsk.jdb.stop_at.stop_at002.stop_at002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.stop_at.stop_at002.stop_at002 + * @build nsk.jdb.stop_at.stop_at002.stop_at002a + * @run main/othervm + * nsk.jdb.stop_at.stop_at002.stop_at002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/stop_at/stop_at003/stop_at003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/stop_at/stop_at003/stop_at003.java index 1a6a84aaf05..ecd66ca7c95 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/stop_at/stop_at003/stop_at003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/stop_at/stop_at003/stop_at003.java @@ -48,9 +48,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.stop_at.stop_at003.stop_at003 - * nsk.jdb.stop_at.stop_at003.stop_at003a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.stop_at.stop_at003.stop_at003 + * @build nsk.jdb.stop_at.stop_at003.stop_at003a + * @run main/othervm + * nsk.jdb.stop_at.stop_at003.stop_at003 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/stop_in/stop_in002/stop_in002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/stop_in/stop_in002/stop_in002.java index 074e3490a70..e4c2058fd97 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/stop_in/stop_in002/stop_in002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/stop_in/stop_in002/stop_in002.java @@ -49,9 +49,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.stop_in.stop_in002.stop_in002 - * nsk.jdb.stop_in.stop_in002.stop_in002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.stop_in.stop_in002.stop_in002 + * @build nsk.jdb.stop_in.stop_in002.stop_in002a + * @run main/othervm + * nsk.jdb.stop_in.stop_in002.stop_in002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/suspend/suspend001/suspend001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/suspend/suspend001/suspend001.java index bf122add0fb..18e5c27d31c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/suspend/suspend001/suspend001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/suspend/suspend001/suspend001.java @@ -45,9 +45,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.suspend.suspend001.suspend001 - * nsk.jdb.suspend.suspend001.suspend001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.suspend.suspend001.suspend001 + * @build nsk.jdb.suspend.suspend001.suspend001a + * @run main/othervm + * nsk.jdb.suspend.suspend001.suspend001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/thread/thread002/thread002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/thread/thread002/thread002.java index 17b1a3dddbf..487ac49e66e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/thread/thread002/thread002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/thread/thread002/thread002.java @@ -42,9 +42,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.thread.thread002.thread002 - * nsk.jdb.thread.thread002.thread002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.thread.thread002.thread002 + * @build nsk.jdb.thread.thread002.thread002a + * @run main/othervm + * nsk.jdb.thread.thread002.thread002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/threadgroup/threadgroup002/threadgroup002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/threadgroup/threadgroup002/threadgroup002.java index d0476cffa21..cb8004643d3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/threadgroup/threadgroup002/threadgroup002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/threadgroup/threadgroup002/threadgroup002.java @@ -40,9 +40,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.threadgroup.threadgroup002.threadgroup002 - * nsk.jdb.threadgroup.threadgroup002.threadgroup002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.threadgroup.threadgroup002.threadgroup002 + * @build nsk.jdb.threadgroup.threadgroup002.threadgroup002a + * @run main/othervm + * nsk.jdb.threadgroup.threadgroup002.threadgroup002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/threadgroups/threadgroups002/threadgroups002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/threadgroups/threadgroups002/threadgroups002.java index d3391872c9b..67ee29006b4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/threadgroups/threadgroups002/threadgroups002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/threadgroups/threadgroups002/threadgroups002.java @@ -40,9 +40,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.threadgroups.threadgroups002.threadgroups002 - * nsk.jdb.threadgroups.threadgroups002.threadgroups002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.threadgroups.threadgroups002.threadgroups002 + * @build nsk.jdb.threadgroups.threadgroups002.threadgroups002a + * @run main/othervm + * nsk.jdb.threadgroups.threadgroups002.threadgroups002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/threads/threads002/threads002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/threads/threads002/threads002.java index 6acead5c22f..3197c371943 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/threads/threads002/threads002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/threads/threads002/threads002.java @@ -39,9 +39,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.threads.threads002.threads002 - * nsk.jdb.threads.threads002.threads002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.threads.threads002.threads002 + * @build nsk.jdb.threads.threads002.threads002a + * @run main/othervm + * nsk.jdb.threads.threads002.threads002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/trace/trace001/trace001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/trace/trace001/trace001.java index 24ee022f797..c345e800736 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/trace/trace001/trace001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/trace/trace001/trace001.java @@ -46,9 +46,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.trace.trace001.trace001 - * nsk.jdb.trace.trace001.trace001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.trace.trace001.trace001 + * @build nsk.jdb.trace.trace001.trace001a + * @run main/othervm + * nsk.jdb.trace.trace001.trace001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/uncaught_exception/uncaught_exception002/uncaught_exception002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/uncaught_exception/uncaught_exception002/uncaught_exception002.java index a214515e9ad..dd1d0748c0f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/uncaught_exception/uncaught_exception002/uncaught_exception002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/uncaught_exception/uncaught_exception002/uncaught_exception002.java @@ -52,7 +52,7 @@ * @clean nsk.jdb.uncaught_exception.uncaught_exception002.uncaught_exception002a * @compile -g:lines,source,vars uncaught_exception002a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdb.uncaught_exception.uncaught_exception002.uncaught_exception002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/unmonitor/unmonitor001/unmonitor001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/unmonitor/unmonitor001/unmonitor001.java index 05974b23439..54a90a930f2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/unmonitor/unmonitor001/unmonitor001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/unmonitor/unmonitor001/unmonitor001.java @@ -56,7 +56,8 @@ * @clean nsk.jdb.unmonitor.unmonitor001.unmonitor001a * @compile -g:lines,source,vars unmonitor001a.java * - * @run main/othervm PropertyResolvingWrapper nsk.jdb.unmonitor.unmonitor001.unmonitor001 + * @run main/othervm + * nsk.jdb.unmonitor.unmonitor001.unmonitor001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/untrace/untrace001/untrace001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/untrace/untrace001/untrace001.java index 6c21f21d1e8..daad477dbb4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/untrace/untrace001/untrace001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/untrace/untrace001/untrace001.java @@ -53,9 +53,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.untrace.untrace001.untrace001 - * nsk.jdb.untrace.untrace001.untrace001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.untrace.untrace001.untrace001 + * @build nsk.jdb.untrace.untrace001.untrace001a + * @run main/othervm + * nsk.jdb.untrace.untrace001.untrace001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/unwatch/unwatch001/unwatch001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/unwatch/unwatch001/unwatch001.java index ec0d9ba82d0..b8c71645edb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/unwatch/unwatch001/unwatch001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/unwatch/unwatch001/unwatch001.java @@ -49,9 +49,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.unwatch.unwatch001.unwatch001 - * nsk.jdb.unwatch.unwatch001.unwatch001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.unwatch.unwatch001.unwatch001 + * @build nsk.jdb.unwatch.unwatch001.unwatch001a + * @run main/othervm + * nsk.jdb.unwatch.unwatch001.unwatch001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/unwatch/unwatch002/unwatch002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/unwatch/unwatch002/unwatch002.java index 20781c8ea25..e32cc0b8e5d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/unwatch/unwatch002/unwatch002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/unwatch/unwatch002/unwatch002.java @@ -50,9 +50,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.unwatch.unwatch002.unwatch002 - * nsk.jdb.unwatch.unwatch002.unwatch002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.unwatch.unwatch002.unwatch002 + * @build nsk.jdb.unwatch.unwatch002.unwatch002a + * @run main/othervm + * nsk.jdb.unwatch.unwatch002.unwatch002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/up/up002/up002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/up/up002/up002.java index 22b5cc11ecb..5b2cb393df4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/up/up002/up002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/up/up002/up002.java @@ -42,9 +42,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.up.up002.up002 - * nsk.jdb.up.up002.up002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.up.up002.up002 + * @build nsk.jdb.up.up002.up002a + * @run main/othervm + * nsk.jdb.up.up002.up002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/use/use001/use001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/use/use001/use001.java index e6f08dc5477..1454b39b2bf 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/use/use001/use001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/use/use001/use001.java @@ -42,9 +42,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.use.use001.use001 - * nsk.jdb.use.use001.use001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.use.use001.use001 + * @build nsk.jdb.use.use001.use001a + * @run main/othervm + * nsk.jdb.use.use001.use001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/watch/watch001/watch001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/watch/watch001/watch001.java index dfa8bdae040..8d434fcfc74 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/watch/watch001/watch001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/watch/watch001/watch001.java @@ -47,9 +47,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.watch.watch001.watch001 - * nsk.jdb.watch.watch001.watch001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.watch.watch001.watch001 + * @build nsk.jdb.watch.watch001.watch001a + * @run main/othervm + * nsk.jdb.watch.watch001.watch001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/watch/watch002/watch002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/watch/watch002/watch002.java index e0bfa267634..cb0535117d9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/watch/watch002/watch002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/watch/watch002/watch002.java @@ -47,9 +47,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.watch.watch002.watch002 - * nsk.jdb.watch.watch002.watch002a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.watch.watch002.watch002 + * @build nsk.jdb.watch.watch002.watch002a + * @run main/othervm + * nsk.jdb.watch.watch002.watch002 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/where/where004/where004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/where/where004/where004.java index e25316a5da6..e4cbf50e62f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/where/where004/where004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/where/where004/where004.java @@ -40,9 +40,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.where.where004.where004 - * nsk.jdb.where.where004.where004a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.where.where004.where004 + * @build nsk.jdb.where.where004.where004a + * @run main/othervm + * nsk.jdb.where.where004.where004 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/where/where005/where005.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/where/where005/where005.java index a405150e748..b949916aae7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/where/where005/where005.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/where/where005/where005.java @@ -41,9 +41,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.where.where005.where005 - * nsk.jdb.where.where005.where005a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.where.where005.where005 + * @build nsk.jdb.where.where005.where005a + * @run main/othervm + * nsk.jdb.where.where005.where005 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/where/where006/where006.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/where/where006/where006.java index 8532520ff03..bf7622c48b3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/where/where006/where006.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/where/where006/where006.java @@ -41,9 +41,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.where.where006.where006 - * nsk.jdb.where.where006.where006a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.where.where006.where006 + * @build nsk.jdb.where.where006.where006a + * @run main/othervm + * nsk.jdb.where.where006.where006 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdb/wherei/wherei001/wherei001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdb/wherei/wherei001/wherei001.java index c6cbefaaa51..431206b5551 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdb/wherei/wherei001/wherei001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdb/wherei/wherei001/wherei001.java @@ -36,9 +36,9 @@ * * @library /vmTestbase * /test/lib - * @build nsk.jdb.wherei.wherei001.wherei001 - * nsk.jdb.wherei.wherei001.wherei001a - * @run main/othervm PropertyResolvingWrapper nsk.jdb.wherei.wherei001.wherei001 + * @build nsk.jdb.wherei.wherei001.wherei001a + * @run main/othervm + * nsk.jdb.wherei.wherei001.wherei001 * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AccessWatchpointEvent/_itself_/awevent001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AccessWatchpointEvent/_itself_/awevent001/TestDescription.java index b53d31a5442..adec63382b2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AccessWatchpointEvent/_itself_/awevent001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AccessWatchpointEvent/_itself_/awevent001/TestDescription.java @@ -60,13 +60,13 @@ * @clean nsk.jdi.AccessWatchpointEvent._itself_.awevent001t * @compile -g:lines,source,vars ../awevent001t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.AccessWatchpointEvent._itself_.awevent001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPackagePrivate/accipp001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPackagePrivate/accipp001/TestDescription.java index 4900ef15118..205fe7c0c7e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPackagePrivate/accipp001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPackagePrivate/accipp001/TestDescription.java @@ -55,13 +55,13 @@ * /test/lib * @build nsk.jdi.Accessible.isPackagePrivate.accipp001 * nsk.jdi.Accessible.isPackagePrivate.accipp001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Accessible.isPackagePrivate.accipp001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPackagePrivate/accipp002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPackagePrivate/accipp002/TestDescription.java index 836d03d2ec5..712e807b92d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPackagePrivate/accipp002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPackagePrivate/accipp002/TestDescription.java @@ -50,13 +50,13 @@ * /test/lib * @build nsk.jdi.Accessible.isPackagePrivate.accipp002 * nsk.jdi.Accessible.isPackagePrivate.accipp002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Accessible.isPackagePrivate.accipp002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPrivate/isPrivate001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPrivate/isPrivate001/TestDescription.java index ec5d92252fd..5fbe4bf5f27 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPrivate/isPrivate001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPrivate/isPrivate001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.Accessible.isPrivate.isPrivate001 * nsk.jdi.Accessible.isPrivate.isPrivate001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Accessible.isPrivate.isPrivate001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPrivate/isprivate002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPrivate/isprivate002/TestDescription.java index 26cc8d9ee64..45592c34b9b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPrivate/isprivate002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPrivate/isprivate002/TestDescription.java @@ -50,13 +50,13 @@ * /test/lib * @build nsk.jdi.Accessible.isPrivate.isprivate002 * nsk.jdi.Accessible.isPrivate.isprivate002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Accessible.isPrivate.isprivate002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isProtected/isProtected001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isProtected/isProtected001/TestDescription.java index 72fabd05aba..191f174be12 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isProtected/isProtected001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isProtected/isProtected001/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.Accessible.isProtected.isProtected001 * nsk.jdi.Accessible.isProtected.isProtected001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Accessible.isProtected.isProtected001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isProtected/isprotected002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isProtected/isprotected002/TestDescription.java index 8500226866b..76dbc1636ed 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isProtected/isprotected002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isProtected/isprotected002/TestDescription.java @@ -50,13 +50,13 @@ * /test/lib * @build nsk.jdi.Accessible.isProtected.isprotected002 * nsk.jdi.Accessible.isProtected.isprotected002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Accessible.isProtected.isprotected002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPublic/isPublic001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPublic/isPublic001/TestDescription.java index 67d9ceffdcf..8fe7f950bb1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPublic/isPublic001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPublic/isPublic001/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.Accessible.isPublic.isPublic001 * nsk.jdi.Accessible.isPublic.isPublic001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Accessible.isPublic.isPublic001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPublic/ispublic002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPublic/ispublic002/TestDescription.java index b5d85b87e47..49afde9f574 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPublic/ispublic002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPublic/ispublic002/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.Accessible.isPublic.ispublic002 * nsk.jdi.Accessible.isPublic.ispublic002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Accessible.isPublic.ispublic002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPublic/ispublic003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPublic/ispublic003/TestDescription.java index 62516a09c35..c2d09535943 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPublic/ispublic003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPublic/ispublic003/TestDescription.java @@ -50,13 +50,13 @@ * /test/lib * @build nsk.jdi.Accessible.isPublic.ispublic003 * nsk.jdi.Accessible.isPublic.ispublic003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Accessible.isPublic.ispublic003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/modifiers/modifiers001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/modifiers/modifiers001/TestDescription.java index 3929998e970..ee68d752dce 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/modifiers/modifiers001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/modifiers/modifiers001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.Accessible.modifiers.modifiers001 * nsk.jdi.Accessible.modifiers.modifiers001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Accessible.modifiers.modifiers001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/modifiers/modifiers002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/modifiers/modifiers002/TestDescription.java index 4e3dc0f99b3..bfc64993ab3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/modifiers/modifiers002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/modifiers/modifiers002/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.Accessible.modifiers.modifiers002 * nsk.jdi.Accessible.modifiers.modifiers002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Accessible.modifiers.modifiers002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/description/description001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/description/description001/TestDescription.java index 22936c0fb28..d096839a098 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/description/description001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/description/description001/TestDescription.java @@ -42,13 +42,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Argument.description.description001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.description.description001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid001/TestDescription.java index 3438191beeb..a4695a2addd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid001/TestDescription.java @@ -65,13 +65,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Argument.isValid.isvalid001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.isValid.isvalid001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid002/TestDescription.java index 57c3e37cd36..94e408e0012 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid002/TestDescription.java @@ -67,13 +67,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Argument.isValid.isvalid002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.isValid.isvalid002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid003/TestDescription.java index 1cf89c18af4..577db5ecdc8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid003/TestDescription.java @@ -58,13 +58,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Argument.isValid.isvalid003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.isValid.isvalid003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid004/TestDescription.java index 565a24a800f..ad4201210d0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid004/TestDescription.java @@ -78,13 +78,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Argument.isValid.isvalid004 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.isValid.isvalid004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid005/TestDescription.java index 67d1f3cc2ae..f7df96ddea4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/isValid/isvalid005/TestDescription.java @@ -63,13 +63,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Argument.isValid.isvalid005 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.isValid.isvalid005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/label/label001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/label/label001/TestDescription.java index 92cbe9fc136..43b7e639ef5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/label/label001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/label/label001/TestDescription.java @@ -42,13 +42,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Argument.label.label001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.label.label001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/mustSpecify/mustspecify001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/mustSpecify/mustspecify001/TestDescription.java index dbf21a36e49..cbff0688ff4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/mustSpecify/mustspecify001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/mustSpecify/mustspecify001/TestDescription.java @@ -42,13 +42,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Argument.mustSpecify.mustspecify001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.mustSpecify.mustspecify001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/name/name001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/name/name001/TestDescription.java index be8d9bf6cd1..7c2396bb705 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/name/name001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/name/name001/TestDescription.java @@ -41,13 +41,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Argument.name.name001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.name.name001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/setValue/setvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/setValue/setvalue001/TestDescription.java index 04073d1c221..63dc335e149 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/setValue/setvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/setValue/setvalue001/TestDescription.java @@ -63,13 +63,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Argument.setValue.setvalue001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.setValue.setvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/setValue/setvalue002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/setValue/setvalue002/TestDescription.java index 3c0b9c7c485..e1e992b78b2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/setValue/setvalue002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/setValue/setvalue002/TestDescription.java @@ -58,13 +58,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Argument.setValue.setvalue002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.setValue.setvalue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value001/TestDescription.java index 36354244190..25f9fada8ea 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value001/TestDescription.java @@ -41,13 +41,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Argument.value.value001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.value.value001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value002/TestDescription.java index 7c48789457a..87af6a2f944 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value002/TestDescription.java @@ -41,13 +41,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Argument.value.value002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.value.value002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value003/TestDescription.java index 814f79d5653..369a805fa9e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value003/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.Argument.value.value003 * nsk.jdi.Argument.value.value003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.value.value003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value004/TestDescription.java index 8ce3a8989e6..2ff61bf129d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Argument/value/value004/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.Argument.value.value004 * nsk.jdi.Argument.value.value004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Argument.value.value004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValue/getvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValue/getvalue001/TestDescription.java index 924dcb2813e..acd4f034e75 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValue/getvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValue/getvalue001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.getValue.getvalue001 * nsk.jdi.ArrayReference.getValue.getvalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.getValue.getvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValue/getvalue002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValue/getvalue002/TestDescription.java index 5ffc050c7d6..a841f12a382 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValue/getvalue002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValue/getvalue002/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.getValue.getvalue002 * nsk.jdi.ArrayReference.getValue.getvalue002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.getValue.getvalue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValue/getvalue003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValue/getvalue003/TestDescription.java index c9694bfce49..59e8e8e9490 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValue/getvalue003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValue/getvalue003/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.getValue.getvalue003 * nsk.jdi.ArrayReference.getValue.getvalue003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.getValue.getvalue003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues/getvalues001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues/getvalues001/TestDescription.java index 3136b6f04cc..29945cc1273 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues/getvalues001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues/getvalues001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.getValues.getvalues001 * nsk.jdi.ArrayReference.getValues.getvalues001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.getValues.getvalues001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues/getvalues002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues/getvalues002/TestDescription.java index d4f06b29f84..988546deeab 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues/getvalues002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues/getvalues002/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.getValues.getvalues002 * nsk.jdi.ArrayReference.getValues.getvalues002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.getValues.getvalues002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues/getvalues003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues/getvalues003/TestDescription.java index df9da4b43ff..7fde2191cc5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues/getvalues003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues/getvalues003/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.getValues.getvalues003 * nsk.jdi.ArrayReference.getValues.getvalues003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.getValues.getvalues003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii001/TestDescription.java index 773a5214902..aa071b080ce 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.getValues_ii.getvaluesii001 * nsk.jdi.ArrayReference.getValues_ii.getvaluesii001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.getValues_ii.getvaluesii001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii002/TestDescription.java index 8355854057c..17934d81228 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii002/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.getValues_ii.getvaluesii002 * nsk.jdi.ArrayReference.getValues_ii.getvaluesii002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.getValues_ii.getvaluesii002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii003/TestDescription.java index f8c1a3b3179..e5188c1bedf 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii003/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.getValues_ii.getvaluesii003 * nsk.jdi.ArrayReference.getValues_ii.getvaluesii003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.getValues_ii.getvaluesii003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii004/TestDescription.java index 4e1619af712..052c725185a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii004/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.getValues_ii.getvaluesii004 * nsk.jdi.ArrayReference.getValues_ii.getvaluesii004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.getValues_ii.getvaluesii004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii005/TestDescription.java index ebbb5a884ad..de30a9c4ec0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValues_ii/getvaluesii005/TestDescription.java @@ -82,13 +82,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.getValues_ii.getvaluesii005 * nsk.jdi.ArrayReference.getValues_ii.getvaluesii005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.getValues_ii.getvaluesii005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/length/length001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/length/length001/TestDescription.java index 70b4ec0e036..8f57e9099ec 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/length/length001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/length/length001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.length.length001 * nsk.jdi.ArrayReference.length.length001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.length.length001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue001/TestDescription.java index cec3c7f01e2..ff2a8ebc4cb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue001/TestDescription.java @@ -73,13 +73,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.setValue.setvalue001 * nsk.jdi.ArrayReference.setValue.setvalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.setValue.setvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue002/TestDescription.java index 2e1447a437d..3e6aa8bce89 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue002/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.setValue.setvalue002 * nsk.jdi.ArrayReference.setValue.setvalue002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.setValue.setvalue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue003/TestDescription.java index aa02b1da2fc..52be7a0ec6a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue003/TestDescription.java @@ -83,13 +83,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.setValue.setvalue003 * nsk.jdi.ArrayReference.setValue.setvalue003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.setValue.setvalue003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii001/TestDescription.java index b3f42e07528..7687ee1acc3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii001/TestDescription.java @@ -79,13 +79,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii001 * nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii002/TestDescription.java index b1d9bb670c2..3c68c6c36e7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii002/TestDescription.java @@ -78,13 +78,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii002 * nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii003/TestDescription.java index cc9bac0ff73..e1b673f6790 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii003/TestDescription.java @@ -85,13 +85,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii003 * nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii004/TestDescription.java index a082d22c8e7..0a234c54a0e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii004/TestDescription.java @@ -75,13 +75,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii004 * nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii005/TestDescription.java index 57c0a3ddaf8..151c29cd12a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_ilii/setvaluesilii005/TestDescription.java @@ -76,13 +76,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii005 * nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.setValues_ilii.setvaluesilii005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_l/setvaluesl001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_l/setvaluesl001/TestDescription.java index 997e7445cc7..e7e050d5da0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_l/setvaluesl001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_l/setvaluesl001/TestDescription.java @@ -77,13 +77,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.setValues_l.setvaluesl001 * nsk.jdi.ArrayReference.setValues_l.setvaluesl001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.setValues_l.setvaluesl001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_l/setvaluesl002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_l/setvaluesl002/TestDescription.java index d7f211ce413..e1fcf0b13d6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_l/setvaluesl002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_l/setvaluesl002/TestDescription.java @@ -84,13 +84,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.setValues_l.setvaluesl002 * nsk.jdi.ArrayReference.setValues_l.setvaluesl002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.setValues_l.setvaluesl002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_l/setvaluesl003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_l/setvaluesl003/TestDescription.java index 61cfd78638d..037504614bb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_l/setvaluesl003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValues_l/setvaluesl003/TestDescription.java @@ -86,13 +86,13 @@ * /test/lib * @build nsk.jdi.ArrayReference.setValues_l.setvaluesl003 * nsk.jdi.ArrayReference.setValues_l.setvaluesl003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayReference.setValues_l.setvaluesl003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentSignature/componentsignature001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentSignature/componentsignature001/TestDescription.java index bb749ad4900..85a84797713 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentSignature/componentsignature001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentSignature/componentsignature001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.ArrayType.componentSignature.componentsignature001 * nsk.jdi.ArrayType.componentSignature.componentsignature001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayType.componentSignature.componentsignature001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentSignature/componentsignature002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentSignature/componentsignature002/TestDescription.java index e579a1ec154..66f90a5dd2f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentSignature/componentsignature002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentSignature/componentsignature002/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.ArrayType.componentSignature.componentsignature002 * nsk.jdi.ArrayType.componentSignature.componentsignature002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayType.componentSignature.componentsignature002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentType/componenttype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentType/componenttype001/TestDescription.java index 27822e21d16..dfc6d18697b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentType/componenttype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentType/componenttype001/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.ArrayType.componentType.componenttype001 * nsk.jdi.ArrayType.componentType.componenttype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayType.componentType.componenttype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentTypeName/componenttypename001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentTypeName/componenttypename001/TestDescription.java index 7951507e138..d4046f0a6be 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentTypeName/componenttypename001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentTypeName/componenttypename001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.ArrayType.componentTypeName.componenttypename001 * nsk.jdi.ArrayType.componentTypeName.componenttypename001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayType.componentTypeName.componenttypename001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentTypeName/componenttypename002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentTypeName/componenttypename002/TestDescription.java index 07839a249df..d57541e1ebf 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentTypeName/componenttypename002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/componentTypeName/componenttypename002/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.ArrayType.componentTypeName.componenttypename002 * nsk.jdi.ArrayType.componentTypeName.componenttypename002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayType.componentTypeName.componenttypename002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance001/TestDescription.java index 67d90bf3214..3ce6b459e1f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance001/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.ArrayType.newInstance.newinstance001 * nsk.jdi.ArrayType.newInstance.newinstance001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayType.newInstance.newinstance001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance002/TestDescription.java index 4ed0eab69bf..b1f981f9b78 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance002/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.ArrayType.newInstance.newinstance002 * nsk.jdi.ArrayType.newInstance.newinstance002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayType.newInstance.newinstance002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance003/TestDescription.java index b6637e20a47..dd8e6993c3e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance003/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.ArrayType.newInstance.newinstance003 * nsk.jdi.ArrayType.newInstance.newinstance003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayType.newInstance.newinstance003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance004/TestDescription.java index 87d940bec60..1e23bf7d8e7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayType/newInstance/newinstance004/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.ArrayType.newInstance.newinstance004 * nsk.jdi.ArrayType.newInstance.newinstance004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ArrayType.newInstance.newinstance004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach001/TestDescription.java index 52e6268ce9f..ad8bc733c21 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach001/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.AttachingConnector.attach.attach001 * nsk.jdi.AttachingConnector.attach.attach001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.AttachingConnector.attach.attach001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach002/TestDescription.java index b83279bf1d8..f416e43f66d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach002/TestDescription.java @@ -49,13 +49,13 @@ * /test/lib * @build nsk.jdi.AttachingConnector.attach.attach002 * nsk.jdi.AttachingConnector.attach.attach002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.AttachingConnector.attach.attach002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach003/TestDescription.java index 2a25ff12bab..cd96ab2fbaf 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach003/TestDescription.java @@ -66,13 +66,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.AttachingConnector.attach.attach003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.AttachingConnector.attach.attach003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach004/TestDescription.java index 5935b45720e..0495187130f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach004/TestDescription.java @@ -37,7 +37,7 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.AttachingConnector.attach.attach004.TestDriver - * @run driver PropertyResolvingWrapper + * @run driver * nsk.jdi.AttachingConnector.attach.attach004.TestDriver * ${os.family}-${os.simpleArch} dt_socket y * -waitVMStartEvent diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach005/TestDescription.java index fc186d78599..902c144234e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach005/TestDescription.java @@ -37,7 +37,7 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.AttachingConnector.attach.attach004.TestDriver - * @run driver PropertyResolvingWrapper + * @run driver * nsk.jdi.AttachingConnector.attach.attach004.TestDriver * ${os.family}-${os.simpleArch} dt_shmem y * -waitVMStartEvent diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend001/TestDescription.java index ff6964bc57e..b488d0ef5ca 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend001/TestDescription.java @@ -42,13 +42,13 @@ * /test/lib * @build nsk.jdi.AttachingConnector.attachnosuspend.attachnosuspend001 * nsk.jdi.AttachingConnector.attachnosuspend.attachnosuspend001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.AttachingConnector.attachnosuspend.attachnosuspend001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend002/TestDescription.java index c3a9a1074dd..4182df88b7f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend002/TestDescription.java @@ -36,7 +36,7 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.AttachingConnector.attach.attach004.TestDriver - * @run driver PropertyResolvingWrapper + * @run driver * nsk.jdi.AttachingConnector.attach.attach004.TestDriver * ${os.family}-${os.simpleArch} dt_socket n */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend003/TestDescription.java index c79350b5a8f..8ca06f138f4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend003/TestDescription.java @@ -36,7 +36,7 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.AttachingConnector.attach.attach004.TestDriver - * @run driver PropertyResolvingWrapper + * @run driver * nsk.jdi.AttachingConnector.attach.attach004.TestDriver * ${os.family}-${os.simpleArch} dt_shmem n */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc01x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc01x001/TestDescription.java index 5c207ee741c..6b582a926d6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc01x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc01x001/TestDescription.java @@ -74,7 +74,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc01x001 * ./bin * -verbose @@ -82,6 +82,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc01x002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc01x002/TestDescription.java index 14372d48e1e..63fb8589ee2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc01x002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc01x002/TestDescription.java @@ -75,7 +75,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc01x002 * ./bin * -verbose @@ -83,6 +83,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc02x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc02x001/TestDescription.java index f364f0c7b4c..1005e28eb43 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc02x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc02x001/TestDescription.java @@ -79,7 +79,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc02x001 * ./bin * -verbose @@ -87,6 +87,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc02x002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc02x002/TestDescription.java index 19f02f0a235..ba0345aba15 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc02x002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc02x002/TestDescription.java @@ -78,7 +78,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc02x002 * ./bin * -verbose @@ -86,6 +86,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc03x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc03x001/TestDescription.java index 26efb19c104..ce46e0e9ef0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc03x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc03x001/TestDescription.java @@ -66,7 +66,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc03x001 * ./bin * -verbose @@ -74,6 +74,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc04x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc04x001/TestDescription.java index d3ac5075d37..4dd691ee2ce 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc04x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc04x001/TestDescription.java @@ -79,7 +79,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc04x001 * ./bin * -verbose @@ -87,6 +87,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc04x002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc04x002/TestDescription.java index b6002bf7640..419adea0a79 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc04x002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc04x002/TestDescription.java @@ -78,7 +78,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc04x002 * ./bin * -verbose @@ -86,6 +86,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc05x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc05x001/TestDescription.java index e195f5a7e9d..fddc0bd3921 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc05x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc05x001/TestDescription.java @@ -75,7 +75,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc05x001 * ./bin * -verbose @@ -83,6 +83,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc05x002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc05x002/TestDescription.java index 17419252d91..372c88791fd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc05x002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc05x002/TestDescription.java @@ -76,7 +76,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc05x002 * ./bin * -verbose @@ -84,6 +84,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc06x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc06x001/TestDescription.java index b407459d101..1272094437f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc06x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc06x001/TestDescription.java @@ -81,7 +81,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc06x001 * ./bin * -verbose @@ -89,6 +89,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc07x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc07x001/TestDescription.java index 3bfdbce3a85..9d76431accc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc07x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc07x001/TestDescription.java @@ -76,7 +76,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc07x001 * ./bin * -verbose @@ -84,6 +84,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc08x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc08x001/TestDescription.java index e4b757f8b3c..a5e68b06454 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc08x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc08x001/TestDescription.java @@ -74,7 +74,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc08x001 * ./bin * -verbose @@ -82,6 +82,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc09x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc09x001/TestDescription.java index 93a69d8546d..c45cf8d828e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc09x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc09x001/TestDescription.java @@ -74,7 +74,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc09x001 * ./bin * -verbose @@ -82,6 +82,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc09x002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc09x002/TestDescription.java index d0da6550cc8..e7b9f658e11 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc09x002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc09x002/TestDescription.java @@ -75,7 +75,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc09x002 * ./bin * -verbose @@ -83,6 +83,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc10x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc10x001/TestDescription.java index 91c9fa4d307..a8d335ef96a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc10x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc10x001/TestDescription.java @@ -79,7 +79,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc10x001 * ./bin * -verbose @@ -87,6 +87,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc10x002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc10x002/TestDescription.java index 4191faa9e03..622cc9591a0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc10x002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc10x002/TestDescription.java @@ -82,7 +82,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.hotswap.tc10x002 * ./bin * -verbose @@ -90,6 +90,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc01x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc01x001/TestDescription.java index eac188300c7..08d2d19ddc8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc01x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc01x001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.BScenarios.multithrd.tc01x001 * nsk.jdi.BScenarios.multithrd.tc01x001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.multithrd.tc01x001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x001/TestDescription.java index b6cacd588c3..b9cd0d7c65a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x001/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.BScenarios.multithrd.tc02x001 * nsk.jdi.BScenarios.multithrd.tc02x001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.multithrd.tc02x001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x002/TestDescription.java index a8f298f37ac..c33d5635b4a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x002/TestDescription.java @@ -78,13 +78,13 @@ * /test/lib * @build nsk.jdi.BScenarios.multithrd.tc02x002 * nsk.jdi.BScenarios.multithrd.tc02x002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.multithrd.tc02x002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x003/TestDescription.java index b0096306bbb..cac17bb5035 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x003/TestDescription.java @@ -78,13 +78,13 @@ * /test/lib * @build nsk.jdi.BScenarios.multithrd.tc02x003 * nsk.jdi.BScenarios.multithrd.tc02x003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.multithrd.tc02x003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x004/TestDescription.java index e8364f49564..0fa280a34ea 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc02x004/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.BScenarios.multithrd.tc02x004 * nsk.jdi.BScenarios.multithrd.tc02x004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.multithrd.tc02x004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc03x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc03x001/TestDescription.java index caf63e92d26..8e6463386b5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc03x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc03x001/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.BScenarios.multithrd.tc03x001 * nsk.jdi.BScenarios.multithrd.tc03x001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.multithrd.tc03x001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc04x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc04x001/TestDescription.java index 2442cd60c11..5a8564c6645 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc04x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/multithrd/tc04x001/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.BScenarios.multithrd.tc04x001 * nsk.jdi.BScenarios.multithrd.tc04x001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.multithrd.tc04x001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc01x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc01x001/TestDescription.java index 536c69f540b..c3768ac1dfc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc01x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc01x001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.BScenarios.singlethrd.tc01x001 * nsk.jdi.BScenarios.singlethrd.tc01x001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.singlethrd.tc01x001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc01x002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc01x002/TestDescription.java index d05388693dc..4dcec5a9277 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc01x002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc01x002/TestDescription.java @@ -55,13 +55,13 @@ * /test/lib * @build nsk.jdi.BScenarios.singlethrd.tc01x002 * nsk.jdi.BScenarios.singlethrd.tc01x002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.singlethrd.tc01x002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc02x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc02x001/TestDescription.java index 94fca8c19b4..084026c090b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc02x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc02x001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.BScenarios.singlethrd.tc02x001 * nsk.jdi.BScenarios.singlethrd.tc02x001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.singlethrd.tc02x001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc03x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc03x001/TestDescription.java index 5da2d08a31a..0ca5f14aa69 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc03x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc03x001/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.BScenarios.singlethrd.tc03x001 * nsk.jdi.BScenarios.singlethrd.tc03x001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.singlethrd.tc03x001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc03x002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc03x002/TestDescription.java index 7d808a13681..2a5ff6bfd40 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc03x002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc03x002/TestDescription.java @@ -76,13 +76,13 @@ * /test/lib * @build nsk.jdi.BScenarios.singlethrd.tc03x002 * nsk.jdi.BScenarios.singlethrd.tc03x002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.singlethrd.tc03x002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc03x003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc03x003/TestDescription.java index 7792f773572..bd381b10250 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc03x003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc03x003/TestDescription.java @@ -76,13 +76,13 @@ * /test/lib * @build nsk.jdi.BScenarios.singlethrd.tc03x003 * nsk.jdi.BScenarios.singlethrd.tc03x003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.singlethrd.tc03x003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc04x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc04x001/TestDescription.java index 419248d207d..589f3046384 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc04x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc04x001/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.BScenarios.singlethrd.tc04x001 * nsk.jdi.BScenarios.singlethrd.tc04x001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.singlethrd.tc04x001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc05x001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc05x001/TestDescription.java index d3e294f084d..85f0fbbc28e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc05x001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc05x001/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.BScenarios.singlethrd.tc05x001 * nsk.jdi.BScenarios.singlethrd.tc05x001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BScenarios.singlethrd.tc05x001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/booleanValue/booleanvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/booleanValue/booleanvalue001/TestDescription.java index e89a2d6dafa..dc652ddbdd7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/booleanValue/booleanvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/booleanValue/booleanvalue001/TestDescription.java @@ -82,13 +82,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.BooleanArgument.booleanValue.booleanvalue001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BooleanArgument.booleanValue.booleanvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/booleanValue/booleanvalue002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/booleanValue/booleanvalue002/TestDescription.java index 78b0c4a7831..1eb8fcd49d4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/booleanValue/booleanvalue002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/booleanValue/booleanvalue002/TestDescription.java @@ -70,13 +70,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.BooleanArgument.booleanValue.booleanvalue002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BooleanArgument.booleanValue.booleanvalue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/isValid/isvalid001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/isValid/isvalid001/TestDescription.java index 6847f5c903c..f8b3bf5becf 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/isValid/isvalid001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/isValid/isvalid001/TestDescription.java @@ -65,13 +65,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.BooleanArgument.isValid.isvalid001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BooleanArgument.isValid.isvalid001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/isValid/isvalid002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/isValid/isvalid002/TestDescription.java index c1856b92b5f..39e3f9b97b2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/isValid/isvalid002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/isValid/isvalid002/TestDescription.java @@ -62,13 +62,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.BooleanArgument.isValid.isvalid002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BooleanArgument.isValid.isvalid002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/setValue/setvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/setValue/setvalue001/TestDescription.java index dcca9a3da6d..49295a7ad6f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/setValue/setvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/setValue/setvalue001/TestDescription.java @@ -57,13 +57,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.BooleanArgument.setValue.setvalue001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BooleanArgument.setValue.setvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/setValue/setvalue002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/setValue/setvalue002/TestDescription.java index 7a0398b6015..7823f9ebb88 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/setValue/setvalue002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/setValue/setvalue002/TestDescription.java @@ -54,13 +54,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.BooleanArgument.setValue.setvalue002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BooleanArgument.setValue.setvalue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/stringValueOf/stringvalueof001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/stringValueOf/stringvalueof001/TestDescription.java index 50bf5b6de8b..ac0ef096331 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/stringValueOf/stringvalueof001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/stringValueOf/stringvalueof001/TestDescription.java @@ -64,13 +64,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.BooleanArgument.stringValueOf.stringvalueof001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BooleanArgument.stringValueOf.stringvalueof001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/stringValueOf/stringvalueof002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/stringValueOf/stringvalueof002/TestDescription.java index 5ab348b8160..8ac76a9b1e2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/stringValueOf/stringvalueof002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanArgument/stringValueOf/stringvalueof002/TestDescription.java @@ -76,13 +76,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.BooleanArgument.stringValueOf.stringvalueof002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BooleanArgument.stringValueOf.stringvalueof002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanType/_itself_/booleantype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanType/_itself_/booleantype001/TestDescription.java index a861a54f849..e537d1ff1ac 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanType/_itself_/booleantype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanType/_itself_/booleantype001/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.BooleanType._itself_.booleantype001 * nsk.jdi.BooleanType._itself_.booleantype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BooleanType._itself_.booleantype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/equals/equals001/TestDescription.java index 9f8f30ed187..6bdce63e02f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/equals/equals001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.BooleanValue.equals.equals001 * nsk.jdi.BooleanValue.equals.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BooleanValue.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/equals/equals002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/equals/equals002/TestDescription.java index 2b935c40a3a..8431c2f1694 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/equals/equals002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/equals/equals002/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.BooleanValue.equals.equals002 * nsk.jdi.BooleanValue.equals.equals002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BooleanValue.equals.equals002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/hashCode/hashcode001/TestDescription.java index 588370b4fd0..28e6c5e8c7a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/hashCode/hashcode001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.BooleanValue.hashCode.hashcode001 * nsk.jdi.BooleanValue.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BooleanValue.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/value/value001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/value/value001/TestDescription.java index fac7a6d45e7..7e1298c71a6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/value/value001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/value/value001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.BooleanValue.value.value001 * nsk.jdi.BooleanValue.value.value001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BooleanValue.value.value001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointEvent/_itself_/breakpoint001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointEvent/_itself_/breakpoint001/TestDescription.java index 6d09c4b4897..cb221b5c6d5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointEvent/_itself_/breakpoint001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointEvent/_itself_/breakpoint001/TestDescription.java @@ -80,13 +80,13 @@ * /test/lib * @build nsk.jdi.BreakpointEvent._itself_.breakpoint001 * nsk.jdi.BreakpointEvent._itself_.breakpoint001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BreakpointEvent._itself_.breakpoint001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointEvent/_itself_/breakpoint002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointEvent/_itself_/breakpoint002/TestDescription.java index 70baaaf93d4..237e3ca07e3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointEvent/_itself_/breakpoint002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointEvent/_itself_/breakpoint002/TestDescription.java @@ -54,13 +54,13 @@ * @clean nsk.jdi.BreakpointEvent._itself_.breakpoint002t * @compile -g:lines,source,vars ../breakpoint002t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BreakpointEvent._itself_.breakpoint002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/_bounds_/filters001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/_bounds_/filters001/TestDescription.java index 3947964bd60..5da5b1331c3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/_bounds_/filters001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/_bounds_/filters001/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.BreakpointRequest._bounds_.filters001 * nsk.jdi.BreakpointRequest._bounds_.filters001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BreakpointRequest._bounds_.filters001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter001/TestDescription.java index a6e2123ce75..2e6768174a4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter001/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.BreakpointRequest.addInstanceFilter.instancefilter001 * nsk.jdi.BreakpointRequest.addInstanceFilter.instancefilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BreakpointRequest.addInstanceFilter.instancefilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter002/TestDescription.java index aadef8ddfc2..fd6319eefb6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter002/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.BreakpointRequest.addInstanceFilter.instancefilter002 * nsk.jdi.BreakpointRequest.addInstanceFilter.instancefilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BreakpointRequest.addInstanceFilter.instancefilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter003/TestDescription.java index 1691ba00e8f..39cc429066d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter003/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.BreakpointRequest.addInstanceFilter.instancefilter003 * nsk.jdi.BreakpointRequest.addInstanceFilter.instancefilter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BreakpointRequest.addInstanceFilter.instancefilter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter004/TestDescription.java index ffc9a6cd922..7290652a30a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addInstanceFilter/instancefilter004/TestDescription.java @@ -79,13 +79,13 @@ * /test/lib * @build nsk.jdi.BreakpointRequest.addInstanceFilter.instancefilter004 * nsk.jdi.BreakpointRequest.addInstanceFilter.instancefilter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BreakpointRequest.addInstanceFilter.instancefilter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter001/TestDescription.java index 5ddda29a199..eac3254a24a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.BreakpointRequest.addThreadFilter.threadfilter001 * nsk.jdi.BreakpointRequest.addThreadFilter.threadfilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BreakpointRequest.addThreadFilter.threadfilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter002/TestDescription.java index 8608cade034..54496e897ee 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter002/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.BreakpointRequest.addThreadFilter.threadfilter002 * nsk.jdi.BreakpointRequest.addThreadFilter.threadfilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BreakpointRequest.addThreadFilter.threadfilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter003/TestDescription.java index 5f747f0a7ce..12c9244c6ab 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter003/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.BreakpointRequest.addThreadFilter.threadfilter003 * nsk.jdi.BreakpointRequest.addThreadFilter.threadfilter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BreakpointRequest.addThreadFilter.threadfilter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter004/TestDescription.java index c1ca0eba8a3..c56d2fcd104 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/addThreadFilter/threadfilter004/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.BreakpointRequest.addThreadFilter.threadfilter004 * nsk.jdi.BreakpointRequest.addThreadFilter.threadfilter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BreakpointRequest.addThreadFilter.threadfilter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/location/location001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/location/location001/TestDescription.java index b95b7124d8a..56cc3e7cb57 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/location/location001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/BreakpointRequest/location/location001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.BreakpointRequest.location.location001 * nsk.jdi.BreakpointRequest.location.location001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.BreakpointRequest.location.location001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteType/_itself_/bytetype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteType/_itself_/bytetype001/TestDescription.java index 728d2d5ff76..354c5673556 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteType/_itself_/bytetype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteType/_itself_/bytetype001/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.ByteType._itself_.bytetype001 * nsk.jdi.ByteType._itself_.bytetype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ByteType._itself_.bytetype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/compareTo/compareto001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/compareTo/compareto001/TestDescription.java index 26f1d90a724..625a6037bf5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/compareTo/compareto001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/compareTo/compareto001/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.ByteValue.compareTo.compareto001 * nsk.jdi.ByteValue.compareTo.compareto001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ByteValue.compareTo.compareto001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/equals/equals001/TestDescription.java index 7c1426c029a..f59af3bbbe3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/equals/equals001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.ByteValue.equals.equals001 * nsk.jdi.ByteValue.equals.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ByteValue.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/equals/equals002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/equals/equals002/TestDescription.java index f0b1ff22bb3..2e5c98a984d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/equals/equals002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/equals/equals002/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.ByteValue.equals.equals002 * nsk.jdi.ByteValue.equals.equals002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ByteValue.equals.equals002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/hashCode/hashcode001/TestDescription.java index d480b95b2f0..666ce26a13f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/hashCode/hashcode001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.ByteValue.hashCode.hashcode001 * nsk.jdi.ByteValue.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ByteValue.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/value/value001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/value/value001/TestDescription.java index 44ce823c6a1..439de1a0213 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/value/value001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ByteValue/value/value001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.ByteValue.value.value001 * nsk.jdi.ByteValue.value.value001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ByteValue.value.value001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharType/_itself_/chartype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharType/_itself_/chartype001/TestDescription.java index d62ab5cd4ee..9c9ab871aac 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharType/_itself_/chartype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharType/_itself_/chartype001/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.CharType._itself_.chartype001 * nsk.jdi.CharType._itself_.chartype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.CharType._itself_.chartype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/compareTo/compareto001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/compareTo/compareto001/TestDescription.java index 143c0c6d204..249a42cb876 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/compareTo/compareto001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/compareTo/compareto001/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.CharValue.compareTo.compareto001 * nsk.jdi.CharValue.compareTo.compareto001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.CharValue.compareTo.compareto001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/equals/equals001/TestDescription.java index 7e6a2fa68ba..2b8a1478f4a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/equals/equals001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.CharValue.equals.equals001 * nsk.jdi.CharValue.equals.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.CharValue.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/equals/equals002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/equals/equals002/TestDescription.java index c074510596d..c7f3152eb25 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/equals/equals002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/equals/equals002/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.CharValue.equals.equals002 * nsk.jdi.CharValue.equals.equals002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.CharValue.equals.equals002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/hashCode/hashcode001/TestDescription.java index 6427474ec84..9d6c8a4e250 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/hashCode/hashcode001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.CharValue.hashCode.hashcode001 * nsk.jdi.CharValue.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.CharValue.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/value/value001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/value/value001/TestDescription.java index 2d05628411e..fbdf41551ca 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/value/value001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/CharValue/value/value001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.CharValue.value.value001 * nsk.jdi.CharValue.value.value001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.CharValue.value.value001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses001/TestDescription.java index 84874fa71bd..7ac516a6685 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses001/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.ClassLoaderReference.definedClasses.definedclasses001 * nsk.jdi.ClassLoaderReference.definedClasses.definedclasses001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassLoaderReference.definedClasses.definedclasses001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses002/TestDescription.java index be5870086fe..00b6a818a58 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses002/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.ClassLoaderReference.definedClasses.definedclasses002 * nsk.jdi.ClassLoaderReference.definedClasses.definedclasses002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassLoaderReference.definedClasses.definedclasses002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses003/TestDescription.java index 777f400eda6..01e23a722a3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses003/TestDescription.java @@ -60,13 +60,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassLoaderReference.definedClasses.definedclasses003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses004/TestDescription.java index f011a7050bf..8e4ce502038 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses004/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.ClassLoaderReference.definedClasses.definedclasses004 * nsk.jdi.ClassLoaderReference.definedClasses.definedclasses004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassLoaderReference.definedClasses.definedclasses004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses005/TestDescription.java index 58a1f747630..7cf9955f841 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses005/TestDescription.java @@ -60,13 +60,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassLoaderReference.definedClasses.definedclasses005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/visibleClasses/visibleclasses001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/visibleClasses/visibleclasses001/TestDescription.java index 5bd620e2a5e..68ee90e3a39 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/visibleClasses/visibleclasses001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/visibleClasses/visibleclasses001/TestDescription.java @@ -87,13 +87,13 @@ * /test/lib * @build nsk.jdi.ClassLoaderReference.visibleClasses.visibleclasses001 * nsk.jdi.ClassLoaderReference.visibleClasses.visibleclasses001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassLoaderReference.visibleClasses.visibleclasses001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/visibleClasses/visibleclasses002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/visibleClasses/visibleclasses002/TestDescription.java index b8d4e2935d8..7915c6eca2c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/visibleClasses/visibleclasses002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/visibleClasses/visibleclasses002/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.ClassLoaderReference.visibleClasses.visibleclasses002 * nsk.jdi.ClassLoaderReference.visibleClasses.visibleclasses002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassLoaderReference.visibleClasses.visibleclasses002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassObjectReference/reflectedType/reflectype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassObjectReference/reflectedType/reflectype001/TestDescription.java index b695a689508..423bb747a5d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassObjectReference/reflectedType/reflectype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassObjectReference/reflectedType/reflectype001/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.ClassObjectReference.reflectedType.reflectype001 * nsk.jdi.ClassObjectReference.reflectedType.reflectype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassObjectReference.reflectedType.reflectype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassObjectReference/reflectedType/reflectype002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassObjectReference/reflectedType/reflectype002/TestDescription.java index 29b87eeac77..4e3ee545319 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassObjectReference/reflectedType/reflectype002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassObjectReference/reflectedType/reflectype002/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassObjectReference.reflectedType.reflectype002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassObjectReference/toString/tostring001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassObjectReference/toString/tostring001/TestDescription.java index 015a0082c95..1abc52e7d66 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassObjectReference/toString/tostring001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassObjectReference/toString/tostring001/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.ClassObjectReference.toString.tostring001 * nsk.jdi.ClassObjectReference.toString.tostring001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassObjectReference.toString.tostring001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareEvent/referenceType/refType001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareEvent/referenceType/refType001/TestDescription.java index 120b4e53441..854e47d89d2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareEvent/referenceType/refType001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareEvent/referenceType/refType001/TestDescription.java @@ -81,13 +81,13 @@ * /test/lib * @build nsk.jdi.ClassPrepareEvent.referenceType.refType001 * nsk.jdi.ClassPrepareEvent.referenceType.refType001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassPrepareEvent.referenceType.refType001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareEvent/thread/thread001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareEvent/thread/thread001/TestDescription.java index 9a11548e5c5..ebff62e188a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareEvent/thread/thread001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareEvent/thread/thread001/TestDescription.java @@ -78,13 +78,13 @@ * /test/lib * @build nsk.jdi.ClassPrepareEvent.thread.thread001 * nsk.jdi.ClassPrepareEvent.thread.thread001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassPrepareEvent.thread.thread001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/_bounds_/filters001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/_bounds_/filters001/TestDescription.java index 0a3886fa400..d575baf91eb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/_bounds_/filters001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/_bounds_/filters001/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.ClassPrepareRequest._bounds_.filters001 * nsk.jdi.ClassPrepareRequest._bounds_.filters001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassPrepareRequest._bounds_.filters001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter001/TestDescription.java index 7b5239885f5..068be877845 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter001/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.ClassPrepareRequest.addClassExclusionFilter.filter001 * nsk.jdi.ClassPrepareRequest.addClassExclusionFilter.filter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassPrepareRequest.addClassExclusionFilter.filter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter002/TestDescription.java index c981fc59ba9..33ebac6f51c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter002/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.ClassPrepareRequest.addClassExclusionFilter.filter002 * nsk.jdi.ClassPrepareRequest.addClassExclusionFilter.filter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassPrepareRequest.addClassExclusionFilter.filter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter003/TestDescription.java index 1e264a2ef5c..2b611a033ee 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter003/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.ClassPrepareRequest.addClassExclusionFilter.filter003 * nsk.jdi.ClassPrepareRequest.addClassExclusionFilter.filter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassPrepareRequest.addClassExclusionFilter.filter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt001/TestDescription.java index 6ef4bd7931e..bb809a612f6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt001/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.ClassPrepareRequest.addClassFilter_rt.filter_rt001 * nsk.jdi.ClassPrepareRequest.addClassFilter_rt.filter_rt001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassPrepareRequest.addClassFilter_rt.filter_rt001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt002/TestDescription.java index f2ced715540..ef7aa08e43a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt002/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.ClassPrepareRequest.addClassFilter_rt.filter_rt002 * nsk.jdi.ClassPrepareRequest.addClassFilter_rt.filter_rt002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassPrepareRequest.addClassFilter_rt.filter_rt002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt003/TestDescription.java index 289cf594b64..f4e9ef3b464 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt003/TestDescription.java @@ -75,13 +75,13 @@ * /test/lib * @build nsk.jdi.ClassPrepareRequest.addClassFilter_rt.filter_rt003 * nsk.jdi.ClassPrepareRequest.addClassFilter_rt.filter_rt003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassPrepareRequest.addClassFilter_rt.filter_rt003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_s/filter_s001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_s/filter_s001/TestDescription.java index df2990ef2ae..b19be77c961 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_s/filter_s001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_s/filter_s001/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.ClassPrepareRequest.addClassFilter_s.filter_s001 * nsk.jdi.ClassPrepareRequest.addClassFilter_s.filter_s001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassPrepareRequest.addClassFilter_s.filter_s001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_s/filter_s002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_s/filter_s002/TestDescription.java index 902d6e45756..495f7acca5c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_s/filter_s002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_s/filter_s002/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.ClassPrepareRequest.addClassFilter_s.filter_s002 * nsk.jdi.ClassPrepareRequest.addClassFilter_s.filter_s002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassPrepareRequest.addClassFilter_s.filter_s002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addSourceNameFilter/addSourceNameFilter001/addSourceNameFilter001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addSourceNameFilter/addSourceNameFilter001/addSourceNameFilter001.java index b97c679605f..74a55c2bbab 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addSourceNameFilter/addSourceNameFilter001/addSourceNameFilter001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addSourceNameFilter/addSourceNameFilter001/addSourceNameFilter001.java @@ -49,14 +49,14 @@ * @build nsk.jdi.ClassPrepareRequest.addSourceNameFilter.addSourceNameFilter001.addSourceNameFilter001 * nsk.jdi.ClassPrepareRequest.addSourceNameFilter.addSourceNameFilter001.TestClass2 * nsk.share.jdi.TestClass1 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassPrepareRequest.addSourceNameFilter.addSourceNameFilter001.addSourceNameFilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addSourceNameFilter/addSourceNameFilter002/addSourceNameFilter002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addSourceNameFilter/addSourceNameFilter002/addSourceNameFilter002.java index 31b4aee8a22..388cd8431bc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addSourceNameFilter/addSourceNameFilter002/addSourceNameFilter002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addSourceNameFilter/addSourceNameFilter002/addSourceNameFilter002.java @@ -51,14 +51,14 @@ * /test/lib * @build nsk.jdi.ClassPrepareRequest.addSourceNameFilter.addSourceNameFilter002.addSourceNameFilter002 * nsk.share.jdi.TestClass1 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassPrepareRequest.addSourceNameFilter.addSourceNameFilter002.addSourceNameFilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -sourceCount 2 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/allInterfaces/allinterfaces001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/allInterfaces/allinterfaces001.java index 8ecef8ec440..e0f59a1fb0f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/allInterfaces/allinterfaces001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/allInterfaces/allinterfaces001.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -172,7 +172,7 @@ private int runThis (String argv[], PrintStream out) { switch (i2) { - case 0: // Class0ForCheck - 0 interfaces + case 0: // Class0ForCheck - 1 injected interface (java.lang.IdentityObject) List list0 = vm.classesByName(mName + ".Class0ForCheck"); @@ -181,15 +181,15 @@ private int runThis (String argv[], PrintStream out) { List iface0list = ((ClassType) classRefType).allInterfaces(); - if (iface0list.size() != 0) { - log3("ERROR : iface0list.size() != 0 in case: Class0ForCheck"); + if (iface0list.size() != 1) { + log3("ERROR : iface0list.size() != 1 in case: Class0ForCheck"); expresult = 1; break; } break ; - case 1: // Class1forCheck - 1 direct and 1 indirect interfaces + case 1: // Class1forCheck - 1 direct, 1 indirect, and 1 injected (java.lang.IdentityObject) interfaces List list1 = vm.classesByName(mName + ".Class1ForCheck"); @@ -198,8 +198,8 @@ private int runThis (String argv[], PrintStream out) { List iface1list = ((ClassType) classRefType).allInterfaces(); - if (iface1list.size() != 2) { - log3("ERROR : iface1list.size() != 2 in case: Class1forCheck :" + iface1list.size()); + if (iface1list.size() != 3) { + log3("ERROR : iface1list.size() != 3 in case: Class1forCheck :" + iface1list.size()); expresult = 1; break; } @@ -208,7 +208,7 @@ private int runThis (String argv[], PrintStream out) { name = reftype.name(); if (!name.equals(mName + ".Iface1")) { if (!name.equals(mName + ".Iface2")) { - log3("ERROR : name1: !name.equals('.Iface1' or '.Iface2') in Class1forCheck"); + log3("ERROR : name1: !name.equals('.Iface1' or '.Iface2') in Class1forCheck, name: " + name); expresult = 1; break; } @@ -217,14 +217,16 @@ private int runThis (String argv[], PrintStream out) { name = reftype.name(); if (!name.equals(mName + ".Iface1")) { if (!name.equals(mName + ".Iface2")) { - log3("ERROR :name2: !name.equals('.Iface1' or '.Iface2') in Class1forCheck"); - expresult = 1; - break; + if (!name.equals("java.lang.IdentityObject")) { + log3("ERROR :name2: !name.equals('.Iface1' or '.Iface2 or 'java.lang.IdentityObject') in Class1forCheck, name: " + name); + expresult = 1; + break; + } } } break; - case 2: // Class2ForCheck - 1 direct and 2 indirect interfaces + case 2: // Class2ForCheck - 1 direct, 2 indirect, and 1 injected (java.lang.IdentityObject) interfaces List list2 = vm.classesByName(mName + ".Class2ForCheck"); @@ -233,8 +235,8 @@ private int runThis (String argv[], PrintStream out) { List iface2list = ((ClassType) classRefType).allInterfaces(); - if (iface2list.size() != 3) { - log3("ERROR : iface2list.size() != 3 in case: Class2forCheck"); + if (iface2list.size() != 4) { + log3("ERROR : iface2list.size() != 4 in case: Class2forCheck"); expresult = 1; break; } @@ -244,7 +246,7 @@ private int runThis (String argv[], PrintStream out) { if (!name.equals(mName + ".Iface1")) { if (!name.equals(mName + ".Iface2")) { if (!name.equals(mName + ".Iface3")) { - log3("ERROR : name1: !name.equals('.Iface1' or '.Iface3' or 'Iface3) in Class2forCheck"); + log3("ERROR : name1: !name.equals('.Iface1' or '.Iface2' or 'Iface3) in Class2forCheck, name: " + name); expresult = 1; break; } @@ -255,9 +257,11 @@ private int runThis (String argv[], PrintStream out) { if (!name.equals(mName + ".Iface1")) { if (!name.equals(mName + ".Iface2")) { if (!name.equals(mName + ".Iface3")) { - log3("ERROR : name1: !name.equals('.Iface1' or '.Iface3' or 'Iface3) in Class2forCheck"); - expresult = 1; - break; + if (!name.equals("java.lang.IdentityObject")) { + log3("ERROR : name1: !name.equals('.Iface1' or '.Iface2' or 'Iface3' or 'java.lang.IdentityObject') in Class2forCheck, name: " + name); + expresult = 1; + break; + } } } } @@ -266,7 +270,7 @@ private int runThis (String argv[], PrintStream out) { if (!name.equals(mName + ".Iface1")) { if (!name.equals(mName + ".Iface2")) { if (!name.equals(mName + ".Iface3")) { - log3("ERROR : name1: !name.equals('.Iface1' or '.Iface3' or 'Iface3) in Class2forCheck"); + log3("ERROR : name1: !name.equals('.Iface1' or '.Iface3' or 'Iface3) in Class2forCheck, name: " + name); expresult = 1; break; } @@ -274,7 +278,7 @@ private int runThis (String argv[], PrintStream out) { } break; - case 3: // Class3ForCheck - 1 direct and 2 indirect interfaces + case 3: // Class3ForCheck - 1 direct, 2 indirect, and 1 injected (java.lang.IdentityObject) interfaces List list3 = vm.classesByName(mName + ".Class3ForCheck"); @@ -283,8 +287,8 @@ private int runThis (String argv[], PrintStream out) { List iface3list = ((ClassType) classRefType).allInterfaces(); - if (iface3list.size() != 3) { - log3("ERROR : iface3list.size() != 3 in case: Class3forCheck"); + if (iface3list.size() != 4) { + log3("ERROR : iface3list.size() != 4 in case: Class3forCheck"); expresult = 1; break; } @@ -294,7 +298,7 @@ private int runThis (String argv[], PrintStream out) { if (!name.equals(mName + ".Iface1")) { if (!name.equals(mName + ".Iface2")) { if (!name.equals(mName + ".Iface3")) { - log3("ERROR : name1: !name.equals('.Iface1' or '.Iface3' or 'Iface3) in Class3forCheck"); + log3("ERROR : name1: !name.equals('.Iface1' or '.Iface2' or 'Iface3) in Class3forCheck, name: " + name); expresult = 1; break; } @@ -305,9 +309,11 @@ private int runThis (String argv[], PrintStream out) { if (!name.equals(mName + ".Iface1")) { if (!name.equals(mName + ".Iface2")) { if (!name.equals(mName + ".Iface3")) { - log3("ERROR : name1: !name.equals('.Iface1' or '.Iface3' or 'Iface3) in Class3forCheck"); - expresult = 1; - break; + if (!name.equals("java.lang.IdentityObject")) { + log3("ERROR : name1: !name.equals('.Iface1' or '.Iface3' or 'Iface3' or 'java.lang.IdentityObject') in Class3forCheck, name: " + name); + expresult = 1; + break; + } } } } @@ -316,7 +322,7 @@ private int runThis (String argv[], PrintStream out) { if (!name.equals(mName + ".Iface1")) { if (!name.equals(mName + ".Iface2")) { if (!name.equals(mName + ".Iface3")) { - log3("ERROR : name1: !name.equals('.Iface1' or '.Iface3' or 'Iface3) in Class3forCheck"); + log3("ERROR : name1: !name.equals('.Iface1' or '.Iface2' or 'Iface3) in Class3forCheck, name: " + name); expresult = 1; break; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/allInterfaces/allinterfaces001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/allInterfaces/allinterfaces001/TestDescription.java index 9f146f22d0e..3ddaab327af 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/allInterfaces/allinterfaces001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/allInterfaces/allinterfaces001/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.ClassType.allInterfaces.allinterfaces001 * nsk.jdi.ClassType.allInterfaces.allinterfaces001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.allInterfaces.allinterfaces001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/allInterfaces/allinterfaces002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/allInterfaces/allinterfaces002/TestDescription.java index 9c9c720bea4..51e5aa5a67f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/allInterfaces/allinterfaces002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/allInterfaces/allinterfaces002/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.ClassType.allInterfaces.allinterfaces002 * nsk.jdi.ClassType.allInterfaces.allinterfaces002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.allInterfaces.allinterfaces002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/concreteMethodByName/method001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/concreteMethodByName/method001/TestDescription.java index 465033581a8..145c48cb09e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/concreteMethodByName/method001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/concreteMethodByName/method001/TestDescription.java @@ -55,13 +55,13 @@ * /test/lib * @build nsk.jdi.ClassType.concreteMethodByName.method001 * nsk.jdi.ClassType.concreteMethodByName.method001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.concreteMethodByName.method001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/concreteMethodByName/method002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/concreteMethodByName/method002/TestDescription.java index 93f4f5d02fc..171614437bd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/concreteMethodByName/method002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/concreteMethodByName/method002/TestDescription.java @@ -41,13 +41,13 @@ * /test/lib * @build nsk.jdi.ClassType.concreteMethodByName.method002 * nsk.jdi.ClassType.concreteMethodByName.method002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.concreteMethodByName.method002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/interfaces/interfaces001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/interfaces/interfaces001.java index 429556ceffe..342b5c91f1f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/interfaces/interfaces001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/interfaces/interfaces001.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -167,7 +167,7 @@ private int runThis (String argv[], PrintStream out) { switch (i2) { - case 0: // Class0ForCheck - 0 interfaces + case 0: // Class0ForCheck - 1 interface (injected java.lang.IdentityObject) List list0 = vm.classesByName(mName + ".Class0ForCheck"); @@ -176,15 +176,15 @@ private int runThis (String argv[], PrintStream out) { List iface0list = ((ClassType) classRefType).interfaces(); - if (iface0list.size() != 0) { - log3("ERROR : iface0list.size() != 0 in case: Class0ForCheck"); + if (iface0list.size() != 1) { + log3("ERROR : iface0list.size() != 1 in case: Class0ForCheck"); expresult = 1; break; } break; - case 1: // Class1forCheck - 1 interface + case 1: // Class1forCheck - 2 interfaces (includes injected java.lang.IdentityObject) List list1 = vm.classesByName(mName + ".Class1ForCheck"); @@ -193,8 +193,8 @@ private int runThis (String argv[], PrintStream out) { List iface1list = ((ClassType) classRefType).interfaces(); - if (iface1list.size() != 1) { - log3("ERROR : iface1list.size() != 1 in case: Class1forCheck"); + if (iface1list.size() != 2) { + log3("ERROR : iface1list.size() != 2 in case: Class1forCheck"); expresult = 1; break; } @@ -209,7 +209,7 @@ private int runThis (String argv[], PrintStream out) { break; - case 2: // Class2ForCheck - 2 interfaces + case 2: // Class2ForCheck - 3 interfaces (includes injected java.lang.IdentityObject) List list2 = vm.classesByName(mName + ".Class2ForCheck"); @@ -218,8 +218,8 @@ private int runThis (String argv[], PrintStream out) { List iface2list = ((ClassType) classRefType).interfaces(); - if (iface2list.size() != 2) { - log3("ERROR : iface1list.size() != 2 in case: Class2forCheck"); + if (iface2list.size() != 3) { + log3("ERROR : iface1list.size() != 3 in case: Class2forCheck"); expresult = 1; break; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/interfaces/interfaces001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/interfaces/interfaces001/TestDescription.java index d48ce6289d3..26cda7fbd03 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/interfaces/interfaces001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/interfaces/interfaces001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.ClassType.interfaces.interfaces001 * nsk.jdi.ClassType.interfaces.interfaces001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.interfaces.interfaces001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/interfaces/interfaces002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/interfaces/interfaces002/TestDescription.java index f488a71f79b..7121228e4d1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/interfaces/interfaces002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/interfaces/interfaces002/TestDescription.java @@ -54,13 +54,13 @@ * /test/lib * @build nsk.jdi.ClassType.interfaces.interfaces002 * nsk.jdi.ClassType.interfaces.interfaces002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.interfaces.interfaces002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod001/TestDescription.java index 30307c9a895..e8992960c39 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod001 * nsk.jdi.ClassType.invokeMethod.invokemethod001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod002/TestDescription.java index e338379693f..95009f544fc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod002/TestDescription.java @@ -54,13 +54,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod002 * nsk.jdi.ClassType.invokeMethod.invokemethod002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod003/TestDescription.java index 959532f5adb..b70c1cc7d87 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod003/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod003 * nsk.jdi.ClassType.invokeMethod.invokemethod003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod004/TestDescription.java index 035a6c0d6fc..f7a1b3ef75e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod004/TestDescription.java @@ -49,13 +49,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod004 * nsk.jdi.ClassType.invokeMethod.invokemethod004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod005/TestDescription.java index 6f7bc9506f8..781627e2dbd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod005/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod005 * nsk.jdi.ClassType.invokeMethod.invokemethod005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod006/TestDescription.java index 6c681bbb5f2..293e3083ddc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod006/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod006 * nsk.jdi.ClassType.invokeMethod.invokemethod006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod007/TestDescription.java index 74bb40e2b16..5f33eaaad16 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod007/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod007 * nsk.jdi.ClassType.invokeMethod.invokemethod007a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod008/TestDescription.java index 1d952cb639e..046ba89adad 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod008/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod008 * nsk.jdi.ClassType.invokeMethod.invokemethod008a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod008 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod009/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod009/TestDescription.java index 9c069ee8b4c..47828168dee 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod009/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod009/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod009 * nsk.jdi.ClassType.invokeMethod.invokemethod009t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod009 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod010/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod010/TestDescription.java index 4e42c76fbc5..34303d74935 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod010/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod010/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod010 * nsk.jdi.ClassType.invokeMethod.invokemethod010t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod010 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011/TestDescription.java index 520e755205e..4bd7118118f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod011 * nsk.jdi.ClassType.invokeMethod.invokemethod011t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod011 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod012/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod012/TestDescription.java index 760433e4175..0190103235c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod012/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod012/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod012 * nsk.jdi.ClassType.invokeMethod.invokemethod012t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod012 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod013/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod013/TestDescription.java index bb878099ebc..7080eea3c83 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod013/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod013/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod013 * nsk.jdi.ClassType.invokeMethod.invokemethod013t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod013 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod014/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod014/TestDescription.java index 467b851f20b..8a1f8c86570 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod014/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod014/TestDescription.java @@ -41,13 +41,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod014 * nsk.jdi.ClassType.invokeMethod.invokemethod014t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod014 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod015/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod015/TestDescription.java index a47132fa4fe..c8c87343a85 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod015/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod015/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.ClassType.invokeMethod.invokemethod015 * nsk.jdi.ClassType.invokeMethod.invokemethod015a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.invokeMethod.invokemethod015 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/isEnum/isenum001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/isEnum/isenum001/TestDescription.java index 36be2f807fb..18b55f74423 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/isEnum/isenum001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/isEnum/isenum001/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.ClassType.isEnum.isenum001 * nsk.jdi.ClassType.isEnum.isenum001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.isEnum.isenum001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance001/TestDescription.java index 4baffc8aa64..a2050ab8112 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance001/TestDescription.java @@ -136,13 +136,13 @@ * /test/lib * @build nsk.jdi.ClassType.newInstance.newinstance001 * nsk.jdi.ClassType.newInstance.newinstance001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.newInstance.newinstance001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance002/TestDescription.java index 25e7ac92960..691a828366f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance002/TestDescription.java @@ -141,13 +141,13 @@ * @clean nsk.jdi.ClassType.newInstance.newinstance002a * @compile -g:lines,source,vars ../newinstance002a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.newInstance.newinstance002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance003/TestDescription.java index ec6ada63657..679fd323658 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance003/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.ClassType.newInstance.newinstance003 * nsk.jdi.ClassType.newInstance.newinstance003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.newInstance.newinstance003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance004/TestDescription.java index 01c728fb362..61112c73ef3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance004/TestDescription.java @@ -49,13 +49,13 @@ * /test/lib * @build nsk.jdi.ClassType.newInstance.newinstance004 * nsk.jdi.ClassType.newInstance.newinstance004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.newInstance.newinstance004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance005/TestDescription.java index fdde898d679..bd9addfdc59 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance005/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.ClassType.newInstance.newinstance005 * nsk.jdi.ClassType.newInstance.newinstance005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.newInstance.newinstance005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance006/TestDescription.java index da97aede2e8..83d540bed32 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance006/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.ClassType.newInstance.newinstance006 * nsk.jdi.ClassType.newInstance.newinstance006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.newInstance.newinstance006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance007/TestDescription.java index 09b7d118928..7059331afcb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance007/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.ClassType.newInstance.newinstance007 * nsk.jdi.ClassType.newInstance.newinstance007a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.newInstance.newinstance007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance008/TestDescription.java index e370198d3ab..5877f405097 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance008/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ClassType.newInstance.newinstance008 * nsk.jdi.ClassType.newInstance.newinstance008a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.newInstance.newinstance008 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance009/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance009/TestDescription.java index fb7ba562af5..28611f81ea3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance009/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/newInstance/newinstance009/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.ClassType.newInstance.newinstance009 * nsk.jdi.ClassType.newInstance.newinstance009t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.newInstance.newinstance009 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue001/TestDescription.java index b352962cbfc..3de790a7e60 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue001/TestDescription.java @@ -87,13 +87,13 @@ * /test/lib * @build nsk.jdi.ClassType.setValue.setvalue001 * nsk.jdi.ClassType.setValue.setvalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.setValue.setvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue002/TestDescription.java index e4fba76e469..75bc9079aaa 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue002/TestDescription.java @@ -87,13 +87,13 @@ * /test/lib * @build nsk.jdi.ClassType.setValue.setvalue002 * nsk.jdi.ClassType.setValue.setvalue002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.setValue.setvalue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue003/TestDescription.java index 69dab0def69..40c41ec5359 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue003/TestDescription.java @@ -86,13 +86,13 @@ * /test/lib * @build nsk.jdi.ClassType.setValue.setvalue003 * nsk.jdi.ClassType.setValue.setvalue003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.setValue.setvalue003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue004/TestDescription.java index 40ff92d2923..9b3a23803f4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue004/TestDescription.java @@ -87,13 +87,13 @@ * /test/lib * @build nsk.jdi.ClassType.setValue.setvalue004 * nsk.jdi.ClassType.setValue.setvalue004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.setValue.setvalue004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue005/TestDescription.java index 22edc938cb0..44b38a7c011 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue005/TestDescription.java @@ -85,13 +85,13 @@ * /test/lib * @build nsk.jdi.ClassType.setValue.setvalue005 * nsk.jdi.ClassType.setValue.setvalue005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.setValue.setvalue005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue006/TestDescription.java index bdc10b7b386..1af1e37acae 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue006/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.ClassType.setValue.setvalue006 * nsk.jdi.ClassType.setValue.setvalue006t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.setValue.setvalue006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue007/TestDescription.java index 2ea8e3e8b5e..f9491c9118b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue007/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.ClassType.setValue.setvalue007 * nsk.jdi.ClassType.setValue.setvalue007t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.setValue.setvalue007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue008/TestDescription.java index f086bd1b984..69078b1059b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/setValue/setvalue008/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.ClassType.setValue.setvalue008 * nsk.jdi.ClassType.setValue.setvalue008a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.setValue.setvalue008 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/subclasses/subclasses001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/subclasses/subclasses001/TestDescription.java index 82a9321eac1..de49d6f2d3f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/subclasses/subclasses001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/subclasses/subclasses001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ClassType.subclasses.subclasses001 * nsk.jdi.ClassType.subclasses.subclasses001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.subclasses.subclasses001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/subclasses/subclasses002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/subclasses/subclasses002/TestDescription.java index 9ee98b91c15..13844b37be8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/subclasses/subclasses002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/subclasses/subclasses002/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.ClassType.subclasses.subclasses002 * nsk.jdi.ClassType.subclasses.subclasses002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.subclasses.subclasses002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/superclass/superclass001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/superclass/superclass001/TestDescription.java index 047664c3388..c6e6be00758 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/superclass/superclass001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/superclass/superclass001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.ClassType.superclass.superclass001 * nsk.jdi.ClassType.superclass.superclass001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.superclass.superclass001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/superclass/superclass002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/superclass/superclass002/TestDescription.java index ea543244a9b..d3bf5d09261 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/superclass/superclass002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/superclass/superclass002/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.ClassType.superclass.superclass002 * nsk.jdi.ClassType.superclass.superclass002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassType.superclass.superclass002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadEvent/className/classname001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadEvent/className/classname001/TestDescription.java index e520f9158d5..d727b71745e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadEvent/className/classname001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadEvent/className/classname001/TestDescription.java @@ -84,7 +84,7 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassUnloadEvent.className.classname001 * ./bin * -verbose @@ -92,6 +92,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadEvent/classSignature/signature001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadEvent/classSignature/signature001/TestDescription.java index 8e3fed130c0..8614a46092e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadEvent/classSignature/signature001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadEvent/classSignature/signature001/TestDescription.java @@ -90,7 +90,7 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassUnloadEvent.classSignature.signature001 * ./bin * -verbose @@ -98,6 +98,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/_bounds_/filters001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/_bounds_/filters001/TestDescription.java index cb178add99f..8c3c75a7692 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/_bounds_/filters001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/_bounds_/filters001/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.ClassUnloadRequest._bounds_.filters001 * nsk.jdi.ClassUnloadRequest._bounds_.filters001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassUnloadRequest._bounds_.filters001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassExclusionFilter/exclfilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassExclusionFilter/exclfilter001/TestDescription.java index a1be86a3f82..ad14def18dc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassExclusionFilter/exclfilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassExclusionFilter/exclfilter001/TestDescription.java @@ -70,13 +70,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm/timeout=420 PropertyResolvingWrapper + * @run main/othervm/timeout=420 * nsk.jdi.ClassUnloadRequest.addClassExclusionFilter.exclfilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassExclusionFilter/exclfilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassExclusionFilter/exclfilter002/TestDescription.java index 25af670a409..4cc0cfdf462 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassExclusionFilter/exclfilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassExclusionFilter/exclfilter002/TestDescription.java @@ -50,13 +50,13 @@ * /test/lib * @build nsk.jdi.ClassUnloadRequest.addClassExclusionFilter.exclfilter002 * nsk.jdi.ClassUnloadRequest.addClassExclusionFilter.exclfilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassUnloadRequest.addClassExclusionFilter.exclfilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassFilter/filter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassFilter/filter001/TestDescription.java index d53f7a55329..6a388fbaea9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassFilter/filter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassFilter/filter001/TestDescription.java @@ -68,13 +68,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm/timeout=420 PropertyResolvingWrapper + * @run main/othervm/timeout=420 * nsk.jdi.ClassUnloadRequest.addClassFilter.filter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassFilter/filter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassFilter/filter002/TestDescription.java index 0b57e871104..cb236f02a07 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassFilter/filter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassUnloadRequest/addClassFilter/filter002/TestDescription.java @@ -50,13 +50,13 @@ * /test/lib * @build nsk.jdi.ClassUnloadRequest.addClassFilter.filter002 * nsk.jdi.ClassUnloadRequest.addClassFilter.filter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ClassUnloadRequest.addClassFilter.filter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/_bounds_/bounds001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/_bounds_/bounds001/TestDescription.java index 4fc54a6eeda..994cbc07495 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/_bounds_/bounds001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/_bounds_/bounds001/TestDescription.java @@ -42,13 +42,13 @@ * /test/lib * @build nsk.jdi.Connector._bounds_.bounds001 * nsk.jdi.Connector._bounds_.bounds001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Connector._bounds_.bounds001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/defaultArguments/defaultArguments001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/defaultArguments/defaultArguments001/TestDescription.java index cdb297ca816..da6b65f560c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/defaultArguments/defaultArguments001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/defaultArguments/defaultArguments001/TestDescription.java @@ -42,13 +42,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Connector.defaultArguments.defaultArguments001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Connector.defaultArguments.defaultArguments001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/defaultArguments/defaultArguments002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/defaultArguments/defaultArguments002/TestDescription.java index c667a969737..7ef36535476 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/defaultArguments/defaultArguments002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/defaultArguments/defaultArguments002/TestDescription.java @@ -42,13 +42,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Connector.defaultArguments.defaultArguments002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Connector.defaultArguments.defaultArguments002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/defaultArguments/defaultArguments003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/defaultArguments/defaultArguments003/TestDescription.java index d84008beb50..bf803da60d4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/defaultArguments/defaultArguments003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/defaultArguments/defaultArguments003/TestDescription.java @@ -42,13 +42,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Connector.defaultArguments.defaultArguments003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Connector.defaultArguments.defaultArguments003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/description/description001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/description/description001/TestDescription.java index 6f40e311689..0343ed32b1d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/description/description001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/description/description001/TestDescription.java @@ -42,13 +42,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Connector.description.description001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Connector.description.description001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/name/name001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/name/name001/TestDescription.java index 804eb22c168..16ed2ff308f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/name/name001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/name/name001/TestDescription.java @@ -41,13 +41,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Connector.name.name001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Connector.name.name001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/toString/tostring001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/toString/tostring001/TestDescription.java index 1e5487f4ac2..40b5f4133cb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/toString/tostring001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/toString/tostring001/TestDescription.java @@ -43,13 +43,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Connector.toString.tostring001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Connector.toString.tostring001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/transport/transport001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/transport/transport001/TestDescription.java index 8e58a549d4f..a002d442563 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/transport/transport001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Connector/transport/transport001/TestDescription.java @@ -42,13 +42,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Connector.transport.transport001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Connector.transport.transport001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleType/_itself_/doubletype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleType/_itself_/doubletype001/TestDescription.java index fe0f64ca720..85d98b6b98c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleType/_itself_/doubletype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleType/_itself_/doubletype001/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.DoubleType._itself_.doubletype001 * nsk.jdi.DoubleType._itself_.doubletype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.DoubleType._itself_.doubletype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/compareTo/compareto001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/compareTo/compareto001/TestDescription.java index 7ada9972200..d77b6471af4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/compareTo/compareto001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/compareTo/compareto001/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.DoubleValue.compareTo.compareto001 * nsk.jdi.DoubleValue.compareTo.compareto001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.DoubleValue.compareTo.compareto001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/equals/equals001/TestDescription.java index 96e68da2146..3c6bc761875 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/equals/equals001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.DoubleValue.equals.equals001 * nsk.jdi.DoubleValue.equals.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.DoubleValue.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/equals/equals002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/equals/equals002/TestDescription.java index 63707dcfc84..ae8b7dab3a5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/equals/equals002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/equals/equals002/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.DoubleValue.equals.equals002 * nsk.jdi.DoubleValue.equals.equals002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.DoubleValue.equals.equals002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/hashCode/hashcode001/TestDescription.java index d7af8242e66..f2743beb59b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/hashCode/hashcode001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.DoubleValue.hashCode.hashcode001 * nsk.jdi.DoubleValue.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.DoubleValue.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/value/value001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/value/value001/TestDescription.java index b33e2649337..4902ba2e472 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/value/value001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/DoubleValue/value/value001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.DoubleValue.value.value001 * nsk.jdi.DoubleValue.value.value001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.DoubleValue.value.value001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/_itself_/event001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/_itself_/event001/TestDescription.java index eb4cb3252e0..57d58d4081f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/_itself_/event001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/_itself_/event001/TestDescription.java @@ -55,13 +55,13 @@ * /test/lib * @build nsk.jdi.Event._itself_.event001 * nsk.jdi.Event._itself_.event001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Event._itself_.event001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/_itself_/event002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/_itself_/event002/TestDescription.java index ae2b65a1485..4117d71fd77 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/_itself_/event002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/_itself_/event002/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.Event._itself_.event002 * nsk.jdi.Event._itself_.event002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Event._itself_.event002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/equals/equals001/TestDescription.java index 884aeb52d9b..d85ca45d757 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/equals/equals001/TestDescription.java @@ -55,13 +55,13 @@ * /test/lib * @build nsk.jdi.Event.equals.equals001 * nsk.jdi.Event.equals.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Event.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/hashCode/hashcode001/TestDescription.java index 8f75c7bc500..9f1429f645b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/hashCode/hashcode001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.Event.hashCode.hashcode001 * nsk.jdi.Event.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Event.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/request/request001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/request/request001/TestDescription.java index 1cbfc82acc5..13769572033 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/request/request001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Event/request/request001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.Event.request.request001 * nsk.jdi.Event.request.request001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Event.request.request001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventIterator/nextEvent/nextevent001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventIterator/nextEvent/nextevent001/TestDescription.java index 2da1b024dbc..214beba896a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventIterator/nextEvent/nextevent001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventIterator/nextEvent/nextevent001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.EventIterator.nextEvent.nextevent001 * nsk.jdi.EventIterator.nextEvent.nextevent001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventIterator.nextEvent.nextevent001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/hashCode/hashcode001/TestDescription.java index 2030d3f7a67..41b46659b37 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/hashCode/hashcode001/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.EventQueue.hashCode.hashcode001 * nsk.jdi.EventQueue.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventQueue.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove001/TestDescription.java index 8c9ad2a6e09..281bbd8ea57 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove001/TestDescription.java @@ -41,13 +41,13 @@ * /test/lib * @build nsk.jdi.EventQueue.remove.remove001 * nsk.jdi.EventQueue.remove.remove001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventQueue.remove.remove001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove002/TestDescription.java index 86643444f1e..d372bf63fff 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove002/TestDescription.java @@ -41,13 +41,13 @@ * /test/lib * @build nsk.jdi.EventQueue.remove.remove002 * nsk.jdi.EventQueue.remove.remove002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventQueue.remove.remove002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove003/TestDescription.java index db303a4c75a..2627aa54035 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove003/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.EventQueue.remove.remove003 * nsk.jdi.EventQueue.remove.remove003t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventQueue.remove.remove003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove004/TestDescription.java index 1d3dee37e7e..8973c475e98 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove/remove004/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.EventQueue.remove.remove004 * nsk.jdi.EventQueue.remove.remove004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventQueue.remove.remove004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts} -Dtest.timeout.factor=${test.timeout.factor}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Dtest.timeout.factor=${test.timeout.factor}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l001/TestDescription.java index cd9379f519b..5f4232911fe 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l001/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.EventQueue.remove_l.remove_l001 * nsk.jdi.EventQueue.remove_l.remove_l001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventQueue.remove_l.remove_l001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l002/TestDescription.java index c0f9dbecde4..7c37ebbc6e9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l002/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.EventQueue.remove_l.remove_l002 * nsk.jdi.EventQueue.remove_l.remove_l002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventQueue.remove_l.remove_l002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l003/TestDescription.java index bbee0f6adf4..577c95e8953 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l003/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.EventQueue.remove_l.remove_l003 * nsk.jdi.EventQueue.remove_l.remove_l003t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventQueue.remove_l.remove_l003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l004/TestDescription.java index 321766addbc..aed897db6e5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l004/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.EventQueue.remove_l.remove_l004 * nsk.jdi.EventQueue.remove_l.remove_l004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventQueue.remove_l.remove_l004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts} -Dtest.timeout.factor=${test.timeout.factor}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts} -Dtest.timeout.factor=${test.timeout.factor}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l005/TestDescription.java index 4895bf8581d..7334889ff0a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventQueue/remove_l/remove_l005/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.EventQueue.remove_l.remove_l005 * nsk.jdi.EventQueue.remove_l.remove_l005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventQueue.remove_l.remove_l005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/_bounds_/eventrequest001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/_bounds_/eventrequest001/TestDescription.java index e3d0faa9215..844d6079ae3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/_bounds_/eventrequest001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/_bounds_/eventrequest001/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.EventRequest._bounds_.eventrequest001 * nsk.jdi.EventRequest._bounds_.eventrequest001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest._bounds_.eventrequest001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/addCountFilter/addcountfilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/addCountFilter/addcountfilter001/TestDescription.java index 3df32fdf412..49812c1f93d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/addCountFilter/addcountfilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/addCountFilter/addcountfilter001/TestDescription.java @@ -76,13 +76,13 @@ * /test/lib * @build nsk.jdi.EventRequest.addCountFilter.addcountfilter001 * nsk.jdi.EventRequest.addCountFilter.addcountfilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.addCountFilter.addcountfilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/disable/disable001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/disable/disable001/TestDescription.java index 624c0af75c0..3458405326a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/disable/disable001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/disable/disable001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventRequest.disable.disable001 * nsk.jdi.EventRequest.disable.disable001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.disable.disable001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/disable/disable002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/disable/disable002/TestDescription.java index c9513b2cf86..13f87379f2f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/disable/disable002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/disable/disable002/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.EventRequest.disable.disable002 * nsk.jdi.EventRequest.disable.disable002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.disable.disable002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/disable/disable003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/disable/disable003/TestDescription.java index 857215199fc..e6aa473ed96 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/disable/disable003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/disable/disable003/TestDescription.java @@ -56,7 +56,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.disable.disable003 * ./bin * -verbose @@ -64,6 +64,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/enable/enable001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/enable/enable001/TestDescription.java index a374ecec07b..b63e7c86153 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/enable/enable001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/enable/enable001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.EventRequest.enable.enable001 * nsk.jdi.EventRequest.enable.enable001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.enable.enable001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/enable/enable002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/enable/enable002/TestDescription.java index cf7a75dba33..dfc8d6ce7d9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/enable/enable002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/enable/enable002/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.EventRequest.enable.enable002 * nsk.jdi.EventRequest.enable.enable002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.enable.enable002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/getProperty/getproperty001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/getProperty/getproperty001/TestDescription.java index 23706d6f777..5629cea172f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/getProperty/getproperty001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/getProperty/getproperty001/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.EventRequest.getProperty.getproperty001 * nsk.jdi.EventRequest.getProperty.getproperty001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.getProperty.getproperty001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/hashCode/hashcode001/TestDescription.java index a2573dcd52e..bff91b9f22e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/hashCode/hashcode001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.EventRequest.hashCode.hashcode001 * nsk.jdi.EventRequest.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/isEnabled/isenabled001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/isEnabled/isenabled001/TestDescription.java index 7829c37e432..71e74359be1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/isEnabled/isenabled001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/isEnabled/isenabled001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.EventRequest.isEnabled.isenabled001 * nsk.jdi.EventRequest.isEnabled.isenabled001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.isEnabled.isenabled001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/putProperty/putproperty001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/putProperty/putproperty001/TestDescription.java index 60943fff8ca..1ae244b1f55 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/putProperty/putproperty001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/putProperty/putproperty001/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.EventRequest.putProperty.putproperty001 * nsk.jdi.EventRequest.putProperty.putproperty001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.putProperty.putproperty001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setEnabled/setenabled001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setEnabled/setenabled001/TestDescription.java index 5e888846f57..30b4d0b9a66 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setEnabled/setenabled001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setEnabled/setenabled001/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.EventRequest.setEnabled.setenabled001 * nsk.jdi.EventRequest.setEnabled.setenabled001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.setEnabled.setenabled001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setEnabled/setenabled002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setEnabled/setenabled002/TestDescription.java index d6e0822b303..4020bb1b3e8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setEnabled/setenabled002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setEnabled/setenabled002/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.EventRequest.setEnabled.setenabled002 * nsk.jdi.EventRequest.setEnabled.setenabled002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.setEnabled.setenabled002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setEnabled/setenabled003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setEnabled/setenabled003/TestDescription.java index fffc93c3b7e..5268d6416b6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setEnabled/setenabled003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setEnabled/setenabled003/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.EventRequest.setEnabled.setenabled003 * nsk.jdi.EventRequest.setEnabled.setenabled003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.setEnabled.setenabled003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setSuspendPolicy/setsuspendpolicy001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setSuspendPolicy/setsuspendpolicy001/TestDescription.java index 21bc8f0739b..53ce8671397 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setSuspendPolicy/setsuspendpolicy001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/setSuspendPolicy/setsuspendpolicy001/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.EventRequest.setSuspendPolicy.setsuspendpolicy001 * nsk.jdi.EventRequest.setSuspendPolicy.setsuspendpolicy001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.setSuspendPolicy.setsuspendpolicy001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/suspendPolicy/suspendpolicy001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/suspendPolicy/suspendpolicy001/TestDescription.java index 1631de0768e..290859d22f1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/suspendPolicy/suspendpolicy001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequest/suspendPolicy/suspendpolicy001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.EventRequest.suspendPolicy.suspendpolicy001 * nsk.jdi.EventRequest.suspendPolicy.suspendpolicy001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequest.suspendPolicy.suspendpolicy001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/_bounds_/requests001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/_bounds_/requests001/TestDescription.java index 487075711ca..c8153cff6f8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/_bounds_/requests001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/_bounds_/requests001/TestDescription.java @@ -55,13 +55,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager._bounds_.requests001 * nsk.jdi.EventRequestManager._bounds_.requests001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager._bounds_.requests001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/accessWatchpointRequests/accwtchpreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/accessWatchpointRequests/accwtchpreq001/TestDescription.java index a4909d1f024..f17a9f8b239 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/accessWatchpointRequests/accwtchpreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/accessWatchpointRequests/accwtchpreq001/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.accessWatchpointRequests.accwtchpreq001 * nsk.jdi.EventRequestManager.accessWatchpointRequests.accwtchpreq001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.accessWatchpointRequests.accwtchpreq001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/accessWatchpointRequests/accwtchpreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/accessWatchpointRequests/accwtchpreq002/TestDescription.java index d89c63de995..b60fb0dc65c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/accessWatchpointRequests/accwtchpreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/accessWatchpointRequests/accwtchpreq002/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.accessWatchpointRequests.accwtchpreq002 * nsk.jdi.EventRequestManager.accessWatchpointRequests.accwtchpreq002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.accessWatchpointRequests.accwtchpreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/breakpointRequests/breakpreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/breakpointRequests/breakpreq001/TestDescription.java index 7cd5eb17de3..4ff6212bd04 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/breakpointRequests/breakpreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/breakpointRequests/breakpreq001/TestDescription.java @@ -51,13 +51,13 @@ * @clean nsk.jdi.EventRequestManager.breakpointRequests.breakpreq001t * @compile -g:lines,source,vars ../breakpreq001t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.breakpointRequests.breakpreq001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/breakpointRequests/breakpreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/breakpointRequests/breakpreq002/TestDescription.java index c6a41d1a9d7..4e681c7c83d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/breakpointRequests/breakpreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/breakpointRequests/breakpreq002/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.breakpointRequests.breakpreq002 * nsk.jdi.EventRequestManager.breakpointRequests.breakpreq002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.breakpointRequests.breakpreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classPrepareRequests/clsprepreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classPrepareRequests/clsprepreq001/TestDescription.java index b0949a76a77..7029a18c786 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classPrepareRequests/clsprepreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classPrepareRequests/clsprepreq001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.classPrepareRequests.clsprepreq001 * nsk.jdi.EventRequestManager.classPrepareRequests.clsprepreq001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.classPrepareRequests.clsprepreq001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classPrepareRequests/clsprepreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classPrepareRequests/clsprepreq002/TestDescription.java index 94f197c7bec..464edb2d5b4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classPrepareRequests/clsprepreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classPrepareRequests/clsprepreq002/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.classPrepareRequests.clsprepreq002 * nsk.jdi.EventRequestManager.classPrepareRequests.clsprepreq002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.classPrepareRequests.clsprepreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classUnloadRequests/clsunlreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classUnloadRequests/clsunlreq001/TestDescription.java index 98f09a82b4b..61a77ad0a26 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classUnloadRequests/clsunlreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classUnloadRequests/clsunlreq001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.classUnloadRequests.clsunlreq001 * nsk.jdi.EventRequestManager.classUnloadRequests.clsunlreq001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.classUnloadRequests.clsunlreq001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classUnloadRequests/clsunlreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classUnloadRequests/clsunlreq002/TestDescription.java index 9370914be6d..7a32f6dab0a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classUnloadRequests/clsunlreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classUnloadRequests/clsunlreq002/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.classUnloadRequests.clsunlreq002 * nsk.jdi.EventRequestManager.classUnloadRequests.clsunlreq002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.classUnloadRequests.clsunlreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createAccessWatchpointRequest/craccwtchpreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createAccessWatchpointRequest/craccwtchpreq002/TestDescription.java index ebe80d79458..e3f9b512a42 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createAccessWatchpointRequest/craccwtchpreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createAccessWatchpointRequest/craccwtchpreq002/TestDescription.java @@ -42,13 +42,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createAccessWatchpointRequest.craccwtchpreq002 * nsk.jdi.EventRequestManager.createAccessWatchpointRequest.craccwtchpreq002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createAccessWatchpointRequest.craccwtchpreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createAccessWatchpointRequest/craccwtchpreq003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createAccessWatchpointRequest/craccwtchpreq003/TestDescription.java index f85be6b1d78..cb305738617 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createAccessWatchpointRequest/craccwtchpreq003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createAccessWatchpointRequest/craccwtchpreq003/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createAccessWatchpointRequest.craccwtchpreq003 * nsk.jdi.EventRequestManager.createAccessWatchpointRequest.craccwtchpreq003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createAccessWatchpointRequest.craccwtchpreq003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createBreakpointRequest/crbreakpreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createBreakpointRequest/crbreakpreq002/TestDescription.java index 7cc3a69c95f..2435b95ecc5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createBreakpointRequest/crbreakpreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createBreakpointRequest/crbreakpreq002/TestDescription.java @@ -37,13 +37,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createBreakpointRequest.crbreakpreq002 * nsk.jdi.EventRequestManager.createBreakpointRequest.crbreakpreq002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createBreakpointRequest.crbreakpreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createBreakpointRequest/crbreakpreq003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createBreakpointRequest/crbreakpreq003/TestDescription.java index db94516b11b..f24d6c062f8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createBreakpointRequest/crbreakpreq003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createBreakpointRequest/crbreakpreq003/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createBreakpointRequest.crbreakpreq003 * nsk.jdi.EventRequestManager.createBreakpointRequest.crbreakpreq003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createBreakpointRequest.crbreakpreq003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createClassPrepareRequest/cpreg001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createClassPrepareRequest/cpreg001/TestDescription.java index e087b6a8c7c..048fae3438e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createClassPrepareRequest/cpreg001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createClassPrepareRequest/cpreg001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createClassPrepareRequest.cpreg001 * nsk.jdi.EventRequestManager.createClassPrepareRequest.cpreg001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createClassPrepareRequest.cpreg001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createClassUnloadRequest/cureg001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createClassUnloadRequest/cureg001/TestDescription.java index 9eacfeb0204..41dea82642b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createClassUnloadRequest/cureg001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createClassUnloadRequest/cureg001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createClassUnloadRequest.cureg001 * nsk.jdi.EventRequestManager.createClassUnloadRequest.cureg001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createClassUnloadRequest.cureg001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createExceptionRequest/crexreq009/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createExceptionRequest/crexreq009/TestDescription.java index 72746147ade..2471a469d89 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createExceptionRequest/crexreq009/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createExceptionRequest/crexreq009/TestDescription.java @@ -75,13 +75,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createExceptionRequest.crexreq009 * nsk.jdi.EventRequestManager.createExceptionRequest.crexreq009a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createExceptionRequest.crexreq009 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createExceptionRequest/crexreq010/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createExceptionRequest/crexreq010/TestDescription.java index 3cc318625c5..d8d519c2ea0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createExceptionRequest/crexreq010/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createExceptionRequest/crexreq010/TestDescription.java @@ -81,13 +81,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createExceptionRequest.crexreq010 * nsk.jdi.EventRequestManager.createExceptionRequest.crexreq010a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createExceptionRequest.crexreq010 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createMethodEntryRequest/menreg001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createMethodEntryRequest/menreg001/TestDescription.java index 49d2bfbc13c..05e44f932fd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createMethodEntryRequest/menreg001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createMethodEntryRequest/menreg001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createMethodEntryRequest.menreg001 * nsk.jdi.EventRequestManager.createMethodEntryRequest.menreg001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createMethodEntryRequest.menreg001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createMethodExitRequest/mexreg001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createMethodExitRequest/mexreg001/TestDescription.java index b281ca85bc7..212cb1e2428 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createMethodExitRequest/mexreg001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createMethodExitRequest/mexreg001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createMethodExitRequest.mexreg001 * nsk.jdi.EventRequestManager.createMethodExitRequest.mexreg001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createMethodExitRequest.mexreg001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createModificationWatchpointRequest/crmodwtchpreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createModificationWatchpointRequest/crmodwtchpreq002/TestDescription.java index 389f51cb636..fc1436736c5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createModificationWatchpointRequest/crmodwtchpreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createModificationWatchpointRequest/crmodwtchpreq002/TestDescription.java @@ -42,13 +42,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createModificationWatchpointRequest.crmodwtchpreq002 * nsk.jdi.EventRequestManager.createModificationWatchpointRequest.crmodwtchpreq002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createModificationWatchpointRequest.crmodwtchpreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createModificationWatchpointRequest/crmodwtchpreq003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createModificationWatchpointRequest/crmodwtchpreq003/TestDescription.java index d515ff634c1..f9cc8850786 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createModificationWatchpointRequest/crmodwtchpreq003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createModificationWatchpointRequest/crmodwtchpreq003/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createModificationWatchpointRequest.crmodwtchpreq003 * nsk.jdi.EventRequestManager.createModificationWatchpointRequest.crmodwtchpreq003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createModificationWatchpointRequest.crmodwtchpreq003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq001/TestDescription.java index 0fb749e0618..bcb31165ad8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq001/TestDescription.java @@ -40,13 +40,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createStepRequest.crstepreq001 * nsk.jdi.EventRequestManager.createStepRequest.crstepreq001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createStepRequest.crstepreq001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq002/TestDescription.java index 7f97cf35402..bfc03683173 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq002/TestDescription.java @@ -79,13 +79,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createStepRequest.crstepreq002 * nsk.jdi.EventRequestManager.createStepRequest.crstepreq002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createStepRequest.crstepreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq003/TestDescription.java index 40011e87ea2..37e8b7548cf 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq003/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createStepRequest.crstepreq003 * nsk.jdi.EventRequestManager.createStepRequest.crstepreq003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createStepRequest.crstepreq003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq004/TestDescription.java index abcbf060ad8..990457cf020 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq004/TestDescription.java @@ -74,13 +74,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createStepRequest.crstepreq004 * nsk.jdi.EventRequestManager.createStepRequest.crstepreq004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createStepRequest.crstepreq004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq005/TestDescription.java index 36b5e6e2103..44245b5aa01 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq005/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createStepRequest.crstepreq005 * nsk.jdi.EventRequestManager.createStepRequest.crstepreq005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createStepRequest.crstepreq005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq006/TestDescription.java index 2189bbd623a..0529aa4daa3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq006/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createStepRequest.crstepreq006 * nsk.jdi.EventRequestManager.createStepRequest.crstepreq006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createStepRequest.crstepreq006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq007/TestDescription.java index d0f21451156..a0bb36637fd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq007/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createStepRequest.crstepreq007 * nsk.jdi.EventRequestManager.createStepRequest.crstepreq007a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createStepRequest.crstepreq007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq008/TestDescription.java index 25d4a733442..b9062cc3af2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq008/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createStepRequest.crstepreq008 * nsk.jdi.EventRequestManager.createStepRequest.crstepreq008a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createStepRequest.crstepreq008 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq009/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq009/TestDescription.java index 43f69277f35..3d93f02ac21 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq009/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq009/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createStepRequest.crstepreq009 * nsk.jdi.EventRequestManager.createStepRequest.crstepreq009a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createStepRequest.crstepreq009 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq010/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq010/TestDescription.java index e5dd8da7e4d..9e449d71310 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq010/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createStepRequest/crstepreq010/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createStepRequest.crstepreq010 * nsk.jdi.EventRequestManager.createStepRequest.crstepreq010a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createStepRequest.crstepreq010 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createThreadDeathRequest/tdreg001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createThreadDeathRequest/tdreg001/TestDescription.java index aeecd153652..81d763c4a4b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createThreadDeathRequest/tdreg001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createThreadDeathRequest/tdreg001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createThreadDeathRequest.tdreg001 * nsk.jdi.EventRequestManager.createThreadDeathRequest.tdreg001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createThreadDeathRequest.tdreg001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createThreadStartRequest/tsreg001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createThreadStartRequest/tsreg001/TestDescription.java index 26c8c8bfa91..6b9693ea7bd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createThreadStartRequest/tsreg001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createThreadStartRequest/tsreg001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createThreadStartRequest.tsreg001 * nsk.jdi.EventRequestManager.createThreadStartRequest.tsreg001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createThreadStartRequest.tsreg001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createVMDeathRequest/vmdreg001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createVMDeathRequest/vmdreg001/TestDescription.java index 3ecd31f07b5..2626d595648 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createVMDeathRequest/vmdreg001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/createVMDeathRequest/vmdreg001/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.createVMDeathRequest.vmdreg001 * nsk.jdi.EventRequestManager.createVMDeathRequest.vmdreg001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.createVMDeathRequest.vmdreg001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteAllBreakpoints/delallbreakp002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteAllBreakpoints/delallbreakp002/TestDescription.java index 857916f5872..8cea59cccfb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteAllBreakpoints/delallbreakp002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteAllBreakpoints/delallbreakp002/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.deleteAllBreakpoints.delallbreakp002 * nsk.jdi.EventRequestManager.deleteAllBreakpoints.delallbreakp002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.deleteAllBreakpoints.delallbreakp002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteEventRequest/delevtreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteEventRequest/delevtreq002/TestDescription.java index 3e09b51eaf1..3df9bc5d5b5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteEventRequest/delevtreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteEventRequest/delevtreq002/TestDescription.java @@ -76,13 +76,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.deleteEventRequest.delevtreq002 * nsk.jdi.EventRequestManager.deleteEventRequest.delevtreq002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.deleteEventRequest.delevtreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteEventRequest/delevtreq003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteEventRequest/delevtreq003/TestDescription.java index 070103a0c80..6c7223b4749 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteEventRequest/delevtreq003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteEventRequest/delevtreq003/TestDescription.java @@ -55,7 +55,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.deleteEventRequest.delevtreq003 * ./bin * -verbose @@ -63,6 +63,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteEventRequests/delevtreqs002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteEventRequests/delevtreqs002/TestDescription.java index f2447a3041d..ed5e199ed27 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteEventRequests/delevtreqs002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/deleteEventRequests/delevtreqs002/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.deleteEventRequests.delevtreqs002 * nsk.jdi.EventRequestManager.deleteEventRequests.delevtreqs002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.deleteEventRequests.delevtreqs002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/exceptionRequests/excreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/exceptionRequests/excreq001/TestDescription.java index a6dbcb5ab4d..247b78e15ab 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/exceptionRequests/excreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/exceptionRequests/excreq001/TestDescription.java @@ -56,13 +56,13 @@ * @clean nsk.jdi.EventRequestManager.exceptionRequests.excreq001a * @compile -g:lines,source,vars ../excreq001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.exceptionRequests.excreq001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/exceptionRequests/excreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/exceptionRequests/excreq002/TestDescription.java index 3814800c182..a595029856e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/exceptionRequests/excreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/exceptionRequests/excreq002/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.exceptionRequests.excreq002 * nsk.jdi.EventRequestManager.exceptionRequests.excreq002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.exceptionRequests.excreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/hashCode/hashcode001/TestDescription.java index abecdee043e..a8bd77cfecc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/hashCode/hashcode001/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.hashCode.hashcode001 * nsk.jdi.EventRequestManager.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodEntryRequests/methentreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodEntryRequests/methentreq001/TestDescription.java index 8d5728553aa..cb92ed958b4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodEntryRequests/methentreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodEntryRequests/methentreq001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.methodEntryRequests.methentreq001 * nsk.jdi.EventRequestManager.methodEntryRequests.methentreq001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.methodEntryRequests.methentreq001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodEntryRequests/methentreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodEntryRequests/methentreq002/TestDescription.java index beccce9ecd2..c8168655a6b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodEntryRequests/methentreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodEntryRequests/methentreq002/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.methodEntryRequests.methentreq002 * nsk.jdi.EventRequestManager.methodEntryRequests.methentreq002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.methodEntryRequests.methentreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodExitRequests/methexitreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodExitRequests/methexitreq001/TestDescription.java index 0622076e399..0fdd10c6941 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodExitRequests/methexitreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodExitRequests/methexitreq001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.methodExitRequests.methexitreq001 * nsk.jdi.EventRequestManager.methodExitRequests.methexitreq001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.methodExitRequests.methexitreq001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodExitRequests/methexitreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodExitRequests/methexitreq002/TestDescription.java index 503681e0cc9..19b62942eae 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodExitRequests/methexitreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodExitRequests/methexitreq002/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.methodExitRequests.methexitreq002 * nsk.jdi.EventRequestManager.methodExitRequests.methexitreq002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.methodExitRequests.methexitreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/modificationWatchpointRequests/modwtchpreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/modificationWatchpointRequests/modwtchpreq001/TestDescription.java index 6dc172f54c1..bd4b6898ee8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/modificationWatchpointRequests/modwtchpreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/modificationWatchpointRequests/modwtchpreq001/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.modificationWatchpointRequests.modwtchpreq001 * nsk.jdi.EventRequestManager.modificationWatchpointRequests.modwtchpreq001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.modificationWatchpointRequests.modwtchpreq001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/modificationWatchpointRequests/modwtchpreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/modificationWatchpointRequests/modwtchpreq002/TestDescription.java index a04e47913df..09979b81650 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/modificationWatchpointRequests/modwtchpreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/modificationWatchpointRequests/modwtchpreq002/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.modificationWatchpointRequests.modwtchpreq002 * nsk.jdi.EventRequestManager.modificationWatchpointRequests.modwtchpreq002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.modificationWatchpointRequests.modwtchpreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/stepRequests/stepreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/stepRequests/stepreq001/TestDescription.java index 4ba585fa759..2cd10995acc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/stepRequests/stepreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/stepRequests/stepreq001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.stepRequests.stepreq001 * nsk.jdi.EventRequestManager.stepRequests.stepreq001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.stepRequests.stepreq001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/stepRequests/stepreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/stepRequests/stepreq002/TestDescription.java index ffd6c664198..e50107c1398 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/stepRequests/stepreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/stepRequests/stepreq002/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.stepRequests.stepreq002 * nsk.jdi.EventRequestManager.stepRequests.stepreq002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.stepRequests.stepreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadDeathRequests/thrdeathreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadDeathRequests/thrdeathreq001/TestDescription.java index f56ad63fdb2..7fb6d32608b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadDeathRequests/thrdeathreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadDeathRequests/thrdeathreq001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.threadDeathRequests.thrdeathreq001 * nsk.jdi.EventRequestManager.threadDeathRequests.thrdeathreq001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.threadDeathRequests.thrdeathreq001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadDeathRequests/thrdeathreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadDeathRequests/thrdeathreq002/TestDescription.java index f21a19a38d4..537ba135f33 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadDeathRequests/thrdeathreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadDeathRequests/thrdeathreq002/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.threadDeathRequests.thrdeathreq002 * nsk.jdi.EventRequestManager.threadDeathRequests.thrdeathreq002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.threadDeathRequests.thrdeathreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadStartRequests/thrstartreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadStartRequests/thrstartreq001/TestDescription.java index 1dc3aa9c92d..b636602e0fe 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadStartRequests/thrstartreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadStartRequests/thrstartreq001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.threadStartRequests.thrstartreq001 * nsk.jdi.EventRequestManager.threadStartRequests.thrstartreq001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.threadStartRequests.thrstartreq001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadStartRequests/thrstartreq002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadStartRequests/thrstartreq002/TestDescription.java index d080a3f5b75..3ec25265d62 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadStartRequests/thrstartreq002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadStartRequests/thrstartreq002/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.threadStartRequests.thrstartreq002 * nsk.jdi.EventRequestManager.threadStartRequests.thrstartreq002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.threadStartRequests.thrstartreq002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/vmDeathRequests/vmdeathreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/vmDeathRequests/vmdeathreq001/TestDescription.java index 1a0400900ef..fb044b3f06b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/vmDeathRequests/vmdeathreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/vmDeathRequests/vmdeathreq001/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.EventRequestManager.vmDeathRequests.vmdeathreq001 * nsk.jdi.EventRequestManager.vmDeathRequests.vmdeathreq001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventRequestManager.vmDeathRequests.vmdeathreq001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator001/TestDescription.java index aecf5328850..b56cb3a066d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.EventSet.eventIterator.eventiterator001 * nsk.jdi.EventSet.eventIterator.eventiterator001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.eventIterator.eventiterator001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator002/TestDescription.java index c3365296fd1..0a32592f34d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator002/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.EventSet.eventIterator.eventiterator002 * nsk.jdi.EventSet.eventIterator.eventiterator002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.eventIterator.eventiterator002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator003/TestDescription.java index 1dc3f422306..a03c62e5607 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator003/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.EventSet.eventIterator.eventiterator003 * nsk.jdi.EventSet.eventIterator.eventiterator003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.eventIterator.eventiterator003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator004/TestDescription.java index 50813b7ac32..5d7e9950c72 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/eventIterator/eventiterator004/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventSet.eventIterator.eventiterator004 * nsk.jdi.EventSet.eventIterator.eventiterator004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.eventIterator.eventiterator004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume001/TestDescription.java index ca28ae09ecb..cd2acbfbae4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.EventSet.resume.resume001 * nsk.jdi.EventSet.resume.resume001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.resume.resume001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume002/TestDescription.java index dbd15586590..a9de17022eb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume002/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventSet.resume.resume002 * nsk.jdi.EventSet.resume.resume002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.resume.resume002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume003/TestDescription.java index af0dfdbaa4a..e67be3c2773 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume003/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventSet.resume.resume003 * nsk.jdi.EventSet.resume.resume003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.resume.resume003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume004/TestDescription.java index 690c54488c2..e6aa801341a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume004/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventSet.resume.resume004 * nsk.jdi.EventSet.resume.resume004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.resume.resume004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume005/TestDescription.java index 7724f79cb82..27ceb0eadb2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume005/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.EventSet.resume.resume005 * nsk.jdi.EventSet.resume.resume005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.resume.resume005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume006/TestDescription.java index 3eaa9240063..2bb6bbad9aa 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume006/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventSet.resume.resume006 * nsk.jdi.EventSet.resume.resume006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.resume.resume006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume007/TestDescription.java index 58e25e9f459..4c705eba419 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume007/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventSet.resume.resume007 * nsk.jdi.EventSet.resume.resume007a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.resume.resume007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume008/TestDescription.java index 5fb2ea31514..84fcb82cbbe 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume008/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.EventSet.resume.resume008 * nsk.jdi.EventSet.resume.resume008a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.resume.resume008 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume009/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume009/TestDescription.java index 469833722e2..978b5c99e00 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume009/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume009/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.EventSet.resume.resume009 * nsk.jdi.EventSet.resume.resume009a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.resume.resume009 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume010/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume010/TestDescription.java index 5abbddb0c92..570f48b4997 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume010/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume010/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.EventSet.resume.resume010 * nsk.jdi.EventSet.resume.resume010a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.resume.resume010 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume011/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume011/TestDescription.java index b8bd10eee66..b864c496b48 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume011/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume011/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.EventSet.resume.resume011 * nsk.jdi.EventSet.resume.resume011a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.resume.resume011 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume012/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume012/TestDescription.java index f3ad91b041b..74546d7885b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume012/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume012/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.EventSet.resume.resume012 * nsk.jdi.EventSet.resume.resume012a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.resume.resume012 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume013/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume013/TestDescription.java index b161b806764..d1a02350b88 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume013/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/resume/resume013/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.EventSet.resume.resume013 * nsk.jdi.EventSet.resume.resume013a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.resume.resume013 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy001/TestDescription.java index 9cec826cb7d..3da281f363d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy001/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy001 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy002/TestDescription.java index d4e75daa464..33ec89398d2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy002/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy002 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy003/TestDescription.java index 1b9b0e8a539..0ecb087d5da 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy003/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy003 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy004/TestDescription.java index a0d588983bc..25e168c2670 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy004/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy004 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy005/TestDescription.java index 0386dbe15ab..3a823d43c88 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy005/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy005 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy006/TestDescription.java index 613aa2e3d92..8931ffcefe3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy006/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy006 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy007/TestDescription.java index 2823ad788d5..43c2f9a4d45 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy007/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy007 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy007a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy008/TestDescription.java index 477edff8b54..0a3f4fc5893 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy008/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy008 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy008a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy008 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy009/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy009/TestDescription.java index 48178ba138e..3f9802866fd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy009/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy009/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy009 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy009a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy009 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy010/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy010/TestDescription.java index 1029463fedc..be44b97f4d2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy010/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy010/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy010 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy010a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy010 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy011/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy011/TestDescription.java index 8aeacbc2ae5..4cc960c2050 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy011/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy011/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy011 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy011a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy011 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy012/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy012/TestDescription.java index de368fc051a..6e12c6370af 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy012/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy012/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy012 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy012a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy012 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy013/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy013/TestDescription.java index 55fcbf2b5b3..f71ad444a22 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy013/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy013/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy013 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy013a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy013 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy014/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy014/TestDescription.java index fbcac4a1ca4..69e60253836 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy014/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy014/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy014 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy014a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy014 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy015/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy015/TestDescription.java index d7f2cf69c9d..1ff1967c2ea 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy015/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy015/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy015 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy015a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy015 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy016/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy016/TestDescription.java index dbbc2256d76..cd37c890b3f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy016/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy016/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy016 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy016a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy016 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy017/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy017/TestDescription.java index 61cc0cb5494..c03d145d299 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy017/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy017/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy017 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy017a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy017 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy018/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy018/TestDescription.java index 340d8c95f8c..01e0ee83a12 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy018/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy018/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.EventSet.suspendPolicy.suspendpolicy018 * nsk.jdi.EventSet.suspendPolicy.suspendpolicy018a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.suspendPolicy.suspendpolicy018 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/toString/tostring001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/toString/tostring001/TestDescription.java index 5ad20ffd1c1..9a6f154c8e1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/toString/tostring001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/toString/tostring001/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.EventSet.toString.tostring001 * nsk.jdi.EventSet.toString.tostring001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.toString.tostring001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/virtualMachine/virtualmachine001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/virtualMachine/virtualmachine001/TestDescription.java index c18fd98183d..9827fff1c3d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/virtualMachine/virtualmachine001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventSet/virtualMachine/virtualmachine001/TestDescription.java @@ -54,13 +54,13 @@ * /test/lib * @build nsk.jdi.EventSet.virtualMachine.virtualmachine001 * nsk.jdi.EventSet.virtualMachine.virtualmachine001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.EventSet.virtualMachine.virtualmachine001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent001/TestDescription.java index a228abcd5ec..b9454a4137b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent001/TestDescription.java @@ -55,13 +55,13 @@ * /test/lib * @build nsk.jdi.ExceptionEvent._itself_.exevent001 * nsk.jdi.ExceptionEvent._itself_.exevent001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionEvent._itself_.exevent001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent002/TestDescription.java index 0f0153888aa..13935fa95ac 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent002/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.ExceptionEvent._itself_.exevent002 * nsk.jdi.ExceptionEvent._itself_.exevent002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionEvent._itself_.exevent002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent003/TestDescription.java index dda30d72225..873d6fe70f0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent003/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.ExceptionEvent._itself_.exevent003 * nsk.jdi.ExceptionEvent._itself_.exevent003t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionEvent._itself_.exevent003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent004/TestDescription.java index d08303b3bbf..a265347801e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent004/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.ExceptionEvent._itself_.exevent004 * nsk.jdi.ExceptionEvent._itself_.exevent004t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionEvent._itself_.exevent004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent005/TestDescription.java index 89e8fd449a8..b9636792629 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent005/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.ExceptionEvent._itself_.exevent005 * nsk.jdi.ExceptionEvent._itself_.exevent005t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionEvent._itself_.exevent005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent006/TestDescription.java index f0813ec9134..75607e3bab2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent006/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.ExceptionEvent._itself_.exevent006 * nsk.jdi.ExceptionEvent._itself_.exevent006t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionEvent._itself_.exevent006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent007/TestDescription.java index c6341688f22..35db29c6983 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent007/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.ExceptionEvent._itself_.exevent007 * nsk.jdi.ExceptionEvent._itself_.exevent007t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionEvent._itself_.exevent007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent008/TestDescription.java index 6c728936d7e..c3291b2845f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/_itself_/exevent008/TestDescription.java @@ -55,13 +55,13 @@ * /test/lib * @build nsk.jdi.ExceptionEvent._itself_.exevent008 * nsk.jdi.ExceptionEvent._itself_.exevent008t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionEvent._itself_.exevent008 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/catchLocation/location001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/catchLocation/location001/TestDescription.java index 5d6adb4637f..90e00e491eb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/catchLocation/location001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/catchLocation/location001/TestDescription.java @@ -73,13 +73,13 @@ * /test/lib * @build nsk.jdi.ExceptionEvent.catchLocation.location001 * nsk.jdi.ExceptionEvent.catchLocation.location001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionEvent.catchLocation.location001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/catchLocation/location002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/catchLocation/location002/TestDescription.java index 5a956a53f7d..1fe8faad335 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/catchLocation/location002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/catchLocation/location002/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.ExceptionEvent.catchLocation.location002 * nsk.jdi.ExceptionEvent.catchLocation.location002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionEvent.catchLocation.location002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/exception/exception001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/exception/exception001/TestDescription.java index 4bfcf7db2d7..609db99ca33 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/exception/exception001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionEvent/exception/exception001/TestDescription.java @@ -78,13 +78,13 @@ * /test/lib * @build nsk.jdi.ExceptionEvent.exception.exception001 * nsk.jdi.ExceptionEvent.exception.exception001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionEvent.exception.exception001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/_bounds_/filters001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/_bounds_/filters001/TestDescription.java index 6b2a9066697..cc69397c1aa 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/_bounds_/filters001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/_bounds_/filters001/TestDescription.java @@ -46,13 +46,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest._bounds_.filters001 * nsk.jdi.ExceptionRequest._bounds_.filters001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest._bounds_.filters001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassExclusionFilter/filter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassExclusionFilter/filter001/TestDescription.java index 7c49b548893..4366417aaf7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassExclusionFilter/filter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassExclusionFilter/filter001/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addClassExclusionFilter.filter001 * nsk.jdi.ExceptionRequest.addClassExclusionFilter.filter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addClassExclusionFilter.filter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassExclusionFilter/filter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassExclusionFilter/filter002/TestDescription.java index 90e1837d422..d42b51c867a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassExclusionFilter/filter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassExclusionFilter/filter002/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addClassExclusionFilter.filter002 * nsk.jdi.ExceptionRequest.addClassExclusionFilter.filter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addClassExclusionFilter.filter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_rt/filter_rt001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_rt/filter_rt001/TestDescription.java index 590a38c506e..73d1508d4c0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_rt/filter_rt001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_rt/filter_rt001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addClassFilter_rt.filter_rt001 * nsk.jdi.ExceptionRequest.addClassFilter_rt.filter_rt001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addClassFilter_rt.filter_rt001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_rt/filter_rt002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_rt/filter_rt002/TestDescription.java index d0213c7ba27..fce0732e9d6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_rt/filter_rt002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_rt/filter_rt002/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addClassFilter_rt.filter_rt002 * nsk.jdi.ExceptionRequest.addClassFilter_rt.filter_rt002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addClassFilter_rt.filter_rt002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_rt/filter_rt003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_rt/filter_rt003/TestDescription.java index 9ff1f09825e..1238df96263 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_rt/filter_rt003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_rt/filter_rt003/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addClassFilter_rt.filter_rt003 * nsk.jdi.ExceptionRequest.addClassFilter_rt.filter_rt003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addClassFilter_rt.filter_rt003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_s/filter_s001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_s/filter_s001/TestDescription.java index 104a1425ddf..771bce79a5d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_s/filter_s001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_s/filter_s001/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addClassFilter_s.filter_s001 * nsk.jdi.ExceptionRequest.addClassFilter_s.filter_s001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addClassFilter_s.filter_s001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_s/filter_s002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_s/filter_s002/TestDescription.java index d09d9ad2fa5..0cbf6b9422d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_s/filter_s002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addClassFilter_s/filter_s002/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addClassFilter_s.filter_s002 * nsk.jdi.ExceptionRequest.addClassFilter_s.filter_s002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addClassFilter_s.filter_s002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter001/TestDescription.java index 104c8a00253..8a65c925c80 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter001/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001 * nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter002/TestDescription.java index 1bc59f30039..bf2066aeed6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter002/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter002 * nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter003/TestDescription.java index be1e172c208..c91de7d4f2b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter003/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter003 * nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter004/TestDescription.java index 99bf4c05c93..0d6b530090a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addInstanceFilter/instancefilter004/TestDescription.java @@ -79,13 +79,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter004 * nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addInstanceFilter.instancefilter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter001/TestDescription.java index 51303c816ba..e45dc21e5ec 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addThreadFilter.threadfilter001 * nsk.jdi.ExceptionRequest.addThreadFilter.threadfilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addThreadFilter.threadfilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter002/TestDescription.java index 4ac56734b51..61fc72a03a4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter002/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addThreadFilter.threadfilter002 * nsk.jdi.ExceptionRequest.addThreadFilter.threadfilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addThreadFilter.threadfilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter003/TestDescription.java index e92934a874b..828b85ba743 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter003/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addThreadFilter.threadfilter003 * nsk.jdi.ExceptionRequest.addThreadFilter.threadfilter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addThreadFilter.threadfilter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter004/TestDescription.java index 0a5ce56a2f8..25212585149 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/addThreadFilter/threadfilter004/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.addThreadFilter.threadfilter004 * nsk.jdi.ExceptionRequest.addThreadFilter.threadfilter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.addThreadFilter.threadfilter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/exception/exception001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/exception/exception001/TestDescription.java index 93f6cd0ae85..408ed47c7b8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/exception/exception001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/exception/exception001/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.exception.exception001 * nsk.jdi.ExceptionRequest.exception.exception001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.exception.exception001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/notifyCaught/notifycaught001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/notifyCaught/notifycaught001/TestDescription.java index 7e9148932b7..f4d9177bd96 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/notifyCaught/notifycaught001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/notifyCaught/notifycaught001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.notifyCaught.notifycaught001 * nsk.jdi.ExceptionRequest.notifyCaught.notifycaught001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.notifyCaught.notifycaught001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/notifyUncaught/notifyuncaught001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/notifyUncaught/notifyuncaught001/TestDescription.java index 4dc123f0048..647e962c2f9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/notifyUncaught/notifyuncaught001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ExceptionRequest/notifyUncaught/notifyuncaught001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ExceptionRequest.notifyUncaught.notifyuncaught001 * nsk.jdi.ExceptionRequest.notifyUncaught.notifyuncaught001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ExceptionRequest.notifyUncaught.notifyuncaught001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals001/TestDescription.java index 4931394bc62..f1197a55133 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals001/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.Field.equals.equals001 * nsk.jdi.Field.equals.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals002/TestDescription.java index 4496012052b..19ac3848dbf 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals002/TestDescription.java @@ -41,13 +41,13 @@ * /test/lib * @build nsk.jdi.Field.equals.equals002 * nsk.jdi.Field.equals.equals002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.equals.equals002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals003/TestDescription.java index 60c0757ae2b..468bf8feaf9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals003/TestDescription.java @@ -50,13 +50,13 @@ * /test/lib * @build nsk.jdi.Field.equals.equals003 * nsk.jdi.Field.equals.equals003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.equals.equals003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals005/TestDescription.java index 83c602686df..c0a1142c3f1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/equals/equals005/TestDescription.java @@ -41,13 +41,13 @@ * /test/lib * @build nsk.jdi.Field.equals.equals005 * nsk.jdi.Field.equals.equals005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.equals.equals005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/hashCode/hashcode001/TestDescription.java index 977618460f7..ee491993234 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/hashCode/hashcode001/TestDescription.java @@ -42,13 +42,13 @@ * /test/lib * @build nsk.jdi.Field.hashCode.hashcode001 * nsk.jdi.Field.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/isEnumConstant/isenumconstant001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/isEnumConstant/isenumconstant001/TestDescription.java index 099b068624e..35216a88617 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/isEnumConstant/isenumconstant001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/isEnumConstant/isenumconstant001/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.Field.isEnumConstant.isenumconstant001 * nsk.jdi.Field.isEnumConstant.isenumconstant001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.isEnumConstant.isenumconstant001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/isTransient/istrans001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/isTransient/istrans001/TestDescription.java index a1cd4eff94e..6cff7052d34 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/isTransient/istrans001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/isTransient/istrans001/TestDescription.java @@ -41,13 +41,13 @@ * /test/lib * @build nsk.jdi.Field.isTransient.istrans001 * nsk.jdi.Field.isTransient.istrans001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.isTransient.istrans001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/isVolatile/isvol001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/isVolatile/isvol001/TestDescription.java index 0c4c2b66d64..c17515bef21 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/isVolatile/isvol001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/isVolatile/isvol001/TestDescription.java @@ -41,13 +41,13 @@ * /test/lib * @build nsk.jdi.Field.isVolatile.isvol001 * nsk.jdi.Field.isVolatile.isvol001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.isVolatile.isvol001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type001/TestDescription.java index 143e68ed56b..2319fe3ca80 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type001/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.Field.type.type001 * nsk.jdi.Field.type.type001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.type.type001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type002/TestDescription.java index 017bdb43760..1174ad03424 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type002/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.Field.type.type002 * nsk.jdi.Field.type.type002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.type.type002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type003/TestDescription.java index 459d44e8328..382dcc1fb92 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type003/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.Field.type.type003 * nsk.jdi.Field.type.type003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.type.type003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type004/TestDescription.java index a02f46ac0e9..9820fa54721 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/type/type004/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.Field.type.type004 * nsk.jdi.Field.type.type004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.type.type004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/typeName/typename001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/typeName/typename001/TestDescription.java index e34643df9be..e3f76260421 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/typeName/typename001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/typeName/typename001/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.Field.typeName.typename001 * nsk.jdi.Field.typeName.typename001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.typeName.typename001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/typeName/typename002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/typeName/typename002/TestDescription.java index 228b77c7422..3e9d7b55e3c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/typeName/typename002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Field/typeName/typename002/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.Field.typeName.typename002 * nsk.jdi.Field.typeName.typename002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Field.typeName.typename002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatType/_itself_/floattype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatType/_itself_/floattype001/TestDescription.java index 5b795cbfe56..4c87888b9d0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatType/_itself_/floattype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatType/_itself_/floattype001/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.FloatType._itself_.floattype001 * nsk.jdi.FloatType._itself_.floattype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.FloatType._itself_.floattype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/compareTo/compareto001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/compareTo/compareto001/TestDescription.java index 4b65248e670..c1b00a82a18 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/compareTo/compareto001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/compareTo/compareto001/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.FloatValue.compareTo.compareto001 * nsk.jdi.FloatValue.compareTo.compareto001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.FloatValue.compareTo.compareto001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/equals/equals001/TestDescription.java index 9d50a38f06b..8b19150d86e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/equals/equals001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.FloatValue.equals.equals001 * nsk.jdi.FloatValue.equals.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.FloatValue.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/equals/equals002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/equals/equals002/TestDescription.java index 758a037b7af..071e0758c7f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/equals/equals002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/equals/equals002/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.FloatValue.equals.equals002 * nsk.jdi.FloatValue.equals.equals002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.FloatValue.equals.equals002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/hashCode/hashcode001/TestDescription.java index 017bcbc1dfb..86999ff7350 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/hashCode/hashcode001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.FloatValue.hashCode.hashcode001 * nsk.jdi.FloatValue.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.FloatValue.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/value/value001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/value/value001/TestDescription.java index c89f4a1a987..dd213abfadb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/value/value001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/FloatValue/value/value001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.FloatValue.value.value001 * nsk.jdi.FloatValue.value.value001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.FloatValue.value.value001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/HiddenClass/events/events001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/HiddenClass/events/events001.java index 41d501e8d27..8626c9dd087 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/HiddenClass/events/events001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/HiddenClass/events/events001.java @@ -33,14 +33,14 @@ * * @build nsk.jdi.HiddenClass.events.* * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.HiddenClass.events.events001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -debugee.vmkeys="-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI ${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/intValue/intvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/intValue/intvalue001/TestDescription.java index 5bc2499da6d..24244b467fe 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/intValue/intvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/intValue/intvalue001/TestDescription.java @@ -62,13 +62,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.IntegerArgument.intValue.intvalue001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerArgument.intValue.intvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/intValue/intvalue002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/intValue/intvalue002/TestDescription.java index 13f8388b132..bd0db60850a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/intValue/intvalue002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/intValue/intvalue002/TestDescription.java @@ -64,13 +64,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.IntegerArgument.intValue.intvalue002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerArgument.intValue.intvalue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/isValid/isvalid001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/isValid/isvalid001/TestDescription.java index 33df3ba3ec0..f750bb5697a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/isValid/isvalid001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/isValid/isvalid001/TestDescription.java @@ -64,13 +64,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.IntegerArgument.isValid.isvalid001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerArgument.isValid.isvalid001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/isValid/isvalid002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/isValid/isvalid002/TestDescription.java index 87417a8acc8..2fbfd0c15d6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/isValid/isvalid002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/isValid/isvalid002/TestDescription.java @@ -75,13 +75,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.IntegerArgument.isValid.isvalid002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerArgument.isValid.isvalid002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/isValid/isvalid003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/isValid/isvalid003/TestDescription.java index 549a2c45116..0c7bd868a83 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/isValid/isvalid003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/isValid/isvalid003/TestDescription.java @@ -57,13 +57,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.IntegerArgument.isValid.isvalid003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerArgument.isValid.isvalid003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/max/max001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/max/max001/TestDescription.java index cd34c3192b4..bdd8f4269ba 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/max/max001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/max/max001/TestDescription.java @@ -61,13 +61,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.IntegerArgument.max.max001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerArgument.max.max001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/min/min001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/min/min001/TestDescription.java index d392c6c8025..03724d50087 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/min/min001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/min/min001/TestDescription.java @@ -57,13 +57,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.IntegerArgument.min.min001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerArgument.min.min001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/setValue/setvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/setValue/setvalue001/TestDescription.java index 8f45b403ca9..e026859ebda 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/setValue/setvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/setValue/setvalue001/TestDescription.java @@ -70,13 +70,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.IntegerArgument.setValue.setvalue001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerArgument.setValue.setvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/stringValueOf/stringvalueof001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/stringValueOf/stringvalueof001/TestDescription.java index 394acbc020b..9c3a3e6cac3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/stringValueOf/stringvalueof001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerArgument/stringValueOf/stringvalueof001/TestDescription.java @@ -61,13 +61,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.IntegerArgument.stringValueOf.stringvalueof001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerArgument.stringValueOf.stringvalueof001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerType/_itself_/integertype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerType/_itself_/integertype001/TestDescription.java index aa69dc5dc78..a722cc58625 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerType/_itself_/integertype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerType/_itself_/integertype001/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.IntegerType._itself_.integertype001 * nsk.jdi.IntegerType._itself_.integertype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerType._itself_.integertype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/compareTo/compareto001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/compareTo/compareto001/TestDescription.java index b116c619d2d..a601b6083c5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/compareTo/compareto001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/compareTo/compareto001/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.IntegerValue.compareTo.compareto001 * nsk.jdi.IntegerValue.compareTo.compareto001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerValue.compareTo.compareto001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/equals/equals001/TestDescription.java index f85d91ecc50..6c6607b418a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/equals/equals001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.IntegerValue.equals.equals001 * nsk.jdi.IntegerValue.equals.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerValue.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/equals/equals002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/equals/equals002/TestDescription.java index 38153b1a18f..dcefc51634d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/equals/equals002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/equals/equals002/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.IntegerValue.equals.equals002 * nsk.jdi.IntegerValue.equals.equals002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerValue.equals.equals002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/hashCode/hashcode001/TestDescription.java index 4f60b848452..0f143f424f8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/hashCode/hashcode001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.IntegerValue.hashCode.hashcode001 * nsk.jdi.IntegerValue.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerValue.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/value/value001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/value/value001/TestDescription.java index cf8096c64b5..4edf62e75d4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/value/value001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/value/value001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.IntegerValue.value.value001 * nsk.jdi.IntegerValue.value.value001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.IntegerValue.value.value001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/implementors/implementors001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/implementors/implementors001.java index 48b68dcaebb..52a201b72b6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/implementors/implementors001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/implementors/implementors001.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -178,8 +178,8 @@ private int runThis (String argv[], PrintStream out) { List iface0list = ((ClassType) classRefType).interfaces(); - if (iface0list.size() != 1) { - log3("ERROR : iface0list.size() != 1 in case: Iface1"); + if (iface0list.size() != 2) { // includes injected java.lang.IdentityObject + log3("ERROR : iface0list.size() != 2 in case: Iface1"); expresult = 1; break; } @@ -222,8 +222,8 @@ private int runThis (String argv[], PrintStream out) { List iface1list = ((ClassType) classRefType).interfaces(); - if (iface1list.size() != 1) { - log3("ERROR : iface1list.size() != 1 in case: Iface2"); + if (iface1list.size() != 2) { + log3("ERROR : iface1list.size() != 2 in case: Iface2"); expresult = 1; break; } @@ -255,8 +255,8 @@ private int runThis (String argv[], PrintStream out) { List iface3list = ((ClassType) classRefType).interfaces(); - if (iface3list.size() != 1) { - log3("ERROR : iface3list.size() != 1 in case: Iface3"); + if (iface3list.size() != 2) { // includes injected java.lang.IdentityObject + log3("ERROR : iface3list.size() != 2 in case: Iface3"); expresult = 1; break; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/implementors/implementors001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/implementors/implementors001/TestDescription.java index dcde50adaec..4985d65f4dc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/implementors/implementors001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/implementors/implementors001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.InterfaceType.implementors.implementors001 * nsk.jdi.InterfaceType.implementors.implementors001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.InterfaceType.implementors.implementors001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/subinterfaces/subinterfaces001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/subinterfaces/subinterfaces001.java index cffdfa5e770..c55f53f7fe0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/subinterfaces/subinterfaces001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/subinterfaces/subinterfaces001.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -177,8 +177,8 @@ private int runThis (String argv[], PrintStream out) { List iface0list = ((ClassType) classRefType).interfaces(); - if (iface0list.size() != 1) { - log3("ERROR : iface0list.size() != 1 in case: Iface3"); + if (iface0list.size() != 2) { // includes injected java.lang.IdentityObject + log3("ERROR : iface0list.size() != 2 in case: Iface3"); expresult = 1; break; } @@ -201,8 +201,8 @@ private int runThis (String argv[], PrintStream out) { List iface1list = ((ClassType) classRefType).interfaces(); - if (iface1list.size() != 1) { - log3("ERROR : iface1list.size() != 1 in case: Iface2"); + if (iface1list.size() != 2) { // includes injected java.lang.IdentityObject + log3("ERROR : iface1list.size() != 2 in case: Iface2"); expresult = 1; break; } @@ -234,8 +234,8 @@ private int runThis (String argv[], PrintStream out) { List iface3list = ((ClassType) classRefType).interfaces(); - if (iface3list.size() != 1) { - log3("ERROR : iface3list.size() != 1 in case: Iface1"); + if (iface3list.size() != 2) { // includes injected java.lang.IdentityObject + log3("ERROR : iface3list.size() != 2 in case: Iface1"); expresult = 1; break; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/subinterfaces/subinterfaces001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/subinterfaces/subinterfaces001/TestDescription.java index 01aa6c69d94..c8bb62944e1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/subinterfaces/subinterfaces001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/subinterfaces/subinterfaces001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.InterfaceType.subinterfaces.subinterfaces001 * nsk.jdi.InterfaceType.subinterfaces.subinterfaces001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.InterfaceType.subinterfaces.subinterfaces001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/superinterfaces/superinterfaces001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/superinterfaces/superinterfaces001.java index 7dd567db76d..71b7054dbff 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/superinterfaces/superinterfaces001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/superinterfaces/superinterfaces001.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -180,8 +180,8 @@ private int runThis (String argv[], PrintStream out) { List iface0list = ((ClassType) classRefType).interfaces(); - if (iface0list.size() != 1) { - log3("ERROR : iface0list.size() != 1 in case: Iface1"); + if (iface0list.size() != 2) { // includes injected java.lang.IdentityObject + log3("ERROR : iface0list.size() != 2 in case: Iface1"); expresult = 1; break; } @@ -204,8 +204,8 @@ private int runThis (String argv[], PrintStream out) { List iface1list = ((ClassType) classRefType).interfaces(); - if (iface1list.size() != 1) { - log3("ERROR : iface1list.size() != 1 in case: Iface2"); + if (iface1list.size() != 2) { // includes injected java.lang.IdentityObject + log3("ERROR : iface1list.size() != 2 in case: Iface2"); expresult = 1; break; } @@ -237,8 +237,8 @@ private int runThis (String argv[], PrintStream out) { List iface3list = ((ClassType) classRefType).interfaces(); - if (iface3list.size() != 1) { - log3("ERROR : iface3list.size() != 1 in case: Iface3"); + if (iface3list.size() != 2) { // includes injected java.lang.IdentityObject + log3("ERROR : iface3list.size() != 2 in case: Iface3"); expresult = 1; break; } @@ -262,8 +262,8 @@ private int runThis (String argv[], PrintStream out) { List iface4list = ((ClassType) classRefType).interfaces(); - if (iface4list.size() != 1) { - log3("ERROR : iface4list.size() != 1 in case: Iface4"); + if (iface4list.size() != 2) { // includes injected java.lang.IdentityObject + log3("ERROR : iface4list.size() != 2 in case: Iface4"); expresult = 1; break; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/superinterfaces/superinterfaces001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/superinterfaces/superinterfaces001/TestDescription.java index b9e9b96b69a..50d71bcf0e2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/superinterfaces/superinterfaces001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/superinterfaces/superinterfaces001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.InterfaceType.superinterfaces.superinterfaces001 * nsk.jdi.InterfaceType.superinterfaces.superinterfaces001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.InterfaceType.superinterfaces.superinterfaces001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch001/TestDescription.java index dfdb5f97194..56b3bb017ec 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch001/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.LaunchingConnector.launch.launch001 * nsk.jdi.LaunchingConnector.launch.launch001o - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LaunchingConnector.launch.launch001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch002/TestDescription.java index a7edac1faae..4c96c746e14 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch002/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.LaunchingConnector.launch.launch002 * nsk.jdi.LaunchingConnector.launch.launch002o - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LaunchingConnector.launch.launch002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch003/TestDescription.java index 033d0bfd7cb..3be53626e13 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch003/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.LaunchingConnector.launch.launch003 * nsk.jdi.LaunchingConnector.launch.launch003o - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LaunchingConnector.launch.launch003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch004/TestDescription.java index 13902731797..09d2f032ded 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launch/launch004/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.LaunchingConnector.launch.launch004 * nsk.jdi.LaunchingConnector.launch.launch004o - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LaunchingConnector.launch.launch004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launchnosuspend/launchnosuspend001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launchnosuspend/launchnosuspend001/TestDescription.java index 5cff163b6cd..a970eae5707 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launchnosuspend/launchnosuspend001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launchnosuspend/launchnosuspend001/TestDescription.java @@ -39,13 +39,13 @@ * /test/lib * @build nsk.jdi.LaunchingConnector.launchnosuspend.launchnosuspend001 * nsk.jdi.LaunchingConnector.launchnosuspend.launchnosuspend001o - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LaunchingConnector.launchnosuspend.launchnosuspend001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept001/TestDescription.java index a43ede08828..02b65b7c83b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept001/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ListeningConnector.accept.accept001 * nsk.jdi.ListeningConnector.accept.accept001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ListeningConnector.accept.accept001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept002/TestDescription.java index 876f3507e77..d94da6ca571 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept002/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ListeningConnector.accept.accept002 * nsk.jdi.ListeningConnector.accept.accept002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ListeningConnector.accept.accept002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/listennosuspend/listennosuspend001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/listennosuspend/listennosuspend001/TestDescription.java index cb6a5ddf425..a098aa26cf0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/listennosuspend/listennosuspend001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/listennosuspend/listennosuspend001/TestDescription.java @@ -39,13 +39,13 @@ * /test/lib * @build nsk.jdi.ListeningConnector.listennosuspend.listennosuspend001 * nsk.jdi.ListeningConnector.listennosuspend.listennosuspend001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ListeningConnector.listennosuspend.listennosuspend001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis001/TestDescription.java index 837ab393ab6..f563846dfa3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis001/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.ListeningConnector.startListening.startlis001 * nsk.jdi.ListeningConnector.startListening.startlis001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ListeningConnector.startListening.startlis001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis002/TestDescription.java index af13e9c0d79..f9e6ab6ed77 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis002/TestDescription.java @@ -54,13 +54,13 @@ * /test/lib * @build nsk.jdi.ListeningConnector.startListening.startlis002 * nsk.jdi.ListeningConnector.startListening.startlis002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ListeningConnector.startListening.startlis002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/stopListening/stoplis001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/stopListening/stoplis001/TestDescription.java index ad14b39deb8..77da13e38f5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/stopListening/stoplis001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/stopListening/stoplis001/TestDescription.java @@ -46,13 +46,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ListeningConnector.stopListening.stoplis001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ListeningConnector.stopListening.stoplis001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/stopListening/stoplis002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/stopListening/stoplis002/TestDescription.java index cb4d8322921..a41779deeaf 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/stopListening/stoplis002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/stopListening/stoplis002/TestDescription.java @@ -46,13 +46,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ListeningConnector.stopListening.stoplis002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ListeningConnector.stopListening.stoplis002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/supportsMultipleConnections/supportsmultipleconnections001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/supportsMultipleConnections/supportsmultipleconnections001/TestDescription.java index 98f98c5899e..93f7ee106a4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/supportsMultipleConnections/supportsmultipleconnections001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/supportsMultipleConnections/supportsmultipleconnections001/TestDescription.java @@ -42,13 +42,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ListeningConnector.supportsMultipleConnections.supportsmultipleconnections001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ListeningConnector.supportsMultipleConnections.supportsmultipleconnections001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/equals/equals001/TestDescription.java index 85e71d58678..60c4bd329e6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/equals/equals001/TestDescription.java @@ -75,13 +75,13 @@ * @clean nsk.jdi.LocalVariable.equals.equals001a * @compile -g:lines,source,vars ../equals001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LocalVariable.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/genericSignature/gensignature001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/genericSignature/gensignature001/TestDescription.java index 23c50087732..060f69baacb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/genericSignature/gensignature001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/genericSignature/gensignature001/TestDescription.java @@ -58,13 +58,13 @@ * @clean nsk.jdi.LocalVariable.genericSignature.gensignature001a * @compile -g:lines,source,vars ../gensignature001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LocalVariable.genericSignature.gensignature001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/hashCode/hashcode001/TestDescription.java index 96b1aef098c..14ae71e10f0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/hashCode/hashcode001/TestDescription.java @@ -72,13 +72,13 @@ * @clean nsk.jdi.LocalVariable.hashCode.hashcode001a * @compile -g:lines,source,vars ../hashcode001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LocalVariable.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/isArgument/isargument001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/isArgument/isargument001/TestDescription.java index 7e6990b1b34..506201f435a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/isArgument/isargument001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/isArgument/isargument001/TestDescription.java @@ -71,13 +71,13 @@ * @clean nsk.jdi.LocalVariable.isArgument.isargument001a * @compile -g:lines,source,vars ../isargument001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LocalVariable.isArgument.isargument001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/isVisible/isvisible001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/isVisible/isvisible001/TestDescription.java index 828255dda9e..897383dd9fe 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/isVisible/isvisible001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/isVisible/isvisible001/TestDescription.java @@ -79,13 +79,13 @@ * @clean nsk.jdi.LocalVariable.isVisible.isvisible001a * @compile -g:lines,source,vars ../isvisible001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LocalVariable.isVisible.isvisible001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/name/name001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/name/name001/TestDescription.java index 8f13416b6e0..b8c15a9b5dc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/name/name001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/name/name001/TestDescription.java @@ -71,13 +71,13 @@ * @clean nsk.jdi.LocalVariable.name.name001a * @compile -g:lines,source,vars ../name001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LocalVariable.name.name001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/signature/signature001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/signature/signature001/TestDescription.java index 77eade5bdc7..d6f98e6bcea 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/signature/signature001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/signature/signature001/TestDescription.java @@ -71,13 +71,13 @@ * @clean nsk.jdi.LocalVariable.signature.signature001a * @compile -g:lines,source,vars ../signature001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LocalVariable.signature.signature001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/toString/tostring001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/toString/tostring001/TestDescription.java index 44497cb1594..7c62bf2520c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/toString/tostring001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/toString/tostring001/TestDescription.java @@ -49,13 +49,13 @@ * @clean nsk.jdi.LocalVariable.toString.tostring001a * @compile -g:lines,source,vars ../tostring001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LocalVariable.toString.tostring001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/type/type001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/type/type001/TestDescription.java index d55dbd94278..d823c5b2d2b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/type/type001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/type/type001/TestDescription.java @@ -79,13 +79,13 @@ * @clean nsk.jdi.LocalVariable.type.type001a * @compile -g:lines,source,vars ../type001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LocalVariable.type.type001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/type/type002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/type/type002/TestDescription.java index c3e7f9591ff..ce480388a56 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/type/type002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/type/type002/TestDescription.java @@ -79,13 +79,13 @@ * @clean nsk.jdi.LocalVariable.type.type002a * @compile -g:lines,source,vars ../type002a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LocalVariable.type.type002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/typeName/typename001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/typeName/typename001/TestDescription.java index 84b2c942b0d..8720070aefb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/typeName/typename001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/typeName/typename001/TestDescription.java @@ -71,13 +71,13 @@ * @clean nsk.jdi.LocalVariable.typeName.typename001a * @compile -g:lines,source,vars ../typename001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LocalVariable.typeName.typename001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/typeName/typename002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/typeName/typename002/TestDescription.java index 8b735f18d43..3de0f7f2d2f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/typeName/typename002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocalVariable/typeName/typename002/TestDescription.java @@ -71,13 +71,13 @@ * @clean nsk.jdi.LocalVariable.typeName.typename002a * @compile -g:lines,source,vars ../typename002a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LocalVariable.typeName.typename002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location001/TestDescription.java index 4da36790d5d..f0ef1691215 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.Locatable.location.location001 * nsk.jdi.Locatable.location.location001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Locatable.location.location001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location002/TestDescription.java index ef445c8968b..dcf9cb62b27 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location002/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.Locatable.location.location002 * nsk.jdi.Locatable.location.location002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Locatable.location.location002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location003/TestDescription.java index 425583bbb0c..936d6894c49 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location003/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.Locatable.location.location003 * nsk.jdi.Locatable.location.location003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Locatable.location.location003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location004/TestDescription.java index 86d24d0278c..a530556985d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location004/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.Locatable.location.location004 * nsk.jdi.Locatable.location.location004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Locatable.location.location004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location005/TestDescription.java index e6cbe217739..92b530aeca0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location005/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.Locatable.location.location005 * nsk.jdi.Locatable.location.location005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Locatable.location.location005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location006/TestDescription.java index a81b4e7155f..78b7c52925f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Locatable/location/location006/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.Locatable.location.location006 * nsk.jdi.Locatable.location.location006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Locatable.location.location006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocatableEvent/thread/thread001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocatableEvent/thread/thread001/TestDescription.java index a0de6bb6cd7..76ed5e2f3ec 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocatableEvent/thread/thread001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LocatableEvent/thread/thread001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.LocatableEvent.thread.thread001 * nsk.jdi.LocatableEvent.thread.thread001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LocatableEvent.thread.thread001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/codeIndex/codeindex001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/codeIndex/codeindex001/TestDescription.java index 47ca866d340..ff2f70ac547 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/codeIndex/codeindex001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/codeIndex/codeindex001/TestDescription.java @@ -71,13 +71,13 @@ * @clean nsk.jdi.Location.codeIndex.codeindex001a * @compile -g:lines,source,vars ../codeindex001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.codeIndex.codeindex001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/declaringType/declaringtype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/declaringType/declaringtype001/TestDescription.java index 10efec44d7c..4095c80efea 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/declaringType/declaringtype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/declaringType/declaringtype001/TestDescription.java @@ -71,13 +71,13 @@ * @clean nsk.jdi.Location.declaringType.declaringtype001a * @compile -g:lines,source,vars ../declaringtype001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.declaringType.declaringtype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/equals/equals001/TestDescription.java index a0fb4b287a0..2527df767f4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/equals/equals001/TestDescription.java @@ -72,13 +72,13 @@ * @clean nsk.jdi.Location.equals.equals001a * @compile -g:lines,source,vars ../equals001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/hashCode/hashcode001/TestDescription.java index 9bba2469348..12ac8c31988 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/hashCode/hashcode001/TestDescription.java @@ -70,13 +70,13 @@ * @clean nsk.jdi.Location.hashCode.hashcode001a * @compile -g:lines,source,vars ../hashcode001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/lineNumber/linenumber001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/lineNumber/linenumber001/TestDescription.java index bf75f999db8..8fd4f94d41a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/lineNumber/linenumber001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/lineNumber/linenumber001/TestDescription.java @@ -82,13 +82,13 @@ * @clean nsk.jdi.Location.lineNumber.linenumber001a * @compile -g:lines,source,vars ../linenumber001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.lineNumber.linenumber001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/lineNumber_s/lineNumber_s002/lineNumber_s002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/lineNumber_s/lineNumber_s002/lineNumber_s002.java index a51eb9c1dc3..5f58c23caa6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/lineNumber_s/lineNumber_s002/lineNumber_s002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/lineNumber_s/lineNumber_s002/lineNumber_s002.java @@ -51,14 +51,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Location.lineNumber_s.lineNumber_s002.lineNumber_s002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.lineNumber_s.lineNumber_s002.lineNumber_s002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/lineNumber_s/linenumber_s001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/lineNumber_s/linenumber_s001/TestDescription.java index d2d70c39617..60abf0f0ce2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/lineNumber_s/linenumber_s001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/lineNumber_s/linenumber_s001/TestDescription.java @@ -70,13 +70,13 @@ * @clean nsk.jdi.Location.lineNumber_s.linenumber_s001a * @compile -g:lines,source,vars ../linenumber_s001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.lineNumber_s.linenumber_s001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/method/method001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/method/method001/TestDescription.java index 0a797d69c6c..984619e38a2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/method/method001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/method/method001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.Location.method.method001 * nsk.jdi.Location.method.method001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.method.method001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourceName/sourcename001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourceName/sourcename001/TestDescription.java index 02aa1add40c..cc5e78fb773 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourceName/sourcename001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourceName/sourcename001/TestDescription.java @@ -76,13 +76,13 @@ * @clean nsk.jdi.Location.sourceName.sourcename001a * @compile -g:lines,source,vars ../sourcename001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.sourceName.sourcename001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourceName_s/sourceName_s002/sourceName_s002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourceName_s/sourceName_s002/sourceName_s002.java index 4ba283f4988..d288cf62ae0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourceName_s/sourceName_s002/sourceName_s002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourceName_s/sourceName_s002/sourceName_s002.java @@ -52,14 +52,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Location.sourceName_s.sourceName_s002.sourceName_s002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.sourceName_s.sourceName_s002.sourceName_s002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourceName_s/sourcename_s001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourceName_s/sourcename_s001/TestDescription.java index a30e6c140e7..33766e953b5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourceName_s/sourcename_s001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourceName_s/sourcename_s001/TestDescription.java @@ -74,13 +74,13 @@ * @clean nsk.jdi.Location.sourceName_s.sourcename_s001a * @compile -g:lines,source,vars ../sourcename_s001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.sourceName_s.sourcename_s001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourcePath/sourcepath001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourcePath/sourcepath001/TestDescription.java index be1d4013b5f..3d56d4a6f90 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourcePath/sourcepath001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourcePath/sourcepath001/TestDescription.java @@ -72,13 +72,13 @@ * @clean nsk.jdi.Location.sourcePath.sourcepath001a * @compile -g:lines,source,vars ../sourcepath001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.sourcePath.sourcepath001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourcePath_s/sourcePath_s002/sourcePath_s002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourcePath_s/sourcePath_s002/sourcePath_s002.java index 66864009049..20268e6954b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourcePath_s/sourcePath_s002/sourcePath_s002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourcePath_s/sourcePath_s002/sourcePath_s002.java @@ -52,14 +52,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Location.sourcePath_s.sourcePath_s002.sourcePath_s002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.sourcePath_s.sourcePath_s002.sourcePath_s002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourcePath_s/sourcepath_s001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourcePath_s/sourcepath_s001/TestDescription.java index 65f41b05508..c696bd69b54 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourcePath_s/sourcepath_s001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Location/sourcePath_s/sourcepath_s001/TestDescription.java @@ -83,13 +83,13 @@ * @clean nsk.jdi.Location.sourcePath_s.sourcepath_s001a * @compile -g:lines,source,vars ../sourcepath_s001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Location.sourcePath_s.sourcepath_s001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongType/_itself_/longtype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongType/_itself_/longtype001/TestDescription.java index ed1e744e253..819b918a954 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongType/_itself_/longtype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongType/_itself_/longtype001/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.LongType._itself_.longtype001 * nsk.jdi.LongType._itself_.longtype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LongType._itself_.longtype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/compareTo/compareto001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/compareTo/compareto001/TestDescription.java index c4d8520f8c0..7cc3e49aee9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/compareTo/compareto001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/compareTo/compareto001/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.LongValue.compareTo.compareto001 * nsk.jdi.LongValue.compareTo.compareto001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LongValue.compareTo.compareto001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/equals/equals001/TestDescription.java index 254df6ae1fe..d3e67eb71f6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/equals/equals001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.LongValue.equals.equals001 * nsk.jdi.LongValue.equals.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LongValue.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/equals/equals002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/equals/equals002/TestDescription.java index 2d26abb94cd..2935702b096 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/equals/equals002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/equals/equals002/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.LongValue.equals.equals002 * nsk.jdi.LongValue.equals.equals002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LongValue.equals.equals002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/hashCode/hashcode001/TestDescription.java index a305a5bb91c..7b204a3f1ac 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/hashCode/hashcode001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.LongValue.hashCode.hashcode001 * nsk.jdi.LongValue.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LongValue.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/value/value001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/value/value001/TestDescription.java index 6dfceaa5d9f..6354b2449bd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/value/value001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LongValue/value/value001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.LongValue.value.value001 * nsk.jdi.LongValue.value.value001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.LongValue.value.value001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/_bounds_/bounds001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/_bounds_/bounds001/TestDescription.java index 7238e1261c5..565e171c50e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/_bounds_/bounds001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/_bounds_/bounds001/TestDescription.java @@ -52,13 +52,13 @@ * @clean nsk.jdi.Method._bounds_.bounds001a * @compile -g:lines,source,vars ../bounds001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method._bounds_.bounds001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations/alllinelocations001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations/alllinelocations001/TestDescription.java index 13c68cc29ad..b680ae38615 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations/alllinelocations001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations/alllinelocations001/TestDescription.java @@ -89,13 +89,13 @@ * @clean nsk.jdi.Method.allLineLocations.alllinelocations001a * @compile -g:lines,source,vars ../alllinelocations001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.allLineLocations.alllinelocations001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations/alllinelocations002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations/alllinelocations002/TestDescription.java index 532119878b0..420138019e5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations/alllinelocations002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations/alllinelocations002/TestDescription.java @@ -89,13 +89,13 @@ * @clean nsk.jdi.Method.allLineLocations.alllinelocations002a * @compile -g:lines,source,vars ../alllinelocations002a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.allLineLocations.alllinelocations002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations_ss/allLineLocations_ss002/allLineLocations_ss002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations_ss/allLineLocations_ss002/allLineLocations_ss002.java index 9b1cf3bd4f3..e9f52f1e88d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations_ss/allLineLocations_ss002/allLineLocations_ss002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations_ss/allLineLocations_ss002/allLineLocations_ss002.java @@ -56,14 +56,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Method.allLineLocations_ss.allLineLocations_ss002.allLineLocations_ss002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.allLineLocations_ss.allLineLocations_ss002.allLineLocations_ss002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations_ss/allLineLocations_ss003/allLineLocations_ss003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations_ss/allLineLocations_ss003/allLineLocations_ss003.java index a661abc15d5..f052d2b91fd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations_ss/allLineLocations_ss003/allLineLocations_ss003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations_ss/allLineLocations_ss003/allLineLocations_ss003.java @@ -57,14 +57,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Method.allLineLocations_ss.allLineLocations_ss003.allLineLocations_ss003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.allLineLocations_ss.allLineLocations_ss003.allLineLocations_ss003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations_ss/alllinelocations_ss001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations_ss/alllinelocations_ss001/TestDescription.java index 4c17b029038..d978792985d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations_ss/alllinelocations_ss001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/allLineLocations_ss/alllinelocations_ss001/TestDescription.java @@ -91,13 +91,13 @@ * @clean nsk.jdi.Method.allLineLocations_ss.alllinelocations_ss001a * @compile -g:lines,source,vars ../alllinelocations_ss001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.allLineLocations_ss.alllinelocations_ss001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypeNames/argumenttypenames001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypeNames/argumenttypenames001/TestDescription.java index cc673a1137d..09bafd677d8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypeNames/argumenttypenames001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypeNames/argumenttypenames001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.Method.argumentTypeNames.argumenttypenames001 * nsk.jdi.Method.argumentTypeNames.argumenttypenames001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.argumentTypeNames.argumenttypenames001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypeNames/argumenttypenames002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypeNames/argumenttypenames002/TestDescription.java index b52dd3d9b31..328633387a5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypeNames/argumenttypenames002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypeNames/argumenttypenames002/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.Method.argumentTypeNames.argumenttypenames002 * nsk.jdi.Method.argumentTypeNames.argumenttypenames002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.argumentTypeNames.argumenttypenames002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypeNames/argumenttypenames003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypeNames/argumenttypenames003/TestDescription.java index ea18c65fe85..9c45d78a8c8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypeNames/argumenttypenames003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypeNames/argumenttypenames003/TestDescription.java @@ -58,13 +58,13 @@ * @clean nsk.jdi.Method.argumentTypeNames.argumenttypenames003a * @compile -g:lines,source,vars ../argumenttypenames003a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.argumentTypeNames.argumenttypenames003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypes/argumenttypes001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypes/argumenttypes001/TestDescription.java index 1d2f2d1c362..7f141d064b0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypes/argumenttypes001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypes/argumenttypes001/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.Method.argumentTypes.argumenttypes001 * nsk.jdi.Method.argumentTypes.argumenttypes001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.argumentTypes.argumenttypes001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypes/argumenttypes002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypes/argumenttypes002/TestDescription.java index 426e80a427a..77ba8465b50 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypes/argumenttypes002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/argumentTypes/argumenttypes002/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.Method.argumentTypes.argumenttypes002 * nsk.jdi.Method.argumentTypes.argumenttypes002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.argumentTypes.argumenttypes002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/arguments/arguments001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/arguments/arguments001/TestDescription.java index 48db3c2a109..84d988332e3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/arguments/arguments001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/arguments/arguments001/TestDescription.java @@ -85,13 +85,13 @@ * @clean nsk.jdi.Method.arguments.arguments001a * @compile -g:lines,source,vars ../arguments001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.arguments.arguments001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/arguments/arguments002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/arguments/arguments002/TestDescription.java index 4a5c18e0fef..71d208e8974 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/arguments/arguments002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/arguments/arguments002/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.Method.arguments.arguments002 * nsk.jdi.Method.arguments.arguments002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.arguments.arguments002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/arguments/arguments003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/arguments/arguments003/TestDescription.java index 324025ed458..386cede022b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/arguments/arguments003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/arguments/arguments003/TestDescription.java @@ -58,13 +58,13 @@ * @clean nsk.jdi.Method.arguments.arguments003a * @compile -g:lines,source,vars ../arguments003a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.arguments.arguments003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/bytecodes/bytecodes001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/bytecodes/bytecodes001/TestDescription.java index 1afa1934ae9..d8c486f423a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/bytecodes/bytecodes001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/bytecodes/bytecodes001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.Method.bytecodes.bytecodes001 * nsk.jdi.Method.bytecodes.bytecodes001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.bytecodes.bytecodes001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/equals/equals001/TestDescription.java index 7c47fd70b2f..b3cdf315042 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/equals/equals001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.Method.equals.equals001 * nsk.jdi.Method.equals.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/hashCode/hashcode001/TestDescription.java index 460f02d154b..d83a0e07083 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/hashCode/hashcode001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.Method.hashCode.hashcode001 * nsk.jdi.Method.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isAbstract/isabstract001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isAbstract/isabstract001/TestDescription.java index 9f29601326d..fb8d671c08d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isAbstract/isabstract001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isAbstract/isabstract001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.Method.isAbstract.isabstract001 * nsk.jdi.Method.isAbstract.isabstract001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.isAbstract.isabstract001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isBridge/isbridge001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isBridge/isbridge001/TestDescription.java index c1146b99e72..6e2d274974e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isBridge/isbridge001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isBridge/isbridge001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.Method.isBridge.isbridge001 * nsk.jdi.Method.isBridge.isbridge001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.isBridge.isbridge001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isConstructor/isconstructor001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isConstructor/isconstructor001/TestDescription.java index 6a94a6eb3dd..ae5f8ec47a0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isConstructor/isconstructor001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isConstructor/isconstructor001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.Method.isConstructor.isconstructor001 * nsk.jdi.Method.isConstructor.isconstructor001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.isConstructor.isconstructor001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isNative/isnative001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isNative/isnative001/TestDescription.java index 3f4fa0bf3d0..a00d27c0605 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isNative/isnative001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isNative/isnative001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.Method.isNative.isnative001 * nsk.jdi.Method.isNative.isnative001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.isNative.isnative001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isObsolete/isobsolete001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isObsolete/isobsolete001/TestDescription.java index 2b3ff2b3181..df86aa3f723 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isObsolete/isobsolete001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isObsolete/isobsolete001/TestDescription.java @@ -80,7 +80,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.isObsolete.isobsolete001 * ./bin * -verbose @@ -88,6 +88,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isObsolete/isobsolete002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isObsolete/isobsolete002/TestDescription.java index 58e56a2d9ef..11433217aba 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isObsolete/isobsolete002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isObsolete/isobsolete002/TestDescription.java @@ -81,7 +81,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.isObsolete.isobsolete002 * ./bin * -verbose @@ -89,6 +89,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isObsolete/isobsolete003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isObsolete/isobsolete003/TestDescription.java index e4d1f3b31a9..c102570f241 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isObsolete/isobsolete003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isObsolete/isobsolete003/TestDescription.java @@ -94,7 +94,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.isObsolete.isobsolete003 * ./bin * -verbose @@ -102,6 +102,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isStaticInitializer/isstinitializer001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isStaticInitializer/isstinitializer001/TestDescription.java index 710c6db89fa..966b225ee27 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isStaticInitializer/isstinitializer001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isStaticInitializer/isstinitializer001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.Method.isStaticInitializer.isstinitializer001 * nsk.jdi.Method.isStaticInitializer.isstinitializer001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.isStaticInitializer.isstinitializer001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isSynchronized/issynchronized001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isSynchronized/issynchronized001/TestDescription.java index b9c712cbd14..a56e587c6e6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isSynchronized/issynchronized001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isSynchronized/issynchronized001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.Method.isSynchronized.issynchronized001 * nsk.jdi.Method.isSynchronized.issynchronized001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.isSynchronized.issynchronized001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isVarArgs/isvarargs001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isVarArgs/isvarargs001/TestDescription.java index 48f7748fcff..12624f10d3f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isVarArgs/isvarargs001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/isVarArgs/isvarargs001/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.Method.isVarArgs.isvarargs001 * nsk.jdi.Method.isVarArgs.isvarargs001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.isVarArgs.isvarargs001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationOfCodeIndex/locationofcodeindex001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationOfCodeIndex/locationofcodeindex001/TestDescription.java index 9c1d15eed12..c91e46160f6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationOfCodeIndex/locationofcodeindex001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationOfCodeIndex/locationofcodeindex001/TestDescription.java @@ -72,13 +72,13 @@ * @clean nsk.jdi.Method.locationOfCodeIndex.locationofcodeindex001a * @compile -g:lines,source,vars ../locationofcodeindex001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.locationOfCodeIndex.locationofcodeindex001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine/locationsofline001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine/locationsofline001/TestDescription.java index 8855beb914b..15032ff8681 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine/locationsofline001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine/locationsofline001/TestDescription.java @@ -88,13 +88,13 @@ * @clean nsk.jdi.Method.locationsOfLine.locationsofline001a * @compile -g:lines,source,vars ../locationsofline001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.locationsOfLine.locationsofline001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine_ssi/locationsOfLine_ssi002/locationsOfLine_ssi002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine_ssi/locationsOfLine_ssi002/locationsOfLine_ssi002.java index 0a807b186a3..10d0ad754e6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine_ssi/locationsOfLine_ssi002/locationsOfLine_ssi002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine_ssi/locationsOfLine_ssi002/locationsOfLine_ssi002.java @@ -57,14 +57,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Method.locationsOfLine_ssi.locationsOfLine_ssi002.locationsOfLine_ssi002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.locationsOfLine_ssi.locationsOfLine_ssi002.locationsOfLine_ssi002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine_ssi/locationsOfLine_ssi003/locationsOfLine_ssi003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine_ssi/locationsOfLine_ssi003/locationsOfLine_ssi003.java index f7b900bb58e..7c896c8bfd8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine_ssi/locationsOfLine_ssi003/locationsOfLine_ssi003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine_ssi/locationsOfLine_ssi003/locationsOfLine_ssi003.java @@ -57,14 +57,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Method.locationsOfLine_ssi.locationsOfLine_ssi003.locationsOfLine_ssi003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.locationsOfLine_ssi.locationsOfLine_ssi003.locationsOfLine_ssi003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine_ssi/locationsofline_ssi001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine_ssi/locationsofline_ssi001/TestDescription.java index 558f01cf7f2..d87b7d75f9d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine_ssi/locationsofline_ssi001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/locationsOfLine_ssi/locationsofline_ssi001/TestDescription.java @@ -86,13 +86,13 @@ * @clean nsk.jdi.Method.locationsOfLine_ssi.locationsofline_ssi001a * @compile -g:lines,source,vars ../locationsofline_ssi001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.locationsOfLine_ssi.locationsofline_ssi001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnType/returntype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnType/returntype001/TestDescription.java index c063ed628fa..24689cb7cd8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnType/returntype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnType/returntype001/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.Method.returnType.returntype001 * nsk.jdi.Method.returnType.returntype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.returnType.returntype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnType/returntype002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnType/returntype002/TestDescription.java index 19adb74ffd0..2dbf12bc1d7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnType/returntype002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnType/returntype002/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.Method.returnType.returntype002 * nsk.jdi.Method.returnType.returntype002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.returnType.returntype002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnType/returntype003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnType/returntype003/TestDescription.java index bcf28766405..f1b1088c68c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnType/returntype003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnType/returntype003/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.Method.returnType.returntype003 * nsk.jdi.Method.returnType.returntype003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.returnType.returntype003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnTypeNames/returntypenames001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnTypeNames/returntypenames001/TestDescription.java index 410de3739f2..c3743051e9e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnTypeNames/returntypenames001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnTypeNames/returntypenames001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.Method.returnTypeNames.returntypenames001 * nsk.jdi.Method.returnTypeNames.returntypenames001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.returnTypeNames.returntypenames001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnTypeNames/returntypenames002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnTypeNames/returntypenames002/TestDescription.java index 336884c8647..4c8674a9dc1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnTypeNames/returntypenames002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnTypeNames/returntypenames002/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.Method.returnTypeNames.returntypenames002 * nsk.jdi.Method.returnTypeNames.returntypenames002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.returnTypeNames.returntypenames002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnTypeNames/returntypenames003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnTypeNames/returntypenames003/TestDescription.java index 4c2744943ed..e06fbd786f3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnTypeNames/returntypenames003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/returnTypeNames/returntypenames003/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.Method.returnTypeNames.returntypenames003 * nsk.jdi.Method.returnTypeNames.returntypenames003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.returnTypeNames.returntypenames003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variables/variables001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variables/variables001/TestDescription.java index 3642dfaa07c..09d8c5db9a3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variables/variables001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variables/variables001/TestDescription.java @@ -90,13 +90,13 @@ * @clean nsk.jdi.Method.variables.variables001a * @compile -g:lines,source,vars ../variables001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.variables.variables001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variables/variables002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variables/variables002/TestDescription.java index ddef4b70d3d..d41cb628aa2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variables/variables002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variables/variables002/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.Method.variables.variables002 * nsk.jdi.Method.variables.variables002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.variables.variables002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variablesByName/variablesbyname001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variablesByName/variablesbyname001/TestDescription.java index ef747e39ce0..74647794b10 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variablesByName/variablesbyname001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variablesByName/variablesbyname001/TestDescription.java @@ -87,13 +87,13 @@ * @clean nsk.jdi.Method.variablesByName.variablesbyname001a * @compile -g:lines,source,vars ../variablesbyname001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.variablesByName.variablesbyname001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variablesByName/variablesbyname002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variablesByName/variablesbyname002/TestDescription.java index 9b78d89c4b9..6c9a2b6f5e2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variablesByName/variablesbyname002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Method/variablesByName/variablesbyname002/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.Method.variablesByName.variablesbyname002 * nsk.jdi.Method.variablesByName.variablesbyname002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Method.variablesByName.variablesbyname002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryEvent/method/method001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryEvent/method/method001/TestDescription.java index f5af65f2755..fcf885e8232 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryEvent/method/method001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryEvent/method/method001/TestDescription.java @@ -82,13 +82,13 @@ * /test/lib * @build nsk.jdi.MethodEntryEvent.method.method001 * nsk.jdi.MethodEntryEvent.method.method001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryEvent.method.method001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryEvent/method/method002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryEvent/method/method002/TestDescription.java index 3275bc2cdb4..9f30bb69ed4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryEvent/method/method002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryEvent/method/method002/TestDescription.java @@ -82,13 +82,13 @@ * /test/lib * @build nsk.jdi.MethodEntryEvent.method.method002 * nsk.jdi.MethodEntryEvent.method.method002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryEvent.method.method002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/_bounds_/filters001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/_bounds_/filters001/TestDescription.java index 9fd44bb076a..85f297b6aa4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/_bounds_/filters001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/_bounds_/filters001/TestDescription.java @@ -46,13 +46,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest._bounds_.filters001 * nsk.jdi.MethodEntryRequest._bounds_.filters001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest._bounds_.filters001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassExclusionFilter/filter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassExclusionFilter/filter001/TestDescription.java index df3e7c4d4d2..ee02b8a2c25 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassExclusionFilter/filter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassExclusionFilter/filter001/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addClassExclusionFilter.filter001 * nsk.jdi.MethodEntryRequest.addClassExclusionFilter.filter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addClassExclusionFilter.filter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassExclusionFilter/filter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassExclusionFilter/filter002/TestDescription.java index 1f9e0749b0a..754fb0bbc17 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassExclusionFilter/filter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassExclusionFilter/filter002/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addClassExclusionFilter.filter002 * nsk.jdi.MethodEntryRequest.addClassExclusionFilter.filter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addClassExclusionFilter.filter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_rt/filter_rt001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_rt/filter_rt001/TestDescription.java index 07f7d207c54..5ac05ec1940 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_rt/filter_rt001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_rt/filter_rt001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addClassFilter_rt.filter_rt001 * nsk.jdi.MethodEntryRequest.addClassFilter_rt.filter_rt001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addClassFilter_rt.filter_rt001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_rt/filter_rt002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_rt/filter_rt002/TestDescription.java index 0e7fb7a8a6f..f0db7765ffc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_rt/filter_rt002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_rt/filter_rt002/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addClassFilter_rt.filter_rt002 * nsk.jdi.MethodEntryRequest.addClassFilter_rt.filter_rt002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addClassFilter_rt.filter_rt002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_rt/filter_rt003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_rt/filter_rt003/TestDescription.java index 4f562df1214..b910bf9bdf7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_rt/filter_rt003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_rt/filter_rt003/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addClassFilter_rt.filter_rt003 * nsk.jdi.MethodEntryRequest.addClassFilter_rt.filter_rt003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addClassFilter_rt.filter_rt003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_s/filter_s001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_s/filter_s001/TestDescription.java index 7f4f4c8927b..1a70150d30c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_s/filter_s001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_s/filter_s001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addClassFilter_s.filter_s001 * nsk.jdi.MethodEntryRequest.addClassFilter_s.filter_s001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addClassFilter_s.filter_s001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_s/filter_s002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_s/filter_s002/TestDescription.java index 9101190f481..1d95b2623e1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_s/filter_s002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_s/filter_s002/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addClassFilter_s.filter_s002 * nsk.jdi.MethodEntryRequest.addClassFilter_s.filter_s002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addClassFilter_s.filter_s002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter001/TestDescription.java index edac4aaa493..f8a0811de4e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter001/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addInstanceFilter.instancefilter001 * nsk.jdi.MethodEntryRequest.addInstanceFilter.instancefilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addInstanceFilter.instancefilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter002/TestDescription.java index 9bce85075b7..4d7903bc8dd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter002/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addInstanceFilter.instancefilter002 * nsk.jdi.MethodEntryRequest.addInstanceFilter.instancefilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addInstanceFilter.instancefilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter003/TestDescription.java index 42a57187ded..7b3c2c0e73d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter003/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addInstanceFilter.instancefilter003 * nsk.jdi.MethodEntryRequest.addInstanceFilter.instancefilter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addInstanceFilter.instancefilter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter004/TestDescription.java index d501a48b8ed..31feda94322 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addInstanceFilter/instancefilter004/TestDescription.java @@ -79,13 +79,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addInstanceFilter.instancefilter004 * nsk.jdi.MethodEntryRequest.addInstanceFilter.instancefilter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addInstanceFilter.instancefilter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter001/TestDescription.java index 937b83a95eb..fbea9e5c89a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addThreadFilter.threadfilter001 * nsk.jdi.MethodEntryRequest.addThreadFilter.threadfilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addThreadFilter.threadfilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter002/TestDescription.java index e598a276db8..5f862162c91 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter002/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addThreadFilter.threadfilter002 * nsk.jdi.MethodEntryRequest.addThreadFilter.threadfilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addThreadFilter.threadfilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter003/TestDescription.java index 604bb89d2ad..e51d9470be5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter003/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addThreadFilter.threadfilter003 * nsk.jdi.MethodEntryRequest.addThreadFilter.threadfilter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addThreadFilter.threadfilter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter004/TestDescription.java index b1203d89aec..8d7e876850f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addThreadFilter/threadfilter004/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.MethodEntryRequest.addThreadFilter.threadfilter004 * nsk.jdi.MethodEntryRequest.addThreadFilter.threadfilter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodEntryRequest.addThreadFilter.threadfilter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/_itself_/methodexit001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/_itself_/methodexit001/TestDescription.java index 3845e752d35..1528658418d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/_itself_/methodexit001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/_itself_/methodexit001/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.MethodExitEvent._itself_.methodexit001 * nsk.jdi.MethodExitEvent._itself_.methodexit001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitEvent._itself_.methodexit001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/method/method001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/method/method001/TestDescription.java index 22f9a8ae877..cb557825dfa 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/method/method001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/method/method001/TestDescription.java @@ -81,13 +81,13 @@ * /test/lib * @build nsk.jdi.MethodExitEvent.method.method001 * nsk.jdi.MethodExitEvent.method.method001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitEvent.method.method001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/method/method002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/method/method002/TestDescription.java index 14e871eac55..6a7dfd9b89f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/method/method002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/method/method002/TestDescription.java @@ -82,13 +82,13 @@ * /test/lib * @build nsk.jdi.MethodExitEvent.method.method002 * nsk.jdi.MethodExitEvent.method.method002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitEvent.method.method002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue001/returnValue001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue001/returnValue001.java index 82da047b0f3..0baa005e500 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue001/returnValue001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue001/returnValue001.java @@ -46,14 +46,14 @@ * /test/lib * @build nsk.jdi.MethodExitEvent.returnValue.returnValue001.returnValue001 * nsk.jdi.MethodExitEvent.returnValue.returnValue001.returnValue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitEvent.returnValue.returnValue001.returnValue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.MethodExitEvent.returnValue.returnValue001; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue002/returnValue002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue002/returnValue002.java index ea40253adb5..734ca5f1016 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue002/returnValue002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue002/returnValue002.java @@ -36,14 +36,14 @@ * /test/lib * @build nsk.jdi.MethodExitEvent.returnValue.returnValue002.returnValue002 * nsk.jdi.MethodExitEvent.returnValue.returnValue002.returnValue002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitEvent.returnValue.returnValue002.returnValue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.MethodExitEvent.returnValue.returnValue002; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue003/returnValue003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue003/returnValue003.java index aa3233f6fb0..5a3ee68e529 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue003/returnValue003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue003/returnValue003.java @@ -47,14 +47,14 @@ * /test/lib * @build nsk.jdi.MethodExitEvent.returnValue.returnValue003.returnValue003 * nsk.jdi.MethodExitEvent.returnValue.returnValue003.returnValue003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitEvent.returnValue.returnValue003.returnValue003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.MethodExitEvent.returnValue.returnValue003; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue004/returnValue004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue004/returnValue004.java index be8ad91d42d..5ab4cceac2e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue004/returnValue004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitEvent/returnValue/returnValue004/returnValue004.java @@ -47,14 +47,14 @@ * /test/lib * @build nsk.jdi.MethodExitEvent.returnValue.returnValue004.returnValue004 * nsk.jdi.MethodExitEvent.returnValue.returnValue004.returnValue004a - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.MethodExitEvent.returnValue.returnValue004.returnValue004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.MethodExitEvent.returnValue.returnValue004; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/_bounds_/filters001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/_bounds_/filters001/TestDescription.java index 616671e2f20..ee4984368f8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/_bounds_/filters001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/_bounds_/filters001/TestDescription.java @@ -46,13 +46,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest._bounds_.filters001 * nsk.jdi.MethodExitRequest._bounds_.filters001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest._bounds_.filters001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter001/TestDescription.java index 0770a23cb45..61328385516 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter001/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addClassExclusionFilter.filter001 * nsk.jdi.MethodExitRequest.addClassExclusionFilter.filter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addClassExclusionFilter.filter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter002/TestDescription.java index 83e887d7285..3a78b5d7041 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter002/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addClassExclusionFilter.filter002 * nsk.jdi.MethodExitRequest.addClassExclusionFilter.filter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addClassExclusionFilter.filter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_rt/filter_rt001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_rt/filter_rt001/TestDescription.java index fbc592ccc35..a7c2430c54e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_rt/filter_rt001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_rt/filter_rt001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addClassFilter_rt.filter_rt001 * nsk.jdi.MethodExitRequest.addClassFilter_rt.filter_rt001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addClassFilter_rt.filter_rt001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_rt/filter_rt002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_rt/filter_rt002/TestDescription.java index e20653793b5..b51a1511978 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_rt/filter_rt002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_rt/filter_rt002/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addClassFilter_rt.filter_rt002 * nsk.jdi.MethodExitRequest.addClassFilter_rt.filter_rt002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addClassFilter_rt.filter_rt002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_rt/filter_rt003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_rt/filter_rt003/TestDescription.java index e304c7f47e2..b8338a02948 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_rt/filter_rt003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_rt/filter_rt003/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addClassFilter_rt.filter_rt003 * nsk.jdi.MethodExitRequest.addClassFilter_rt.filter_rt003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addClassFilter_rt.filter_rt003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_s/filter_s001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_s/filter_s001/TestDescription.java index 4cb9dcd4d30..a7807950386 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_s/filter_s001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_s/filter_s001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addClassFilter_s.filter_s001 * nsk.jdi.MethodExitRequest.addClassFilter_s.filter_s001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addClassFilter_s.filter_s001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_s/filter_s002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_s/filter_s002/TestDescription.java index ea5fa72a402..d92bd09266b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_s/filter_s002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassFilter_s/filter_s002/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addClassFilter_s.filter_s002 * nsk.jdi.MethodExitRequest.addClassFilter_s.filter_s002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addClassFilter_s.filter_s002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter001/TestDescription.java index c8a5604e857..eaadbc5f077 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter001/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addInstanceFilter.instancefilter001 * nsk.jdi.MethodExitRequest.addInstanceFilter.instancefilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addInstanceFilter.instancefilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter002/TestDescription.java index ef630007ff9..55bd1cf39a6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter002/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addInstanceFilter.instancefilter002 * nsk.jdi.MethodExitRequest.addInstanceFilter.instancefilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addInstanceFilter.instancefilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter003/TestDescription.java index 4bd73a8192c..6291d6f66b7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter003/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addInstanceFilter.instancefilter003 * nsk.jdi.MethodExitRequest.addInstanceFilter.instancefilter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addInstanceFilter.instancefilter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter004/TestDescription.java index e87d027ce8c..8478efa6101 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addInstanceFilter/instancefilter004/TestDescription.java @@ -79,13 +79,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addInstanceFilter.instancefilter004 * nsk.jdi.MethodExitRequest.addInstanceFilter.instancefilter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addInstanceFilter.instancefilter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter001/TestDescription.java index 5142ba28cbd..4efa002520c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addThreadFilter.threadfilter001 * nsk.jdi.MethodExitRequest.addThreadFilter.threadfilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addThreadFilter.threadfilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter002/TestDescription.java index 53a97503a1f..d2f95215d86 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter002/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addThreadFilter.threadfilter002 * nsk.jdi.MethodExitRequest.addThreadFilter.threadfilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addThreadFilter.threadfilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter003/TestDescription.java index 397c0b2e33e..fde548a189d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter003/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addThreadFilter.threadfilter003 * nsk.jdi.MethodExitRequest.addThreadFilter.threadfilter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addThreadFilter.threadfilter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter004/TestDescription.java index af17b2de1ef..936232d514a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addThreadFilter/threadfilter004/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.MethodExitRequest.addThreadFilter.threadfilter004 * nsk.jdi.MethodExitRequest.addThreadFilter.threadfilter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.MethodExitRequest.addThreadFilter.threadfilter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Mirror/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Mirror/hashCode/hashcode001/TestDescription.java index 55a2b251486..7fec0159a6d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Mirror/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Mirror/hashCode/hashcode001/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.Mirror.hashCode.hashcode001 * nsk.jdi.Mirror.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Mirror.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Mirror/toString/tostring001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Mirror/toString/tostring001/TestDescription.java index 2e8e0296765..ef19da51c9e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Mirror/toString/tostring001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Mirror/toString/tostring001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.Mirror.toString.tostring001 * nsk.jdi.Mirror.toString.tostring001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Mirror.toString.tostring001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Mirror/virtualMachine/virtualmachine001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Mirror/virtualMachine/virtualmachine001/TestDescription.java index e805b8cfb52..7035d64cdbc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Mirror/virtualMachine/virtualmachine001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Mirror/virtualMachine/virtualmachine001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.Mirror.virtualMachine.virtualmachine001 * nsk.jdi.Mirror.virtualMachine.virtualmachine001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Mirror.virtualMachine.virtualmachine001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ModificationWatchpointEvent/_itself_/mwevent001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ModificationWatchpointEvent/_itself_/mwevent001/TestDescription.java index ac71ac60c90..d15622d5ba1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ModificationWatchpointEvent/_itself_/mwevent001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ModificationWatchpointEvent/_itself_/mwevent001/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.ModificationWatchpointEvent._itself_.mwevent001 * nsk.jdi.ModificationWatchpointEvent._itself_.mwevent001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ModificationWatchpointEvent._itself_.mwevent001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ModificationWatchpointEvent/valueToBe/valuetobe001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ModificationWatchpointEvent/valueToBe/valuetobe001/TestDescription.java index 76829e4ce75..a24fafc2a0d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ModificationWatchpointEvent/valueToBe/valuetobe001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ModificationWatchpointEvent/valueToBe/valuetobe001/TestDescription.java @@ -76,13 +76,13 @@ * /test/lib * @build nsk.jdi.ModificationWatchpointEvent.valueToBe.valuetobe001 * nsk.jdi.ModificationWatchpointEvent.valueToBe.valuetobe001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ModificationWatchpointEvent.valueToBe.valuetobe001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ModificationWatchpointEvent/valueToBe/valuetobe002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ModificationWatchpointEvent/valueToBe/valuetobe002/TestDescription.java index 74c06e403a9..f3fc8c3c1d7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ModificationWatchpointEvent/valueToBe/valuetobe002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ModificationWatchpointEvent/valueToBe/valuetobe002/TestDescription.java @@ -77,13 +77,13 @@ * /test/lib * @build nsk.jdi.ModificationWatchpointEvent.valueToBe.valuetobe002 * nsk.jdi.ModificationWatchpointEvent.valueToBe.valuetobe002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ModificationWatchpointEvent.valueToBe.valuetobe002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/MonitorContendedEnterRequest001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/MonitorContendedEnterRequest001/TestDescription.java index de822350544..f863ef6b735 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/MonitorContendedEnterRequest001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/MonitorContendedEnterRequest001/TestDescription.java @@ -33,7 +33,7 @@ * This is stress test for MonitorContendedEnterRequest and MonitorContendedEnterEvent, debugger force * debuggee generate several thousands of MonitorContendedEnteredEvents and check that all events was received and contains * correct information. - * Test executes class nsk.share.jdi.EventTestTemplates$StressTestTemplate which uses JDI events testing + * Test executes class nsk.share.jdi.StressTestTemplate which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debuggee VM to create number of objects which should generate events during test @@ -48,17 +48,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.StressTestTemplate * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$StressTestTemplate + * @run main/othervm/native + * nsk.share.jdi.StressTestTemplate * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTER * -eventTypes MONITOR_CONTENTED_ENTER * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/MonitorContendedEnterRequest002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/MonitorContendedEnterRequest002/TestDescription.java index f58487d5ef7..f0a80388ffe 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/MonitorContendedEnterRequest002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/MonitorContendedEnterRequest002/TestDescription.java @@ -33,7 +33,7 @@ * This is stress test for MonitorContendedEnterRequest and MonitorContendedEnterEvent, debugger force * debuggee start several threads which simultaneously generate MonitorContendedEnteredEvents and checks that * all events was received and contain correct information. - * Test executes class nsk.share.jdi.EventTestTemplates$StressTestTemplate which uses JDI events testing + * Test executes class nsk.share.jdi.StressTestTemplate which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debuggee VM to create number of objects which should generate events during test @@ -48,17 +48,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.StressTestTemplate * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$StressTestTemplate + * @run main/othervm/native + * nsk.share.jdi.StressTestTemplate * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTER * -eventTypes MONITOR_CONTENTED_ENTER * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addClassExclusionFilter/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addClassExclusionFilter/TestDescription.java index 4eec47def51..7b63c52d829 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addClassExclusionFilter/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addClassExclusionFilter/TestDescription.java @@ -39,7 +39,7 @@ * - begins with '*' ('*Subclass') * - ending with '*' ('nsk.share.jdi.MonitorEnterExecutor_*') * - class name ('nsk.share.jdi.MonitorEnterExecutor_1Subclass') - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -57,17 +57,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassExclusionFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest + * @run main/othervm/native + * nsk.share.jdi.ClassExclusionFilterTest * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTER * -eventType MONITOR_CONTENTED_ENTER * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addClassFilter_ClassName/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addClassFilter_ClassName/TestDescription.java index 4c52669fad5..f6f296702a6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addClassFilter_ClassName/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addClassFilter_ClassName/TestDescription.java @@ -40,7 +40,7 @@ * - begins with '*' ('*Subclass') * - ending with '*' ('nsk.share.jdi.MonitorEnterExecutor_*') * - class name ('nsk.share.jdi.MonitorEnterExecutor_1Subclass') - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -58,17 +58,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassFilterTest_ClassName * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ClassFilterTest_ClassName + * @run main/othervm/native + * nsk.share.jdi.ClassFilterTest_ClassName * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTER * -eventType MONITOR_CONTENTED_ENTER * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addClassFilter_ReferenceType/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addClassFilter_ReferenceType/TestDescription.java index 43d02916e4f..a61b8326d93 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addClassFilter_ReferenceType/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addClassFilter_ReferenceType/TestDescription.java @@ -38,7 +38,7 @@ * Test uses 2 event filters: * - add to request filter for class which has subclass (expect events for class and its subclasses) * - add to request filter for class without subclasses - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -56,17 +56,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassFilterTest_ReferenceType * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ClassFilterTest_ReferenceType + * @run main/othervm/native + * nsk.share.jdi.ClassFilterTest_ReferenceType * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTER * -eventType MONITOR_CONTENTED_ENTER * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addInstanceFilter/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addInstanceFilter/TestDescription.java index 0f1058081e4..63e3d27b1a0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addInstanceFilter/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addInstanceFilter/TestDescription.java @@ -39,7 +39,7 @@ * - add to request filter for single object * - add to request filter for the same object 2 times, expect behavior such as in previous case * - add to request filter for 2 different objects, so events shouldn't be received - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -57,17 +57,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.InstanceFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$InstanceFilterTest + * @run main/othervm/native + * nsk.share.jdi.InstanceFilterTest * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTER * -eventType MONITOR_CONTENTED_ENTER * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addThreadFilter/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addThreadFilter/TestDescription.java index 021ef8e634d..333ef845808 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addThreadFilter/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnterRequest/addThreadFilter/TestDescription.java @@ -39,9 +39,9 @@ * - add to request filter for single thread * - add to request filter for the same thread 2 times, expect behavior such as in previous case * - add to request filter for 2 different threads, so events shouldn't be received - * Test execute class nsk.share.jdi.EventTestTemplates$ThreadFilterTest which use JDI events testing + * Test execute class nsk.share.jdi.ThreadFilterTest which use JDI events testing * framework based on classes from package nsk.share.jdi.*. - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -59,17 +59,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ThreadFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ThreadFilterTest + * @run main/othervm/native + * nsk.share.jdi.ThreadFilterTest * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTER * -eventType MONITOR_CONTENTED_ENTER * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/MonitorContendedEnteredRequest001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/MonitorContendedEnteredRequest001/TestDescription.java index d7853313e0e..67ef68c0a51 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/MonitorContendedEnteredRequest001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/MonitorContendedEnteredRequest001/TestDescription.java @@ -33,7 +33,7 @@ * This is stress test for MonitorContendedEnteredRequest and MonitorContendedEnteredEvent, debugger force * debuggee generate several thousands of MonitorContendedEnteredEvents and checks that all events was received and contains * correct information. - * Test executes class nsk.share.jdi.EventTestTemplates$StressTestTemplate which uses JDI events testing + * Test executes class nsk.share.jdi.StressTestTemplate which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -48,17 +48,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.StressTestTemplate * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$StressTestTemplate + * @run main/othervm/native + * nsk.share.jdi.StressTestTemplate * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTERED * -eventTypes MONITOR_CONTENTED_ENTERED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/MonitorContendedEnteredRequest002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/MonitorContendedEnteredRequest002/TestDescription.java index 02098968653..25df2f0632e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/MonitorContendedEnteredRequest002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/MonitorContendedEnteredRequest002/TestDescription.java @@ -33,7 +33,7 @@ * This is stress test for MonitorContendedEnteredRequest and MonitorContendedEnteredEvent, debugger forces * debuggee start several threads which simultaneously generate MonitorContendedEnteredEvents and checks that * all events was received and contains correct information. - * Test executes class nsk.share.jdi.EventTestTemplates$StressTestTemplate which uses JDI events testing + * Test executes class nsk.share.jdi.StressTestTemplate which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -48,17 +48,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.StressTestTemplate * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$StressTestTemplate + * @run main/othervm/native + * nsk.share.jdi.StressTestTemplate * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTERED * -eventTypes MONITOR_CONTENTED_ENTERED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addClassExclusionFilter/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addClassExclusionFilter/TestDescription.java index 671041a87ad..9d3051fa25c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addClassExclusionFilter/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addClassExclusionFilter/TestDescription.java @@ -39,7 +39,7 @@ * - begins with '*' ('*Subclass') * - ending with '*' ('nsk.share.jdi.MonitorEnterExecutor_*') * - class name ('nsk.share.jdi.MonitorEnterExecutor_1Subclass') - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -57,17 +57,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassExclusionFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest + * @run main/othervm/native + * nsk.share.jdi.ClassExclusionFilterTest * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTERED * -eventType MONITOR_CONTENTED_ENTERED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addClassFilter_ClassName/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addClassFilter_ClassName/TestDescription.java index 39df5add572..2136f371b01 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addClassFilter_ClassName/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addClassFilter_ClassName/TestDescription.java @@ -40,7 +40,7 @@ * - begins with '*' ('*Subclass') * - ending with '*' ('nsk.share.jdi.MonitorEnterExecutor_*') * - class name ('nsk.share.jdi.MonitorEnterExecutor_1Subclass') - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -58,17 +58,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassFilterTest_ClassName * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ClassFilterTest_ClassName + * @run main/othervm/native + * nsk.share.jdi.ClassFilterTest_ClassName * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTERED * -eventType MONITOR_CONTENTED_ENTERED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addClassFilter_ReferenceType/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addClassFilter_ReferenceType/TestDescription.java index 1a9be9c9389..fc899a1a51a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addClassFilter_ReferenceType/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addClassFilter_ReferenceType/TestDescription.java @@ -38,7 +38,7 @@ * Test uses 2 event filters: * - add to request filter for class which has subclass (expect events for class and its subclasses) * - add to request filter for class without subclasses - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -56,17 +56,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassFilterTest_ReferenceType * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ClassFilterTest_ReferenceType + * @run main/othervm/native + * nsk.share.jdi.ClassFilterTest_ReferenceType * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTERED * -eventType MONITOR_CONTENTED_ENTERED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addInstanceFilter/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addInstanceFilter/TestDescription.java index 5d2f6a9a833..6415ee25bd2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addInstanceFilter/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addInstanceFilter/TestDescription.java @@ -39,7 +39,7 @@ * - add to request filter for single object * - add to request filter for the same object 2 times, expect behavior such as in previous case * - add to request filter for 2 different objects, so events shouldn't be received - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -57,17 +57,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.InstanceFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$InstanceFilterTest + * @run main/othervm/native + * nsk.share.jdi.InstanceFilterTest * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTERED * -eventType MONITOR_CONTENTED_ENTERED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addThreadFilter/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addThreadFilter/TestDescription.java index 9b4967020b1..b75a9749208 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addThreadFilter/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorContendedEnteredRequest/addThreadFilter/TestDescription.java @@ -39,7 +39,7 @@ * - add to request filter for single thread * - add to request filter for the same thread 2 times, expect behavior such as in previous case * - add to request filter for 2 different threads, so events shouldn't be received - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -57,17 +57,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ThreadFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ThreadFilterTest + * @run main/othervm/native + * nsk.share.jdi.ThreadFilterTest * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTERED * -eventType MONITOR_CONTENTED_ENTERED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/MonitorWaitRequest001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/MonitorWaitRequest001/TestDescription.java index 721c5c51c81..a3861420ad0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/MonitorWaitRequest001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/MonitorWaitRequest001/TestDescription.java @@ -33,7 +33,7 @@ * This is stress test for MonitorWaitRequest and MonitorWaitEvent, debugger force * debuggee generate several thousands of MonitorWaitEvents and checks that all events was received and contain * correct information. - * Test executes class nsk.share.jdi.EventTestTemplates$StressTestTemplate which uses JDI events testing + * Test executes class nsk.share.jdi.StressTestTemplate which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debuggee VM to create number of objects which should generate events during test @@ -49,17 +49,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.StressTestTemplate * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$StressTestTemplate + * @run main/othervm + * nsk.share.jdi.StressTestTemplate * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventTypes MONITOR_WAIT * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee * -eventsNumber 100 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/MonitorWaitRequest002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/MonitorWaitRequest002/TestDescription.java index 3e36caf2cc8..ec9b3612b35 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/MonitorWaitRequest002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/MonitorWaitRequest002/TestDescription.java @@ -33,7 +33,7 @@ * This is stress test for MonitorWaitRequest and MonitorWaitEvent, debugger force * debuggee start several threads which simultaneously generate MonitorWaitEvents and checks that * all events was received and contain correct information. - * Test executes class nsk.share.jdi.EventTestTemplates$StressTestTemplate which uses JDI events testing + * Test executes class nsk.share.jdi.StressTestTemplate which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debuggee VM to create number of objects which should generate events during test @@ -49,17 +49,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.StressTestTemplate * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$StressTestTemplate + * @run main/othervm + * nsk.share.jdi.StressTestTemplate * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventTypes MONITOR_WAIT * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee * -eventsNumber 10 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addClassExclusionFilter/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addClassExclusionFilter/TestDescription.java index eae771f1f2a..fb06821237c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addClassExclusionFilter/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addClassExclusionFilter/TestDescription.java @@ -39,7 +39,7 @@ * - begins with '*' ('*Subclass') * - ending with '*' ('nsk.share.jdi.MonitorWaitExecutor_*') * - class name ('nsk.share.jdi.MonitorWaitExecutor_1Subclass') - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -53,17 +53,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassExclusionFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest + * @run main/othervm + * nsk.share.jdi.ClassExclusionFilterTest * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventType MONITOR_WAIT * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee * -classPatterns nsk.share.jdi.MonitorWaitExecutor_'*':'*'Subclass:nsk.share.jdi.MonitorWaitExecutor_1Subclass diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addClassFilter_ClassName/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addClassFilter_ClassName/TestDescription.java index 90b455dcfbe..009df67f525 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addClassFilter_ClassName/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addClassFilter_ClassName/TestDescription.java @@ -40,7 +40,7 @@ * - begins with '*' ('*Subclass') * - ending with '*' ('nsk.share.jdi.MonitorWaitExecutor_*') * - class name ('nsk.share.jdi.MonitorWaitExecutor_1Subclass') - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -54,17 +54,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassFilterTest_ClassName * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ClassFilterTest_ClassName + * @run main/othervm + * nsk.share.jdi.ClassFilterTest_ClassName * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventType MONITOR_WAIT * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee * -classPatterns nsk.share.jdi.MonitorWaitExecutor_'*':'*'Subclass:nsk.share.jdi.MonitorWaitExecutor_1Subclass diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addClassFilter_ReferenceType/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addClassFilter_ReferenceType/TestDescription.java index 6ae35ba2f06..0757315f179 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addClassFilter_ReferenceType/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addClassFilter_ReferenceType/TestDescription.java @@ -38,7 +38,7 @@ * Test uses 2 event filters: * - add to request filter for class which has subclass (expect events for class and its subclasses) * - add to request filter for class without subclasses - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -52,17 +52,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassFilterTest_ReferenceType * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ClassFilterTest_ReferenceType + * @run main/othervm + * nsk.share.jdi.ClassFilterTest_ReferenceType * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventType MONITOR_WAIT * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee * -classPatterns nsk.share.jdi.MonitorWaitExecutor_1Subclass:nsk.share.jdi.MonitorWaitExecutor_2Subclass diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addInstanceFilter/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addInstanceFilter/TestDescription.java index d1b168e8215..ed4a1326690 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addInstanceFilter/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addInstanceFilter/TestDescription.java @@ -39,7 +39,7 @@ * - add to request filter for single object * - add to request filter for the same object 2 times, expect behavior such as in previous case * - add to request filter for 2 different objects, so events shouldn't be received - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -53,17 +53,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.InstanceFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$InstanceFilterTest + * @run main/othervm + * nsk.share.jdi.InstanceFilterTest * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventType MONITOR_WAIT * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addThreadFilter/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addThreadFilter/TestDescription.java index e3a72c2f259..990524ab8fc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addThreadFilter/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitRequest/addThreadFilter/TestDescription.java @@ -39,7 +39,7 @@ * - add to request filter for single thread * - add to request filter for the same thread 2 times, expect behavior such as in previous case * - add to request filter for 2 different threads, so events shouldn't be received - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -53,17 +53,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ThreadFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ThreadFilterTest + * @run main/othervm + * nsk.share.jdi.ThreadFilterTest * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventType MONITOR_WAIT * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/MonitorWaitedRequest001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/MonitorWaitedRequest001/TestDescription.java index d54e424dcf3..74ddb06a62b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/MonitorWaitedRequest001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/MonitorWaitedRequest001/TestDescription.java @@ -38,7 +38,7 @@ * - another thread wakes up waiting thread using notify() method * - another thread wakes up waiting thread using notifyAll() method * - another thread interrupts waiting thread using interrupt() method - * Test executes class nsk.share.jdi.EventTestTemplates$StressTestTemplate which uses JDI events testing + * Test executes class nsk.share.jdi.StressTestTemplate which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debuggee VM to create number of objects which should generate events during test @@ -54,17 +54,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.StressTestTemplate * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$StressTestTemplate + * @run main/othervm + * nsk.share.jdi.StressTestTemplate * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventTypes MONITOR_WAITED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee * -eventsNumber 100 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/MonitorWaitedRequest002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/MonitorWaitedRequest002/TestDescription.java index 6bbaee3e366..22cbf3a4bd8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/MonitorWaitedRequest002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/MonitorWaitedRequest002/TestDescription.java @@ -38,7 +38,7 @@ * - another thread wakes up waiting thread using notify() method * - another thread wakes up waiting thread using notifyAll() method * - another thread interrupts waiting thread using interrupt() method - * Test executes class nsk.share.jdi.EventTestTemplates$StressTestTemplate which uses JDI events testing + * Test executes class nsk.share.jdi.StressTestTemplate which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -54,17 +54,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.StressTestTemplate * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$StressTestTemplate + * @run main/othervm + * nsk.share.jdi.StressTestTemplate * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventTypes MONITOR_WAITED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee * -eventsNumber 10 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassExclusionFilter/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassExclusionFilter/TestDescription.java index 27a149e91d0..3202b48666c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassExclusionFilter/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassExclusionFilter/TestDescription.java @@ -44,7 +44,7 @@ * - another thread wakes up waiting thread using notify() method * - another thread wakes up waiting thread using notifyAll() method * - another thread interrupts waiting thread using interrupt() method - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -58,18 +58,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassExclusionFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee * @run main/othervm - * PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest + * nsk.share.jdi.ClassExclusionFilterTest * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventType MONITOR_WAITED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee * -classPatterns nsk.share.jdi.MonitorWaitExecutor_'*':'*'Subclass:nsk.share.jdi.MonitorWaitExecutor_1Subclass diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassFilter_ClassName/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassFilter_ClassName/TestDescription.java index 7cb347fb943..e369acfb4f9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassFilter_ClassName/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassFilter_ClassName/TestDescription.java @@ -45,7 +45,7 @@ * - another thread wakes up waiting thread using notify() method * - another thread wakes up waiting thread using notifyAll() method * - another thread interrupts waiting thread using interrupt() method - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -59,17 +59,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassFilterTest_ClassName * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ClassFilterTest_ClassName + * @run main/othervm + * nsk.share.jdi.ClassFilterTest_ClassName * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventType MONITOR_WAITED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee * -classPatterns nsk.share.jdi.MonitorWaitExecutor_'*':'*'Subclass:nsk.share.jdi.MonitorWaitExecutor_1Subclass diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassFilter_ReferenceType/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassFilter_ReferenceType/TestDescription.java index 8f25a80e685..38af683aa7d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassFilter_ReferenceType/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addClassFilter_ReferenceType/TestDescription.java @@ -43,7 +43,7 @@ * - another thread wakes up waiting thread using notify() method * - another thread wakes up waiting thread using notifyAll() method * - another thread interrupts waiting thread using interrupt() method - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -57,17 +57,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassFilterTest_ReferenceType * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ClassFilterTest_ReferenceType + * @run main/othervm + * nsk.share.jdi.ClassFilterTest_ReferenceType * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventType MONITOR_WAITED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee * -classPatterns nsk.share.jdi.MonitorWaitExecutor_1Subclass:nsk.share.jdi.MonitorWaitExecutor_2Subclass diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addInstanceFilter/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addInstanceFilter/TestDescription.java index 56af75b0c98..56b2deb3d72 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addInstanceFilter/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addInstanceFilter/TestDescription.java @@ -44,7 +44,7 @@ * - another thread wakes up waiting thread using notify() method * - another thread wakes up waiting thread using notifyAll() method * - another thread interrupts waiting thread using interrupt() method - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -58,17 +58,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.InstanceFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$InstanceFilterTest + * @run main/othervm + * nsk.share.jdi.InstanceFilterTest * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventType MONITOR_WAITED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addThreadFilter/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addThreadFilter/TestDescription.java index 8f74353c9c5..7bb5b22d612 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addThreadFilter/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MonitorWaitedRequest/addThreadFilter/TestDescription.java @@ -44,7 +44,7 @@ * - another thread wakes up waiting thread using notify() method * - another thread wakes up waiting thread using notifyAll() method * - another thread interrupts waiting thread using interrupt() method - * Test executes class nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest which uses JDI events testing + * Test executes class nsk.share.jdi.ClassExclusionFilterTest which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debugge VM to create number of objects which should generate events during test @@ -58,17 +58,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ThreadFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$ThreadFilterTest + * @run main/othervm + * nsk.share.jdi.ThreadFilterTest * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -eventType MONITOR_WAITED * -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/_bounds_/bounds001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/_bounds_/bounds001/TestDescription.java index 3c33990d34b..689e54b5991 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/_bounds_/bounds001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/_bounds_/bounds001/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.ObjectReference._bounds_.bounds001 * nsk.jdi.ObjectReference._bounds_.bounds001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference._bounds_.bounds001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/_bounds_/bounds002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/_bounds_/bounds002/TestDescription.java index d5dbee3e79a..7f1fe909e41 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/_bounds_/bounds002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/_bounds_/bounds002/TestDescription.java @@ -46,13 +46,13 @@ * /test/lib * @build nsk.jdi.ObjectReference._bounds_.bounds002 * nsk.jdi.ObjectReference._bounds_.bounds002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference._bounds_.bounds002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/_bounds_/bounds003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/_bounds_/bounds003/TestDescription.java index aeb12d559cc..f12cea02f53 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/_bounds_/bounds003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/_bounds_/bounds003/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.ObjectReference._bounds_.bounds003 * nsk.jdi.ObjectReference._bounds_.bounds003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference._bounds_.bounds003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/disableCollection/disablecollection001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/disableCollection/disablecollection001/TestDescription.java index 1ff71d254a5..59002767d40 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/disableCollection/disablecollection001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/disableCollection/disablecollection001/TestDescription.java @@ -74,13 +74,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.disableCollection.disablecollection001 * nsk.jdi.ObjectReference.disableCollection.disablecollection001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.disableCollection.disablecollection001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/disableCollection/disablecollection002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/disableCollection/disablecollection002/TestDescription.java index 23c1f05d984..ea1073e6f88 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/disableCollection/disablecollection002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/disableCollection/disablecollection002/TestDescription.java @@ -75,13 +75,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.disableCollection.disablecollection002 * nsk.jdi.ObjectReference.disableCollection.disablecollection002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.disableCollection.disablecollection002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xmx256M ${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="-Xmx256M ${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/entryCount/entrycount001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/entryCount/entrycount001/TestDescription.java index f23d079a3db..e3fad22e173 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/entryCount/entrycount001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/entryCount/entrycount001/TestDescription.java @@ -74,13 +74,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.entryCount.entrycount001 * nsk.jdi.ObjectReference.entryCount.entrycount001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.entryCount.entrycount001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/entryCount/entrycount002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/entryCount/entrycount002/TestDescription.java index 070ea7c9c8a..c442976413b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/entryCount/entrycount002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/entryCount/entrycount002/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.entryCount.entrycount002 * nsk.jdi.ObjectReference.entryCount.entrycount002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.entryCount.entrycount002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/equals/equals001/TestDescription.java index 2ed35009fc9..89a33c375ea 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/equals/equals001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.equals.equals001 * nsk.jdi.ObjectReference.equals.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue001/TestDescription.java index e0ed1568f3d..cb3687b09bb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue001/TestDescription.java @@ -74,13 +74,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.getValue.getvalue001 * nsk.jdi.ObjectReference.getValue.getvalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.getValue.getvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue002/TestDescription.java index 3dd356e447a..815d8056e73 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue002/TestDescription.java @@ -77,13 +77,13 @@ * @clean nsk.jdi.ObjectReference.getValue.getvalue002a * @compile -g:lines,source,vars ../getvalue002a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.getValue.getvalue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue003/TestDescription.java index 6bd6cdfc462..57131adfab7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue003/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.getValue.getvalue003 * nsk.jdi.ObjectReference.getValue.getvalue003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.getValue.getvalue003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue004/TestDescription.java index 984294744f5..72e1ac9ba9e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue004/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.getValue.getvalue004 * nsk.jdi.ObjectReference.getValue.getvalue004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.getValue.getvalue004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues001/TestDescription.java index ed9474becf3..f751c7af846 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues001/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.getValues.getvalues001 * nsk.jdi.ObjectReference.getValues.getvalues001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.getValues.getvalues001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues002/TestDescription.java index d24f92a3687..bad4db9c79b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues002/TestDescription.java @@ -73,13 +73,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.getValues.getvalues002 * nsk.jdi.ObjectReference.getValues.getvalues002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.getValues.getvalues002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues003/TestDescription.java index 2501b678eb8..146381468ca 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues003/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.getValues.getvalues003 * nsk.jdi.ObjectReference.getValues.getvalues003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.getValues.getvalues003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/hashCode/hashcode001/TestDescription.java index 195c3214a81..10e5af569a5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/hashCode/hashcode001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.hashCode.hashcode001 * nsk.jdi.ObjectReference.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod001/TestDescription.java index 74ba2cc9e6c..2365baac7d7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.invokeMethod.invokemethod001 * nsk.jdi.ObjectReference.invokeMethod.invokemethod001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod002/TestDescription.java index cc3f9a27aa1..a8508e23821 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod002/TestDescription.java @@ -47,13 +47,13 @@ * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod002t * @compile -g:lines,source,vars ../invokemethod002t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod003/TestDescription.java index 65490b7d64f..e5470416e18 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod003/TestDescription.java @@ -47,13 +47,13 @@ * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod003t * @compile -g:lines,source,vars ../invokemethod003t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod004/TestDescription.java index fb719aeb136..a87c206b50c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod004/TestDescription.java @@ -46,13 +46,13 @@ * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod004t * @compile -g:lines,source,vars ../invokemethod004t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod005/TestDescription.java index 236d5471f5b..4bd11739aaa 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod005/TestDescription.java @@ -47,13 +47,13 @@ * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod005t * @compile -g:lines,source,vars ../invokemethod005t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod006/TestDescription.java index c597c279167..efbeeed74cb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod006/TestDescription.java @@ -48,13 +48,13 @@ * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod006t * @compile -g:lines,source,vars ../invokemethod006t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod007/TestDescription.java index 35c061e6571..bccd1c469e7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod007/TestDescription.java @@ -46,13 +46,13 @@ * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod007t * @compile -g:lines,source,vars ../invokemethod007t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod008/TestDescription.java index 3ebfb55ba32..6c67e49071d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod008/TestDescription.java @@ -50,13 +50,13 @@ * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod008t * @compile -g:lines,source,vars ../invokemethod008t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod008 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod009/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod009/TestDescription.java index 45758d24e3e..55f590e4d1c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod009/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod009/TestDescription.java @@ -54,13 +54,13 @@ * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod009t * @compile -g:lines,source,vars ../invokemethod009t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod009 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod010/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod010/TestDescription.java index fd7c21dc853..dc5b5467985 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod010/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod010/TestDescription.java @@ -58,13 +58,13 @@ * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod010t * @compile -g:lines,source,vars ../invokemethod010t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod010 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod011/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod011/TestDescription.java index 61436cb1360..4edc25608de 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod011/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod011/TestDescription.java @@ -62,13 +62,13 @@ * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod011t * @compile -g:lines,source,vars ../invokemethod011t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod011 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod012/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod012/TestDescription.java index 7da7d95a4ef..40163501cd8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod012/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod012/TestDescription.java @@ -55,13 +55,13 @@ * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod012t * @compile -g:lines,source,vars ../invokemethod012t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod012 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod013/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod013/TestDescription.java index 53635ae3b31..b3454866996 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod013/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod013/TestDescription.java @@ -55,13 +55,13 @@ * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod013t * @compile -g:lines,source,vars ../invokemethod013t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod013 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod014/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod014/TestDescription.java index c8cc6ee2834..19be546661e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod014/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/invokeMethod/invokemethod014/TestDescription.java @@ -51,13 +51,13 @@ * @clean nsk.jdi.ObjectReference.invokeMethod.invokemethod014t * @compile -g:lines,source,vars ../invokemethod014t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.invokeMethod.invokemethod014 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/isCollected/iscollected001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/isCollected/iscollected001/TestDescription.java index 529fa277706..f3d9b8b37d4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/isCollected/iscollected001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/isCollected/iscollected001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.isCollected.iscollected001 * nsk.jdi.ObjectReference.isCollected.iscollected001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.isCollected.iscollected001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/owningThread/owningthread001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/owningThread/owningthread001/TestDescription.java index e715063be4e..9037e0e2deb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/owningThread/owningthread001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/owningThread/owningthread001/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.owningThread.owningthread001 * nsk.jdi.ObjectReference.owningThread.owningthread001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.owningThread.owningthread001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/owningThread/owningthread002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/owningThread/owningthread002/TestDescription.java index 489bbd6855c..b38ac5fc480 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/owningThread/owningthread002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/owningThread/owningthread002/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.owningThread.owningthread002 * nsk.jdi.ObjectReference.owningThread.owningthread002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.owningThread.owningthread002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype001/TestDescription.java index c8320daaa01..035cf7cb634 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype001/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.referenceType.referencetype001 * nsk.jdi.ObjectReference.referenceType.referencetype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.referenceType.referencetype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype002/TestDescription.java index 09ab19b2b46..5c7c7cb50b5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype002/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.referenceType.referencetype002 * nsk.jdi.ObjectReference.referenceType.referencetype002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.referenceType.referencetype002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype003/TestDescription.java index 20774333d5e..659e58048f5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype003/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.referenceType.referencetype003 * nsk.jdi.ObjectReference.referenceType.referencetype003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.referenceType.referencetype003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype004/TestDescription.java index 279e01be850..a22e7f797f9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype004/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.referenceType.referencetype004 * nsk.jdi.ObjectReference.referenceType.referencetype004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.referenceType.referencetype004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype005/TestDescription.java index 41fd128fee6..dca6ec10464 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype005/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.referenceType.referencetype005 * nsk.jdi.ObjectReference.referenceType.referencetype005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.referenceType.referencetype005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype006/TestDescription.java index d83fd9adbd8..e7830397f2c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype006/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.referenceType.referencetype006 * nsk.jdi.ObjectReference.referenceType.referencetype006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.referenceType.referencetype006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype007/TestDescription.java index 1a6550e2415..1cc82723cf0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referenceType/referencetype007/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.referenceType.referencetype007 * nsk.jdi.ObjectReference.referenceType.referencetype007a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.referenceType.referencetype007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects001/referringObjects001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects001/referringObjects001.java index 865218da915..4079de50ea0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects001/referringObjects001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects001/referringObjects001.java @@ -57,14 +57,14 @@ * /test/lib * @build nsk.jdi.ObjectReference.referringObjects.referringObjects001.referringObjects001 * nsk.share.jdi.TestClass1 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ObjectReference.referringObjects.referringObjects001.referringObjects001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xmx128M ${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="-Xmx128M ${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ObjectReference.referringObjects.referringObjects001; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects002/referringObjects002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects002/referringObjects002.java index b92e9aea49e..95d3edf1050 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects002/referringObjects002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects002/referringObjects002.java @@ -56,14 +56,14 @@ * @build nsk.jdi.ObjectReference.referringObjects.referringObjects002.referringObjects002 * nsk.jdi.ObjectReference.referringObjects.referringObjects002.referringObjects002a * nsk.share.jdi.TestClass1 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ObjectReference.referringObjects.referringObjects002.referringObjects002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xmx256M ${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="-Xmx256M ${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects003/referringObjects003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects003/referringObjects003.java index 5a3dc4bb70a..a6d7f200159 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects003/referringObjects003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects003/referringObjects003.java @@ -57,14 +57,14 @@ * /test/lib * @build nsk.jdi.ObjectReference.referringObjects.referringObjects003.referringObjects003 * nsk.jdi.ObjectReference.referringObjects.referringObjects003.referringObjects003a - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ObjectReference.referringObjects.referringObjects003.referringObjects003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xmx256M ${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="-Xmx256M ${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ObjectReference.referringObjects.referringObjects003; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects004/referringObjects004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects004/referringObjects004.java index fbf95d6853b..853b07c4def 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects004/referringObjects004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects004/referringObjects004.java @@ -41,14 +41,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ObjectReference.referringObjects.referringObjects004.referringObjects004 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ObjectReference.referringObjects.referringObjects004.referringObjects004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ObjectReference.referringObjects.referringObjects004; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue001/TestDescription.java index 0ca6863f02a..1e7ebe480cb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue001/TestDescription.java @@ -86,13 +86,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.setValue.setvalue001 * nsk.jdi.ObjectReference.setValue.setvalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.setValue.setvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue002/TestDescription.java index 0ec1374f5fa..7095623e9d6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue002/TestDescription.java @@ -55,13 +55,13 @@ * @clean nsk.jdi.ObjectReference.setValue.setvalue002t * @compile -g:lines,source,vars ../setvalue002t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.setValue.setvalue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue003/TestDescription.java index 1f20feb69e9..4c60d25d706 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue003/TestDescription.java @@ -51,13 +51,13 @@ * @clean nsk.jdi.ObjectReference.setValue.setvalue003t * @compile -g:lines,source,vars ../setvalue003t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.setValue.setvalue003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue004/TestDescription.java index ec75216097a..6972ae46f28 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue004/TestDescription.java @@ -45,13 +45,13 @@ * @clean nsk.jdi.ObjectReference.setValue.setvalue004t * @compile -g:lines,source,vars ../setvalue004t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.setValue.setvalue004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue005/TestDescription.java index 053b386eaf4..c49d025c2f6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue005/TestDescription.java @@ -48,13 +48,13 @@ * @clean nsk.jdi.ObjectReference.setValue.setvalue005t * @compile -g:lines,source,vars ../setvalue005t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.setValue.setvalue005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/uniqueID/uniqueid001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/uniqueID/uniqueid001/TestDescription.java index fe550b935a9..a335c1b6ba9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/uniqueID/uniqueid001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/uniqueID/uniqueid001/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.uniqueID.uniqueid001 * nsk.jdi.ObjectReference.uniqueID.uniqueid001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.uniqueID.uniqueid001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads001/TestDescription.java index 47ce0f1493f..e82c6f8993e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads001/TestDescription.java @@ -75,13 +75,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.waitingThreads.waitingthreads001 * nsk.jdi.ObjectReference.waitingThreads.waitingthreads001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.waitingThreads.waitingthreads001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads002/TestDescription.java index d59108b9ec6..d09574d0c34 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads002/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.waitingThreads.waitingthreads002 * nsk.jdi.ObjectReference.waitingThreads.waitingthreads002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.waitingThreads.waitingthreads002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads003/TestDescription.java index 0983d26568c..cd1d7667117 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads003/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.waitingThreads.waitingthreads003 * nsk.jdi.ObjectReference.waitingThreads.waitingthreads003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.waitingThreads.waitingthreads003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads004/TestDescription.java index f8e83f73bd0..647e0ab3cfd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads004/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.ObjectReference.waitingThreads.waitingthreads004 * nsk.jdi.ObjectReference.waitingThreads.waitingthreads004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ObjectReference.waitingThreads.waitingthreads004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PathSearchingVirtualMachine/baseDirectory/directory001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PathSearchingVirtualMachine/baseDirectory/directory001/TestDescription.java index 5cbfa8fda62..55b722602cf 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PathSearchingVirtualMachine/baseDirectory/directory001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PathSearchingVirtualMachine/baseDirectory/directory001/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.PathSearchingVirtualMachine.baseDirectory.directory001 * nsk.jdi.PathSearchingVirtualMachine.baseDirectory.directory001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.PathSearchingVirtualMachine.baseDirectory.directory001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PathSearchingVirtualMachine/bootClassPath/bootpath001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PathSearchingVirtualMachine/bootClassPath/bootpath001/TestDescription.java index 8bfea6f42c5..abfbed71883 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PathSearchingVirtualMachine/bootClassPath/bootpath001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PathSearchingVirtualMachine/bootClassPath/bootpath001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.PathSearchingVirtualMachine.bootClassPath.bootpath001 * nsk.jdi.PathSearchingVirtualMachine.bootClassPath.bootpath001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.PathSearchingVirtualMachine.bootClassPath.bootpath001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PathSearchingVirtualMachine/classPath/classpath001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PathSearchingVirtualMachine/classPath/classpath001/TestDescription.java index 1ba7891d4d4..a5878ca5349 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PathSearchingVirtualMachine/classPath/classpath001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PathSearchingVirtualMachine/classPath/classpath001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.PathSearchingVirtualMachine.classPath.classpath001 * nsk.jdi.PathSearchingVirtualMachine.classPath.classpath001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.PathSearchingVirtualMachine.classPath.classpath001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/AttachConnector/plugAttachConnect001/plugAttachConnect001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/AttachConnector/plugAttachConnect001/plugAttachConnect001.java index 778ac76c35c..e6d7e740202 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/AttachConnector/plugAttachConnect001/plugAttachConnect001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/AttachConnector/plugAttachConnect001/plugAttachConnect001.java @@ -57,9 +57,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.AttachConnector.plugAttachConnect001.plugAttachConnect001 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/AttachConnector/plugAttachConnect002/plugAttachConnect002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/AttachConnector/plugAttachConnect002/plugAttachConnect002.java index dd8fecc5ae6..18cf8cd4c7b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/AttachConnector/plugAttachConnect002/plugAttachConnect002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/AttachConnector/plugAttachConnect002/plugAttachConnect002.java @@ -65,9 +65,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.AttachConnector.plugAttachConnect002.plugAttachConnect002 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/AttachConnector/plugAttachConnect003/plugAttachConnect003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/AttachConnector/plugAttachConnect003/plugAttachConnect003.java index 5a406cec527..b6314aeb390 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/AttachConnector/plugAttachConnect003/plugAttachConnect003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/AttachConnector/plugAttachConnect003/plugAttachConnect003.java @@ -50,9 +50,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.AttachConnector.plugAttachConnect003.plugAttachConnect003 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/LaunchConnector/plugLaunchConnect001/plugLaunchConnect001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/LaunchConnector/plugLaunchConnect001/plugLaunchConnect001.java index aec8783b4ce..daa70d305aa 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/LaunchConnector/plugLaunchConnect001/plugLaunchConnect001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/LaunchConnector/plugLaunchConnect001/plugLaunchConnect001.java @@ -57,9 +57,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.LaunchConnector.plugLaunchConnect001.plugLaunchConnect001 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/LaunchConnector/plugLaunchConnect002/plugLaunchConnect002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/LaunchConnector/plugLaunchConnect002/plugLaunchConnect002.java index 6b6694dc09e..d395320250a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/LaunchConnector/plugLaunchConnect002/plugLaunchConnect002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/LaunchConnector/plugLaunchConnect002/plugLaunchConnect002.java @@ -65,9 +65,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.LaunchConnector.plugLaunchConnect002.plugLaunchConnect002 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/LaunchConnector/plugLaunchConnect003/plugLaunchConnect003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/LaunchConnector/plugLaunchConnect003/plugLaunchConnect003.java index 4928874c66b..53aa59f9c6b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/LaunchConnector/plugLaunchConnect003/plugLaunchConnect003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/LaunchConnector/plugLaunchConnect003/plugLaunchConnect003.java @@ -50,9 +50,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.LaunchConnector.plugLaunchConnect003.plugLaunchConnect003 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/ListenConnector/plugListenConnect001/plugListenConnect001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/ListenConnector/plugListenConnect001/plugListenConnect001.java index 3369a1578bd..2f21e2a359e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/ListenConnector/plugListenConnect001/plugListenConnect001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/ListenConnector/plugListenConnect001/plugListenConnect001.java @@ -57,9 +57,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.ListenConnector.plugListenConnect001.plugListenConnect001 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/ListenConnector/plugListenConnect002/plugListenConnect002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/ListenConnector/plugListenConnect002/plugListenConnect002.java index 280efea18a3..407c3781394 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/ListenConnector/plugListenConnect002/plugListenConnect002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/ListenConnector/plugListenConnect002/plugListenConnect002.java @@ -65,9 +65,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.ListenConnector.plugListenConnect002.plugListenConnect002 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/ListenConnector/plugListenConnect003/plugListenConnect003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/ListenConnector/plugListenConnect003/plugListenConnect003.java index afc1baa5765..34b4587dacb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/ListenConnector/plugListenConnect003/plugListenConnect003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/ListenConnector/plugListenConnect003/plugListenConnect003.java @@ -50,9 +50,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.ListenConnector.plugListenConnect003.plugListenConnect003 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect001/plugMultiConnect001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect001/plugMultiConnect001.java index 5f3d27de757..720cd845b41 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect001/plugMultiConnect001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect001/plugMultiConnect001.java @@ -68,9 +68,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.MultiConnectors.plugMultiConnect001.plugMultiConnect001 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect002/plugMultiConnect002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect002/plugMultiConnect002.java index 0a4b3924eeb..8fd40809fee 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect002/plugMultiConnect002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect002/plugMultiConnect002.java @@ -80,9 +80,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.MultiConnectors.plugMultiConnect002.plugMultiConnect002 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect003/plugMultiConnect003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect003/plugMultiConnect003.java index c1baef5c976..376cdbe7087 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect003/plugMultiConnect003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect003/plugMultiConnect003.java @@ -86,9 +86,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.MultiConnectors.plugMultiConnect003.plugMultiConnect003 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect004/plugMultiConnect004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect004/plugMultiConnect004.java index 1c6c73ec7a4..64a810a17b2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect004/plugMultiConnect004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect004/plugMultiConnect004.java @@ -95,9 +95,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.MultiConnectors.plugMultiConnect004.plugMultiConnect004 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect005/plugMultiConnect005.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect005/plugMultiConnect005.java index 2e4039c4635..4b13ad99001 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect005/plugMultiConnect005.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect005/plugMultiConnect005.java @@ -96,9 +96,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.MultiConnectors.plugMultiConnect005.plugMultiConnect005 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect006/plugMultiConnect006.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect006/plugMultiConnect006.java index 95437d555b6..88f44940ffa 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect006/plugMultiConnect006.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/MultiConnectors/plugMultiConnect006/plugMultiConnect006.java @@ -108,9 +108,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.MultiConnectors.plugMultiConnect006.plugMultiConnect006 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/TransportService/transportService001/transportService001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/TransportService/transportService001/transportService001.java index 00bd1397c56..ff68a83cbff 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/TransportService/transportService001/transportService001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/TransportService/transportService001/transportService001.java @@ -74,9 +74,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.TransportService.transportService001.transportService001 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/TransportService/transportService002/transportService002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/TransportService/transportService002/transportService002.java index 3417548e087..6a1bb9f78a1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/TransportService/transportService002/transportService002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/TransportService/transportService002/transportService002.java @@ -74,9 +74,8 @@ * @build nsk.share.jdi.PlugConnectors * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.TransportService.transportService002.transportService002 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/TransportService/transportService003/transportService003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/TransportService/transportService003/transportService003.java index 9b182c77cbc..7716bdd8aae 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/TransportService/transportService003/transportService003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PlugConnectors/TransportService/transportService003/transportService003.java @@ -51,9 +51,8 @@ * @build nsk.share.jdi.PlugTransportService * @run driver nsk.jdi.ConnectorsJarBuilder * - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --java - * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path} + * @run main/othervm + * -cp jars${file.separator}connectors.jar${path.separator}${test.class.path}${path.separator}${java.class.path} * nsk.jdi.PlugConnectors.TransportService.transportService003.transportService003 * -verbose * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveType/_itself_/primitivetype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveType/_itself_/primitivetype001/TestDescription.java index 86cfd765989..d2096854fe9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveType/_itself_/primitivetype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveType/_itself_/primitivetype001/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.PrimitiveType._itself_.primitivetype001 * nsk.jdi.PrimitiveType._itself_.primitivetype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.PrimitiveType._itself_.primitivetype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/booleanValue/booleanvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/booleanValue/booleanvalue001/TestDescription.java index 3473d2c72d8..e03076678c0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/booleanValue/booleanvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/booleanValue/booleanvalue001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.PrimitiveValue.booleanValue.booleanvalue001 * nsk.jdi.PrimitiveValue.booleanValue.booleanvalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.PrimitiveValue.booleanValue.booleanvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/byteValue/bytevalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/byteValue/bytevalue001/TestDescription.java index 7a9ab9f9cad..7744c591880 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/byteValue/bytevalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/byteValue/bytevalue001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.PrimitiveValue.byteValue.bytevalue001 * nsk.jdi.PrimitiveValue.byteValue.bytevalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.PrimitiveValue.byteValue.bytevalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/charValue/charvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/charValue/charvalue001/TestDescription.java index 0f03ae7c1bf..1e01641370e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/charValue/charvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/charValue/charvalue001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.PrimitiveValue.charValue.charvalue001 * nsk.jdi.PrimitiveValue.charValue.charvalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.PrimitiveValue.charValue.charvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/doubleValue/doublevalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/doubleValue/doublevalue001/TestDescription.java index 5c2d20b2aa2..1fd4d30de15 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/doubleValue/doublevalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/doubleValue/doublevalue001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.PrimitiveValue.doubleValue.doublevalue001 * nsk.jdi.PrimitiveValue.doubleValue.doublevalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.PrimitiveValue.doubleValue.doublevalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/doubleValue/doublevalue002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/doubleValue/doublevalue002/TestDescription.java index 373984a708f..d61234ad1c1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/doubleValue/doublevalue002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/doubleValue/doublevalue002/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.PrimitiveValue.doubleValue.doublevalue002 * nsk.jdi.PrimitiveValue.doubleValue.doublevalue002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.PrimitiveValue.doubleValue.doublevalue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/floatValue/floatvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/floatValue/floatvalue001/TestDescription.java index 27041c83a5a..472a3e81408 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/floatValue/floatvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/floatValue/floatvalue001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.PrimitiveValue.floatValue.floatvalue001 * nsk.jdi.PrimitiveValue.floatValue.floatvalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.PrimitiveValue.floatValue.floatvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/intValue/intvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/intValue/intvalue001/TestDescription.java index 09cc701c699..73d33454775 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/intValue/intvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/intValue/intvalue001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.PrimitiveValue.intValue.intvalue001 * nsk.jdi.PrimitiveValue.intValue.intvalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.PrimitiveValue.intValue.intvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/longValue/longvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/longValue/longvalue001/TestDescription.java index 862cbc7b914..7b019494f37 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/longValue/longvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/longValue/longvalue001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.PrimitiveValue.longValue.longvalue001 * nsk.jdi.PrimitiveValue.longValue.longvalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.PrimitiveValue.longValue.longvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/shortValue/shortvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/shortValue/shortvalue001/TestDescription.java index 1fd7447c8b2..e902a609656 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/shortValue/shortvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/PrimitiveValue/shortValue/shortvalue001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.PrimitiveValue.shortValue.shortvalue001 * nsk.jdi.PrimitiveValue.shortValue.shortvalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.PrimitiveValue.shortValue.shortvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/_bounds_/bounds001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/_bounds_/bounds001/TestDescription.java index fb818901e97..bec18d13c41 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/_bounds_/bounds001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/_bounds_/bounds001/TestDescription.java @@ -47,13 +47,13 @@ * @clean nsk.jdi.ReferenceType._bounds_.bounds001a * @compile -g:lines,source,vars ../bounds001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType._bounds_.bounds001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/_bounds_/bounds002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/_bounds_/bounds002/TestDescription.java index 8807022b51c..4cc11c826cd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/_bounds_/bounds002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/_bounds_/bounds002/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.ReferenceType._bounds_.bounds002 * nsk.jdi.ReferenceType._bounds_.bounds002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType._bounds_.bounds002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields001/TestDescription.java index 85d310ffde7..8cb5f3efb74 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields001/TestDescription.java @@ -46,13 +46,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.allFields.allfields001 * nsk.jdi.ReferenceType.allFields.allfields001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allFields.allfields001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields002/TestDescription.java index d7720e2fbee..effe2614428 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields002/TestDescription.java @@ -54,13 +54,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allFields.allfields002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields003/TestDescription.java index 2129c34a802..c34ab5e8d41 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields003/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allFields.allfields003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields004/TestDescription.java index 01d3d63ee31..fabc1712f14 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields004/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.allFields.allfields004 * nsk.jdi.ReferenceType.allFields.allfields004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allFields.allfields004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields005/TestDescription.java index 9240e2d7042..7af7003a3e1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields005/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.allFields.allfields005 * nsk.jdi.ReferenceType.allFields.allfields005t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allFields.allfields005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields006/TestDescription.java index 6b72dff898d..8a28c6cab06 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allFields/allfields006/TestDescription.java @@ -54,13 +54,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.allFields.allfields006 * nsk.jdi.ReferenceType.allFields.allfields006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allFields.allfields006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations/alllinelocations001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations/alllinelocations001/TestDescription.java index f25731e4062..4e7a609527c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations/alllinelocations001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations/alllinelocations001/TestDescription.java @@ -74,13 +74,13 @@ * @clean nsk.jdi.ReferenceType.allLineLocations.alllinelocations001a * @compile -g:lines,source,vars ../alllinelocations001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allLineLocations.alllinelocations001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations/alllinelocations002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations/alllinelocations002/TestDescription.java index 7c0bce29ffb..607d5a18d42 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations/alllinelocations002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations/alllinelocations002/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.allLineLocations.alllinelocations002 * nsk.jdi.ReferenceType.allLineLocations.alllinelocations002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allLineLocations.alllinelocations002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/allLineLocations_ss003/allLineLocations_ss003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/allLineLocations_ss003/allLineLocations_ss003.java index 6eacca83392..a05f6d1a8b5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/allLineLocations_ss003/allLineLocations_ss003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/allLineLocations_ss003/allLineLocations_ss003.java @@ -56,14 +56,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ReferenceType.allLineLocations_ss.allLineLocations_ss003.allLineLocations_ss003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allLineLocations_ss.allLineLocations_ss003.allLineLocations_ss003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/allLineLocations_ss004/allLineLocations_ss004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/allLineLocations_ss004/allLineLocations_ss004.java index dbdc77e326b..0bbfa18b2c1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/allLineLocations_ss004/allLineLocations_ss004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/allLineLocations_ss004/allLineLocations_ss004.java @@ -57,14 +57,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ReferenceType.allLineLocations_ss.allLineLocations_ss004.allLineLocations_ss004 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allLineLocations_ss.allLineLocations_ss004.allLineLocations_ss004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/alllinelocations_ss001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/alllinelocations_ss001/TestDescription.java index ad8166563c2..6afc431b3f7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/alllinelocations_ss001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/alllinelocations_ss001/TestDescription.java @@ -93,13 +93,13 @@ * @clean nsk.jdi.ReferenceType.allLineLocations_ss.alllinelocations_ss001a * @compile -g:lines,source,vars ../alllinelocations_ss001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allLineLocations_ss.alllinelocations_ss001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/alllinelocations_ss002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/alllinelocations_ss002/TestDescription.java index 70fa0ab763d..e41e2cdce51 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/alllinelocations_ss002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allLineLocations_ss/alllinelocations_ss002/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.allLineLocations_ss.alllinelocations_ss002 * nsk.jdi.ReferenceType.allLineLocations_ss.alllinelocations_ss002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allLineLocations_ss.alllinelocations_ss002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods001/TestDescription.java index 68e0623080f..3bd265f50c9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods001/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.allMethods.allmethods001 * nsk.jdi.ReferenceType.allMethods.allmethods001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allMethods.allmethods001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods002/TestDescription.java index 96598466169..ecfec77fae6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods002/TestDescription.java @@ -54,13 +54,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allMethods.allmethods002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods003/TestDescription.java index f5bc07f2243..1741f3b3ae4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods003/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allMethods.allmethods003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods004/TestDescription.java index ec4e9e5fcd2..712fa75d7b1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods004/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.allMethods.allmethods004 * nsk.jdi.ReferenceType.allMethods.allmethods004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allMethods.allmethods004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods005/TestDescription.java index 217a9436b8e..6808fd1857f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods005/TestDescription.java @@ -42,13 +42,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.allMethods.allmethods005 * nsk.jdi.ReferenceType.allMethods.allmethods005t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allMethods.allmethods005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods006/TestDescription.java index 495515d1cdb..2f1e42da5de 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/allMethods/allmethods006/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.allMethods.allmethods006 * nsk.jdi.ReferenceType.allMethods.allmethods006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.allMethods.allmethods006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/availableStrata/availableStrata002/availableStrata002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/availableStrata/availableStrata002/availableStrata002.java index d80b8e1217f..9323139f838 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/availableStrata/availableStrata002/availableStrata002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/availableStrata/availableStrata002/availableStrata002.java @@ -37,14 +37,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ReferenceType.availableStrata.availableStrata002.availableStrata002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.availableStrata.availableStrata002.availableStrata002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/availableStrata/availablestrata001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/availableStrata/availablestrata001/TestDescription.java index 76ba2a2e0b2..5a068e8a51c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/availableStrata/availablestrata001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/availableStrata/availablestrata001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.availableStrata.availablestrata001 * nsk.jdi.ReferenceType.availableStrata.availablestrata001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.availableStrata.availablestrata001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classLoader/classloader001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classLoader/classloader001/TestDescription.java index da0da59ec68..31dce7f14ce 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classLoader/classloader001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classLoader/classloader001/TestDescription.java @@ -64,14 +64,14 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass loadclass1 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.classLoader.classloader001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts} + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts} * -Xbootclasspath/a:./bin/loadclass1" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classObject/classobj001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classObject/classobj001/TestDescription.java index 3bdafbb28ae..6920d0abd71 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classObject/classobj001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classObject/classobj001/TestDescription.java @@ -42,13 +42,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.classObject.classobj001 * nsk.jdi.ReferenceType.classObject.classobj001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.classObject.classobj001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classObject/classobj002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classObject/classobj002/TestDescription.java index 423e9a8619d..d1e9cce7285 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classObject/classobj002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classObject/classobj002/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.classObject.classobj002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classObject/classobj003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classObject/classobj003/TestDescription.java index 56cd4bb28ee..f8221c7c480 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classObject/classobj003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/classObject/classobj003/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.classObject.classobj003 * nsk.jdi.ReferenceType.classObject.classobj003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.classObject.classobj003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultStratum002/defaultStratum002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultStratum002/defaultStratum002.java index 8e04986a55b..b7dd63c13da 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultStratum002/defaultStratum002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultStratum002/defaultStratum002.java @@ -64,14 +64,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ReferenceType.defaultStratum.defaultStratum002.defaultStratum002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.defaultStratum.defaultStratum002.defaultStratum002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultStratum003/defaultStratum003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultStratum003/defaultStratum003.java index 8cbbf214558..b8fcd1d9262 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultStratum003/defaultStratum003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultStratum003/defaultStratum003.java @@ -54,14 +54,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ReferenceType.defaultStratum.defaultStratum003.defaultStratum003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.defaultStratum.defaultStratum003.defaultStratum003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultStratum004/defaultStratum004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultStratum004/defaultStratum004.java index 8fc845116af..62119febda2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultStratum004/defaultStratum004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultStratum004/defaultStratum004.java @@ -45,14 +45,14 @@ * /test/lib * @build nsk.jdi.ReferenceType.defaultStratum.defaultStratum004.defaultStratum004 * nsk.jdi.ReferenceType.defaultStratum.defaultStratum004.defaultStratum004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.defaultStratum.defaultStratum004.defaultStratum004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultstratum001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultstratum001/TestDescription.java index d8cc5a798e2..fb365b73931 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultstratum001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/defaultStratum/defaultstratum001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.defaultStratum.defaultstratum001 * nsk.jdi.ReferenceType.defaultStratum.defaultstratum001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.defaultStratum.defaultstratum001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/equals/equals001/TestDescription.java index 301f1e9dbf3..8460796f70c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/equals/equals001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.equals.equals001 * nsk.jdi.ReferenceType.equals.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/equals/equals002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/equals/equals002/TestDescription.java index 7db8068fe86..c6a81e53852 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/equals/equals002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/equals/equals002/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.equals.equals002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/failedToInitialize/failedToInitialize001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/failedToInitialize/failedToInitialize001/TestDescription.java index e452ec9c367..7bbdae7e654 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/failedToInitialize/failedToInitialize001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/failedToInitialize/failedToInitialize001/TestDescription.java @@ -41,13 +41,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.failedToInitialize.failedToInitialize001 * nsk.jdi.ReferenceType.failedToInitialize.failedToInitialize001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.failedToInitialize.failedToInitialize001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/failedToInitialize/failedtoinit002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/failedToInitialize/failedtoinit002/TestDescription.java index 1efa219a5f3..c9e71b9e30b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/failedToInitialize/failedtoinit002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/failedToInitialize/failedtoinit002/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.failedToInitialize.failedtoinit002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fieldByName/fieldbyname001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fieldByName/fieldbyname001/TestDescription.java index d6c37f59d66..1de7995bc36 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fieldByName/fieldbyname001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fieldByName/fieldbyname001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.fieldByName.fieldbyname001 * nsk.jdi.ReferenceType.fieldByName.fieldbyname001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.fieldByName.fieldbyname001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fieldByName/fieldbyname002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fieldByName/fieldbyname002/TestDescription.java index 21991697ca4..a47d190a44b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fieldByName/fieldbyname002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fieldByName/fieldbyname002/TestDescription.java @@ -54,13 +54,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.fieldByName.fieldbyname002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fieldByName/fieldbyname003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fieldByName/fieldbyname003/TestDescription.java index 5be043795b2..70438630989 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fieldByName/fieldbyname003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fieldByName/fieldbyname003/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.fieldByName.fieldbyname003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields001/TestDescription.java index ecf32c8d8c6..bc3a3a289c6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields001/TestDescription.java @@ -46,13 +46,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.fields.fields001 * nsk.jdi.ReferenceType.fields.fields001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.fields.fields001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields002/TestDescription.java index da2a4947175..eef169b8814 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields002/TestDescription.java @@ -54,13 +54,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.fields.fields002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields003/TestDescription.java index 3aa9cb3bae9..7c2e910e27c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields003/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.fields.fields003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields004/TestDescription.java index 36b2f581b9f..fcbc27c5cb5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields004/TestDescription.java @@ -46,13 +46,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.fields.fields004 * nsk.jdi.ReferenceType.fields.fields004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.fields.fields004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields005/TestDescription.java index bd474ecea89..bd32ca4fa27 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields005/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.fields.fields005 * nsk.jdi.ReferenceType.fields.fields005t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.fields.fields005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields006/TestDescription.java index 36528da79dc..6eb28615609 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/fields/fields006/TestDescription.java @@ -55,13 +55,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.fields.fields006 * nsk.jdi.ReferenceType.fields.fields006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.fields.fields006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/genericSignature/genericSignature001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/genericSignature/genericSignature001/TestDescription.java index 0739ba90b1d..afea224611a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/genericSignature/genericSignature001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/genericSignature/genericSignature001/TestDescription.java @@ -49,13 +49,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.genericSignature.genericSignature001 * nsk.jdi.ReferenceType.genericSignature.genericSignature001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.genericSignature.genericSignature001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/genericSignature/genericSignature002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/genericSignature/genericSignature002/TestDescription.java index c5168743478..0e90d493c72 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/genericSignature/genericSignature002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/genericSignature/genericSignature002/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.genericSignature.genericSignature002 * nsk.jdi.ReferenceType.genericSignature.genericSignature002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.genericSignature.genericSignature002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue001/TestDescription.java index 9c90fc65e41..fa6a5d4c1c3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.getValue.getvalue001 * nsk.jdi.ReferenceType.getValue.getvalue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.getValue.getvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue002/TestDescription.java index ac54bb0bf44..451c06bc22c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue002/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.getValue.getvalue002 * nsk.jdi.ReferenceType.getValue.getvalue002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.getValue.getvalue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue003/TestDescription.java index 9b3c5b2403f..e9be14bf4b8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue003/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.getValue.getvalue003 * nsk.jdi.ReferenceType.getValue.getvalue003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.getValue.getvalue003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue004/TestDescription.java index 4c51f5185c6..b03d1cbb4a2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue004/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.getValue.getvalue004 * nsk.jdi.ReferenceType.getValue.getvalue004t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.getValue.getvalue004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue005/TestDescription.java index 5fc38cf1e24..aa083f01101 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValue/getvalue005/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.getValue.getvalue005 * nsk.jdi.ReferenceType.getValue.getvalue005t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.getValue.getvalue005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValues/getvalues001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValues/getvalues001/TestDescription.java index 546663e25d5..8f200f400e6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValues/getvalues001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValues/getvalues001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.getValues.getvalues001 * nsk.jdi.ReferenceType.getValues.getvalues001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.getValues.getvalues001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValues/getvalues002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValues/getvalues002/TestDescription.java index f386e273728..b879a131e7e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValues/getvalues002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValues/getvalues002/TestDescription.java @@ -49,13 +49,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.getValues.getvalues002 * nsk.jdi.ReferenceType.getValues.getvalues002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.getValues.getvalues002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValues/getvalues003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValues/getvalues003/TestDescription.java index 34a17fea620..316aeaca9fe 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValues/getvalues003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/getValues/getvalues003/TestDescription.java @@ -50,13 +50,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.getValues.getvalues003 * nsk.jdi.ReferenceType.getValues.getvalues003t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.getValues.getvalues003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/hashCode/hashcode001/TestDescription.java index 0302d97b893..adfe00afe15 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/hashCode/hashcode001/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.hashCode.hashcode001 * nsk.jdi.ReferenceType.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/hashCode/hashcode002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/hashCode/hashcode002/TestDescription.java index 39d9372f159..f9b7face6eb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/hashCode/hashcode002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/hashCode/hashcode002/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.hashCode.hashcode002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances001/instances001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances001/instances001.java index a41f80dfa61..c0697cd5280 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances001/instances001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances001/instances001.java @@ -59,14 +59,14 @@ * nsk.share.jdi.TestClass1 * nsk.share.jdi.TestClass2 * nsk.share.jdi.TestInterfaceImplementer1 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ReferenceType.instances.instances001.instances001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xmx256M ${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="-Xmx256M ${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ReferenceType.instances.instances001; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances002/instances002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances002/instances002.java index b065996c4da..ee28bccba5c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances002/instances002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances002/instances002.java @@ -41,14 +41,14 @@ * nsk.jdi.ReferenceType.instances.instances002.instances002a * nsk.share.jdi.TestClass1 * nsk.share.jdi.TestInterfaceImplementer1 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ReferenceType.instances.instances002.instances002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ReferenceType.instances.instances002; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances003/instances003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances003/instances003.java index 32ae542a534..966124f77e3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances003/instances003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances003/instances003.java @@ -45,14 +45,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ReferenceType.instances.instances003.instances003 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ReferenceType.instances.instances003.instances003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xmx128M ${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="-Xmx128M ${test.vm.opts} ${test.java.opts}" * -testClassNames nsk.jdi.ReferenceType.instances.instances003.instances003$TestClassLoader:java.lang.String:java.lang.Thread */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances004/TestDescription.java index 2cc66ddb3b9..5635463c67b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances004/TestDescription.java @@ -46,14 +46,14 @@ * /test/lib * @build nsk.jdi.ReferenceType.instances.instances003.instances003 * nsk.share.jdi.TestClass1 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ReferenceType.instances.instances003.instances003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xmx128M ${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="-Xmx128M ${test.vm.opts} ${test.java.opts}" * -testClassNames nsk.share.jdi.TestClass1:boolean[]:float[] */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances005/instances005.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances005/instances005.java index 9d3281cd521..7ef73e76cbc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances005/instances005.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances005/instances005.java @@ -41,14 +41,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ReferenceType.instances.instances005.instances005 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ReferenceType.instances.instances005.instances005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ReferenceType.instances.instances005; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isAbstract/isAbstract001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isAbstract/isAbstract001/TestDescription.java index 83459b70bae..0e80c3f4467 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isAbstract/isAbstract001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isAbstract/isAbstract001/TestDescription.java @@ -41,13 +41,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.isAbstract.isAbstract001 * nsk.jdi.ReferenceType.isAbstract.isAbstract001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isAbstract.isAbstract001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isAbstract/isabstract002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isAbstract/isabstract002/TestDescription.java index 8509546105c..5f8ebd3e32a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isAbstract/isabstract002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isAbstract/isabstract002/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isAbstract.isabstract002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isAbstract/isabstract003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isAbstract/isabstract003/TestDescription.java index 9bb6a359eba..b415510d356 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isAbstract/isabstract003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isAbstract/isabstract003/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.isAbstract.isabstract003 * nsk.jdi.ReferenceType.isAbstract.isabstract003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isAbstract.isabstract003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isFinal/isfinal001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isFinal/isfinal001/TestDescription.java index 91588d7116c..1e598dcb685 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isFinal/isfinal001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isFinal/isfinal001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.isFinal.isfinal001 * nsk.jdi.ReferenceType.isFinal.isfinal001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isFinal.isfinal001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isFinal/isfinal002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isFinal/isfinal002/TestDescription.java index fbb17cac6fa..f3e8c769cc4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isFinal/isfinal002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isFinal/isfinal002/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.isFinal.isfinal002 * nsk.jdi.ReferenceType.isFinal.isfinal002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isFinal.isfinal002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isInitialized/isinit001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isInitialized/isinit001/TestDescription.java index 056aaa5e890..8143e0f04f4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isInitialized/isinit001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isInitialized/isinit001/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.isInitialized.isinit001 * nsk.jdi.ReferenceType.isInitialized.isinit001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isInitialized.isinit001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isInitialized/isinit002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isInitialized/isinit002/TestDescription.java index 463bf754891..4b4da282354 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isInitialized/isinit002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isInitialized/isinit002/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isInitialized.isinit002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isInitialized/isinit003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isInitialized/isinit003/TestDescription.java index c34a04043bb..71a10268e97 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isInitialized/isinit003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isInitialized/isinit003/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.isInitialized.isinit003 * nsk.jdi.ReferenceType.isInitialized.isinit003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isInitialized.isinit003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isPrepared/isprepared001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isPrepared/isprepared001/TestDescription.java index 2330f1835de..1e3d5ed134b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isPrepared/isprepared001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isPrepared/isprepared001/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.isPrepared.isprepared001 * nsk.jdi.ReferenceType.isPrepared.isprepared001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isPrepared.isprepared001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isPrepared/isprepared002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isPrepared/isprepared002/TestDescription.java index dcf0c3481c7..3a68fff885c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isPrepared/isprepared002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isPrepared/isprepared002/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isPrepared.isprepared002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isStatic/isstatic001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isStatic/isstatic001/TestDescription.java index 2d87aa3d0b3..215dcc1d805 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isStatic/isstatic001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isStatic/isstatic001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.isStatic.isstatic001 * nsk.jdi.ReferenceType.isStatic.isstatic001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isStatic.isstatic001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isStatic/isstatic002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isStatic/isstatic002/TestDescription.java index 5f5d6ee1671..41b0bd34b4c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isStatic/isstatic002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isStatic/isstatic002/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.isStatic.isstatic002 * nsk.jdi.ReferenceType.isStatic.isstatic002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isStatic.isstatic002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isVerified/isVerified001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isVerified/isVerified001/TestDescription.java index fcbe4af0b16..fa5dcfa14c1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isVerified/isVerified001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isVerified/isVerified001/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.isVerified.isVerified001 * nsk.jdi.ReferenceType.isVerified.isVerified001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isVerified.isVerified001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isVerified/isverified002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isVerified/isverified002/TestDescription.java index e7f2a797d19..bf11eaeba07 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isVerified/isverified002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isVerified/isverified002/TestDescription.java @@ -60,13 +60,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isVerified.isverified002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isVerified/isverified003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isVerified/isverified003/TestDescription.java index 9098d36cb27..ae0906a7807 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isVerified/isverified003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/isVerified/isverified003/TestDescription.java @@ -55,13 +55,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.isVerified.isverified003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_i/locationsofline_i001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_i/locationsofline_i001/TestDescription.java index 245bc601725..083d5c85009 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_i/locationsofline_i001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_i/locationsofline_i001/TestDescription.java @@ -81,13 +81,13 @@ * @clean nsk.jdi.ReferenceType.locationsOfLine_i.locationsofline_i001a * @compile -g:lines,source,vars ../locationsofline_i001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.locationsOfLine_i.locationsofline_i001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_i/locationsofline_i002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_i/locationsofline_i002/TestDescription.java index d29ebbfe6fe..105ef7ac9bd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_i/locationsofline_i002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_i/locationsofline_i002/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.locationsOfLine_i.locationsofline_i002 * nsk.jdi.ReferenceType.locationsOfLine_i.locationsofline_i002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.locationsOfLine_i.locationsofline_i002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsOfLine_ssi003/locationsOfLine_ssi003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsOfLine_ssi003/locationsOfLine_ssi003.java index b54e4ff1778..edf086c38b3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsOfLine_ssi003/locationsOfLine_ssi003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsOfLine_ssi003/locationsOfLine_ssi003.java @@ -57,14 +57,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ReferenceType.locationsOfLine_ssi.locationsOfLine_ssi003.locationsOfLine_ssi003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.locationsOfLine_ssi.locationsOfLine_ssi003.locationsOfLine_ssi003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsOfLine_ssi004/locationsOfLine_ssi004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsOfLine_ssi004/locationsOfLine_ssi004.java index 05296a74c40..334c18f3447 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsOfLine_ssi004/locationsOfLine_ssi004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsOfLine_ssi004/locationsOfLine_ssi004.java @@ -57,14 +57,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ReferenceType.locationsOfLine_ssi.locationsOfLine_ssi004.locationsOfLine_ssi004 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.locationsOfLine_ssi.locationsOfLine_ssi004.locationsOfLine_ssi004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsofline_ssi001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsofline_ssi001/TestDescription.java index f8a40a15030..9d89dedfa66 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsofline_ssi001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsofline_ssi001/TestDescription.java @@ -88,13 +88,13 @@ * @clean nsk.jdi.ReferenceType.locationsOfLine_ssi.locationsofline_ssi001a * @compile -g:lines,source,vars ../locationsofline_ssi001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.locationsOfLine_ssi.locationsofline_ssi001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsofline_ssi002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsofline_ssi002/TestDescription.java index 2cdf16c2d90..18d4666a9fe 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsofline_ssi002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/locationsOfLine_ssi/locationsofline_ssi002/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.locationsOfLine_ssi.locationsofline_ssi002 * nsk.jdi.ReferenceType.locationsOfLine_ssi.locationsofline_ssi002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.locationsOfLine_ssi.locationsofline_ssi002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods001/TestDescription.java index 399bb7bd2ea..bcc7d80a840 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods001/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.methods.methods001 * nsk.jdi.ReferenceType.methods.methods001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.methods.methods001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods002/TestDescription.java index 4fcc49e4dd1..ae6d3385a0e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods002/TestDescription.java @@ -54,13 +54,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.methods.methods002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods003/TestDescription.java index 55d95a7f394..5335f743ed0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods003/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.methods.methods003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods004/TestDescription.java index 714802d945e..511367d9754 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods004/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.methods.methods004 * nsk.jdi.ReferenceType.methods.methods004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.methods.methods004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods005/TestDescription.java index 11662e3a3c3..83e7e2c28b1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods005/TestDescription.java @@ -42,13 +42,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.methods.methods005 * nsk.jdi.ReferenceType.methods.methods005t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.methods.methods005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods006/TestDescription.java index 435d336c866..5f19cdbb31e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methods/methods006/TestDescription.java @@ -54,13 +54,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.methods.methods006 * nsk.jdi.ReferenceType.methods.methods006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.methods.methods006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s001/TestDescription.java index fff1de278e7..300e24cafc9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s001/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.methodsByName_s.methbyname_s001 * nsk.jdi.ReferenceType.methodsByName_s.methbyname_s001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.methodsByName_s.methbyname_s001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s002/TestDescription.java index a10312bc9e1..259bd8227ee 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s002/TestDescription.java @@ -54,13 +54,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.methodsByName_s.methbyname_s002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s003/TestDescription.java index 6781a30aa19..7ef771f2ac1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s003/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.methodsByName_s.methbyname_s003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s004/TestDescription.java index 255c12dcb7f..70c8fa81568 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_s/methbyname_s004/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.methodsByName_s.methbyname_s004 * nsk.jdi.ReferenceType.methodsByName_s.methbyname_s004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.methodsByName_s.methbyname_s004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_ss/methbyname_ss001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_ss/methbyname_ss001/TestDescription.java index 6227c9bf0cc..2df3fa3f0a6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_ss/methbyname_ss001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_ss/methbyname_ss001/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.methodsByName_ss.methbyname_ss001 * nsk.jdi.ReferenceType.methodsByName_ss.methbyname_ss001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.methodsByName_ss.methbyname_ss001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_ss/methbyname_ss002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_ss/methbyname_ss002/TestDescription.java index 36619398952..da73cbe13f1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_ss/methbyname_ss002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_ss/methbyname_ss002/TestDescription.java @@ -54,13 +54,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.methodsByName_ss.methbyname_ss002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_ss/methbyname_ss003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_ss/methbyname_ss003/TestDescription.java index 88cc50defa7..a1df9eb5efb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_ss/methbyname_ss003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/methodsByName_ss/methbyname_ss003/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.methodsByName_ss.methbyname_ss003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/name/name001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/name/name001/TestDescription.java index 70116a951b5..90e6ebfdcce 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/name/name001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/name/name001/TestDescription.java @@ -46,13 +46,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.name.name001 * nsk.jdi.ReferenceType.name.name001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.name.name001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/name/name002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/name/name002/TestDescription.java index 656eb99f00a..85b13a681d8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/name/name002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/name/name002/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.name.name002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/nestedTypes/nestedtypes001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/nestedTypes/nestedtypes001/TestDescription.java index 574f23ecb42..96db9523448 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/nestedTypes/nestedtypes001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/nestedTypes/nestedtypes001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.nestedTypes.nestedtypes001 * nsk.jdi.ReferenceType.nestedTypes.nestedtypes001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.nestedTypes.nestedtypes001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/nestedTypes/nestedtypes002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/nestedTypes/nestedtypes002/TestDescription.java index 0c0ab360b00..d3ae406b39e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/nestedTypes/nestedtypes002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/nestedTypes/nestedtypes002/TestDescription.java @@ -75,13 +75,13 @@ * @clean nsk.jdi.ReferenceType.nestedTypes.nestedtypes002a * @compile -g:lines,source,vars ../nestedtypes002a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.nestedTypes.nestedtypes002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceDebugExtension/srcdebugx001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceDebugExtension/srcdebugx001/TestDescription.java index 81e84719a7e..0c741875823 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceDebugExtension/srcdebugx001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceDebugExtension/srcdebugx001/TestDescription.java @@ -45,13 +45,13 @@ * @clean nsk.jdi.ReferenceType.sourceDebugExtension.srcdebugx001t * @compile -g:lines,source,vars ../srcdebugx001t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.sourceDebugExtension.srcdebugx001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceDebugExtension/srcdebugx002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceDebugExtension/srcdebugx002/TestDescription.java index 989a5b3ade5..1d98492cd9d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceDebugExtension/srcdebugx002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceDebugExtension/srcdebugx002/TestDescription.java @@ -46,14 +46,14 @@ * @build nsk.jdi.ReferenceType.sourceDebugExtension.srcdebugx002 * nsk.jdi.ReferenceType.sourceDebugExtension.srcdebugx002t * @compile srcdebugx002x.jcod - * @build ExecDriver - * @run main/othervm PropertyResolvingWrapper + * + * @run main/othervm * nsk.jdi.ReferenceType.sourceDebugExtension.srcdebugx002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename001/TestDescription.java index c74a13a563d..50ae7e13b82 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename001/TestDescription.java @@ -46,13 +46,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.sourceName.sourcename001 * nsk.jdi.ReferenceType.sourceName.sourcename001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.sourceName.sourcename001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename002/TestDescription.java index dd0fc1cf1a6..30cb4f6655a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename002/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.sourceName.sourcename002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename003/TestDescription.java index fe0ea7b1865..00b29acac06 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename003/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.sourceName.sourcename003 * nsk.jdi.ReferenceType.sourceName.sourcename003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.sourceName.sourcename003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename004/TestDescription.java index 5ba35564c60..2e8e60e59d3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceName/sourcename004/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.sourceName.sourcename004 * nsk.jdi.ReferenceType.sourceName.sourcename004t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.sourceName.sourcename004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceNames/sourceNames003/sourceNames003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceNames/sourceNames003/sourceNames003.java index 8b3a2281e1d..337b08b98f4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceNames/sourceNames003/sourceNames003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceNames/sourceNames003/sourceNames003.java @@ -37,14 +37,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ReferenceType.sourceNames.sourceNames003.sourceNames003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.sourceNames.sourceNames003.sourceNames003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceNames/sourcenames001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceNames/sourcenames001/TestDescription.java index f1b824bd478..6fac396845a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceNames/sourcenames001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceNames/sourcenames001/TestDescription.java @@ -78,13 +78,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.sourceNames.sourcenames001 * nsk.jdi.ReferenceType.sourceNames.sourcenames001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.sourceNames.sourcenames001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceNames/sourcenames002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceNames/sourcenames002/TestDescription.java index cbf0d2368ff..989b6e46c5d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceNames/sourcenames002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourceNames/sourcenames002/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.sourceNames.sourcenames002 * nsk.jdi.ReferenceType.sourceNames.sourcenames002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.sourceNames.sourcenames002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourcePaths/sourcePaths003/sourcePaths003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourcePaths/sourcePaths003/sourcePaths003.java index 3e3b3ed9c8c..e48a6cbe12d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourcePaths/sourcePaths003/sourcePaths003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourcePaths/sourcePaths003/sourcePaths003.java @@ -37,14 +37,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ReferenceType.sourcePaths.sourcePaths003.sourcePaths003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.sourcePaths.sourcePaths003.sourcePaths003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourcePaths/sourcepaths001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourcePaths/sourcepaths001/TestDescription.java index 9a3d53ede48..c398f0ddbb2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourcePaths/sourcepaths001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourcePaths/sourcepaths001/TestDescription.java @@ -79,13 +79,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.sourcePaths.sourcepaths001 * nsk.jdi.ReferenceType.sourcePaths.sourcepaths001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.sourcePaths.sourcepaths001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourcePaths/sourcepaths002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourcePaths/sourcepaths002/TestDescription.java index 3f9b8cc5771..c1d3b9374b9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourcePaths/sourcepaths002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/sourcePaths/sourcepaths002/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.sourcePaths.sourcepaths002 * nsk.jdi.ReferenceType.sourcePaths.sourcepaths002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.sourcePaths.sourcepaths002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield001/TestDescription.java index ab7bfbf50d6..b0fbc755a86 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield001/TestDescription.java @@ -46,13 +46,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.visibleFields.visibfield001 * nsk.jdi.ReferenceType.visibleFields.visibfield001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.visibleFields.visibfield001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield002/TestDescription.java index 093b219611a..735a41d46f1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield002/TestDescription.java @@ -54,13 +54,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.visibleFields.visibfield002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield003/TestDescription.java index 2788eaab8ad..de8bd4c1de1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield003/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.visibleFields.visibfield003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield004/TestDescription.java index 2eb04dc86cb..1491c24320f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield004/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.visibleFields.visibfield004 * nsk.jdi.ReferenceType.visibleFields.visibfield004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.visibleFields.visibfield004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield005/TestDescription.java index 596b90b18d4..c832965cb5c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield005/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.visibleFields.visibfield005 * nsk.jdi.ReferenceType.visibleFields.visibfield005t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.visibleFields.visibfield005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield006/TestDescription.java index 5849b861df3..dea14c0fff8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleFields/visibfield006/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.visibleFields.visibfield006 * nsk.jdi.ReferenceType.visibleFields.visibfield006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.visibleFields.visibfield006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod001/TestDescription.java index c71d63f733d..f56a307cbb3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod001/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.visibleMethods.visibmethod001 * nsk.jdi.ReferenceType.visibleMethods.visibmethod001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.visibleMethods.visibmethod001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod002/TestDescription.java index 06da7e7f0f2..a0919145b72 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod002/TestDescription.java @@ -54,13 +54,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.visibleMethods.visibmethod002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod003/TestDescription.java index 7126579e879..c20da1b687f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod003/TestDescription.java @@ -58,13 +58,13 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.visibleMethods.visibmethod003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" ./bin + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" ./bin */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod004/TestDescription.java index b70760ba327..1c8984f9b3c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod004/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.visibleMethods.visibmethod004 * nsk.jdi.ReferenceType.visibleMethods.visibmethod004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.visibleMethods.visibmethod004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod005/TestDescription.java index 288a86bb151..6e050b3c811 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod005/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.visibleMethods.visibmethod005 * nsk.jdi.ReferenceType.visibleMethods.visibmethod005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.visibleMethods.visibmethod005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod006/TestDescription.java index f6d600db7f0..15ad5bb76c9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod006/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.visibleMethods.visibmethod006 * nsk.jdi.ReferenceType.visibleMethods.visibmethod006t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.visibleMethods.visibmethod006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod007/TestDescription.java index 392181319ba..6ad5958f6e3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/visibleMethods/visibmethod007/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.ReferenceType.visibleMethods.visibmethod007 * nsk.jdi.ReferenceType.visibleMethods.visibmethod007a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ReferenceType.visibleMethods.visibmethod007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Scenarios/invokeMethod/popframes001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Scenarios/invokeMethod/popframes001/TestDescription.java index 6186dc2501d..acebfc822c6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Scenarios/invokeMethod/popframes001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Scenarios/invokeMethod/popframes001/TestDescription.java @@ -55,7 +55,7 @@ * /test/lib * @build nsk.jdi.Scenarios.invokeMethod.popframes001 * nsk.jdi.Scenarios.invokeMethod.popframes001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Scenarios.invokeMethod.popframes001 * ./bin * -verbose @@ -63,6 +63,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Scenarios/invokeMethod/redefineclasses001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Scenarios/invokeMethod/redefineclasses001/TestDescription.java index e3a57c825d2..f35e68108cc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Scenarios/invokeMethod/redefineclasses001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Scenarios/invokeMethod/redefineclasses001/TestDescription.java @@ -55,7 +55,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Scenarios.invokeMethod.redefineclasses001 * ./bin * -verbose @@ -63,6 +63,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/SelectedArgument/choices/choices001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/SelectedArgument/choices/choices001/TestDescription.java index 23f4b28cb0e..079afd39a64 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/SelectedArgument/choices/choices001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/SelectedArgument/choices/choices001/TestDescription.java @@ -61,13 +61,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.SelectedArgument.choices.choices001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.SelectedArgument.choices.choices001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/SelectedArgument/isValid/isvalid001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/SelectedArgument/isValid/isvalid001/TestDescription.java index 63f4b4c00b2..0b3ffeed949 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/SelectedArgument/isValid/isvalid001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/SelectedArgument/isValid/isvalid001/TestDescription.java @@ -54,13 +54,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.SelectedArgument.isValid.isvalid001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.SelectedArgument.isValid.isvalid001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/SelectedArgument/isValid/isvalid002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/SelectedArgument/isValid/isvalid002/TestDescription.java index 303a3e109a9..691178ad972 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/SelectedArgument/isValid/isvalid002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/SelectedArgument/isValid/isvalid002/TestDescription.java @@ -55,13 +55,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.SelectedArgument.isValid.isvalid002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.SelectedArgument.isValid.isvalid002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortType/_itself_/shorttype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortType/_itself_/shorttype001/TestDescription.java index 8e7925e8140..f74f7e1ba04 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortType/_itself_/shorttype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortType/_itself_/shorttype001/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.ShortType._itself_.shorttype001 * nsk.jdi.ShortType._itself_.shorttype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ShortType._itself_.shorttype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/compareTo/compareto001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/compareTo/compareto001/TestDescription.java index 30435abe80f..2cabe0ae063 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/compareTo/compareto001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/compareTo/compareto001/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.ShortValue.compareTo.compareto001 * nsk.jdi.ShortValue.compareTo.compareto001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ShortValue.compareTo.compareto001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/equals/equals001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/equals/equals001/TestDescription.java index 8adb64a1053..5d26191606a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/equals/equals001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/equals/equals001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.ShortValue.equals.equals001 * nsk.jdi.ShortValue.equals.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ShortValue.equals.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/equals/equals002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/equals/equals002/TestDescription.java index b8494e515fc..4f5146dc591 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/equals/equals002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/equals/equals002/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.ShortValue.equals.equals002 * nsk.jdi.ShortValue.equals.equals002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ShortValue.equals.equals002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/hashCode/hashcode001/TestDescription.java index 87a4b8e5ea9..88b42431c4e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/hashCode/hashcode001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.ShortValue.hashCode.hashcode001 * nsk.jdi.ShortValue.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ShortValue.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/value/value001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/value/value001/TestDescription.java index a10ec23c9c5..ad77a6df319 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/value/value001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ShortValue/value/value001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.ShortValue.value.value001 * nsk.jdi.ShortValue.value.value001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ShortValue.value.value001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/_bounds_/bounds001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/_bounds_/bounds001/TestDescription.java index 4573b20c540..8be93602677 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/_bounds_/bounds001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/_bounds_/bounds001/TestDescription.java @@ -50,13 +50,13 @@ * @clean nsk.jdi.StackFrame._bounds_.bounds001a * @compile -g:lines,source,vars ../bounds001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame._bounds_.bounds001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/_bounds_/bounds002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/_bounds_/bounds002/TestDescription.java index ce7715ec89f..9bcadfbcc32 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/_bounds_/bounds002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/_bounds_/bounds002/TestDescription.java @@ -56,13 +56,13 @@ * @clean nsk.jdi.StackFrame._bounds_.bounds002a * @compile -g:lines,source,vars ../bounds002a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame._bounds_.bounds002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues001/getArgumentValues001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues001/getArgumentValues001.java index f2a3df1fdeb..d88babb2c1a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues001/getArgumentValues001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues001/getArgumentValues001.java @@ -52,14 +52,14 @@ * @clean nsk.jdi.StackFrame.getArgumentValues.getArgumentValues001.getArgumentValues001a * @compile -g:lines,source,vars getArgumentValues001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.getArgumentValues.getArgumentValues001.getArgumentValues001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.StackFrame.getArgumentValues.getArgumentValues001; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues002/getArgumentValues002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues002/getArgumentValues002.java index da6c342f475..d54e4d97767 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues002/getArgumentValues002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues002/getArgumentValues002.java @@ -36,14 +36,14 @@ * /test/lib * @build nsk.jdi.StackFrame.getArgumentValues.getArgumentValues002.getArgumentValues002 * nsk.jdi.StackFrame.getArgumentValues.getArgumentValues002.getArgumentValues002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.getArgumentValues.getArgumentValues002.getArgumentValues002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.StackFrame.getArgumentValues.getArgumentValues002; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues003/getArgumentValues003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues003/getArgumentValues003.java index 1153dbe0fa2..969a44ff224 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues003/getArgumentValues003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getArgumentValues/getArgumentValues003/getArgumentValues003.java @@ -35,14 +35,14 @@ * /test/lib * @build nsk.jdi.StackFrame.getArgumentValues.getArgumentValues003.getArgumentValues003 * nsk.jdi.StackFrame.getArgumentValues.getArgumentValues003.getArgumentValues003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.getArgumentValues.getArgumentValues003.getArgumentValues003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.StackFrame.getArgumentValues.getArgumentValues003; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValue/getvalue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValue/getvalue001/TestDescription.java index 8de704179eb..1664f9f4922 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValue/getvalue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValue/getvalue001/TestDescription.java @@ -84,13 +84,13 @@ * @clean nsk.jdi.StackFrame.getValue.getvalue001a * @compile -g:lines,source,vars ../getvalue001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.getValue.getvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValue/getvalue002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValue/getvalue002/TestDescription.java index d2d16b01b8c..6ca1f981795 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValue/getvalue002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValue/getvalue002/TestDescription.java @@ -84,13 +84,13 @@ * @clean nsk.jdi.StackFrame.getValue.getvalue002a * @compile -g:lines,source,vars ../getvalue002a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.getValue.getvalue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValue/getvalue003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValue/getvalue003/TestDescription.java index 7ee8f1ae52a..3421a0f1384 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValue/getvalue003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValue/getvalue003/TestDescription.java @@ -50,13 +50,13 @@ * @clean nsk.jdi.StackFrame.getValue.getvalue003t * @compile -g:lines,source,vars ../getvalue003t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.getValue.getvalue003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValues/getvalues001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValues/getvalues001/TestDescription.java index 77b684e2b15..8da1fa779ab 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValues/getvalues001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValues/getvalues001/TestDescription.java @@ -76,13 +76,13 @@ * @clean nsk.jdi.StackFrame.getValues.getvalues001a * @compile -g:lines,source,vars ../getvalues001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.getValues.getvalues001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValues/getvalues002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValues/getvalues002/TestDescription.java index cae54ef20cf..8961aba6cde 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValues/getvalues002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValues/getvalues002/TestDescription.java @@ -84,13 +84,13 @@ * @clean nsk.jdi.StackFrame.getValues.getvalues002a * @compile -g:lines,source,vars ../getvalues002a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.getValues.getvalues002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValues/getvalues003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValues/getvalues003/TestDescription.java index 027da86df93..588e22706f5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValues/getvalues003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/getValues/getvalues003/TestDescription.java @@ -50,13 +50,13 @@ * @clean nsk.jdi.StackFrame.getValues.getvalues003t * @compile -g:lines,source,vars ../getvalues003t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.getValues.getvalues003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/hashCode/hashcode001/TestDescription.java index 926e81ebb70..95c598039fa 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/hashCode/hashcode001/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.StackFrame.hashCode.hashcode001 * nsk.jdi.StackFrame.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/location/location001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/location/location001/TestDescription.java index b34cdb0fe51..d22e0188fee 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/location/location001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/location/location001/TestDescription.java @@ -74,13 +74,13 @@ * /test/lib * @build nsk.jdi.StackFrame.location.location001 * nsk.jdi.StackFrame.location.location001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.location.location001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue001/setvalue001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue001/setvalue001.java index 0cefad0e7f2..af4bcdc4b9d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue001/setvalue001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue001/setvalue001.java @@ -95,14 +95,14 @@ * @clean nsk.jdi.StackFrame.setValue.setvalue001.setvalue001a * @compile -g:lines,source,vars setvalue001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.setValue.setvalue001.setvalue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.StackFrame.setValue.setvalue001; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue002/setvalue002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue002/setvalue002.java index 63de9efe93a..57c6b0e1c4b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue002/setvalue002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue002/setvalue002.java @@ -95,14 +95,14 @@ * @clean nsk.jdi.StackFrame.setValue.setvalue002.setvalue002a * @compile -g:lines,source,vars setvalue002a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.setValue.setvalue002.setvalue002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.StackFrame.setValue.setvalue002; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue003/setvalue003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue003/setvalue003.java index f28f5b93b1c..e3f30ec4f84 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue003/setvalue003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue003/setvalue003.java @@ -95,14 +95,14 @@ * @clean nsk.jdi.StackFrame.setValue.setvalue003.setvalue003a * @compile -g:lines,source,vars setvalue003a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.setValue.setvalue003.setvalue003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.StackFrame.setValue.setvalue003; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue004/setvalue004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue004/setvalue004.java index eae6e4372a6..aa2ca79dfac 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue004/setvalue004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue004/setvalue004.java @@ -97,14 +97,14 @@ * @clean nsk.jdi.StackFrame.setValue.setvalue004.setvalue004a * @compile -g:lines,source,vars setvalue004a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.setValue.setvalue004.setvalue004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.StackFrame.setValue.setvalue004; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue005/setvalue005.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue005/setvalue005.java index 47a6ac75092..3b44b776678 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue005/setvalue005.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue005/setvalue005.java @@ -55,14 +55,14 @@ * @clean nsk.jdi.StackFrame.setValue.setvalue005.setvalue005t * @compile -g:lines,source,vars setvalue005t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.setValue.setvalue005.setvalue005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.StackFrame.setValue.setvalue005; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue006/setvalue006.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue006/setvalue006.java index ba528311385..386c3a0ef6f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue006/setvalue006.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/setValue/setvalue006/setvalue006.java @@ -48,14 +48,14 @@ * @clean nsk.jdi.StackFrame.setValue.setvalue006.setvalue006t * @compile -g:lines,source,vars setvalue006t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.setValue.setvalue006.setvalue006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.StackFrame.setValue.setvalue006; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/thisObject/thisobject001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/thisObject/thisobject001/TestDescription.java index 6d98981c07c..d598932d60f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/thisObject/thisobject001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/thisObject/thisobject001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.StackFrame.thisObject.thisobject001 * nsk.jdi.StackFrame.thisObject.thisobject001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.thisObject.thisobject001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/thisObject/thisobject002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/thisObject/thisobject002/TestDescription.java index 2d3c2928121..d43f06f8038 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/thisObject/thisobject002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/thisObject/thisobject002/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.StackFrame.thisObject.thisobject002 * nsk.jdi.StackFrame.thisObject.thisobject002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.thisObject.thisobject002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/thread/thread001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/thread/thread001/TestDescription.java index e1452312a19..a51a689943c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/thread/thread001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/thread/thread001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.StackFrame.thread.thread001 * nsk.jdi.StackFrame.thread.thread001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.thread.thread001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/toString/tostring001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/toString/tostring001/TestDescription.java index 9628cf11bd8..d96e8f228b8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/toString/tostring001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/toString/tostring001/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.StackFrame.toString.tostring001 * nsk.jdi.StackFrame.toString.tostring001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.toString.tostring001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariableByName/visiblevarbyname001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariableByName/visiblevarbyname001/TestDescription.java index 628cc2daca9..907b2b9993e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariableByName/visiblevarbyname001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariableByName/visiblevarbyname001/TestDescription.java @@ -82,13 +82,13 @@ * @clean nsk.jdi.StackFrame.visibleVariableByName.visiblevarbyname001a * @compile -g:lines,source,vars ../visiblevarbyname001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.visibleVariableByName.visiblevarbyname001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariableByName/visiblevarbyname002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariableByName/visiblevarbyname002/TestDescription.java index df8a9d95f13..d448fac7a6f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariableByName/visiblevarbyname002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariableByName/visiblevarbyname002/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.StackFrame.visibleVariableByName.visiblevarbyname002 * nsk.jdi.StackFrame.visibleVariableByName.visiblevarbyname002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.visibleVariableByName.visiblevarbyname002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariables/visiblevariables001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariables/visiblevariables001/TestDescription.java index 1a7a7ceef44..37f253ca707 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariables/visiblevariables001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariables/visiblevariables001/TestDescription.java @@ -96,13 +96,13 @@ * @clean nsk.jdi.StackFrame.visibleVariables.visiblevariables001a * @compile -g:lines,source,vars ../visiblevariables001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.visibleVariables.visiblevariables001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariables/visiblevariables002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariables/visiblevariables002/TestDescription.java index 45d9c5c46b0..d27c3b726d8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariables/visiblevariables002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StackFrame/visibleVariables/visiblevariables002/TestDescription.java @@ -85,13 +85,13 @@ * /test/lib * @build nsk.jdi.StackFrame.visibleVariables.visiblevariables002 * nsk.jdi.StackFrame.visibleVariables.visiblevariables002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StackFrame.visibleVariables.visiblevariables002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepEvent003/stepEvent003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepEvent003/stepEvent003.java index e5a22f88108..5e523c369eb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepEvent003/stepEvent003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepEvent003/stepEvent003.java @@ -57,14 +57,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.StepEvent._itself_.stepEvent003.stepEvent003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepEvent._itself_.stepEvent003.stepEvent003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepEvent004/stepEvent004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepEvent004/stepEvent004.java index 0336d4d2d0d..f51a346809a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepEvent004/stepEvent004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepEvent004/stepEvent004.java @@ -62,14 +62,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.StepEvent._itself_.stepEvent004.stepEvent004 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepEvent._itself_.stepEvent004.stepEvent004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepevent001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepevent001/TestDescription.java index c08512450cf..784ed01a080 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepevent001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepevent001/TestDescription.java @@ -84,13 +84,13 @@ * /test/lib * @build nsk.jdi.StepEvent._itself_.stepevent001 * nsk.jdi.StepEvent._itself_.stepevent001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepEvent._itself_.stepevent001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepevent002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepevent002/TestDescription.java index 6e7c7d80c68..86d040d5e3b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepevent002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepEvent/_itself_/stepevent002/TestDescription.java @@ -77,13 +77,13 @@ * /test/lib * @build nsk.jdi.StepEvent._itself_.stepevent002 * nsk.jdi.StepEvent._itself_.stepevent002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepEvent._itself_.stepevent002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/_bounds_/filters001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/_bounds_/filters001/TestDescription.java index bb418f55f4e..20134acf03f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/_bounds_/filters001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/_bounds_/filters001/TestDescription.java @@ -45,13 +45,13 @@ * /test/lib * @build nsk.jdi.StepRequest._bounds_.filters001 * nsk.jdi.StepRequest._bounds_.filters001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest._bounds_.filters001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassExclusionFilter/filter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassExclusionFilter/filter001/TestDescription.java index 01497b15446..17c303e1b04 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassExclusionFilter/filter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassExclusionFilter/filter001/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.StepRequest.addClassExclusionFilter.filter001 * nsk.jdi.StepRequest.addClassExclusionFilter.filter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.addClassExclusionFilter.filter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassExclusionFilter/filter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassExclusionFilter/filter002/TestDescription.java index 7b10bd3e574..c943f0a4a9a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassExclusionFilter/filter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassExclusionFilter/filter002/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.StepRequest.addClassExclusionFilter.filter002 * nsk.jdi.StepRequest.addClassExclusionFilter.filter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.addClassExclusionFilter.filter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_rt/filter_rt001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_rt/filter_rt001/TestDescription.java index a048120958f..6c69f98a398 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_rt/filter_rt001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_rt/filter_rt001/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.StepRequest.addClassFilter_rt.filter_rt001 * nsk.jdi.StepRequest.addClassFilter_rt.filter_rt001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.addClassFilter_rt.filter_rt001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_rt/filter_rt002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_rt/filter_rt002/TestDescription.java index 90493d66c74..78f04fd01f1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_rt/filter_rt002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_rt/filter_rt002/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.StepRequest.addClassFilter_rt.filter_rt002 * nsk.jdi.StepRequest.addClassFilter_rt.filter_rt002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.addClassFilter_rt.filter_rt002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_rt/filter_rt003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_rt/filter_rt003/TestDescription.java index 3d7de3313d5..c6f9c53b23b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_rt/filter_rt003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_rt/filter_rt003/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.StepRequest.addClassFilter_rt.filter_rt003 * nsk.jdi.StepRequest.addClassFilter_rt.filter_rt003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.addClassFilter_rt.filter_rt003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_s/filter_s001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_s/filter_s001/TestDescription.java index cb9d1e56b8e..a040b4fe965 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_s/filter_s001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_s/filter_s001/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.StepRequest.addClassFilter_s.filter_s001 * nsk.jdi.StepRequest.addClassFilter_s.filter_s001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.addClassFilter_s.filter_s001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_s/filter_s002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_s/filter_s002/TestDescription.java index e0023045d66..2c90413d1a1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_s/filter_s002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addClassFilter_s/filter_s002/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.StepRequest.addClassFilter_s.filter_s002 * nsk.jdi.StepRequest.addClassFilter_s.filter_s002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.addClassFilter_s.filter_s002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter001/TestDescription.java index a3538627629..3a7fb9aefd9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter001/TestDescription.java @@ -81,13 +81,13 @@ * /test/lib * @build nsk.jdi.StepRequest.addInstanceFilter.instancefilter001 * nsk.jdi.StepRequest.addInstanceFilter.instancefilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.addInstanceFilter.instancefilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter002/TestDescription.java index 3352ff6f773..af106279fdd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter002/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.StepRequest.addInstanceFilter.instancefilter002 * nsk.jdi.StepRequest.addInstanceFilter.instancefilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.addInstanceFilter.instancefilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter003/TestDescription.java index 1235429fb59..98d4e3587d5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter003/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.StepRequest.addInstanceFilter.instancefilter003 * nsk.jdi.StepRequest.addInstanceFilter.instancefilter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.addInstanceFilter.instancefilter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter004/TestDescription.java index e8c91f68227..3153f5032ff 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/addInstanceFilter/instancefilter004/TestDescription.java @@ -82,13 +82,13 @@ * /test/lib * @build nsk.jdi.StepRequest.addInstanceFilter.instancefilter004 * nsk.jdi.StepRequest.addInstanceFilter.instancefilter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.addInstanceFilter.instancefilter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/depth/depth001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/depth/depth001/TestDescription.java index 6710f6c25a3..efbdf410a91 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/depth/depth001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/depth/depth001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.StepRequest.depth.depth001 * nsk.jdi.StepRequest.depth.depth001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.depth.depth001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/depth/depth002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/depth/depth002/TestDescription.java index 0312a7de6bd..18a26558374 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/depth/depth002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/depth/depth002/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.StepRequest.depth.depth002 * nsk.jdi.StepRequest.depth.depth002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.depth.depth002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/depth/depth003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/depth/depth003/TestDescription.java index 6577af7497d..0589d36c91f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/depth/depth003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/depth/depth003/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.StepRequest.depth.depth003 * nsk.jdi.StepRequest.depth.depth003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.depth.depth003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/size/size001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/size/size001/TestDescription.java index e0c242d335c..0604a0a06d1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/size/size001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/size/size001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.StepRequest.size.size001 * nsk.jdi.StepRequest.size.size001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.size.size001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/size/size002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/size/size002/TestDescription.java index 5f438ddbc07..443b4195969 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/size/size002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/size/size002/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.StepRequest.size.size002 * nsk.jdi.StepRequest.size.size002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.size.size002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/thread/thread001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/thread/thread001/TestDescription.java index c3547776dd5..cd5f1803bf8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/thread/thread001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StepRequest/thread/thread001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.StepRequest.thread.thread001 * nsk.jdi.StepRequest.thread.thread001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StepRequest.thread.thread001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringArgument/isValid/isvalid001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringArgument/isValid/isvalid001/TestDescription.java index 842c7633806..14f7e061f7f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringArgument/isValid/isvalid001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringArgument/isValid/isvalid001/TestDescription.java @@ -55,13 +55,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.StringArgument.isValid.isvalid001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StringArgument.isValid.isvalid001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringArgument/isValid/isvalid002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringArgument/isValid/isvalid002/TestDescription.java index 24602835da8..708fe2d4666 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringArgument/isValid/isvalid002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringArgument/isValid/isvalid002/TestDescription.java @@ -55,13 +55,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.StringArgument.isValid.isvalid002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StringArgument.isValid.isvalid002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringArgument/isValid/isvalid003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringArgument/isValid/isvalid003/TestDescription.java index eb3dd0262b5..ebb5b4e9479 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringArgument/isValid/isvalid003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringArgument/isValid/isvalid003/TestDescription.java @@ -56,13 +56,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.StringArgument.isValid.isvalid003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StringArgument.isValid.isvalid003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringReference/value/value001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringReference/value/value001/TestDescription.java index 085a6e82acc..c19fbe7fd17 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringReference/value/value001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/StringReference/value/value001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.StringReference.value.value001 * nsk.jdi.StringReference.value.value001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.StringReference.value.value001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TEST.properties b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TEST.properties deleted file mode 100644 index 6859cc91e58..00000000000 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TEST.properties +++ /dev/null @@ -1,2 +0,0 @@ -# disabled till JDK-8252001 is fixed -allowSmartActionArgs=false diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathEvent/thread/thread001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathEvent/thread/thread001/TestDescription.java index bc879e2a8d3..7513f7cf546 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathEvent/thread/thread001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathEvent/thread/thread001/TestDescription.java @@ -82,13 +82,13 @@ * /test/lib * @build nsk.jdi.ThreadDeathEvent.thread.thread001 * nsk.jdi.ThreadDeathEvent.thread.thread001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadDeathEvent.thread.thread001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter001/TestDescription.java index 01e4ce0d939..9fbd01634fa 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter001 * nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter002/TestDescription.java index ea0c8ae1fef..e299bdb7345 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter002/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter002 * nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter003/TestDescription.java index 2128e2bcc8d..0f53c46f5db 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter003/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter003 * nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter004/TestDescription.java index 40ff3a02d9a..1df3c63f4eb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter004/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter004 * nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter005/TestDescription.java index f3c98626733..091e2004062 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadDeathRequest/addThreadFilter/addthreadfilter005/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter005 * nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadDeathRequest.addThreadFilter.addthreadfilter005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/name/name001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/name/name001/TestDescription.java index 1808989b289..ea384466ee2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/name/name001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/name/name001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.ThreadGroupReference.name.name001 * nsk.jdi.ThreadGroupReference.name.name001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadGroupReference.name.name001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/parent/parent001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/parent/parent001/TestDescription.java index f75104b709c..99c04427d78 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/parent/parent001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/parent/parent001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ThreadGroupReference.parent.parent001 * nsk.jdi.ThreadGroupReference.parent.parent001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadGroupReference.parent.parent001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/resume/resume001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/resume/resume001/TestDescription.java index 6f296d08495..9d2329ce88c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/resume/resume001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/resume/resume001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.ThreadGroupReference.resume.resume001 * nsk.jdi.ThreadGroupReference.resume.resume001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadGroupReference.resume.resume001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/suspend/suspend001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/suspend/suspend001/TestDescription.java index 137f3bd078a..55436a48a8e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/suspend/suspend001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/suspend/suspend001/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.ThreadGroupReference.suspend.suspend001 * nsk.jdi.ThreadGroupReference.suspend.suspend001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadGroupReference.suspend.suspend001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/threadGroups/threadgroups001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/threadGroups/threadgroups001/TestDescription.java index e8c04e8563d..7e3a5128d0a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/threadGroups/threadgroups001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/threadGroups/threadgroups001/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.ThreadGroupReference.threadGroups.threadgroups001 * nsk.jdi.ThreadGroupReference.threadGroups.threadgroups001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadGroupReference.threadGroups.threadgroups001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/threads/threads001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/threads/threads001/TestDescription.java index 97f57b946ab..74fc9d13d11 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/threads/threads001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/threads/threads001/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.ThreadGroupReference.threads.threads001 * nsk.jdi.ThreadGroupReference.threads.threads001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadGroupReference.threads.threads001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/toString/tostring001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/toString/tostring001/TestDescription.java index 15fccc874d0..db45e112596 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/toString/tostring001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadGroupReference/toString/tostring001/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.ThreadGroupReference.toString.tostring001 * nsk.jdi.ThreadGroupReference.toString.tostring001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadGroupReference.toString.tostring001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/_bounds_/bounds001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/_bounds_/bounds001/TestDescription.java index b5b11a64df9..8c1d0e999f8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/_bounds_/bounds001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/_bounds_/bounds001/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.ThreadReference._bounds_.bounds001 * nsk.jdi.ThreadReference._bounds_.bounds001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference._bounds_.bounds001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/currentContendedMonitor/currentcm001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/currentContendedMonitor/currentcm001/TestDescription.java index 7622d22d50f..96739b3911e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/currentContendedMonitor/currentcm001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/currentContendedMonitor/currentcm001/TestDescription.java @@ -76,13 +76,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.currentContendedMonitor.currentcm001 * nsk.jdi.ThreadReference.currentContendedMonitor.currentcm001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.currentContendedMonitor.currentcm001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn001/forceEarlyReturn001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn001/forceEarlyReturn001.java index 22a7cc6eba7..e8f412e2f4b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn001/forceEarlyReturn001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn001/forceEarlyReturn001.java @@ -59,14 +59,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn001.forceEarlyReturn001 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn001.forceEarlyReturn001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn001.forceEarlyReturn001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn001; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn002/forceEarlyReturn002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn002/forceEarlyReturn002.java index ab1f1911284..2913f0e7c32 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn002/forceEarlyReturn002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn002/forceEarlyReturn002.java @@ -45,14 +45,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn002.forceEarlyReturn002 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn002.forceEarlyReturn002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn002.forceEarlyReturn002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn002; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn003/forceEarlyReturn003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn003/forceEarlyReturn003.java index 5035c3e3970..796f88fb772 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn003/forceEarlyReturn003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn003/forceEarlyReturn003.java @@ -45,14 +45,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn003.forceEarlyReturn003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn003.forceEarlyReturn003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn003; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn004/forceEarlyReturn004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn004/forceEarlyReturn004.java index ced27ff2251..4154f728cb0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn004/forceEarlyReturn004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn004/forceEarlyReturn004.java @@ -39,14 +39,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn004.forceEarlyReturn004 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn004.forceEarlyReturn004a - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn004.forceEarlyReturn004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn004; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn005/forceEarlyReturn005.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn005/forceEarlyReturn005.java index 442cc548495..14f50fd9c24 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn005/forceEarlyReturn005.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn005/forceEarlyReturn005.java @@ -51,14 +51,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn005.forceEarlyReturn005 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn005.forceEarlyReturn005a - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn005.forceEarlyReturn005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn005; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn006/TestDescription.java index 0eca1999e1a..7e79b98e1f9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn006/TestDescription.java @@ -57,14 +57,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn001.forceEarlyReturn001 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn001.forceEarlyReturn001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn001.forceEarlyReturn001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -iterationsNumber 100 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn007/TestDescription.java index cab5fde141c..19135187b86 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn007/TestDescription.java @@ -62,14 +62,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn001.forceEarlyReturn001 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn001.forceEarlyReturn001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn001.forceEarlyReturn001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -iterationsNumber 50 * -totalThreadsCount 3 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn008/forceEarlyReturn008.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn008/forceEarlyReturn008.java index 28f89695de0..c4abb8a7bcc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn008/forceEarlyReturn008.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn008/forceEarlyReturn008.java @@ -72,14 +72,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn008.forceEarlyReturn008 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn008.forceEarlyReturn008a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn008.forceEarlyReturn008 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn008; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn009/forceEarlyReturn009.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn009/forceEarlyReturn009.java index 3e515493ad1..79ce3e1221b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn009/forceEarlyReturn009.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn009/forceEarlyReturn009.java @@ -49,14 +49,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn009.forceEarlyReturn009 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn009.forceEarlyReturn009a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn009.forceEarlyReturn009 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn009; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn010/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn010/TestDescription.java index 08331091381..7c133540d5d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn010/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn010/TestDescription.java @@ -45,14 +45,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn009.forceEarlyReturn009 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn009.forceEarlyReturn009a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn009.forceEarlyReturn009 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-XX:+Inline" + * -debugee.vmkeys="-XX:+Inline" * -inlineType INLINE_METHOD_RETURNING_CONST */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn011/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn011/TestDescription.java index e2c5b728b9c..0d680b868a6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn011/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn011/TestDescription.java @@ -45,14 +45,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn009.forceEarlyReturn009 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn009.forceEarlyReturn009a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn009.forceEarlyReturn009 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-XX:+Inline" + * -debugee.vmkeys="-XX:+Inline" * -inlineType INLINE_METHOD_ACCESSIN_INTERNAL_FIELDS */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn012/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn012/TestDescription.java index 59e366cab7c..faccfb08292 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn012/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn012/TestDescription.java @@ -46,14 +46,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn009.forceEarlyReturn009 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn009.forceEarlyReturn009a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn009.forceEarlyReturn009 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-XX:+Inline" + * -debugee.vmkeys="-XX:+Inline" * -inlineType INLINE_HOT_METHOD */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn013/forceEarlyReturn013.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn013/forceEarlyReturn013.java index 43f5d23666d..d0da4ab0dbd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn013/forceEarlyReturn013.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn013/forceEarlyReturn013.java @@ -50,14 +50,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn013.forceEarlyReturn013 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn013.forceEarlyReturn013a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn013.forceEarlyReturn013 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn013; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn014/forceEarlyReturn014.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn014/forceEarlyReturn014.java index 46dc746d16f..9ea8b30d356 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn014/forceEarlyReturn014.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn014/forceEarlyReturn014.java @@ -47,14 +47,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn014.forceEarlyReturn014 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn014.forceEarlyReturn014a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn014.forceEarlyReturn014 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn014; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn015/forceEarlyReturn015.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn015/forceEarlyReturn015.java index 250707641bb..7bd8403d2b2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn015/forceEarlyReturn015.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn015/forceEarlyReturn015.java @@ -39,14 +39,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn015.forceEarlyReturn015 * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn015.forceEarlyReturn015a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn015.forceEarlyReturn015 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn015; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frame/frame001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frame/frame001/TestDescription.java index 3f1539278ac..abe520cd2e9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frame/frame001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frame/frame001/TestDescription.java @@ -74,13 +74,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.frame.frame001 * nsk.jdi.ThreadReference.frame.frame001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.frame.frame001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frameCount/framecount001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frameCount/framecount001/TestDescription.java index 89dbb850323..342bcd1efb0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frameCount/framecount001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frameCount/framecount001/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.frameCount.framecount001 * nsk.jdi.ThreadReference.frameCount.framecount001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.frameCount.framecount001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frames/frames001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frames/frames001/TestDescription.java index f9d8dae151f..4fe12906ee5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frames/frames001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frames/frames001/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.frames.frames001 * nsk.jdi.ThreadReference.frames.frames001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.frames.frames001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frames_ii/frames_ii001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frames_ii/frames_ii001/TestDescription.java index b4c0b44fc2f..37ebcd218f6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frames_ii/frames_ii001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frames_ii/frames_ii001/TestDescription.java @@ -87,13 +87,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.frames_ii.frames_ii001 * nsk.jdi.ThreadReference.frames_ii.frames_ii001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.frames_ii.frames_ii001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frames_ii/frames_ii002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frames_ii/frames_ii002/TestDescription.java index fc2031b98ba..1df66298711 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frames_ii/frames_ii002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/frames_ii/frames_ii002/TestDescription.java @@ -74,13 +74,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.frames_ii.frames_ii002 * nsk.jdi.ThreadReference.frames_ii.frames_ii002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.frames_ii.frames_ii002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/interrupt/interrupt001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/interrupt/interrupt001/TestDescription.java index 3d1d5fae0e6..9c5e0d594f0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/interrupt/interrupt001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/interrupt/interrupt001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.interrupt.interrupt001 * nsk.jdi.ThreadReference.interrupt.interrupt001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.interrupt.interrupt001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isAtBreakpoint/isatbreakpoint001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isAtBreakpoint/isatbreakpoint001/TestDescription.java index d0be68a52a6..7d3cf9a061d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isAtBreakpoint/isatbreakpoint001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isAtBreakpoint/isatbreakpoint001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.isAtBreakpoint.isatbreakpoint001 * nsk.jdi.ThreadReference.isAtBreakpoint.isatbreakpoint001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.isAtBreakpoint.isatbreakpoint001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended001/TestDescription.java index b4c0db1b5ae..ab8fde089d2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.isSuspended.issuspended001 * nsk.jdi.ThreadReference.isSuspended.issuspended001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.isSuspended.issuspended001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended002/TestDescription.java index 19686eb8215..5348238b747 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended002/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.isSuspended.issuspended002 * nsk.jdi.ThreadReference.isSuspended.issuspended002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.isSuspended.issuspended002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended003/TestDescription.java index 3fad3f5dcfc..5597143c262 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended003/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.isSuspended.issuspended003 * nsk.jdi.ThreadReference.isSuspended.issuspended003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.isSuspended.issuspended003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended004/TestDescription.java index a2288ce895d..0b04e957bb8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/isSuspended/issuspended004/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.isSuspended.issuspended004 * nsk.jdi.ThreadReference.isSuspended.issuspended004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.isSuspended.issuspended004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/name/name001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/name/name001/TestDescription.java index 221c7491e26..3308aa2afd0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/name/name001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/name/name001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.name.name001 * nsk.jdi.ThreadReference.name.name001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.name.name001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitors/ownedmonitors001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitors/ownedmonitors001/TestDescription.java index 9aad06c9132..5f7aff450e3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitors/ownedmonitors001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitors/ownedmonitors001/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.ownedMonitors.ownedmonitors001 * nsk.jdi.ThreadReference.ownedMonitors.ownedmonitors001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.ownedMonitors.ownedmonitors001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitors/ownedmonitors002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitors/ownedmonitors002/TestDescription.java index 1d41537445b..44af178049f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitors/ownedmonitors002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitors/ownedmonitors002/TestDescription.java @@ -41,13 +41,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.ownedMonitors.ownedmonitors002 * nsk.jdi.ThreadReference.ownedMonitors.ownedmonitors002t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.ownedMonitors.ownedmonitors002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames001/ownedMonitorsAndFrames001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames001/ownedMonitorsAndFrames001.java index 90dbb2d664f..57cabe088a0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames001/ownedMonitorsAndFrames001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames001/ownedMonitorsAndFrames001.java @@ -43,14 +43,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames001.ownedMonitorsAndFrames001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames001.ownedMonitorsAndFrames001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames001; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames002/ownedMonitorsAndFrames002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames002/ownedMonitorsAndFrames002.java index 9adb9f65df8..d10b8bbfbfb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames002/ownedMonitorsAndFrames002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames002/ownedMonitorsAndFrames002.java @@ -49,14 +49,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames002.ownedMonitorsAndFrames002 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames002.ownedMonitorsAndFrames002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames002; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames003/ownedMonitorsAndFrames003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames003/ownedMonitorsAndFrames003.java index 67a11931e57..733b0947cec 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames003/ownedMonitorsAndFrames003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames003/ownedMonitorsAndFrames003.java @@ -48,14 +48,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames003.ownedMonitorsAndFrames003 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames003.ownedMonitorsAndFrames003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames003; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames004/ownedMonitorsAndFrames004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames004/ownedMonitorsAndFrames004.java index a3368445021..85741a0d58b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames004/ownedMonitorsAndFrames004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames004/ownedMonitorsAndFrames004.java @@ -45,14 +45,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames004.ownedMonitorsAndFrames004 * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames004.ownedMonitorsAndFrames004a - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames004.ownedMonitorsAndFrames004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames004; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames005/ownedMonitorsAndFrames005.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames005/ownedMonitorsAndFrames005.java index 5a25d28d253..fcd27177a70 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames005/ownedMonitorsAndFrames005.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames005/ownedMonitorsAndFrames005.java @@ -45,14 +45,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames005.ownedMonitorsAndFrames005 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames005.ownedMonitorsAndFrames005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -expectJNIMonitors */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames006/ownedMonitorsAndFrames006.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames006/ownedMonitorsAndFrames006.java index 6c28b7be192..575572839be 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames006/ownedMonitorsAndFrames006.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames006/ownedMonitorsAndFrames006.java @@ -48,14 +48,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames006.ownedMonitorsAndFrames006 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames006.ownedMonitorsAndFrames006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames006; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames007/ownedMonitorsAndFrames007.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames007/ownedMonitorsAndFrames007.java index cbd407361de..c11acfe975e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames007/ownedMonitorsAndFrames007.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames007/ownedMonitorsAndFrames007.java @@ -51,14 +51,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames007.ownedMonitorsAndFrames007 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames007.ownedMonitorsAndFrames007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames007; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames008/TestDescription.java index 3d917b648d0..e453475599f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames008/TestDescription.java @@ -54,14 +54,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames007.ownedMonitorsAndFrames007 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames007.ownedMonitorsAndFrames007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xmixed + * -debugee.vmkeys="-Xmixed * -XX:CompileThreshold=2" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames009/ownedMonitorsAndFrames009.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames009/ownedMonitorsAndFrames009.java index 80884637f10..39d0bcb81d0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames009/ownedMonitorsAndFrames009.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/ownedMonitorsAndFrames/ownedMonitorsAndFrames009/ownedMonitorsAndFrames009.java @@ -44,14 +44,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames009.ownedMonitorsAndFrames009 * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames009.ownedMonitorsAndFrames009a - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames009.ownedMonitorsAndFrames009 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames009; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes001/TestDescription.java index aeb4b65120e..2d78c91dc78 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes001/TestDescription.java @@ -109,13 +109,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.popFrames.popframes001 * nsk.jdi.ThreadReference.popFrames.popframes001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.popFrames.popframes001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes002/TestDescription.java index c0e047b481d..1994de55722 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes002/TestDescription.java @@ -105,13 +105,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.popFrames.popframes002 * nsk.jdi.ThreadReference.popFrames.popframes002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.popFrames.popframes002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes003/TestDescription.java index e24bf84ca50..2b4da756261 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes003/TestDescription.java @@ -105,13 +105,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.popFrames.popframes003 * nsk.jdi.ThreadReference.popFrames.popframes003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.popFrames.popframes003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes004/TestDescription.java index 8c03c7f5dce..9547632f839 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes004/TestDescription.java @@ -104,13 +104,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.popFrames.popframes004 * nsk.jdi.ThreadReference.popFrames.popframes004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.popFrames.popframes004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes005/TestDescription.java index 536d4c40b7d..1103a2f3ac8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes005/TestDescription.java @@ -105,13 +105,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.popFrames.popframes005 * nsk.jdi.ThreadReference.popFrames.popframes005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.popFrames.popframes005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes006/TestDescription.java index 64aa3f696e1..c2d06a1d80e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes006/TestDescription.java @@ -48,13 +48,13 @@ * @clean nsk.jdi.ThreadReference.popFrames.popframes006t * @compile -g:lines,source,vars ../popframes006t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.popFrames.popframes006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes007/TestDescription.java index a466daebf50..aea380870f7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/popFrames/popframes007/TestDescription.java @@ -48,13 +48,13 @@ * @clean nsk.jdi.ThreadReference.popFrames.popframes007t * @compile -g:lines,source,vars ../popframes007t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.popFrames.popframes007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/resume/resume001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/resume/resume001/TestDescription.java index 76bf1e5c185..90f57fc35ad 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/resume/resume001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/resume/resume001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.resume.resume001 * nsk.jdi.ThreadReference.resume.resume001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.resume.resume001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status003/status003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status003/status003.java index e8f1e77a5f2..6f2d891873a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status003/status003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status003/status003.java @@ -63,14 +63,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.status.status003.status003 * nsk.jdi.ThreadReference.status.status003.status003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.status.status003.status003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.status.status003; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status004/status004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status004/status004.java index cbe7a6040b7..0e0501b4eeb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status004/status004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status004/status004.java @@ -59,14 +59,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.status.status004.status004 * nsk.jdi.ThreadReference.status.status004.status004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.status.status004.status004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.status.status004; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status005/status005.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status005/status005.java index 44be1e66281..941de937786 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status005/status005.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status005/status005.java @@ -59,14 +59,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.status.status005.status005 * nsk.jdi.ThreadReference.status.status005.status005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.status.status005.status005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.status.status005; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status006/status006.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status006/status006.java index da925accbb0..5fbb1a84d26 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status006/status006.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status006/status006.java @@ -60,14 +60,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.status.status006.status006 * nsk.jdi.ThreadReference.status.status006.status006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.status.status006.status006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.status.status006; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status007/status007.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status007/status007.java index c439e313109..3013eda0cc0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status007/status007.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status007/status007.java @@ -55,14 +55,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.status.status007.status007 * nsk.jdi.ThreadReference.status.status007.status007a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.status.status007.status007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.status.status007; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status008/status008.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status008/status008.java index cf59af08c2b..e70f9897621 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status008/status008.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/status/status008/status008.java @@ -60,14 +60,14 @@ * /test/lib * @build nsk.jdi.ThreadReference.status.status008.status008 * nsk.jdi.ThreadReference.status.status008.status008a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.status.status008.status008 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.ThreadReference.status.status008; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/stop/stop001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/stop/stop001/TestDescription.java index 332549ac5f7..d4b33afd75d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/stop/stop001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/stop/stop001/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.stop.stop001 * nsk.jdi.ThreadReference.stop.stop001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.stop.stop001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/stop/stop002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/stop/stop002/TestDescription.java index 6bc0ba895af..4a16e986cbd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/stop/stop002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/stop/stop002/TestDescription.java @@ -48,13 +48,13 @@ * @clean nsk.jdi.ThreadReference.stop.stop002t * @compile -g:lines,source,vars ../stop002t.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.stop.stop002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/suspend/suspend001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/suspend/suspend001/TestDescription.java index 4b02211d4fe..7f4c2084475 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/suspend/suspend001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/suspend/suspend001/TestDescription.java @@ -74,13 +74,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.suspend.suspend001 * nsk.jdi.ThreadReference.suspend.suspend001a - * @run main/othervm/timeout=420 PropertyResolvingWrapper + * @run main/othervm/timeout=420 * nsk.jdi.ThreadReference.suspend.suspend001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/suspendCount/suspendcount001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/suspendCount/suspendcount001/TestDescription.java index 3034d24c5de..56bb1a771e7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/suspendCount/suspendcount001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/suspendCount/suspendcount001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.suspendCount.suspendcount001 * nsk.jdi.ThreadReference.suspendCount.suspendcount001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.suspendCount.suspendcount001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/threadGroup/threadgroup001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/threadGroup/threadgroup001/TestDescription.java index b628c4381c3..050b1c14b72 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/threadGroup/threadgroup001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadReference/threadGroup/threadgroup001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.ThreadReference.threadGroup.threadgroup001 * nsk.jdi.ThreadReference.threadGroup.threadgroup001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadReference.threadGroup.threadgroup001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartEvent/thread/thread001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartEvent/thread/thread001/TestDescription.java index 7e9b4c4967d..0c309dc979e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartEvent/thread/thread001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartEvent/thread/thread001/TestDescription.java @@ -85,13 +85,13 @@ * /test/lib * @build nsk.jdi.ThreadStartEvent.thread.thread001 * nsk.jdi.ThreadStartEvent.thread.thread001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadStartEvent.thread.thread001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter001/TestDescription.java index 2dfe912d866..2bdd0fdc59d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter001 * nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter002/TestDescription.java index df1206644ac..12505b1298a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter002/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter002 * nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter003/TestDescription.java index ba56b949b59..0bc4460e0d5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter003/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter003 * nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter004/TestDescription.java index 49671aaa2ba..847f1704574 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter004/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter004 * nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter005/TestDescription.java index 056d5d191e5..a210a76d533 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter005/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter005 * nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.ThreadStartRequest.addThreadFilter.addthreadfilter005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Transport/name/name001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Transport/name/name001/TestDescription.java index b564cc05e51..28e683f0db5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Transport/name/name001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Transport/name/name001/TestDescription.java @@ -58,13 +58,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.Transport.name.name001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Transport.name.name001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/hashCode/hashcode001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/hashCode/hashcode001/TestDescription.java index 06ddf2d1ddb..7fc4f4905aa 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/hashCode/hashcode001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/hashCode/hashcode001/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.Type.hashCode.hashcode001 * nsk.jdi.Type.hashCode.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Type.hashCode.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/name/name001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/name/name001/TestDescription.java index 7683d4cf65a..3fc4db5b173 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/name/name001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/name/name001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.Type.name.name001 * nsk.jdi.Type.name.name001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Type.name.name001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/name/name002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/name/name002/TestDescription.java index 6bc739cfd29..d61002c13db 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/name/name002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/name/name002/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.Type.name.name002 * nsk.jdi.Type.name.name002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Type.name.name002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/name/name003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/name/name003/TestDescription.java index 6688eb7d566..84a010425ab 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/name/name003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/name/name003/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.Type.name.name003 * nsk.jdi.Type.name.name003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Type.name.name003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/signature/signature001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/signature/signature001/TestDescription.java index a12d3dc9d36..d8bd0fd2c2b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/signature/signature001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/signature/signature001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.Type.signature.signature001 * nsk.jdi.Type.signature.signature001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Type.signature.signature001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/signature/signature002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/signature/signature002/TestDescription.java index 4794f31a2e9..bf9013fd4e1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/signature/signature002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/signature/signature002/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.Type.signature.signature002 * nsk.jdi.Type.signature.signature002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Type.signature.signature002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/signature/signature003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/signature/signature003/TestDescription.java index 464f71d11be..992051570a6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/signature/signature003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Type/signature/signature003/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.Type.signature.signature003 * nsk.jdi.Type.signature.signature003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Type.signature.signature003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype001/TestDescription.java index 9df2cd35997..fd96f6b0bcd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype001/TestDescription.java @@ -50,13 +50,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.declaringType.decltype001 * nsk.jdi.TypeComponent.declaringType.decltype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.declaringType.decltype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype002/TestDescription.java index d3c4dc05a3a..786fd77d51b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype002/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.declaringType.decltype002 * nsk.jdi.TypeComponent.declaringType.decltype002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.declaringType.decltype002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype003/TestDescription.java index 75a204949fd..3ea8af1e640 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype003/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.declaringType.decltype003 * nsk.jdi.TypeComponent.declaringType.decltype003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.declaringType.decltype003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype004/TestDescription.java index f734f06d46e..c016aa094cc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype004/TestDescription.java @@ -49,13 +49,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.declaringType.decltype004 * nsk.jdi.TypeComponent.declaringType.decltype004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.declaringType.decltype004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype005/TestDescription.java index 015516353ea..ca8be89b45d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype005/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.declaringType.decltype005 * nsk.jdi.TypeComponent.declaringType.decltype005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.declaringType.decltype005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype006/TestDescription.java index 1f35325f582..81ee182e92d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype006/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.declaringType.decltype006 * nsk.jdi.TypeComponent.declaringType.decltype006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.declaringType.decltype006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype007/TestDescription.java index b3b5ea680f1..d185a4ce9f5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype007/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.declaringType.decltype007 * nsk.jdi.TypeComponent.declaringType.decltype007a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.declaringType.decltype007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype008/TestDescription.java index 9180dad98bb..7c81dd97672 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype008/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.declaringType.decltype008 * nsk.jdi.TypeComponent.declaringType.decltype008a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.declaringType.decltype008 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype009/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype009/TestDescription.java index 30a45958c17..08249a079ad 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype009/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/declaringType/decltype009/TestDescription.java @@ -53,13 +53,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.declaringType.decltype009 * nsk.jdi.TypeComponent.declaringType.decltype009a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.declaringType.decltype009 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/genericSignature/genericSignature001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/genericSignature/genericSignature001/TestDescription.java index 0f1e15a96d8..89e2d53b30f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/genericSignature/genericSignature001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/genericSignature/genericSignature001/TestDescription.java @@ -49,13 +49,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.genericSignature.genericSignature001 * nsk.jdi.TypeComponent.genericSignature.genericSignature001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.genericSignature.genericSignature001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/genericSignature/genericSignature002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/genericSignature/genericSignature002/TestDescription.java index 41b70982d66..dfb660a9ba0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/genericSignature/genericSignature002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/genericSignature/genericSignature002/TestDescription.java @@ -47,13 +47,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.genericSignature.genericSignature002 * nsk.jdi.TypeComponent.genericSignature.genericSignature002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.genericSignature.genericSignature002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal001/TestDescription.java index b0229031c50..6dd539af43d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isFinal.isfinal001 * nsk.jdi.TypeComponent.isFinal.isfinal001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isFinal.isfinal001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal002/TestDescription.java index a23378d8ecf..814cf2de738 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal002/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isFinal.isfinal002 * nsk.jdi.TypeComponent.isFinal.isfinal002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isFinal.isfinal002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal003/TestDescription.java index c1c772f5286..46bdd35932c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal003/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isFinal.isfinal003 * nsk.jdi.TypeComponent.isFinal.isfinal003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isFinal.isfinal003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal004/TestDescription.java index 410a157ee5e..b1ca097ede8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isFinal/isfinal004/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isFinal.isfinal004 * nsk.jdi.TypeComponent.isFinal.isfinal004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isFinal.isfinal004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPackagePrivate/ispackageprivate001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPackagePrivate/ispackageprivate001/TestDescription.java index 2c7310f3e37..b32fcee0316 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPackagePrivate/ispackageprivate001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPackagePrivate/ispackageprivate001/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isPackagePrivate.ispackageprivate001 * nsk.jdi.TypeComponent.isPackagePrivate.ispackageprivate001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isPackagePrivate.ispackageprivate001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPackagePrivate/ispackageprivate002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPackagePrivate/ispackageprivate002/TestDescription.java index bc87986a80f..3f06b625753 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPackagePrivate/ispackageprivate002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPackagePrivate/ispackageprivate002/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isPackagePrivate.ispackageprivate002 * nsk.jdi.TypeComponent.isPackagePrivate.ispackageprivate002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isPackagePrivate.ispackageprivate002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPrivate/isprivate001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPrivate/isprivate001/TestDescription.java index 272d4656799..f1b91b06354 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPrivate/isprivate001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPrivate/isprivate001/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isPrivate.isprivate001 * nsk.jdi.TypeComponent.isPrivate.isprivate001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isPrivate.isprivate001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPrivate/isprivate002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPrivate/isprivate002/TestDescription.java index edac29d5247..d4dc79142c8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPrivate/isprivate002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPrivate/isprivate002/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isPrivate.isprivate002 * nsk.jdi.TypeComponent.isPrivate.isprivate002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isPrivate.isprivate002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isProtected/isprotected001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isProtected/isprotected001/TestDescription.java index 57e26947cb5..9a99e868e87 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isProtected/isprotected001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isProtected/isprotected001/TestDescription.java @@ -55,13 +55,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isProtected.isprotected001 * nsk.jdi.TypeComponent.isProtected.isprotected001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isProtected.isprotected001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isProtected/isprotected002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isProtected/isprotected002/TestDescription.java index 3d3b2f44067..06ee7260565 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isProtected/isprotected002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isProtected/isprotected002/TestDescription.java @@ -55,13 +55,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isProtected.isprotected002 * nsk.jdi.TypeComponent.isProtected.isprotected002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isProtected.isprotected002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPublic/ispublic001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPublic/ispublic001/TestDescription.java index 78b2d9422ad..23d664d1b38 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPublic/ispublic001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPublic/ispublic001/TestDescription.java @@ -55,13 +55,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isPublic.ispublic001 * nsk.jdi.TypeComponent.isPublic.ispublic001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isPublic.ispublic001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPublic/ispublic002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPublic/ispublic002/TestDescription.java index 01baf696bb4..c7a17646423 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPublic/ispublic002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isPublic/ispublic002/TestDescription.java @@ -55,13 +55,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isPublic.ispublic002 * nsk.jdi.TypeComponent.isPublic.ispublic002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isPublic.ispublic002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic001/TestDescription.java index fcfb4998622..151fef1060b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isStatic.isstatic001 * nsk.jdi.TypeComponent.isStatic.isstatic001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isStatic.isstatic001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic002/TestDescription.java index 03b3c82a7e5..f8318a95191 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic002/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isStatic.isstatic002 * nsk.jdi.TypeComponent.isStatic.isstatic002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isStatic.isstatic002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic003/TestDescription.java index e2d7d36b021..8d4c4eb5be2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic003/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isStatic.isstatic003 * nsk.jdi.TypeComponent.isStatic.isstatic003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isStatic.isstatic003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic004/TestDescription.java index dc540d3df58..4f584842364 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isStatic/isstatic004/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isStatic.isstatic004 * nsk.jdi.TypeComponent.isStatic.isstatic004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isStatic.isstatic004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isSynthetic/issynthetic001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isSynthetic/issynthetic001/TestDescription.java index 0c13b6a5c89..3134afaafba 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isSynthetic/issynthetic001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isSynthetic/issynthetic001/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isSynthetic.issynthetic001 * nsk.jdi.TypeComponent.isSynthetic.issynthetic001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isSynthetic.issynthetic001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isSynthetic/issynthetic002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isSynthetic/issynthetic002/TestDescription.java index 72e4d1f8708..bfdc8bd584c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isSynthetic/issynthetic002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/isSynthetic/issynthetic002/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.isSynthetic.issynthetic002 * nsk.jdi.TypeComponent.isSynthetic.issynthetic002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.isSynthetic.issynthetic002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/name/name001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/name/name001/TestDescription.java index 900bd421308..ba2bfaa75a1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/name/name001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/name/name001/TestDescription.java @@ -49,13 +49,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.name.name001 * nsk.jdi.TypeComponent.name.name001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.name.name001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/name/name002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/name/name002/TestDescription.java index d619ce55fda..9f8a6f2d777 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/name/name002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/name/name002/TestDescription.java @@ -49,13 +49,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.name.name002 * nsk.jdi.TypeComponent.name.name002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.name.name002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/name/name003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/name/name003/TestDescription.java index 5495c9120c1..60f060ae6bd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/name/name003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/name/name003/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.name.name003 * nsk.jdi.TypeComponent.name.name003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.name.name003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/signature/sign001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/signature/sign001/TestDescription.java index 8b4ba398f8e..4e6be5309cd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/signature/sign001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/signature/sign001/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.signature.sign001 * nsk.jdi.TypeComponent.signature.sign001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.signature.sign001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/signature/sign002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/signature/sign002/TestDescription.java index 61ec367dd0e..bb8eba626ad 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/signature/sign002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/signature/sign002/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.signature.sign002 * nsk.jdi.TypeComponent.signature.sign002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.signature.sign002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/signature/sign003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/signature/sign003/TestDescription.java index 65129b3cce0..156b6312bd9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/signature/sign003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/TypeComponent/signature/sign003/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.TypeComponent.signature.sign003 * nsk.jdi.TypeComponent.signature.sign003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.TypeComponent.signature.sign003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMCannotBeModifiedEx/_itself_/canntbemod001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMCannotBeModifiedEx/_itself_/canntbemod001/TestDescription.java index 33ddcfe46ae..5f3b4f6e38a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMCannotBeModifiedEx/_itself_/canntbemod001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMCannotBeModifiedEx/_itself_/canntbemod001/TestDescription.java @@ -37,13 +37,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.VMCannotBeModifiedEx._itself_.canntbemod001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VMCannotBeModifiedEx._itself_.canntbemod001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDeathEvent/_itself_/vmdeath001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDeathEvent/_itself_/vmdeath001/TestDescription.java index 5eeb7c47248..76de38122f5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDeathEvent/_itself_/vmdeath001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDeathEvent/_itself_/vmdeath001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.VMDeathEvent._itself_.vmdeath001 * nsk.jdi.VMDeathEvent._itself_.vmdeath001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VMDeathEvent._itself_.vmdeath001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDeathEvent/_itself_/vmdeath002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDeathEvent/_itself_/vmdeath002/TestDescription.java index d79b8e49e1d..48a49367193 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDeathEvent/_itself_/vmdeath002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDeathEvent/_itself_/vmdeath002/TestDescription.java @@ -80,13 +80,13 @@ * /test/lib * @build nsk.jdi.VMDeathEvent._itself_.vmdeath002 * nsk.jdi.VMDeathEvent._itself_.vmdeath002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VMDeathEvent._itself_.vmdeath002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDeathEvent/_itself_/vmdeath003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDeathEvent/_itself_/vmdeath003/TestDescription.java index 28512e2d1f3..7126613deb2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDeathEvent/_itself_/vmdeath003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDeathEvent/_itself_/vmdeath003/TestDescription.java @@ -79,13 +79,13 @@ * /test/lib * @build nsk.jdi.VMDeathEvent._itself_.vmdeath003 * nsk.jdi.VMDeathEvent._itself_.vmdeath003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VMDeathEvent._itself_.vmdeath003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDisconnectEvent/_itself_/disconnect001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDisconnectEvent/_itself_/disconnect001/TestDescription.java index 00d6fe253f7..5024fc4a09f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDisconnectEvent/_itself_/disconnect001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDisconnectEvent/_itself_/disconnect001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.VMDisconnectEvent._itself_.disconnect001 * nsk.jdi.VMDisconnectEvent._itself_.disconnect001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VMDisconnectEvent._itself_.disconnect001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDisconnectEvent/_itself_/disconnect002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDisconnectEvent/_itself_/disconnect002/TestDescription.java index 969677114ea..ed15a46853a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDisconnectEvent/_itself_/disconnect002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDisconnectEvent/_itself_/disconnect002/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.VMDisconnectEvent._itself_.disconnect002 * nsk.jdi.VMDisconnectEvent._itself_.disconnect002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VMDisconnectEvent._itself_.disconnect002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDisconnectEvent/_itself_/disconnect003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDisconnectEvent/_itself_/disconnect003/TestDescription.java index 41148401b69..c53345a8adb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDisconnectEvent/_itself_/disconnect003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMDisconnectEvent/_itself_/disconnect003/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.VMDisconnectEvent._itself_.disconnect003 * nsk.jdi.VMDisconnectEvent._itself_.disconnect003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VMDisconnectEvent._itself_.disconnect003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMOutOfMemoryException/VMOutOfMemoryException001/VMOutOfMemoryException001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMOutOfMemoryException/VMOutOfMemoryException001/VMOutOfMemoryException001.java index 9dcb67a263c..3825d9e8156 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMOutOfMemoryException/VMOutOfMemoryException001/VMOutOfMemoryException001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMOutOfMemoryException/VMOutOfMemoryException001/VMOutOfMemoryException001.java @@ -39,14 +39,14 @@ * /test/lib * @build nsk.jdi.VMOutOfMemoryException.VMOutOfMemoryException001.VMOutOfMemoryException001 * nsk.jdi.VMOutOfMemoryException.VMOutOfMemoryException001.VMOutOfMemoryException001t - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VMOutOfMemoryException.VMOutOfMemoryException001.VMOutOfMemoryException001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xmx256M ${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="-Xmx256M ${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.VMOutOfMemoryException.VMOutOfMemoryException001; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMStartEvent/thread/thread001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMStartEvent/thread/thread001/TestDescription.java index ad7d9f32e94..29c9808fdb4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMStartEvent/thread/thread001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VMStartEvent/thread/thread001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.VMStartEvent.thread.thread001 * nsk.jdi.VMStartEvent.thread.thread001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VMStartEvent.thread.thread001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/_itself_/value001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/_itself_/value001/TestDescription.java index c03e9d6e36f..ac9a80fde78 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/_itself_/value001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/_itself_/value001/TestDescription.java @@ -62,13 +62,13 @@ * @clean nsk.jdi.Value._itself_.value001a * @compile -g:lines,source,vars ../value001a.java * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Value._itself_.value001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/type/type001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/type/type001/TestDescription.java index e03c075a76e..588499e9082 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/type/type001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/type/type001/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.Value.type.type001 * nsk.jdi.Value.type.type001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Value.type.type001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/type/type002/type002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/type/type002/type002.java index 53841e408b1..85a015e788b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/type/type002/type002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/type/type002/type002.java @@ -57,14 +57,14 @@ * /test/lib * @build nsk.jdi.Value.type.type002.type002 * nsk.jdi.Value.type.type002.type002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Value.type.type002.type002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.Value.type.type002; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/type/type003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/type/type003/TestDescription.java index 4616a8649f3..31cee6b35b6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/type/type003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/Value/type/type003/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.Value.type.type003 * nsk.jdi.Value.type.type003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.Value.type.type003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allClasses/allclasses001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allClasses/allclasses001/TestDescription.java index fd4caedc2f6..c2a59119e89 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allClasses/allclasses001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allClasses/allclasses001/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.allClasses.allclasses001 * nsk.jdi.VirtualMachine.allClasses.allclasses001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.allClasses.allclasses001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allClasses/allclasses002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allClasses/allclasses002/TestDescription.java index bd692763836..8307a535dbb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allClasses/allclasses002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allClasses/allclasses002/TestDescription.java @@ -65,13 +65,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.allClasses.allclasses002 * nsk.jdi.VirtualMachine.allClasses.allclasses002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.allClasses.allclasses002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allThreads/allthreads001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allThreads/allthreads001/TestDescription.java index fd2d21fa024..a7148250f7d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allThreads/allthreads001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allThreads/allthreads001/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.allThreads.allthreads001 * nsk.jdi.VirtualMachine.allThreads.allthreads001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.allThreads.allthreads001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canAddMethod/canaddmethod001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canAddMethod/canaddmethod001/TestDescription.java index 4ce1ce67acd..e8a64b156ee 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canAddMethod/canaddmethod001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canAddMethod/canaddmethod001/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canAddMethod.canaddmethod001 * nsk.jdi.VirtualMachine.canAddMethod.canaddmethod001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canAddMethod.canaddmethod001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canBeModified/canbemodified001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canBeModified/canbemodified001/TestDescription.java index a17a6c258d0..a0af22093b1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canBeModified/canbemodified001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canBeModified/canbemodified001/TestDescription.java @@ -41,13 +41,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canBeModified.canbemodified001 * nsk.jdi.VirtualMachine.canBeModified.canbemodified001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canBeModified.canbemodified001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetBytecodes/cangetbytecodes001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetBytecodes/cangetbytecodes001/TestDescription.java index 244142249f4..9aaa5700f57 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetBytecodes/cangetbytecodes001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetBytecodes/cangetbytecodes001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canGetBytecodes.cangetbytecodes001 * nsk.jdi.VirtualMachine.canGetBytecodes.cangetbytecodes001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canGetBytecodes.cangetbytecodes001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetCurrentContendedMonitor/cangccm001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetCurrentContendedMonitor/cangccm001/TestDescription.java index eea4b9f8203..9efcc08e94b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetCurrentContendedMonitor/cangccm001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetCurrentContendedMonitor/cangccm001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canGetCurrentContendedMonitor.cangccm001 * nsk.jdi.VirtualMachine.canGetCurrentContendedMonitor.cangccm001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canGetCurrentContendedMonitor.cangccm001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetMonitorInfo/cangetmonitorinfo001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetMonitorInfo/cangetmonitorinfo001/TestDescription.java index 928edb32dc6..ea31019201c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetMonitorInfo/cangetmonitorinfo001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetMonitorInfo/cangetmonitorinfo001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canGetMonitorInfo.cangetmonitorinfo001 * nsk.jdi.VirtualMachine.canGetMonitorInfo.cangetmonitorinfo001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canGetMonitorInfo.cangetmonitorinfo001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetOwnedMonitorInfo/cangetinfo001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetOwnedMonitorInfo/cangetinfo001/TestDescription.java index 949dea4d34c..1d26e35dce3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetOwnedMonitorInfo/cangetinfo001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetOwnedMonitorInfo/cangetinfo001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canGetOwnedMonitorInfo.cangetinfo001 * nsk.jdi.VirtualMachine.canGetOwnedMonitorInfo.cangetinfo001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canGetOwnedMonitorInfo.cangetinfo001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetSourceDebugExtension/cangetsde001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetSourceDebugExtension/cangetsde001/TestDescription.java index 205a1a6cb17..b8fba65dbce 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetSourceDebugExtension/cangetsde001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetSourceDebugExtension/cangetsde001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canGetSourceDebugExtension.cangetsde001 * nsk.jdi.VirtualMachine.canGetSourceDebugExtension.cangetsde001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canGetSourceDebugExtension.cangetsde001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetSyntheticAttribute/cangetattr001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetSyntheticAttribute/cangetattr001/TestDescription.java index 4d825548631..71f83caf0a7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetSyntheticAttribute/cangetattr001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canGetSyntheticAttribute/cangetattr001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canGetSyntheticAttribute.cangetattr001 * nsk.jdi.VirtualMachine.canGetSyntheticAttribute.cangetattr001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canGetSyntheticAttribute.cangetattr001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canPopFrames/canpopframes001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canPopFrames/canpopframes001/TestDescription.java index 52a35cc2da3..3fabe495a4e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canPopFrames/canpopframes001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canPopFrames/canpopframes001/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canPopFrames.canpopframes001 * nsk.jdi.VirtualMachine.canPopFrames.canpopframes001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canPopFrames.canpopframes001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canRedefineClasses/canredefineclasses001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canRedefineClasses/canredefineclasses001/TestDescription.java index 0c836a1f13b..46301fa9658 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canRedefineClasses/canredefineclasses001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canRedefineClasses/canredefineclasses001/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canRedefineClasses.canredefineclasses001 * nsk.jdi.VirtualMachine.canRedefineClasses.canredefineclasses001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canRedefineClasses.canredefineclasses001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canRequestVMDeathEvent/canreqvmdev001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canRequestVMDeathEvent/canreqvmdev001/TestDescription.java index b34e2fd630a..2c696e60394 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canRequestVMDeathEvent/canreqvmdev001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canRequestVMDeathEvent/canreqvmdev001/TestDescription.java @@ -56,13 +56,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canRequestVMDeathEvent.canreqvmdev001 * nsk.jdi.VirtualMachine.canRequestVMDeathEvent.canreqvmdev001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canRequestVMDeathEvent.canreqvmdev001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canUnrestrictedlyRedefineClasses/curc001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canUnrestrictedlyRedefineClasses/curc001/TestDescription.java index 8e932d06886..e340480d525 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canUnrestrictedlyRedefineClasses/curc001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canUnrestrictedlyRedefineClasses/curc001/TestDescription.java @@ -57,13 +57,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canUnrestrictedlyRedefineClasses.curc001 * nsk.jdi.VirtualMachine.canUnrestrictedlyRedefineClasses.curc001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canUnrestrictedlyRedefineClasses.curc001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canUseInstanceFilters/canusefilters001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canUseInstanceFilters/canusefilters001/TestDescription.java index 0cc705abd0c..2fa6bf90576 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canUseInstanceFilters/canusefilters001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canUseInstanceFilters/canusefilters001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canUseInstanceFilters.canusefilters001 * nsk.jdi.VirtualMachine.canUseInstanceFilters.canusefilters001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canUseInstanceFilters.canusefilters001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canWatchFieldAccess/canwatchaccess001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canWatchFieldAccess/canwatchaccess001/TestDescription.java index 01687e8f91f..b094912cc21 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canWatchFieldAccess/canwatchaccess001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canWatchFieldAccess/canwatchaccess001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canWatchFieldAccess.canwatchaccess001 * nsk.jdi.VirtualMachine.canWatchFieldAccess.canwatchaccess001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canWatchFieldAccess.canwatchaccess001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canWatchFieldModification/canwatchmod001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canWatchFieldModification/canwatchmod001/TestDescription.java index 2ee7b53a183..54a210c2199 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canWatchFieldModification/canwatchmod001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/canWatchFieldModification/canwatchmod001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.canWatchFieldModification.canwatchmod001 * nsk.jdi.VirtualMachine.canWatchFieldModification.canwatchmod001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.canWatchFieldModification.canwatchmod001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/classesByName/classesbyname001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/classesByName/classesbyname001/TestDescription.java index d7436685b09..6ecca18722b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/classesByName/classesbyname001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/classesByName/classesbyname001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.classesByName.classesbyname001 * nsk.jdi.VirtualMachine.classesByName.classesbyname001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.classesByName.classesbyname001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/description/description001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/description/description001/TestDescription.java index c03a2b13fb4..b77f21cad43 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/description/description001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/description/description001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.description.description001 * nsk.jdi.VirtualMachine.description.description001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.description.description001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose001/TestDescription.java index 4f66b843c1c..20b19fdbb95 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose001/TestDescription.java @@ -74,13 +74,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.dispose.dispose001 * nsk.jdi.VirtualMachine.dispose.dispose001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.dispose.dispose001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002/TestDescription.java index 7f073e5bb97..8ee571a11ff 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002/TestDescription.java @@ -74,13 +74,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.dispose.dispose002 * nsk.jdi.VirtualMachine.dispose.dispose002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.dispose.dispose002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose003/TestDescription.java index 5a313a0531f..e9738d2a7b8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose003/TestDescription.java @@ -74,13 +74,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.dispose.dispose003 * nsk.jdi.VirtualMachine.dispose.dispose003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.dispose.dispose003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose004/TestDescription.java index 324e7bbbe0e..957d9426b6b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose004/TestDescription.java @@ -74,13 +74,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.dispose.dispose004 * nsk.jdi.VirtualMachine.dispose.dispose004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.dispose.dispose004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose005/TestDescription.java index 6a9675c8e27..fad793f5ce2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose005/TestDescription.java @@ -75,13 +75,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.dispose.dispose005 * nsk.jdi.VirtualMachine.dispose.dispose005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.dispose.dispose005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/eventQueue/eventqueue001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/eventQueue/eventqueue001/TestDescription.java index 47388d31947..7d8010ced2b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/eventQueue/eventqueue001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/eventQueue/eventqueue001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.eventQueue.eventqueue001 * nsk.jdi.VirtualMachine.eventQueue.eventqueue001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.eventQueue.eventqueue001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/eventRequestManager/eventrmanager001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/eventRequestManager/eventrmanager001/TestDescription.java index 30cdb672334..0f7360c3c2b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/eventRequestManager/eventrmanager001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/eventRequestManager/eventrmanager001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.eventRequestManager.eventrmanager001 * nsk.jdi.VirtualMachine.eventRequestManager.eventrmanager001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.eventRequestManager.eventrmanager001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/exit/exit001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/exit/exit001/TestDescription.java index 29f2d25faa9..1cdf827c5b4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/exit/exit001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/exit/exit001/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.exit.exit001 * nsk.jdi.VirtualMachine.exit.exit001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.exit.exit001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/exit/exit002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/exit/exit002/TestDescription.java index 3ea2af900a3..217c6c410b2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/exit/exit002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/exit/exit002/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.exit.exit002 * nsk.jdi.VirtualMachine.exit.exit002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.exit.exit002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/getDefaultStratum/getdefaultstratum001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/getDefaultStratum/getdefaultstratum001/TestDescription.java index 5fc40a2fc34..621493837b6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/getDefaultStratum/getdefaultstratum001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/getDefaultStratum/getdefaultstratum001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.getDefaultStratum.getdefaultstratum001 * nsk.jdi.VirtualMachine.getDefaultStratum.getdefaultstratum001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.getDefaultStratum.getdefaultstratum001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts001/instancecounts001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts001/instancecounts001.java index b5a5f640232..5f67dfaa363 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts001/instancecounts001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts001/instancecounts001.java @@ -47,14 +47,14 @@ * nsk.share.jdi.TestClass1 * nsk.share.jdi.TestClass2 * nsk.share.jdi.TestInterfaceImplementer1 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.VirtualMachine.instanceCounts.instancecounts001.instancecounts001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.VirtualMachine.instanceCounts.instancecounts001; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts002/TestDescription.java index 1801887663f..2bbd93bb3c6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts002/TestDescription.java @@ -48,14 +48,14 @@ * nsk.share.jdi.TestClass1 * nsk.share.jdi.TestClass2 * nsk.share.jdi.TestInterfaceImplementer1 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdi.VirtualMachine.instanceCounts.instancecounts001.instancecounts001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xmx256M ${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="-Xmx256M ${test.vm.opts} ${test.java.opts}" * -forceGC */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts003/instancecounts003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts003/instancecounts003.java index dd36736da95..98d9e04e1c4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts003/instancecounts003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts003/instancecounts003.java @@ -48,14 +48,14 @@ * @build nsk.jdi.VirtualMachine.instanceCounts.instancecounts003.instancecounts003 * nsk.share.jdi.TestClass1 * nsk.share.jdi.TestInterfaceImplementer1 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.instanceCounts.instancecounts003.instancecounts003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xmx256M ${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="-Xmx256M ${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts004/instancecounts004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts004/instancecounts004.java index c9efd712f7e..256d7ce1e06 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts004/instancecounts004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/instanceCounts/instancecounts004/instancecounts004.java @@ -41,14 +41,14 @@ * /test/lib * @build nsk.jdi.VirtualMachine.instanceCounts.instancecounts004.instancecounts004 * nsk.jdi.VirtualMachine.instanceCounts.instancecounts004.instancecounts004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.instanceCounts.instancecounts004.instancecounts004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xmx256M ${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="-Xmx256M ${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.VirtualMachine.instanceCounts.instancecounts004; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_bool/mirrorof_bool001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_bool/mirrorof_bool001/TestDescription.java index 2e4898b47cf..8af423280a4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_bool/mirrorof_bool001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_bool/mirrorof_bool001/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.mirrorOf_bool.mirrorof_bool001 * nsk.jdi.VirtualMachine.mirrorOf_bool.mirrorof_bool001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.mirrorOf_bool.mirrorof_bool001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_byte/mirrorof_byte001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_byte/mirrorof_byte001/TestDescription.java index b84224624a8..07dd68d5ca7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_byte/mirrorof_byte001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_byte/mirrorof_byte001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.mirrorOf_byte.mirrorof_byte001 * nsk.jdi.VirtualMachine.mirrorOf_byte.mirrorof_byte001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.mirrorOf_byte.mirrorof_byte001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_char/mirrorof_char001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_char/mirrorof_char001/TestDescription.java index 5790f9e79c9..ad372bf5724 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_char/mirrorof_char001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_char/mirrorof_char001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.mirrorOf_char.mirrorof_char001 * nsk.jdi.VirtualMachine.mirrorOf_char.mirrorof_char001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.mirrorOf_char.mirrorof_char001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_double/mirrorof_double001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_double/mirrorof_double001/TestDescription.java index 69c6a39dfe8..805b185d38b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_double/mirrorof_double001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_double/mirrorof_double001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.mirrorOf_double.mirrorof_double001 * nsk.jdi.VirtualMachine.mirrorOf_double.mirrorof_double001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.mirrorOf_double.mirrorof_double001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_float/mirrorof_float001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_float/mirrorof_float001/TestDescription.java index ad1f96d5639..a936dfd632d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_float/mirrorof_float001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_float/mirrorof_float001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.mirrorOf_float.mirrorof_float001 * nsk.jdi.VirtualMachine.mirrorOf_float.mirrorof_float001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.mirrorOf_float.mirrorof_float001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_int/mirrorof_int001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_int/mirrorof_int001/TestDescription.java index b9467aa619e..8ccff3f2b27 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_int/mirrorof_int001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_int/mirrorof_int001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.mirrorOf_int.mirrorof_int001 * nsk.jdi.VirtualMachine.mirrorOf_int.mirrorof_int001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.mirrorOf_int.mirrorof_int001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_long/mirrorof_long001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_long/mirrorof_long001/TestDescription.java index d5c7b8881b6..abe82f0d5d6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_long/mirrorof_long001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_long/mirrorof_long001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.mirrorOf_long.mirrorof_long001 * nsk.jdi.VirtualMachine.mirrorOf_long.mirrorof_long001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.mirrorOf_long.mirrorof_long001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_short/mirrorof_short001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_short/mirrorof_short001/TestDescription.java index bb26ed2d27f..3af905f9aa2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_short/mirrorof_short001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_short/mirrorof_short001/TestDescription.java @@ -66,13 +66,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.mirrorOf_short.mirrorof_short001 * nsk.jdi.VirtualMachine.mirrorOf_short.mirrorof_short001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.mirrorOf_short.mirrorof_short001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_string/mirrorof_string001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_string/mirrorof_string001/TestDescription.java index fc50c81a551..ec8e9a6fa9a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_string/mirrorof_string001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/mirrorOf_string/mirrorof_string001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.mirrorOf_string.mirrorof_string001 * nsk.jdi.VirtualMachine.mirrorOf_string.mirrorof_string001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.mirrorOf_string.mirrorof_string001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/name/name001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/name/name001/TestDescription.java index 7db4cac9043..1395db72e4d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/name/name001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/name/name001/TestDescription.java @@ -58,13 +58,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.name.name001 * nsk.jdi.VirtualMachine.name.name001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.name.name001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/process/process001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/process/process001/TestDescription.java index a267c489eb8..7dd5fc60611 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/process/process001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/process/process001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.process.process001 * nsk.jdi.VirtualMachine.process.process001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.process.process001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses001/TestDescription.java index 667f33eaf0a..a518ea291a1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses001/TestDescription.java @@ -125,7 +125,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses001 * ./bin * -verbose @@ -133,6 +133,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses002/TestDescription.java index f87b23c7ec9..325dffd802b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses002/TestDescription.java @@ -76,7 +76,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses002 * ./bin * -verbose @@ -84,6 +84,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses003/TestDescription.java index 3f0390862de..a4ed80f2df7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses003/TestDescription.java @@ -66,7 +66,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses003 * ./bin * -verbose @@ -74,6 +74,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses004/TestDescription.java index bdc105c3af3..9a4b945d1fd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses004/TestDescription.java @@ -63,7 +63,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 newclass04 newclass05 newclass06 newclass07 newclass08 newclass09 newclass10 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses004 * ./bin * -verbose @@ -71,6 +71,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses005/TestDescription.java index 8e2e509c91f..c599af8eef9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses005/TestDescription.java @@ -60,7 +60,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 newclass04 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses005 * ./bin * -verbose @@ -68,6 +68,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses006/TestDescription.java index f63dc50c682..eec6af71164 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses006/TestDescription.java @@ -60,7 +60,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 newclass04 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses006 * ./bin * -verbose @@ -68,6 +68,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses007/TestDescription.java index 4e34545e2b5..16aa6a49e52 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses007/TestDescription.java @@ -69,7 +69,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 newclass04 newclass05 newclass06 newclass07 newclass08 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses007 * ./bin * -verbose @@ -77,6 +77,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/TestDescription.java index 1c714b5a32a..ce15c55522a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/TestDescription.java @@ -71,7 +71,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 newclass04 newclass05 newclass06 newclass07 newclass08 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses008 * ./bin * -verbose @@ -79,6 +79,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses009/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses009/TestDescription.java index 97d4c505ea4..362d3e6892f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses009/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses009/TestDescription.java @@ -64,7 +64,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses009 * ./bin * -verbose @@ -72,6 +72,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses010/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses010/TestDescription.java index 8f402f8f97e..37ad860f379 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses010/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses010/TestDescription.java @@ -61,7 +61,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 newclass04 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses010 * ./bin * -verbose @@ -69,6 +69,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011/TestDescription.java index 226d89ddedf..5b05ebc68fb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011/TestDescription.java @@ -76,7 +76,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 newclass04 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses011 * ./bin * -verbose @@ -84,6 +84,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses012/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses012/TestDescription.java index 3c834ad75f2..46ead6fd5d9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses012/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses012/TestDescription.java @@ -62,7 +62,7 @@ * -g:lines,source,vars * newclass01 newclass02 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses012 * ./bin * -verbose @@ -70,6 +70,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses013/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses013/TestDescription.java index 8b23543af3d..a2b1975f535 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses013/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses013/TestDescription.java @@ -63,7 +63,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses013 * ./bin * -verbose @@ -71,6 +71,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses014/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses014/TestDescription.java index fdbc5fcd57c..0f84d4ec210 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses014/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses014/TestDescription.java @@ -61,7 +61,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses014 * ./bin * -verbose @@ -69,6 +69,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses015/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses015/TestDescription.java index 7b0ef5f9a8a..4558fc09f59 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses015/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses015/TestDescription.java @@ -81,7 +81,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 newclass04 newclass05 newclass06 newclass07 newclass08 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses015 * ./bin * -verbose @@ -89,6 +89,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses016/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses016/TestDescription.java index ccf6c498f04..c913540a507 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses016/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses016/TestDescription.java @@ -72,7 +72,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 newclass04 newclass05 newclass06 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses016 * ./bin * -verbose @@ -80,6 +80,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses020/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses020/TestDescription.java index 8d9b5d03b09..9f756855def 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses020/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses020/TestDescription.java @@ -58,7 +58,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 newclass04 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses020 * ./bin * -verbose @@ -66,6 +66,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses021/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses021/TestDescription.java index 47860e7be2b..eda326e8009 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses021/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses021/TestDescription.java @@ -61,7 +61,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 newclass04 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses021 * ./bin * -verbose @@ -69,6 +69,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses022/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses022/TestDescription.java index b5358f88f60..47c14cfe584 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses022/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses022/TestDescription.java @@ -57,7 +57,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses022 * ./bin * -verbose @@ -65,6 +65,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses023/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses023/TestDescription.java index a2d96f02d97..11e05e877da 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses023/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses023/TestDescription.java @@ -58,7 +58,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses023 * ./bin * -verbose @@ -66,6 +66,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses024/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses024/TestDescription.java index 150aa0b3c60..12acf21b700 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses024/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses024/TestDescription.java @@ -64,7 +64,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 newclass04 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses024 * ./bin * -verbose @@ -72,6 +72,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses025/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses025/TestDescription.java index 52cc6e1e987..a43707d0fea 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses025/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses025/TestDescription.java @@ -59,7 +59,7 @@ * -g:lines,source,vars * newclass01 newclass02 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses025 * ./bin * -verbose @@ -67,6 +67,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses026/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses026/TestDescription.java index 3b508ea3e47..5280b6d70e3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses026/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses026/TestDescription.java @@ -56,7 +56,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses026 * ./bin * -verbose @@ -64,6 +64,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses027/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses027/TestDescription.java index 7fe38267ff5..05f0233488b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses027/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses027/TestDescription.java @@ -51,7 +51,7 @@ * /test/lib * @build nsk.jdi.VirtualMachine.redefineClasses.redefineclasses027 * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses027a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses027 * ./bin * -verbose @@ -59,6 +59,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses028/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses028/TestDescription.java index 3ac6d6b6224..3be96b013c9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses028/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses028/TestDescription.java @@ -50,7 +50,7 @@ * /test/lib * @build nsk.jdi.VirtualMachine.redefineClasses.redefineclasses028 * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses028a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses028 * ./bin * -verbose @@ -58,6 +58,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses029/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses029/TestDescription.java index f32501b56d3..ca42be699a5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses029/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses029/TestDescription.java @@ -46,13 +46,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.redefineClasses.redefineclasses029 * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses029a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses029 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses030/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses030/TestDescription.java index a35b521b3d7..87e041df41c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses030/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses030/TestDescription.java @@ -67,7 +67,7 @@ * @build nsk.jdi.VirtualMachine.redefineClasses.redefineclasses030 * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses030a * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses030 * ./bin * -verbose @@ -75,6 +75,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses031/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses031/TestDescription.java index d98a1d7800d..35a213c611c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses031/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses031/TestDescription.java @@ -52,7 +52,7 @@ * -g:lines,source,vars * newclass01 newclass02 newclass03 newclass04 newclass05 * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses031 * ./bin * -verbose @@ -60,6 +60,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses032/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses032/TestDescription.java index 0d74ec034c4..2b32e1751d5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses032/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses032/TestDescription.java @@ -51,7 +51,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses032 * ./bin * -verbose @@ -59,6 +59,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses034/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses034/TestDescription.java index 828130ab963..5869e2f2db7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses034/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses034/TestDescription.java @@ -70,7 +70,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses034 * ./bin * -verbose @@ -78,6 +78,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses035/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses035/TestDescription.java index 8faea360264..225df7f26eb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses035/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses035/TestDescription.java @@ -69,7 +69,7 @@ * -g:lines,source,vars * newclass * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.redefineClasses.redefineclasses035 * ./bin * -verbose @@ -77,6 +77,6 @@ * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/resume/resume001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/resume/resume001/TestDescription.java index e56c922ee72..79e441f0c9c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/resume/resume001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/resume/resume001/TestDescription.java @@ -43,13 +43,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.resume.resume001 * nsk.jdi.VirtualMachine.resume.resume001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.resume.resume001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/setDefaultStratum/setDefaultStratum002/setDefaultStratum002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/setDefaultStratum/setDefaultStratum002/setDefaultStratum002.java index c910da799d9..0ee0ca30a5e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/setDefaultStratum/setDefaultStratum002/setDefaultStratum002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/setDefaultStratum/setDefaultStratum002/setDefaultStratum002.java @@ -71,14 +71,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.VirtualMachine.setDefaultStratum.setDefaultStratum002.setDefaultStratum002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.setDefaultStratum.setDefaultStratum002.setDefaultStratum002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/setDefaultStratum/setDefaultStratum003/setDefaultStratum003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/setDefaultStratum/setDefaultStratum003/setDefaultStratum003.java index d2effea1e69..d6053006e13 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/setDefaultStratum/setDefaultStratum003/setDefaultStratum003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/setDefaultStratum/setDefaultStratum003/setDefaultStratum003.java @@ -58,14 +58,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.VirtualMachine.setDefaultStratum.setDefaultStratum003.setDefaultStratum003 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.setDefaultStratum.setDefaultStratum003.setDefaultStratum003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -testWorkDir . * -testStratumCount 3 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/setDefaultStratum/setdefaultstratum001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/setDefaultStratum/setdefaultstratum001/TestDescription.java index 5fd7fc9a862..c1454186563 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/setDefaultStratum/setdefaultstratum001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/setDefaultStratum/setdefaultstratum001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.setDefaultStratum.setdefaultstratum001 * nsk.jdi.VirtualMachine.setDefaultStratum.setdefaultstratum001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.setDefaultStratum.setdefaultstratum001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/suspend/suspend001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/suspend/suspend001/TestDescription.java index cd96d48fb11..f02c6e944b9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/suspend/suspend001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/suspend/suspend001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.suspend.suspend001 * nsk.jdi.VirtualMachine.suspend.suspend001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.suspend.suspend001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/topLevelThreadGroups/toplevelgroups001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/topLevelThreadGroups/toplevelgroups001/TestDescription.java index 9d1157a38f1..4e8cf9bdd4a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/topLevelThreadGroups/toplevelgroups001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/topLevelThreadGroups/toplevelgroups001/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.topLevelThreadGroups.toplevelgroups001 * nsk.jdi.VirtualMachine.topLevelThreadGroups.toplevelgroups001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.topLevelThreadGroups.toplevelgroups001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/version/version001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/version/version001/TestDescription.java index 304d7acc015..5b27b8a49e1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/version/version001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/version/version001/TestDescription.java @@ -61,13 +61,13 @@ * /test/lib * @build nsk.jdi.VirtualMachine.version.version001 * nsk.jdi.VirtualMachine.version.version001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachine.version.version001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/allConnectors/allconnectors001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/allConnectors/allconnectors001/TestDescription.java index 8cdc9b5c06a..9a38909b74d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/allConnectors/allconnectors001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/allConnectors/allconnectors001/TestDescription.java @@ -46,13 +46,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.VirtualMachineManager.allConnectors.allconnectors001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.allConnectors.allconnectors001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/attachingConnectors/attaching001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/attachingConnectors/attaching001/TestDescription.java index f53bb42277a..4f1524a3bb0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/attachingConnectors/attaching001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/attachingConnectors/attaching001/TestDescription.java @@ -48,13 +48,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.VirtualMachineManager.attachingConnectors.attaching001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.attachingConnectors.attaching001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/connectedVirtualMachines/convm001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/connectedVirtualMachines/convm001/TestDescription.java index f1a62c90115..cc48dc008b8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/connectedVirtualMachines/convm001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/connectedVirtualMachines/convm001/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.VirtualMachineManager.connectedVirtualMachines.convm001 * nsk.jdi.VirtualMachineManager.connectedVirtualMachines.convm001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.connectedVirtualMachines.convm001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/connectedVirtualMachines/convm002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/connectedVirtualMachines/convm002/TestDescription.java index 7955186a68c..e4c672cbcd8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/connectedVirtualMachines/convm002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/connectedVirtualMachines/convm002/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.VirtualMachineManager.connectedVirtualMachines.convm002 * nsk.jdi.VirtualMachineManager.connectedVirtualMachines.convm002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.connectedVirtualMachines.convm002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/connectedVirtualMachines/convm003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/connectedVirtualMachines/convm003/TestDescription.java index 6f70755bcb8..7b4c2a770bb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/connectedVirtualMachines/convm003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/connectedVirtualMachines/convm003/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.VirtualMachineManager.connectedVirtualMachines.convm003 * nsk.jdi.VirtualMachineManager.connectedVirtualMachines.convm003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.connectedVirtualMachines.convm003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM001/TestDescription.java index 28cdcff2358..5af48490429 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM001/TestDescription.java @@ -42,13 +42,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.VirtualMachineManager.createVirtualMachine.createVM001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.createVirtualMachine.createVM001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM002/TestDescription.java index aabe9ce0ecb..f96d7d86b15 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM002/TestDescription.java @@ -44,13 +44,13 @@ * /test/lib * @build nsk.jdi.VirtualMachineManager.createVirtualMachine.createVM002 * nsk.jdi.VirtualMachineManager.createVirtualMachine.CreateVM002_TargetVM - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.createVirtualMachine.createVM002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM003/TestDescription.java index 1d136869f98..92450ed487b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM003/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.VirtualMachineManager.createVirtualMachine.createVM003 * nsk.jdi.VirtualMachineManager.createVirtualMachine.CreateVM003_TargetVM - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.createVirtualMachine.createVM003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM004/TestDescription.java index 74ce4c3dcfd..728fff0ab7d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM004/TestDescription.java @@ -49,13 +49,13 @@ * /test/lib * @build nsk.jdi.VirtualMachineManager.createVirtualMachine.createVM004 * nsk.jdi.VirtualMachineManager.createVirtualMachine.CreateVM004_TargetVM - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.createVirtualMachine.createVM004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM005/TestDescription.java index c9441bb5f69..730f91cd55e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM005/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.VirtualMachineManager.createVirtualMachine.createVM005 * nsk.jdi.VirtualMachineManager.createVirtualMachine.CreateVM005_TargetVM - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.createVirtualMachine.createVM005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/defaultConnector/default001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/defaultConnector/default001/TestDescription.java index a4ea7c1fe64..b1feb8ff05c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/defaultConnector/default001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/defaultConnector/default001/TestDescription.java @@ -48,13 +48,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.VirtualMachineManager.defaultConnector.default001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.defaultConnector.default001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/launchingConnectors/launching001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/launchingConnectors/launching001/TestDescription.java index 0ac859c63c2..c062a4668f3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/launchingConnectors/launching001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/launchingConnectors/launching001/TestDescription.java @@ -48,13 +48,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.VirtualMachineManager.launchingConnectors.launching001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.launchingConnectors.launching001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/listeningConnectors/listening001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/listeningConnectors/listening001/TestDescription.java index ca8dd296aec..6cd688b85c2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/listeningConnectors/listening001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/listeningConnectors/listening001/TestDescription.java @@ -48,13 +48,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.VirtualMachineManager.listeningConnectors.listening001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.listeningConnectors.listening001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/majorInterfaceVersion/major001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/majorInterfaceVersion/major001/TestDescription.java index e0a55fc72f0..0e11b925862 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/majorInterfaceVersion/major001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/majorInterfaceVersion/major001/TestDescription.java @@ -48,13 +48,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.VirtualMachineManager.majorInterfaceVersion.major001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.majorInterfaceVersion.major001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/minorInterfaceVersion/minor001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/minorInterfaceVersion/minor001/TestDescription.java index c5068027344..5e25980f4e5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/minorInterfaceVersion/minor001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/minorInterfaceVersion/minor001/TestDescription.java @@ -48,13 +48,13 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.VirtualMachineManager.minorInterfaceVersion.minor001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VirtualMachineManager.minorInterfaceVersion.minor001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidType/_itself_/voidtype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidType/_itself_/voidtype001/TestDescription.java index 9309fc0851f..097375e25db 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidType/_itself_/voidtype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidType/_itself_/voidtype001/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.VoidType._itself_.voidtype001 * nsk.jdi.VoidType._itself_.voidtype001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VoidType._itself_.voidtype001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidType/toString/tostring001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidType/toString/tostring001/TestDescription.java index 575b78fa710..78b3d114708 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidType/toString/tostring001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidType/toString/tostring001/TestDescription.java @@ -51,13 +51,13 @@ * /test/lib * @build nsk.jdi.VoidType.toString.tostring001 * nsk.jdi.VoidType.toString.tostring001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VoidType.toString.tostring001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/equals/equals001/equals001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/equals/equals001/equals001.java index d67a9e911c8..0215c771cc9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/equals/equals001/equals001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/equals/equals001/equals001.java @@ -58,14 +58,14 @@ * /test/lib * @build nsk.jdi.VoidValue.equals.equals001.equals001 * nsk.jdi.VoidValue.equals.equals001.equals001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VoidValue.equals.equals001.equals001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.VoidValue.equals.equals001; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/equals/equals002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/equals/equals002/TestDescription.java index 67b0f8a6797..9b4778cd4c9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/equals/equals002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/equals/equals002/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.VoidValue.equals.equals002 * nsk.jdi.VoidValue.equals.equals002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VoidValue.equals.equals002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/hashCode/hashcode001/hashcode001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/hashCode/hashcode001/hashcode001.java index 87ab1fffe64..0c9495f3d88 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/hashCode/hashcode001/hashcode001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/hashCode/hashcode001/hashcode001.java @@ -59,14 +59,14 @@ * /test/lib * @build nsk.jdi.VoidValue.hashCode.hashcode001.hashcode001 * nsk.jdi.VoidValue.hashCode.hashcode001.hashcode001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VoidValue.hashCode.hashcode001.hashcode001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ package nsk.jdi.VoidValue.hashCode.hashcode001; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/toString/tostring001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/toString/tostring001/TestDescription.java index 3c9bd831b42..6067e4a3cb1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/toString/tostring001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VoidValue/toString/tostring001/TestDescription.java @@ -52,13 +52,13 @@ * /test/lib * @build nsk.jdi.VoidValue.toString.tostring001 * nsk.jdi.VoidValue.toString.tostring001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.VoidValue.toString.tostring001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/_itself_/wevent001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/_itself_/wevent001/TestDescription.java index fa457b4b44f..5474717464e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/_itself_/wevent001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/_itself_/wevent001/TestDescription.java @@ -59,13 +59,13 @@ * /test/lib * @build nsk.jdi.WatchpointEvent._itself_.wevent001 * nsk.jdi.WatchpointEvent._itself_.wevent001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointEvent._itself_.wevent001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/field/field001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/field/field001/TestDescription.java index 408379d6587..0dbd066e2b3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/field/field001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/field/field001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.WatchpointEvent.field.field001 * nsk.jdi.WatchpointEvent.field.field001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointEvent.field.field001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/object/object001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/object/object001/TestDescription.java index ad22f8879e4..e4ce0cef205 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/object/object001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/object/object001/TestDescription.java @@ -62,13 +62,13 @@ * /test/lib * @build nsk.jdi.WatchpointEvent.object.object001 * nsk.jdi.WatchpointEvent.object.object001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointEvent.object.object001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/valueCurrent/valuecur001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/valueCurrent/valuecur001/TestDescription.java index 90b169861e8..519a9369970 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/valueCurrent/valuecur001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointEvent/valueCurrent/valuecur001/TestDescription.java @@ -74,13 +74,13 @@ * /test/lib * @build nsk.jdi.WatchpointEvent.valueCurrent.valuecur001 * nsk.jdi.WatchpointEvent.valueCurrent.valuecur001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointEvent.valueCurrent.valuecur001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/_bounds_/filters001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/_bounds_/filters001/TestDescription.java index ec6da43cc21..975e7782173 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/_bounds_/filters001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/_bounds_/filters001/TestDescription.java @@ -48,13 +48,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest._bounds_.filters001 * nsk.jdi.WatchpointRequest._bounds_.filters001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest._bounds_.filters001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter001/TestDescription.java index 9eb38beef8a..f48a3efac7e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter001/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassExclusionFilter.filter001 * nsk.jdi.WatchpointRequest.addClassExclusionFilter.filter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassExclusionFilter.filter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter002/TestDescription.java index 1ca8723b9e6..eb0a2f2de77 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter002/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassExclusionFilter.filter002 * nsk.jdi.WatchpointRequest.addClassExclusionFilter.filter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassExclusionFilter.filter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter003/TestDescription.java index c4bba18abc1..5121a229dba 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter003/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassExclusionFilter.filter003 * nsk.jdi.WatchpointRequest.addClassExclusionFilter.filter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassExclusionFilter.filter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter004/TestDescription.java index 74188f8f91f..da607a95190 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassExclusionFilter/filter004/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassExclusionFilter.filter004 * nsk.jdi.WatchpointRequest.addClassExclusionFilter.filter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassExclusionFilter.filter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt001/TestDescription.java index 9e2bd4d889c..49d3d3e5c59 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt001/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt001 * nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt002/TestDescription.java index 9a93d5f25cf..235d9b6f4cd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt002/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt002 * nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt003/TestDescription.java index 3974432486a..50c4bf4cb8c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt003/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt003 * nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt004/TestDescription.java index 86133adf314..2d0d4c0d987 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt004/TestDescription.java @@ -67,13 +67,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt004 * nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt005/TestDescription.java index ff6f47b891f..55e28600569 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt005/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt005 * nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt006/TestDescription.java index 2a75b2acaa1..62a6ca33558 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_rt/filter_rt006/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt006 * nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassFilter_rt.filter_rt006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s001/TestDescription.java index 538b0fcb0dc..ee55437906a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s001/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassFilter_s.filter_s001 * nsk.jdi.WatchpointRequest.addClassFilter_s.filter_s001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassFilter_s.filter_s001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s002/TestDescription.java index d34c91dc53d..a31d3a974f4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s002/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassFilter_s.filter_s002 * nsk.jdi.WatchpointRequest.addClassFilter_s.filter_s002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassFilter_s.filter_s002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s003/TestDescription.java index f506c14e3eb..e387af4cb1c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s003/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassFilter_s.filter_s003 * nsk.jdi.WatchpointRequest.addClassFilter_s.filter_s003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassFilter_s.filter_s003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s004/TestDescription.java index df78f5cab53..3d671c8ac13 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addClassFilter_s/filter_s004/TestDescription.java @@ -68,13 +68,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addClassFilter_s.filter_s004 * nsk.jdi.WatchpointRequest.addClassFilter_s.filter_s004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addClassFilter_s.filter_s004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter001/TestDescription.java index ea117497712..44826950a1e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter001/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter001 * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter002/TestDescription.java index 5c939c2ef1a..b6a7758e5c7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter002/TestDescription.java @@ -71,13 +71,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter002 * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter003/TestDescription.java index 58feafe4748..3ef08a7bb48 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter003/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter003 * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter004/TestDescription.java index 9c6e127b3a5..d7809806830 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter004/TestDescription.java @@ -70,13 +70,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter004 * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter005/TestDescription.java index 789402da0e2..186eed163de 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter005/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter005 * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter006/TestDescription.java index d926b717f6b..51517c4299c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter006/TestDescription.java @@ -69,13 +69,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter006 * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter007/TestDescription.java index f871555a1ab..86fa996073c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter007/TestDescription.java @@ -79,13 +79,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter007 * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter007a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter008/TestDescription.java index 1292a3f16d4..374f14b4783 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addInstanceFilter/instancefilter008/TestDescription.java @@ -79,13 +79,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter008 * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter008a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addInstanceFilter.instancefilter008 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter001/TestDescription.java index d0231859858..0a8e03d6e94 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter001/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter001 * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter002/TestDescription.java index 34f1e903215..deef8bc2318 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter002/TestDescription.java @@ -64,13 +64,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter002 * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter003/TestDescription.java index 69a6adb9120..bf5ed54280b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter003/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter003 * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter003a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter003 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter004/TestDescription.java index 6aed1d3cf7f..76db1c838b4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter004/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter004 * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter004a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter004 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter005/TestDescription.java index 7ebc85a261d..6f5985fe6c6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter005/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter005 * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter005a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter005 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter006/TestDescription.java index 2646e444f49..c59c00053ce 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter006/TestDescription.java @@ -63,13 +63,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter006 * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter006a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter006 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter007/TestDescription.java index ea6b3ee9b02..89ac9ac7c95 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter007/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter007 * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter007a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter007 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter008/TestDescription.java index d33d3c36e3f..5d748882a53 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/addThreadFilter/addthreadfilter008/TestDescription.java @@ -72,13 +72,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter008 * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter008a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.addThreadFilter.addthreadfilter008 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/field/field001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/field/field001/TestDescription.java index b564ec66b11..7e9ee6a85b1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/field/field001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/field/field001/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.field.field001 * nsk.jdi.WatchpointRequest.field.field001a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.field.field001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/field/field002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/field/field002/TestDescription.java index 5302d832baa..496fa5c552d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/field/field002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/WatchpointRequest/field/field002/TestDescription.java @@ -60,13 +60,13 @@ * /test/lib * @build nsk.jdi.WatchpointRequest.field.field002 * nsk.jdi.WatchpointRequest.field.field002a - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.WatchpointRequest.field.field002 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/ClassPrepareEvents/ClassPrepareEvents001/ClassPrepareEvents001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/ClassPrepareEvents/ClassPrepareEvents001/ClassPrepareEvents001.java index b88bf17ab3a..3a95f6ccbea 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/ClassPrepareEvents/ClassPrepareEvents001/ClassPrepareEvents001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/ClassPrepareEvents/ClassPrepareEvents001/ClassPrepareEvents001.java @@ -38,14 +38,14 @@ * @library /vmTestbase * /test/lib * @build nsk.jdi.stress.ClassPrepareEvents.ClassPrepareEvents001.ClassPrepareEvents001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdi.stress.ClassPrepareEvents.ClassPrepareEvents001.ClassPrepareEvents001 * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/MonitorEvents/MonitorEvents001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/MonitorEvents/MonitorEvents001/TestDescription.java index 0961b1ac9ca..f24256ebe53 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/MonitorEvents/MonitorEvents001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/MonitorEvents/MonitorEvents001/TestDescription.java @@ -38,7 +38,7 @@ * - MonitorWaitedRequest/MonitorWaitedEvent * Debugger forces debuggee generate several thousands of monitor events and checks that all events was received and contain * correct information. - * Test executes class nsk.share.jdi.EventTestTemplates$StressTestTemplate which uses JDI events testing + * Test executes class nsk.share.jdi.StressTestTemplate which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debuggee VM to create number of objects which should generate events during test @@ -56,17 +56,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.StressTestTemplate * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$StressTestTemplate + * @run main/othervm/native + * nsk.share.jdi.StressTestTemplate * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTERED:MONITOR_CONTENTED_ENTER * -allowExtraEvents MONITOR_CONTENTED_ENTER:MONITOR_CONTENTED_ENTERED * -eventTypes MONITOR_CONTENTED_ENTERED:MONITOR_CONTENTED_ENTER:MONITOR_WAIT:MONITOR_WAITED diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/MonitorEvents/MonitorEvents002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/MonitorEvents/MonitorEvents002/TestDescription.java index f482dc42d21..5fb728bac72 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/MonitorEvents/MonitorEvents002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/MonitorEvents/MonitorEvents002/TestDescription.java @@ -38,7 +38,7 @@ * - MonitorWaitedRequest/MonitorWaitedEvent * Debugger force debuggee start several threads which simultaneously generate events and check that all events * was received and contain correct information. - * Test executes class nsk.share.jdi.EventTestTemplates$StressTestTemplate which uses JDI events testing + * Test executes class nsk.share.jdi.StressTestTemplate which uses JDI events testing * framework based on classes from package nsk.share.jdi.*. * This framework uses following scenario: * - debugger VM forces debuggee VM to create number of objects which should generate events during test @@ -56,17 +56,17 @@ * * @library /vmTestbase * /test/lib - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.StressTestTemplate * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper - * nsk.share.jdi.EventTestTemplates$StressTestTemplate + * @run main/othervm/native + * nsk.share.jdi.StressTestTemplate * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" + * -debugee.vmkeys="${test.vm.opts} ${test.java.opts}" * -allowMissedEvents MONITOR_CONTENTED_ENTERED:MONITOR_CONTENTED_ENTER * -allowExtraEvents MONITOR_CONTENTED_ENTER:MONITOR_CONTENTED_ENTERED * -eventTypes MONITOR_CONTENTED_ENTERED:MONITOR_CONTENTED_ENTER:MONITOR_WAIT:MONITOR_WAITED diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/forceEarlyReturn001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/forceEarlyReturn001/TestDescription.java index d8847783a41..16e2447be06 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/forceEarlyReturn001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/forceEarlyReturn001/TestDescription.java @@ -61,14 +61,14 @@ * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn014.forceEarlyReturn014a * * @build nsk.share.jdi.SerialExecutionDebugger - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.jdi.SerialExecutionDebugger * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -debugee.vmkeys="-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI ${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -configFile ${test.src}/forceEarlyReturn001.tests diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/forceEarlyReturn002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/forceEarlyReturn002/TestDescription.java index 2a85e41e993..9f824d0568b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/forceEarlyReturn002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/forceEarlyReturn002/TestDescription.java @@ -63,14 +63,14 @@ * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn014.forceEarlyReturn014a * * @build nsk.share.jdi.SerialExecutionDebugger - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.jdi.SerialExecutionDebugger * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -debugee.vmkeys="-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI ${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -configFile ${test.src}/forceEarlyReturn002.tests diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/heapwalking001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/heapwalking001/TestDescription.java index 4bc5e8c3fbe..acdf674ed89 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/heapwalking001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/heapwalking001/TestDescription.java @@ -55,14 +55,14 @@ * nsk.share.jdi.TestInterfaceImplementer1 * * @build nsk.share.jdi.SerialExecutionDebugger - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.jdi.SerialExecutionDebugger * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -debugee.vmkeys="-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -Xmx256M ${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -configFile ${test.src}/heapwalking001.tests diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/heapwalking002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/heapwalking002/TestDescription.java index b5056d690f6..ed83ed4ab8e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/heapwalking002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/heapwalking002/TestDescription.java @@ -57,14 +57,14 @@ * nsk.share.jdi.TestInterfaceImplementer1 * * @build nsk.share.jdi.SerialExecutionDebugger - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.jdi.SerialExecutionDebugger * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -debugee.vmkeys="-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -Xmx256M ${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -configFile ${test.src}/heapwalking002.tests diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed001/TestDescription.java index b31d05ad20d..e5e806e7de3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed001/TestDescription.java @@ -60,19 +60,19 @@ * nsk.share.jdi.TestClass1 * nsk.share.jdi.TestClass2 * nsk.share.jdi.TestInterfaceImplementer1 - * nsk.share.jdi.EventTestTemplates + * nsk.share.jdi.ThreadFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee * * @build nsk.share.jdi.SerialExecutionDebugger - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.jdi.SerialExecutionDebugger * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -debugee.vmkeys="-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -Xmx256M ${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -configFile ${test.src}/mixed001.tests diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed001/mixed001.tests b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed001/mixed001.tests index e4c49c96f1f..407253bef8a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed001/mixed001.tests +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed001/mixed001.tests @@ -1,10 +1,10 @@ nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames001.ownedMonitorsAndFrames001 nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames002.ownedMonitorsAndFrames002 -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -eventType MONITOR_WAIT -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -eventType MONITOR_WAITED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -eventType MONITOR_WAIT -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -eventType MONITOR_WAITED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee nsk.jdi.ObjectReference.referringObjects.referringObjects003.referringObjects003 nsk.jdi.ReferenceType.instances.instances003.instances003 -testClassNames java.lang.String:nsk.share.jdi.TestClass1:boolean[] diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed002/TestDescription.java index b27829f5782..4a5154579c3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed002/TestDescription.java @@ -58,19 +58,19 @@ * nsk.jdi.ThreadReference.forceEarlyReturn.forceEarlyReturn004.forceEarlyReturn004a * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames001.ownedMonitorsAndFrames001 * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames002.ownedMonitorsAndFrames002 - * nsk.share.jdi.EventTestTemplates + * nsk.share.jdi.ThreadFilterTest * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee * * @build nsk.share.jdi.SerialExecutionDebugger - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.jdi.SerialExecutionDebugger * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -debugee.vmkeys="-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -Xmx256M ${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -configFile ${test.src}/mixed002.tests diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed002/mixed002.tests b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed002/mixed002.tests index 02eecb9625f..28723d0f56c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed002/mixed002.tests +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/mixed002/mixed002.tests @@ -2,10 +2,10 @@ OPTIONS:shuffle nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames001.ownedMonitorsAndFrames001 nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames002.ownedMonitorsAndFrames002 -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -eventType MONITOR_WAIT -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -eventType MONITOR_WAITED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -eventType MONITOR_WAIT -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -eventType MONITOR_WAITED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee nsk.jdi.ObjectReference.referringObjects.referringObjects003.referringObjects003 nsk.jdi.ReferenceType.instances.instances003.instances003 -testClassNames java.lang.String:nsk.share.jdi.TestClass1:boolean[] diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents001/TestDescription.java index a98c0fd7f7a..3fa0d966d91 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents001/TestDescription.java @@ -45,19 +45,22 @@ * * * @comment build classes required for tests from monitorEvents001.tests - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassExclusionFilterTest + * nsk.share.jdi.ClassFilterTest_ClassName + * nsk.share.jdi.ClassFilterTest_ReferenceType + * nsk.share.jdi.ThreadFilterTest * * @build nsk.share.jdi.SerialExecutionDebugger * nsk.share.jdi.JDIEventsDebuggee * nsk.share.jdi.MonitorEventsDebuggee - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.jdi.SerialExecutionDebugger * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -debugee.vmkeys="-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI ${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -configFile ${test.src}/monitorEvents001.tests diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents001/monitorEvents001.tests b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents001/monitorEvents001.tests index fe54bc37eed..11f962abfbf 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents001/monitorEvents001.tests +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents001/monitorEvents001.tests @@ -1,10 +1,10 @@ -nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass -nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass -nsk.share.jdi.EventTestTemplates$ClassFilterTest_ClassName -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass -nsk.share.jdi.EventTestTemplates$ClassFilterTest_ClassName -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass -nsk.share.jdi.EventTestTemplates$ClassFilterTest_ReferenceType -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_1Subclass:nsk.share.jdi.MonitorEnterExecutor_2Subclass -nsk.share.jdi.EventTestTemplates$ClassFilterTest_ReferenceType -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_1Subclass:nsk.share.jdi.MonitorEnterExecutor_2Subclass -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -eventType MONITOR_WAIT -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -eventType MONITOR_WAITED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ClassExclusionFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass +nsk.share.jdi.ClassExclusionFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass +nsk.share.jdi.ClassFilterTest_ClassName -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass +nsk.share.jdi.ClassFilterTest_ClassName -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass +nsk.share.jdi.ClassFilterTest_ReferenceType -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_1Subclass:nsk.share.jdi.MonitorEnterExecutor_2Subclass +nsk.share.jdi.ClassFilterTest_ReferenceType -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_1Subclass:nsk.share.jdi.MonitorEnterExecutor_2Subclass +nsk.share.jdi.ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -eventType MONITOR_WAIT -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -eventType MONITOR_WAITED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents002/TestDescription.java index 683650789ac..3c1e46009e1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents002/TestDescription.java @@ -47,19 +47,22 @@ * * * @comment build classes required for tests from monitorEvents002.tests - * @build nsk.share.jdi.EventTestTemplates + * @build nsk.share.jdi.ClassExclusionFilterTest + * nsk.share.jdi.ClassFilterTest_ClassName * nsk.share.jdi.JDIEventsDebuggee + * nsk.share.jdi.ClassFilterTest_ReferenceType + * nsk.share.jdi.ThreadFilterTest * nsk.share.jdi.MonitorEventsDebuggee * * @build nsk.share.jdi.SerialExecutionDebugger - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.jdi.SerialExecutionDebugger * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -debugee.vmkeys="-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI ${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -configFile ${test.src}/monitorEvents002.tests diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents002/monitorEvents002.tests b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents002/monitorEvents002.tests index 34d11de48c0..27c37674960 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents002/monitorEvents002.tests +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/monitorEvents002/monitorEvents002.tests @@ -1,11 +1,11 @@ OPTIONS:shuffle -nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass -nsk.share.jdi.EventTestTemplates$ClassExclusionFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass -nsk.share.jdi.EventTestTemplates$ClassFilterTest_ClassName -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass -nsk.share.jdi.EventTestTemplates$ClassFilterTest_ClassName -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass -nsk.share.jdi.EventTestTemplates$ClassFilterTest_ReferenceType -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_1Subclass:nsk.share.jdi.MonitorEnterExecutor_2Subclass -nsk.share.jdi.EventTestTemplates$ClassFilterTest_ReferenceType -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_1Subclass:nsk.share.jdi.MonitorEnterExecutor_2Subclass -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -eventType MONITOR_WAIT -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -nsk.share.jdi.EventTestTemplates$ThreadFilterTest -eventType MONITOR_WAITED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ClassExclusionFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass +nsk.share.jdi.ClassExclusionFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass +nsk.share.jdi.ClassFilterTest_ClassName -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass +nsk.share.jdi.ClassFilterTest_ClassName -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_*:*Subclass:nsk.share.jdi.MonitorEnterExecutor_1Subclass +nsk.share.jdi.ClassFilterTest_ReferenceType -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_1Subclass:nsk.share.jdi.MonitorEnterExecutor_2Subclass +nsk.share.jdi.ClassFilterTest_ReferenceType -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee -classPatterns nsk.share.jdi.MonitorEnterExecutor_1Subclass:nsk.share.jdi.MonitorEnterExecutor_2Subclass +nsk.share.jdi.ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTERED -eventType MONITOR_CONTENTED_ENTERED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -allowMissedEvents MONITOR_CONTENTED_ENTER -eventType MONITOR_CONTENTED_ENTER -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -eventType MONITOR_WAIT -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee +nsk.share.jdi.ThreadFilterTest -eventType MONITOR_WAITED -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/ownedMonitorsAndFrames001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/ownedMonitorsAndFrames001/TestDescription.java index d56947d2ac5..b569a0a4b10 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/ownedMonitorsAndFrames001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/ownedMonitorsAndFrames001/TestDescription.java @@ -54,14 +54,14 @@ * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames007.ownedMonitorsAndFrames007 * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames009.ownedMonitorsAndFrames009 * @build nsk.share.jdi.SerialExecutionDebugger - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.jdi.SerialExecutionDebugger * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -debugee.vmkeys="-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI ${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -configFile ${test.src}/ownedMonitorsAndFrames001.tests diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/ownedMonitorsAndFrames002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/ownedMonitorsAndFrames002/TestDescription.java index 34c34d6d81b..c3c950d829b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/ownedMonitorsAndFrames002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/stress/serial/ownedMonitorsAndFrames002/TestDescription.java @@ -58,14 +58,14 @@ * nsk.jdi.ThreadReference.ownedMonitorsAndFrames.ownedMonitorsAndFrames009.ownedMonitorsAndFrames009a * * @build nsk.share.jdi.SerialExecutionDebugger - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.jdi.SerialExecutionDebugger * -verbose * -arch=${os.family}-${os.simpleArch} * -waittime=5 * -debugee.vmkind=java * -transport.address=dynamic - * "-debugee.vmkeys=-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -debugee.vmkeys="-Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI ${test.vm.opts} ${test.java.opts}" * -testClassPath ${test.class.path} * -configFile ${test.src}/ownedMonitorsAndFrames002.tests diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/GetValues/getvalues001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/GetValues/getvalues001/TestDescription.java index 55234a57633..4fc9630df3c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/GetValues/getvalues001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/GetValues/getvalues001/TestDescription.java @@ -57,9 +57,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ArrayReference.GetValues.getvalues001 - * nsk.jdwp.ArrayReference.GetValues.getvalues001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ArrayReference.GetValues.getvalues001a + * @run main/othervm * nsk.jdwp.ArrayReference.GetValues.getvalues001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/GetValues/getvalues002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/GetValues/getvalues002/TestDescription.java index 9ef8cb8060d..92b567dccf2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/GetValues/getvalues002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/GetValues/getvalues002/TestDescription.java @@ -59,9 +59,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ArrayReference.GetValues.getvalues002 - * nsk.jdwp.ArrayReference.GetValues.getvalues002a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ArrayReference.GetValues.getvalues002a + * @run main/othervm * nsk.jdwp.ArrayReference.GetValues.getvalues002 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/Length/length001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/Length/length001/TestDescription.java index 824363c9a6e..164d8c8ecab 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/Length/length001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/Length/length001/TestDescription.java @@ -56,9 +56,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ArrayReference.Length.length001 - * nsk.jdwp.ArrayReference.Length.length001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ArrayReference.Length.length001a + * @run main/othervm * nsk.jdwp.ArrayReference.Length.length001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/SetValues/setvalues001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/SetValues/setvalues001/TestDescription.java index 32f77a3d53e..380ba4549ef 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/SetValues/setvalues001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayReference/SetValues/setvalues001/TestDescription.java @@ -59,9 +59,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ArrayReference.SetValues.setvalues001 - * nsk.jdwp.ArrayReference.SetValues.setvalues001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ArrayReference.SetValues.setvalues001a + * @run main/othervm * nsk.jdwp.ArrayReference.SetValues.setvalues001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayType/NewInstance/newinstance001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayType/NewInstance/newinstance001/TestDescription.java index aaddac40f10..7376e32c3cc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayType/NewInstance/newinstance001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ArrayType/NewInstance/newinstance001/TestDescription.java @@ -54,9 +54,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ArrayType.NewInstance.newinstance001 - * nsk.jdwp.ArrayType.NewInstance.newinstance001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ArrayType.NewInstance.newinstance001a + * @run main/othervm * nsk.jdwp.ArrayType.NewInstance.newinstance001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassLoaderReference/VisibleClasses/visibclasses001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassLoaderReference/VisibleClasses/visibclasses001/TestDescription.java index ec0da5f5be3..b298e05d721 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassLoaderReference/VisibleClasses/visibclasses001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassLoaderReference/VisibleClasses/visibclasses001/TestDescription.java @@ -56,9 +56,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ClassLoaderReference.VisibleClasses.visibclasses001 - * nsk.jdwp.ClassLoaderReference.VisibleClasses.visibclasses001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ClassLoaderReference.VisibleClasses.visibclasses001a + * @run main/othervm * nsk.jdwp.ClassLoaderReference.VisibleClasses.visibclasses001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassObjectReference/ReflectedType/reflectype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassObjectReference/ReflectedType/reflectype001/TestDescription.java index 1f652117bc1..f476b8df0c8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassObjectReference/ReflectedType/reflectype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassObjectReference/ReflectedType/reflectype001/TestDescription.java @@ -59,9 +59,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ClassObjectReference.ReflectedType.reflectype001 - * nsk.jdwp.ClassObjectReference.ReflectedType.reflectype001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ClassObjectReference.ReflectedType.reflectype001a + * @run main/othervm * nsk.jdwp.ClassObjectReference.ReflectedType.reflectype001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/InvokeMethod/invokemeth001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/InvokeMethod/invokemeth001/TestDescription.java index 30175113456..9b97c95b32f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/InvokeMethod/invokemeth001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/InvokeMethod/invokemeth001/TestDescription.java @@ -59,9 +59,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ClassType.InvokeMethod.invokemeth001 - * nsk.jdwp.ClassType.InvokeMethod.invokemeth001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ClassType.InvokeMethod.invokemeth001a + * @run main/othervm * nsk.jdwp.ClassType.InvokeMethod.invokemeth001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/NewInstance/newinst001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/NewInstance/newinst001/TestDescription.java index e476b7c035a..6132dbc6a4d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/NewInstance/newinst001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/NewInstance/newinst001/TestDescription.java @@ -59,9 +59,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ClassType.NewInstance.newinst001 - * nsk.jdwp.ClassType.NewInstance.newinst001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ClassType.NewInstance.newinst001a + * @run main/othervm * nsk.jdwp.ClassType.NewInstance.newinst001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/SetValues/setvalues001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/SetValues/setvalues001/TestDescription.java index dee634f9a8c..0f5a71aefda 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/SetValues/setvalues001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/SetValues/setvalues001/TestDescription.java @@ -65,9 +65,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ClassType.SetValues.setvalues001 - * nsk.jdwp.ClassType.SetValues.setvalues001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ClassType.SetValues.setvalues001a + * @run main/othervm * nsk.jdwp.ClassType.SetValues.setvalues001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/Superclass/superclass001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/Superclass/superclass001/TestDescription.java index 200f97d8109..02082032398 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/Superclass/superclass001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ClassType/Superclass/superclass001/TestDescription.java @@ -55,9 +55,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ClassType.Superclass.superclass001 - * nsk.jdwp.ClassType.Superclass.superclass001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ClassType.Superclass.superclass001a + * @run main/othervm * nsk.jdwp.ClassType.Superclass.superclass001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/BREAKPOINT/breakpoint001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/BREAKPOINT/breakpoint001/TestDescription.java index fdc86606fc5..f4583fc1015 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/BREAKPOINT/breakpoint001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/BREAKPOINT/breakpoint001/TestDescription.java @@ -59,9 +59,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.BREAKPOINT.breakpoint001 - * nsk.jdwp.Event.BREAKPOINT.breakpoint001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.BREAKPOINT.breakpoint001a + * @run main/othervm * nsk.jdwp.Event.BREAKPOINT.breakpoint001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/CLASS_PREPARE/clsprepare001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/CLASS_PREPARE/clsprepare001/TestDescription.java index a505c7dc7f6..8690a9d6125 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/CLASS_PREPARE/clsprepare001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/CLASS_PREPARE/clsprepare001/TestDescription.java @@ -59,9 +59,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.CLASS_PREPARE.clsprepare001 - * nsk.jdwp.Event.CLASS_PREPARE.clsprepare001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.CLASS_PREPARE.clsprepare001a + * @run main/othervm * nsk.jdwp.Event.CLASS_PREPARE.clsprepare001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/CLASS_UNLOAD/clsunload001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/CLASS_UNLOAD/clsunload001/TestDescription.java index c4677500fca..2d323c71931 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/CLASS_UNLOAD/clsunload001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/CLASS_UNLOAD/clsunload001/TestDescription.java @@ -61,9 +61,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.CLASS_UNLOAD.clsunload001 - * nsk.jdwp.Event.CLASS_UNLOAD.clsunload001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.CLASS_UNLOAD.clsunload001a + * @run main/othervm * nsk.jdwp.Event.CLASS_UNLOAD.clsunload001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/Composite/composite001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/Composite/composite001/TestDescription.java index 1ecdfed05a2..5cf8976cb88 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/Composite/composite001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/Composite/composite001/TestDescription.java @@ -48,9 +48,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.Composite.composite001 - * nsk.jdwp.Event.Composite.composite001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.Composite.composite001a + * @run main/othervm * nsk.jdwp.Event.Composite.composite001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/EXCEPTION/exception001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/EXCEPTION/exception001/TestDescription.java index 55a9cb3f674..9524d171c4b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/EXCEPTION/exception001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/EXCEPTION/exception001/TestDescription.java @@ -63,9 +63,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.EXCEPTION.exception001 - * nsk.jdwp.Event.EXCEPTION.exception001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.EXCEPTION.exception001a + * @run main/othervm * nsk.jdwp.Event.EXCEPTION.exception001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/FIELD_ACCESS/fldaccess001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/FIELD_ACCESS/fldaccess001/TestDescription.java index 2d8a56521f0..d0c835009d6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/FIELD_ACCESS/fldaccess001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/FIELD_ACCESS/fldaccess001/TestDescription.java @@ -62,9 +62,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.FIELD_ACCESS.fldaccess001 - * nsk.jdwp.Event.FIELD_ACCESS.fldaccess001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.FIELD_ACCESS.fldaccess001a + * @run main/othervm * nsk.jdwp.Event.FIELD_ACCESS.fldaccess001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/FIELD_MODIFICATION/fldmodification001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/FIELD_MODIFICATION/fldmodification001/TestDescription.java index e8c74137fe8..5055936173d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/FIELD_MODIFICATION/fldmodification001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/FIELD_MODIFICATION/fldmodification001/TestDescription.java @@ -63,9 +63,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.FIELD_MODIFICATION.fldmodification001 - * nsk.jdwp.Event.FIELD_MODIFICATION.fldmodification001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.FIELD_MODIFICATION.fldmodification001a + * @run main/othervm * nsk.jdwp.Event.FIELD_MODIFICATION.fldmodification001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/METHOD_ENTRY/methentry001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/METHOD_ENTRY/methentry001/TestDescription.java index 2aebd7772e6..e41084de628 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/METHOD_ENTRY/methentry001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/METHOD_ENTRY/methentry001/TestDescription.java @@ -60,9 +60,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.METHOD_ENTRY.methentry001 - * nsk.jdwp.Event.METHOD_ENTRY.methentry001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.METHOD_ENTRY.methentry001a + * @run main/othervm * nsk.jdwp.Event.METHOD_ENTRY.methentry001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/METHOD_EXIT/methexit001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/METHOD_EXIT/methexit001/TestDescription.java index 62c9c2e460a..bd765e2ea88 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/METHOD_EXIT/methexit001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/METHOD_EXIT/methexit001/TestDescription.java @@ -60,9 +60,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.METHOD_EXIT.methexit001 - * nsk.jdwp.Event.METHOD_EXIT.methexit001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.METHOD_EXIT.methexit001a + * @run main/othervm * nsk.jdwp.Event.METHOD_EXIT.methexit001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/SINGLE_STEP/singlestep001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/SINGLE_STEP/singlestep001/TestDescription.java index 37b06e72a42..7d7afefd446 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/SINGLE_STEP/singlestep001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/SINGLE_STEP/singlestep001/TestDescription.java @@ -62,9 +62,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.SINGLE_STEP.singlestep001 - * nsk.jdwp.Event.SINGLE_STEP.singlestep001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.SINGLE_STEP.singlestep001a + * @run main/othervm * nsk.jdwp.Event.SINGLE_STEP.singlestep001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/SINGLE_STEP/singlestep002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/SINGLE_STEP/singlestep002/TestDescription.java index ca480a52c67..ac11ead1f09 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/SINGLE_STEP/singlestep002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/SINGLE_STEP/singlestep002/TestDescription.java @@ -62,9 +62,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.SINGLE_STEP.singlestep002 - * nsk.jdwp.Event.SINGLE_STEP.singlestep002a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.SINGLE_STEP.singlestep002a + * @run main/othervm * nsk.jdwp.Event.SINGLE_STEP.singlestep002 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/SINGLE_STEP/singlestep003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/SINGLE_STEP/singlestep003/TestDescription.java index 35408ce6dd5..00cf70a223d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/SINGLE_STEP/singlestep003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/SINGLE_STEP/singlestep003/TestDescription.java @@ -62,9 +62,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.SINGLE_STEP.singlestep003 - * nsk.jdwp.Event.SINGLE_STEP.singlestep003a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.SINGLE_STEP.singlestep003a + * @run main/othervm * nsk.jdwp.Event.SINGLE_STEP.singlestep003 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/THREAD_DEATH/thrdeath001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/THREAD_DEATH/thrdeath001/TestDescription.java index 15f473e83b5..85dd77be7e9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/THREAD_DEATH/thrdeath001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/THREAD_DEATH/thrdeath001/TestDescription.java @@ -60,9 +60,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.THREAD_DEATH.thrdeath001 - * nsk.jdwp.Event.THREAD_DEATH.thrdeath001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.THREAD_DEATH.thrdeath001a + * @run main/othervm * nsk.jdwp.Event.THREAD_DEATH.thrdeath001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/THREAD_START/thrstart001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/THREAD_START/thrstart001/TestDescription.java index 97239d0b358..a4350324849 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/THREAD_START/thrstart001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/THREAD_START/thrstart001/TestDescription.java @@ -60,9 +60,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.THREAD_START.thrstart001 - * nsk.jdwp.Event.THREAD_START.thrstart001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.THREAD_START.thrstart001a + * @run main/othervm * nsk.jdwp.Event.THREAD_START.thrstart001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/VM_DEATH/vmdeath001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/VM_DEATH/vmdeath001/TestDescription.java index f2e58a04c9d..e1f3b1053b4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/VM_DEATH/vmdeath001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/VM_DEATH/vmdeath001/TestDescription.java @@ -52,9 +52,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.VM_DEATH.vmdeath001 - * nsk.jdwp.Event.VM_DEATH.vmdeath001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.VM_DEATH.vmdeath001a + * @run main/othervm * nsk.jdwp.Event.VM_DEATH.vmdeath001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/VM_DEATH/vmdeath002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/VM_DEATH/vmdeath002/TestDescription.java index 96b202b566d..f0dbd749a32 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/VM_DEATH/vmdeath002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/VM_DEATH/vmdeath002/TestDescription.java @@ -59,9 +59,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.VM_DEATH.vmdeath002 - * nsk.jdwp.Event.VM_DEATH.vmdeath002a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.VM_DEATH.vmdeath002a + * @run main/othervm * nsk.jdwp.Event.VM_DEATH.vmdeath002 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/VM_START/vmstart001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/VM_START/vmstart001/TestDescription.java index 0fd0cdcefea..139db45bef5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/VM_START/vmstart001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Event/VM_START/vmstart001/TestDescription.java @@ -50,9 +50,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Event.VM_START.vmstart001 - * nsk.jdwp.Event.VM_START.vmstart001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Event.VM_START.vmstart001a + * @run main/othervm * nsk.jdwp.Event.VM_START.vmstart001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/Clear/clear001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/Clear/clear001/TestDescription.java index 5369f839ace..acc4090eb10 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/Clear/clear001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/Clear/clear001/TestDescription.java @@ -57,9 +57,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.EventRequest.Clear.clear001 - * nsk.jdwp.EventRequest.Clear.clear001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.EventRequest.Clear.clear001a + * @run main/othervm * nsk.jdwp.EventRequest.Clear.clear001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/ClearAllBreakpoints/clrallbreakp001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/ClearAllBreakpoints/clrallbreakp001/TestDescription.java index c0a76b1b977..49c6d12afa5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/ClearAllBreakpoints/clrallbreakp001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/ClearAllBreakpoints/clrallbreakp001/TestDescription.java @@ -55,9 +55,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.EventRequest.ClearAllBreakpoints.clrallbreakp001 - * nsk.jdwp.EventRequest.ClearAllBreakpoints.clrallbreakp001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.EventRequest.ClearAllBreakpoints.clrallbreakp001a + * @run main/othervm * nsk.jdwp.EventRequest.ClearAllBreakpoints.clrallbreakp001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/ClearAllBreakpoints/clrallbreakp002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/ClearAllBreakpoints/clrallbreakp002/TestDescription.java index dd80c745d4a..981b8fccb5e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/ClearAllBreakpoints/clrallbreakp002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/ClearAllBreakpoints/clrallbreakp002/TestDescription.java @@ -49,9 +49,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.EventRequest.ClearAllBreakpoints.clrallbreakp002 - * nsk.jdwp.EventRequest.ClearAllBreakpoints.clrallbreakp002a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.EventRequest.ClearAllBreakpoints.clrallbreakp002a + * @run main/othervm * nsk.jdwp.EventRequest.ClearAllBreakpoints.clrallbreakp002 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/ClearAllBreakpoints/clrallbreakp003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/ClearAllBreakpoints/clrallbreakp003/TestDescription.java index 82c3f12adde..15acb91350c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/ClearAllBreakpoints/clrallbreakp003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/ClearAllBreakpoints/clrallbreakp003/TestDescription.java @@ -52,9 +52,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.EventRequest.ClearAllBreakpoints.clrallbreakp003 - * nsk.jdwp.EventRequest.ClearAllBreakpoints.clrallbreakp003a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.EventRequest.ClearAllBreakpoints.clrallbreakp003a + * @run main/othervm * nsk.jdwp.EventRequest.ClearAllBreakpoints.clrallbreakp003 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/Set/set001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/Set/set001/TestDescription.java index 6caca4e0bcc..d04dc2f9328 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/Set/set001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/Set/set001/TestDescription.java @@ -58,9 +58,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.EventRequest.Set.set001 - * nsk.jdwp.EventRequest.Set.set001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.EventRequest.Set.set001a + * @run main/othervm * nsk.jdwp.EventRequest.Set.set001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/Set/set002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/Set/set002/TestDescription.java index 70f02792c29..efd3b666924 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/Set/set002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/EventRequest/Set/set002/TestDescription.java @@ -60,9 +60,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.EventRequest.Set.set002 - * nsk.jdwp.EventRequest.Set.set002a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.EventRequest.Set.set002a + * @run main/othervm * nsk.jdwp.EventRequest.Set.set002 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/Bytecodes/bytecodes001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/Bytecodes/bytecodes001/TestDescription.java index 492f2ba2a91..b522bbedaa4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/Bytecodes/bytecodes001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/Bytecodes/bytecodes001/TestDescription.java @@ -53,9 +53,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Method.Bytecodes.bytecodes001 - * nsk.jdwp.Method.Bytecodes.bytecodes001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Method.Bytecodes.bytecodes001a + * @run main/othervm * nsk.jdwp.Method.Bytecodes.bytecodes001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/IsObsolete/isobsolete001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/IsObsolete/isobsolete001/TestDescription.java index a362bf7951d..c3b3b3c049d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/IsObsolete/isobsolete001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/IsObsolete/isobsolete001/TestDescription.java @@ -56,9 +56,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Method.IsObsolete.isobsolete001 - * nsk.jdwp.Method.IsObsolete.isobsolete001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Method.IsObsolete.isobsolete001a + * @run main/othervm * nsk.jdwp.Method.IsObsolete.isobsolete001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/IsObsolete/isobsolete002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/IsObsolete/isobsolete002/TestDescription.java index ad262e025db..ce9fc223dae 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/IsObsolete/isobsolete002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/IsObsolete/isobsolete002/TestDescription.java @@ -68,12 +68,11 @@ * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib * @build ExecDriver - * @build nsk.jdwp.Method.IsObsolete.isobsolete002 - * nsk.jdwp.Method.IsObsolete.isobsolete002a + * @build nsk.jdwp.Method.IsObsolete.isobsolete002a * nsk.jdwp.Method.IsObsolete.isobsolete002b * @run driver nsk.share.ExtraClassesBuilder * newclass - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdwp.Method.IsObsolete.isobsolete002 * . * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/LineTable/linetable001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/LineTable/linetable001/TestDescription.java index b289d282321..d5dad5cc979 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/LineTable/linetable001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/LineTable/linetable001/TestDescription.java @@ -67,9 +67,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Method.LineTable.linetable001 - * nsk.jdwp.Method.LineTable.linetable001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.Method.LineTable.linetable001a + * @run main/othervm * nsk.jdwp.Method.LineTable.linetable001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/VariableTable/vartable001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/VariableTable/vartable001/TestDescription.java index c0bdce8fa81..f5633b360f3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/VariableTable/vartable001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/VariableTable/vartable001/TestDescription.java @@ -56,12 +56,11 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Method.VariableTable.vartable001 - * nsk.jdwp.Method.VariableTable.vartable001a + * @build nsk.jdwp.Method.VariableTable.vartable001a * @comment debuggee should be compiled w/ debug info * @clean nsk.jdwp.Method.VariableTable.vartable001a * @compile -g:lines,source,vars ../vartable001a.java - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdwp.Method.VariableTable.vartable001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/VariableTableWithGeneric/vartblwithgen001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/VariableTableWithGeneric/vartblwithgen001/TestDescription.java index 1244e69172d..7741b022618 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/VariableTableWithGeneric/vartblwithgen001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/Method/VariableTableWithGeneric/vartblwithgen001/TestDescription.java @@ -56,12 +56,11 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.Method.VariableTableWithGeneric.vartblwithgen001 - * nsk.jdwp.Method.VariableTableWithGeneric.vartblwithgen001a + * @build nsk.jdwp.Method.VariableTableWithGeneric.vartblwithgen001a * @comment debuggee should be compiled w/ debug info * @clean nsk.jdwp.Method.VariableTableWithGeneric.vartblwithgen001a * @compile -g:lines,source,vars ../vartblwithgen001a.java - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdwp.Method.VariableTableWithGeneric.vartblwithgen001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/DisableCollection/disablecol001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/DisableCollection/disablecol001/TestDescription.java index b2a9546d86b..9e50200593e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/DisableCollection/disablecol001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/DisableCollection/disablecol001/TestDescription.java @@ -53,9 +53,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ObjectReference.DisableCollection.disablecol001 - * nsk.jdwp.ObjectReference.DisableCollection.disablecol001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ObjectReference.DisableCollection.disablecol001a + * @run main/othervm * nsk.jdwp.ObjectReference.DisableCollection.disablecol001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/EnableCollection/enablecol001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/EnableCollection/enablecol001/TestDescription.java index 860844bbe50..d2dd41472e9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/EnableCollection/enablecol001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/EnableCollection/enablecol001/TestDescription.java @@ -54,9 +54,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ObjectReference.EnableCollection.enablecol001 - * nsk.jdwp.ObjectReference.EnableCollection.enablecol001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ObjectReference.EnableCollection.enablecol001a + * @run main/othervm * nsk.jdwp.ObjectReference.EnableCollection.enablecol001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/GetValues/getvalues001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/GetValues/getvalues001/TestDescription.java index a40b457426c..7ecb552e6c9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/GetValues/getvalues001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/GetValues/getvalues001/TestDescription.java @@ -57,9 +57,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ObjectReference.GetValues.getvalues001 - * nsk.jdwp.ObjectReference.GetValues.getvalues001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ObjectReference.GetValues.getvalues001a + * @run main/othervm * nsk.jdwp.ObjectReference.GetValues.getvalues001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/InvokeMethod/invokemeth001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/InvokeMethod/invokemeth001/TestDescription.java index 460b9e39647..71bfafa7718 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/InvokeMethod/invokemeth001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/InvokeMethod/invokemeth001/TestDescription.java @@ -60,9 +60,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ObjectReference.InvokeMethod.invokemeth001 - * nsk.jdwp.ObjectReference.InvokeMethod.invokemeth001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ObjectReference.InvokeMethod.invokemeth001a + * @run main/othervm * nsk.jdwp.ObjectReference.InvokeMethod.invokemeth001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/IsCollected/iscollected001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/IsCollected/iscollected001/TestDescription.java index 1da1282d0af..fda668d8b32 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/IsCollected/iscollected001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/IsCollected/iscollected001/TestDescription.java @@ -56,9 +56,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ObjectReference.IsCollected.iscollected001 - * nsk.jdwp.ObjectReference.IsCollected.iscollected001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ObjectReference.IsCollected.iscollected001a + * @run main/othervm * nsk.jdwp.ObjectReference.IsCollected.iscollected001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/MonitorInfo/monitorinfo001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/MonitorInfo/monitorinfo001/TestDescription.java index 933a206543c..cf58779b87d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/MonitorInfo/monitorinfo001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/MonitorInfo/monitorinfo001/TestDescription.java @@ -68,9 +68,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ObjectReference.MonitorInfo.monitorinfo001 - * nsk.jdwp.ObjectReference.MonitorInfo.monitorinfo001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ObjectReference.MonitorInfo.monitorinfo001a + * @run main/othervm * nsk.jdwp.ObjectReference.MonitorInfo.monitorinfo001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/ReferenceType/referencetype001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/ReferenceType/referencetype001/TestDescription.java index c7069367d20..0e7e8b9bb6b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/ReferenceType/referencetype001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/ReferenceType/referencetype001/TestDescription.java @@ -58,9 +58,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ObjectReference.ReferenceType.referencetype001 - * nsk.jdwp.ObjectReference.ReferenceType.referencetype001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ObjectReference.ReferenceType.referencetype001a + * @run main/othervm * nsk.jdwp.ObjectReference.ReferenceType.referencetype001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/ReferringObjects/referringObjects001/referringObjects001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/ReferringObjects/referringObjects001/referringObjects001.java index 4c637ae14a2..c9ee73fa67c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/ReferringObjects/referringObjects001/referringObjects001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/ReferringObjects/referringObjects001/referringObjects001.java @@ -69,8 +69,7 @@ * @requires !vm.graal.enabled * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ObjectReference.ReferringObjects.referringObjects001.referringObjects001 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdwp.ObjectReference.ReferringObjects.referringObjects001.referringObjects001 * -arch=${os.family}-${os.simpleArch} * -verbose @@ -82,10 +81,13 @@ package nsk.jdwp.ObjectReference.ReferringObjects.referringObjects001; -import java.io.*; import nsk.share.Consts; -import nsk.share.jdwp.*; -import nsk.share.jpda.AbstractDebuggeeTest; +import nsk.share.jdwp.CommandPacket; +import nsk.share.jdwp.JDWP; +import nsk.share.jdwp.ReplyPacket; +import nsk.share.jdwp.TestDebuggerType1; + +import java.io.PrintStream; public class referringObjects001 extends TestDebuggerType1 { @@ -93,11 +95,11 @@ protected String getDebugeeClassName() { return nsk.jdwp.ObjectReference.ReferringObjects.referringObjects001.referringObjects001a.class.getName(); } - public static void main(String argv[]) { + public static void main(String[] argv) { System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); } - public static int run(String argv[], PrintStream out) { + public static int run(String[] argv, PrintStream out) { return new referringObjects001().runIt(argv, out); } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/ReferringObjects/referringObjects002/referringObjects002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/ReferringObjects/referringObjects002/referringObjects002.java index d9b38851eae..4ad6b6ae328 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/ReferringObjects/referringObjects002/referringObjects002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/ReferringObjects/referringObjects002/referringObjects002.java @@ -58,8 +58,7 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ObjectReference.ReferringObjects.referringObjects002.referringObjects002 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdwp.ObjectReference.ReferringObjects.referringObjects002.referringObjects002 * -arch=${os.family}-${os.simpleArch} * -verbose @@ -71,20 +70,24 @@ package nsk.jdwp.ObjectReference.ReferringObjects.referringObjects002; -import java.io.PrintStream; import nsk.share.Consts; -import nsk.share.jdwp.*; +import nsk.share.jdwp.CommandPacket; +import nsk.share.jdwp.JDWP; +import nsk.share.jdwp.ReplyPacket; +import nsk.share.jdwp.TestDebuggerType1; + +import java.io.PrintStream; public class referringObjects002 extends TestDebuggerType1 { protected String getDebugeeClassName() { return nsk.jdwp.ObjectReference.ReferringObjects.referringObjects002.referringObjects002a.class.getName(); } - public static void main(String argv[]) { + public static void main(String[] argv) { System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); } - public static int run(String argv[], PrintStream out) { + public static int run(String[] argv, PrintStream out) { return new referringObjects002().runIt(argv, out); } @@ -124,7 +127,7 @@ private void testCommand() { setSuccess(false); } - long expectedReferrersID[] = new long[expectedReferrersCount]; + long[] expectedReferrersID = new long[expectedReferrersCount]; // initialize expected IDs of referrers for (int i = 0; i < expectedReferrersCount; i++) { @@ -132,21 +135,21 @@ private void testCommand() { + (i + 1)); } - long receivedReferrersID[] = new long[referringObjects]; + long[] receivedReferrersID = new long[referringObjects]; for (int i = 0; i < referringObjects; i++) { JDWP.Value value = reply.getValue(); log.display("tagged-ObjectID = " + value); - receivedReferrersID[i] = ((Long) value.getValue()).longValue(); + receivedReferrersID[i] = (Long) value.getValue(); } // check that correct IDs of referrers was received for (int i = 0; i < referringObjects; i++) { boolean isIDExpected = false; - for (int j = 0; j < expectedReferrersID.length; j++) { - if (receivedReferrersID[i] == expectedReferrersID[j]) { + for (long l : expectedReferrersID) { + if (receivedReferrersID[i] == l) { isIDExpected = true; break; } @@ -160,8 +163,9 @@ private void testCommand() { if (!getSuccess()) { log.complain("Expected IDs:"); - for (int i = 0; i < expectedReferrersID.length; i++) - log.complain("" + expectedReferrersID[i]); + for (long l : expectedReferrersID) { + log.complain("" + l); + } } if (!reply.isParsed()) { diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/SetValues/setvalues001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/SetValues/setvalues001/TestDescription.java index 146be486185..9fc3f9949cf 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/SetValues/setvalues001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ObjectReference/SetValues/setvalues001/TestDescription.java @@ -67,9 +67,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ObjectReference.SetValues.setvalues001 - * nsk.jdwp.ObjectReference.SetValues.setvalues001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ObjectReference.SetValues.setvalues001a + * @run main/othervm * nsk.jdwp.ObjectReference.SetValues.setvalues001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/ClassLoader/classloader001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/ClassLoader/classloader001/TestDescription.java index a149bb8672f..be36b5eccee 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/ClassLoader/classloader001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/ClassLoader/classloader001/TestDescription.java @@ -53,9 +53,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.ClassLoader.classloader001 - * nsk.jdwp.ReferenceType.ClassLoader.classloader001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.ClassLoader.classloader001a + * @run main/othervm * nsk.jdwp.ReferenceType.ClassLoader.classloader001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/ClassObject/classobj001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/ClassObject/classobj001/TestDescription.java index 25eef4d52a9..12baa51bca2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/ClassObject/classobj001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/ClassObject/classobj001/TestDescription.java @@ -53,9 +53,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.ClassObject.classobj001 - * nsk.jdwp.ReferenceType.ClassObject.classobj001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.ClassObject.classobj001a + * @run main/othervm * nsk.jdwp.ReferenceType.ClassObject.classobj001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Fields/fields001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Fields/fields001/TestDescription.java index 9cd039fba79..a337e6b7fb5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Fields/fields001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Fields/fields001/TestDescription.java @@ -55,9 +55,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.Fields.fields001 - * nsk.jdwp.ReferenceType.Fields.fields001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.Fields.fields001a + * @run main/othervm * nsk.jdwp.ReferenceType.Fields.fields001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/FieldsWithGeneric/fldwithgeneric001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/FieldsWithGeneric/fldwithgeneric001/TestDescription.java index 0fa13506be1..c410dabad08 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/FieldsWithGeneric/fldwithgeneric001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/FieldsWithGeneric/fldwithgeneric001/TestDescription.java @@ -44,9 +44,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.FieldsWithGeneric.fldwithgeneric001 - * nsk.jdwp.ReferenceType.FieldsWithGeneric.fldwithgeneric001t - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.FieldsWithGeneric.fldwithgeneric001t + * @run main/othervm * nsk.jdwp.ReferenceType.FieldsWithGeneric.fldwithgeneric001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/GetValues/getvalues001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/GetValues/getvalues001/TestDescription.java index fb43f82cc1e..6a0ceb754d8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/GetValues/getvalues001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/GetValues/getvalues001/TestDescription.java @@ -56,9 +56,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.GetValues.getvalues001 - * nsk.jdwp.ReferenceType.GetValues.getvalues001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.GetValues.getvalues001a + * @run main/othervm * nsk.jdwp.ReferenceType.GetValues.getvalues001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Instances/instances001/instances001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Instances/instances001/instances001.java index e5bbfb0d99d..2312f571822 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Instances/instances001/instances001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Instances/instances001/instances001.java @@ -64,8 +64,7 @@ * @requires !vm.graal.enabled * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.Instances.instances001.instances001 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdwp.ReferenceType.Instances.instances001.instances001 * -arch=${os.family}-${os.simpleArch} * -verbose @@ -77,21 +76,24 @@ package nsk.jdwp.ReferenceType.Instances.instances001; -import java.io.*; import nsk.share.Consts; -import nsk.share.jdwp.*; -import nsk.share.jpda.AbstractDebuggeeTest; +import nsk.share.jdwp.CommandPacket; +import nsk.share.jdwp.JDWP; +import nsk.share.jdwp.ReplyPacket; +import nsk.share.jdwp.TestDebuggerType1; + +import java.io.PrintStream; public class instances001 extends TestDebuggerType1 { protected String getDebugeeClassName() { return nsk.jdwp.ReferenceType.Instances.instances001.instances001a.class.getName(); } - public static void main(String argv[]) { + public static void main(String[] argv) { System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); } - public static int run(String argv[], PrintStream out) { + public static int run(String[] argv, PrintStream out) { return new instances001().runIt(argv, out); } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Instances/instances002/instances002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Instances/instances002/instances002.java index d88b61847bd..cd90392f3d9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Instances/instances002/instances002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Instances/instances002/instances002.java @@ -57,8 +57,7 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.Instances.instances002.instances002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdwp.ReferenceType.Instances.instances002.instances002 * -arch=${os.family}-${os.simpleArch} * -verbose @@ -70,20 +69,24 @@ package nsk.jdwp.ReferenceType.Instances.instances002; -import java.io.*; import nsk.share.Consts; -import nsk.share.jdwp.*; +import nsk.share.jdwp.CommandPacket; +import nsk.share.jdwp.JDWP; +import nsk.share.jdwp.ReplyPacket; +import nsk.share.jdwp.TestDebuggerType1; + +import java.io.PrintStream; public class instances002 extends TestDebuggerType1 { protected String getDebugeeClassName() { return nsk.jdwp.ReferenceType.Instances.instances002.instances002a.class.getName(); } - public static void main(String argv[]) { + public static void main(String[] argv) { System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); } - public static int run(String argv[], PrintStream out) { + public static int run(String[] argv, PrintStream out) { return new instances002().runIt(argv, out); } @@ -118,7 +121,7 @@ private void testClass(String className, int maxInstances, int expectedInstances log.complain("Unexpected 'instances' value: " + instances + ", expected is " + expectedInstances); } - long expectedInstancesID[] = new long[expectedInstances]; + long[] expectedInstancesID = new long[expectedInstances]; // initialize expected IDs of instances for (int i = 0; i < expectedInstances; i++) { @@ -126,21 +129,21 @@ private void testClass(String className, int maxInstances, int expectedInstances JDWP.Tag.OBJECT); } - long receivedInstancesID[] = new long[instances]; + long[] receivedInstancesID = new long[instances]; for (int i = 0; i < instances; i++) { JDWP.Value value = reply.getValue(); log.display("tagged-ObjectID = " + value); - receivedInstancesID[i] = ((Long) value.getValue()).longValue(); + receivedInstancesID[i] = (Long) value.getValue(); } // check that correct IDs of instances was received for (int i = 0; i < instances; i++) { boolean isIDExpected = false; - for (int j = 0; j < expectedInstancesID.length; j++) { - if (receivedInstancesID[i] == expectedInstancesID[j]) { + for (long l : expectedInstancesID) { + if (receivedInstancesID[i] == l) { isIDExpected = true; break; } @@ -154,8 +157,9 @@ private void testClass(String className, int maxInstances, int expectedInstances if (!getSuccess()) { log.complain("Expected IDs:"); - for (int i = 0; i < expectedInstancesID.length; i++) - log.complain("" + expectedInstancesID[i]); + for (long l : expectedInstancesID) { + log.complain("" + l); + } } if (!reply.isParsed()) { diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Interfaces/interfaces001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Interfaces/interfaces001.java index 6621302ce91..d0690e4c429 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Interfaces/interfaces001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Interfaces/interfaces001.java @@ -46,7 +46,8 @@ public class interfaces001 { static final String class_interfaces [][] = { { DEBUGEE_CLASS_NAME + "$" + "TestedClassInterface1", "" }, - { DEBUGEE_CLASS_NAME + "$" + "TestedClassInterface2", "" } + { DEBUGEE_CLASS_NAME + "$" + "TestedClassInterface2", "" }, + { "java.lang.IdentityObject", ""} }; static final int DECLARED_INTERFACES = class_interfaces.length; static final long interfaceIDs[] = new long[DECLARED_INTERFACES]; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Interfaces/interfaces001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Interfaces/interfaces001/TestDescription.java index ff0e5e83436..b67ad06b1c3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Interfaces/interfaces001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Interfaces/interfaces001/TestDescription.java @@ -57,9 +57,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.Interfaces.interfaces001 - * nsk.jdwp.ReferenceType.Interfaces.interfaces001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.Interfaces.interfaces001a + * @run main/othervm * nsk.jdwp.ReferenceType.Interfaces.interfaces001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Methods/methods001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Methods/methods001/TestDescription.java index 1f5cc02379e..f24bcd39b84 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Methods/methods001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Methods/methods001/TestDescription.java @@ -55,9 +55,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.Methods.methods001 - * nsk.jdwp.ReferenceType.Methods.methods001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.Methods.methods001a + * @run main/othervm * nsk.jdwp.ReferenceType.Methods.methods001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/MethodsWithGeneric/methwithgeneric001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/MethodsWithGeneric/methwithgeneric001/TestDescription.java index b001697f77e..648349f887e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/MethodsWithGeneric/methwithgeneric001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/MethodsWithGeneric/methwithgeneric001/TestDescription.java @@ -44,9 +44,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.MethodsWithGeneric.methwithgeneric001 - * nsk.jdwp.ReferenceType.MethodsWithGeneric.methwithgeneric001t - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.MethodsWithGeneric.methwithgeneric001t + * @run main/othervm * nsk.jdwp.ReferenceType.MethodsWithGeneric.methwithgeneric001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Modifiers/modifiers001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Modifiers/modifiers001/TestDescription.java index 9df697eb288..fa26934f149 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Modifiers/modifiers001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Modifiers/modifiers001/TestDescription.java @@ -55,9 +55,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.Modifiers.modifiers001 - * nsk.jdwp.ReferenceType.Modifiers.modifiers001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.Modifiers.modifiers001a + * @run main/othervm * nsk.jdwp.ReferenceType.Modifiers.modifiers001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/NestedTypes/nestedtypes001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/NestedTypes/nestedtypes001/TestDescription.java index bd6d6d1c6b1..4436bcccbb6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/NestedTypes/nestedtypes001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/NestedTypes/nestedtypes001/TestDescription.java @@ -60,9 +60,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.NestedTypes.nestedtypes001 - * nsk.jdwp.ReferenceType.NestedTypes.nestedtypes001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.NestedTypes.nestedtypes001a + * @run main/othervm * nsk.jdwp.ReferenceType.NestedTypes.nestedtypes001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Signature/signature001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Signature/signature001/TestDescription.java index 50fb762d228..27628d13e61 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Signature/signature001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Signature/signature001/TestDescription.java @@ -51,9 +51,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.Signature.signature001 - * nsk.jdwp.ReferenceType.Signature.signature001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.Signature.signature001a + * @run main/othervm * nsk.jdwp.ReferenceType.Signature.signature001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/SignatureWithGeneric/sigwithgeneric001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/SignatureWithGeneric/sigwithgeneric001/TestDescription.java index 2f0c0de7fa3..9dc7275de7d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/SignatureWithGeneric/sigwithgeneric001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/SignatureWithGeneric/sigwithgeneric001/TestDescription.java @@ -43,9 +43,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.SignatureWithGeneric.sigwithgeneric001 - * nsk.jdwp.ReferenceType.SignatureWithGeneric.sigwithgeneric001t - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.SignatureWithGeneric.sigwithgeneric001t + * @run main/othervm * nsk.jdwp.ReferenceType.SignatureWithGeneric.sigwithgeneric001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/SourceDebugExtension/srcdebugext001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/SourceDebugExtension/srcdebugext001/TestDescription.java index c32afe01d51..c614604e55d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/SourceDebugExtension/srcdebugext001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/SourceDebugExtension/srcdebugext001/TestDescription.java @@ -38,9 +38,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.SourceDebugExtension.srcdebugext001 - * nsk.jdwp.ReferenceType.SourceDebugExtension.srcdebugext001t - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.SourceDebugExtension.srcdebugext001t + * @run main/othervm * nsk.jdwp.ReferenceType.SourceDebugExtension.srcdebugext001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/SourceFile/srcfile001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/SourceFile/srcfile001/TestDescription.java index 56a9ea10838..09608b3757d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/SourceFile/srcfile001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/SourceFile/srcfile001/TestDescription.java @@ -51,9 +51,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.SourceFile.srcfile001 - * nsk.jdwp.ReferenceType.SourceFile.srcfile001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.SourceFile.srcfile001a + * @run main/othervm * nsk.jdwp.ReferenceType.SourceFile.srcfile001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Status/status001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Status/status001/TestDescription.java index 574882961f7..aefbb989bf9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Status/status001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Status/status001/TestDescription.java @@ -53,9 +53,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ReferenceType.Status.status001 - * nsk.jdwp.ReferenceType.Status.status001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ReferenceType.Status.status001a + * @run main/othervm * nsk.jdwp.ReferenceType.Status.status001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/GetValues/getvalues001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/GetValues/getvalues001/TestDescription.java index ebdab4505d3..09ee0ba021a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/GetValues/getvalues001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/GetValues/getvalues001/TestDescription.java @@ -60,12 +60,11 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.StackFrame.GetValues.getvalues001 - * nsk.jdwp.StackFrame.GetValues.getvalues001a + * @build nsk.jdwp.StackFrame.GetValues.getvalues001a * @comment debuggee should be compiled w/ debug info * @clean nsk.jdwp.StackFrame.GetValues.getvalues001a * @compile -g:lines,source,vars ../getvalues001a.java - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdwp.StackFrame.GetValues.getvalues001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/PopFrames/popframes001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/PopFrames/popframes001/TestDescription.java index 4d4205c4ec9..2fd126b9fbb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/PopFrames/popframes001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/PopFrames/popframes001/TestDescription.java @@ -59,9 +59,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.StackFrame.PopFrames.popframes001 - * nsk.jdwp.StackFrame.PopFrames.popframes001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.StackFrame.PopFrames.popframes001a + * @run main/othervm * nsk.jdwp.StackFrame.PopFrames.popframes001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/SetValues/setvalues001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/SetValues/setvalues001/TestDescription.java index a8a08c25ac4..96302cd9592 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/SetValues/setvalues001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/SetValues/setvalues001/TestDescription.java @@ -71,12 +71,11 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.StackFrame.SetValues.setvalues001 - * nsk.jdwp.StackFrame.SetValues.setvalues001a + * @build nsk.jdwp.StackFrame.SetValues.setvalues001a * @comment debuggee should be compiled w/ debug info * @clean nsk.jdwp.StackFrame.SetValues.setvalues001a * @compile -g:lines,source,vars ../setvalues001a.java - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdwp.StackFrame.SetValues.setvalues001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/ThisObject/thisobject001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/ThisObject/thisobject001/TestDescription.java index cd1642998ac..9216e598b04 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/ThisObject/thisobject001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StackFrame/ThisObject/thisobject001/TestDescription.java @@ -58,9 +58,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.StackFrame.ThisObject.thisobject001 - * nsk.jdwp.StackFrame.ThisObject.thisobject001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.StackFrame.ThisObject.thisobject001a + * @run main/othervm * nsk.jdwp.StackFrame.ThisObject.thisobject001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StringReference/Value/value001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StringReference/Value/value001/TestDescription.java index 591d4e9a09a..ff107802db0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StringReference/Value/value001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/StringReference/Value/value001/TestDescription.java @@ -51,9 +51,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.StringReference.Value.value001 - * nsk.jdwp.StringReference.Value.value001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.StringReference.Value.value001a + * @run main/othervm * nsk.jdwp.StringReference.Value.value001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/TEST.properties b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/TEST.properties deleted file mode 100644 index a1e382092a6..00000000000 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/TEST.properties +++ /dev/null @@ -1,2 +0,0 @@ -# disabled till JDK-8252002 is fixed -allowSmartActionArgs=false diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadGroupReference/Children/children001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadGroupReference/Children/children001/TestDescription.java index 7fe75fec178..679af7f78c7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadGroupReference/Children/children001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadGroupReference/Children/children001/TestDescription.java @@ -48,9 +48,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadGroupReference.Children.children001 - * nsk.jdwp.ThreadGroupReference.Children.children001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadGroupReference.Children.children001a + * @run main/othervm * nsk.jdwp.ThreadGroupReference.Children.children001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadGroupReference/Name/name001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadGroupReference/Name/name001/TestDescription.java index f5dda76b475..14218e86942 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadGroupReference/Name/name001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadGroupReference/Name/name001/TestDescription.java @@ -48,9 +48,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadGroupReference.Name.name001 - * nsk.jdwp.ThreadGroupReference.Name.name001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadGroupReference.Name.name001a + * @run main/othervm * nsk.jdwp.ThreadGroupReference.Name.name001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadGroupReference/Parent/parent001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadGroupReference/Parent/parent001/TestDescription.java index 41cd508af4f..4a2ff8684ac 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadGroupReference/Parent/parent001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadGroupReference/Parent/parent001/TestDescription.java @@ -51,9 +51,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadGroupReference.Parent.parent001 - * nsk.jdwp.ThreadGroupReference.Parent.parent001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadGroupReference.Parent.parent001a + * @run main/othervm * nsk.jdwp.ThreadGroupReference.Parent.parent001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/CurrentContendedMonitor/curcontmonitor001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/CurrentContendedMonitor/curcontmonitor001/TestDescription.java index 3e57d64fc0f..c1310a9c3fb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/CurrentContendedMonitor/curcontmonitor001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/CurrentContendedMonitor/curcontmonitor001/TestDescription.java @@ -61,9 +61,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.CurrentContendedMonitor.curcontmonitor001 - * nsk.jdwp.ThreadReference.CurrentContendedMonitor.curcontmonitor001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadReference.CurrentContendedMonitor.curcontmonitor001a + * @run main/othervm * nsk.jdwp.ThreadReference.CurrentContendedMonitor.curcontmonitor001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn001/forceEarlyReturn001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn001/forceEarlyReturn001.java index da1d8d11701..8453e54e2c1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn001/forceEarlyReturn001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn001/forceEarlyReturn001.java @@ -74,8 +74,7 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.ForceEarlyReturn.forceEarlyReturn001.forceEarlyReturn001 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdwp.ThreadReference.ForceEarlyReturn.forceEarlyReturn001.forceEarlyReturn001 * -arch=${os.family}-${os.simpleArch} * -verbose @@ -87,21 +86,21 @@ package nsk.jdwp.ThreadReference.ForceEarlyReturn.forceEarlyReturn001; -import java.io.*; import nsk.share.Consts; -import nsk.share.jdwp.*; +import nsk.share.jdwp.CommandPacket; +import nsk.share.jdwp.JDWP; import nsk.share.jdwp.JDWP.Value; +import nsk.share.jdwp.ReplyPacket; +import nsk.share.jdwp.TestDebuggerType1; import nsk.share.jpda.ForceEarlyReturnTestThread; -public class forceEarlyReturn001 -extends TestDebuggerType1 -{ +import java.io.PrintStream; + +public class forceEarlyReturn001 extends TestDebuggerType1 { // data needed to create JDWP command, // also this class create breakpoint in method which should be forced to return - class TestData - { - public TestData(long classID, String methodName, int lineNumber, long threadID, Value value, Value invalidValue) - { + class TestData { + public TestData(long classID, String methodName, int lineNumber, long threadID, Value value, Value invalidValue) { breakpointID = debuggee.requestBreakpointEvent( JDWP.TypeTag.CLASS, classID, @@ -120,27 +119,22 @@ public TestData(long classID, String methodName, int lineNumber, long threadID, public long threadID; } - protected String getDebugeeClassName() - { + protected String getDebugeeClassName() { return "nsk.jdwp.ThreadReference.ForceEarlyReturn.forceEarlyReturn001.forceEarlyReturn001a"; } - public static void main (String argv[]) - { - System.exit(run(argv,System.out) + Consts.JCK_STATUS_BASE); + public static void main(String[] argv) { + System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); } - public static int run(String argv[], PrintStream out) - { + public static int run(String[] argv, PrintStream out) { return new forceEarlyReturn001().runIt(argv, out); } // send command and receive empty reply // all asserts should be done in debuggee - private void sendCommand(long threadID, Value value, boolean expectError, int errorCode) - { - try - { + private void sendCommand(long threadID, Value value, boolean expectError, int errorCode) { + try { int JDWP_COMMAND_ID = JDWP.Command.ThreadReference.ForceEarlyReturn; log.display("Create command: " + JDWP.commandNames.get(JDWP_COMMAND_ID)); @@ -159,19 +153,16 @@ private void sendCommand(long threadID, Value value, boolean expectError, int er reply = getReply(command, expectError, errorCode); - if(expectError) + if (expectError) return; log.display("Empty reply"); - if(!reply.isParsed()) - { + if (!reply.isParsed()) { setSuccess(false); log.complain("Extra trailing bytes found in reply packet at: " + reply.currentPosition()); } - } - catch(Exception e) - { + } catch (Exception e) { setSuccess(false); log.complain("Caught exception while testing JDWP command: " + e); e.printStackTrace(log.getOutStream()); @@ -182,24 +173,21 @@ private void sendCommand(long threadID, Value value, boolean expectError, int er // create Value objects which should be send in command packet and // initialize breapoints in tested methods - private void initTestData() - { + private void initTestData() { long classID = debuggee.getReferenceTypeID(createTypeSignature(ForceEarlyReturnTestThread.class.getName())); - Value testValues[] = new Value[ForceEarlyReturnTestThread.testedTypesNames.length + 1]; - Value testInvalidValues[] = new Value[ForceEarlyReturnTestThread.testedTypesNames.length + 1]; + Value[] testValues = new Value[ForceEarlyReturnTestThread.testedTypesNames.length + 1]; + Value[] testInvalidValues = new Value[ForceEarlyReturnTestThread.testedTypesNames.length + 1]; - testValues[0] = new JDWP.Value(JDWP.Tag.VOID, new Long(0)); + testValues[0] = new JDWP.Value(JDWP.Tag.VOID, 0L); - for(int i = 1; i < ForceEarlyReturnTestThread.testedTypesNames.length; i++) - { + for (int i = 1; i < ForceEarlyReturnTestThread.testedTypesNames.length; i++) { testValues[i] = debuggee.getStaticFieldValue( classID, debuggee.getClassFieldID(classID, "expected" + ForceEarlyReturnTestThread.testedTypesNames[i] + "Value", true)); } - for(int i = 0; i < ForceEarlyReturnTestThread.testedTypesNames.length; i++) - { + for (int i = 0; i < ForceEarlyReturnTestThread.testedTypesNames.length; i++) { testInvalidValues[i] = debuggee.getStaticFieldValue( classID, debuggee.getClassFieldID(classID, "invalid" + ForceEarlyReturnTestThread.testedTypesNames[i] + "Value", true)); @@ -209,8 +197,7 @@ private void initTestData() testData = new TestData[ForceEarlyReturnTestThread.testedTypesNames.length]; - for(int i = 0; i < ForceEarlyReturnTestThread.testedTypesNames.length; i++) - { + for (int i = 0; i < ForceEarlyReturnTestThread.testedTypesNames.length; i++) { testData[i] = new TestData(classID, ForceEarlyReturnTestThread.testedTypesNames[i] + "Method", ForceEarlyReturnTestThread.breakpointLines[i], @@ -220,27 +207,25 @@ private void initTestData() } } - public void doTest() - { + public void doTest() { initTestData(); pipe.println(forceEarlyReturn001a.COMMAND_START_EXECUTION); - if(!isDebuggeeReady()) + if (!isDebuggeeReady()) return; - for(int i = 0; i < testData.length; i++) - { + for (TestData testDatum : testData) { // wait when tested thread call method with breapoint - debuggee.waitForBreakpointEvent(testData[i].breakpointID); + debuggee.waitForBreakpointEvent(testDatum.breakpointID); - log.display("Send invalid command: valid value: " + testData[i].value + " invalid value: " + testData[i].invalidValue); + log.display("Send invalid command: valid value: " + testDatum.value + " invalid value: " + testDatum.invalidValue); // send ForceEarlyReturn command with invalid value - sendCommand(testData[i].threadID, testData[i].invalidValue, true, JDWP.Error.TYPE_MISMATCH); + sendCommand(testDatum.threadID, testDatum.invalidValue, true, JDWP.Error.TYPE_MISMATCH); - log.display("Send valid command: valid value: " + testData[i].value); + log.display("Send valid command: valid value: " + testDatum.value); // send ForceEarlyReturn command - sendCommand(testData[i].threadID, testData[i].value, false, 0); + sendCommand(testDatum.threadID, testDatum.value, false, 0); // resume debuggee debuggee.resume(); @@ -248,7 +233,7 @@ public void doTest() pipe.println(forceEarlyReturn001a.COMMAND_END_EXECUTION); - if(!isDebuggeeReady()) + if (!isDebuggeeReady()) return; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn002/forceEarlyReturn002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn002/forceEarlyReturn002.java index 329b6bf22eb..420dd065053 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn002/forceEarlyReturn002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn002/forceEarlyReturn002.java @@ -66,8 +66,7 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.ForceEarlyReturn.forceEarlyReturn002.forceEarlyReturn002 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jdwp.ThreadReference.ForceEarlyReturn.forceEarlyReturn002.forceEarlyReturn002 * -arch=${os.family}-${os.simpleArch} * -verbose @@ -79,24 +78,28 @@ package nsk.jdwp.ThreadReference.ForceEarlyReturn.forceEarlyReturn002; -import java.io.*; - import nsk.share.Consts; -import nsk.share.jdwp.*; +import nsk.share.jdwp.CommandPacket; +import nsk.share.jdwp.EventPacket; +import nsk.share.jdwp.JDWP; import nsk.share.jdwp.JDWP.Value; +import nsk.share.jdwp.ReplyPacket; +import nsk.share.jdwp.TestDebuggerType1; import nsk.share.jpda.AbstractDebuggeeTest; import nsk.share.jpda.StateTestThread; +import java.io.PrintStream; + public class forceEarlyReturn002 extends TestDebuggerType1 { protected String getDebugeeClassName() { return "nsk.jdwp.ThreadReference.ForceEarlyReturn.forceEarlyReturn002.forceEarlyReturn002a"; } - public static void main(String argv[]) { + public static void main(String[] argv) { System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); } - public static int run(String argv[], PrintStream out) { + public static int run(String[] argv, PrintStream out) { return new forceEarlyReturn002().runIt(argv, out); } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/FrameCount/framecnt001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/FrameCount/framecnt001/TestDescription.java index 9f791d4e958..16adec92f82 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/FrameCount/framecnt001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/FrameCount/framecnt001/TestDescription.java @@ -56,9 +56,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.FrameCount.framecnt001 - * nsk.jdwp.ThreadReference.FrameCount.framecnt001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadReference.FrameCount.framecnt001a + * @run main/othervm * nsk.jdwp.ThreadReference.FrameCount.framecnt001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Frames/frames001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Frames/frames001/TestDescription.java index 2ce91d8ff5c..d742fb39d0e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Frames/frames001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Frames/frames001/TestDescription.java @@ -61,9 +61,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.Frames.frames001 - * nsk.jdwp.ThreadReference.Frames.frames001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadReference.Frames.frames001a + * @run main/othervm * nsk.jdwp.ThreadReference.Frames.frames001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Interrupt/interrupt001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Interrupt/interrupt001/TestDescription.java index 962fa6ca2d9..236ff3140d5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Interrupt/interrupt001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Interrupt/interrupt001/TestDescription.java @@ -65,9 +65,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.Interrupt.interrupt001 - * nsk.jdwp.ThreadReference.Interrupt.interrupt001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadReference.Interrupt.interrupt001a + * @run main/othervm * nsk.jdwp.ThreadReference.Interrupt.interrupt001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Name/name001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Name/name001/TestDescription.java index a057e723b33..afc50298c1c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Name/name001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Name/name001/TestDescription.java @@ -55,9 +55,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.Name.name001 - * nsk.jdwp.ThreadReference.Name.name001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadReference.Name.name001a + * @run main/othervm * nsk.jdwp.ThreadReference.Name.name001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitors/ownmonitors001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitors/ownmonitors001/TestDescription.java index 02abb6e945d..84c7f627e6d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitors/ownmonitors001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitors/ownmonitors001/TestDescription.java @@ -61,9 +61,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.OwnedMonitors.ownmonitors001 - * nsk.jdwp.ThreadReference.OwnedMonitors.ownmonitors001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadReference.OwnedMonitors.ownmonitors001a + * @run main/othervm * nsk.jdwp.ThreadReference.OwnedMonitors.ownmonitors001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitorsStackDepthInfo/ownedMonitorsStackDepthInfo001/ownedMonitorsStackDepthInfo001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitorsStackDepthInfo/ownedMonitorsStackDepthInfo001/ownedMonitorsStackDepthInfo001.java index b489d21e501..f178c88ae14 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitorsStackDepthInfo/ownedMonitorsStackDepthInfo001/ownedMonitorsStackDepthInfo001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitorsStackDepthInfo/ownedMonitorsStackDepthInfo001/ownedMonitorsStackDepthInfo001.java @@ -62,8 +62,7 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.OwnedMonitorsStackDepthInfo.ownedMonitorsStackDepthInfo001.ownedMonitorsStackDepthInfo001 - * @run main/othervm/native/timeout=420 PropertyResolvingWrapper + * @run main/othervm/native/timeout=420 * nsk.jdwp.ThreadReference.OwnedMonitorsStackDepthInfo.ownedMonitorsStackDepthInfo001.ownedMonitorsStackDepthInfo001 * -arch=${os.family}-${os.simpleArch} * -verbose @@ -75,20 +74,24 @@ package nsk.jdwp.ThreadReference.OwnedMonitorsStackDepthInfo.ownedMonitorsStackDepthInfo001; -import java.io.*; import nsk.share.Consts; -import nsk.share.jdwp.*; +import nsk.share.jdwp.CommandPacket; +import nsk.share.jdwp.JDWP; +import nsk.share.jdwp.ReplyPacket; +import nsk.share.jdwp.TestDebuggerType1; + +import java.io.PrintStream; public class ownedMonitorsStackDepthInfo001 extends TestDebuggerType1 { protected String getDebugeeClassName() { return nsk.jdwp.ThreadReference.OwnedMonitorsStackDepthInfo.ownedMonitorsStackDepthInfo001.ownedMonitorsStackDepthInfo001a.class.getName(); } - public static void main(String argv[]) { + public static void main(String[] argv) { System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); } - public static int run(String argv[], PrintStream out) { + public static int run(String[] argv, PrintStream out) { return new ownedMonitorsStackDepthInfo001().runIt(argv, out); } @@ -126,14 +129,14 @@ private void testCommand() { reply = getReply(command); - MonitorInfo expectedMonitors[] = new MonitorInfo[ownedMonitorsStackDepthInfo001a.expectedMonitorCounts]; + MonitorInfo[] expectedMonitors = new MonitorInfo[ownedMonitorsStackDepthInfo001a.expectedMonitorCounts]; long classID = debuggee.getReferenceTypeID(createTypeSignature(getDebugeeClassName())); // obtain information about aquired monitors for (int i = 0; i < ownedMonitorsStackDepthInfo001a.expectedMonitorCounts; i++) { long monitorID = queryObjectID(classID, "monitor" + (i + 1)); - int depth = ((Integer) debuggee.getStaticFieldValue(classID, "depth" + (i + 1), JDWP.Tag.INT).getValue()).intValue(); + int depth = (Integer) debuggee.getStaticFieldValue(classID, "depth" + (i + 1), JDWP.Tag.INT).getValue(); expectedMonitors[i] = new MonitorInfo(monitorID, depth); } @@ -148,7 +151,7 @@ private void testCommand() { log.complain("Unexpected value of 'owned': " + owned + ", expected value is " + expectedMonitors.length); } - MonitorInfo receivedMonitors[] = new MonitorInfo[owned]; + MonitorInfo[] receivedMonitors = new MonitorInfo[owned]; for (int i = 0; i < owned; i++) { JDWP.Value value = reply.getValue(); @@ -157,21 +160,21 @@ private void testCommand() { int stack_depth = reply.getInt(); log.display("stack_depth = " + stack_depth); - receivedMonitors[i] = new MonitorInfo(((Long) value.getValue()).longValue(), stack_depth); + receivedMonitors[i] = new MonitorInfo((Long) value.getValue(), stack_depth); } // check that correct information about acquired monitors was received for (int i = 0; i < owned; i++) { boolean monitorFound = false; - for (int j = 0; j < expectedMonitors.length; j++) { - if (receivedMonitors[i].monitorObjectID == expectedMonitors[j].monitorObjectID) { + for (MonitorInfo expectedMonitor : expectedMonitors) { + if (receivedMonitors[i].monitorObjectID == expectedMonitor.monitorObjectID) { monitorFound = true; - if (receivedMonitors[i].depth != expectedMonitors[j].depth) { + if (receivedMonitors[i].depth != expectedMonitor.depth) { setSuccess(false); log.complain("Unexpected monitor depth for monitor " + receivedMonitors[i].monitorObjectID + ": " - + receivedMonitors[i].depth + ", expected value is " + expectedMonitors[j].depth); + + receivedMonitors[i].depth + ", expected value is " + expectedMonitor.depth); } break; @@ -186,8 +189,8 @@ private void testCommand() { if (!getSuccess()) { log.complain("Expected monitors: "); - for (int i = 0; i < expectedMonitors.length; i++) { - log.complain("monitor: " + expectedMonitors[i].monitorObjectID + " " + expectedMonitors[i].depth); + for (MonitorInfo expectedMonitor : expectedMonitors) { + log.complain("monitor: " + expectedMonitor.monitorObjectID + " " + expectedMonitor.depth); } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitorsStackDepthInfo/ownedMonitorsStackDepthInfo002/ownedMonitorsStackDepthInfo002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitorsStackDepthInfo/ownedMonitorsStackDepthInfo002/ownedMonitorsStackDepthInfo002.java index 47646f744c2..cbc5fb63a23 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitorsStackDepthInfo/ownedMonitorsStackDepthInfo002/ownedMonitorsStackDepthInfo002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/OwnedMonitorsStackDepthInfo/ownedMonitorsStackDepthInfo002/ownedMonitorsStackDepthInfo002.java @@ -50,8 +50,7 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.OwnedMonitorsStackDepthInfo.ownedMonitorsStackDepthInfo002.ownedMonitorsStackDepthInfo002 - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdwp.ThreadReference.OwnedMonitorsStackDepthInfo.ownedMonitorsStackDepthInfo002.ownedMonitorsStackDepthInfo002 * -arch=${os.family}-${os.simpleArch} * -verbose @@ -63,22 +62,26 @@ package nsk.jdwp.ThreadReference.OwnedMonitorsStackDepthInfo.ownedMonitorsStackDepthInfo002; -import java.io.*; import nsk.share.Consts; -import nsk.share.jdwp.*; +import nsk.share.jdwp.AbstractJDWPDebuggee; +import nsk.share.jdwp.CommandPacket; +import nsk.share.jdwp.JDWP; +import nsk.share.jdwp.TestDebuggerType1; import nsk.share.jpda.AbstractDebuggeeTest; import nsk.share.jpda.StateTestThread; +import java.io.PrintStream; + public class ownedMonitorsStackDepthInfo002 extends TestDebuggerType1 { protected String getDebugeeClassName() { return AbstractJDWPDebuggee.class.getName(); } - public static void main(String argv[]) { + public static void main(String[] argv) { System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); } - public static int run(String argv[], PrintStream out) { + public static int run(String[] argv, PrintStream out) { return new ownedMonitorsStackDepthInfo002().runIt(argv, out); } @@ -102,8 +105,6 @@ private void sendCommand(long threadID, boolean trySuspend, int errorCode) { // in this test always expect reply with error getReply(command, true, errorCode); - - return; } catch (Exception e) { setSuccess(false); log.complain("Caught exception while testing JDWP command: " + e); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Resume/resume001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Resume/resume001/TestDescription.java index 5b8df96da9b..e5eb1c510f1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Resume/resume001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Resume/resume001/TestDescription.java @@ -58,9 +58,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.Resume.resume001 - * nsk.jdwp.ThreadReference.Resume.resume001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadReference.Resume.resume001a + * @run main/othervm * nsk.jdwp.ThreadReference.Resume.resume001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Status/status001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Status/status001/TestDescription.java index ff56db49b5d..14ff0247143 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Status/status001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Status/status001/TestDescription.java @@ -55,9 +55,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.Status.status001 - * nsk.jdwp.ThreadReference.Status.status001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadReference.Status.status001a + * @run main/othervm * nsk.jdwp.ThreadReference.Status.status001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Stop/stop001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Stop/stop001/TestDescription.java index a483fb95dc2..9229392142b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Stop/stop001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Stop/stop001/TestDescription.java @@ -58,9 +58,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.Stop.stop001 - * nsk.jdwp.ThreadReference.Stop.stop001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadReference.Stop.stop001a + * @run main/othervm * nsk.jdwp.ThreadReference.Stop.stop001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Suspend/suspend001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Suspend/suspend001/TestDescription.java index bfc6f96368f..d1477e47749 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Suspend/suspend001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/Suspend/suspend001/TestDescription.java @@ -57,9 +57,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.Suspend.suspend001 - * nsk.jdwp.ThreadReference.Suspend.suspend001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadReference.Suspend.suspend001a + * @run main/othervm * nsk.jdwp.ThreadReference.Suspend.suspend001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/SuspendCount/suspendcnt001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/SuspendCount/suspendcnt001/TestDescription.java index f6c97893052..39e5469173a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/SuspendCount/suspendcnt001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/SuspendCount/suspendcnt001/TestDescription.java @@ -57,9 +57,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.SuspendCount.suspendcnt001 - * nsk.jdwp.ThreadReference.SuspendCount.suspendcnt001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadReference.SuspendCount.suspendcnt001a + * @run main/othervm * nsk.jdwp.ThreadReference.SuspendCount.suspendcnt001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ThreadGroup/threadgroup001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ThreadGroup/threadgroup001/TestDescription.java index 6cb00c44a8d..f9b503a82fe 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ThreadGroup/threadgroup001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ThreadReference/ThreadGroup/threadgroup001/TestDescription.java @@ -57,9 +57,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.ThreadReference.ThreadGroup.threadgroup001 - * nsk.jdwp.ThreadReference.ThreadGroup.threadgroup001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.ThreadReference.ThreadGroup.threadgroup001a + * @run main/othervm * nsk.jdwp.ThreadReference.ThreadGroup.threadgroup001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/AllClasses/allclasses001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/AllClasses/allclasses001/TestDescription.java index cc7ed9702c7..4f11e1d91bd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/AllClasses/allclasses001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/AllClasses/allclasses001/TestDescription.java @@ -48,9 +48,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.AllClasses.allclasses001 - * nsk.jdwp.VirtualMachine.AllClasses.allclasses001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.AllClasses.allclasses001a + * @run main/othervm * nsk.jdwp.VirtualMachine.AllClasses.allclasses001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/AllClassesWithGeneric/allclswithgeneric001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/AllClassesWithGeneric/allclswithgeneric001/TestDescription.java index 960bdd3b212..980bdb98c89 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/AllClassesWithGeneric/allclswithgeneric001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/AllClassesWithGeneric/allclswithgeneric001/TestDescription.java @@ -44,9 +44,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.AllClassesWithGeneric.allclswithgeneric001 - * nsk.jdwp.VirtualMachine.AllClassesWithGeneric.allclswithgeneric001t - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.AllClassesWithGeneric.allclswithgeneric001t + * @run main/othervm * nsk.jdwp.VirtualMachine.AllClassesWithGeneric.allclswithgeneric001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/AllThreads/allthreads001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/AllThreads/allthreads001/TestDescription.java index 950f0432f14..782045881ac 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/AllThreads/allthreads001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/AllThreads/allthreads001/TestDescription.java @@ -46,9 +46,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.AllThreads.allthreads001 - * nsk.jdwp.VirtualMachine.AllThreads.allthreads001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.AllThreads.allthreads001a + * @run main/othervm * nsk.jdwp.VirtualMachine.AllThreads.allthreads001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Capabilities/capabilities001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Capabilities/capabilities001/TestDescription.java index c39197f2f66..bba5b1c3015 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Capabilities/capabilities001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Capabilities/capabilities001/TestDescription.java @@ -46,9 +46,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.Capabilities.capabilities001 - * nsk.jdwp.VirtualMachine.Capabilities.capabilities001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.Capabilities.capabilities001a + * @run main/othervm * nsk.jdwp.VirtualMachine.Capabilities.capabilities001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/CapabilitiesNew/capabilitiesnew001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/CapabilitiesNew/capabilitiesnew001/TestDescription.java index d9ced694de7..4d4c69cde63 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/CapabilitiesNew/capabilitiesnew001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/CapabilitiesNew/capabilitiesnew001/TestDescription.java @@ -48,9 +48,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.CapabilitiesNew.capabilitiesnew001 - * nsk.jdwp.VirtualMachine.CapabilitiesNew.capabilitiesnew001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.CapabilitiesNew.capabilitiesnew001a + * @run main/othervm * nsk.jdwp.VirtualMachine.CapabilitiesNew.capabilitiesnew001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ClassPaths/classpaths001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ClassPaths/classpaths001/TestDescription.java index f723219ab5d..4f7d685117c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ClassPaths/classpaths001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ClassPaths/classpaths001/TestDescription.java @@ -39,9 +39,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.ClassPaths.classpaths001 - * nsk.jdwp.VirtualMachine.ClassPaths.classpaths001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.ClassPaths.classpaths001a + * @run main/othervm * nsk.jdwp.VirtualMachine.ClassPaths.classpaths001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ClassesBySignature/classbysig001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ClassesBySignature/classbysig001/TestDescription.java index 4c749eeb473..14f40d16e78 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ClassesBySignature/classbysig001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ClassesBySignature/classbysig001/TestDescription.java @@ -46,9 +46,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.ClassesBySignature.classbysig001 - * nsk.jdwp.VirtualMachine.ClassesBySignature.classbysig001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.ClassesBySignature.classbysig001a + * @run main/othervm * nsk.jdwp.VirtualMachine.ClassesBySignature.classbysig001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/CreateString/createstr001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/CreateString/createstr001/TestDescription.java index ad73870f3bd..54789071b51 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/CreateString/createstr001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/CreateString/createstr001/TestDescription.java @@ -42,9 +42,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.CreateString.createstr001 - * nsk.jdwp.VirtualMachine.CreateString.createstr001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.CreateString.createstr001a + * @run main/othervm * nsk.jdwp.VirtualMachine.CreateString.createstr001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Dispose/dispose001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Dispose/dispose001/TestDescription.java index 2f003e1e102..44b64f614f3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Dispose/dispose001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Dispose/dispose001/TestDescription.java @@ -50,9 +50,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.Dispose.dispose001 - * nsk.jdwp.VirtualMachine.Dispose.dispose001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.Dispose.dispose001a + * @run main/othervm * nsk.jdwp.VirtualMachine.Dispose.dispose001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/DisposeObjects/disposeobj001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/DisposeObjects/disposeobj001/TestDescription.java index 7c0b5ce187f..3782fc59b3f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/DisposeObjects/disposeobj001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/DisposeObjects/disposeobj001/TestDescription.java @@ -54,9 +54,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.DisposeObjects.disposeobj001 - * nsk.jdwp.VirtualMachine.DisposeObjects.disposeobj001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.DisposeObjects.disposeobj001a + * @run main/othervm * nsk.jdwp.VirtualMachine.DisposeObjects.disposeobj001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Exit/exit001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Exit/exit001/TestDescription.java index ae86ef4fc7c..c1fb69e2228 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Exit/exit001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Exit/exit001/TestDescription.java @@ -52,9 +52,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.Exit.exit001 - * nsk.jdwp.VirtualMachine.Exit.exit001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.Exit.exit001a + * @run main/othervm * nsk.jdwp.VirtualMachine.Exit.exit001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/HoldEvents/holdevents001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/HoldEvents/holdevents001/TestDescription.java index e1a95c9eaa9..c562dc2e2a6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/HoldEvents/holdevents001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/HoldEvents/holdevents001/TestDescription.java @@ -51,9 +51,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.HoldEvents.holdevents001 - * nsk.jdwp.VirtualMachine.HoldEvents.holdevents001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.HoldEvents.holdevents001a + * @run main/othervm * nsk.jdwp.VirtualMachine.HoldEvents.holdevents001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/HoldEvents/holdevents002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/HoldEvents/holdevents002/TestDescription.java index 52babe215a2..e41efd46bb4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/HoldEvents/holdevents002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/HoldEvents/holdevents002/TestDescription.java @@ -52,9 +52,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.HoldEvents.holdevents002 - * nsk.jdwp.VirtualMachine.HoldEvents.holdevents002a - * @run main/othervm/timeout=420 PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.HoldEvents.holdevents002a + * @run main/othervm/timeout=420 * nsk.jdwp.VirtualMachine.HoldEvents.holdevents002 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/IDSizes/idsizes001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/IDSizes/idsizes001/TestDescription.java index b34414f5a1a..0dcb07c803b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/IDSizes/idsizes001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/IDSizes/idsizes001/TestDescription.java @@ -39,9 +39,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.IDSizes.idsizes001 - * nsk.jdwp.VirtualMachine.IDSizes.idsizes001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.IDSizes.idsizes001a + * @run main/othervm * nsk.jdwp.VirtualMachine.IDSizes.idsizes001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/InstanceCounts/instanceCounts001/instanceCounts001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/InstanceCounts/instanceCounts001/instanceCounts001.java index c903f612098..e25d2cc3189 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/InstanceCounts/instanceCounts001/instanceCounts001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/InstanceCounts/instanceCounts001/instanceCounts001.java @@ -65,9 +65,8 @@ * @requires !vm.graal.enabled * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.InstanceCounts.instanceCounts001.instanceCounts001 - * nsk.jdwp.VirtualMachine.InstanceCounts.instanceCounts001.instanceCounts001a - * @run main/othervm/native PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.InstanceCounts.instanceCounts001.instanceCounts001a + * @run main/othervm/native * nsk.jdwp.VirtualMachine.InstanceCounts.instanceCounts001.instanceCounts001 * -arch=${os.family}-${os.simpleArch} * -verbose @@ -79,25 +78,28 @@ package nsk.jdwp.VirtualMachine.InstanceCounts.instanceCounts001; -import java.io.*; import nsk.share.Consts; -import nsk.share.jdwp.*; -import nsk.share.jpda.AbstractDebuggeeTest; +import nsk.share.jdwp.CommandPacket; +import nsk.share.jdwp.JDWP; +import nsk.share.jdwp.ReplyPacket; +import nsk.share.jdwp.TestDebuggerType1; + +import java.io.PrintStream; public class instanceCounts001 extends TestDebuggerType1 { protected String getDebugeeClassName() { return "nsk.jdwp.VirtualMachine.InstanceCounts.instanceCounts001.instanceCounts001a"; } - public static void main(String argv[]) { + public static void main(String[] argv) { System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); } - public static int run(String argv[], PrintStream out) { + public static int run(String[] argv, PrintStream out) { return new instanceCounts001().runIt(argv, out); } - private void testCommand(long typeIDs[], int refTypesCount, int[] expectedInstanceCounts, boolean expectError, int errorCode) { + private void testCommand(long[] typeIDs, int refTypesCount, int[] expectedInstanceCounts, boolean expectError, int errorCode) { try { int JDWP_COMMAND_ID = JDWP.Command.VirtualMachine.InstanceCounts; @@ -109,8 +111,9 @@ private void testCommand(long typeIDs[], int refTypesCount, int[] expectedInstan CommandPacket command = new CommandPacket(JDWP_COMMAND_ID); command.addInt(refTypesCount); - for (int i = 0; i < refTypesCount; i++) + for (int i = 0; i < refTypesCount; i++) { command.addReferenceTypeID(typeIDs[i]); + } command.setLength(); @@ -172,11 +175,11 @@ public void doTest() { int expectedCount = instanceCounts001a.expectedCount; - String classNames[]; + String[] classNames; - classNames = new String[] { createTypeSignature(testClass1) }; + classNames = new String[]{createTypeSignature(testClass1)}; - long typeIDs[]; + long[] typeIDs; typeIDs = new long[classNames.length]; @@ -184,9 +187,9 @@ public void doTest() { for (int i = 0; i < classNames.length; i++) typeIDs[i] = debuggee.getReferenceTypeID(classNames[i]); - testCommand(typeIDs, typeIDs.length, new int[] { expectedCount }, false, 0); + testCommand(typeIDs, typeIDs.length, new int[]{expectedCount}, false, 0); - classNames = new String[] { createTypeSignature(testClass1), createTypeSignature(testClass2) }; + classNames = new String[]{createTypeSignature(testClass1), createTypeSignature(testClass2)}; typeIDs = new long[classNames.length]; @@ -194,10 +197,10 @@ public void doTest() { for (int i = 0; i < classNames.length; i++) typeIDs[i] = debuggee.getReferenceTypeID(classNames[i]); - testCommand(typeIDs, typeIDs.length, new int[] { expectedCount, expectedCount }, false, 0); + testCommand(typeIDs, typeIDs.length, new int[]{expectedCount, expectedCount}, false, 0); // create command with refTypesCount < 0, expect ILLEGAL_ARGUMENT error - testCommand(typeIDs, -1, new int[] { expectedCount }, true, JDWP.Error.ILLEGAL_ARGUMENT); + testCommand(typeIDs, -1, new int[]{expectedCount}, true, JDWP.Error.ILLEGAL_ARGUMENT); resetStatusIfGC(); } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/RedefineClasses/redefinecls001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/RedefineClasses/redefinecls001/TestDescription.java index 8070578231f..5ea557b5164 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/RedefineClasses/redefinecls001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/RedefineClasses/redefinecls001/TestDescription.java @@ -70,12 +70,11 @@ * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib * @build ExecDriver - * @build nsk.jdwp.VirtualMachine.RedefineClasses.redefinecls001 - * nsk.jdwp.VirtualMachine.RedefineClasses.redefinecls001a + * @build nsk.jdwp.VirtualMachine.RedefineClasses.redefinecls001a * nsk.jdwp.VirtualMachine.RedefineClasses.redefinecls001b * @run driver nsk.share.ExtraClassesBuilder * newclass - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.jdwp.VirtualMachine.RedefineClasses.redefinecls001 * . * -arch=${os.family}-${os.simpleArch} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ReleaseEvents/releaseevents001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ReleaseEvents/releaseevents001/TestDescription.java index cc75bb61fa0..589d061373d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ReleaseEvents/releaseevents001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ReleaseEvents/releaseevents001/TestDescription.java @@ -55,9 +55,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.ReleaseEvents.releaseevents001 - * nsk.jdwp.VirtualMachine.ReleaseEvents.releaseevents001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.ReleaseEvents.releaseevents001a + * @run main/othervm * nsk.jdwp.VirtualMachine.ReleaseEvents.releaseevents001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ReleaseEvents/releaseevents002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ReleaseEvents/releaseevents002/TestDescription.java index 8d1ec4a40ff..cb6760f9787 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ReleaseEvents/releaseevents002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/ReleaseEvents/releaseevents002/TestDescription.java @@ -55,9 +55,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.ReleaseEvents.releaseevents002 - * nsk.jdwp.VirtualMachine.ReleaseEvents.releaseevents002a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.ReleaseEvents.releaseevents002a + * @run main/othervm * nsk.jdwp.VirtualMachine.ReleaseEvents.releaseevents002 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Resume/resume001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Resume/resume001/TestDescription.java index dee7545489a..14fcd815f28 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Resume/resume001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Resume/resume001/TestDescription.java @@ -50,9 +50,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.Resume.resume001 - * nsk.jdwp.VirtualMachine.Resume.resume001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.Resume.resume001a + * @run main/othervm * nsk.jdwp.VirtualMachine.Resume.resume001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/SetDefaultStratum/setdefstrat001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/SetDefaultStratum/setdefstrat001/TestDescription.java index 38230b43bdd..94828c43d80 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/SetDefaultStratum/setdefstrat001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/SetDefaultStratum/setdefstrat001/TestDescription.java @@ -53,9 +53,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.SetDefaultStratum.setdefstrat001 - * nsk.jdwp.VirtualMachine.SetDefaultStratum.setdefstrat001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.SetDefaultStratum.setdefstrat001a + * @run main/othervm * nsk.jdwp.VirtualMachine.SetDefaultStratum.setdefstrat001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/TopLevelThreadGroups/threadgroups001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/TopLevelThreadGroups/threadgroups001/TestDescription.java index ddaf4f02f94..ecd37d43e84 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/TopLevelThreadGroups/threadgroups001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/TopLevelThreadGroups/threadgroups001/TestDescription.java @@ -39,9 +39,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.TopLevelThreadGroups.threadgroups001 - * nsk.jdwp.VirtualMachine.TopLevelThreadGroups.threadgroups001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.TopLevelThreadGroups.threadgroups001a + * @run main/othervm * nsk.jdwp.VirtualMachine.TopLevelThreadGroups.threadgroups001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Version/version001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Version/version001/TestDescription.java index 02028908fe5..c26171f0dec 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Version/version001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Version/version001/TestDescription.java @@ -38,9 +38,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.Version.version001 - * nsk.jdwp.VirtualMachine.Version.version001a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.Version.version001a + * @run main/othervm * nsk.jdwp.VirtualMachine.Version.version001 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Version/version002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Version/version002/TestDescription.java index 4d68fa8c894..cfc6ed266c1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Version/version002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/Version/version002/TestDescription.java @@ -39,9 +39,8 @@ * * @library /vmTestbase /test/hotspot/jtreg/vmTestbase * /test/lib - * @build nsk.jdwp.VirtualMachine.Version.version002 - * nsk.jdwp.VirtualMachine.Version.version002a - * @run main/othervm PropertyResolvingWrapper + * @build nsk.jdwp.VirtualMachine.Version.version002a + * @run main/othervm * nsk.jdwp.VirtualMachine.Version.version002 * -arch=${os.family}-${os.simpleArch} * -verbose diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps003/TestDescription.java index df259c5d29a..f0ad04b4929 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps003/TestDescription.java @@ -47,9 +47,7 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.AddCapabilities.addcaps003 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @run main/othervm/native * -XX:+UnlockDiagnosticVMOptions * -XX:+PrintInterpreter * -XX:+IgnoreUnrecognizedVMOptions diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch001/TestDescription.java index fe57295e153..c512e194be7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch001/TestDescription.java @@ -62,9 +62,9 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:bootclssearch_agent=-waittime=5 phasetocheck=onload segment1=./bin/newclass" + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java + * -agentlib:bootclssearch_agent=-waittime=5,phasetocheck=onload,segment1=./bin/newclass * nsk.jvmti.AddToBootstrapClassLoaderSearch.bootclssearch001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch002/TestDescription.java index c90b602305c..95ba32fb3c3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch002/TestDescription.java @@ -88,10 +88,10 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java * -Xbootclasspath/a:./bin/loadclass - * "-agentlib:bootclssearch_agent=-waittime=5 phasetocheck=onload segment1=./bin/newclass" + * -agentlib:bootclssearch_agent=-waittime=5,phasetocheck=onload,segment1=./bin/newclass * nsk.jvmti.AddToBootstrapClassLoaderSearch.bootclssearch002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch003/TestDescription.java index 93a83e5d988..74ee986d525 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch003/TestDescription.java @@ -73,10 +73,10 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java * -Xbootclasspath/a:./bin/loadclass - * "-agentlib:bootclssearch_agent=-waittime=5 phasetocheck=onload segment1=./bin/newclass" + * -agentlib:bootclssearch_agent=-waittime=5,phasetocheck=onload,segment1=./bin/newclass * nsk.jvmti.AddToBootstrapClassLoaderSearch.bootclssearch003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch004/TestDescription.java index bba88ae27b3..192160529e3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch004/TestDescription.java @@ -69,9 +69,9 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass02 newclass01 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:bootclssearch_agent=-waittime=5 phasetocheck=onload segment1=./bin/newclass01 segment2=./bin/newclass02" + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java + * -agentlib:bootclssearch_agent=-waittime=5,phasetocheck=onload,segment1=./bin/newclass01,segment2=./bin/newclass02 * nsk.jvmti.AddToBootstrapClassLoaderSearch.bootclssearch004 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch007/TestDescription.java index a8c6e2563be..cc035ff238e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch007/TestDescription.java @@ -77,16 +77,16 @@ * ../bootclssearch003/newclass * * @comment create bootclssearch003.jar in current directory - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cf bootclssearch003.jar * -C ./bin/newclass/ * nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch003.class * - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java * -Xbootclasspath/a:./bin/loadclass - * "-agentlib:bootclssearch_agent=-waittime=5 phasetocheck=live segment1=./bootclssearch003.jar" + * -agentlib:bootclssearch_agent=-waittime=5,phasetocheck=live,segment1=./bootclssearch003.jar * nsk.jvmti.AddToBootstrapClassLoaderSearch.bootclssearch003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch008/TestDescription.java index 2a04f1c1a6f..b8b871bf5e1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch008/TestDescription.java @@ -77,23 +77,22 @@ * ../bootclssearch004/newclass02 * * @comment create bootclssearch004.jar in ./bin/newclass01/ - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cf ./bin/newclass01/bootclssearch004.jar * -C ./bin/newclass01/ * nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch004.class * * @comment create bootclssearch004.jar in ./bin/newclass02/ - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cf ./bin/newclass02/bootclssearch004.jar * -C ./bin/newclass02/ * nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch004.class * - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:bootclssearch_agent=-waittime=5 phasetocheck=live segment1=./bin/newclass01/bootclssearch004.jar segment2=./bin/newclass02/bootclssearch004.jar" + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java + * -agentlib:bootclssearch_agent=-waittime=5,phasetocheck=live,segment1=./bin/newclass01/bootclssearch004.jar,segment2=./bin/newclass02/bootclssearch004.jar * nsk.jvmti.AddToBootstrapClassLoaderSearch.bootclssearch004 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch009/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch009/TestDescription.java index 1cf68e55948..af5d030b4b8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch009/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch009/TestDescription.java @@ -65,15 +65,15 @@ * ../bootclssearch001/newclass * * @comment create bootclssearch001.jar in current directory - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cf bootclssearch001.jar * -C ./bin/newclass/ * nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch001.class * - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:bootclssearch_agent=-waittime=5 phasetocheck=live segment1=./bootclssearch001.jar" + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java + * -agentlib:bootclssearch_agent=-waittime=5,phasetocheck=live,segment1=./bootclssearch001.jar * nsk.jvmti.AddToBootstrapClassLoaderSearch.bootclssearch001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch010/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch010/TestDescription.java index f0b0cf90552..8a217be295e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch010/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch010/TestDescription.java @@ -93,16 +93,16 @@ * ../bootclssearch002/newclass * * @comment create bootclssearch002.jar in current directory - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cf bootclssearch002.jar * -C ./bin/newclass/ * nsk/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch002.class * - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java * -Xbootclasspath/a:./bin/loadclass - * "-agentlib:bootclssearch_agent=-waittime=5 phasetocheck=live segment1=./bootclssearch002.jar" + * -agentlib:bootclssearch_agent=-waittime=5,phasetocheck=live,segment1=./bootclssearch002.jar * nsk.jvmti.AddToBootstrapClassLoaderSearch.bootclssearch002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch001/TestDescription.java index c6cc3c9fdf0..4c6cd039c7e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch001/TestDescription.java @@ -62,10 +62,10 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java * -cp ${test.class.path}${path.separator}./bin/newclass - * "-agentlib:systemclssearch_agent=-waittime=5 phasetocheck=onload segment1=./bin/newclass" + * -agentlib:systemclssearch_agent=-waittime=5,phasetocheck=onload,segment1=./bin/newclass * nsk.jvmti.AddToSystemClassLoaderSearch.systemclssearch001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch002/TestDescription.java index e3222d4a898..cb4cf3d8e3e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch002/TestDescription.java @@ -62,9 +62,9 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:systemclssearch_agent=-waittime=5 phasetocheck=onload segment1=./bin/newclass" + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java + * -agentlib:systemclssearch_agent=-waittime=5,phasetocheck=onload,segment1=./bin/newclass * nsk.jvmti.AddToSystemClassLoaderSearch.systemclssearch002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch003/TestDescription.java index dc498440775..8aace6c1f18 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch003/TestDescription.java @@ -69,9 +69,9 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass02 newclass01 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:systemclssearch_agent=-waittime=5 phasetocheck=onload segment1=./bin/newclass01 segment2=./bin/newclass02" + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java + * -agentlib:systemclssearch_agent=-waittime=5,phasetocheck=onload,segment1=./bin/newclass01,segment2=./bin/newclass02 * nsk.jvmti.AddToSystemClassLoaderSearch.systemclssearch003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch004/TestDescription.java index 8b44532e168..a079c92a834 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch004/TestDescription.java @@ -77,23 +77,22 @@ * ../systemclssearch003/newclass02 * * @comment create systemclssearch003.jar in current directory - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cf ./bin/newclass01/systemclssearch003.jar * -C ./bin/newclass01/ * nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch003.class * * @comment create systemclssearch003.jar in current directory - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cf ./bin/newclass02/systemclssearch003.jar * -C ./bin/newclass02/ * nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch003.class * - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:systemclssearch_agent=-waittime=5 phasetocheck=live segment1=./bin/newclass01/systemclssearch003.jar segment2=./bin/newclass02/systemclssearch003.jar" + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java + * -agentlib:systemclssearch_agent=-waittime=5,phasetocheck=live,segment1=./bin/newclass01/systemclssearch003.jar,segment2=./bin/newclass02/systemclssearch003.jar * nsk.jvmti.AddToSystemClassLoaderSearch.systemclssearch003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch005/TestDescription.java index 31db8c62ec3..240cf09706b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch005/TestDescription.java @@ -66,15 +66,15 @@ * ../systemclssearch001/newclass * * @comment create systemclssearch001.jar in current directory - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cf systemclssearch001.jar * -C ./bin/newclass/ * nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch001.class * - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:systemclssearch_agent=-waittime=5 phasetocheck=live segment1=systemclssearch001.jar" + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java + * -agentlib:systemclssearch_agent=-waittime=5,phasetocheck=live,segment1=systemclssearch001.jar * nsk.jvmti.AddToSystemClassLoaderSearch.systemclssearch001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch006/TestDescription.java index 7aa4812770b..afb2f02f438 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch006/TestDescription.java @@ -66,15 +66,15 @@ * ../systemclssearch002/newclass * * @comment create systemclssearch002.jar in current directory - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cf systemclssearch002.jar * -C ./bin/newclass/ * nsk/jvmti/AddToSystemClassLoaderSearch/systemclssearch002.class * - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:systemclssearch_agent=-waittime=5 phasetocheck=live segment1=systemclssearch002.jar" + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java + * -agentlib:systemclssearch_agent=-waittime=5,phasetocheck=live,segment1=systemclssearch002.jar * nsk.jvmti.AddToSystemClassLoaderSearch.systemclssearch002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach001/attach001TestRunner.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach001/attach001TestRunner.java index 91c8faee1c0..125c7668cca 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach001/attach001TestRunner.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach001/attach001TestRunner.java @@ -43,8 +43,7 @@ * @comment create SimpleAgent00.jar in current directory * @build nsk.jvmti.AttachOnDemand.sharedAgents.SimpleAgent00 * @run driver ClassFileInstaller nsk.jvmti.AttachOnDemand.sharedAgents.SimpleAgent00 - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cfm SimpleAgent00.jar ${test.src}/../sharedAgents/SimpleAgent00.mf * nsk/jvmti/AttachOnDemand/sharedAgents/SimpleAgent00.class @@ -52,10 +51,9 @@ * @run main/othervm/native * -XX:+UsePerfData * -Djdk.attach.allowAttachSelf - * PropertyResolvingWrapper * nsk.jvmti.AttachOnDemand.attach001.attach001TestRunner * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData -Djdk.attach.allowAttachSelf ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData -Djdk.attach.allowAttachSelf ${test.vm.opts} ${test.java.opts}" * -ja SimpleAgent00.jar * -na simpleAgent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002/TestDescription.java index 340740a30d3..01650fe328c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002/TestDescription.java @@ -50,11 +50,11 @@ * newclass00 * * @build nsk.jvmti.AttachOnDemand.attach002.attach002Target - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach002.attach002Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach002Agent00=-pathToNewByteCode=./bin/newclass00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/TestDescription.java index dc7b1552c6c..bcefc1fda71 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/TestDescription.java @@ -52,19 +52,18 @@ * @build nsk.share.aod.AODTestRunner * * @comment compile newclassXX to bin/newclassXX - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/javac * --patch-module java.base=${test.src}/newclass00/java.base * -d bin/newclass00 * ${test.src}/newclass00/java.base/java/lang/InterruptedException.java * * @build nsk.jvmti.AttachOnDemand.attach002a.attach002aTarget - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach002a.attach002aTarget - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach002aAgent00=-pathToNewByteCode=./bin/newclass00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach003/TestDescription.java index 9e3c540514d..8ee9e40c5c3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach003/TestDescription.java @@ -47,16 +47,15 @@ * @comment create SimpleAgent00.jar in current directory * @build nsk.jvmti.AttachOnDemand.sharedAgents.SimpleAgent00 * @run driver ClassFileInstaller nsk.jvmti.AttachOnDemand.sharedAgents.SimpleAgent00 - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cfm SimpleAgent00.jar ${test.src}/../sharedAgents/SimpleAgent00.mf * nsk/jvmti/AttachOnDemand/sharedAgents/SimpleAgent00.class * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.TargetApplicationWaitingAgents * -ja SimpleAgent00.jar,SimpleAgent00.jar */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach004/TestDescription.java index 2e16d3fdaeb..7e1ed25a37e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach004/TestDescription.java @@ -47,16 +47,15 @@ * @comment create attach004Agent00.jar in current directory * @build nsk.jvmti.AttachOnDemand.attach004.attach004Agent00 * @run driver ClassFileInstaller nsk.jvmti.AttachOnDemand.attach004.attach004Agent00 - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cfm attach004Agent00.jar ${test.src}/attach004Agent00.mf * nsk/jvmti/AttachOnDemand/attach004/attach004Agent00.class * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts} -Djava.security.manager -Djava.security.policy==${test.src}/attach004.policy" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts} -Djava.security.manager -Djava.security.policy==${test.src}/attach004.policy" * -target nsk.share.aod.TargetApplicationWaitingAgents * -ja attach004Agent00.jar */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/TestDescription.java index 1bddb401953..fec7a542c7e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/TestDescription.java @@ -42,11 +42,11 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach008.attach008Target - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach008.attach008Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach008Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach009/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach009/TestDescription.java index d35c9023b36..ea15ac83aa1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach009/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach009/TestDescription.java @@ -41,11 +41,11 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach009.attach009Target - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach009.attach009Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach009Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach010/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach010/TestDescription.java index 11e8b942a82..095634500e7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach010/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach010/TestDescription.java @@ -44,16 +44,15 @@ * @comment create attach010Agent00.jar in current directory * @build nsk.jvmti.AttachOnDemand.attach010.attach010Agent00 * @run driver ClassFileInstaller nsk.jvmti.AttachOnDemand.attach010.attach010Agent00 - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cfm attach010Agent00.jar ${test.src}/attach010Agent00.mf * nsk/jvmti/AttachOnDemand/attach010/attach010Agent00.class * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.TargetApplicationWaitingAgents * -ja attach010Agent00.jar */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach011/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach011/TestDescription.java index 03b30992db1..d9d602ecd93 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach011/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach011/TestDescription.java @@ -44,16 +44,15 @@ * @comment create SimpleAgent00.jar in current directory * @build nsk.jvmti.AttachOnDemand.sharedAgents.SimpleAgent00 * @run driver ClassFileInstaller nsk.jvmti.AttachOnDemand.sharedAgents.SimpleAgent00 - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cfm SimpleAgent00.jar ${test.src}/../sharedAgents/SimpleAgent00.mf * nsk/jvmti/AttachOnDemand/sharedAgents/SimpleAgent00.class * - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.TargetApplicationWaitingAgents * -na simpleAgent00 * -ja SimpleAgent00.jar diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach012/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach012/TestDescription.java index b48346fb26c..a4c36e686c6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach012/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach012/TestDescription.java @@ -41,10 +41,10 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.share.aod.TargetApplicationWaitingAgents - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.TargetApplicationWaitingAgents * -na attach012Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach013/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach013/TestDescription.java index aa9721ec75f..94a2d595f68 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach013/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach013/TestDescription.java @@ -39,10 +39,10 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.share.aod.TargetApplicationWaitingAgents - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.TargetApplicationWaitingAgents * -na simpleAgent00,simpleAgent00,simpleAgent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach014/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach014/TestDescription.java index fac964fab19..6010e970aec 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach014/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach014/TestDescription.java @@ -38,11 +38,11 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach014.attach014Target - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach014.attach014Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach014Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/TestDescription.java index 88cd5840049..d09a1325599 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/TestDescription.java @@ -46,11 +46,11 @@ * nsk.jvmti.AttachOnDemand.attach015.attach015Target * nsk.jvmti.AttachOnDemand.attach015.ClassToLoad1 * nsk.jvmti.AttachOnDemand.attach015.ClassToLoad2 - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach015.attach015Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach015Agent00,attach015Agent01 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TestDescription.java index ccf670a9c0f..a729aa4d28f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/TestDescription.java @@ -48,11 +48,11 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach020.attach020Target - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach020.attach020Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach020Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TestDescription.java index 4979e5ca287..5cf7b39729b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TestDescription.java @@ -44,11 +44,11 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach021.attach021Target - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach021.attach021Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach021Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TestDescription.java index a9ef310925d..49b47585749 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TestDescription.java @@ -47,11 +47,11 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach022.attach022Target - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach022.attach022Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach022Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach024/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach024/TestDescription.java index 16fc98d51df..c95076891dc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach024/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach024/TestDescription.java @@ -46,8 +46,7 @@ * nsk.jvmti.AttachOnDemand.attach024.attach024Agent00 * * @comment compile modified java.util.TooManyListenersException - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/javac * -cp ${test.class.path} * -d ./bin/classes @@ -56,22 +55,22 @@ * ${test.src}/java.base/java/util/TooManyListenersException.java * * @comment create attach024Agent00.jar in current directory - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cfm attach024Agent00.jar ${test.src}/attach024Agent00.mf * -C ./bin/classes * java/util/TooManyListenersException.class * @run driver ClassFileInstaller * nsk.jvmti.AttachOnDemand.attach024.attach024Agent00 - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -uf attach024Agent00.jar * nsk/jvmti/AttachOnDemand/attach024/attach024Agent00.class * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} - * "-javaOpts=--add-reads java.base=ALL-UNNAMED -XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="--add-reads java.base=ALL-UNNAMED -XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.TargetApplicationWaitingAgents * -ja attach024Agent00.jar */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach030/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach030/TestDescription.java index 592f7576551..58a60519298 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach030/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach030/TestDescription.java @@ -51,17 +51,16 @@ * @comment create attach030Agent00.jar in current directory * @build nsk.jvmti.AttachOnDemand.attach030.attach030Agent00 * @run driver ClassFileInstaller nsk.jvmti.AttachOnDemand.attach030.attach030Agent00 - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cfm attach030Agent00.jar ${test.src}/attach030Agent00.mf * nsk/jvmti/AttachOnDemand/attach030/attach030Agent00.class * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach030.attach030Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -ja attach030Agent00.jar=-pathToNewByteCode=./bin/newclass00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach031/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach031/TestDescription.java index 05af5cb9792..6387e0beaba 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach031/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach031/TestDescription.java @@ -45,16 +45,15 @@ * @comment create attach031Agent00.jar in current directory * @build nsk.jvmti.AttachOnDemand.attach031.attach031Agent00 * @run driver ClassFileInstaller nsk.jvmti.AttachOnDemand.attach031.attach031Agent00 - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cfm attach031Agent00.jar ${test.src}/attach031Agent00.mf * nsk/jvmti/AttachOnDemand/attach031/attach031Agent00.class * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.TargetApplicationWaitingAgents * -ja attach031Agent00.jar */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach034/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach034/TestDescription.java index a073a21e577..44be6f2d2b6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach034/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach034/TestDescription.java @@ -46,8 +46,7 @@ * @comment create attach034Agent00.jar in current directory * @build nsk.jvmti.AttachOnDemand.attach034.attach034Agent00 * @run driver ClassFileInstaller nsk.jvmti.AttachOnDemand.attach034.attach034Agent00 - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cfm attach034Agent00.jar ${test.src}/attach034Agent00.mf * nsk/jvmti/AttachOnDemand/attach034/attach034Agent00.class @@ -55,16 +54,15 @@ * @comment create AgentParent.jar in current directory * @build nsk.jvmti.AttachOnDemand.attach034.AgentParent * @run driver ClassFileInstaller nsk.jvmti.AttachOnDemand.attach034.AgentParent - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cfm AgentParent.jar ${test.src}/AgentParent.mf * nsk/jvmti/AttachOnDemand/attach034/AgentParent.class * - * @run main/othervm PropertyResolvingWrapper + * @run main/othervm * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.TargetApplicationWaitingAgents * -ja AgentParent.jar,attach034Agent00.jar */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach036/attach036TestRunner.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach036/attach036TestRunner.java index 172508c605c..1d3971d85fa 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach036/attach036TestRunner.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach036/attach036TestRunner.java @@ -40,8 +40,7 @@ * @comment create attach036Agent00.jar in current directory * @build nsk.jvmti.AttachOnDemand.attach036.attach036Agent00 * @run driver ClassFileInstaller nsk.jvmti.AttachOnDemand.attach036.attach036Agent00 - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cfm attach036Agent00.jar ${test.src}/attach036Agent00.mf * nsk/jvmti/AttachOnDemand/attach036/attach036Agent00.class @@ -49,7 +48,6 @@ * @run main/othervm * -XX:+UsePerfData * -Djdk.attach.allowAttachSelf - * PropertyResolvingWrapper * nsk.jvmti.AttachOnDemand.attach036.attach036TestRunner * -jdk ${test.jdk} * -ja attach036Agent00.jar diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach037/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach037/TestDescription.java index dcdbc669243..fadcc8c9d49 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach037/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach037/TestDescription.java @@ -42,11 +42,11 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach037.attach037Target - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach037.attach037Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach037Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach038/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach038/TestDescription.java index 9713b7a872f..94a2e2a0ce0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach038/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach038/TestDescription.java @@ -40,11 +40,11 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach038.attach038Target - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach038.attach038Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach038Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach039/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach039/TestDescription.java index 1fc3a808e43..b685561b046 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach039/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach039/TestDescription.java @@ -39,10 +39,10 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.share.aod.TargetApplicationWaitingAgents - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -target nsk.share.aod.TargetApplicationWaitingAgents * -na attach039Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach040/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach040/TestDescription.java index deb62d0ab3f..29183efee87 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach040/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach040/TestDescription.java @@ -45,11 +45,11 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach040.attach040Target - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach040.attach040Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach040Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach041/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach041/TestDescription.java index 002748af209..97c272c73d6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach041/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach041/TestDescription.java @@ -46,11 +46,11 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach041.attach041Target - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach041.attach041Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach041Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach042/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach042/TestDescription.java index cc4898c70ca..be95a083ea8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach042/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach042/TestDescription.java @@ -44,11 +44,11 @@ * /test/lib * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach042.attach042Target - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach042.attach042Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach042Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach043/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach043/TestDescription.java index 007040172c0..16063cce099 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach043/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach043/TestDescription.java @@ -47,8 +47,7 @@ * @comment create SimpleAgent00.jar in current directory * @build nsk.jvmti.AttachOnDemand.sharedAgents.SimpleAgent00 * @run driver ClassFileInstaller nsk.jvmti.AttachOnDemand.sharedAgents.SimpleAgent00 - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cfm SimpleAgent00.jar ${test.src}/../sharedAgents/SimpleAgent00.mf * nsk/jvmti/AttachOnDemand/sharedAgents/SimpleAgent00.class @@ -56,17 +55,16 @@ * @comment create attach0031Agent00.jar in current directory * @build nsk.jvmti.AttachOnDemand.attach031.attach031Agent00 * @run driver ClassFileInstaller nsk.jvmti.AttachOnDemand.attach031.attach031Agent00 - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/jar * -cfm attach031Agent00.jar ${test.src}/../attach031/attach031Agent00.mf * nsk/jvmti/AttachOnDemand/attach031/attach031Agent00.class * - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach042.attach042Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach042Agent00 * -ja SimpleAgent00.jar,attach031Agent00.jar */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/TestDescription.java index 18c79f730e3..9c432351575 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/TestDescription.java @@ -53,11 +53,11 @@ * @build nsk.share.aod.AODTestRunner * nsk.jvmti.AttachOnDemand.attach045.attach045Target * nsk.jvmti.AttachOnDemand.attach045.ClassToLoad - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target "nsk.jvmti.AttachOnDemand.attach045.attach045Target -classPath ${test.class.path}" - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach045Agent00,attach045Agent01,attach045Agent02,attach045Agent03 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach046/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach046/TestDescription.java index 0b96e8d78d7..f76cfb30e20 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach046/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach046/TestDescription.java @@ -45,11 +45,11 @@ * newclass02 newclass01 newclass00 * * @build nsk.jvmti.AttachOnDemand.attach046.attach046Target - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.share.aod.AODTestRunner * -jdk ${test.jdk} * -target nsk.jvmti.AttachOnDemand.attach046.attach046Target - * "-javaOpts=-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData ${test.vm.opts} ${test.java.opts}" * -na attach046Agent00=-pathToNewByteCode=./bin/newclass00,attach046Agent00=-pathToNewByteCode=./bin/newclass01,attach046Agent00=-pathToNewByteCode=./bin/newclass02 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach050/attach050TestRunner.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach050/attach050TestRunner.java index 5d5ca935c24..bd383f24e9a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach050/attach050TestRunner.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach050/attach050TestRunner.java @@ -31,11 +31,11 @@ * /test/lib * @build nsk.jvmti.AttachOnDemand.attach050.attach050TestRunner * nsk.share.aod.TargetApplicationWaitingAgents - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jvmti.AttachOnDemand.attach050.attach050TestRunner * -jdk ${test.jdk} * -target nsk.share.aod.TargetApplicationWaitingAgents - * "-javaOpts=-XX:+UsePerfData -XX:+EnableDynamicAgentLoading ${test.vm.opts} ${test.java.opts}" + * -javaOpts="-XX:+UsePerfData -XX:+EnableDynamicAgentLoading ${test.vm.opts} ${test.java.opts}" * -na attach050Agent00 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassPrepare/classprep001/classprep001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassPrepare/classprep001/classprep001.cpp index 05b8f725ad6..1ba9050225b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassPrepare/classprep001/classprep001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassPrepare/classprep001/classprep001.cpp @@ -60,7 +60,7 @@ static size_t eventsCount = 0; static size_t eventsExpected = 0; static class_info classes[] = { { "Lnsk/jvmti/ClassPrepare/classprep001$TestInterface;", EXP_STATUS, 2, 1, 0 }, - { "Lnsk/jvmti/ClassPrepare/classprep001$TestClass;", EXP_STATUS, 3, 2, 1 } + { "Lnsk/jvmti/ClassPrepare/classprep001$TestClass;", EXP_STATUS, 3, 2, 2 } }; void printStatus(jint status) { diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DataDumpRequest/datadumpreq001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DataDumpRequest/datadumpreq001/TestDescription.java index 122cf35da84..0bba63c2bbf 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DataDumpRequest/datadumpreq001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DataDumpRequest/datadumpreq001/TestDescription.java @@ -50,10 +50,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.DataDumpRequest.datadumpreq001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:datadumpreq001=-waittime=5 -verbose=" + * @build nsk.jvmti.DataDumpRequest.datadumpreq001 + * @run main/othervm/native + * -agentlib:datadumpreq001=-waittime=5,-verbose= * nsk.jvmti.DataDumpRequest.datadumpreq001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc001/TestDescription.java index 0a1f8a0121a..569d4f5c102 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc001/TestDescription.java @@ -43,10 +43,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.ForceGarbageCollection.forcegc001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:forcegc001=-waittime=5 objects=100" + * @build nsk.jvmti.ForceGarbageCollection.forcegc001 + * @run main/othervm/native + * -agentlib:forcegc001=-waittime=5,objects=100 * nsk.jvmti.ForceGarbageCollection.forcegc001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc002/TestDescription.java index 3373997e2aa..5a9f52c0864 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc002/TestDescription.java @@ -41,10 +41,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.ForceGarbageCollection.forcegc002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:forcegc002=-waittime=5 objects=100" + * @build nsk.jvmti.ForceGarbageCollection.forcegc002 + * @run main/othervm/native + * -agentlib:forcegc002=-waittime=5,objects=100 * nsk.jvmti.ForceGarbageCollection.forcegc002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/TestDescription.java index bfcf1307de8..0b7e1d2a89e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/TestDescription.java @@ -73,10 +73,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.GetCurrentThreadCpuTime.curthrcputime001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:curthrcputime001=-waittime=5 iterations=1000" + * @build nsk.jvmti.GetCurrentThreadCpuTime.curthrcputime001 + * @run main/othervm/native + * -agentlib:curthrcputime001=-waittime=5,iterations=1000 * nsk.jvmti.GetCurrentThreadCpuTime.curthrcputime001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetImplementedInterfaces/getintrf007/getintrf007.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetImplementedInterfaces/getintrf007/getintrf007.cpp index da6fb2acbc4..2a6845a993d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetImplementedInterfaces/getintrf007/getintrf007.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetImplementedInterfaces/getintrf007/getintrf007.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -67,15 +67,19 @@ static iface_info i9[] = { { "Lnsk/jvmti/GetImplementedInterfaces/OuterInterface2;" } }; +static iface_info jlio[] = { + { "Ljava/lang/IdentityObject;" } +}; + static class_info classes[] = { - { "InnerClass1", 0, NULL }, + { "InnerClass1", 1, jlio }, { "InnerInterface1", 0, NULL }, { "InnerInterface2", 1, i2 }, - { "InnerClass2", 1, i3 }, - { "OuterClass1", 0, NULL }, + { "InnerClass2", 2, i3 }, + { "OuterClass1", 1, jlio }, { "OuterClass2", 0, NULL }, { "OuterInterface1", 0, NULL }, - { "OuterClass3", 1, i7 }, + { "OuterClass3", 2, i7 }, { "OuterInterface2", 1, i8 }, { "OuterClass4", 1, i9 }, { "OuterClass5", 0, NULL } @@ -155,9 +159,11 @@ Java_nsk_jvmti_GetImplementedInterfaces_getintrf007_check(JNIEnv *env, jclass cl } if ((j < classes[i].icount) && (sig == NULL || strcmp(sig, classes[i].ifaces[j].sig) != 0)) { - printf("(%d:%d) wrong interface: \"%s\"", i, j, sig); - printf(", expected: \"%s\"\n", classes[i].ifaces[j].sig); - result = STATUS_FAILED; + if (strcmp(sig, "Ljava/lang/IdentityObject;") != 0) { + printf("(%d:%d) wrong interface: \"%s\"", i, j, sig); + printf(", expected: \"%s\"\n", classes[i].ifaces[j].sig); + result = STATUS_FAILED; + } } } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectsWithTags/objwithtags001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectsWithTags/objwithtags001/TestDescription.java index 0986f86fd85..f4d58e3c74b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectsWithTags/objwithtags001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectsWithTags/objwithtags001/TestDescription.java @@ -40,10 +40,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.GetObjectsWithTags.objwithtags001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:objwithtags001=-waittime=5 tags=4 objects=5" + * @build nsk.jvmti.GetObjectsWithTags.objwithtags001 + * @run main/othervm/native + * -agentlib:objwithtags001=-waittime=5,tags=4,objects=5 * nsk.jvmti.GetObjectsWithTags.objwithtags001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/TestDescription.java index 3091473d2bc..86fd0f4e69d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/TestDescription.java @@ -39,12 +39,11 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.GetSystemProperties.getsysprops002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @build nsk.jvmti.GetSystemProperties.getsysprops002 + * @run main/othervm/native * -agentlib:getsysprops002=-waittime=5 - * "-Dnsk.jvmti.test.property=value of nsk.jvmti.test.property" - * "-Dnsk.jvmti.test.property.empty=" + * -Dnsk.jvmti.test.property=value_of_nsk.jvmti.test.property + * -Dnsk.jvmti.test.property.empty= * nsk.jvmti.GetSystemProperties.getsysprops002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/getsysprops002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/getsysprops002.cpp index c7498ba1bf2..a48128e2bc6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/getsysprops002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/getsysprops002.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -42,7 +42,7 @@ typedef struct PropertyDescStruct { } PropertyDesc; static PropertyDesc propDescList[PROPERTIES_COUNT] = { - { "nsk.jvmti.test.property", "value of nsk.jvmti.test.property", 0 }, + { "nsk.jvmti.test.property", "value_of_nsk.jvmti.test.property", 0 }, { "nsk.jvmti.test.property.empty", "", 0 } }; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/TestDescription.java index d2ea64f44fa..71a66070f98 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/TestDescription.java @@ -39,12 +39,11 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.GetSystemProperty.getsysprop002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @build nsk.jvmti.GetSystemProperty.getsysprop002 + * @run main/othervm/native * -agentlib:getsysprop002=-waittime=5 - * "-Dnsk.jvmti.test.property=value of nsk.jvmti.test.property" - * "-Dnsk.jvmti.test.property.empty=" + * -Dnsk.jvmti.test.property=value_of_nsk.jvmti.test.property + * -Dnsk.jvmti.test.property.empty= * nsk.jvmti.GetSystemProperty.getsysprop002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/getsysprop002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/getsysprop002.cpp index f1db5b53870..a9704eed75b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/getsysprop002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/getsysprop002.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -41,7 +41,7 @@ typedef struct PropertyDescStruct { } PropertyDesc; static PropertyDesc propDescList[PROPERTIES_COUNT] = { - { "nsk.jvmti.test.property", "value of nsk.jvmti.test.property" }, + { "nsk.jvmti.test.property", "value_of_nsk.jvmti.test.property" }, { "nsk.jvmti.test.property.empty", "" } }; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/TestDescription.java index b504f2cd392..cf0fe3e5d2d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/TestDescription.java @@ -73,10 +73,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.GetThreadCpuTime.thrcputime001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:thrcputime001=-waittime=5 iterations=1000" + * @build nsk.jvmti.GetThreadCpuTime.thrcputime001 + * @run main/othervm/native + * -agentlib:thrcputime001=-waittime=5,iterations=1000 * nsk.jvmti.GetThreadCpuTime.thrcputime001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/TestDescription.java index 96b7b31284d..dc0b40f4f85 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/TestDescription.java @@ -75,10 +75,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.GetThreadCpuTime.thrcputime002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:thrcputime002=-waittime=5 iterations=1000" + * @build nsk.jvmti.GetThreadCpuTime.thrcputime002 + * @run main/othervm/native + * -agentlib:thrcputime002=-waittime=5,iterations=1000 * nsk.jvmti.GetThreadCpuTime.thrcputime002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadGroupChildren/getthrdgrpchld001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadGroupChildren/getthrdgrpchld001/TestDescription.java index 9ffc7b30547..42964c19a07 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadGroupChildren/getthrdgrpchld001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadGroupChildren/getthrdgrpchld001/TestDescription.java @@ -43,10 +43,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.GetThreadGroupChildren.getthrdgrpchld001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:getthrdgrpchld001=-waittime=5 threads=10" + * @build nsk.jvmti.GetThreadGroupChildren.getthrdgrpchld001 + * @run main/othervm/native + * -agentlib:getthrdgrpchld001=-waittime=5,threads=10 * nsk.jvmti.GetThreadGroupChildren.getthrdgrpchld001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap001/TestDescription.java index d76527476b8..73901fa11b9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap001/TestDescription.java @@ -58,10 +58,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverHeap.iterheap001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterheap001=-waittime=5 objects=4" + * @build nsk.jvmti.IterateOverHeap.iterheap001 + * @run main/othervm/native + * -agentlib:iterheap001=-waittime=5,objects=4 * nsk.jvmti.IterateOverHeap.iterheap001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap002/TestDescription.java index 37ede6f51aa..403e9bc9b33 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap002/TestDescription.java @@ -58,10 +58,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverHeap.iterheap002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterheap002=-waittime=5 objects=4" + * @build nsk.jvmti.IterateOverHeap.iterheap002 + * @run main/othervm/native + * -agentlib:iterheap002=-waittime=5,objects=4 * nsk.jvmti.IterateOverHeap.iterheap002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap003/TestDescription.java index 07b40282758..2f89b22037d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap003/TestDescription.java @@ -58,10 +58,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverHeap.iterheap003 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterheap003=-waittime=5 objects=4" + * @build nsk.jvmti.IterateOverHeap.iterheap003 + * @run main/othervm/native + * -agentlib:iterheap003=-waittime=5,objects=4 * nsk.jvmti.IterateOverHeap.iterheap003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap004/TestDescription.java index 4e6c97fef14..b780b1c8a66 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap004/TestDescription.java @@ -48,10 +48,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverHeap.iterheap004 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterheap004=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverHeap.iterheap004 + * @run main/othervm/native + * -agentlib:iterheap004=-waittime=5,-verbose * nsk.jvmti.IterateOverHeap.iterheap004 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap005/TestDescription.java index 01caf4ab434..3aff3ec1e68 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap005/TestDescription.java @@ -52,10 +52,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverHeap.iterheap005 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterheap005=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverHeap.iterheap005 + * @run main/othervm/native + * -agentlib:iterheap005=-waittime=5,-verbose * nsk.jvmti.IterateOverHeap.iterheap005 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap006/TestDescription.java index db703771b12..732b03fd0b4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap006/TestDescription.java @@ -46,10 +46,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverHeap.iterheap006 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterheap006=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverHeap.iterheap006 + * @run main/othervm/native + * -agentlib:iterheap006=-waittime=5,-verbose * nsk.jvmti.IterateOverHeap.iterheap006 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap007/TestDescription.java index 1c8e99d2db0..d498aee3b79 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap007/TestDescription.java @@ -50,10 +50,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverHeap.iterheap007 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterheap007=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverHeap.iterheap007 + * @run main/othervm/native + * -agentlib:iterheap007=-waittime=5,-verbose * nsk.jvmti.IterateOverHeap.iterheap007 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls001/TestDescription.java index 417b92396e4..07aaad942a3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls001/TestDescription.java @@ -58,10 +58,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterinstcls001=-waittime=5 objects=4" + * @build nsk.jvmti.IterateOverInstancesOfClass.iterinstcls001 + * @run main/othervm/native + * -agentlib:iterinstcls001=-waittime=5,objects=4 * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls002/TestDescription.java index fe4cc483bbb..cbe30aa47d3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls002/TestDescription.java @@ -58,10 +58,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterinstcls002=-waittime=5 objects=4" + * @build nsk.jvmti.IterateOverInstancesOfClass.iterinstcls002 + * @run main/othervm/native + * -agentlib:iterinstcls002=-waittime=5,objects=4 * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls003/TestDescription.java index a14b8ed3ab4..080d4754580 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls003/TestDescription.java @@ -58,10 +58,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls003 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterinstcls003=-waittime=5 objects=4" + * @build nsk.jvmti.IterateOverInstancesOfClass.iterinstcls003 + * @run main/othervm/native + * -agentlib:iterinstcls003=-waittime=5,objects=4 * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls004/TestDescription.java index 312d835c2ce..bd69273ef4e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls004/TestDescription.java @@ -46,10 +46,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls004 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterinstcls004=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverInstancesOfClass.iterinstcls004 + * @run main/othervm/native + * -agentlib:iterinstcls004=-waittime=5,-verbose * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls004 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls005/TestDescription.java index d05bca8b83d..0a7557f28be 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls005/TestDescription.java @@ -52,10 +52,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls005 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterinstcls005=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverInstancesOfClass.iterinstcls005 + * @run main/othervm/native + * -agentlib:iterinstcls005=-waittime=5,-verbose * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls005 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls006/TestDescription.java index aec316acea3..1d37c5d7518 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls006/TestDescription.java @@ -46,10 +46,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls006 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterinstcls006=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverInstancesOfClass.iterinstcls006 + * @run main/othervm/native + * -agentlib:iterinstcls006=-waittime=5,-verbose * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls006 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls007/TestDescription.java index 7978730bd92..95a374d924c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls007/TestDescription.java @@ -50,10 +50,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls007 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterinstcls007=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverInstancesOfClass.iterinstcls007 + * @run main/othervm/native + * -agentlib:iterinstcls007=-waittime=5,-verbose * nsk.jvmti.IterateOverInstancesOfClass.iterinstcls007 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj001/TestDescription.java index 3546ed1076a..11050a9d37e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj001/TestDescription.java @@ -54,10 +54,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterobjreachobj001=-waittime=5 objects=4" + * @build nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj001 + * @run main/othervm/native + * -agentlib:iterobjreachobj001=-waittime=5,objects=4 * nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj002/TestDescription.java index d1b5544015e..0cdd9ff7ce9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj002/TestDescription.java @@ -46,10 +46,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterobjreachobj002=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj002 + * @run main/othervm/native + * -agentlib:iterobjreachobj002=-waittime=5,-verbose * nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj003/TestDescription.java index b92e4e6b74b..4cd5293c886 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj003/TestDescription.java @@ -52,10 +52,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj003 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterobjreachobj003=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj003 + * @run main/othervm/native + * -agentlib:iterobjreachobj003=-waittime=5,-verbose * nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj004/TestDescription.java index 83a0bc5a3ef..66f1ab4ef2b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj004/TestDescription.java @@ -46,10 +46,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj004 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterobjreachobj004=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj004 + * @run main/othervm/native + * -agentlib:iterobjreachobj004=-waittime=5,-verbose * nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj004 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj005/TestDescription.java index 15c320f01eb..b5d25a9a6a5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj005/TestDescription.java @@ -50,10 +50,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj005 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterobjreachobj005=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj005 + * @run main/othervm/native + * -agentlib:iterobjreachobj005=-waittime=5,-verbose * nsk.jvmti.IterateOverObjectsReachableFromObject.iterobjreachobj005 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj001/TestDescription.java index 9c84a0e8829..205a062b30b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj001/TestDescription.java @@ -54,10 +54,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverReachableObjects.iterreachobj001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterreachobj001=-waittime=5 objects=4" + * @build nsk.jvmti.IterateOverReachableObjects.iterreachobj001 + * @run main/othervm/native + * -agentlib:iterreachobj001=-waittime=5,objects=4 * nsk.jvmti.IterateOverReachableObjects.iterreachobj001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj002/TestDescription.java index 55cee5b2ce0..b13adcbce52 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj002/TestDescription.java @@ -49,10 +49,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverReachableObjects.iterreachobj002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterreachobj002=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverReachableObjects.iterreachobj002 + * @run main/othervm/native + * -agentlib:iterreachobj002=-waittime=5,-verbose * nsk.jvmti.IterateOverReachableObjects.iterreachobj002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj003/TestDescription.java index ff603ea4528..dbca51daa70 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj003/TestDescription.java @@ -53,10 +53,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverReachableObjects.iterreachobj003 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterreachobj003=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverReachableObjects.iterreachobj003 + * @run main/othervm/native + * -agentlib:iterreachobj003=-waittime=5,-verbose * nsk.jvmti.IterateOverReachableObjects.iterreachobj003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj004/TestDescription.java index 2bee2d7b8e1..e6147b486d3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj004/TestDescription.java @@ -47,10 +47,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverReachableObjects.iterreachobj004 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterreachobj004=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverReachableObjects.iterreachobj004 + * @run main/othervm/native + * -agentlib:iterreachobj004=-waittime=5,-verbose * nsk.jvmti.IterateOverReachableObjects.iterreachobj004 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj005/TestDescription.java index 95e7739022a..141faab8070 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj005/TestDescription.java @@ -50,10 +50,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateOverReachableObjects.iterreachobj005 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:iterreachobj005=-waittime=5 -verbose" + * @build nsk.jvmti.IterateOverReachableObjects.iterreachobj005 + * @run main/othervm/native + * -agentlib:iterreachobj005=-waittime=5,-verbose * nsk.jvmti.IterateOverReachableObjects.iterreachobj005 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-class-tagged/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-class-tagged/TestDescription.java index cde3d1b2ea4..b60cf6f1417 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-class-tagged/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-class-tagged/TestDescription.java @@ -30,10 +30,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateThroughHeap.filter_tagged.HeapFilter - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:HeapFilter=-waittime=5 filter=JVMTI_HEAP_FILTER_CLASS_TAGGED" + * @build nsk.jvmti.IterateThroughHeap.filter_tagged.HeapFilter + * @run main/othervm/native + * -agentlib:HeapFilter=-waittime=5,filter=JVMTI_HEAP_FILTER_CLASS_TAGGED * nsk.jvmti.IterateThroughHeap.filter_tagged.HeapFilter */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-class-untagged/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-class-untagged/TestDescription.java index fabe4ad807a..011467670a5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-class-untagged/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-class-untagged/TestDescription.java @@ -30,10 +30,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateThroughHeap.filter_tagged.HeapFilter - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:HeapFilter=-waittime=5 filter=JVMTI_HEAP_FILTER_CLASS_UNTAGGED" + * @build nsk.jvmti.IterateThroughHeap.filter_tagged.HeapFilter + * @run main/othervm/native + * -agentlib:HeapFilter=-waittime=5,filter=JVMTI_HEAP_FILTER_CLASS_UNTAGGED * nsk.jvmti.IterateThroughHeap.filter_tagged.HeapFilter */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/TestDescription.java index 2b2ff52591f..ba11d0c7009 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/TestDescription.java @@ -62,10 +62,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateThroughHeap.filter_tagged.HeapFilter - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:HeapFilter=-waittime=5 filter=JVMTI_HEAP_FILTER_TAGGED" + * @build nsk.jvmti.IterateThroughHeap.filter_tagged.HeapFilter + * @run main/othervm/native + * -agentlib:HeapFilter=-waittime=5,filter=JVMTI_HEAP_FILTER_TAGGED * nsk.jvmti.IterateThroughHeap.filter_tagged.HeapFilter */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-untagged/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-untagged/TestDescription.java index 5cfa2a207e5..9cb079a7825 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-untagged/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-untagged/TestDescription.java @@ -30,10 +30,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.IterateThroughHeap.filter_tagged.HeapFilter - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:HeapFilter=-waittime=5 filter=JVMTI_HEAP_FILTER_UNTAGGED" + * @build nsk.jvmti.IterateThroughHeap.filter_tagged.HeapFilter + * @run main/othervm/native + * -agentlib:HeapFilter=-waittime=5,filter=JVMTI_HEAP_FILTER_UNTAGGED * nsk.jvmti.IterateThroughHeap.filter_tagged.HeapFilter */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst001/TestDescription.java index 231213b332b..ff8571a40cb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst001/TestDescription.java @@ -38,10 +38,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.ResumeThreadList.resumethrdlst001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:resumethrdlst001=-waittime=5 threads=10" + * @build nsk.jvmti.ResumeThreadList.resumethrdlst001 + * @run main/othervm/native + * -agentlib:resumethrdlst001=-waittime=5,threads=10 * nsk.jvmti.ResumeThreadList.resumethrdlst001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst002/TestDescription.java index b4d2b1cf190..a5fc69336bb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst002/TestDescription.java @@ -36,10 +36,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.ResumeThreadList.resumethrdlst002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:resumethrdlst002=-waittime=5 threads=10" + * @build nsk.jvmti.ResumeThreadList.resumethrdlst002 + * @run main/othervm/native + * -agentlib:resumethrdlst002=-waittime=5,threads=10 * nsk.jvmti.ResumeThreadList.resumethrdlst002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop002/TestDescription.java index 1adaef54853..a6431f216ec 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop002/TestDescription.java @@ -46,13 +46,11 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.SetSystemProperty.setsysprop002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @run main/othervm/native * -agentlib:setsysprop002=-waittime=5 - * "-Dnsk.jvmti.test.property=initial value of nsk.jvmti.test.property" - * "-Dnsk.jvmti.test.property.empty.old=" - * "-Dnsk.jvmti.test.property.empty.new=initial value of nsk.jvmti.test.property.empty.new" + * -Dnsk.jvmti.test.property=initial_value_of_nsk.jvmti.test.property + * -Dnsk.jvmti.test.property.empty.old= + * -Dnsk.jvmti.test.property.empty.new=initial_value_of_nsk.jvmti.test.property.empty.new * nsk.jvmti.SetSystemProperty.setsysprop002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop002/setsysprop002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop002/setsysprop002.cpp index f35489f2583..0026afe9461 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop002/setsysprop002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop002/setsysprop002.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -45,7 +45,7 @@ static PropertyDesc propDescList[PROPERTIES_COUNT] = { { "nsk.jvmti.test.property", { - "initial value of nsk.jvmti.test.property", + "initial_value_of_nsk.jvmti.test.property", "OnLoad phase value of nsk.jvmti.test.property", "live phase value of nsk.jvmti.test.property" } @@ -61,7 +61,7 @@ static PropertyDesc propDescList[PROPERTIES_COUNT] = { { "nsk.jvmti.test.property.empty.new", { - "initial value of nsk.jvmti.test.property.empty.new", + "initial_value_of_nsk.jvmti.test.property.empty.new", "", "live phase value of nsk.jvmti.test.property.empty.new" } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop003/TestDescription.java index 32dc862c55e..e4a1781a6bd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop003/TestDescription.java @@ -46,13 +46,11 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.SetSystemProperty.setsysprop003 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @run main/othervm/native * -agentlib:setsysprop003=-waittime=5 - * "-Dnsk.jvmti.test.property=initial value of nsk.jvmti.test.property" - * "-Dnsk.jvmti.test.property.empty.old=" - * "-Dnsk.jvmti.test.property.empty.new=initial value of nsk.jvmti.test.property.empty.new" + * -Dnsk.jvmti.test.property=initial_value_of_nsk.jvmti.test.property + * -Dnsk.jvmti.test.property.empty.old= + * -Dnsk.jvmti.test.property.empty.new=initial_value_of_nsk.jvmti.test.property.empty.new * nsk.jvmti.SetSystemProperty.setsysprop003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SuspendThreadList/suspendthrdlst001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SuspendThreadList/suspendthrdlst001/TestDescription.java index 0cf60ae8048..66a499aeb96 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SuspendThreadList/suspendthrdlst001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SuspendThreadList/suspendthrdlst001/TestDescription.java @@ -38,10 +38,8 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.SuspendThreadList.suspendthrdlst001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:suspendthrdlst001=-waittime=5 threads=10" + * @run main/othervm/native + * -agentlib:suspendthrdlst001=-waittime=5,threads=10 * nsk.jvmti.SuspendThreadList.suspendthrdlst001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SuspendThreadList/suspendthrdlst002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SuspendThreadList/suspendthrdlst002/TestDescription.java index df6ceb083f3..cd2049034f3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SuspendThreadList/suspendthrdlst002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SuspendThreadList/suspendthrdlst002/TestDescription.java @@ -36,10 +36,8 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.SuspendThreadList.suspendthrdlst002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:suspendthrdlst002=-waittime=5 threads=10" + * @run main/othervm/native + * -agentlib:suspendthrdlst002=-waittime=5,threads=10 * nsk.jvmti.SuspendThreadList.suspendthrdlst002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/TEST.properties b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/TEST.properties deleted file mode 100644 index 4d0e9794846..00000000000 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/TEST.properties +++ /dev/null @@ -1,2 +0,0 @@ -# disabled till JDK-8252003 is fixed -allowSmartActionArgs=false diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP02/ap02t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP02/ap02t001/TestDescription.java index e25cd42cb93..a4df8ac602c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP02/ap02t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP02/ap02t001/TestDescription.java @@ -40,10 +40,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.allocation.AP02.ap02t001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:ap02t001=-waittime=5 -verbose" + * @build nsk.jvmti.scenarios.allocation.AP02.ap02t001 + * @run main/othervm/native + * -agentlib:ap02t001=-waittime=5,-verbose * nsk.jvmti.scenarios.allocation.AP02.ap02t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP03/ap03t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP03/ap03t001/TestDescription.java index b25648afdb4..92110c2cdc3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP03/ap03t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP03/ap03t001/TestDescription.java @@ -49,10 +49,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.allocation.AP03.ap03t001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:ap03t001=-waittime=5 -verbose" + * @build nsk.jvmti.scenarios.allocation.AP03.ap03t001 + * @run main/othervm/native + * -agentlib:ap03t001=-waittime=5,-verbose * nsk.jvmti.scenarios.allocation.AP03.ap03t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t001/TestDescription.java index c27f441625d..a5cbab563bb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t001/TestDescription.java @@ -57,10 +57,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.allocation.AP04.ap04t001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:ap04t001=-waittime=5 -verbose" + * @build nsk.jvmti.scenarios.allocation.AP04.ap04t001 + * @run main/othervm/native + * -agentlib:ap04t001=-waittime=5,-verbose * nsk.jvmti.scenarios.allocation.AP04.ap04t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t002/TestDescription.java index a4a3291ffa0..6e77005577d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t002/TestDescription.java @@ -57,10 +57,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.allocation.AP04.ap04t002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:ap04t002=-waittime=5 -verbose" + * @build nsk.jvmti.scenarios.allocation.AP04.ap04t002 + * @run main/othervm/native + * -agentlib:ap04t002=-waittime=5,-verbose * nsk.jvmti.scenarios.allocation.AP04.ap04t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t003/TestDescription.java index d68833ea8b8..d05887bc157 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t003/TestDescription.java @@ -55,10 +55,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.allocation.AP04.ap04t003 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:ap04t003=-waittime=5 -verbose" + * @build nsk.jvmti.scenarios.allocation.AP04.ap04t003 + * @run main/othervm/native + * -agentlib:ap04t003=-waittime=5,-verbose * nsk.jvmti.scenarios.allocation.AP04.ap04t003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t002/TestDescription.java index 7303eba57bb..a5c6f706a07 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t002/TestDescription.java @@ -43,10 +43,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.allocation.AP07.ap07t002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:ap07t002=-waittime=5 -verbose" + * @build nsk.jvmti.scenarios.allocation.AP07.ap07t002 + * @run main/othervm/native + * -agentlib:ap07t002=-waittime=5,-verbose * nsk.jvmti.scenarios.allocation.AP07.ap07t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP09/ap09t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP09/ap09t001/TestDescription.java index 3dc83e2716f..3e21f1f7e4b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP09/ap09t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP09/ap09t001/TestDescription.java @@ -49,10 +49,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.allocation.AP09.ap09t001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:ap09t001=-waittime=5 -verbose" + * @build nsk.jvmti.scenarios.allocation.AP09.ap09t001 + * @run main/othervm/native + * -agentlib:ap09t001=-waittime=5,-verbose * nsk.jvmti.scenarios.allocation.AP09.ap09t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TestDescription.java index 7a2058965f5..e4830b82c86 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TestDescription.java @@ -38,10 +38,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.allocation.AP12.ap12t001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:ap12t001=-waittime=5 -verbose" + * @build nsk.jvmti.scenarios.allocation.AP12.ap12t001 + * @run main/othervm/native + * -agentlib:ap12t001=-waittime=5,-verbose * -XX:-UseGCOverheadLimit * nsk.jvmti.scenarios.allocation.AP12.ap12t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/TestDescription.java index 5fa8bbf1183..a57a2b3092d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/TestDescription.java @@ -55,8 +55,7 @@ * nsk.jvmti.scenarios.bcinstr.BI04.bi04t002a * * @comment compile newclassXX to bin/newclassXX - * @build ExecDriver - * @run driver PropertyResolvingWrapper ExecDriver --cmd + * @run driver ExecDriver --cmd * ${compile.jdk}/bin/javac * --patch-module java.base=${test.src}/newclass02/java.base * -d bin/newclass02 @@ -64,12 +63,12 @@ * --add-reads=java.base=ALL-UNNAMED * ${test.src}/newclass02/java.base/java/lang/Object.java * - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @run main/othervm/native * --add-reads=java.base=ALL-UNNAMED * -XX:+UnlockDiagnosticVMOptions * -XX:-CheckIntrinsics * -Xbootclasspath/a:${test.class.path} - * "-agentlib:bi04t002=pathToNewByteCode=./bin -waittime=5" + * -agentlib:bi04t002=pathToNewByteCode=./bin,-waittime=5 * nsk.jvmti.scenarios.bcinstr.BI04.bi04t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001/TestDescription.java index 1e715681909..e43069d7d8f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001/TestDescription.java @@ -55,9 +55,8 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:em01t001=classLoaderCount=100 -waittime=5" + * @run main/othervm/native + * -agentlib:em01t001=classLoaderCount=100,-waittime=5 * nsk.jvmti.scenarios.events.EM01.em01t001 * ./bin/loadclass */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t002/TestDescription.java index 1fb2384b4f1..44ee2780502 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t002/TestDescription.java @@ -55,9 +55,8 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:em01t002=classLoaderCount=100 -waittime=5" + * @run main/othervm/native + * -agentlib:em01t002=classLoaderCount=100,-waittime=5 * nsk.jvmti.scenarios.events.EM01.em01t002 * ./bin/loadclass */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM06/em06t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM06/em06t001/TestDescription.java index 497f146a72b..d508b680e83 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM06/em06t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM06/em06t001/TestDescription.java @@ -50,9 +50,8 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:em06t001=classLoaderCount=500 -waittime=5" + * @run main/othervm/native + * -agentlib:em06t001=classLoaderCount=500,-waittime=5 * nsk.jvmti.scenarios.events.EM06.em06t001 * ./bin/loadclass */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/TestDescription.java index 11a3251a950..797cfbc1310 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/TestDescription.java @@ -60,9 +60,8 @@ * @run driver nsk.share.ExtraClassesBuilder * loadclass * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:em07t002=attempts=2 -waittime=5" + * @run main/othervm/native + * -agentlib:em07t002=attempts=2,-waittime=5 * -XX:-UseGCOverheadLimit * nsk.jvmti.scenarios.events.EM07.em07t002 * ./bin/loadclass diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF04/gf04t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF04/gf04t001/TestDescription.java index dd8c807cdae..8882899ab84 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF04/gf04t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF04/gf04t001/TestDescription.java @@ -54,9 +54,9 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:gf04t001=-waittime=5 segment=./bin/newclass" + * @comment ExecDriver is used b/c main class isn't on source/class path + * @run main/othervm/native ExecDriver --java + * -agentlib:gf04t001=-waittime=5,segment=./bin/newclass * nsk.jvmti.scenarios.general_functions.GF04.gf04t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF06/gf06t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF06/gf06t001/TestDescription.java index 9c97eb34121..07ed6719b4b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF06/gf06t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF06/gf06t001/TestDescription.java @@ -50,10 +50,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.general_functions.GF06.gf06t001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:gf06t001=-waittime=5 -verbose" + * @build nsk.jvmti.scenarios.general_functions.GF06.gf06t001 + * @run main/othervm/native + * -agentlib:gf06t001=-waittime=5,-verbose * nsk.jvmti.scenarios.general_functions.GF06.gf06t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t.java index 422ddd38a9d..9f028153342 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 @@ -26,12 +26,17 @@ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import java.util.Arrays; +import java.util.stream.Collectors; + public class gf08t { public static void main(String[] args) throws Exception { String libName = args[0]; String className = args[1]; - String phrase = args[2]; - String verboseType = args[3]; + String verboseType = args[2]; + String phrase = Arrays.stream(args) + .skip(3) + .collect(Collectors.joining(" ")); OutputAnalyzer oa = ProcessTools.executeTestJvm( "-agentlib:" + libName + "=-waittime=5 setVerboseMode=yes", diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t001/TestDriver.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t001/TestDriver.java index 8053a904069..4b3dac65d46 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t001/TestDriver.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t001/TestDriver.java @@ -87,8 +87,8 @@ public static void main(String[] args) throws Exception { nsk.jvmti.scenarios.general_functions.GF08.gf08t.main(new String[] { "gf08t001", nsk.jvmti.scenarios.general_functions.GF08.gf08t001.class.getName(), - keyPhrase, - "gc"}); + "gc", + keyPhrase}); } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t002/TestDescription.java index 7d800c5beb8..84df306c3de 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t002/TestDescription.java @@ -51,14 +51,13 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.general_functions.GF08.gf08t002 + * @build nsk.jvmti.scenarios.general_functions.GF08.gf08t002 * nsk.jvmti.scenarios.general_functions.GF08.gf08t - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jvmti.scenarios.general_functions.GF08.gf08t * gf08t002 * nsk.jvmti.scenarios.general_functions.GF08.gf08t002 - * "class,load" * class + * class,load */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t003/TestDescription.java index 25956714a38..7934b964d1f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/general_functions/GF08/gf08t003/TestDescription.java @@ -51,14 +51,13 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.general_functions.GF08.gf08t003 + * @build nsk.jvmti.scenarios.general_functions.GF08.gf08t003 * nsk.jvmti.scenarios.general_functions.GF08.gf08t - * @run main/othervm/native PropertyResolvingWrapper + * @run main/othervm/native * nsk.jvmti.scenarios.general_functions.GF08.gf08t * gf08t003 * nsk.jvmti.scenarios.general_functions.GF08.gf08t003 - * "Registering JNI native method" * jni + * Registering JNI native method */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t001/TestDescription.java index eb15c9c9443..41ab2529411 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t001/TestDescription.java @@ -38,11 +38,10 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.hotswap.HS101.hs101t001 + * @build nsk.jvmti.scenarios.hotswap.HS101.hs101t001 * nsk.share.jvmti.ProfileCollector - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:HotSwap=-waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:HotSwap=-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS101.hs101t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t002/TestDescription.java index 7a88ee182b0..f056157c0ce 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t002/TestDescription.java @@ -38,11 +38,10 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.hotswap.HS101.hs101t002 + * @build nsk.jvmti.scenarios.hotswap.HS101.hs101t002 * nsk.share.jvmti.ProfileCollector - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:HotSwap=-waittime=5 package=nsk samples=100 mode=interpreted" + * @run main/othervm/native + * -agentlib:HotSwap=-waittime=5,package=nsk,samples=100,mode=interpreted * nsk.jvmti.scenarios.hotswap.HS101.hs101t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t003/TestDescription.java index 77368a46428..be66377ff25 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t003/TestDescription.java @@ -39,11 +39,10 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.hotswap.HS101.hs101t003 + * @build nsk.jvmti.scenarios.hotswap.HS101.hs101t003 * nsk.share.jvmti.ProfileCollector - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:HotSwap=-waittime=5 package=nsk samples=100 mode=mixed" + * @run main/othervm/native + * -agentlib:HotSwap=-waittime=5,package=nsk,samples=100,mode=mixed * nsk.jvmti.scenarios.hotswap.HS101.hs101t003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t004/TestDescription.java index a0485a42a5f..1299c9077ff 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t004/TestDescription.java @@ -38,12 +38,11 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.hotswap.HS101.hs101t004 + * @build nsk.jvmti.scenarios.hotswap.HS101.hs101t004 * nsk.share.jvmti.ProfileCollector - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @run main/othervm/native * -Xss2m - * "-agentlib:HotSwap=-waittime=5 package=nsk samples=100 mode=compiled bci=call" + * -agentlib:HotSwap=-waittime=5,package=nsk,samples=100,mode=compiled,bci=call * nsk.jvmti.scenarios.hotswap.HS101.hs101t004 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t005/TestDescription.java index 3699bdcb285..f2d12f0fc34 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t005/TestDescription.java @@ -38,12 +38,11 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.hotswap.HS101.hs101t005 + * @build nsk.jvmti.scenarios.hotswap.HS101.hs101t005 * nsk.share.jvmti.ProfileCollector - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @run main/othervm/native * -Xss2m - * "-agentlib:HotSwap=-waittime=5 package=nsk samples=100 mode=interpreted bci=call" + * -agentlib:HotSwap=-waittime=5,package=nsk,samples=100,mode=interpreted,bci=call * nsk.jvmti.scenarios.hotswap.HS101.hs101t005 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t006/TestDescription.java index 9810e828eb1..8da49f83a87 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t006/TestDescription.java @@ -39,12 +39,11 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.hotswap.HS101.hs101t006 + * @build nsk.jvmti.scenarios.hotswap.HS101.hs101t006 * nsk.share.jvmti.ProfileCollector - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @run main/othervm/native * -Xss2m - * "-agentlib:HotSwap=-waittime=5 package=nsk samples=100 mode=mixed bci=call" + * -agentlib:HotSwap=-waittime=5,package=nsk,samples=100,mode=mixed,bci=call * nsk.jvmti.scenarios.hotswap.HS101.hs101t006 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t007/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t007/TestDescription.java index 53fb6397aa1..d73d4861a76 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t007/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t007/TestDescription.java @@ -37,11 +37,10 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.hotswap.HS101.hs101t007 + * @build nsk.jvmti.scenarios.hotswap.HS101.hs101t007 * nsk.share.jvmti.ProfileCollector - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:HotSwap=-waittime=5 package=nsk sync=1000 mode=compiled bci=alloc" + * @run main/othervm/native + * -agentlib:HotSwap=-waittime=5,package=nsk,sync=1000,mode=compiled,bci=alloc * nsk.jvmti.scenarios.hotswap.HS101.hs101t007 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t008/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t008/TestDescription.java index f5f074b1d0d..e87c3ec65bc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t008/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS101/hs101t008/TestDescription.java @@ -37,11 +37,10 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.hotswap.HS101.hs101t008 + * @build nsk.jvmti.scenarios.hotswap.HS101.hs101t008 * nsk.share.jvmti.ProfileCollector - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:HotSwap=-waittime=5 package=nsk sync=100 mode=interpreted bci=alloc" + * @run main/othervm/native + * -agentlib:HotSwap=-waittime=5,package=nsk,sync=100,mode=interpreted,bci=alloc * nsk.jvmti.scenarios.hotswap.HS101.hs101t008 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t001/TestDescription.java index 469847d4763..320c355d1b9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t001/TestDescription.java @@ -38,11 +38,10 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.hotswap.HS102.hs102t001 + * @build nsk.jvmti.scenarios.hotswap.HS102.hs102t001 * nsk.share.jvmti.ProfileCollector - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:HotSwap=-waittime=5 package=java/lang samples=10 mode=compiled" + * @run main/othervm/native + * -agentlib:HotSwap=-waittime=5,package=java/lang,samples=10,mode=compiled * nsk.jvmti.scenarios.hotswap.HS102.hs102t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t002/TestDescription.java index 84c60be249c..3fd642789f3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t002/TestDescription.java @@ -40,11 +40,10 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.hotswap.HS102.hs102t002 + * @build nsk.jvmti.scenarios.hotswap.HS102.hs102t002 * nsk.share.jvmti.ProfileCollector - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:HotSwap=-waittime=5 package=java/lang samples=10 mode=mixed" + * @run main/othervm/native + * -agentlib:HotSwap=-waittime=5,package=java/lang,samples=10,mode=mixed * nsk.jvmti.scenarios.hotswap.HS102.hs102t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS103/hs103t002/hs103t002.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS103/hs103t002/hs103t002.java index 5202dae476f..a4cedab3980 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS103/hs103t002/hs103t002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS103/hs103t002/hs103t002.java @@ -39,9 +39,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs103t002=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs103t002=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS103.hs103t002.hs103t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS104/hs104t001/hs104t001.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS104/hs104t001/hs104t001.java index 87f153511ec..738dd920123 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS104/hs104t001/hs104t001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS104/hs104t001/hs104t001.java @@ -39,9 +39,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs104t001=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs104t001=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS104.hs104t001.hs104t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t001/TestDescription.java index 65fcb41bea5..dfd8fa73afc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t001/TestDescription.java @@ -70,9 +70,8 @@ * -g:lines,source,vars * newclass02 newclass03 newclass newclass01 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs201t001=pathToNewByteCode=./bin -waittime=5" + * @run main/othervm/native + * -agentlib:hs201t001=pathToNewByteCode=./bin,-waittime=5 * nsk.jvmti.scenarios.hotswap.HS201.hs201t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t002/TestDescription.java index 0a395c68316..e716d1b836c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t002/TestDescription.java @@ -70,9 +70,8 @@ * -g:lines,source,vars * newclass * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs201t002=pathToNewByteCode=./bin -waittime=5" + * @run main/othervm/native + * -agentlib:hs201t002=pathToNewByteCode=./bin,-waittime=5 * nsk.jvmti.scenarios.hotswap.HS201.hs201t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t001/hs202t001.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t001/hs202t001.java index 0f88038028a..c386a88dc12 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t001/hs202t001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t001/hs202t001.java @@ -43,9 +43,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs202t001=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs202t001=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS202.hs202t001.hs202t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t002/hs202t002.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t002/hs202t002.java index d77ddd75d9a..e78702cc587 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t002/hs202t002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t002/hs202t002.java @@ -43,9 +43,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs202t002=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs202t002=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS202.hs202t002.hs202t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t001/hs203t001.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t001/hs203t001.java index 046f7c7e038..abbe8221444 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t001/hs203t001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t001/hs203t001.java @@ -44,9 +44,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs203t001=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs203t001=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS203.hs203t001.hs203t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t002/hs203t002.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t002/hs203t002.java index bf450873901..f872a6dcba3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t002/hs203t002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t002/hs203t002.java @@ -48,9 +48,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs203t002=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs203t002=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS203.hs203t002.hs203t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t003/hs203t003.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t003/hs203t003.java index cc5cbb01a12..348dc8b5ee4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t003/hs203t003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t003/hs203t003.java @@ -47,9 +47,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs203t003=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs203t003=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS203.hs203t003.hs203t003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t004/hs203t004.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t004/hs203t004.java index 9d69fe1b783..a45491cca6d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t004/hs203t004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t004/hs203t004.java @@ -45,13 +45,12 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @run main/othervm/native * -XX:-Inline * -XX:CompileThreshold=900 * -Xbatch * -XX:-TieredCompilation - * "-agentlib:hs203t004=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * -agentlib:hs203t004=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS203.hs203t004.hs203t004 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.java index e14618274ce..19070997a6f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.java @@ -45,15 +45,14 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.hotswap.HS204.hs204t001.hs204t001 + * @build nsk.jvmti.scenarios.hotswap.HS204.hs204t001.hs204t001 * * @comment compile newclassXX to bin/newclassXX * @run driver nsk.share.ExtraClassesBuilder * newclass02 newclass03 newclass01 newclass00 * - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs204t001=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs204t001=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS204.hs204t001.hs204t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t002/hs204t002.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t002/hs204t002.java index 897c6434ddc..452586982f8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t002/hs204t002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t002/hs204t002.java @@ -42,9 +42,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs204t002=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs204t002=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS204.hs204t002.hs204t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t003/hs204t003.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t003/hs204t003.java index 3651614b27a..b0f716794dc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t003/hs204t003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t003/hs204t003.java @@ -53,9 +53,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs204t003=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs204t003=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS204.hs204t003.hs204t003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t004/hs204t004.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t004/hs204t004.java index 962a1a26697..e06eceeb425 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t004/hs204t004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t004/hs204t004.java @@ -44,9 +44,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs204t004=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs204t004=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS204.hs204t004.hs204t004 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t001/hs301t001.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t001/hs301t001.java index 66c55e1eb9d..1422d5802ea 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t001/hs301t001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t001/hs301t001.java @@ -55,9 +55,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs301t001=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs301t001=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS301.hs301t001.hs301t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t002/hs301t002.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t002/hs301t002.java index a07081ee03e..75a41824646 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t002/hs301t002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t002/hs301t002.java @@ -44,9 +44,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs301t002=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs301t002=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS301.hs301t002.hs301t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t003/hs301t003.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t003/hs301t003.java index d5bd44b0c90..7d712388ede 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t003/hs301t003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t003/hs301t003.java @@ -45,9 +45,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs301t003=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs301t003=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS301.hs301t003.hs301t003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t004/hs301t004.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t004/hs301t004.java index 93f673a5fef..668b90139c9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t004/hs301t004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t004/hs301t004.java @@ -42,9 +42,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs301t004=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs301t004=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS301.hs301t004.hs301t004 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t005/hs301t005.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t005/hs301t005.java index 2866849389c..431f9e1c76e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t005/hs301t005.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t005/hs301t005.java @@ -35,10 +35,9 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java + * @run main/othervm/native * -DLocation=./bin/loadclass - * "-agentlib:hs301t005=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * -agentlib:hs301t005=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS301.hs301t005.hs301t005 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t001/hs302t001.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t001/hs302t001.java index f8f3b82b2a8..b9ea0d9f3ed 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t001/hs302t001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t001/hs302t001.java @@ -35,9 +35,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs302t001=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs302t001=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS302.hs302t001.hs302t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t002/hs302t002.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t002/hs302t002.java index 6e6cb121d0b..4a13fbc250c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t002/hs302t002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t002/hs302t002.java @@ -35,9 +35,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs302t002=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs302t002=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS302.hs302t002.hs302t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t003/hs302t003.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t003/hs302t003.java index 1ee6d860e4d..6cf32485818 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t003/hs302t003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t003/hs302t003.java @@ -35,9 +35,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs302t003=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs302t003=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS302.hs302t003.hs302t003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t004/hs302t004.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t004/hs302t004.java index c1c168e2d42..ed8ec89ecf2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t004/hs302t004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t004/hs302t004.java @@ -35,9 +35,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs302t004=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs302t004=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS302.hs302t004.hs302t004 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t005/hs302t005.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t005/hs302t005.java index cc419a7d5ea..e78e87992bd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t005/hs302t005.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t005/hs302t005.java @@ -35,9 +35,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs302t005=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs302t005=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS302.hs302t005.hs302t005 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t006/hs302t006.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t006/hs302t006.java index 77cbfa86b58..d4320dc9e8e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t006/hs302t006.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t006/hs302t006.java @@ -35,9 +35,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs302t006=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs302t006=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS302.hs302t006.hs302t006 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t007/hs302t007.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t007/hs302t007.java index f98886e2b1d..1c9c2924915 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t007/hs302t007.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t007/hs302t007.java @@ -35,9 +35,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs302t007=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs302t007=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS302.hs302t007.hs302t007 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t008/hs302t008.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t008/hs302t008.java index 8e1398f76e8..e7d0323dcc8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t008/hs302t008.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t008/hs302t008.java @@ -35,9 +35,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs302t008=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs302t008=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS302.hs302t008.hs302t008 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t009/hs302t009.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t009/hs302t009.java index b570e5b86de..e9cdbdc4eed 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t009/hs302t009.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t009/hs302t009.java @@ -35,9 +35,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs302t009=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs302t009=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS302.hs302t009.hs302t009 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t010/hs302t010.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t010/hs302t010.java index 0b8296e5ef1..0d7be9b1d80 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t010/hs302t010.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t010/hs302t010.java @@ -35,9 +35,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs302t010=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs302t010=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS302.hs302t010.hs302t010 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t011/hs302t011.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t011/hs302t011.java index 0a8a08acef2..442e86b9bd7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t011/hs302t011.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t011/hs302t011.java @@ -35,9 +35,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs302t011=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs302t011=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS302.hs302t011.hs302t011 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t012/hs302t012.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t012/hs302t012.java index 40995119046..96295e50b56 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t012/hs302t012.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t012/hs302t012.java @@ -35,9 +35,8 @@ * @run driver nsk.share.ExtraClassesBuilder * newclass00 * - * @build ExecDriver - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:hs302t012=pathToNewByteCode=./bin -waittime=5 package=nsk samples=100 mode=compiled" + * @run main/othervm/native + * -agentlib:hs302t012=pathToNewByteCode=./bin,-waittime=5,package=nsk,samples=100,mode=compiled * nsk.jvmti.scenarios.hotswap.HS302.hs302t012.hs302t012 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA01/ma01t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA01/ma01t001/TestDescription.java index abc1a0ffd8f..76474c4457e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA01/ma01t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA01/ma01t001/TestDescription.java @@ -39,11 +39,10 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.multienv.MA01.ma01t001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:ma01t001=opt1=opt1 -waittime=5" - * "-agentlib:ma01t001a=opt2=opt2 -waittime=5" + * @build nsk.jvmti.scenarios.multienv.MA01.ma01t001 + * @run main/othervm/native + * -agentlib:ma01t001=opt1=opt1,-waittime=5 + * -agentlib:ma01t001a=opt2=opt2,-waittime=5 * nsk.jvmti.scenarios.multienv.MA01.ma01t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t001/TestDescription.java index f042c2c988c..e3d786aeeec 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t001/TestDescription.java @@ -56,10 +56,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.sampling.SP03.sp03t001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:sp03t001=-waittime=5 threads=10" + * @build nsk.jvmti.scenarios.sampling.SP03.sp03t001 + * @run main/othervm/native + * -agentlib:sp03t001=-waittime=5,threads=10 * nsk.jvmti.scenarios.sampling.SP03.sp03t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t002/TestDescription.java index bffe8e73f54..d2a7c5fbca6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t002/TestDescription.java @@ -56,10 +56,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.sampling.SP03.sp03t002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:sp03t002=-waittime=5 threads=10" + * @build nsk.jvmti.scenarios.sampling.SP03.sp03t002 + * @run main/othervm/native + * -agentlib:sp03t002=-waittime=5,threads=10 * nsk.jvmti.scenarios.sampling.SP03.sp03t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t001/TestDescription.java index a40fc00fb7e..5ae4e7011c7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t001/TestDescription.java @@ -56,10 +56,8 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.sampling.SP04.sp04t001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:sp04t001=-waittime=5 threads=10" + * @run main/othervm/native + * -agentlib:sp04t001=-waittime=5,threads=10 * nsk.jvmti.scenarios.sampling.SP04.sp04t001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t002/TestDescription.java index 41efef29d2f..fe60f95cdb3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t002/TestDescription.java @@ -56,10 +56,8 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.scenarios.sampling.SP04.sp04t002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:sp04t002=-waittime=5 threads=10" + * @run main/othervm/native + * -agentlib:sp04t002=-waittime=5,threads=10 * nsk.jvmti.scenarios.sampling.SP04.sp04t002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref001/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref001/TestDescription.java index 38eaa4f4195..fa03b5fe268 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref001/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref001/TestDescription.java @@ -54,10 +54,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.unit.FollowReferences.followref001 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:followref001=-waittime=5 -verbose objects=3" + * @build nsk.jvmti.unit.FollowReferences.followref001 + * @run main/othervm/native + * -agentlib:followref001=-waittime=5,-verbose,objects=3 * nsk.jvmti.unit.FollowReferences.followref001 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref002/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref002/TestDescription.java index b245d26a94f..086a892ac6c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref002/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref002/TestDescription.java @@ -55,10 +55,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.unit.FollowReferences.followref002 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:followref002=-waittime=5 -verbose objects=3" + * @build nsk.jvmti.unit.FollowReferences.followref002 + * @run main/othervm/native + * -agentlib:followref002=-waittime=5,-verbose,objects=3 * nsk.jvmti.unit.FollowReferences.followref002 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref003/TestDescription.java index 06552bef682..a1a7dcfa333 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref003/TestDescription.java @@ -56,10 +56,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.unit.FollowReferences.followref003 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:followref003=-waittime=5 -verbose objects=3" + * @build nsk.jvmti.unit.FollowReferences.followref003 + * @run main/othervm/native + * -agentlib:followref003=-waittime=5,-verbose,objects=3 * nsk.jvmti.unit.FollowReferences.followref003 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref004/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref004/TestDescription.java index 2d2e0c6d91b..e595c4ff124 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref004/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref004/TestDescription.java @@ -41,10 +41,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.unit.FollowReferences.followref004 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:followref004=-waittime=5 -verbose" + * @build nsk.jvmti.unit.FollowReferences.followref004 + * @run main/othervm/native + * -agentlib:followref004=-waittime=5,-verbose * nsk.jvmti.unit.FollowReferences.followref004 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref005/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref005/TestDescription.java index 15ba4489d2b..c4fa08806b8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref005/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref005/TestDescription.java @@ -37,10 +37,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.unit.FollowReferences.followref005 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:followref005=-waittime=5 -verbose" + * @build nsk.jvmti.unit.FollowReferences.followref005 + * @run main/othervm/native + * -agentlib:followref005=-waittime=5,-verbose * nsk.jvmti.unit.FollowReferences.followref005 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref006/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref006/TestDescription.java index 6730c8b4aba..03955ad0b01 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref006/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref006/TestDescription.java @@ -44,10 +44,9 @@ * * @library /vmTestbase * /test/lib - * @build ExecDriver - * nsk.jvmti.unit.FollowReferences.followref006 - * @run main/othervm/native PropertyResolvingWrapper ExecDriver --java - * "-agentlib:followref006=-waittime=5 -verbose" + * @build nsk.jvmti.unit.FollowReferences.followref006 + * @run main/othervm/native + * -agentlib:followref006=-waittime=5,-verbose * nsk.jvmti.unit.FollowReferences.followref006 */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/aod/AODRunnerArgParser.java b/test/hotspot/jtreg/vmTestbase/nsk/share/aod/AODRunnerArgParser.java index e6a961dc08d..b5cc96055d6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/aod/AODRunnerArgParser.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/aod/AODRunnerArgParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -20,33 +20,28 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package nsk.share.aod; - -import nsk.share.*; -import java.util.*; - -public class AODRunnerArgParser extends ArgumentParser { - public static final String jarAgentParam = "ja"; - - public static final String nativeAgentParam = "na"; - - public static final String targetAppParam = "target"; - - public static final String javaOptsParam = "javaOpts"; +package nsk.share.aod; - public static final String testedJdkParam = "jdk"; +import nsk.share.ArgumentParser; +import nsk.share.TestBug; - private static List<String> supportedOptions; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; - static { - supportedOptions = new ArrayList<String>(); - supportedOptions.add(jarAgentParam); - supportedOptions.add(nativeAgentParam); - supportedOptions.add(targetAppParam); - supportedOptions.add(javaOptsParam); - supportedOptions.add(testedJdkParam); - } +public class AODRunnerArgParser extends ArgumentParser { + private static final String JAR_AGENT_PARAM = "ja"; + private static final String NATIVE_AGENT_PARAM = "na"; + private static final String TARGET_APP_PARAM = "target"; + private static final String JAVA_OPTS_PARAM = "javaOpts"; + private static final String TESTED_JDK_PARAM = "jdk"; + private static final Set<String> SUPPORTED_OPTIONS = Set.of( + JAR_AGENT_PARAM, + NATIVE_AGENT_PARAM, + TARGET_APP_PARAM, + JAVA_OPTS_PARAM, + TESTED_JDK_PARAM); private List<AgentInformation> agents; @@ -55,17 +50,19 @@ public AODRunnerArgParser(String[] args) { } protected boolean checkOption(String option, String value) { - if (super.checkOption(option, value)) + if (super.checkOption(option, value)) { return true; + } - if (!supportedOptions.contains(option)) + if (!SUPPORTED_OPTIONS.contains(option)) { return false; + } - if (option.equals(jarAgentParam)) { + if (option.equals(JAR_AGENT_PARAM)) { addAgentInfo(true, value); } - if (option.equals(nativeAgentParam)) { + if (option.equals(NATIVE_AGENT_PARAM)) { addAgentInfo(false, value); } @@ -74,21 +71,22 @@ protected boolean checkOption(String option, String value) { protected void checkOptions() { if (agents == null) { - agents = new ArrayList<AgentInformation>(); + agents = new ArrayList<>(); } } private void addAgentInfo(boolean jarAgent, String unsplittedAgentsString) { if (agents == null) { - agents = new ArrayList<AgentInformation>(); + agents = new ArrayList<>(); } - String agentStrings[]; + String[] agentStrings; - if (unsplittedAgentsString.contains(",")) + if (unsplittedAgentsString.contains(",")) { agentStrings = unsplittedAgentsString.split(","); - else - agentStrings = new String[]{unsplittedAgentsString}; + } else { + agentStrings = new String[]{ unsplittedAgentsString }; + } for (String agentString : agentStrings) { int index = agentString.indexOf('='); @@ -104,21 +102,27 @@ private void addAgentInfo(boolean jarAgent, String unsplittedAgentsString) { } public String getTargetApp() { - if (!options.containsKey(targetAppParam)) + if (!options.containsKey(TARGET_APP_PARAM)) { throw new TestBug("Target application isn't specified"); + } - return options.getProperty(targetAppParam); + return options.getProperty(TARGET_APP_PARAM); } public String getTestedJDK() { - if (!options.containsKey(testedJdkParam)) + if (!options.containsKey(TESTED_JDK_PARAM)) { throw new TestBug("Tested JDK isn't specified"); + } - return options.getProperty(testedJdkParam); + return options.getProperty(TESTED_JDK_PARAM); } public String getJavaOpts() { - return options.getProperty(javaOptsParam, ""); + var value = options.getProperty(JAVA_OPTS_PARAM, ""); + if (value.length() > 1 && value.startsWith("\"") && value.endsWith("\"")) { + value = value.substring(1, value.length() - 1); + } + return value.trim(); } public List<AgentInformation> getAgents() { diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/JdbArgumentHandler.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/JdbArgumentHandler.java index dee6152777b..40643308eed 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/JdbArgumentHandler.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/JdbArgumentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -181,7 +181,11 @@ public String getJdbExecPath() { * Returns command line options <code>jdb</code> was launched with. */ public String getJdbOptions() { - return options.getProperty("jdb.option", ""); + String value = options.getProperty("jdb.option", "").trim(); + if (value.length() > 1 && value.startsWith("\"") && value.endsWith("\"")) { + value = value.substring(1, value.length() - 1).trim(); + } + return value; } /** diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Binder.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Binder.java index d74fb93731e..60d33ca4817 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Binder.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Binder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -23,6 +23,7 @@ package nsk.share.jdi; +import jdk.test.lib.Platform; import nsk.share.*; import nsk.share.jpda.*; @@ -694,10 +695,18 @@ private Map<String,? extends Argument> setupLaunchingConnector(LaunchingConnecto Connector.Argument arg; arg = (Connector.StringArgument) arguments.get("quote"); - String quote = arg.value(); + String quote = "\0"; + arg.setValue(quote); + + String[] rawArgs = argumentHandler.getRawArguments(); + if (Platform.isWindows()) { + // " has to be escaped on windows + rawArgs = Arrays.stream(rawArgs) + .map(s -> s.replace("\"", "\\\"")) + .toArray(String[]::new); + } - String cmdline = classToExecute + " " + - ArgumentHandler.joinArguments(argumentHandler.getRawArguments(), quote); + String cmdline = classToExecute + " " + ArgumentHandler.joinArguments(rawArgs, quote); arg = (Connector.StringArgument) arguments.get("main"); arg.setValue(cmdline); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ClassExclusionFilterTest.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ClassExclusionFilterTest.java new file mode 100644 index 00000000000..b2f608ed513 --- /dev/null +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ClassExclusionFilterTest.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package nsk.share.jdi; + +import nsk.share.Consts; +import nsk.share.TestBug; + +import java.io.PrintStream; +import java.util.ArrayList; + +/* + * Class for testing class exclusion filter, this filter is added by + * request's method addClassExclusionFilter(String classPattern) Expected + * command line parameter: + * - class patterns which should be passed to adding filter method (e.g. -classPatterns java.*:*.Foo) + */ +public class ClassExclusionFilterTest extends EventFilterTest { + protected String[] classPatterns; + + public static void main(String[] argv) { + System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); + } + + public static int run(String[] argv, PrintStream out) { + return new ClassExclusionFilterTest().runIt(argv, out); + } + + protected String[] doInit(String[] args, PrintStream out) { + args = super.doInit(args, out); + + ArrayList<String> standardArgs = new ArrayList<>(); + + for (int i = 0; i < args.length; i++) { + if (args[i].equals("-classPatterns") && (i < args.length - 1)) { + classPatterns = args[i + 1].split(":"); + i++; + } else { + standardArgs.add(args[i]); + } + } + + if (classPatterns == null || classPatterns.length == 0) { + throw new TestBug("Test requires at least one class name pattern"); + } + + return standardArgs.toArray(new String[]{}); + } + + protected int getTestFiltersNumber() { + return classPatterns.length; + } + + protected EventFilters.DebugEventFilter[] createTestFilters(int testedFilterIndex) { + if (testedFilterIndex < 0 || testedFilterIndex >= classPatterns.length) { + throw new TestBug("Invalid testedFilterIndex: " + testedFilterIndex); + } + + return new EventFilters.DebugEventFilter[]{new EventFilters.ClassExclusionFilter(classPatterns[testedFilterIndex])}; + } +} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ClassFilterTest_ClassName.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ClassFilterTest_ClassName.java new file mode 100644 index 00000000000..846a83eb480 --- /dev/null +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ClassFilterTest_ClassName.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package nsk.share.jdi; + +import nsk.share.Consts; +import nsk.share.TestBug; + +import java.io.PrintStream; + +/* + * Subclass of ClassExclusionFilterTest, create ClassFilter instead of + * ClassExclusionFilter, this filter is added by request's method + * addClassFilter(String classPattern) + */ +public class ClassFilterTest_ClassName extends ClassExclusionFilterTest { + public static void main(String[] argv) { + System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); + } + + public static int run(String[] argv, PrintStream out) { + return new ClassFilterTest_ClassName().runIt(argv, out); + } + + protected EventFilters.DebugEventFilter[] createTestFilters(int testedFilterIndex) { + if (testedFilterIndex < 0 || testedFilterIndex >= classPatterns.length) { + throw new TestBug("Invalid testedFilterIndex: " + testedFilterIndex); + } + + return new EventFilters.DebugEventFilter[]{new EventFilters.ClassFilter(classPatterns[testedFilterIndex])}; + } +} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ClassFilterTest_ReferenceType.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ClassFilterTest_ReferenceType.java new file mode 100644 index 00000000000..2cda0dc1967 --- /dev/null +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ClassFilterTest_ReferenceType.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package nsk.share.jdi; + +import com.sun.jdi.ReferenceType; +import nsk.share.Consts; +import nsk.share.TestBug; + +import java.io.PrintStream; + +/* + * Subclass of ClassExclusionFilterTest, create ClassReferenceFilter instead + * of ClassExclusionFilter, this filter is added by request's method + * addClassFilter(ReferenceType referenceType) + */ +public class ClassFilterTest_ReferenceType extends ClassExclusionFilterTest { + public static void main(String[] argv) { + System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); + } + + public static int run(String[] argv, PrintStream out) { + return new ClassFilterTest_ReferenceType().runIt(argv, out); + } + + protected int getTestFiltersNumber() { + return classPatterns.length; + } + + protected EventFilters.DebugEventFilter[] createTestFilters(int testedFilterIndex) { + if (testedFilterIndex < 0 || testedFilterIndex >= classPatterns.length) { + throw new TestBug("Invalid testedFilterIndex: " + testedFilterIndex); + } + + ReferenceType referenceType = debuggee.classByName(classPatterns[testedFilterIndex]); + if (referenceType == null) { + throw new TestBug("Invalid class name is passed: " + classPatterns[testedFilterIndex]); + } + + return new EventFilters.DebugEventFilter[]{new EventFilters.ClassReferenceFilter(referenceType)}; + } +} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/EventFilterTest.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/EventFilterTest.java new file mode 100644 index 00000000000..dba72a69541 --- /dev/null +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/EventFilterTest.java @@ -0,0 +1,102 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package nsk.share.jdi; + +import com.sun.jdi.event.Event; +import nsk.share.TestBug; + +import java.io.PrintStream; +import java.util.ArrayList; + +/* + * Debugger class for testing event filters, subclasses should parse command + * line and call method JDIEventsDebugger.eventFilterTestTemplate with + * required arguments. + * + * Class handles common for event filter tests parameters: + * - debuggee class name (e.g. -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee) + * - tested event type (e.g. -eventType MONITOR_CONTENTED_ENTER) + */ +public abstract class EventFilterTest extends JDIEventsDebugger { + protected String debuggeeClassName; + + protected EventType eventType; + + protected String[] doInit(String[] args, PrintStream out) { + args = super.doInit(args, out); + + ArrayList<String> standardArgs = new ArrayList<>(); + + for (int i = 0; i < args.length; i++) { + if (args[i].equals("-debuggeeClassName") && (i < args.length - 1)) { + debuggeeClassName = args[i + 1]; + i++; + } else if (args[i].equals("-eventType") && (i < args.length - 1)) { + try { + eventType = EventType.valueOf(args[i + 1]); + } catch (IllegalArgumentException e) { + throw new TestBug("Invalid event type : " + args[i + 1], e); + } + i++; + } else + standardArgs.add(args[i]); + } + + if (eventType == null) { + throw new TestBug("Test requires 'eventType' parameter"); + } + if (debuggeeClassName == null) { + throw new TestBug("Test requires 'debuggeeClassName' parameter"); + } + return standardArgs.toArray(new String[]{}); + } + + abstract protected int getTestFiltersNumber(); + + public final void doTest() { + prepareDebuggee(new EventType[]{eventType}); + + int filtersNumber = getTestFiltersNumber(); + if (filtersNumber <= 0) { + throw new TestBug("Invalid filtersNumber: " + filtersNumber); + } + + for (int i = 0; i < filtersNumber; i++) { + int filterIndex = i; + EventTestTemplates.runTestWithRerunPossibilty(this, + () -> eventFilterTestTemplate(eventType, filterIndex)); + } + + eventHandler.stopEventHandler(); + removeDefaultBreakpoint(); + } + + // can't control events from system libraries, so save events only from nsk packages + protected boolean shouldSaveEvent(Event event) { + return EventTestTemplates.isEventFromNSK(event, debuggee); + } + + protected String debuggeeClassName() { + return debuggeeClassName; + } +} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/EventTestTemplates.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/EventTestTemplates.java index b77f8c4a161..7c99fcd79c4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/EventTestTemplates.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/EventTestTemplates.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -22,13 +22,12 @@ */ package nsk.share.jdi; -import java.io.*; -import java.util.*; - -import com.sun.jdi.*; -import com.sun.jdi.event.*; -import nsk.share.Consts; -import nsk.share.TestBug; +import com.sun.jdi.ObjectCollectedException; +import com.sun.jdi.event.Event; +import com.sun.jdi.event.MonitorContendedEnterEvent; +import com.sun.jdi.event.MonitorContendedEnteredEvent; +import com.sun.jdi.event.MonitorWaitEvent; +import com.sun.jdi.event.MonitorWaitedEvent; /* * Class contains debugger classes based on JDIEventsDebugger intended for JDI events testing @@ -52,387 +51,13 @@ static void runTestWithRerunPossibilty(JDIEventsDebugger debugger, Runnable test if (debugger.eventsNotGenerated() && debugger.getSuccess()) { if (i < MAX_TEST_RUN_NUMBER - 1) { debugger.log.display("\nWARNING: tested events weren't generated at all, trying to rerun test (rerun attempt " + (i + 1) + ")\n"); - continue; } else { debugger.setSuccess(false); debugger.log.complain("Tested events weren't generated after " + MAX_TEST_RUN_NUMBER + " runs, test FAILED"); } - } else + } else { break; - } - } - - /* - * Debugger class for testing event filters, subclasses should parse command - * line and call method JDIEventsDebugger.eventFilterTestTemplate with - * required arguments. - * - * Class handles common for event filter tests parameters: - * - debuggee class name (e.g. -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee) - * - tested event type (e.g. -eventType MONITOR_CONTENTED_ENTER) - */ - public static abstract class EventFilterTest extends JDIEventsDebugger { - protected String debuggeeClassName; - - protected EventType eventType; - - protected String[] doInit(String[] args, PrintStream out) { - args = super.doInit(args, out); - - ArrayList<String> standardArgs = new ArrayList<String>(); - - for (int i = 0; i < args.length; i++) { - if (args[i].equals("-debuggeeClassName") && (i < args.length - 1)) { - debuggeeClassName = args[i + 1]; - i++; - } else if (args[i].equals("-eventType") && (i < args.length - 1)) { - try { - eventType = EventType.valueOf(args[i + 1]); - } catch (IllegalArgumentException e) { - TestBug testBug = new TestBug("Invalid event type : " + args[i + 1], e); - throw testBug; - } - i++; - } else - standardArgs.add(args[i]); - } - - if (eventType == null) - throw new TestBug("Test requires 'eventType' parameter"); - - if (debuggeeClassName == null) - throw new TestBug("Test requires 'debuggeeClassName' parameter"); - - return standardArgs.toArray(new String[] {}); - } - - abstract protected int getTestFiltersNumber(); - - // This class is required to call runTestWithRerunPossibilty() - class FilterTestRunner implements Runnable { - private int filterIndex; - - FilterTestRunner(int filterIndex) { - this.filterIndex = filterIndex; } - - public void run() { - eventFilterTestTemplate(eventType, filterIndex); - } - } - - public final void doTest() { - prepareDebuggee(new EventType[] {eventType}); - - int filtersNumber = getTestFiltersNumber(); - - if (filtersNumber <= 0) - throw new TestBug("Invalid filtersNumber: " + filtersNumber); - - for (int filterIndex = 0; filterIndex < getTestFiltersNumber(); filterIndex++) { - runTestWithRerunPossibilty(this, new FilterTestRunner(filterIndex)); - } - - eventHandler.stopEventHandler(); - removeDefaultBreakpoint(); - } - - // can't control events from system libraries, so save events only from nsk packages - protected boolean shouldSaveEvent(Event event) { - return isEventFromNSK(event, debuggee); - } - - protected String debuggeeClassName() { - return debuggeeClassName; - } - } - - /* - * Class for testing class exclusion filter, this filter is added by - * request's method addClassExclusionFilter(String classPattern) Expected - * command line parameter: - * - class patterns which should be passed to adding filter method (e.g. -classPatterns java.*:*.Foo) - */ - public static class ClassExclusionFilterTest extends EventFilterTest { - protected String classPatterns[]; - - public static void main(String argv[]) { - System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); - } - - public static int run(String argv[], PrintStream out) { - return new ClassExclusionFilterTest().runIt(argv, out); - } - - protected String[] doInit(String[] args, PrintStream out) { - args = super.doInit(args, out); - - ArrayList<String> standardArgs = new ArrayList<String>(); - - for (int i = 0; i < args.length; i++) { - if (args[i].equals("-classPatterns") && (i < args.length - 1)) { - classPatterns = args[i + 1].split(":"); - i++; - } else - standardArgs.add(args[i]); - } - - if (classPatterns == null || classPatterns.length == 0) - throw new TestBug("Test requires at least one class name pattern"); - - return standardArgs.toArray(new String[] {}); - } - - protected int getTestFiltersNumber() { - return classPatterns.length; - } - - protected EventFilters.DebugEventFilter[] createTestFilters(int testedFilterIndex) { - if (testedFilterIndex < 0 || testedFilterIndex >= classPatterns.length) - throw new TestBug("Invalid testedFilterIndex: " + testedFilterIndex); - - return new EventFilters.DebugEventFilter[]{new EventFilters.ClassExclusionFilter(classPatterns[testedFilterIndex])}; - } - } - - /* - * Subclass of ClassExclusionFilterTest, create ClassFilter instead of - * ClassExclusionFilter, this filter is added by request's method - * addClassFilter(String classPattern) - */ - public static class ClassFilterTest_ClassName extends ClassExclusionFilterTest { - public static void main(String argv[]) { - System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); - } - - public static int run(String argv[], PrintStream out) { - return new ClassFilterTest_ClassName().runIt(argv, out); - } - - protected EventFilters.DebugEventFilter[] createTestFilters(int testedFilterIndex) { - if (testedFilterIndex < 0 || testedFilterIndex >= classPatterns.length) - throw new TestBug("Invalid testedFilterIndex: " + testedFilterIndex); - - return new EventFilters.DebugEventFilter[]{new EventFilters.ClassFilter(classPatterns[testedFilterIndex])}; - } - } - - /* - * Subclass of ClassExclusionFilterTest, create ClassReferenceFilter instead - * of ClassExclusionFilter, this filter is added by request's method - * addClassFilter(ReferenceType referenceType) - */ - public static class ClassFilterTest_ReferenceType extends ClassExclusionFilterTest { - public static void main(String argv[]) { - System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); - } - - public static int run(String argv[], PrintStream out) { - return new ClassFilterTest_ReferenceType().runIt(argv, out); - } - - protected int getTestFiltersNumber() { - return classPatterns.length; - } - - protected EventFilters.DebugEventFilter[] createTestFilters(int testedFilterIndex) { - if (testedFilterIndex < 0 || testedFilterIndex >= classPatterns.length) - throw new TestBug("Invalid testedFilterIndex: " + testedFilterIndex); - - ReferenceType referenceType = debuggee.classByName(classPatterns[testedFilterIndex]); - if (referenceType == null) - throw new TestBug("Invalid class name is passed: " + classPatterns[testedFilterIndex]); - - return new EventFilters.DebugEventFilter[]{new EventFilters.ClassReferenceFilter(referenceType)}; - } - } - - /* - * Class for testing instance filter, this filter is added by request's - * method addInstanceFilter(ObjectReference instance). Class tests 3 following - * cases: - * - add filter for single object - * - add filter for the same object 2 times, expect behavior such as in previous case - * - add filter for 2 different objects, so events shouldn't be received - */ - public static class InstanceFilterTest extends EventFilterTest { - public static void main(String argv[]) { - System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); - } - - public static int run(String argv[], PrintStream out) { - return new InstanceFilterTest().runIt(argv, out); - } - - protected int getTestFiltersNumber() { - return 3; - } - - protected EventFilters.DebugEventFilter[] createTestFilters(int testedFilterIndex) { - List<ObjectReference> objects = getEventObjects(); - - if (objects.size() < 2) { - throw new TestBug("Debuggee didn't create event generating objects"); - } - - switch (testedFilterIndex) { - case 0: - // filter for 1 object - return new EventFilters.DebugEventFilter[]{new EventFilters.ObjectReferenceFilter(objects.get(0))}; - case 1: - // add 2 filters for the same object - return new EventFilters.DebugEventFilter[]{new EventFilters.ObjectReferenceFilter(objects.get(0)), - new EventFilters.ObjectReferenceFilter(objects.get(0))}; - case 2: - // add 2 filters for 2 different objects, so don't expect any event - return new EventFilters.DebugEventFilter[]{new EventFilters.ObjectReferenceFilter(objects.get(0)), - new EventFilters.ObjectReferenceFilter(objects.get(1))}; - default: - throw new TestBug("Invalid testedFilterIndex: " + testedFilterIndex); - } - } - } - - /* - * Class for testing thread filter, this filter is added by request's method - * addThreadFilter(ThreadReference thread). Class test 3 follows cases: - * - add filter for single thread - * - add filter for the same thread 2 times, expect behavior such as in previous case - * - add filter for 2 different threads, so events shouldn't be received - */ - public static class ThreadFilterTest extends EventFilterTest { - public static void main(String argv[]) { - System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); - } - - public static int run(String argv[], PrintStream out) { - return new ThreadFilterTest().runIt(argv, out); - } - - protected int getTestFiltersNumber() { - return 3; - } - - protected EventFilters.DebugEventFilter[] createTestFilters(int testedFilterIndex) { - List<ThreadReference> threads = getEventThreads(); - - if (threads.size() < 2) { - throw new TestBug("Debuggee didn't create event generating threads"); - } - - switch (testedFilterIndex) { - case 0: - // filter for 1 thread - return new EventFilters.DebugEventFilter[]{new EventFilters.ThreadFilter(threads.get(0))}; - case 1: - // add 2 filters for the same thread - return new EventFilters.DebugEventFilter[]{new EventFilters.ThreadFilter(threads.get(0)), - new EventFilters.ThreadFilter(threads.get(0))}; - case 2: - // add 2 filters for 2 different threads, so don't expect any event - return new EventFilters.DebugEventFilter[]{new EventFilters.ThreadFilter(threads.get(0)), - new EventFilters.ThreadFilter(threads.get(1))}; - default: - throw new TestBug("Invalid testedFilterIndex: " + testedFilterIndex); - } - } - } - - /* - * Class is intended for stress testing, expected command line parameters: - * - debuggee class name (e.g.: -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee) - * - one or more tested event types (e.g.: -eventTypes MONITOR_CONTENTED_ENTER:MONITOR_CONTENTED_ENTERED) - * - number of events which should be generated during test execution (e.g.: -eventsNumber 500) - * - number of threads which simultaneously generate events (e.g.: -threadsNumber 10) - * - * Class parses command line and calls method JDIEventsDebugger.stressTestTemplate. - */ - public static class StressTestTemplate extends JDIEventsDebugger { - protected String debuggeeClassName; - - protected EventType testedEventTypes[]; - - protected int eventsNumber = 1; - - protected int threadsNumber = 1; - - public static void main(String argv[]) { - System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); - } - - public static int run(String argv[], PrintStream out) { - return new StressTestTemplate().runIt(argv, out); - } - - protected String[] doInit(String[] args, PrintStream out) { - args = super.doInit(args, out); - - ArrayList<String> standardArgs = new ArrayList<String>(); - - for (int i = 0; i < args.length; i++) { - if (args[i].equals("-eventsNumber") && (i < args.length - 1)) { - eventsNumber = Integer.parseInt(args[i + 1]); - - // for this stress test events number is equivalent of iterations - // (don't support 0 value of IterationsFactor) - if (stressOptions.getIterationsFactor() != 0) - eventsNumber *= stressOptions.getIterationsFactor(); - - i++; - } else if (args[i].equals("-threadsNumber") && (i < args.length - 1)) { - threadsNumber = Integer.parseInt(args[i + 1]); - - // if 'threadsNumber' is specified test should take in account stress options - threadsNumber *= stressOptions.getThreadsFactor(); - - i++; - } else if (args[i].equals("-debuggeeClassName") && (i < args.length - 1)) { - debuggeeClassName = args[i + 1]; - i++; - } else if (args[i].equals("-eventTypes") && (i < args.length - 1)) { - String eventTypesNames[] = args[i + 1].split(":"); - testedEventTypes = new EventType[eventTypesNames.length]; - try { - for (int j = 0; j < eventTypesNames.length; j++) - testedEventTypes[j] = EventType.valueOf(eventTypesNames[j]); - } catch (IllegalArgumentException e) { - throw new TestBug("Invalid event type", e); - } - - i++; - } else - standardArgs.add(args[i]); - } - - if (testedEventTypes == null || testedEventTypes.length == 0) - throw new TestBug("Test requires 'eventTypes' parameter"); - - if (debuggeeClassName == null) - throw new TestBug("Test requires 'debuggeeClassName' parameter"); - - return standardArgs.toArray(new String[] {}); - } - - // can't control events from system libraries, so save events only from nsk packages - protected boolean shouldSaveEvent(Event event) { - return isEventFromNSK(event, debuggee); - } - - protected String debuggeeClassName() { - return debuggeeClassName; - } - - public void doTest() { - prepareDebuggee(testedEventTypes); - - runTestWithRerunPossibilty(this, new Runnable() { - public void run() { - stressTestTemplate(testedEventTypes, eventsNumber, threadsNumber); - } - }); - - eventHandler.stopEventHandler(); - removeDefaultBreakpoint(); } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/InstanceFilterTest.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/InstanceFilterTest.java new file mode 100644 index 00000000000..01d3b9e7769 --- /dev/null +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/InstanceFilterTest.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package nsk.share.jdi; + +import com.sun.jdi.ObjectReference; +import nsk.share.Consts; +import nsk.share.TestBug; + +import java.io.PrintStream; +import java.util.List; + +/* + * Class for testing instance filter, this filter is added by request's + * method addInstanceFilter(ObjectReference instance). Class tests 3 following + * cases: + * - add filter for single object + * - add filter for the same object 2 times, expect behavior such as in previous case + * - add filter for 2 different objects, so events shouldn't be received + */ +public class InstanceFilterTest extends EventFilterTest { + public static void main(String[] argv) { + System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); + } + + public static int run(String[] argv, PrintStream out) { + return new InstanceFilterTest().runIt(argv, out); + } + + protected int getTestFiltersNumber() { + return 3; + } + + protected EventFilters.DebugEventFilter[] createTestFilters(int testedFilterIndex) { + List<ObjectReference> objects = getEventObjects(); + + if (objects.size() < 2) { + throw new TestBug("Debuggee didn't create event generating objects"); + } + + switch (testedFilterIndex) { + case 0: + // filter for 1 object + return new EventFilters.DebugEventFilter[]{new EventFilters.ObjectReferenceFilter(objects.get(0))}; + case 1: + // add 2 filters for the same object + return new EventFilters.DebugEventFilter[]{new EventFilters.ObjectReferenceFilter(objects.get(0)), + new EventFilters.ObjectReferenceFilter(objects.get(0))}; + case 2: + // add 2 filters for 2 different objects, so don't expect any event + return new EventFilters.DebugEventFilter[]{new EventFilters.ObjectReferenceFilter(objects.get(0)), + new EventFilters.ObjectReferenceFilter(objects.get(1))}; + default: + throw new TestBug("Invalid testedFilterIndex: " + testedFilterIndex); + } + } +} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/StressTestTemplate.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/StressTestTemplate.java new file mode 100644 index 00000000000..700d05f6393 --- /dev/null +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/StressTestTemplate.java @@ -0,0 +1,127 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package nsk.share.jdi; + +import com.sun.jdi.event.Event; +import nsk.share.Consts; +import nsk.share.TestBug; + +import java.io.PrintStream; +import java.util.ArrayList; + +/* + * Class is intended for stress testing, expected command line parameters: + * - debuggee class name (e.g.: -debuggeeClassName nsk.share.jdi.MonitorEventsDebuggee) + * - one or more tested event types (e.g.: -eventTypes MONITOR_CONTENTED_ENTER:MONITOR_CONTENTED_ENTERED) + * - number of events which should be generated during test execution (e.g.: -eventsNumber 500) + * - number of threads which simultaneously generate events (e.g.: -threadsNumber 10) + * + * Class parses command line and calls method JDIEventsDebugger.stressTestTemplate. + */ +public class StressTestTemplate extends JDIEventsDebugger { + protected String debuggeeClassName; + protected EventType[] testedEventTypes; + protected int eventsNumber = 1; + protected int threadsNumber = 1; + + public static void main(String[] argv) { + System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); + } + + public static int run(String[] argv, PrintStream out) { + return new StressTestTemplate().runIt(argv, out); + } + + protected String[] doInit(String[] args, PrintStream out) { + args = super.doInit(args, out); + + ArrayList<String> standardArgs = new ArrayList<String>(); + + for (int i = 0; i < args.length; i++) { + if (args[i].equals("-eventsNumber") && (i < args.length - 1)) { + eventsNumber = Integer.parseInt(args[i + 1]); + + // for this stress test events number is equivalent of iterations + // (don't support 0 value of IterationsFactor) + if (stressOptions.getIterationsFactor() != 0) { + eventsNumber *= stressOptions.getIterationsFactor(); + } + i++; + } else if (args[i].equals("-threadsNumber") && (i < args.length - 1)) { + threadsNumber = Integer.parseInt(args[i + 1]); + + // if 'threadsNumber' is specified test should take in account stress options + threadsNumber *= stressOptions.getThreadsFactor(); + + i++; + } else if (args[i].equals("-debuggeeClassName") && (i < args.length - 1)) { + debuggeeClassName = args[i + 1]; + i++; + } else if (args[i].equals("-eventTypes") && (i < args.length - 1)) { + String[] eventTypesNames = args[i + 1].split(":"); + testedEventTypes = new EventType[eventTypesNames.length]; + try { + for (int j = 0; j < eventTypesNames.length; j++) { + testedEventTypes[j] = EventType.valueOf(eventTypesNames[j]); + } + } catch (IllegalArgumentException e) { + throw new TestBug("Invalid event type", e); + } + + i++; + } else { + standardArgs.add(args[i]); + } + } + + if (testedEventTypes == null || testedEventTypes.length == 0) { + throw new TestBug("Test requires 'eventTypes' parameter"); + } + + if (debuggeeClassName == null) { + throw new TestBug("Test requires 'debuggeeClassName' parameter"); + } + + return standardArgs.toArray(new String[]{}); + } + + // can't control events from system libraries, so save events only from nsk packages + protected boolean shouldSaveEvent(Event event) { + return EventTestTemplates.isEventFromNSK(event, debuggee); + } + + protected String debuggeeClassName() { + return debuggeeClassName; + } + + public void doTest() { + prepareDebuggee(testedEventTypes); + + EventTestTemplates.runTestWithRerunPossibilty(this, + () -> stressTestTemplate(testedEventTypes, eventsNumber, threadsNumber)); + + eventHandler.stopEventHandler(); + removeDefaultBreakpoint(); + } +} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ThreadFilterTest.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ThreadFilterTest.java new file mode 100644 index 00000000000..53a6398c4c0 --- /dev/null +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ThreadFilterTest.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package nsk.share.jdi; + +import com.sun.jdi.ThreadReference; +import nsk.share.Consts; +import nsk.share.TestBug; + +import java.io.PrintStream; +import java.util.List; + +/* + * Class for testing thread filter, this filter is added by request's method + * addThreadFilter(ThreadReference thread). Class test 3 follows cases: + * - add filter for single thread + * - add filter for the same thread 2 times, expect behavior such as in previous case + * - add filter for 2 different threads, so events shouldn't be received + */ +public class ThreadFilterTest extends EventFilterTest { + public static void main(String[] argv) { + System.exit(run(argv, System.out) + Consts.JCK_STATUS_BASE); + } + + public static int run(String[] argv, PrintStream out) { + return new ThreadFilterTest().runIt(argv, out); + } + + protected int getTestFiltersNumber() { + return 3; + } + + protected EventFilters.DebugEventFilter[] createTestFilters(int testedFilterIndex) { + List<ThreadReference> threads = getEventThreads(); + + if (threads.size() < 2) { + throw new TestBug("Debuggee didn't create event generating threads"); + } + + switch (testedFilterIndex) { + case 0: + // filter for 1 thread + return new EventFilters.DebugEventFilter[]{new EventFilters.ThreadFilter(threads.get(0))}; + case 1: + // add 2 filters for the same thread + return new EventFilters.DebugEventFilter[]{new EventFilters.ThreadFilter(threads.get(0)), + new EventFilters.ThreadFilter(threads.get(0))}; + case 2: + // add 2 filters for 2 different threads, so don't expect any event + return new EventFilters.DebugEventFilter[]{new EventFilters.ThreadFilter(threads.get(0)), + new EventFilters.ThreadFilter(threads.get(1))}; + default: + throw new TestBug("Invalid testedFilterIndex: " + testedFilterIndex); + } + } +} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/ArgumentHandler.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/ArgumentHandler.java index d056dc629be..71accdc46ea 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/ArgumentHandler.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/ArgumentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -23,10 +23,10 @@ package nsk.share.jvmti; -import nsk.share.*; +import nsk.share.ArgumentParser; +import nsk.share.Failure; -import java.io.*; -import java.util.*; +import java.util.StringTokenizer; /** * Parser for JVMTI test's specific command-line arguments. @@ -37,16 +37,14 @@ * form agent option string. These options are added to the options list * and can be found using <i>FindOption*Value()</i> methods. * <p> - * Currently no specific options are recognized by <code>AgrumentHandler</code>. + * Currently no specific options are recognized by <code>ArgumentHandler</code>. * <p> * See description of <code>ArgumentParser</code> to know which general options * are recognized and how to get them. * * @see ArgumentParser - * * @see #findOptionValue(String) - * @see #findOptionStringValue(String,String) - * @see #findOptionIntValue(String,int) + * @see #findOptionIntValue(String, int) */ public class ArgumentHandler extends ArgumentParser { @@ -55,15 +53,13 @@ public class ArgumentHandler extends ArgumentParser { * but throw an exception on parsing error; and also add options * obtained from agent options string. * - * @param args Array of the raw command-line arguments. - * - * @throws NullPointerException If <code>args==null</code>. - * @throws IllegalArgumentException If Binder or Log options - * are set incorrectly. - * + * @param args Array of the raw command-line arguments. + * @throws NullPointerException If <code>args==null</code>. + * @throws IllegalArgumentException If Binder or Log options + * are set incorrectly. * @see #setRawArguments(String[]) */ - public ArgumentHandler(String args[]) { + public ArgumentHandler(String[] args) { super(args); String agentOptions = getAgentOptionsString(); if (agentOptions == null) { @@ -76,25 +72,7 @@ public ArgumentHandler(String args[]) { * Return value of given option if specified; or <i>null</i> otherwise. */ public String findOptionValue(String name) { - String value = options.getProperty(name); - return value; - } - - /** - * Return string value of given option if specified; or <i>defaultValue</i> otherwise. - * - * @throws BadOption if option is specified but has empty value. - */ - public String findOptionStringValue(String name, String defaultValue) { - String value = options.getProperty(name); - if (value == null) { - return defaultValue; - } - - if (value.length() <= 0) { - throw new BadOption("Empty value of option: " + name + "=" + value); - } - return value; + return options.getProperty(name); } /** @@ -120,13 +98,11 @@ public int findOptionIntValue(String name, int defaultValue) { * This method is invoked by <code>parseArguments()</code>. * * @param option option name - * @param value string representation of value (could be an empty string); - * or null if this option has no value + * @param value string representation of value (could be an empty string); + * or null if this option has no value * @return <i>true</i> if option is admissible and has proper value; - * <i>false</i> if otion is not admissible - * - * @throws <i>BadOption</i> if admissible option has illegal value - * + * <i>false</i> if option is not admissible + * @throws BadOption if admissible option has illegal value * @see #parseArguments() */ protected boolean checkOption(String option, String value) { @@ -147,17 +123,17 @@ protected void checkOptions() { * Parse options string and add all recognized options and their values. * If optionString is <i>null</i> this method just does nothing. * - * @throws BadOption if known option has illegel value - * or all options are inconsistent + * @throws BadOption if known option has illegal value + * or all options are inconsistent */ protected void parseOptionString(String optionString) { if (optionString == null) return; - StringTokenizer st = new StringTokenizer(optionString); + StringTokenizer st = new StringTokenizer(optionString, " ,~"); while (st.hasMoreTokens()) { String token = st.nextToken(); - int start = token.startsWith("-")? 1 : 0; + int start = token.startsWith("-") ? 1 : 0; String name, value; int k = token.indexOf('='); if (k < 0) { diff --git a/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/func/jdi/breakpointOtherStratum/Test.java b/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/func/jdi/breakpointOtherStratum/Test.java index 4f9d8c578fc..b5c46656858 100644 --- a/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/func/jdi/breakpointOtherStratum/Test.java +++ b/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/func/jdi/breakpointOtherStratum/Test.java @@ -23,6 +23,7 @@ /* * @test + * @key randomness * * @summary converted from VM Testbase vm/mlvm/meth/func/jdi/breakpointOtherStratum. * VM Testbase keywords: [feature_mlvm, nonconcurrent, fds, jdk, quarantine] diff --git a/test/jdk/ProblemList-Xcomp.txt b/test/jdk/ProblemList-Xcomp.txt index cc6382da7af..fae08cd1efd 100644 --- a/test/jdk/ProblemList-Xcomp.txt +++ b/test/jdk/ProblemList-Xcomp.txt @@ -28,4 +28,3 @@ ############################################################################# java/lang/invoke/MethodHandles/CatchExceptionTest.java 8146623 generic-all -java/math/BigInteger/largeMemory/SymmetricRangeTests.java 8232840 generic-all diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index cbae666f145..966bea6b5ed 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -42,7 +42,7 @@ # List items are testnames followed by labels, all MUST BE commented # as to why they are here and use a label: # generic-all Problems on all platforms -# generic-ARCH Where ARCH is one of: x64, i586, ppc64, ppc64le, s390x etc. +# generic-ARCH Where ARCH is one of: x64, i586, ppc64, ppc64le, s390x, aarch64 etc. # OSNAME-all Where OSNAME is one of: linux, windows, macosx, aix # OSNAME-ARCH Specific on to one OSNAME and ARCH, e.g. macosx-x64 # OSNAME-REV Specific on to one OSNAME and REV, e.g. macosx-10.7.4 @@ -777,7 +777,6 @@ javax/swing/JFileChooser/8062561/bug8062561.java 8196466 linux-all,macosx-all javax/swing/JInternalFrame/Test6325652.java 8224977 macosx-all javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java 8225045 linux-all javax/swing/JPopupMenu/4870644/bug4870644.java 8194130 macosx-all,linux-all -javax/swing/JPopupMenu/4966112/bug4966112.java 8064915 macosx-all javax/swing/MultiUIDefaults/Test6860438.java 8198391 generic-all javax/swing/UITest/UITest.java 8198392 generic-all javax/swing/plaf/basic/BasicComboBoxEditor/Test8015336.java 8198394 generic-all @@ -834,7 +833,6 @@ javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.ja javax/swing/JMenuItem/6249972/bug6249972.java 8233640 macosx-all javax/swing/JMenuItem/4171437/bug4171437.java 8233641 macosx-all javax/swing/JMenu/4692443/bug4692443.java 8171998 macosx-all -javax/swing/plaf/synth/7158712/bug7158712.java 8238720 windows-all javax/swing/plaf/basic/BasicComboPopup/JComboBoxPopupLocation/JComboBoxPopupLocation.java 8238720 windows-all sanity/client/SwingSet/src/ToolTipDemoTest.java 8225012 windows-all,macosx-all @@ -853,7 +851,8 @@ sanity/client/SwingSet/src/ScrollPaneDemoTest.java 8225013 linux-all # core_tools -tools/jlink/JLinkReproducibleTest.java 8217166 windows-all +tools/jlink/JLinkReproducibleTest.java 8217166 windows-all,linux-aarch64 +tools/jlink/JLinkReproducible3Test.java 8253688 linux-aarch64 tools/jlink/plugins/CompressorPluginTest.java 8247407 generic-all ############################################################################ @@ -889,8 +888,6 @@ sun/tools/jhsdb/BasicLauncherTest.java 8211767 linux-pp # jdk_other -com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java 8169942 linux-i586,macosx-all,windows-x64 - javax/rmi/ssl/SSLSocketParametersTest.sh 8162906 generic-all javax/script/Test7.java 8239361 generic-all @@ -907,8 +904,6 @@ jdk/jfr/event/os/TestThreadContextSwitches.java 8247776 windows- # jdk_internal -jdk/internal/platform/docker/TestDockerMemoryMetrics.java 8250984 linux-5.4.0-1019-oracle - ############################################################################ # jdk_jpackage diff --git a/test/jdk/TEST.ROOT b/test/jdk/TEST.ROOT index 0234ca697c4..4615b0e0d4d 100644 --- a/test/jdk/TEST.ROOT +++ b/test/jdk/TEST.ROOT @@ -18,7 +18,7 @@ keys=2d dnd headful i18n intermittent printer randomness jfr # Tests that must run in othervm mode othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/swing javax/print \ -com/apple/laf com/sun/java/accessibility com/sun/java/swing sanity/client demo/jfc \ +com/apple/laf com/apple/eawt com/sun/java/accessibility com/sun/java/swing sanity/client demo/jfc \ javax/management sun/awt sun/java2d javax/xml/jaxp/testng/validation java/lang/ProcessHandle # Tests that cannot run concurrently diff --git a/test/jdk/com/sun/jdi/JdbOptions.java b/test/jdk/com/sun/jdi/JdbOptions.java new file mode 100644 index 00000000000..0ba8e4bd612 --- /dev/null +++ b/test/jdk/com/sun/jdi/JdbOptions.java @@ -0,0 +1,162 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8234808 + * + * @library /test/lib + * @run main/othervm JdbOptions + */ + +import jdk.test.lib.Platform; +import lib.jdb.Jdb; +import lib.jdb.JdbCommand; +import jdk.test.lib.process.OutputAnalyzer; + +import java.lang.management.ManagementFactory; +import java.util.Arrays; +import java.util.List; + +class JbdOptionsTarg { + static final String OK_MSG = "JbdOptionsTarg: OK"; + + static String argString(String s) { + return "arg >" + s + "<"; + } + + static String propString(String name, String value) { + return "prop[" + name + "] = >" + value + "<"; + } + + public static void main(String[] args) { + System.out.println(OK_MSG); + // print all args + List<String> vmArgs = ManagementFactory.getRuntimeMXBean().getInputArguments(); + for (String s: vmArgs) { + System.out.println(argString(s)); + } + // print requested sys.props + for (String p: args) { + System.out.println(propString(p, System.getProperty(p))); + } + } +} + +public class JdbOptions { + private static final String targ = JbdOptionsTarg.class.getName(); + + public static void main(String[] args) throws Exception { + // the simplest case + test("-connect", + "com.sun.jdi.CommandLineLaunch:vmexec=java,options=-client -XX:+PrintVMOptions,main=" + targ) + .expectedArg("-XX:+PrintVMOptions"); + + // pass property through 'options' + test("-connect", + "com.sun.jdi.CommandLineLaunch:vmexec=java,options='-Dboo=foo',main=" + targ + " boo") + .expectedProp("boo", "foo"); + + // property with spaces + test("-connect", + "com.sun.jdi.CommandLineLaunch:vmexec=java,options=\"-Dboo=foo 2\",main=" + targ + " boo") + .expectedProp("boo", "foo 2"); + + // property with spaces (with single quotes) + test("-connect", + "com.sun.jdi.CommandLineLaunch:vmexec=java,options='-Dboo=foo 2',main=" + targ + " boo") + .expectedProp("boo", "foo 2"); + + // properties with spaces (with single quotes) + test("-connect", + "com.sun.jdi.CommandLineLaunch:vmexec=java,options=-Dboo=foo '-Dboo2=foo 2',main=" + targ + " boo boo2") + .expectedProp("boo", "foo") + .expectedProp("boo2", "foo 2"); + + // 'options' contains commas - values are quoted (double quotes) + test("-connect", + "com.sun.jdi.CommandLineLaunch:vmexec=java,options=\"-client\" \"-XX:+PrintVMOptions\"" + + " \"-XX:StartFlightRecording=dumponexit=true,maxsize=500M\" \"-XX:FlightRecorderOptions=repository=jfrrep\"" + + ",main=" + targ) + .expectedArg("-XX:StartFlightRecording=dumponexit=true,maxsize=500M") + .expectedArg("-XX:FlightRecorderOptions=repository=jfrrep"); + + // 'options' contains commas - values are quoted (single quotes) + test("-connect", + "com.sun.jdi.CommandLineLaunch:vmexec=java,options='-client' '-XX:+PrintVMOptions'" + + " '-XX:StartFlightRecording=dumponexit=true,maxsize=500M' '-XX:FlightRecorderOptions=repository=jfrrep'" + + ",main=" + targ) + .expectedArg("-XX:StartFlightRecording=dumponexit=true,maxsize=500M") + .expectedArg("-XX:FlightRecorderOptions=repository=jfrrep"); + + // java options are specified in 2 ways, with and without spaces + // options are quoted by using single and double quotes. + test("-Dprop1=val1", + "-Dprop2=val 2", + "-connect", + "com.sun.jdi.CommandLineLaunch:vmexec=java,options=-Dprop3=val3 '-Dprop4=val 4'" + + " \"-XX:StartFlightRecording=dumponexit=true,maxsize=500M\"" + + " '-XX:FlightRecorderOptions=repository=jfrrep'" + + ",main=" + targ + " prop1 prop2 prop3 prop4") + .expectedProp("prop1", "val1") + .expectedProp("prop2", "val 2") + .expectedProp("prop3", "val3") + .expectedProp("prop4", "val 4") + .expectedArg("-XX:StartFlightRecording=dumponexit=true,maxsize=500M") + .expectedArg("-XX:FlightRecorderOptions=repository=jfrrep"); + + } + + private static class TestResult { + OutputAnalyzer out; + TestResult(OutputAnalyzer output) { + out = output; + } + TestResult expectedArg(String s) { + out.shouldContain(JbdOptionsTarg.argString(s)); + return this; + } + TestResult expectedProp(String name, String value) { + out.shouldContain(JbdOptionsTarg.propString(name, value)); + return this; + } + } + + private static TestResult test(String... args) throws Exception { + System.out.println(); + System.out.println("...testcase..."); + if (Platform.isWindows()) { + // on Windows we need to escape quotes + args = Arrays.stream(args) + .map(s -> s.replace("\"", "\\\"")) + .toArray(String[]::new); + } + try (Jdb jdb = new Jdb(args)) { + jdb.waitForSimplePrompt(1024, true); // 1024 lines should be enough + jdb.command(JdbCommand.run().allowExit()); + OutputAnalyzer out = new OutputAnalyzer(jdb.getJdbOutput()); + out.shouldContain(JbdOptionsTarg.OK_MSG); + return new TestResult(out); + } + } +} diff --git a/test/jdk/com/sun/jndi/ldap/BalancedParentheses.java b/test/jdk/com/sun/jndi/ldap/BalancedParentheses.java index 2b62888f75a..b4ea10313d8 100644 --- a/test/jdk/com/sun/jndi/ldap/BalancedParentheses.java +++ b/test/jdk/com/sun/jndi/ldap/BalancedParentheses.java @@ -24,18 +24,23 @@ /** * @test * @bug 6449574 + * @library /test/lib * @summary Invalid ldap filter is accepted and processed */ import java.io.*; import javax.naming.*; import javax.naming.directory.*; -import java.util.Properties; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.SocketAddress; import java.util.Hashtable; import java.net.Socket; import java.net.ServerSocket; +import jdk.test.lib.net.URIBuilder; + public class BalancedParentheses { // Should we run the client or server in a separate thread? // @@ -54,7 +59,13 @@ public class BalancedParentheses { // If the server prematurely exits, serverReady will be set to true // to avoid infinite hangs. void doServerSide() throws Exception { - ServerSocket serverSock = new ServerSocket(serverPort); + // Create unbound server socket + ServerSocket serverSock = new ServerSocket(); + + // And bind it to the loopback address + SocketAddress sockAddr = new InetSocketAddress( + InetAddress.getLoopbackAddress(), 0); + serverSock.bind(sockAddr); // signal client, it's ready to accecpt connection serverPort = serverSock.getLocalPort(); @@ -106,7 +117,13 @@ void doClientSide() throws Exception { Hashtable<Object, Object> env = new Hashtable<>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); - env.put(Context.PROVIDER_URL, "ldap://localhost:" + serverPort); + // Construct the provider URL + String providerURL = URIBuilder.newBuilder() + .scheme("ldap") + .loopback() + .port(serverPort) + .build().toString(); + env.put(Context.PROVIDER_URL, providerURL); env.put("com.sun.jndi.ldap.read.timeout", "1000"); // env.put(Context.SECURITY_AUTHENTICATION, "simple"); diff --git a/test/jdk/com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java b/test/jdk/com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java index ea056f25237..e72683391ab 100644 --- a/test/jdk/com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java +++ b/test/jdk/com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java @@ -21,34 +21,35 @@ * questions. */ -/** +/* * @test - * @run main/othervm DeadSSLLdapTimeoutTest * @bug 8141370 * @key intermittent + * @library /test/lib + * @build DeadSSLSocketFactory + * @run main/othervm DeadSSLLdapTimeoutTest */ -import java.net.Socket; +import java.io.EOFException; +import java.io.IOException; +import java.net.InetAddress; +import java.net.InetSocketAddress; import java.net.ServerSocket; +import java.net.Socket; +import java.net.SocketAddress; import java.net.SocketTimeoutException; -import java.io.*; -import javax.naming.*; -import javax.naming.directory.*; -import java.util.List; +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; import java.util.Hashtable; -import java.util.ArrayList; import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Executors; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.TimeoutException; +import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import javax.naming.directory.InitialDirContext; import javax.net.ssl.SSLHandshakeException; -import static java.util.concurrent.TimeUnit.MILLISECONDS; +import jdk.test.lib.net.URIBuilder; + import static java.util.concurrent.TimeUnit.NANOSECONDS; @@ -57,26 +58,26 @@ class DeadServerTimeoutSSLTest implements Callable<Boolean> { Hashtable<Object, Object> env; DeadSSLServer server; boolean passed = false; - private int HANGING_TEST_TIMEOUT = 20_000; public DeadServerTimeoutSSLTest(Hashtable<Object, Object> env) throws IOException { - this.server = new DeadSSLServer(); + SocketAddress sockAddr = new InetSocketAddress( + InetAddress.getLoopbackAddress(), 0); + this.server = new DeadSSLServer(sockAddr); this.env = env; } - public void performOp(InitialContext ctx) throws NamingException {} - - public void handleNamingException(NamingException e, long start, long end) { + public void handleNamingException(NamingException e) { if (e.getCause() instanceof SocketTimeoutException || e.getCause().getCause() instanceof SocketTimeoutException) { // SSL connect will timeout via readReply using // SocketTimeoutException - e.printStackTrace(); + System.out.println("PASS: Observed expected SocketTimeoutException"); pass(); } else if (e.getCause() instanceof SSLHandshakeException && e.getCause().getCause() instanceof EOFException) { // test seems to be failing intermittently on some // platforms. + System.out.println("PASS: Observed expected SSLHandshakeException/EOFException"); pass(); } else { fail(e); @@ -92,6 +93,7 @@ public void fail() { } public void fail(Exception e) { + System.err.println("FAIL: Unexpected exception was observed:" + e.getMessage()); throw new RuntimeException("Test failed", e); } @@ -106,34 +108,36 @@ boolean shutItDown(InitialContext ctx) { public Boolean call() { InitialContext ctx = null; - ScheduledFuture<?> killer = null; - long start = System.nanoTime(); try { - while(!server.accepting()) - Thread.sleep(200); // allow the server to start up + server.serverStarted.await(); // Wait for the server to start-up Thread.sleep(200); // to be sure - env.put(Context.PROVIDER_URL, "ldap://localhost:" + - server.getLocalPort()); + env.put(Context.PROVIDER_URL, + URIBuilder.newBuilder() + .scheme("ldap") + .loopback() + .port(server.getLocalPort()) + .buildUnchecked().toString() + ); + long start = System.nanoTime(); try { ctx = new InitialDirContext(env); - performOp(ctx); fail(); } catch (NamingException e) { long end = System.nanoTime(); System.out.println(this.getClass().toString() + " - elapsed: " + NANOSECONDS.toMillis(end - start)); - handleNamingException(e, start, end); + handleNamingException(e); } finally { - if (killer != null && !killer.isDone()) - killer.cancel(true); + // Stop the server side thread + server.testDone.countDown(); shutItDown(ctx); server.close(); } return passed; - } catch (IOException|InterruptedException e) { + } catch (IOException | InterruptedException e) { throw new RuntimeException(e); } } @@ -141,20 +145,69 @@ public Boolean call() { class DeadSSLServer extends Thread { ServerSocket serverSock; - boolean accepting = false; - - public DeadSSLServer() throws IOException { - this.serverSock = new ServerSocket(0); + // Latch to be used by client to wait for server to start + CountDownLatch serverStarted = new CountDownLatch(1); + + // Latch to be used by server thread to wait for client to finish testing + CountDownLatch testDone = new CountDownLatch(1); + + public DeadSSLServer(SocketAddress socketAddress) throws IOException { + // create unbound server socket + var srvSock = new ServerSocket(); + // bind it to the address provided + srvSock.bind(socketAddress); + this.serverSock = srvSock; start(); } public void run() { - while(true) { - try { - accepting = true; - Socket socket = serverSock.accept(); + // Signal client to proceed with the test + serverStarted.countDown(); + while (true) { + try (var acceptedSocket = serverSock.accept()) { + System.err.println("Accepted connection:" + acceptedSocket); + int iteration = 0; + // Wait for socket to get opened by DeadSSLSocketFactory and connected to the test server + while (iteration++ < 20) { + if (DeadSSLSocketFactory.firstCreatedSocket.get() != null && + DeadSSLSocketFactory.firstCreatedSocket.get().isConnected()) { + break; + } + try { + TimeUnit.MILLISECONDS.sleep(50); + } catch (InterruptedException ie) { + } + } + Socket clientSideSocket = DeadSSLSocketFactory.firstCreatedSocket.get(); + System.err.printf("Got SSLSocketFactory connection after %d iterations: %s%n", + iteration, clientSideSocket); + + if (clientSideSocket == null || !clientSideSocket.isConnected()) { + // If after 1000 ms client side connection is not opened - probably other local process + // tried to connect to the test server socket. Close current connection and retry accept. + continue; + } else { + // Check if accepted socket is connected to the LDAP client + if (acceptedSocket.getLocalPort() == clientSideSocket.getPort() && + acceptedSocket.getPort() == clientSideSocket.getLocalPort() && + acceptedSocket.getInetAddress().equals(clientSideSocket.getLocalAddress())) { + System.err.println("Accepted connection is originated from LDAP client:" + acceptedSocket); + try { + // Give LDAP client time to fully establish the connection. + // When client is done - the accepted socket will be closed + testDone.await(); + } catch (InterruptedException e) { + } + break; + } else { + // If accepted socket is not from the LDAP client - the accepted connection will be closed and new + // one will be accepted + System.err.println("SSLSocketFactory connection has been established, but originated not from" + + " the test's LDAP client:" + acceptedSocket); + } + } } catch (Exception e) { - break; + System.err.println("Server socket. Failure to accept connection:" + e.getMessage()); } } } @@ -163,28 +216,26 @@ public int getLocalPort() { return serverSock.getLocalPort(); } - public boolean accepting() { - return accepting; - } - public void close() throws IOException { serverSock.close(); } } public class DeadSSLLdapTimeoutTest { + // com.sun.jndi.ldap.connect.timeout value to set + static final String CONNECT_TIMEOUT_MS = "10"; + + // com.sun.jndi.ldap.read.timeout value to set + static final String READ_TIMEOUT_MS = "3000"; static Hashtable<Object, Object> createEnv() { Hashtable<Object, Object> env = new Hashtable<>(11); env.put(Context.INITIAL_CONTEXT_FACTORY, - "com.sun.jndi.ldap.LdapCtxFactory"); + "com.sun.jndi.ldap.LdapCtxFactory"); return env; } public static void main(String[] args) throws Exception { - - InitialContext ctx = null; - // // Running this test serially as it seems to tickle a problem // on older kernels @@ -193,19 +244,24 @@ public static void main(String[] args) throws Exception { // and ssl enabled // this should exit with a SocketTimeoutException as the root cause // it should also use the connect timeout instead of the read timeout - System.out.println("Running connect timeout test with 10ms connect timeout, 3000ms read timeout & SSL"); + System.out.printf("Running connect timeout test with %sms connect timeout," + + " %sms read timeout & SSL%n", + CONNECT_TIMEOUT_MS, READ_TIMEOUT_MS); + Hashtable<Object, Object> sslenv = createEnv(); - sslenv.put("com.sun.jndi.ldap.connect.timeout", "10"); - sslenv.put("com.sun.jndi.ldap.read.timeout", "3000"); + // Setup connect timeout environment property + sslenv.put("com.sun.jndi.ldap.connect.timeout", CONNECT_TIMEOUT_MS); + // Setup read timeout environment property + sslenv.put("com.sun.jndi.ldap.read.timeout", READ_TIMEOUT_MS); + // Setup DeadSSLSocketFactory to track the client's first LDAP connection + sslenv.put("java.naming.ldap.factory.socket", "DeadSSLSocketFactory"); + // Use SSL protocol sslenv.put(Context.SECURITY_PROTOCOL, "ssl"); - boolean testFailed = - (new DeadServerTimeoutSSLTest(sslenv).call()) ? false : true; + boolean testFailed = !new DeadServerTimeoutSSLTest(sslenv).call(); if (testFailed) { throw new AssertionError("some tests failed"); } - } - } diff --git a/test/jdk/com/sun/jndi/ldap/DeadSSLSocketFactory.java b/test/jdk/com/sun/jndi/ldap/DeadSSLSocketFactory.java new file mode 100644 index 00000000000..2966abe9554 --- /dev/null +++ b/test/jdk/com/sun/jndi/ldap/DeadSSLSocketFactory.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import javax.net.SocketFactory; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import java.io.IOException; +import java.net.InetAddress; +import java.net.Socket; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; + +/* + * A custom socket factory used to override the default socket factory and track the LDAP client connection. + * Factory can create only one SSLSocket. See the DeadServerTimeoutSSLTest test. + */ +public class DeadSSLSocketFactory extends SocketFactory { + // Client socket that is used by LDAP connection + public static AtomicReference<SSLSocket> firstCreatedSocket = new AtomicReference<>(); + + // Boolean to track if connection socket has been opened + public static AtomicBoolean isConnectionOpened = new AtomicBoolean(false); + + // Default SSLSocketFactory that will be used for SSL socket creation + final SSLSocketFactory factory = (SSLSocketFactory)SSLSocketFactory.getDefault(); + + // Create unconnected socket + public Socket createSocket() throws IOException { + if (!isConnectionOpened.getAndSet(true)) { + System.err.println("DeadSSLSocketFactory: Creating unconnected socket"); + firstCreatedSocket.set((SSLSocket) factory.createSocket()); + return firstCreatedSocket.get(); + } else { + throw new RuntimeException("DeadSSLSocketFactory only allows creation of one SSL socket"); + } + } + + public DeadSSLSocketFactory() { + System.err.println("DeadSSLSocketFactory: Constructor call"); + } + + public static SocketFactory getDefault() { + System.err.println("DeadSSLSocketFactory: acquiring DeadSSLSocketFactory as default socket factory"); + return new DeadSSLSocketFactory(); + } + + @Override + public Socket createSocket(String host, int port) throws IOException { + // Not used by DeadSSLLdapTimeoutTest + return factory.createSocket(host, port); + } + + @Override + public Socket createSocket(String host, int port, InetAddress localHost, + int localPort) throws IOException { + // Not used by DeadSSLLdapTimeoutTest + return factory.createSocket(host, port, localHost, localPort); + } + + @Override + public Socket createSocket(InetAddress host, int port) throws IOException { + // Not used by DeadSSLLdapTimeoutTest + return factory.createSocket(host, port); + } + + @Override + public Socket createSocket(InetAddress address, int port, + InetAddress localAddress, int localPort) throws IOException { + // Not used by DeadSSLLdapTimeoutTest + return factory.createSocket(address, port, localAddress, localPort); + } +} + diff --git a/test/jdk/com/sun/jndi/ldap/LdapCBPropertiesTest.java b/test/jdk/com/sun/jndi/ldap/LdapCBPropertiesTest.java new file mode 100644 index 00000000000..16b4400310a --- /dev/null +++ b/test/jdk/com/sun/jndi/ldap/LdapCBPropertiesTest.java @@ -0,0 +1,196 @@ +/* + * Copyright (c) 2020, Azul Systems, Inc. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8245527 + * @library lib/ /test/lib + * @run main/othervm LdapCBPropertiesTest true true com.sun.jndi.ldap.tls.cbtype tls-server-end-point + * @run main/othervm LdapCBPropertiesTest false false com.sun.jndi.ldap.tls.cbtype tls-server-end-point + * @run main/othervm LdapCBPropertiesTest true true com.sun.jndi.ldap.tls.cbtype tls-server-end-point com.sun.jndi.ldap.connect.timeout 2000 + * @run main/othervm LdapCBPropertiesTest false false com.sun.jndi.ldap.tls.cbtype tls-server-end-point com.sun.jndi.ldap.connect.timeout 2000 + * @run main/othervm LdapCBPropertiesTest false true com.sun.jndi.ldap.tls.cbtype tls-unknown + * @run main/othervm LdapCBPropertiesTest false true jdk.internal.sasl.tlschannelbinding value + * @summary test new JNDI property to control the Channel Binding data + */ + +import javax.naming.AuthenticationException; +import javax.naming.CommunicationException; +import javax.naming.Context; +import javax.naming.NamingException; +import javax.naming.directory.DirContext; +import javax.naming.directory.InitialDirContext; +import java.net.InetAddress; +import java.net.URI; +import java.util.Hashtable; + +import org.ietf.jgss.GSSException; + +import javax.net.ssl.SSLException; +import javax.net.ssl.SSLServerSocket; +import javax.net.ssl.SSLServerSocketFactory; +import javax.security.sasl.SaslException; + +import jdk.test.lib.net.URIBuilder; + +public class LdapCBPropertiesTest { + /* + * Where do we find the keystores? + */ + static String pathToStores = "../../../../javax/net/ssl/etc"; + static String keyStoreFile = "keystore"; + static String trustStoreFile = "truststore"; + static String passwd = "passphrase"; + + static boolean debug = false; + + public static void main(String[] args) throws Exception { + String keyFilename = + System.getProperty("test.src", "./") + "/" + pathToStores + + "/" + keyStoreFile; + String trustFilename = + System.getProperty("test.src", "./") + "/" + pathToStores + + "/" + trustStoreFile; + + System.setProperty("javax.net.ssl.keyStore", keyFilename); + System.setProperty("javax.net.ssl.keyStorePassword", passwd); + System.setProperty("javax.net.ssl.trustStore", trustFilename); + System.setProperty("javax.net.ssl.trustStorePassword", passwd); + + if (debug) + System.setProperty("javax.net.debug", "all"); + + /* + * Start the tests. + */ + new LdapCBPropertiesTest(args); + } + + /* + * Primary constructor, used to drive remainder of the test. + */ + LdapCBPropertiesTest(String[] args) throws Exception { + InetAddress loopback = InetAddress.getLoopbackAddress(); + SSLServerSocketFactory sslssf = + (SSLServerSocketFactory) SSLServerSocketFactory.getDefault(); + SSLServerSocket sslServerSocket = + (SSLServerSocket) sslssf.createServerSocket(0, 0, loopback); + int serverPort = sslServerSocket.getLocalPort(); + + try (var ignore = new BaseLdapServer(sslServerSocket).start()) { + doClientSide(serverPort, args); + } + } + + /* + * Define the client side of the test. + * + * The server should start at this time already + */ + void doClientSide(int serverPort, String[] args) throws Exception { + boolean passed = false; + boolean shouldPass = Boolean.parseBoolean(args[0]); + boolean shouldConnect = Boolean.parseBoolean(args[1]); + // set disableEndpointIdentification to disable hostname verification + if (shouldConnect) { + System.setProperty( + "com.sun.jndi.ldap.object.disableEndpointIdentification", "true"); + } + + // Set up the environment for creating the initial context + Hashtable env = new Hashtable(); + URI uri = URIBuilder.newBuilder() + .scheme("ldaps") + .loopback() + .port(serverPort) + .build(); + env.put(Context.PROVIDER_URL, uri.toString()); + env.put(Context.INITIAL_CONTEXT_FACTORY, + "com.sun.jndi.ldap.LdapCtxFactory"); + env.put(Context.SECURITY_AUTHENTICATION, "GSSAPI"); + + // read properties + for (int i = 2; i < args.length; i += 2) { + env.put(args[i], args[i + 1]); + if (debug) + System.out.println("Env=" + args[i] + "=" + args[i + 1]); + } + + try { + DirContext ctx = new InitialDirContext(env); + passed = shouldPass; + ctx.close(); + } catch (NamingException ne) { + // only NamingException is allowed + if (debug) + System.out.println("Exception=" + ne + " cause=" + ne.getRootCause()); + passed = handleNamingException(ne, shouldPass, shouldConnect); + } catch(Exception e) { + System.err.println("Failed: caught an unexpected Exception - " + e); + throw e; + } finally { + // test if internal property accessible to application + if(shouldPass && + env.get("jdk.internal.sasl.tlschannelbinding") != null) { + throw new Exception( + "Test FAILED: jdk.internal.sasl.tlschannelbinding should not be accessible"); + } + } + if (!passed) { + throw new Exception( + "Test FAILED: NamingException exception should be thrown"); + } + System.out.println("Test PASSED"); + } + + private static boolean handleNamingException(NamingException ne, boolean shouldPass, boolean shouldConnect) + throws NamingException { + if (ne instanceof AuthenticationException && + ne.getRootCause() instanceof SaslException) { + SaslException saslEx = (SaslException) ne.getRootCause(); + if (shouldConnect && saslEx.getCause() instanceof GSSException) { + // SSL connection successful, expected exception from SaslClient + if (shouldPass) + return true; + } + } + if (!shouldConnect) { + // SSL handshake fails + Exception ex = ne; + while(ex != null && !(ex instanceof CommunicationException)) { + ex = (Exception)ex.getCause(); + } + if (ex != null) { + if (ex.getCause() instanceof SSLException) { + if (!shouldPass) + return true; + } + } + } + if (!shouldPass && ne.getRootCause() == null) { + // Expected exception caused by Channel Binding parameter inconsistency + return true; + } + throw ne; + } +} diff --git a/test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java b/test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java index 92528677453..3b9f7c1b9a5 100644 --- a/test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java +++ b/test/jdk/com/sun/jndi/ldap/blits/AddTests/AddNewEntry.java @@ -27,7 +27,7 @@ * @summary Verify capability to add a new entry to the directory using the * ADD operation. * @modules java.naming/com.sun.jndi.ldap - * @library ../../lib/ /javax/naming/module/src/test/test/ + * @library /test/lib ../../lib/ /javax/naming/module/src/test/test/ * @build LDAPServer LDAPTestUtils * @run main/othervm AddNewEntry */ @@ -41,19 +41,36 @@ import javax.naming.directory.InitialDirContext; import javax.naming.directory.SearchControls; import javax.naming.directory.SearchResult; +import java.net.InetAddress; +import java.net.InetSocketAddress; import java.net.ServerSocket; +import java.net.SocketAddress; import java.util.Hashtable; +import jdk.test.lib.net.URIBuilder; public class AddNewEntry { public static void main(String[] args) throws Exception { - ServerSocket serverSocket = new ServerSocket(0); + // Create unbound server socket + ServerSocket serverSocket = new ServerSocket(); + + // Bind it to the loopback address + SocketAddress sockAddr = new InetSocketAddress( + InetAddress.getLoopbackAddress(), 0); + serverSocket.bind(sockAddr); + + // Construct the provider URL for LDAPTestUtils + String providerURL = URIBuilder.newBuilder() + .scheme("ldap") + .loopback() + .port(serverSocket.getLocalPort()) + .buildUnchecked().toString(); Hashtable<Object, Object> env; // initialize test - env = LDAPTestUtils - .initEnv(serverSocket, AddNewEntry.class.getName(), args, true); + env = LDAPTestUtils.initEnv(serverSocket, providerURL, + AddNewEntry.class.getName(), args, true); /* Build attribute set */ String[] ids = { "objectClass", "sn", "cn", "telephoneNumber", "mail", diff --git a/test/jdk/com/sun/jndi/ldap/lib/LDAPTestUtils.java b/test/jdk/com/sun/jndi/ldap/lib/LDAPTestUtils.java index dc3ec74e06c..c44cc4aed98 100644 --- a/test/jdk/com/sun/jndi/ldap/lib/LDAPTestUtils.java +++ b/test/jdk/com/sun/jndi/ldap/lib/LDAPTestUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 @@ -50,12 +50,17 @@ public class LDAPTestUtils { * Process command line arguments and return properties in a Hashtable. */ public static Hashtable<Object, Object> initEnv(String testname, - String[] args) { + String[] args) { return initEnv(null, testname, args, false); } public static Hashtable<Object, Object> initEnv(ServerSocket socket, - String testname, String[] args, boolean authInfo) { + String testname, String[] args, boolean authInfo) { + return initEnv(socket, null, testname, args, authInfo); + } + + public static Hashtable<Object, Object> initEnv(ServerSocket socket, String providerUrl, + String testname, String[] args, boolean authInfo) { Hashtable<Object, Object> env = new Hashtable<>(); String root = "o=IMC,c=US"; @@ -103,8 +108,9 @@ public static Hashtable<Object, Object> initEnv(ServerSocket socket, if (socket != null) { env.put(TEST_LDAP_SERVER_THREAD, startLDAPServer(socket, getCaptureFile(testname))); - env.put("java.naming.provider.url", - "ldap://localhost:" + socket.getLocalPort()); + String url = providerUrl != null ? providerUrl : + "ldap://localhost:" + socket.getLocalPort(); + env.put("java.naming.provider.url", url); } else { // for tests which run against remote server or no server // required diff --git a/test/jdk/com/sun/net/httpserver/AuthenticatorTest b/test/jdk/com/sun/net/httpserver/AuthenticatorTest new file mode 100644 index 00000000000..1fe7f383035 --- /dev/null +++ b/test/jdk/com/sun/net/httpserver/AuthenticatorTest @@ -0,0 +1,60 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8251496 + * @summary Tests for methods in Authenticator + * @run testng/othervm AuthenticatorTest + */ + +import com.sun.net.httpserver.Authenticator; +import com.sun.net.httpserver.BasicAuthenticator; +import com.sun.net.httpserver.HttpPrincipal; +import org.testng.annotations.Test; + +import static org.testng.Assert.assertEquals; + + +public class AuthenticatorTest { + @Test + public void testFailure() { + var failureResult = new Authenticator.Failure(666); + assertEquals(failureResult.getResponseCode(), 666); + } + + @Test + public void testRetry() { + var retryResult = new Authenticator.Retry(333); + assertEquals(retryResult.getResponseCode(), 333); + } + + @Test + public void TestSuccess() { + var principal = new HttpPrincipal("test", "123"); + var successResult = new Authenticator.Success(principal); + assertEquals(successResult.getPrincipal(), principal); + assertEquals("test", principal.getName()); + assertEquals("123", principal.getRealm()); + } +} diff --git a/test/jdk/com/sun/net/httpserver/CreateHttpServerTest.java b/test/jdk/com/sun/net/httpserver/CreateHttpServerTest.java new file mode 100644 index 00000000000..370bd75cf34 --- /dev/null +++ b/test/jdk/com/sun/net/httpserver/CreateHttpServerTest.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8251496 + * @summary summary + * @run testng/othervm CreateHttpServerTest + */ + +import com.sun.net.httpserver.HttpServer; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.InetSocketAddress; + +import static org.testng.Assert.assertTrue; + +public class CreateHttpServerTest { + @Test + public void TestCreate() throws IOException { + var server = HttpServer.create(); + assertTrue(server instanceof HttpServer); + } + @Test + public void TestCreateWithParameters() throws IOException { + var addr = new InetSocketAddress(InetAddress.getLoopbackAddress(), 0); + var server = HttpServer.create(addr, 123); + assertTrue(server instanceof HttpServer); + } +} diff --git a/test/jdk/com/sun/net/httpserver/HeadersTest.java b/test/jdk/com/sun/net/httpserver/HeadersTest.java new file mode 100644 index 00000000000..aa09349002c --- /dev/null +++ b/test/jdk/com/sun/net/httpserver/HeadersTest.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8251496 + * @summary Tests for methods in Headers class + * @run testng/othervm HeadersTest + */ + +import com.sun.net.httpserver.Headers; +import org.testng.annotations.Test; + +import static org.testng.Assert.assertTrue; + +public class HeadersTest { + + @Test + public void TestDefaultConstructor() { + var headers = new Headers(); + assertTrue(headers.isEmpty()); + } +} diff --git a/test/jdk/com/sun/net/httpserver/HttpPrincipalTest.java b/test/jdk/com/sun/net/httpserver/HttpPrincipalTest.java new file mode 100644 index 00000000000..954232441bf --- /dev/null +++ b/test/jdk/com/sun/net/httpserver/HttpPrincipalTest.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8251496 + * @summary Tests for methods in HttpPrincipal + * @run testng/othervm HttpPrincipalTest + */ + +import com.sun.net.httpserver.HttpPrincipal; +import org.testng.annotations.Test; + +import static org.testng.Assert.assertEquals; + +public class HttpPrincipalTest { + + @Test + public void TestGetters() { + var principal = new HttpPrincipal("test", "123"); + assertEquals(principal.getUsername(), "test"); + assertEquals(principal.getRealm(), "123"); + } +} diff --git a/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java b/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java index 092bdb0c8ed..873dbfa7147 100644 --- a/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java +++ b/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -21,65 +21,51 @@ * questions. */ -import java.awt.*; -import java.awt.event.*; +import java.awt.Button; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; -/* - @test - @key headful - @bug 4411534 4517274 - @summary ensures that user's requestFocus() during applet initialization - is not ignored - @library ../../regtesthelpers - @build Util - @run main AppletInitialFocusTest1 +/** + * @test + * @key headful + * @bug 4411534 4517274 + * @summary ensures that user's requestFocus() during applet initialization + * is not ignored */ public class AppletInitialFocusTest1 extends Frame implements FocusListener { Button button1 = new Button("Button1"); Button button2 = new Button("Button2"); - - Object lock = new Object(); + private static volatile Object focused; public static void main(final String[] args) throws Exception { AppletInitialFocusTest1 app = new AppletInitialFocusTest1(); - app.init(); - Thread.sleep(10000); - } - - public void init() { - setSize(200, 200); - setLocationRelativeTo(null); - setLayout(new FlowLayout()); + try { + app.setSize(200, 200); + app.setLocationRelativeTo(null); + app.setLayout(new FlowLayout()); - Component parent = this; - while (parent != null && !(parent instanceof Window)) { - parent = parent.getParent(); - } - /* - * This applet is designed to be run only with appletviewer, - * so there always should be a toplevel frame. - */ - if (parent == null) { - synchronized (lock) { - System.err.println("appletviewer not running"); - System.exit(3); + app.button1.addFocusListener(app); + app.button2.addFocusListener(app); + app.add(app.button1); + app.add(app.button2); + app.setVisible(true); + app.button2.requestFocus(); + // wait for the very very last focus event + Thread.sleep(10000); + if (app.button2 != focused) { + throw new RuntimeException("Wrong focus owner: " + focused); } + } finally { + app.dispose(); } - button1.addFocusListener(this); - button2.addFocusListener(this); - add(button1); - add(button2); - setVisible(true); - button2.requestFocus(); } public void focusGained(FocusEvent e) { - if (e.getSource() == button1) { - synchronized (lock) { - throw new RuntimeException("failed: focus on the wrong button"); - } - } + focused = e.getSource(); + System.out.println("focused = " + focused); } public void focusLost(FocusEvent e) { diff --git a/test/jdk/java/awt/FontClass/CreateFont/DeleteFont.java b/test/jdk/java/awt/FontClass/CreateFont/DeleteFont.java index 9f15f36d4f8..7d5dc8dcf6c 100644 --- a/test/jdk/java/awt/FontClass/CreateFont/DeleteFont.java +++ b/test/jdk/java/awt/FontClass/CreateFont/DeleteFont.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -21,8 +21,11 @@ * questions. */ -import java.io.*; -import java.awt.*; +import java.io.ByteArrayInputStream; +import java.io.FileInputStream; +import java.io.InputStream; +import java.io.IOException; +import java.awt.Font; public class DeleteFont { @@ -55,19 +58,22 @@ public int read() { if (!gotException) { throw new RuntimeException("No expected IOException"); } - badRead(-2, Font.TRUETYPE_FONT); - badRead(8193, Font.TRUETYPE_FONT); - badRead(-2, Font.TYPE1_FONT); - badRead(8193, Font.TYPE1_FONT); + badRead(-2, 16, Font.TYPE1_FONT); + badRead(8193, 14, Font.TYPE1_FONT); + + badRead(-2, 12, Font.TRUETYPE_FONT); + badRead(8193, 10, Font.TRUETYPE_FONT); // Make sure GC has a chance to clean up before we exit. System.gc(); System.gc(); + Thread.sleep(5000); + System.gc(); System.gc(); } - static void badRead(final int retval, int fontType) { + static void badRead(final int retval, final int multiple, int fontType) { int num = 2; - byte[] buff = new byte[16*8192]; // Multiple of 8192 is important. + byte[] buff = new byte[multiple*8192]; // Multiple of 8192 is important. for (int ct=0; ct<num; ++ct) { try { Font.createFont( diff --git a/test/jdk/java/awt/FontClass/CreateFont/DeleteFont.sh b/test/jdk/java/awt/FontClass/CreateFont/DeleteFont.sh index 08b75c8eb9a..b9d102fc371 100644 --- a/test/jdk/java/awt/FontClass/CreateFont/DeleteFont.sh +++ b/test/jdk/java/awt/FontClass/CreateFont/DeleteFont.sh @@ -20,7 +20,8 @@ # questions. # @test -# @bug 6189812 6380357 6632886 +# @bug 6189812 6380357 6632886 8249142 +# @key intermittent # @summary Verify that temporary font files are deleted on exit. if [ -z "${TESTSRC}" ]; then diff --git a/test/jdk/java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java b/test/jdk/java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java index 35d2ccff8f5..3373e72724f 100644 --- a/test/jdk/java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java +++ b/test/jdk/java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -63,7 +63,7 @@ public class CycleDMImage extends Component implements Runnable, KeyListener { boolean earlyExit = false; Image rImage = null, wImage = null, bImage = null; int imgSize = 10; - Robot robot = null; + static Robot robot = null; volatile static boolean done = false; static String errorMessage = null; @@ -106,15 +106,6 @@ static void delay(long ms) { } public boolean checkResult(DisplayMode dm) { - if (robot == null) { - try { - robot = new Robot(); - } - catch (Exception e) { - errorMessage = "Problems creating Robot"; - return false; - } - } Rectangle bounds = getGraphicsConfiguration().getBounds(); int pixels[] = new int[imgSize * 4]; BufferedImage clientPixels = @@ -175,6 +166,7 @@ public void run() { gd.setFullScreenWindow((Window) getParent()); // First, delay a bit just to let the fullscreen window // settle down before switching display modes + robot.waitForIdle(); delay(1000); if (!gd.isDisplayChangeSupported()) { @@ -197,10 +189,12 @@ public void run() { boolean skip = false; for (final DisplayMode dmUnique : dmSubset) { int bitDepth = dm.getBitDepth(); - if (bitDepth == 24 || - (dmUnique.getWidth() == dm.getWidth() && - dmUnique.getHeight() == dm.getHeight() && - dmUnique.getBitDepth() == dm.getBitDepth())) { + int width = dm.getWidth(); + int height = dm.getHeight(); + if (bitDepth == 24 || width <= 800 || height <= 600 || + (dmUnique.getWidth() == width && + dmUnique.getHeight() == height && + dmUnique.getBitDepth() == bitDepth)) { skip = true; break; } @@ -265,7 +259,8 @@ public void keyPressed(KeyEvent e) { public void keyReleased(KeyEvent e) { } - public static void main(String args[]) { + public static void main(String args[]) throws Exception { + robot = new Robot(); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); for (final GraphicsDevice gd: ge.getScreenDevices()) { if (!gd.isFullScreenSupported()) { @@ -274,6 +269,7 @@ public static void main(String args[]) { continue; } done = false; + DisplayMode currentDM = gd.getDisplayMode(); Frame frame = new Frame(gd.getDefaultConfiguration()); try { frame.setSize(400, 400); @@ -292,6 +288,8 @@ public static void main(String args[]) { } } } finally { + gd.setDisplayMode(currentDM); + gd.setFullScreenWindow(null); frame.dispose(); } if (errorMessage != null) { @@ -299,7 +297,7 @@ public static void main(String args[]) { } // delay a bit just to let the fullscreen window disposing complete // before switching to next display - delay(4000); + delay(10000); } } } diff --git a/test/jdk/java/awt/Robot/CheckCommonColors/CheckCommonColors.java b/test/jdk/java/awt/Robot/CheckCommonColors/CheckCommonColors.java index ddf4f7e7fdb..061b8953200 100644 --- a/test/jdk/java/awt/Robot/CheckCommonColors/CheckCommonColors.java +++ b/test/jdk/java/awt/Robot/CheckCommonColors/CheckCommonColors.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 @@ -22,11 +22,19 @@ */ import java.awt.Color; +import java.awt.Dimension; import java.awt.Frame; import java.awt.Point; +import java.awt.Rectangle; import java.awt.Robot; +import java.awt.Toolkit; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; import java.util.List; +import javax.imageio.ImageIO; + /** * @test * @key headful @@ -58,6 +66,7 @@ private static void test() { Color.GREEN, Color.MAGENTA, Color.CYAN, Color.BLUE)) { frame.dispose(); + robot.waitForIdle(); frame.setBackground(color); frame.setVisible(true); checkPixels(color); @@ -68,14 +77,25 @@ private static void checkPixels(final Color color) { int attempt = 0; while (true) { Point p = frame.getLocationOnScreen(); - Color pixel = robot.getPixelColor(p.x + frame.getWidth() / 2, - p.y + frame.getHeight() / 2); + p.translate(frame.getWidth() / 2, frame.getHeight() / 2); + Color pixel = robot.getPixelColor(p.x, p.y); if (color.equals(pixel)) { return; } - if (attempt > 10) { + frame.repaint(); + if (attempt > 11) { System.err.println("Expected: " + color); System.err.println("Actual: " + pixel); + System.err.println("Point: " + p); + Dimension screenSize = + Toolkit.getDefaultToolkit().getScreenSize(); + BufferedImage screen = robot.createScreenCapture( + new Rectangle(screenSize)); + try { + File output = new File("ScreenCapture.png"); + System.err.println("Dump screen to: " + output); + ImageIO.write(screen, "png", output); + } catch (IOException ex) {} throw new RuntimeException("Too many attempts: " + attempt); } // skip Robot.waitForIdle to speedup the common case, but also take diff --git a/test/jdk/java/awt/font/TextLayout/ArabicDiacriticTest.java b/test/jdk/java/awt/font/TextLayout/ArabicDiacriticTest.java index de1fb1373db..1fcf99b4f64 100644 --- a/test/jdk/java/awt/font/TextLayout/ArabicDiacriticTest.java +++ b/test/jdk/java/awt/font/TextLayout/ArabicDiacriticTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -22,9 +22,8 @@ */ /* @test - * @key headful * @summary verify Arab Diacritic Positioning - * @bug 8168759 + * @bug 8168759 8248352 */ import java.awt.Font; @@ -46,19 +45,18 @@ public class ArabicDiacriticTest { static final String STR1 = "\u0644\u0639\u064e\u0629"; static final String STR2 = "\u0644\u0639\u0629"; - static JFrame frame; static final String FONT = "DejaVu Sans"; - public static void main(String args[]) throws Exception { - showText(); // for a human + public static void main(String[] args) throws Exception { + if ((args.length > 0) && (args[0].equals("-show"))) { + showText(); // for a human + } measureText(); // for the test harness - Thread.sleep(5000); - frame.dispose(); } static void showText() { SwingUtilities.invokeLater(() -> { - frame = new JFrame(); + JFrame frame = new JFrame(); JLabel label = new JLabel(SAMPLE); Font font = new Font(FONT, Font.PLAIN, 36); label.setFont(font); diff --git a/test/jdk/java/awt/image/MultiResolutionImage/MultiResolutionImageObserverTest.java b/test/jdk/java/awt/image/MultiResolutionImage/MultiResolutionImageObserverTest.java index 50ba7638ab9..6cf57165254 100644 --- a/test/jdk/java/awt/image/MultiResolutionImage/MultiResolutionImageObserverTest.java +++ b/test/jdk/java/awt/image/MultiResolutionImage/MultiResolutionImageObserverTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 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 @@ -40,7 +40,7 @@ public class MultiResolutionImageObserverTest { - private static final int TIMEOUT = 500; + private static final int TIMEOUT = 2000; public static void main(String[] args) throws Exception { @@ -70,7 +70,7 @@ private static void waitForImageLoading(LoadImageObserver observer, long endTime = System.currentTimeMillis() + TIMEOUT; while (!observer.loaded && System.currentTimeMillis() < endTime) { - Thread.sleep(TIMEOUT / 10); + Thread.sleep(TIMEOUT / 100); } if (!observer.loaded) { @@ -101,7 +101,7 @@ private static void generateImage(int scale) throws Exception { private static class LoadImageObserver implements ImageObserver { private final int infoflags; - private boolean loaded; + private volatile boolean loaded; public LoadImageObserver(int flags) { this.infoflags = flags; diff --git a/test/jdk/java/awt/print/Dialog/PrintDlgApp.java b/test/jdk/java/awt/print/Dialog/PrintDlgApp.java index 7e98b327eb4..3a84eb532f6 100644 --- a/test/jdk/java/awt/print/Dialog/PrintDlgApp.java +++ b/test/jdk/java/awt/print/Dialog/PrintDlgApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 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 @@ -23,76 +23,86 @@ /* @test - @bug 4865976 7158366 - @summary Pass if it program exits. + @key printer + @bug 4865976 7158366 7179006 + @summary Pass if program exits. @run main/manual PrintDlgApp */ -import java.awt.*; -import java.awt.print.*; -import javax.print.attribute.*; + +import java.io.File; +import java.net.URI; +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.print.PageFormat; +import java.awt.print.Printable; +import java.awt.print.PrinterJob; +import java.awt.print.PrinterException; +import javax.print.attribute.HashPrintRequestAttributeSet; +import javax.print.attribute.PrintRequestAttributeSet; import javax.print.attribute.standard.Copies; import javax.print.attribute.standard.Destination; -import java.util.Locale; -import javax.print.*; +public class PrintDlgApp implements Printable { -class PrintDlgApp implements Printable { - /** - * Constructor - */ - public PrintDlgApp() { - super(); - } - /** - * Starts the application. - */ - public static void main(java.lang.String[] args) { - PrintDlgApp pd = new PrintDlgApp(); - PrinterJob pj = PrinterJob.getPrinterJob(); - System.out.println(pj); - PrintRequestAttributeSet pSet = new HashPrintRequestAttributeSet(); - pSet.add(new Copies(1)); - //PageFormat pf = pj.pageDialog(pSet); - PageFormat pf = new PageFormat(); - System.out.println("Setting Printable...pf = "+pf); - if (pf == null) { - return; - } - pj.setPrintable(pd,pf); + public PrintDlgApp() {} - //try { pj.setPrintService(services[0]); } catch(Exception e) { e.printStackTrace(); } - pSet.add(new Destination(new java.io.File("./out.prn").toURI())); - System.out.println("open PrintDialog.."); - for (int i=0; i<2; i++) { - if (pj.printDialog(pSet)) { - try { - System.out.println("About to print the data ..."); - pj.print(pSet); - System.out.println("Printed"); - } - catch (PrinterException pe) { - pe.printStackTrace(); - } - } - } + public static void main(String[] args) { + PrinterJob pj = PrinterJob.getPrinterJob(); + if (pj.getPrintService() == null) { + System.out.println("No printers installed. Skipping test"); + return; + } - } + PrintDlgApp pd = new PrintDlgApp(); + PageFormat pf = new PageFormat(); + pj.setPrintable(pd, pf); + + PrintRequestAttributeSet pSet = new HashPrintRequestAttributeSet(); + pSet.add(new Copies(1)); + + Destination dest = null; + for (int i=0; i<2; i++) { + File file = new File("./out"+i+".prn"); + dest = new Destination(file.toURI()); + pSet.add(dest); + System.out.println("open PrintDialog."); + if (pj.printDialog(pSet)) { + // In case tester changes the destination : + dest = (Destination)pSet.get(Destination.class); + System.out.println("DEST="+dest); + if (dest != null) { + URI uri = dest.getURI(); + file = new File(uri.getSchemeSpecificPart()); + System.out.println("will be checking for file " + file); + } + try { + System.out.println("About to print the data ..."); + pj.print(pSet); + System.out.println("Printed."); + } + catch (PrinterException pe) { + pe.printStackTrace(); + } + } + if (dest != null && !file.exists()) { + throw new RuntimeException("No file created"); + } + } + } - //printable interface - public int print(Graphics g, PageFormat pf, int pi) throws -PrinterException { + public int print(Graphics g, PageFormat pf, int pi) throws PrinterException { - if (pi > 0) { - System.out.println("pi is greater than 0"); - return Printable.NO_SUCH_PAGE; - } - // Simply draw two rectangles - Graphics2D g2 = (Graphics2D)g; - g2.setColor(Color.black); - g2.translate(pf.getImageableX(), pf.getImageableY()); - g2.drawRect(1,1,200,300); - g2.drawRect(1,1,25,25); - System.out.println("print method called "+pi); - return Printable.PAGE_EXISTS; + if (pi > 0) { + return Printable.NO_SUCH_PAGE; } + // Simply draw two rectangles + Graphics2D g2 = (Graphics2D)g; + g2.setColor(Color.black); + g2.translate(pf.getImageableX(), pf.getImageableY()); + g2.drawRect(1,1,200,300); + g2.drawRect(1,1,25,25); + System.out.println("print method called "+pi); + return Printable.PAGE_EXISTS; + } } diff --git a/test/jdk/java/awt/print/PrinterJob/PrintToFileTest.java b/test/jdk/java/awt/print/PrinterJob/PrintToFileTest.java new file mode 100644 index 00000000000..c3e0e8a0821 --- /dev/null +++ b/test/jdk/java/awt/print/PrinterJob/PrintToFileTest.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @key printer + * @bug 7179006 + * @summary Confirm printing to file works. +*/ + +import java.io.File; +import java.net.URI; +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.print.PageFormat; +import java.awt.print.Printable; +import java.awt.print.PrinterJob; +import java.awt.print.PrinterException; +import javax.print.attribute.HashPrintRequestAttributeSet; +import javax.print.attribute.PrintRequestAttributeSet; +import javax.print.attribute.standard.Destination; + +public class PrintToFileTest implements Printable { + + public PrintToFileTest() {} + + public static void main(String[] args) throws Exception { + PrinterJob pj = PrinterJob.getPrinterJob(); + if (pj.getPrintService() == null) { + System.out.println("No printers installed. Skipping test."); + return; + } + pj.setPrintable(new PrintToFileTest(), new PageFormat()); + PrintRequestAttributeSet pSet = new HashPrintRequestAttributeSet(); + File file = new File("./out.prn"); + pSet.add(new Destination(file.toURI())); + pj.print(pSet); + if (!file.exists()) { + throw new RuntimeException("No file created"); + } + } + + public int print(Graphics g, PageFormat pf, int pi) throws + PrinterException { + + if (pi > 0) { + return Printable.NO_SUCH_PAGE; + } + Graphics2D g2 = (Graphics2D)g; + g2.setColor(Color.black); + g2.translate(pf.getImageableX(), pf.getImageableY()); + g2.drawRect(1,1,200,300); + g2.drawRect(1,1,25,25); + return Printable.PAGE_EXISTS; + } +} diff --git a/test/jdk/java/foreign/TestArrays.java b/test/jdk/java/foreign/TestArrays.java index 96397bd041b..2a5d597b858 100644 --- a/test/jdk/java/foreign/TestArrays.java +++ b/test/jdk/java/foreign/TestArrays.java @@ -24,7 +24,7 @@ /* * @test - * @run testng TestArrays + * @run testng/othervm -Dforeign.restricted=permit TestArrays */ import jdk.incubator.foreign.MemoryAddress; @@ -105,10 +105,11 @@ public void testArrays(Consumer<MemoryAddress> init, SequenceLayout layout) { } } - @Test(expectedExceptions = { UnsupportedOperationException.class, - IllegalArgumentException.class }) + @Test(expectedExceptions = UnsupportedOperationException.class) public void testTooBigForArray() { - MemorySegment.allocateNative((long) Integer.MAX_VALUE * 2).toByteArray(); + try (MemorySegment segment = MemorySegment.ofNativeRestricted(MemoryAddress.NULL, (long)Integer.MAX_VALUE + 10L, null, null, null)) { + segment.toByteArray(); + } } @Test(expectedExceptions = IllegalStateException.class) diff --git a/test/jdk/java/foreign/TestByteBuffer.java b/test/jdk/java/foreign/TestByteBuffer.java index 984763907a6..5960d95a5d4 100644 --- a/test/jdk/java/foreign/TestByteBuffer.java +++ b/test/jdk/java/foreign/TestByteBuffer.java @@ -27,7 +27,7 @@ * @test * @modules java.base/sun.nio.ch * jdk.incubator.foreign/jdk.internal.foreign - * @run testng TestByteBuffer + * @run testng/othervm -Dforeign.restricted=permit TestByteBuffer */ @@ -458,10 +458,9 @@ public void testBufferOnClosedScope() { byteBuffer.get(); // should throw } - @Test(expectedExceptions = { UnsupportedOperationException.class, - IllegalArgumentException.class }) + @Test(expectedExceptions = UnsupportedOperationException.class) public void testTooBigForByteBuffer() { - try (MemorySegment segment = MemorySegment.allocateNative((long)Integer.MAX_VALUE + 10L)) { + try (MemorySegment segment = MemorySegment.ofNativeRestricted(MemoryAddress.NULL, (long)Integer.MAX_VALUE + 10L, null, null, null)) { segment.asByteBuffer(); } } diff --git a/test/jdk/java/lang/annotation/typeAnnotations/TypeVariableBoundParameterIndex.java b/test/jdk/java/lang/annotation/typeAnnotations/TypeVariableBoundParameterIndex.java new file mode 100644 index 00000000000..12dc344a002 --- /dev/null +++ b/test/jdk/java/lang/annotation/typeAnnotations/TypeVariableBoundParameterIndex.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8202473 + * @summary Annotations on type variables with multiple bounds should be placed on their respective bound + * @compile TypeVariableBoundParameterIndex.java + * @run main TypeVariableBoundParameterIndex + */ + +import java.lang.annotation.Annotation; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.lang.reflect.AnnotatedParameterizedType; +import java.lang.reflect.AnnotatedType; +import java.lang.reflect.TypeVariable; +import java.util.concurrent.Callable; + +/* + * A class might have multiple bounds as parameterized types with type annotations on these bounds. + * This test assures that these bound annotations are resolved correctly. + */ +public class TypeVariableBoundParameterIndex { + + public static void main(String[] args) throws Exception { + TypeVariable<?>[] variables = Sample.class.getTypeParameters(); + + for (int i = 0; i < 2; i++) { + TypeVariable<?> variable = variables[i]; + AnnotatedType[] bounds = variable.getAnnotatedBounds(); + AnnotatedType bound = bounds[0]; + AnnotatedParameterizedType parameterizedType = (AnnotatedParameterizedType) bound; + AnnotatedType[] actualTypeArguments = parameterizedType.getAnnotatedActualTypeArguments(); + Annotation[] annotations = actualTypeArguments[0].getAnnotations(); + if (annotations.length != 1 || annotations[0].annotationType() != TypeAnnotation.class) { + throw new AssertionError(); + } + } + + TypeVariable<?> variable = variables[2]; + AnnotatedType[] bounds = variable.getAnnotatedBounds(); + AnnotatedType bound = bounds[0]; + AnnotatedParameterizedType parameterizedType = (AnnotatedParameterizedType) bound; + AnnotatedType[] actualTypeArguments = parameterizedType.getAnnotatedActualTypeArguments(); + Annotation[] annotations = actualTypeArguments[0].getAnnotations(); + if (annotations.length != 0) { + throw new AssertionError(); + } + } + + @Retention(RetentionPolicy.RUNTIME) + @Target(ElementType.TYPE_USE) + @interface TypeAnnotation { } + + static class Sample<T extends Callable<@TypeAnnotation ?>, S extends Callable<@TypeAnnotation ?>, U extends Callable<?>> { } +} diff --git a/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java b/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java index a62067af971..86e4ae1b0a1 100644 --- a/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java +++ b/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java @@ -115,8 +115,8 @@ public void hiddenClass() throws Throwable { Class<?>[] intfs = c.getInterfaces(); assertTrue(c.isHidden()); assertFalse(c.isPrimitive()); - assertTrue(intfs.length == 1); - assertTrue(intfs[0] == HiddenTest.class); + assertTrue(intfs.length == 1 || intfs.length == 2); + assertTrue(intfs[0] == HiddenTest.class || (intfs.length == 2 && intfs[1] == HiddenTest.class)); assertTrue(c.getCanonicalName() == null); String hcName = "HiddenClass"; @@ -348,8 +348,8 @@ public void hiddenCantReflect() throws Throwable { Class<?> c = t.getClass(); Class<?>[] intfs = c.getInterfaces(); - assertTrue(intfs.length == 1); - assertTrue(intfs[0] == HiddenTest.class); + assertTrue(intfs.length == 1 || intfs.length == 2); + assertTrue(intfs[0] == HiddenTest.class || (intfs.length == 2 && intfs[1] == HiddenTest.class)); try { // this would cause loading of class HiddenCantReflect and NCDFE due diff --git a/test/jdk/java/lang/invoke/lambda/LambdaEagerInitTest.java b/test/jdk/java/lang/invoke/lambda/LambdaEagerInitTest.java new file mode 100644 index 00000000000..4fbdeb691c5 --- /dev/null +++ b/test/jdk/java/lang/invoke/lambda/LambdaEagerInitTest.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8242451 + * @library /test/lib + * @summary Test that the LAMBDA_INSTANCE$ field is present depending + * on disableEagerInitialization + * @run main LambdaEagerInitTest + * @run main/othervm -Djdk.internal.lambda.disableEagerInitialization=true LambdaEagerInitTest + */ + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; +import java.util.stream.Collectors; + +import static jdk.test.lib.Asserts.*; + +public class LambdaEagerInitTest { + + interface H {Object m(String s);} + + private static Set<String> allowedStaticFields(boolean nonCapturing) { + Set<String> s = new HashSet<>(); + if (Boolean.getBoolean("jdk.internal.lambda.disableEagerInitialization")) { + if (nonCapturing) s.add("LAMBDA_INSTANCE$"); + } + return s; + } + + private void nonCapturingLambda() { + H la = s -> s; + assertEquals("hi", la.m("hi")); + Class<? extends H> c1 = la.getClass(); + verifyLambdaClass(la.getClass(), true); + } + + private void capturingLambda() { + H la = s -> concat(s, "foo"); + assertEquals("hi foo", la.m("hi")); + verifyLambdaClass(la.getClass(), false); + } + + private void verifyLambdaClass(Class<?> c, boolean nonCapturing) { + Set<String> staticFields = new HashSet<>(); + Set<String> instanceFields = new HashSet<>(); + for (Field f : c.getDeclaredFields()) { + if (Modifier.isStatic(f.getModifiers())) { + staticFields.add(f.getName()); + } else { + instanceFields.add(f.getName()); + } + } + assertEquals(instanceFields.size(), nonCapturing ? 0 : 1, "Unexpected instance fields"); + assertEquals(staticFields, allowedStaticFields(nonCapturing), "Unexpected static fields"); + } + + private String concat(String... ss) { + return Arrays.stream(ss).collect(Collectors.joining(" ")); + } + + public static void main(String[] args) { + LambdaEagerInitTest test = new LambdaEagerInitTest(); + test.nonCapturingLambda(); + test.capturingLambda(); + } +} diff --git a/test/jdk/java/math/BigInteger/largeMemory/SymmetricRangeTests.java b/test/jdk/java/math/BigInteger/largeMemory/SymmetricRangeTests.java index c0b4812bfcd..e71afe6a028 100644 --- a/test/jdk/java/math/BigInteger/largeMemory/SymmetricRangeTests.java +++ b/test/jdk/java/math/BigInteger/largeMemory/SymmetricRangeTests.java @@ -26,7 +26,7 @@ * @bug 6910473 8021204 8021203 9005933 8074460 8078672 * @summary Test range of BigInteger values (use -Dseed=X to set PRNG seed) * @library /test/lib - * @requires (sun.arch.data.model == "64" & os.maxMemory > 8g) + * @requires (sun.arch.data.model == "64" & os.maxMemory >= 10g) * @run main/timeout=180/othervm -Xmx8g -XX:+CompactStrings SymmetricRangeTests * @author Dmitry Nadezhin * @key randomness diff --git a/test/jdk/java/nio/charset/CharsetDecoder/CoderMalfunctionErrorTest.java b/test/jdk/java/nio/charset/CharsetDecoder/CoderMalfunctionErrorTest.java new file mode 100644 index 00000000000..79091071ea3 --- /dev/null +++ b/test/jdk/java/nio/charset/CharsetDecoder/CoderMalfunctionErrorTest.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 8253832 + * @run testng CoderMalfunctionErrorTest + * @summary Check CoderMalfunctionError is thrown for any RuntimeException + * on CharsetDecoder.decodeLoop() invocation. + */ + +import org.testng.annotations.Test; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.*; + +@Test +public class CoderMalfunctionErrorTest { + @Test (expectedExceptions = CoderMalfunctionError.class) + public void testDecodeLoop() { + new CharsetDecoder(StandardCharsets.US_ASCII, 1, 1) { + @Override + protected CoderResult decodeLoop(ByteBuffer byteBuffer, CharBuffer charBuffer) { + throw new RuntimeException("This exception should be wrapped in CoderMalfunctionError"); + } + }.decode(null, null, true); + } +} diff --git a/test/jdk/java/nio/charset/CharsetEncoder/CoderMalfunctionErrorTest.java b/test/jdk/java/nio/charset/CharsetEncoder/CoderMalfunctionErrorTest.java new file mode 100644 index 00000000000..ffd73164d9f --- /dev/null +++ b/test/jdk/java/nio/charset/CharsetEncoder/CoderMalfunctionErrorTest.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 8253832 + * @run testng CoderMalfunctionErrorTest + * @summary Check CoderMalfunctionError is thrown for any RuntimeException + * on CharsetEncoder.encodeLoop() invocation. + */ + +import org.testng.annotations.Test; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.*; + +@Test +public class CoderMalfunctionErrorTest { + @Test (expectedExceptions = CoderMalfunctionError.class) + public void testEncodeLoop() { + new CharsetEncoder(StandardCharsets.US_ASCII, 1, 1) { + @Override + protected CoderResult encodeLoop(CharBuffer charBuffer, ByteBuffer byteBuffer) { + throw new RuntimeException("This exception should be wrapped in CoderMalfunctionError"); + } + }.encode(null, null, true); + } +} diff --git a/test/jdk/java/security/KeyAgreement/KeyAgreementTest.java b/test/jdk/java/security/KeyAgreement/KeyAgreementTest.java index 713eecae4d4..1e16c157fed 100644 --- a/test/jdk/java/security/KeyAgreement/KeyAgreementTest.java +++ b/test/jdk/java/security/KeyAgreement/KeyAgreementTest.java @@ -31,8 +31,6 @@ * this test file was covered before with JDK-4936763. * @run main/othervm -Djdk.crypto.KeyAgreement.legacyKDF=true KeyAgreementTest * DiffieHellman DH SunJCE - * @run main/othervm -Djdk.sunec.disableNative=false KeyAgreementTest - * ECDHNative EC SunEC * @run main KeyAgreementTest ECDH EC SunEC * @run main KeyAgreementTest XDH XDH SunEC */ @@ -56,10 +54,6 @@ public static void main(String[] args) throws Exception { String provider = args[2]; System.out.println("Testing " + kaAlgo); AlgoSpec aSpec = AlgoSpec.valueOf(AlgoSpec.class, kaAlgo); - // Switch kaAlgo to ECDH as it is used for algorithm names - if (kaAlgo.equals("ECDHNative")) { - kaAlgo = "ECDH"; - } List<AlgorithmParameterSpec> specs = aSpec.getAlgorithmParameterSpecs(); for (AlgorithmParameterSpec spec : specs) { testKeyAgreement(provider, kaAlgo, kpgAlgo, spec); @@ -74,26 +68,7 @@ private enum AlgoSpec { // EC curve supported for KeyGeneration can found between intersection // of curves define in // "java.base/share/classes/sun/security/util/CurveDB.java" - // and - // "jdk.crypto.ec/share/native/libsunec/impl/ecdecode.c" - ECDHNative( - // SEC2 prime curves - "secp112r1", "secp112r2", "secp128r1", "secp128r2", "secp160k1", - "secp160r1", "secp192k1", "secp192r1", "secp224k1", "secp224r1", - "secp256k1", "secp256r1", "secp384r1", "secp521r1", "SECP521R1", - // ANSI X9.62 prime curves - "X9.62 prime192v2", "X9.62 prime192v3", "X9.62 prime239v1", - "X9.62 prime239v2", "X9.62 prime239v3", - // SEC2 binary curves - "sect113r1", "sect113r2", "sect131r1", "sect131r2", "sect163k1", - "sect163r1", "sect163r2", "sect193r1", "sect193r2", "sect233k1", - "sect233r1", "sect239k1", "sect283k1", "sect283r1", "sect409k1", - "sect409r1", "sect571k1", "sect571r1", - // ANSI X9.62 binary curves - "X9.62 c2tnb191v1", "X9.62 c2tnb191v2", "X9.62 c2tnb191v3", - "X9.62 c2tnb239v1", "X9.62 c2tnb239v2", "X9.62 c2tnb239v3", - "X9.62 c2tnb359v1", "X9.62 c2tnb431r1" - ), + ECDH("secp256r1", "secp384r1", "secp521r1"), XDH("X25519", "X448", "x25519"), // There is no curve for DiffieHellman @@ -105,7 +80,6 @@ private AlgoSpec(String... curves) { // Generate AlgorithmParameterSpec for each KeyExchangeAlgorithm for (String crv : curves) { switch (this.name()) { - case "ECDHNative": case "ECDH": specs.add(new ECGenParameterSpec(crv)); break; @@ -128,7 +102,7 @@ public List<AlgorithmParameterSpec> getAlgorithmParameterSpecs() { } /** - * Perform KeyAgreement operation using native as well as JCE provider. + * Perform KeyAgreement operation */ private static void testKeyAgreement(String provider, String kaAlgo, String kpgAlgo, AlgorithmParameterSpec spec) throws Exception { diff --git a/test/jdk/java/security/KeyAgreement/KeySizeTest.java b/test/jdk/java/security/KeyAgreement/KeySizeTest.java index 23d0fc95f3c..492f64abd8b 100644 --- a/test/jdk/java/security/KeyAgreement/KeySizeTest.java +++ b/test/jdk/java/security/KeyAgreement/KeySizeTest.java @@ -37,9 +37,9 @@ * @run main KeySizeTest DiffieHellman SunJCE DiffieHellman 4096 * @run main KeySizeTest DiffieHellman SunJCE DiffieHellman 6144 * @run main KeySizeTest DiffieHellman SunJCE DiffieHellman 8192 - * @run main/othervm -Djdk.sunec.disableNative=false KeySizeTest ECDH SunEC EC 128 - * @run main/othervm -Djdk.sunec.disableNative=false KeySizeTest ECDH SunEC EC 192 * @run main/othervm KeySizeTest ECDH SunEC EC 256 + * @run main/othervm KeySizeTest ECDH SunEC EC 384 + * @run main/othervm KeySizeTest ECDH SunEC EC 521 * @run main KeySizeTest XDH SunEC XDH 255 * @run main KeySizeTest XDH SunEC XDH 448 */ diff --git a/test/jdk/java/security/cert/PolicyNode/GetPolicyQualifiers.java b/test/jdk/java/security/cert/PolicyNode/GetPolicyQualifiers.java index 05032e4370a..112cda894e4 100644 --- a/test/jdk/java/security/cert/PolicyNode/GetPolicyQualifiers.java +++ b/test/jdk/java/security/cert/PolicyNode/GetPolicyQualifiers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -30,9 +30,11 @@ import java.io.File; import java.io.FileInputStream; import java.security.cert.*; +import java.text.DateFormat; import java.util.Collections; import java.util.Iterator; import java.util.List; +import java.util.Locale; import java.util.Set; public class GetPolicyQualifiers { @@ -52,6 +54,9 @@ public static void main(String[] args) throws Exception { PKIXParameters params = new PKIXParameters(trustAnchors); params.setPolicyQualifiersRejected(false); params.setRevocationEnabled(false); + // Certificates expired on Oct 6th, 2020 + params.setDate(DateFormat.getDateInstance(DateFormat.MEDIUM, + Locale.US).parse("July 01, 2020")); List certList = Collections.singletonList(eeCert); CertPath cp = cf.generateCertPath(certList); PKIXCertPathValidatorResult result = diff --git a/test/jdk/java/util/Locale/LanguageRangeTest.java b/test/jdk/java/util/Locale/LanguageRangeTest.java new file mode 100644 index 00000000000..cb0dd9fda66 --- /dev/null +++ b/test/jdk/java/util/Locale/LanguageRangeTest.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +/** + * @test + * @bug 8253321 + * @summary test LanguageRange class + * @run testng LanguageRangeTest + */ + +import static java.util.Locale.LanguageRange; + +import org.testng.annotations.Test; +import static org.testng.Assert.assertEquals; + +@Test +public class LanguageRangeTest { + + @Test + public void hashCodeTest() { + var range1 = new LanguageRange("en-GB", 0); + var range2 = new LanguageRange("en-GB", 0); + assertEquals(range1, range2); + range1.hashCode(); + assertEquals(range1, range2); + range2.hashCode(); + assertEquals(range1, range2); + } +} diff --git a/test/jdk/java/util/StringJoiner/MergeTest.java b/test/jdk/java/util/StringJoiner/MergeTest.java index 181a25d4447..d83bbd01cb7 100644 --- a/test/jdk/java/util/StringJoiner/MergeTest.java +++ b/test/jdk/java/util/StringJoiner/MergeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -26,8 +26,8 @@ * @bug 8017231 8020977 8054221 * @summary test StringJoiner::merge * @modules java.base/jdk.internal.util - * @requires os.maxMemory > 4G - * @run testng/othervm -Xmx4g MergeTest + * @requires vm.bits == "64" & os.maxMemory > 4G + * @run testng/othervm -Xmx4g -XX:+CompactStrings MergeTest */ import java.util.StringJoiner; diff --git a/test/jdk/java/util/StringJoiner/StringJoinerTest.java b/test/jdk/java/util/StringJoiner/StringJoinerTest.java index 918823d23e9..e587b4aa617 100644 --- a/test/jdk/java/util/StringJoiner/StringJoinerTest.java +++ b/test/jdk/java/util/StringJoiner/StringJoinerTest.java @@ -25,8 +25,8 @@ * @bug 5015163 7172553 8249258 * @summary tests StringJoinerTest * @modules java.base/jdk.internal.util - * @requires os.maxMemory > 4G - * @run testng/othervm -Xmx4g StringJoinerTest + * @requires vm.bits == "64" & os.maxMemory > 4G + * @run testng/othervm -Xmx4g -XX:+CompactStrings StringJoinerTest * @author Jim Gish */ import java.util.ArrayList; diff --git a/test/jdk/java/util/zip/DeflaterDictionaryTests.java b/test/jdk/java/util/zip/DeflaterDictionaryTests.java new file mode 100644 index 00000000000..17d2b735806 --- /dev/null +++ b/test/jdk/java/util/zip/DeflaterDictionaryTests.java @@ -0,0 +1,252 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import org.testng.Assert; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.nio.ByteBuffer; +import java.util.Arrays; +import java.util.zip.Deflater; +import java.util.zip.Inflater; + +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.testng.Assert.assertThrows; + +/** + * @test + * @bug 8252739 + * @summary Verify Deflater.setDictionary(dictionary, offset, length) uses the offset + * @run testng/othervm DeflaterDictionaryTests + */ +public class DeflaterDictionaryTests { + // Output buffer size + private static final int RESULT_SIZE = 1024; + // Data to compress + private static final String SRC_DATA = "Welcome to the US Open;".repeat(6); + // Dictionary to be used + private static final String DICTIONARY = "US Open"; + private static final int DICTIONARY_OFFSET = 1; + private static final int DICTIONARY_LENGTH = 3; + + /** + * DataProvider with offsets which should be valid for setDictionary + * + * @return valid offset values + */ + @DataProvider(name = "validDictionaryOffsets") + protected Object[][] validDictionaryOffsets() { + return new Object[][]{ + {0}, + {DICTIONARY_OFFSET}, + {DICTIONARY_LENGTH} + }; + } + + /** + * DataProvider with invalid offsets for setDictionary + * + * @return invalid offset values + */ + @DataProvider(name = "invalidDictionaryOffsets") + protected Object[][] invalidDictionaryOffsets() { + return new Object[][]{ + {-1}, + {DICTIONARY_LENGTH + 2}, + {DICTIONARY.length()} + }; + } + + /** + * Validate that an offset can be used with Deflater::setDictionary + * + * @param dictionary_offset offset value to be used + * @throws Exception if an error occurs + */ + @Test(dataProvider = "validDictionaryOffsets") + public void testByteArray(int dictionary_offset) throws Exception { + byte[] input = SRC_DATA.getBytes(UTF_8); + byte[] output = new byte[RESULT_SIZE]; + Deflater deflater = new Deflater(); + Inflater inflater = new Inflater(); + try { + // Compress the bytes + deflater.setDictionary(DICTIONARY.getBytes(UTF_8), dictionary_offset, DICTIONARY_LENGTH); + deflater.setInput(input); + deflater.finish(); + int compressedDataLength = deflater.deflate(output, 0, output.length, Deflater.NO_FLUSH); + System.out.printf("Deflater::getTotalOut:%s, Deflater::getAdler: %s," + + " compressed length: %s%n", deflater.getTotalOut(), + deflater.getTotalOut(), compressedDataLength); + deflater.finished(); + + // Decompress the bytes + inflater.setInput(output, 0, compressedDataLength); + byte[] result = new byte[RESULT_SIZE]; + int resultLength = inflater.inflate(result); + if (inflater.needsDictionary()) { + System.out.println("Specifying Dictionary"); + inflater.setDictionary(DICTIONARY.getBytes(UTF_8), dictionary_offset, DICTIONARY_LENGTH); + resultLength = inflater.inflate(result); + } else { + System.out.println("Did not need to use a Dictionary"); + } + inflater.finished(); + System.out.printf("Inflater::getAdler:%s, length: %s%n", + inflater.getAdler(), resultLength); + + Assert.assertEquals(SRC_DATA.length(), resultLength); + Assert.assertEquals(input, Arrays.copyOf(result, resultLength)); + } finally { + // Release Resources + deflater.end(); + inflater.end(); + } + } + + /** + * Validate that a ByteBuffer can be used with Deflater::setDictionary + * + * @throws Exception if an error occurs + */ + @Test + public void testHeapByteBuffer() throws Exception { + byte[] input = SRC_DATA.getBytes(UTF_8); + byte[] output = new byte[RESULT_SIZE]; + ByteBuffer dictDef = ByteBuffer.wrap(DICTIONARY.getBytes(UTF_8), DICTIONARY_OFFSET, DICTIONARY_LENGTH); + ByteBuffer dictInf = ByteBuffer.wrap(DICTIONARY.getBytes(UTF_8), DICTIONARY_OFFSET, DICTIONARY_LENGTH); + Deflater deflater = new Deflater(); + Inflater inflater = new Inflater(); + try { + // Compress the bytes + deflater.setDictionary(dictDef); + deflater.setInput(input); + deflater.finish(); + int compressedDataLength = deflater.deflate(output, 0, output.length, Deflater.NO_FLUSH); + System.out.printf("Deflater::getTotalOut:%s, Deflater::getAdler: %s," + + " compressed length: %s%n", deflater.getTotalOut(), + deflater.getTotalOut(), compressedDataLength); + deflater.finished(); + + // Decompress the bytes + inflater.setInput(output, 0, compressedDataLength); + byte[] result = new byte[RESULT_SIZE]; + int resultLength = inflater.inflate(result); + if (inflater.needsDictionary()) { + System.out.println("Specifying Dictionary"); + inflater.setDictionary(dictInf); + resultLength = inflater.inflate(result); + } else { + System.out.println("Did not need to use a Dictionary"); + } + inflater.finished(); + System.out.printf("Inflater::getAdler:%s, length: %s%n", + inflater.getAdler(), resultLength); + + Assert.assertEquals(SRC_DATA.length(), resultLength); + Assert.assertEquals(input, Arrays.copyOf(result, resultLength)); + } finally { + // Release Resources + deflater.end(); + inflater.end(); + } + } + + /** + * Validate that ByteBuffer::allocateDirect can be used with Deflater::setDictionary + * + * @throws Exception if an error occurs + */ + @Test + public void testByteBufferDirect() throws Exception { + byte[] input = SRC_DATA.getBytes(UTF_8); + byte[] output = new byte[RESULT_SIZE]; + ByteBuffer dictDef = ByteBuffer.allocateDirect(DICTIONARY.length()); + ByteBuffer dictInf = ByteBuffer.allocateDirect(DICTIONARY.length()); + dictDef.put(DICTIONARY.getBytes(UTF_8)); + dictInf.put(DICTIONARY.getBytes(UTF_8)); + dictDef.position(DICTIONARY_OFFSET); + dictDef.limit(DICTIONARY_LENGTH); + dictInf.position(DICTIONARY_OFFSET); + dictInf.limit(DICTIONARY_LENGTH); + Deflater deflater = new Deflater(); + Inflater inflater = new Inflater(); + try { + // Compress the bytes + deflater.setDictionary(dictDef.slice()); + deflater.setInput(input); + deflater.finish(); + int compressedDataLength = deflater.deflate(output, 0, output.length, Deflater.NO_FLUSH); + System.out.printf("Deflater::getTotalOut:%s, Deflater::getAdler: %s," + + " compressed length: %s%n", deflater.getTotalOut(), + deflater.getTotalOut(), compressedDataLength); + deflater.finished(); + + // Decompress the bytes + inflater.setInput(output, 0, compressedDataLength); + byte[] result = new byte[RESULT_SIZE]; + int resultLength = inflater.inflate(result); + if (inflater.needsDictionary()) { + System.out.println("Specifying Dictionary"); + inflater.setDictionary(dictInf.slice()); + resultLength = inflater.inflate(result); + } else { + System.out.println("Did not need to use a Dictionary"); + } + inflater.finished(); + System.out.printf("Inflater::getAdler:%s, length: %s%n", + inflater.getAdler(), resultLength); + + Assert.assertEquals(SRC_DATA.length(), resultLength); + Assert.assertEquals(input, Arrays.copyOf(result, resultLength)); + } finally { + // Release Resources + deflater.end(); + inflater.end(); + } + } + + /** + * Validate that an invalid offset used with setDictionary will + * throw an Exception + * + * @param dictionary_offset offset value to be used + */ + @Test(dataProvider = "invalidDictionaryOffsets") + public void testInvalidOffsets(int dictionary_offset) { + byte[] dictionary = DICTIONARY.getBytes(UTF_8); + + Deflater deflater = new Deflater(); + Inflater inflater = new Inflater(); + try { + assertThrows(ArrayIndexOutOfBoundsException.class, () -> + deflater.setDictionary(dictionary, dictionary_offset, DICTIONARY_LENGTH)); + assertThrows(ArrayIndexOutOfBoundsException.class, () -> + inflater.setDictionary(dictionary, dictionary_offset, DICTIONARY_LENGTH)); + } finally { + // Release Resources + deflater.end(); + inflater.end(); + } + } +} \ No newline at end of file diff --git a/test/jdk/javax/naming/module/RunBasic.java b/test/jdk/javax/naming/module/RunBasic.java index 0fd9d2b28aa..b4807db7bb7 100644 --- a/test/jdk/javax/naming/module/RunBasic.java +++ b/test/jdk/javax/naming/module/RunBasic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -67,7 +67,17 @@ public class RunBasic { private static final List<String> JAVA_CMDS; + // To update .ldap files under src/test/test, LDAP request and response + // bytes can be logged while interacting with a real LDAP server + // (e.g.: HOST_NAME = "localhost:8389"). + // For that point HOST_NAME to a real server in which the ROOT_DOMAIN + // below is configured to allow modifications by anonymous users, and + // pass an additional "-trace" argument to the created subprocesses. + // The LDAP requests and response bytes will appear in the log, and you + // can then update the corresponding .ldap files. static final String HOST_NAME = InetAddress.getLoopbackAddress().getHostName(); + static final String ROOT_DOMAIN = "dc=ie,dc=oracle,dc=com"; + static final String PATH = "/" + ROOT_DOMAIN; static { String javaPath = JDKToolFinder.getJDKTool("java"); @@ -119,8 +129,14 @@ private static void makeDir(String first, String... more) private static void runTest(String desc, String clsName) throws Throwable { System.out.println("Running with the '" + desc + "' module..."); + // To record LDAP requests and responses in order to update the + // .ldap files under src/test/test, make sure that HOST_NAME + // points to an LDAP server accepting anonymous modifications without + // credentials, and that has "dc=ie,dc=oracle,dc=com" configured + // as root domain. Also add "-trace" as last argument to the runJava + // command below. runJava("-Dtest.src=" + TEST_SRC, "-p", "mods", "-m", "test/" + clsName, - "ldap://" + HOST_NAME + "/dc=ie,dc=oracle,dc=com"); + "ldap://" + HOST_NAME + PATH); } private static void runJava(String... opts) throws Throwable { diff --git a/test/jdk/javax/naming/module/src/test/test/StoreObject.ldap b/test/jdk/javax/naming/module/src/test/test/StoreObject.ldap index af1a5d52f0a..f727b8d666e 100644 --- a/test/jdk/javax/naming/module/src/test/test/StoreObject.ldap +++ b/test/jdk/javax/naming/module/src/test/test/StoreObject.ldap @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 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 @@ -128,10 +128,10 @@ # : } # : } # -0000: 30 82 02 55 02 01 02 68 82 02 31 04 21 63 6E 3D 0..U...h..1.!cn= +0000: 30 82 02 70 02 01 02 68 82 02 4C 04 21 63 6E 3D 0..p...h..L.!cn= 0010: 6D 79 65 76 65 6E 74 2C 64 63 3D 69 65 2C 64 63 myevent,dc=ie,dc 0020: 3D 6F 72 61 63 6C 65 2C 64 63 3D 63 6F 6D 30 82 =oracle,dc=com0. -0030: 02 0A 30 81 FD 04 12 6A 61 76 61 53 65 72 69 61 ..0....javaSeria +0030: 02 25 30 81 FD 04 12 6A 61 76 61 53 65 72 69 61 .%0....javaSeria 0040: 6C 69 7A 65 64 44 61 74 61 31 81 E6 04 81 E3 AC lizedData1...... 0050: ED 00 05 73 72 00 1A 6A 61 76 61 2E 61 77 74 2E ...sr..java.awt. 0060: 65 76 65 6E 74 2E 41 63 74 69 6F 6E 45 76 65 6E event.ActionEven @@ -151,21 +151,23 @@ 0140: 73 31 36 04 03 74 6F 70 04 0D 6A 61 76 61 43 6F s16..top..javaCo 0150: 6E 74 61 69 6E 65 72 04 0A 6A 61 76 61 4F 62 6A ntainer..javaObj 0160: 65 63 74 04 14 6A 61 76 61 53 65 72 69 61 6C 69 ect..javaSeriali -0170: 7A 65 64 4F 62 6A 65 63 74 30 81 80 04 0E 6A 61 zedObject0....ja -0180: 76 61 43 6C 61 73 73 4E 61 6D 65 73 31 6E 04 1A vaClassNames1n.. -0190: 6A 61 76 61 2E 61 77 74 2E 65 76 65 6E 74 2E 41 java.awt.event.A -01A0: 63 74 69 6F 6E 45 76 65 6E 74 04 11 6A 61 76 61 ctionEvent..java -01B0: 2E 61 77 74 2E 41 57 54 45 76 65 6E 74 04 15 6A .awt.AWTEvent..j -01C0: 61 76 61 2E 75 74 69 6C 2E 45 76 65 6E 74 4F 62 ava.util.EventOb -01D0: 6A 65 63 74 04 10 6A 61 76 61 2E 6C 61 6E 67 2E ject..java.lang. -01E0: 4F 62 6A 65 63 74 04 14 6A 61 76 61 2E 69 6F 2E Object..java.io. -01F0: 53 65 72 69 61 6C 69 7A 61 62 6C 65 30 2D 04 0D Serializable0-.. -0200: 6A 61 76 61 43 6C 61 73 73 4E 61 6D 65 31 1C 04 javaClassName1.. -0210: 1A 6A 61 76 61 2E 61 77 74 2E 65 76 65 6E 74 2E .java.awt.event. -0220: 41 63 74 69 6F 6E 45 76 65 6E 74 30 0F 04 02 63 ActionEvent0...c -0230: 6E 31 09 04 07 6D 79 65 76 65 6E 74 A0 1B 30 19 n1...myevent..0. -0240: 04 17 32 2E 31 36 2E 38 34 30 2E 31 2E 31 31 33 ..2.16.840.1.113 -0250: 37 33 30 2E 33 2E 34 2E 32 730.3.4.2 +0170: 7A 65 64 4F 62 6A 65 63 74 30 81 9B 04 0E 6A 61 zedObject0....ja +0180: 76 61 43 6C 61 73 73 4E 61 6D 65 73 31 81 88 04 vaClassNames1... +0190: 1A 6A 61 76 61 2E 61 77 74 2E 65 76 65 6E 74 2E .java.awt.event. +01A0: 41 63 74 69 6F 6E 45 76 65 6E 74 04 11 6A 61 76 ActionEvent..jav +01B0: 61 2E 61 77 74 2E 41 57 54 45 76 65 6E 74 04 15 a.awt.AWTEvent.. +01C0: 6A 61 76 61 2E 75 74 69 6C 2E 45 76 65 6E 74 4F java.util.EventO +01D0: 62 6A 65 63 74 04 10 6A 61 76 61 2E 6C 61 6E 67 bject..java.lang +01E0: 2E 4F 62 6A 65 63 74 04 14 6A 61 76 61 2E 69 6F .Object..java.io +01F0: 2E 53 65 72 69 61 6C 69 7A 61 62 6C 65 04 18 6A .Serializable..j +0200: 61 76 61 2E 6C 61 6E 67 2E 49 64 65 6E 74 69 74 ava.lang.Identit +0210: 79 4F 62 6A 65 63 74 30 2D 04 0D 6A 61 76 61 43 yObject0-..javaC +0220: 6C 61 73 73 4E 61 6D 65 31 1C 04 1A 6A 61 76 61 lassName1...java +0230: 2E 61 77 74 2E 65 76 65 6E 74 2E 41 63 74 69 6F .awt.event.Actio +0240: 6E 45 76 65 6E 74 30 0F 04 02 63 6E 31 09 04 07 nEvent0...cn1... +0250: 6D 79 65 76 65 6E 74 A0 1B 30 19 04 17 32 2E 31 myevent..0...2.1 +0260: 36 2E 38 34 30 2E 31 2E 31 31 33 37 33 30 2E 33 6.840.1.113730.3 +0270: 2E 34 2E 32 .4.2 # LDAP AddResponse: # @@ -248,10 +250,10 @@ # : } # : } # -0000: 30 82 02 57 02 01 03 68 82 02 33 04 22 63 6E 3D 0..W...h..3."cn= +0000: 30 82 02 72 02 01 03 68 82 02 4E 04 22 63 6E 3D 0..r...h..N."cn= 0010: 6D 79 65 76 65 6E 74 32 2C 64 63 3D 69 65 2C 64 myevent2,dc=ie,d 0020: 63 3D 6F 72 61 63 6C 65 2C 64 63 3D 63 6F 6D 30 c=oracle,dc=com0 -0030: 82 02 0B 30 81 FD 04 12 6A 61 76 61 53 65 72 69 ...0....javaSeri +0030: 82 02 26 30 81 FD 04 12 6A 61 76 61 53 65 72 69 ..&0....javaSeri 0040: 61 6C 69 7A 65 64 44 61 74 61 31 81 E6 04 81 E3 alizedData1..... 0050: AC ED 00 05 73 72 00 1A 6A 61 76 61 2E 61 77 74 ....sr..java.awt 0060: 2E 65 76 65 6E 74 2E 41 63 74 69 6F 6E 45 76 65 .event.ActionEve @@ -271,21 +273,23 @@ 0140: 73 73 31 36 04 03 74 6F 70 04 0D 6A 61 76 61 43 ss16..top..javaC 0150: 6F 6E 74 61 69 6E 65 72 04 0A 6A 61 76 61 4F 62 ontainer..javaOb 0160: 6A 65 63 74 04 14 6A 61 76 61 53 65 72 69 61 6C ject..javaSerial -0170: 69 7A 65 64 4F 62 6A 65 63 74 30 81 80 04 0E 6A izedObject0....j -0180: 61 76 61 43 6C 61 73 73 4E 61 6D 65 73 31 6E 04 avaClassNames1n. -0190: 1A 6A 61 76 61 2E 61 77 74 2E 65 76 65 6E 74 2E .java.awt.event. -01A0: 41 63 74 69 6F 6E 45 76 65 6E 74 04 11 6A 61 76 ActionEvent..jav -01B0: 61 2E 61 77 74 2E 41 57 54 45 76 65 6E 74 04 15 a.awt.AWTEvent.. -01C0: 6A 61 76 61 2E 75 74 69 6C 2E 45 76 65 6E 74 4F java.util.EventO -01D0: 62 6A 65 63 74 04 10 6A 61 76 61 2E 6C 61 6E 67 bject..java.lang -01E0: 2E 4F 62 6A 65 63 74 04 14 6A 61 76 61 2E 69 6F .Object..java.io -01F0: 2E 53 65 72 69 61 6C 69 7A 61 62 6C 65 30 2D 04 .Serializable0-. -0200: 0D 6A 61 76 61 43 6C 61 73 73 4E 61 6D 65 31 1C .javaClassName1. -0210: 04 1A 6A 61 76 61 2E 61 77 74 2E 65 76 65 6E 74 ..java.awt.event -0220: 2E 41 63 74 69 6F 6E 45 76 65 6E 74 30 10 04 02 .ActionEvent0... -0230: 63 6E 31 0A 04 08 6D 79 65 76 65 6E 74 32 A0 1B cn1...myevent2.. -0240: 30 19 04 17 32 2E 31 36 2E 38 34 30 2E 31 2E 31 0...2.16.840.1.1 -0250: 31 33 37 33 30 2E 33 2E 34 2E 32 13730.3.4.2 +0170: 69 7A 65 64 4F 62 6A 65 63 74 30 81 9B 04 0E 6A izedObject0....j +0180: 61 76 61 43 6C 61 73 73 4E 61 6D 65 73 31 81 88 avaClassNames1.. +0190: 04 1A 6A 61 76 61 2E 61 77 74 2E 65 76 65 6E 74 ..java.awt.event +01A0: 2E 41 63 74 69 6F 6E 45 76 65 6E 74 04 11 6A 61 .ActionEvent..ja +01B0: 76 61 2E 61 77 74 2E 41 57 54 45 76 65 6E 74 04 va.awt.AWTEvent. +01C0: 15 6A 61 76 61 2E 75 74 69 6C 2E 45 76 65 6E 74 .java.util.Event +01D0: 4F 62 6A 65 63 74 04 10 6A 61 76 61 2E 6C 61 6E Object..java.lan +01E0: 67 2E 4F 62 6A 65 63 74 04 14 6A 61 76 61 2E 69 g.Object..java.i +01F0: 6F 2E 53 65 72 69 61 6C 69 7A 61 62 6C 65 04 18 o.Serializable.. +0200: 6A 61 76 61 2E 6C 61 6E 67 2E 49 64 65 6E 74 69 java.lang.Identi +0210: 74 79 4F 62 6A 65 63 74 30 2D 04 0D 6A 61 76 61 tyObject0-..java +0220: 43 6C 61 73 73 4E 61 6D 65 31 1C 04 1A 6A 61 76 ClassName1...jav +0230: 61 2E 61 77 74 2E 65 76 65 6E 74 2E 41 63 74 69 a.awt.event.Acti +0240: 6F 6E 45 76 65 6E 74 30 10 04 02 63 6E 31 0A 04 onEvent0...cn1.. +0250: 08 6D 79 65 76 65 6E 74 32 A0 1B 30 19 04 17 32 .myevent2..0...2 +0260: 2E 31 36 2E 38 34 30 2E 31 2E 31 31 33 37 33 30 .16.840.1.113730 +0270: 2E 33 2E 34 2E 32 .3.4.2 # LDAP AddResponse: # @@ -392,42 +396,44 @@ # : } # : } # -0000: 30 82 02 38 02 01 04 64 82 02 31 04 21 63 6E 3D 0..8...d..1.!cn= +0000: 30 82 02 53 02 01 04 64 82 02 4C 04 21 63 6E 3D 0..S...d..L.!cn= 0010: 6D 79 65 76 65 6E 74 2C 64 63 3D 69 65 2C 64 63 myevent,dc=ie,dc 0020: 3D 6F 72 61 63 6C 65 2C 64 63 3D 63 6F 6D 30 82 =oracle,dc=com0. -0030: 02 0A 30 0F 04 02 63 6E 31 09 04 07 6D 79 65 76 ..0...cn1...myev -0040: 65 6E 74 30 81 80 04 0E 6A 61 76 61 43 6C 61 73 ent0....javaClas -0050: 73 4E 61 6D 65 73 31 6E 04 1A 6A 61 76 61 2E 61 sNames1n..java.a -0060: 77 74 2E 65 76 65 6E 74 2E 41 63 74 69 6F 6E 45 wt.event.ActionE -0070: 76 65 6E 74 04 11 6A 61 76 61 2E 61 77 74 2E 41 vent..java.awt.A -0080: 57 54 45 76 65 6E 74 04 15 6A 61 76 61 2E 75 74 WTEvent..java.ut -0090: 69 6C 2E 45 76 65 6E 74 4F 62 6A 65 63 74 04 10 il.EventObject.. -00A0: 6A 61 76 61 2E 6C 61 6E 67 2E 4F 62 6A 65 63 74 java.lang.Object -00B0: 04 14 6A 61 76 61 2E 69 6F 2E 53 65 72 69 61 6C ..java.io.Serial -00C0: 69 7A 61 62 6C 65 30 2D 04 0D 6A 61 76 61 43 6C izable0-..javaCl -00D0: 61 73 73 4E 61 6D 65 31 1C 04 1A 6A 61 76 61 2E assName1...java. -00E0: 61 77 74 2E 65 76 65 6E 74 2E 41 63 74 69 6F 6E awt.event.Action -00F0: 45 76 65 6E 74 30 45 04 0B 6F 62 6A 65 63 74 43 Event0E..objectC -0100: 6C 61 73 73 31 36 04 0A 6A 61 76 61 4F 62 6A 65 lass16..javaObje -0110: 63 74 04 03 74 6F 70 04 14 6A 61 76 61 53 65 72 ct..top..javaSer -0120: 69 61 6C 69 7A 65 64 4F 62 6A 65 63 74 04 0D 6A ializedObject..j -0130: 61 76 61 43 6F 6E 74 61 69 6E 65 72 30 81 FD 04 avaContainer0... -0140: 12 6A 61 76 61 53 65 72 69 61 6C 69 7A 65 64 44 .javaSerializedD -0150: 61 74 61 31 81 E6 04 81 E3 AC ED 00 05 73 72 00 ata1.........sr. -0160: 1A 6A 61 76 61 2E 61 77 74 2E 65 76 65 6E 74 2E .java.awt.event. -0170: 41 63 74 69 6F 6E 45 76 65 6E 74 95 8A DA 7A 58 ActionEvent...zX -0180: 11 2F 2B 02 00 03 49 00 09 6D 6F 64 69 66 69 65 ./+...I..modifie -0190: 72 73 4A 00 04 77 68 65 6E 4C 00 0D 61 63 74 69 rsJ..whenL..acti -01A0: 6F 6E 43 6F 6D 6D 61 6E 64 74 00 12 4C 6A 61 76 onCommandt..Ljav -01B0: 61 2F 6C 61 6E 67 2F 53 74 72 69 6E 67 3B 78 72 a/lang/String;xr -01C0: 00 11 6A 61 76 61 2E 61 77 74 2E 41 57 54 45 76 ..java.awt.AWTEv -01D0: 65 6E 74 E6 AB 2D E1 18 DF 8A C3 02 00 03 5A 00 ent..-........Z. -01E0: 08 63 6F 6E 73 75 6D 65 64 49 00 02 69 64 5B 00 .consumedI..id[. -01F0: 05 62 64 61 74 61 74 00 02 5B 42 78 72 00 15 6A .bdatat..[Bxr..j -0200: 61 76 61 2E 75 74 69 6C 2E 45 76 65 6E 74 4F 62 ava.util.EventOb -0210: 6A 65 63 74 4C 8D 09 4E 18 6D 7D A8 02 00 00 78 jectL..N.m.....x -0220: 70 00 00 00 00 01 70 00 00 00 00 00 00 00 00 00 p.....p......... -0230: 00 00 00 74 00 06 48 65 6C 6C 6F 31 ...t..Hello1 +0030: 02 25 30 81 FD 04 12 6A 61 76 61 53 65 72 69 61 .%0....javaSeria +0040: 6C 69 7A 65 64 44 61 74 61 31 81 E6 04 81 E3 AC lizedData1...... +0050: ED 00 05 73 72 00 1A 6A 61 76 61 2E 61 77 74 2E ...sr..java.awt. +0060: 65 76 65 6E 74 2E 41 63 74 69 6F 6E 45 76 65 6E event.ActionEven +0070: 74 95 8A DA 7A 58 11 2F 2B 02 00 03 49 00 09 6D t...zX./+...I..m +0080: 6F 64 69 66 69 65 72 73 4A 00 04 77 68 65 6E 4C odifiersJ..whenL +0090: 00 0D 61 63 74 69 6F 6E 43 6F 6D 6D 61 6E 64 74 ..actionCommandt +00A0: 00 12 4C 6A 61 76 61 2F 6C 61 6E 67 2F 53 74 72 ..Ljava/lang/Str +00B0: 69 6E 67 3B 78 72 00 11 6A 61 76 61 2E 61 77 74 ing;xr..java.awt +00C0: 2E 41 57 54 45 76 65 6E 74 E6 AB 2D E1 18 DF 8A .AWTEvent..-.... +00D0: C3 02 00 03 5A 00 08 63 6F 6E 73 75 6D 65 64 49 ....Z..consumedI +00E0: 00 02 69 64 5B 00 05 62 64 61 74 61 74 00 02 5B ..id[..bdatat..[ +00F0: 42 78 72 00 15 6A 61 76 61 2E 75 74 69 6C 2E 45 Bxr..java.util.E +0100: 76 65 6E 74 4F 62 6A 65 63 74 4C 8D 09 4E 18 6D ventObjectL..N.m +0110: 7D A8 02 00 00 78 70 00 00 00 00 01 70 00 00 00 .....xp.....p... +0120: 00 00 00 00 00 00 00 00 00 74 00 06 48 65 6C 6C .........t..Hell +0130: 6F 31 30 45 04 0B 6F 62 6A 65 63 74 43 6C 61 73 o10E..objectClas +0140: 73 31 36 04 03 74 6F 70 04 0D 6A 61 76 61 43 6F s16..top..javaCo +0150: 6E 74 61 69 6E 65 72 04 0A 6A 61 76 61 4F 62 6A ntainer..javaObj +0160: 65 63 74 04 14 6A 61 76 61 53 65 72 69 61 6C 69 ect..javaSeriali +0170: 7A 65 64 4F 62 6A 65 63 74 30 81 9B 04 0E 6A 61 zedObject0....ja +0180: 76 61 43 6C 61 73 73 4E 61 6D 65 73 31 81 88 04 vaClassNames1... +0190: 1A 6A 61 76 61 2E 61 77 74 2E 65 76 65 6E 74 2E .java.awt.event. +01A0: 41 63 74 69 6F 6E 45 76 65 6E 74 04 11 6A 61 76 ActionEvent..jav +01B0: 61 2E 61 77 74 2E 41 57 54 45 76 65 6E 74 04 15 a.awt.AWTEvent.. +01C0: 6A 61 76 61 2E 75 74 69 6C 2E 45 76 65 6E 74 4F java.util.EventO +01D0: 62 6A 65 63 74 04 10 6A 61 76 61 2E 6C 61 6E 67 bject..java.lang +01E0: 2E 4F 62 6A 65 63 74 04 14 6A 61 76 61 2E 69 6F .Object..java.io +01F0: 2E 53 65 72 69 61 6C 69 7A 61 62 6C 65 04 18 6A .Serializable..j +0200: 61 76 61 2E 6C 61 6E 67 2E 49 64 65 6E 74 69 74 ava.lang.Identit +0210: 79 4F 62 6A 65 63 74 30 2D 04 0D 6A 61 76 61 43 yObject0-..javaC +0220: 6C 61 73 73 4E 61 6D 65 31 1C 04 1A 6A 61 76 61 lassName1...java +0230: 2E 61 77 74 2E 65 76 65 6E 74 2E 41 63 74 69 6F .awt.event.Actio +0240: 6E 45 76 65 6E 74 30 0F 04 02 63 6E 31 09 04 07 nEvent0...cn1... +0250: 6D 79 65 76 65 6E 74 myevent # LDAP SearchResultDone: # @@ -534,42 +540,44 @@ # : } # : } # -0000: 30 82 02 3A 02 01 05 64 82 02 33 04 22 63 6E 3D 0..:...d..3."cn= +0000: 30 82 02 55 02 01 05 64 82 02 4E 04 22 63 6E 3D 0..U...d..N."cn= 0010: 6D 79 65 76 65 6E 74 32 2C 64 63 3D 69 65 2C 64 myevent2,dc=ie,d 0020: 63 3D 6F 72 61 63 6C 65 2C 64 63 3D 63 6F 6D 30 c=oracle,dc=com0 -0030: 82 02 0B 30 10 04 02 63 6E 31 0A 04 08 6D 79 65 ...0...cn1...mye -0040: 76 65 6E 74 32 30 81 80 04 0E 6A 61 76 61 43 6C vent20....javaCl -0050: 61 73 73 4E 61 6D 65 73 31 6E 04 1A 6A 61 76 61 assNames1n..java -0060: 2E 61 77 74 2E 65 76 65 6E 74 2E 41 63 74 69 6F .awt.event.Actio -0070: 6E 45 76 65 6E 74 04 11 6A 61 76 61 2E 61 77 74 nEvent..java.awt -0080: 2E 41 57 54 45 76 65 6E 74 04 15 6A 61 76 61 2E .AWTEvent..java. -0090: 75 74 69 6C 2E 45 76 65 6E 74 4F 62 6A 65 63 74 util.EventObject -00A0: 04 10 6A 61 76 61 2E 6C 61 6E 67 2E 4F 62 6A 65 ..java.lang.Obje -00B0: 63 74 04 14 6A 61 76 61 2E 69 6F 2E 53 65 72 69 ct..java.io.Seri -00C0: 61 6C 69 7A 61 62 6C 65 30 2D 04 0D 6A 61 76 61 alizable0-..java -00D0: 43 6C 61 73 73 4E 61 6D 65 31 1C 04 1A 6A 61 76 ClassName1...jav -00E0: 61 2E 61 77 74 2E 65 76 65 6E 74 2E 41 63 74 69 a.awt.event.Acti -00F0: 6F 6E 45 76 65 6E 74 30 45 04 0B 6F 62 6A 65 63 onEvent0E..objec -0100: 74 43 6C 61 73 73 31 36 04 0A 6A 61 76 61 4F 62 tClass16..javaOb -0110: 6A 65 63 74 04 03 74 6F 70 04 14 6A 61 76 61 53 ject..top..javaS -0120: 65 72 69 61 6C 69 7A 65 64 4F 62 6A 65 63 74 04 erializedObject. -0130: 0D 6A 61 76 61 43 6F 6E 74 61 69 6E 65 72 30 81 .javaContainer0. -0140: FD 04 12 6A 61 76 61 53 65 72 69 61 6C 69 7A 65 ...javaSerialize -0150: 64 44 61 74 61 31 81 E6 04 81 E3 AC ED 00 05 73 dData1.........s -0160: 72 00 1A 6A 61 76 61 2E 61 77 74 2E 65 76 65 6E r..java.awt.even -0170: 74 2E 41 63 74 69 6F 6E 45 76 65 6E 74 95 8A DA t.ActionEvent... -0180: 7A 58 11 2F 2B 02 00 03 49 00 09 6D 6F 64 69 66 zX./+...I..modif -0190: 69 65 72 73 4A 00 04 77 68 65 6E 4C 00 0D 61 63 iersJ..whenL..ac -01A0: 74 69 6F 6E 43 6F 6D 6D 61 6E 64 74 00 12 4C 6A tionCommandt..Lj -01B0: 61 76 61 2F 6C 61 6E 67 2F 53 74 72 69 6E 67 3B ava/lang/String; -01C0: 78 72 00 11 6A 61 76 61 2E 61 77 74 2E 41 57 54 xr..java.awt.AWT -01D0: 45 76 65 6E 74 E6 AB 2D E1 18 DF 8A C3 02 00 03 Event..-........ -01E0: 5A 00 08 63 6F 6E 73 75 6D 65 64 49 00 02 69 64 Z..consumedI..id -01F0: 5B 00 05 62 64 61 74 61 74 00 02 5B 42 78 72 00 [..bdatat..[Bxr. -0200: 15 6A 61 76 61 2E 75 74 69 6C 2E 45 76 65 6E 74 .java.util.Event -0210: 4F 62 6A 65 63 74 4C 8D 09 4E 18 6D 7D A8 02 00 ObjectL..N.m.... -0220: 00 78 70 00 00 00 00 02 70 00 00 00 00 00 00 00 .xp.....p....... -0230: 00 00 00 00 00 74 00 06 48 65 6C 6C 6F 32 .....t..Hello2 +0030: 82 02 26 30 81 FD 04 12 6A 61 76 61 53 65 72 69 ..&0....javaSeri +0040: 61 6C 69 7A 65 64 44 61 74 61 31 81 E6 04 81 E3 alizedData1..... +0050: AC ED 00 05 73 72 00 1A 6A 61 76 61 2E 61 77 74 ....sr..java.awt +0060: 2E 65 76 65 6E 74 2E 41 63 74 69 6F 6E 45 76 65 .event.ActionEve +0070: 6E 74 95 8A DA 7A 58 11 2F 2B 02 00 03 49 00 09 nt...zX./+...I.. +0080: 6D 6F 64 69 66 69 65 72 73 4A 00 04 77 68 65 6E modifiersJ..when +0090: 4C 00 0D 61 63 74 69 6F 6E 43 6F 6D 6D 61 6E 64 L..actionCommand +00A0: 74 00 12 4C 6A 61 76 61 2F 6C 61 6E 67 2F 53 74 t..Ljava/lang/St +00B0: 72 69 6E 67 3B 78 72 00 11 6A 61 76 61 2E 61 77 ring;xr..java.aw +00C0: 74 2E 41 57 54 45 76 65 6E 74 E6 AB 2D E1 18 DF t.AWTEvent..-... +00D0: 8A C3 02 00 03 5A 00 08 63 6F 6E 73 75 6D 65 64 .....Z..consumed +00E0: 49 00 02 69 64 5B 00 05 62 64 61 74 61 74 00 02 I..id[..bdatat.. +00F0: 5B 42 78 72 00 15 6A 61 76 61 2E 75 74 69 6C 2E [Bxr..java.util. +0100: 45 76 65 6E 74 4F 62 6A 65 63 74 4C 8D 09 4E 18 EventObjectL..N. +0110: 6D 7D A8 02 00 00 78 70 00 00 00 00 02 70 00 00 m.....xp.....p.. +0120: 00 00 00 00 00 00 00 00 00 00 74 00 06 48 65 6C ..........t..Hel +0130: 6C 6F 32 30 45 04 0B 6F 62 6A 65 63 74 43 6C 61 lo20E..objectCla +0140: 73 73 31 36 04 03 74 6F 70 04 0D 6A 61 76 61 43 ss16..top..javaC +0150: 6F 6E 74 61 69 6E 65 72 04 0A 6A 61 76 61 4F 62 ontainer..javaOb +0160: 6A 65 63 74 04 14 6A 61 76 61 53 65 72 69 61 6C ject..javaSerial +0170: 69 7A 65 64 4F 62 6A 65 63 74 30 81 9B 04 0E 6A izedObject0....j +0180: 61 76 61 43 6C 61 73 73 4E 61 6D 65 73 31 81 88 avaClassNames1.. +0190: 04 1A 6A 61 76 61 2E 61 77 74 2E 65 76 65 6E 74 ..java.awt.event +01A0: 2E 41 63 74 69 6F 6E 45 76 65 6E 74 04 11 6A 61 .ActionEvent..ja +01B0: 76 61 2E 61 77 74 2E 41 57 54 45 76 65 6E 74 04 va.awt.AWTEvent. +01C0: 15 6A 61 76 61 2E 75 74 69 6C 2E 45 76 65 6E 74 .java.util.Event +01D0: 4F 62 6A 65 63 74 04 10 6A 61 76 61 2E 6C 61 6E Object..java.lan +01E0: 67 2E 4F 62 6A 65 63 74 04 14 6A 61 76 61 2E 69 g.Object..java.i +01F0: 6F 2E 53 65 72 69 61 6C 69 7A 61 62 6C 65 04 18 o.Serializable.. +0200: 6A 61 76 61 2E 6C 61 6E 67 2E 49 64 65 6E 74 69 java.lang.Identi +0210: 74 79 4F 62 6A 65 63 74 30 2D 04 0D 6A 61 76 61 tyObject0-..java +0220: 43 6C 61 73 73 4E 61 6D 65 31 1C 04 1A 6A 61 76 ClassName1...jav +0230: 61 2E 61 77 74 2E 65 76 65 6E 74 2E 41 63 74 69 a.awt.event.Acti +0240: 6F 6E 45 76 65 6E 74 30 10 04 02 63 6E 31 0A 04 onEvent0...cn1.. +0250: 08 6D 79 65 76 65 6E 74 32 .myevent2 # LDAP SearchResultDone: # diff --git a/test/jdk/javax/naming/module/src/test/test/StoreRemote.ldap b/test/jdk/javax/naming/module/src/test/test/StoreRemote.ldap index f5c8ea8db51..3788b3208f9 100644 --- a/test/jdk/javax/naming/module/src/test/test/StoreRemote.ldap +++ b/test/jdk/javax/naming/module/src/test/test/StoreRemote.ldap @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 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 @@ -136,10 +136,10 @@ # : } # : } # -0000: 30 82 03 17 02 01 02 68 82 02 F3 04 22 63 6E 3D 0......h...."cn= +0000: 30 82 03 31 02 01 02 68 82 03 0D 04 22 63 6E 3D 0..1...h...."cn= 0010: 6D 79 72 65 6D 6F 74 65 2C 64 63 3D 69 65 2C 64 myremote,dc=ie,d 0020: 63 3D 6F 72 61 63 6C 65 2C 64 63 3D 63 6F 6D 30 c=oracle,dc=com0 -0030: 82 02 CB 30 82 01 58 04 12 6A 61 76 61 53 65 72 ...0..X..javaSer +0030: 82 02 E5 30 82 01 58 04 12 6A 61 76 61 53 65 72 ...0..X..javaSer 0040: 69 61 6C 69 7A 65 64 44 61 74 61 31 82 01 40 04 ializedData1..@. 0050: 82 01 3C AC ED 00 05 73 72 00 1B 6F 72 67 2E 65 ..<....sr..org.e 0060: 78 61 6D 70 6C 65 2E 68 65 6C 6C 6F 2E 48 65 6C xample.hello.Hel @@ -165,8 +165,8 @@ 01A0: 04 03 74 6F 70 04 0D 6A 61 76 61 43 6F 6E 74 61 ..top..javaConta 01B0: 69 6E 65 72 04 0A 6A 61 76 61 4F 62 6A 65 63 74 iner..javaObject 01C0: 04 14 6A 61 76 61 53 65 72 69 61 6C 69 7A 65 64 ..javaSerialized -01D0: 4F 62 6A 65 63 74 30 81 E3 04 0E 6A 61 76 61 43 Object0....javaC -01E0: 6C 61 73 73 4E 61 6D 65 73 31 81 D0 04 1B 6F 72 lassNames1....or +01D0: 4F 62 6A 65 63 74 30 81 FD 04 0E 6A 61 76 61 43 Object0....javaC +01E0: 6C 61 73 73 4E 61 6D 65 73 31 81 EA 04 1B 6F 72 lassNames1....or 01F0: 67 2E 65 78 61 6D 70 6C 65 2E 68 65 6C 6C 6F 2E g.example.hello. 0200: 48 65 6C 6C 6F 49 6D 70 6C 04 23 6A 61 76 61 2E HelloImpl.#java. 0210: 72 6D 69 2E 73 65 72 76 65 72 2E 55 6E 69 63 61 rmi.server.Unica @@ -178,14 +178,16 @@ 0270: 2E 6C 61 6E 67 2E 4F 62 6A 65 63 74 04 0F 6A 61 .lang.Object..ja 0280: 76 61 2E 72 6D 69 2E 52 65 6D 6F 74 65 04 14 6A va.rmi.Remote..j 0290: 61 76 61 2E 69 6F 2E 53 65 72 69 61 6C 69 7A 61 ava.io.Serializa -02A0: 62 6C 65 04 17 6F 72 67 2E 65 78 61 6D 70 6C 65 ble..org.example -02B0: 2E 68 65 6C 6C 6F 2E 48 65 6C 6C 6F 30 2E 04 0D .hello.Hello0... -02C0: 6A 61 76 61 43 6C 61 73 73 4E 61 6D 65 31 1D 04 javaClassName1.. -02D0: 1B 6F 72 67 2E 65 78 61 6D 70 6C 65 2E 68 65 6C .org.example.hel -02E0: 6C 6F 2E 48 65 6C 6C 6F 49 6D 70 6C 30 10 04 02 lo.HelloImpl0... -02F0: 63 6E 31 0A 04 08 6D 79 72 65 6D 6F 74 65 A0 1B cn1...myremote.. -0300: 30 19 04 17 32 2E 31 36 2E 38 34 30 2E 31 2E 31 0...2.16.840.1.1 -0310: 31 33 37 33 30 2E 33 2E 34 2E 32 13730.3.4.2 +02A0: 62 6C 65 04 18 6A 61 76 61 2E 6C 61 6E 67 2E 49 ble..java.lang.I +02B0: 64 65 6E 74 69 74 79 4F 62 6A 65 63 74 04 17 6F dentityObject..o +02C0: 72 67 2E 65 78 61 6D 70 6C 65 2E 68 65 6C 6C 6F rg.example.hello +02D0: 2E 48 65 6C 6C 6F 30 2E 04 0D 6A 61 76 61 43 6C .Hello0...javaCl +02E0: 61 73 73 4E 61 6D 65 31 1D 04 1B 6F 72 67 2E 65 assName1...org.e +02F0: 78 61 6D 70 6C 65 2E 68 65 6C 6C 6F 2E 48 65 6C xample.hello.Hel +0300: 6C 6F 49 6D 70 6C 30 10 04 02 63 6E 31 0A 04 08 loImpl0...cn1... +0310: 6D 79 72 65 6D 6F 74 65 A0 1B 30 19 04 17 32 2E myremote..0...2. +0320: 31 36 2E 38 34 30 2E 31 2E 31 31 33 37 33 30 2E 16.840.1.113730. +0330: 33 2E 34 2E 32 3.4.2 # LDAP AddResponse: # @@ -301,10 +303,10 @@ # : } # : } # -0000: 30 82 02 FA 02 01 03 64 82 02 F3 04 22 63 6E 3D 0......d...."cn= +0000: 30 82 03 14 02 01 03 64 82 03 0D 04 22 63 6E 3D 0......d...."cn= 0010: 6D 79 72 65 6D 6F 74 65 2C 64 63 3D 69 65 2C 64 myremote,dc=ie,d 0020: 63 3D 6F 72 61 63 6C 65 2C 64 63 3D 63 6F 6D 30 c=oracle,dc=com0 -0030: 82 02 CB 30 82 01 58 04 12 6A 61 76 61 53 65 72 ...0..X..javaSer +0030: 82 02 E5 30 82 01 58 04 12 6A 61 76 61 53 65 72 ...0..X..javaSer 0040: 69 61 6C 69 7A 65 64 44 61 74 61 31 82 01 40 04 ializedData1..@. 0050: 82 01 3C AC ED 00 05 73 72 00 1B 6F 72 67 2E 65 ..<....sr..org.e 0060: 78 61 6D 70 6C 65 2E 68 65 6C 6C 6F 2E 48 65 6C xample.hello.Hel @@ -330,8 +332,8 @@ 01A0: 04 03 74 6F 70 04 0D 6A 61 76 61 43 6F 6E 74 61 ..top..javaConta 01B0: 69 6E 65 72 04 0A 6A 61 76 61 4F 62 6A 65 63 74 iner..javaObject 01C0: 04 14 6A 61 76 61 53 65 72 69 61 6C 69 7A 65 64 ..javaSerialized -01D0: 4F 62 6A 65 63 74 30 81 E3 04 0E 6A 61 76 61 43 Object0....javaC -01E0: 6C 61 73 73 4E 61 6D 65 73 31 81 D0 04 1B 6F 72 lassNames1....or +01D0: 4F 62 6A 65 63 74 30 81 FD 04 0E 6A 61 76 61 43 Object0....javaC +01E0: 6C 61 73 73 4E 61 6D 65 73 31 81 EA 04 1B 6F 72 lassNames1....or 01F0: 67 2E 65 78 61 6D 70 6C 65 2E 68 65 6C 6C 6F 2E g.example.hello. 0200: 48 65 6C 6C 6F 49 6D 70 6C 04 23 6A 61 76 61 2E HelloImpl.#java. 0210: 72 6D 69 2E 73 65 72 76 65 72 2E 55 6E 69 63 61 rmi.server.Unica @@ -343,12 +345,14 @@ 0270: 2E 6C 61 6E 67 2E 4F 62 6A 65 63 74 04 0F 6A 61 .lang.Object..ja 0280: 76 61 2E 72 6D 69 2E 52 65 6D 6F 74 65 04 14 6A va.rmi.Remote..j 0290: 61 76 61 2E 69 6F 2E 53 65 72 69 61 6C 69 7A 61 ava.io.Serializa -02A0: 62 6C 65 04 17 6F 72 67 2E 65 78 61 6D 70 6C 65 ble..org.example -02B0: 2E 68 65 6C 6C 6F 2E 48 65 6C 6C 6F 30 2E 04 0D .hello.Hello0... -02C0: 6A 61 76 61 43 6C 61 73 73 4E 61 6D 65 31 1D 04 javaClassName1.. -02D0: 1B 6F 72 67 2E 65 78 61 6D 70 6C 65 2E 68 65 6C .org.example.hel -02E0: 6C 6F 2E 48 65 6C 6C 6F 49 6D 70 6C 30 10 04 02 lo.HelloImpl0... -02F0: 63 6E 31 0A 04 08 6D 79 72 65 6D 6F 74 65 cn1...myremote +02A0: 62 6C 65 04 18 6A 61 76 61 2E 6C 61 6E 67 2E 49 ble..java.lang.I +02B0: 64 65 6E 74 69 74 79 4F 62 6A 65 63 74 04 17 6F dentityObject..o +02C0: 72 67 2E 65 78 61 6D 70 6C 65 2E 68 65 6C 6C 6F rg.example.hello +02D0: 2E 48 65 6C 6C 6F 30 2E 04 0D 6A 61 76 61 43 6C .Hello0...javaCl +02E0: 61 73 73 4E 61 6D 65 31 1D 04 1B 6F 72 67 2E 65 assName1...org.e +02F0: 78 61 6D 70 6C 65 2E 68 65 6C 6C 6F 2E 48 65 6C xample.hello.Hel +0300: 6C 6F 49 6D 70 6C 30 10 04 02 63 6E 31 0A 04 08 loImpl0...cn1... +0310: 6D 79 72 65 6D 6F 74 65 myremote # LDAP SearchResultDone: # diff --git a/test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java b/test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java index e27bf9bdaae..c1ec829b823 100644 --- a/test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java +++ b/test/jdk/javax/net/ssl/templates/SSLSocketTemplate.java @@ -372,14 +372,12 @@ protected void doClientSide() throws Exception { // Trusted certificates. protected final static Cert[] TRUSTED_CERTS = { Cert.CA_ECDSA_SECP256R1, - Cert.CA_ECDSA_SECT283R1, Cert.CA_RSA_2048, Cert.CA_DSA_2048 }; // End entity certificate. protected final static Cert[] END_ENTITY_CERTS = { Cert.EE_ECDSA_SECP256R1, - Cert.EE_ECDSA_SECT283R1, Cert.EE_RSA_2048, Cert.EE_EC_RSA_SECP256R1, Cert.EE_DSA_2048 }; @@ -705,32 +703,6 @@ public static enum Cert { "p1YdWENftmDoNTJ3O6TNlXb90jKWgAirCXNBUompPtHKkO592eDyGcT1h8qjrKlm\n" + "Kw=="), - CA_ECDSA_SECT283R1( - "EC", - // SHA1withECDSA, curve sect283r1 - // Validity - // Not Before: May 26 06:06:52 2020 GMT - // Not After : May 21 06:06:52 2040 GMT - // Subject Key Identifier: - // CF:A3:99:ED:4C:6E:04:41:09:21:31:33:B6:80:D5:A7:BF:2B:98:04 - "-----BEGIN CERTIFICATE-----\n" + - "MIIB8TCCAY+gAwIBAgIJANQFsBngZ3iMMAsGByqGSM49BAEFADBdMQswCQYDVQQG\n" + - "EwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNBMQ8wDQYDVQQKEwZPcmFjbGUx\n" + - "DzANBgNVBAsTBkpQR1NRRTESMBAGA1UEAxMJc2VjdDI4M3IxMB4XDTIwMDUyNjE4\n" + - "MDY1MloXDTQwMDUyMTE4MDY1MlowXTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNB\n" + - "MQswCQYDVQQHEwJTQTEPMA0GA1UEChMGT3JhY2xlMQ8wDQYDVQQLEwZKUEdTUUUx\n" + - "EjAQBgNVBAMTCXNlY3QyODNyMTBeMBAGByqGSM49AgEGBSuBBAARA0oABALatmDt\n" + - "QIhjpK4vJjv4GgC8CUH/VAWLUSQRU7yGGQ3NF8rVBARv0aehiII0nzjDVX5KrP/A\n" + - "w/DmW7q8PfEAIktuaA/tcKv/OKMyMDAwHQYDVR0OBBYEFM+jme1MbgRBCSExM7aA\n" + - "1ae/K5gEMA8GA1UdEwEB/wQFMAMBAf8wCwYHKoZIzj0EAQUAA08AMEwCJAGHsAP8\n" + - "HlcVqszra+fxq35juTxHJIfxTKIr7f54Ywtz7AJowgIkAxydv8g+dkuniOUAj0Xt\n" + - "FnGVp6HzKX5KM1zLpfqmix8ZPP/A\n" + - "-----END CERTIFICATE-----", - "MIGQAgEAMBAGByqGSM49AgEGBSuBBAARBHkwdwIBAQQkAdcyn/FxiNvuTsSgDehq\n" + - "SGFiTxAKNMMJfmsO6GHekzszFqjPoUwDSgAEAtq2YO1AiGOkri8mO/gaALwJQf9U\n" + - "BYtRJBFTvIYZDc0XytUEBG/Rp6GIgjSfOMNVfkqs/8DD8OZburw98QAiS25oD+1w\n" + - "q/84"), - CA_RSA_2048( "RSA", // SHA256withRSA, 2048 bits @@ -917,33 +889,6 @@ public static enum Cert { "MEcCAQAwBQYDK2VxBDsEOd6/hRZqkUyTlJSwdN5gO/HnoWYda1fD83YUm5j6m2Bg\n" + "hAQi+QadFsQLD7R6PI/4Q0twXqlKnxU5Ug=="), - EE_ECDSA_SECT283R1( - "EC", - // SHA1withECDSA, curve sect283r1 - // Validity - // Not Before: May 26 06:08:15 2020 GMT - // Not After : May 21 06:08:15 2040 GMT - // Authority Key Identifier: - // CF:A3:99:ED:4C:6E:04:41:09:21:31:33:B6:80:D5:A7:BF:2B:98:04 - "-----BEGIN CERTIFICATE-----\n" + - "MIICFTCCAbOgAwIBAgIJAM0Dd9zxR9CeMAsGByqGSM49BAEFADBdMQswCQYDVQQG\n" + - "EwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNBMQ8wDQYDVQQKEwZPcmFjbGUx\n" + - "DzANBgNVBAsTBkpQR1NRRTESMBAGA1UEAxMJc2VjdDI4M3IxMB4XDTIwMDUyNjE4\n" + - "MDgxNVoXDTQwMDUyMTE4MDgxNVowYDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNB\n" + - "MQswCQYDVQQHEwJTQTEPMA0GA1UEChMGT3JhY2xlMQ8wDQYDVQQLEwZKUEdTUUUx\n" + - "FTATBgNVBAMMDHNlY3QyODNyMV9lZTBeMBAGByqGSM49AgEGBSuBBAARA0oABAMP\n" + - "oaMP2lIiCrNaFSePtZA8nBnqJXSGCz8kosKeYTqz/SPE1AN6BvM4xl0kPQZvJWMz\n" + - "fyTcm2Ar0PdbIh8f22vJfO+0JpfhnqNTMFEwHQYDVR0OBBYEFOzDGNWQhslU5ei4\n" + - "SYda/ro9DickMA8GA1UdEwQIMAYBAf8CAQAwHwYDVR0jBBgwFoAUz6OZ7UxuBEEJ\n" + - "ITEztoDVp78rmAQwCwYHKoZIzj0EAQUAA08AMEwCJALYBWSYdbhRiW4mNulQh6/v\n" + - "dfHG3y/oMjzJEmT/A0WYl96ohgIkAbDC0Ke632RXtCZ4xa2FrmzP41Vb80mSH1iY\n" + - "FCJ3LVoTEUgN\n" + - "-----END CERTIFICATE-----", - "MIGQAgEAMBAGByqGSM49AgEGBSuBBAARBHkwdwIBAQQkAXq9LPYU+XSrImPzgO1e\n" + - "hsgjfTBXlWGveFUtn0OHPtbp7hzpoUwDSgAEAw+how/aUiIKs1oVJ4+1kDycGeol\n" + - "dIYLPySiwp5hOrP9I8TUA3oG8zjGXSQ9Bm8lYzN/JNybYCvQ91siHx/ba8l877Qm\n" + - "l+Ge"), - EE_ECDSA_SECP256R1( "EC", // SHA256withECDSA, curve secp256r1 diff --git a/test/jdk/javax/swing/Action/AbstractActionBug.java b/test/jdk/javax/swing/Action/AbstractActionBug.java new file mode 100644 index 00000000000..4a25251c726 --- /dev/null +++ b/test/jdk/javax/swing/Action/AbstractActionBug.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + @bug 6514600 + @summary Verifies if AbstractAction throws NullPointerException when cloned + @run main AbstractActionBug + */ +import java.awt.event.ActionEvent; +import javax.swing.AbstractAction; + +public final class AbstractActionBug extends AbstractAction implements Cloneable +{ + public static final void main(String[] args) throws Exception + { + AbstractActionBug a1 = new AbstractActionBug("a1"); + a1 = (AbstractActionBug) a1.clone(); + System.out.println("a1 cloned ok"); + + AbstractActionBug a2 = new AbstractActionBug("a2"); + a2.putValue(NAME, "null"); + a2 = (AbstractActionBug) a2.clone(); + System.out.println("a2 cloned ok"); + + AbstractActionBug a3 = new AbstractActionBug(null); + a3 = (AbstractActionBug) a3.clone(); + System.out.println("a3 cloned ok"); + } + + private AbstractActionBug(String name) { + putValue(NAME, name); + } + + public void actionPerformed(ActionEvent e) + { + } +} \ No newline at end of file diff --git a/test/jdk/javax/swing/JFileChooser/FileChooserListenerLeak.java b/test/jdk/javax/swing/JFileChooser/FileChooserListenerLeak.java index 2db483869aa..74a2bfac8e6 100644 --- a/test/jdk/javax/swing/JFileChooser/FileChooserListenerLeak.java +++ b/test/jdk/javax/swing/JFileChooser/FileChooserListenerLeak.java @@ -21,9 +21,14 @@ * questions. */ +import java.awt.Component; +import java.awt.Container; import java.awt.EventQueue; +import javax.swing.JComponent; import javax.swing.JFileChooser; +import javax.swing.JMenu; +import javax.swing.JMenuItem; import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; @@ -52,19 +57,33 @@ public static void main(final String[] args) throws Exception { }); } - private static void checkListenersCount(JFileChooser chooser) { - test(chooser.getComponentListeners()); - test(chooser.getFocusListeners()); - test(chooser.getHierarchyListeners()); - test(chooser.getHierarchyBoundsListeners()); - test(chooser.getKeyListeners()); - test(chooser.getMouseListeners()); - test(chooser.getMouseMotionListeners()); - test(chooser.getMouseWheelListeners()); - test(chooser.getInputMethodListeners()); - test(chooser.getPropertyChangeListeners()); - test(chooser.getAncestorListeners()); - test(chooser.getVetoableChangeListeners()); + private static void checkListenersCount(Component comp) { + test(comp.getComponentListeners()); + test(comp.getFocusListeners()); + test(comp.getHierarchyListeners()); + test(comp.getHierarchyBoundsListeners()); + test(comp.getKeyListeners()); + test(comp.getMouseListeners()); + test(comp.getMouseMotionListeners()); + test(comp.getMouseWheelListeners()); + test(comp.getInputMethodListeners()); + test(comp.getPropertyChangeListeners()); + if (comp instanceof JComponent) { + test(((JComponent) comp).getAncestorListeners()); + test(((JComponent) comp).getVetoableChangeListeners()); + } + if (comp instanceof JMenuItem) { + test(((JMenuItem) comp).getMenuKeyListeners()); + test(((JMenuItem) comp).getMenuDragMouseListeners()); + } + if (comp instanceof JMenu) { + test(((JMenu) comp).getMenuListeners()); + } + if (comp instanceof Container) { + for (Component child : ((Container) comp).getComponents()) { + checkListenersCount(child); + } + } } /** @@ -73,7 +92,7 @@ private static void checkListenersCount(JFileChooser chooser) { */ private static void test(Object[] listeners) { int length = listeners.length; - if (length > 10) { + if (length > 20) { throw new RuntimeException("The count of listeners is: " + length); } } diff --git a/test/jdk/javax/swing/JPopupMenu/4966112/bug4966112.java b/test/jdk/javax/swing/JPopupMenu/4966112/bug4966112.java index a569d654e23..1cb9c64118d 100644 --- a/test/jdk/javax/swing/JPopupMenu/4966112/bug4966112.java +++ b/test/jdk/javax/swing/JPopupMenu/4966112/bug4966112.java @@ -31,11 +31,27 @@ * @author Alexander Zuev * @run main bug4966112 */ -import javax.swing.*; +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JFileChooser; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JPopupMenu; +import javax.swing.JSpinner; +import javax.swing.JSplitPane; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; import javax.swing.event.PopupMenuListener; import javax.swing.event.PopupMenuEvent; -import java.awt.*; -import java.awt.event.*; + +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.Robot; +import java.awt.Point; +import java.awt.event.InputEvent; +import java.awt.event.KeyEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; public class bug4966112 { @@ -48,6 +64,7 @@ public class bug4966112 { private static volatile JFileChooser filec; private static int buttonMask; private static Robot robot; + private static boolean isAquaFileChooser; public static void main(String[] args) throws Exception { robot = new Robot(); @@ -99,6 +116,11 @@ public static void main(String[] args) throws Exception { createAndShowFileChooser(); robot.waitForIdle(); + if ((UIManager.getLookAndFeel().getID()).equals("Aqua")) { + isAquaFileChooser = true; + } else { + isAquaFileChooser = false; + } clickMouse(filec); robot.waitForIdle(); @@ -146,7 +168,11 @@ private static void setClickPoint(final JComponent c) throws Exception { public void run() { Point p = c.getLocationOnScreen(); Dimension size = c.getSize(); - result[0] = new Point(p.x + size.width / 2, p.y + size.height / 2); + if (isAquaFileChooser) { + result[0] = new Point(p.x + size.width / 2, p.y + 5); + } else { + result[0] = new Point(p.x + size.width / 2, p.y + size.height / 2); + } } }); diff --git a/test/jdk/javax/swing/JSlider/TestJSliderRendering.java b/test/jdk/javax/swing/JSlider/TestJSliderRendering.java new file mode 100644 index 00000000000..ebf12021ced --- /dev/null +++ b/test/jdk/javax/swing/JSlider/TestJSliderRendering.java @@ -0,0 +1,148 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @requires (os.family == "linux") + * @key headful + * @bug 8218469 + * @summary Tests JSlider is rendered properly with gtk3 + * @run main TestJSliderRendering + */ + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JSlider; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import java.awt.Color; +import java.awt.Component; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.Robot; + +public class TestJSliderRendering { + private static JFrame frame; + private static JSlider slider; + private static Point point; + private static Rectangle rect; + private static Robot robot; + private static final String GTK_LAF_CLASS = "GTKLookAndFeel"; + private static int minColorDifference = 50; + + private static void blockTillDisplayed(Component comp) { + Point p = null; + while (p == null) { + try { + p = comp.getLocationOnScreen(); + } catch (IllegalStateException e) { + try { + Thread.sleep(500); + } catch (InterruptedException ie) { + } + } + } + } + + private static int getMaxColorDiff(Color c1, Color c2) { + return Math.max(Math.abs(c1.getRed() - c2.getRed()), + Math.max(Math.abs(c1.getGreen() - c2.getGreen()), + Math.abs(c1.getBlue() - c2.getBlue()))); + } + + public static void main(String[] args) throws Exception { + if (!System.getProperty("os.name").startsWith("Linux")) { + System.out.println("This test is meant for Linux platform only"); + return; + } + + for (UIManager.LookAndFeelInfo lookAndFeelInfo : + UIManager.getInstalledLookAndFeels()) { + if (lookAndFeelInfo.getClassName().contains(GTK_LAF_CLASS)) { + try { + UIManager.setLookAndFeel(lookAndFeelInfo.getClassName()); + } catch (final UnsupportedLookAndFeelException ignored) { + System.out.println("GTK L&F could not be set, so this " + + "test can not be run in this scenario "); + return; + } + } + } + + robot = new Robot(); + robot.setAutoDelay(100); + + try { + SwingUtilities.invokeAndWait(new Runnable() { + public void run() { + JPanel panel = new JPanel(); + slider = new JSlider(JSlider.HORIZONTAL, 0, 100, 50); + panel.add(slider); + frame = new JFrame("TestJSliderRendering"); + frame.add(panel); + frame.setSize(200, 200); + frame.setAlwaysOnTop(true); + frame.setLocationRelativeTo(null); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.setVisible(true); + } + }); + + robot.waitForIdle(); + robot.delay(500); + + blockTillDisplayed(slider); + SwingUtilities.invokeAndWait(() -> { + point = slider.getLocationOnScreen(); + rect = slider.getBounds(); + }); + robot.waitForIdle(); + robot.delay(500); + + int h = point.y+rect.height*6/7; + + Color backgroundColor = robot + .getPixelColor(point.x+rect.width/4, h); + robot.waitForIdle(); + + boolean knobFound = false; + for (int i=point.x+rect.width/4;i<point.x+rect.width*3/4;i+=2) { + Color highlightColor = robot.getPixelColor(i, h); + if (getMaxColorDiff(backgroundColor, highlightColor) + > minColorDifference) { + knobFound = true; + break; + } + robot.waitForIdle(); + } + if (!knobFound) { + throw new RuntimeException("The slider is not rendered properly"); + } + } finally { + if (frame != null) { + SwingUtilities.invokeAndWait(frame::dispose); + } + } + } +} diff --git a/test/jdk/javax/swing/JSpinner/SpinnerTest.java b/test/jdk/javax/swing/JSpinner/SpinnerTest.java new file mode 100644 index 00000000000..0418d21a047 --- /dev/null +++ b/test/jdk/javax/swing/JSpinner/SpinnerTest.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + @bug 5078989 + @key headful + @summary Verifies Null Pointer exception is not thrown in SpinnerListMode + @run main SpinnerTest + */ +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JSpinner; +import javax.swing.SpinnerListModel; +import javax.swing.SwingUtilities; +import java.awt.event.KeyEvent; +import java.awt.Point; +import java.awt.Robot; + +public class SpinnerTest +{ + private static JFrame frame; + private static JSpinner spinner; + + public static void main(String[] args) throws Exception { + Robot robot = new Robot(); + robot.setAutoDelay(100); + try { + SwingUtilities.invokeAndWait(() -> { + //Create and set up the window. + frame = new JFrame("SpinnerDemo"); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + JPanel panel = new JPanel(); + String[] values = {"Month: ", "Year: ", null, "Date", "Sent"}; + + SpinnerListModel listModel = new SpinnerListModel(values); + + JLabel l = new JLabel("Spinner"); + panel.add(l); + + spinner = new JSpinner(listModel); + l.setLabelFor(spinner); + panel.add(spinner); + + panel.setOpaque(true); //content panes must be opaque + frame.setContentPane(panel); + + //Display the window. + frame.pack(); + frame.setVisible(true); + frame.setLocationRelativeTo(null); + }); + robot.waitForIdle(); + robot.delay(1000); + Point loc = spinner.getLocationOnScreen(); + + robot.mouseMove(loc.x, loc.y); + robot.keyPress(KeyEvent.VK_SPACE); + robot.keyRelease(KeyEvent.VK_SPACE); + + } finally { + if (frame != null) { + SwingUtilities.invokeAndWait(() -> frame.dispose()); + } + } + } +} diff --git a/test/jdk/javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java b/test/jdk/javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java index a2f98574a3d..ef373d8b3e7 100644 --- a/test/jdk/javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java +++ b/test/jdk/javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -21,47 +21,111 @@ * questions. */ +import java.awt.Component; +import java.awt.Container; import java.awt.EventQueue; import java.awt.FlowLayout; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; -import javax.swing.*; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JCheckBoxMenuItem; +import javax.swing.JComboBox; +import javax.swing.JComponent; +import javax.swing.JDesktopPane; +import javax.swing.JEditorPane; +import javax.swing.JFormattedTextField; +import javax.swing.JFrame; +import javax.swing.JInternalFrame; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JPanel; +import javax.swing.JPasswordField; +import javax.swing.JProgressBar; +import javax.swing.JRadioButton; +import javax.swing.JRadioButtonMenuItem; +import javax.swing.JScrollBar; +import javax.swing.JScrollPane; +import javax.swing.JSeparator; +import javax.swing.JSlider; +import javax.swing.JSpinner; +import javax.swing.JSplitPane; +import javax.swing.JTabbedPane; +import javax.swing.JTable; +import javax.swing.JTextArea; +import javax.swing.JTextField; +import javax.swing.JTextPane; +import javax.swing.JToggleButton; +import javax.swing.JToolBar; +import javax.swing.JToolTip; +import javax.swing.JTree; +import javax.swing.JViewport; +import javax.swing.SwingUtilities; import javax.swing.UIManager.LookAndFeelInfo; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + import static javax.swing.UIManager.getInstalledLookAndFeels; /** * @test * @key headful - * @bug 8134947 - * @author Sergey Bylokhov - * @run main/timeout=300/othervm -Xmx12m -XX:+HeapDumpOnOutOfMemoryError UnninstallUIMemoryLeaks + * @bug 8134947 8253977 + * @library /test/lib + * @run main/timeout=450/othervm UnninstallUIMemoryLeaks */ public final class UnninstallUIMemoryLeaks { private static JFrame frame; - public static void main(final String[] args) throws Exception { - try { - createGUI(); - for (final LookAndFeelInfo laf : getInstalledLookAndFeels()) { - final String name = laf.getName(); + public static void main(String[] args) throws Exception { + if (args.length == 0) { + long end = System.nanoTime() + TimeUnit.SECONDS.toNanos(400); + // run one task per look and feel + List<Process> tasks = new ArrayList<>(); + for (LookAndFeelInfo laf : getInstalledLookAndFeels()) { + String name = laf.getName(); if (name.contains("OS X") || name.contains("Metal")) { - SwingUtilities.invokeAndWait(() -> setLookAndFeel(laf)); - SwingUtilities.invokeAndWait(() -> { - for (int i = 0; i < 4000; ++i) { - SwingUtilities.updateComponentTreeUI(frame); - } - }); + tasks.add(runProcess(laf)); } } + for (Process p : tasks) { + if (!p.waitFor(end - System.nanoTime(), TimeUnit.NANOSECONDS)) { + p.destroyForcibly(); + } + } + for (Process task : tasks) { + new OutputAnalyzer(task).shouldHaveExitValue(0) + .stderrShouldBeEmpty(); + } + return; + } + + try { + createGUI(); + long end = System.nanoTime() + TimeUnit.SECONDS.toNanos(350); + SwingUtilities.invokeAndWait(() -> { + while (end > System.nanoTime()) { + SwingUtilities.updateComponentTreeUI(frame); + } + checkListenersCount(frame); + }); } finally { - if (frame != null) { EventQueue.invokeAndWait(() -> frame.dispose()); } + if (frame != null) {EventQueue.invokeAndWait(frame::dispose);} } } private static void createGUI() throws Exception { EventQueue.invokeAndWait(() -> { frame = new JFrame(); + //TODO we sometimes generate unnecessary repaint events + frame.setIgnoreRepaint(true); frame.setLayout(new FlowLayout()); frame.add(new JButton("JButton")); @@ -121,13 +185,51 @@ private static void createGUI() throws Exception { }); } - private static void setLookAndFeel(final LookAndFeelInfo laf) { - try { - UIManager.setLookAndFeel(laf.getClassName()); - System.out.println("LookAndFeel: " + laf.getClassName()); - } catch (ClassNotFoundException | InstantiationException | - UnsupportedLookAndFeelException | IllegalAccessException e) { - throw new RuntimeException(e); + private static void checkListenersCount(Component comp) { + test(comp.getComponentListeners()); + test(comp.getFocusListeners()); + test(comp.getHierarchyListeners()); + test(comp.getHierarchyBoundsListeners()); + test(comp.getKeyListeners()); + test(comp.getMouseListeners()); + test(comp.getMouseMotionListeners()); + test(comp.getMouseWheelListeners()); + test(comp.getInputMethodListeners()); + test(comp.getPropertyChangeListeners()); + if (comp instanceof JComponent) { + test(((JComponent) comp).getAncestorListeners()); + test(((JComponent) comp).getVetoableChangeListeners()); + } + if (comp instanceof JMenuItem) { + test(((JMenuItem) comp).getMenuKeyListeners()); + test(((JMenuItem) comp).getMenuDragMouseListeners()); + } + if (comp instanceof JMenu) { + test(((JMenu) comp).getMenuListeners()); + } + if(comp instanceof Container) { + for(Component child: ((Container)comp).getComponents()){ + checkListenersCount(child); + } } } + + /** + * Checks the count of specific listeners, assumes that the proper + * implementation does not use more than 20 listeners. + */ + private static void test(Object[] listeners) { + int length = listeners.length; + if (length > 20) { + throw new RuntimeException("The count of listeners is: " + length); + } + } + + private static Process runProcess(LookAndFeelInfo laf) throws Exception { + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( + "-Dswing.defaultlaf=" + laf.getClassName(), "-mx9m", + "-XX:+HeapDumpOnOutOfMemoryError", + UnninstallUIMemoryLeaks.class.getSimpleName(), "mark"); + return ProcessTools.startProcess(laf.getName(), pb); + } } diff --git a/test/jdk/javax/swing/plaf/basic/BasicComboPopup/7072653/bug7072653.java b/test/jdk/javax/swing/plaf/basic/BasicComboPopup/7072653/bug7072653.java index 78160283a4a..031aac8e01b 100644 --- a/test/jdk/javax/swing/plaf/basic/BasicComboPopup/7072653/bug7072653.java +++ b/test/jdk/javax/swing/plaf/basic/BasicComboPopup/7072653/bug7072653.java @@ -112,6 +112,8 @@ public int getSize() { combobox.putClientProperty("JComboBox.isPopDown", true); frame.getContentPane().add(combobox); frame.setVisible(true); + robot.delay(3000); // wait some time to stabilize the size of the + // screen insets after the window is shown combobox.addPopupMenuListener(new PopupMenuListener() { @Override public void popupMenuWillBecomeVisible(PopupMenuEvent e) { diff --git a/test/jdk/javax/swing/plaf/synth/7158712/bug7158712.java b/test/jdk/javax/swing/plaf/synth/7158712/bug7158712.java index 2ef8899bf40..cc99bc88121 100644 --- a/test/jdk/javax/swing/plaf/synth/7158712/bug7158712.java +++ b/test/jdk/javax/swing/plaf/synth/7158712/bug7158712.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -27,13 +27,19 @@ * @bug 7158712 * @summary Synth Property "ComboBox.popupInsets" is ignored * @library ../../../regtesthelpers - * @author Pavel Porvatov + * @run main/othervm -Dsun.java2d.uiScale=1 bug7158712 */ -import javax.swing.*; +import javax.swing.JComboBox; +import javax.swing.JFrame; +import javax.swing.SwingUtilities; import javax.swing.plaf.basic.BasicComboPopup; import javax.swing.plaf.synth.SynthLookAndFeel; -import java.awt.*; +import javax.swing.UIManager; +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.Robot; +import java.awt.Point; import java.awt.event.InputEvent; import java.io.ByteArrayInputStream; import java.util.concurrent.Callable; @@ -59,7 +65,7 @@ public class bug7158712 { public static void main(String[] args) throws Exception { Robot robot = new Robot(); - robot.setAutoDelay(500); + robot.setAutoDelay(100); SynthLookAndFeel laf = new SynthLookAndFeel(); @@ -67,7 +73,7 @@ public static void main(String[] args) throws Exception { UIManager.setLookAndFeel(laf); - EventQueue.invokeAndWait(new Runnable() { + SwingUtilities.invokeAndWait(new Runnable() { public void run() { comboBox = new JComboBox<>( new String[]{"Very Looooooooooooooooooooong Text Item 1", "Item 2"}); @@ -83,6 +89,7 @@ public void run() { }); robot.waitForIdle(); + robot.delay(1000); Point comboBoxLocation = Util.invokeOnEDT(new Callable<Point>() { @Override diff --git a/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java b/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java index 57f5b2a7056..f170458893c 100644 --- a/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java +++ b/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java @@ -66,34 +66,42 @@ private static void testMemoryLimit(String value) { } private static void testMemoryFailCount() { - long count = Metrics.systemMetrics().getMemoryFailCount(); - - // Allocate 512M of data - byte[][] bytes = new byte[64][]; - boolean atLeastOneAllocationWorked = false; - for (int i = 0; i < 64; i++) { - try { - bytes[i] = new byte[8 * 1024 * 1024]; - atLeastOneAllocationWorked = true; - // Break out as soon as we see an increase in failcount - // to avoid getting killed by the OOM killer. - if (Metrics.systemMetrics().getMemoryFailCount() > count) { + long memAndSwapLimit = Metrics.systemMetrics().getMemoryAndSwapLimit(); + long memLimit = Metrics.systemMetrics().getMemoryLimit(); + + // We need swap to execute this test or will SEGV + if (memAndSwapLimit <= memLimit) { + System.out.println("No swap memory limits, test case skipped"); + } else { + long count = Metrics.systemMetrics().getMemoryFailCount(); + + // Allocate 512M of data + byte[][] bytes = new byte[64][]; + boolean atLeastOneAllocationWorked = false; + for (int i = 0; i < 64; i++) { + try { + bytes[i] = new byte[8 * 1024 * 1024]; + atLeastOneAllocationWorked = true; + // Break out as soon as we see an increase in failcount + // to avoid getting killed by the OOM killer. + if (Metrics.systemMetrics().getMemoryFailCount() > count) { + break; + } + } catch (Error e) { // OOM error break; } - } catch (Error e) { // OOM error - break; } - } - if (!atLeastOneAllocationWorked) { - System.out.println("Allocation failed immediately. Ignoring test!"); - return; - } - // Be sure bytes allocations don't get optimized out - System.out.println("DEBUG: Bytes allocation length 1: " + bytes[0].length); - if (Metrics.systemMetrics().getMemoryFailCount() <= count) { - throw new RuntimeException("Memory fail count : new : [" - + Metrics.systemMetrics().getMemoryFailCount() + "]" - + ", old : [" + count + "]"); + if (!atLeastOneAllocationWorked) { + System.out.println("Allocation failed immediately. Ignoring test!"); + return; + } + // Be sure bytes allocations don't get optimized out + System.out.println("DEBUG: Bytes allocation length 1: " + bytes[0].length); + if (Metrics.systemMetrics().getMemoryFailCount() <= count) { + throw new RuntimeException("Memory fail count : new : [" + + Metrics.systemMetrics().getMemoryFailCount() + "]" + + ", old : [" + count + "]"); + } } System.out.println("TEST PASSED!!!"); } @@ -131,10 +139,12 @@ private static void testKernelMemoryLimit(String value) { private static void testMemoryAndSwapLimit(String memory, String memAndSwap) { long expectedMem = getMemoryValue(memory); long expectedMemAndSwap = getMemoryValue(memAndSwap); + long actualMemAndSwap = Metrics.systemMetrics().getMemoryAndSwapLimit(); if (expectedMem != Metrics.systemMetrics().getMemoryLimit() - || expectedMemAndSwap != Metrics.systemMetrics().getMemoryAndSwapLimit()) { - System.err.println("Memory and swap limit not equal, expected : [" + || (expectedMemAndSwap != actualMemAndSwap + && expectedMem != actualMemAndSwap)) { + throw new RuntimeException("Memory and swap limit not equal, expected : [" + expectedMem + ", " + expectedMemAndSwap + "]" + ", got : [" + Metrics.systemMetrics().getMemoryLimit() + ", " + Metrics.systemMetrics().getMemoryAndSwapLimit() + "]"); diff --git a/test/jdk/jdk/internal/platform/docker/TestUseContainerSupport.java b/test/jdk/jdk/internal/platform/docker/TestUseContainerSupport.java index 2b087d2cc8a..a2719ebccc1 100644 --- a/test/jdk/jdk/internal/platform/docker/TestUseContainerSupport.java +++ b/test/jdk/jdk/internal/platform/docker/TestUseContainerSupport.java @@ -60,8 +60,7 @@ private static void testUseContainerSupport(boolean useContainerSupport) throws DockerRunOptions opts = new DockerRunOptions(imageName, "/jdk/bin/java", "CheckUseContainerSupport"); opts.addClassOptions(Boolean.valueOf(useContainerSupport).toString()); - opts.addDockerOpts("--memory", "200m") - .addDockerOpts("--volume", Utils.TEST_CLASSES + ":/test-classes/"); + opts.addDockerOpts("--volume", Utils.TEST_CLASSES + ":/test-classes/"); if (useContainerSupport) { opts.addJavaOpts("-XX:+UseContainerSupport"); } else { diff --git a/test/jdk/jdk/jfr/event/gc/collection/TestG1ParallelPhases.java b/test/jdk/jdk/jfr/event/gc/collection/TestG1ParallelPhases.java index 06837a04cd0..2f9568201c5 100644 --- a/test/jdk/jdk/jfr/event/gc/collection/TestG1ParallelPhases.java +++ b/test/jdk/jdk/jfr/event/gc/collection/TestG1ParallelPhases.java @@ -91,7 +91,6 @@ public static void main(String[] args) throws IOException { Set<String> allPhases = of( "ExtRootScan", "ThreadRoots", - "ObjectSynchronizerRoots", "VM Global", "JNI Global", "Thread OopStorage", diff --git a/test/jdk/jdk/jfr/event/runtime/TestModuleEvents.java b/test/jdk/jdk/jfr/event/runtime/TestModuleEvents.java index 9dc09ead243..87f977c2dcf 100644 --- a/test/jdk/jdk/jfr/event/runtime/TestModuleEvents.java +++ b/test/jdk/jdk/jfr/event/runtime/TestModuleEvents.java @@ -111,7 +111,7 @@ private static void verifyExportedModules() throws Throwable { assertEquals(edges.get("jdk/jfr"), UNNAMED); assertEquals(edges.get("java/util"), UNNAMED); assertEquals(edges.get("jdk/jfr/events"), "java.base"); - assertEquals(edges.get("jdk/internal"), "jdk.jfr"); + assertEquals(edges.get("jdk/internal/vm/annotation"), "jdk.jfr"); recording.close(); } diff --git a/test/jdk/jdk/jfr/tool/TestDisassemble.java b/test/jdk/jdk/jfr/tool/TestDisassemble.java index 29d28531a02..94d2d7b4346 100644 --- a/test/jdk/jdk/jfr/tool/TestDisassemble.java +++ b/test/jdk/jdk/jfr/tool/TestDisassemble.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -40,6 +40,7 @@ /** * @test + * @bug 8253050 * @summary Test jfr split * @key jfr * @requires vm.hasJFR @@ -55,13 +56,16 @@ public static void main(String[] args) throws Throwable { Path recordingFileA = Paths.get("many-chunks-A-" + dateText + ".jfr"); Path recordingFileB = Paths.get("many-chunks-B-" + dateText + ".jfr"); Path recordingFileC = Paths.get("many-chunks-C-" + dateText + ".jfr"); + Path recordingFileD = Paths.get("many-chunks-D-" + dateText + ".jfr"); makeRecordingWithChunks(6, recordingFileA); Files.copy(recordingFileA, recordingFileB); Files.copy(recordingFileA, recordingFileC); + Files.copy(recordingFileA, recordingFileD); String fileAText = recordingFileA.toAbsolutePath().toString(); String fileBText = recordingFileB.toAbsolutePath().toString(); String fileCText = recordingFileC.toAbsolutePath().toString(); + String fileDText = recordingFileD.toAbsolutePath().toString(); OutputAnalyzer output = ExecuteHelper.jfr("disassemble"); output.shouldContain("missing file"); @@ -97,6 +101,15 @@ public static void main(String[] args) throws Throwable { // sanity check output = ExecuteHelper.jfr("disassemble", "--max-size", "10000", fileCText); verifyRecording(fileCText.substring(0, fileCText.length() - 4) + "_01.jfr"); + + // test JDK-8253050 + output = ExecuteHelper.jfr("disassemble", "--max-chunks", "1", fileDText); + String chunks = output.firstMatch("File consists of (\\d+) chunks", 1); + output.shouldContain("The recording will be split into " + chunks + " files"); + String chunkFilePrefix = fileDText.substring(0, fileDText.length() - 4) + "_"; + for (long i = 0; i < Long.parseLong(chunks); i++) { + verifyRecording(chunkFilePrefix + String.format("%0" + chunks.length() + "d", i) + ".jfr"); + } } private static void verifyRecording(String name) throws IOException { diff --git a/test/jdk/jdk/security/jarsigner/Spec.java b/test/jdk/jdk/security/jarsigner/Spec.java index 908138762bd..e04f278c5aa 100644 --- a/test/jdk/jdk/security/jarsigner/Spec.java +++ b/test/jdk/jdk/security/jarsigner/Spec.java @@ -31,7 +31,7 @@ * jdk.jartool * jdk.crypto.ec * @build jdk.test.lib.util.JarUtils - * @run main/othervm -Djdk.sunec.disableNative=false Spec + * @run main/othervm Spec */ import com.sun.jarsigner.ContentSigner; @@ -190,7 +190,7 @@ public static void main(String[] args) throws Exception { .equals("SHA256withDSA")); kpg = KeyPairGenerator.getInstance("EC"); - kpg.initialize(192); + kpg.initialize(256); assertTrue(JarSigner.Builder .getDefaultSignatureAlgorithm(kpg.generateKeyPair().getPrivate()) .equals("SHA256withECDSA")); @@ -198,7 +198,7 @@ public static void main(String[] args) throws Exception { assertTrue(JarSigner.Builder .getDefaultSignatureAlgorithm(kpg.generateKeyPair().getPrivate()) .equals("SHA384withECDSA")); - kpg.initialize(571); + kpg.initialize(521); assertTrue(JarSigner.Builder .getDefaultSignatureAlgorithm(kpg.generateKeyPair().getPrivate()) .equals("SHA512withECDSA")); diff --git a/test/jdk/sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java b/test/jdk/sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java index 4c9d52995f1..a440abcb1ff 100644 --- a/test/jdk/sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java +++ b/test/jdk/sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -22,6 +22,7 @@ */ import com.sun.swingset3.demos.button.ButtonDemo; +import org.jemmy2ext.JemmyExt; import org.jtregext.GuiTestListener; import org.netbeans.jemmy.ClassReference; import org.netbeans.jemmy.ComponentChooser; @@ -33,7 +34,11 @@ import org.testng.annotations.Test; import java.awt.Component; +import java.awt.Dimension; +import java.awt.Point; +import java.awt.Rectangle; import java.awt.Robot; +import java.awt.Toolkit; import java.awt.image.BufferedImage; import javax.swing.UIManager; @@ -72,10 +77,24 @@ public void test(String lookAndFeel) throws Exception { UIManager.setLookAndFeel(lookAndFeel); Robot rob = new Robot(); + //capture some of the background + Dimension screeSize = Toolkit.getDefaultToolkit().getScreenSize(); + Point screenCenter = new Point(screeSize.width / 2, screeSize.height / 2); + Rectangle center = new Rectangle( + screenCenter.x - 50, screenCenter.y - 50, + screenCenter.x + 50, screenCenter.y + 50); + BufferedImage background = rob.createScreenCapture(center); + new ClassReference(ButtonDemo.class.getCanonicalName()).startApplication(); JFrameOperator mainFrame = new JFrameOperator(DEMO_TITLE); - waitImageIsStill(rob, mainFrame); + mainFrame.waitComponentShowing(true); + + //make sure the frame is already painted + waitChangedImage(rob, () -> rob.createScreenCapture(center), + background, mainFrame.getTimeouts(), "background.png"); + //make sure the frame is painted completely + waitStillImage(rob, mainFrame, "frame.png"); // Check all the buttons for (int i : BUTTONS) { @@ -83,7 +102,7 @@ public void test(String lookAndFeel) throws Exception { } } - private void checkButton(JFrameOperator jfo, int i, Robot rob) { + private void checkButton(JFrameOperator jfo, int i, Robot rob) throws InterruptedException { JButtonOperator button = new JButtonOperator(jfo, i); //additional instrumentation for JDK-8198920. To be removed after the bug is fixed @@ -93,9 +112,8 @@ private void checkButton(JFrameOperator jfo, int i, Robot rob) { button.moveMouse(button.getCenterX(), button.getCenterY()); - BufferedImage initialButtonImage = capture(rob, button); - assertNotBlack(initialButtonImage); - save(initialButtonImage, "button" + i + ".png"); + BufferedImage notPressed, pressed = null; + notPressed = waitStillImage(rob, button, "not-pressed-" + i + ".png"); BufferedImage[] pressedImage = new BufferedImage[1]; @@ -108,22 +126,15 @@ private void checkButton(JFrameOperator jfo, int i, Robot rob) { //additional instrumentation for JDK-8198920. To be removed after the bug is fixed button.getOutput().printTrace("JDK-8198920: Button press confirmed by " + System.currentTimeMillis()); //end of instrumentation for JDK-8198920 - button.waitState(new ComponentChooser() { - public boolean checkComponent(Component c) { - pressedImage[0] = capture(rob, button); - assertNotBlack(pressedImage[0]); - return !sComparator.compare(initialButtonImage, pressedImage[0]); - } - - public String getDescription() { - return "Button with new image"; - } - }); + waitChangedImage(rob, () -> capture(rob, button), notPressed, + button.getTimeouts(), "pressed-" + i + ".png"); + pressed = waitStillImage(rob, button, "pressed.png"); } finally { - if (pressedImage[0] != null) { - save(pressedImage[0], "button" + i + "_pressed.png"); - } button.releaseMouse(); + if(pressed != null) { + waitChangedImage(rob, () -> capture(rob, button), pressed, + button.getTimeouts(), "released-" + i + ".png"); + } //additional instrumentation for JDK-8198920. To be removed after the bug is fixed button.getOutput().printTrace("JDK-8198920: Button released at " + System.currentTimeMillis()); try { diff --git a/test/jdk/sanity/client/SwingSet/src/EditorPaneDemoTest.java b/test/jdk/sanity/client/SwingSet/src/EditorPaneDemoTest.java index 325c087f133..268ea254eb3 100644 --- a/test/jdk/sanity/client/SwingSet/src/EditorPaneDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/EditorPaneDemoTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 @@ -23,8 +23,8 @@ import static com.sun.swingset3.demos.editorpane.EditorPaneDemo.DEMO_TITLE; import static com.sun.swingset3.demos.editorpane.EditorPaneDemo.SOURCE_FILES; -import static org.jemmy2ext.JemmyExt.EXACT_STRING_COMPARATOR; -import static org.jemmy2ext.JemmyExt.assertNotBlack; +import static org.jemmy2ext.JemmyExt.*; +import static org.testng.Assert.assertFalse; import java.awt.Color; import java.awt.Dimension; @@ -149,7 +149,8 @@ private void checkImage(JEditorPaneOperator editorPaneOperator, final int xGap = 100, yGap = 40, columns = 2, rows = 5; editorPaneOperator.waitState(comp -> { BufferedImage capturedImage = ImageTool.getImage(imageRect); - assertNotBlack(capturedImage); + save(capturedImage, "editor.png"); + assertFalse(isBlack(capturedImage), "image blackness"); int x = 0, y = 0, i = 0, j; for (; i < columns; i++) { x += xGap; diff --git a/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java b/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java index 8063c60c986..948e1541fca 100644 --- a/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java +++ b/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -40,6 +40,7 @@ import java.util.Collections; import java.util.List; import java.util.function.Function; +import java.util.function.Supplier; import java.util.logging.Level; import java.util.logging.Logger; import java.util.stream.IntStream; @@ -56,9 +57,11 @@ import org.netbeans.jemmy.DefaultCharBindingMap; import org.netbeans.jemmy.QueueTool; import org.netbeans.jemmy.TimeoutExpiredException; +import org.netbeans.jemmy.Timeouts; import org.netbeans.jemmy.Waitable; import org.netbeans.jemmy.Waiter; import org.netbeans.jemmy.drivers.scrolling.JSpinnerDriver; +import org.netbeans.jemmy.image.ImageComparator; import org.netbeans.jemmy.image.StrictImageComparator; import org.netbeans.jemmy.operators.ComponentOperator; import org.netbeans.jemmy.operators.ContainerOperator; @@ -89,17 +92,13 @@ public class JemmyExt { DefaultCharBindingMap.class }; - public static void assertNotBlack(BufferedImage image) { - int w = image.getWidth(); - int h = image.getHeight(); - try { - assertFalse("All pixels are not black", IntStream.range(0, w).parallel().allMatch(x - -> IntStream.range(0, h).allMatch(y -> (image.getRGB(x, y) & 0xffffff) == 0) - )); - } catch (Throwable t) { - save(image, "allPixelsAreBlack.png"); - throw t; - } + /** + * Checks if the image is complitely black. + */ + public static boolean isBlack(BufferedImage image) { + return IntStream.range(0, image.getWidth()).parallel() + .allMatch(x-> IntStream.range(0, image.getHeight()) + .allMatch(y -> (image.getRGB(x, y) & 0xffffff) == 0)); } public static void waitArmed(JButtonOperator button) { @@ -184,18 +183,46 @@ public static void save(BufferedImage image, String filename) { } } - public static void waitImageIsStill(Robot rob, ComponentOperator operator) { - operator.waitState(new ComponentChooser() { + /** + * Waits for a screen area taken by a component to not be completely black rectangle. + * @return last (non-black) image + * @throws TimeoutExpiredException if the waiting is unsuccessful + */ + public static BufferedImage waitNotBlack(Robot rob, ComponentOperator operator, String imageName) { + class NonBlackImageChooser implements ComponentChooser { + private BufferedImage image = null; + @Override + public boolean checkComponent(Component comp) { + image = capture(rob, operator); + save(image, imageName); + return !isBlack(image); + } + + @Override + public String getDescription() { + return "A non-black Image of " + operator; + } + } + NonBlackImageChooser chooser = new NonBlackImageChooser(); + operator.waitState(chooser); + return chooser.image; + } + /** + * Waits for the displayed image to be still. + * @return last still image + * @throws TimeoutExpiredException if the waiting is unsuccessful + */ + public static BufferedImage waitStillImage(Robot rob, ComponentOperator operator, String imageName) { + operator.getTimeouts().setTimeout("Waiter.TimeDelta", 1000); + class StillImageChooser implements ComponentChooser { private BufferedImage previousImage = null; - private int index = 0; private final StrictImageComparator sComparator = new StrictImageComparator(); @Override public boolean checkComponent(Component comp) { BufferedImage currentImage = capture(rob, operator); - save(currentImage, "waitImageIsStill" + index + ".png"); - index++; + save(currentImage, imageName); boolean compareResult = previousImage == null ? false : sComparator.compare(currentImage, previousImage); previousImage = currentImage; return compareResult; @@ -203,9 +230,46 @@ public boolean checkComponent(Component comp) { @Override public String getDescription() { - return "Image of " + operator + " is still"; + return "A still image of " + operator; } - }); + } + StillImageChooser chooser = new StillImageChooser(); + operator.waitState(chooser); + return chooser.previousImage; + } + + /** + * Waits for the displayed image to change. + * @param reference image to compare to + * @return last (changed) image + * @throws TimeoutExpiredException if the waiting is unsuccessful + */ + public static BufferedImage waitChangedImage(Robot rob, + Supplier<BufferedImage> supplier, + BufferedImage reference, + Timeouts timeouts, + String imageName) throws InterruptedException { + ImageComparator comparator = new StrictImageComparator(); + class ImageWaitable implements Waitable { + BufferedImage image; + + @Override + public Object actionProduced(Object obj) { + image = supplier.get(); + save(image, imageName); + return comparator.compare(reference, image) ? null : image; + } + + @Override + public String getDescription() { + return "Waiting screen image to change"; + } + } + ImageWaitable waitable = new ImageWaitable(); + Waiter waiter = new Waiter(waitable); + waiter.setTimeouts(timeouts); + waiter.waitAction(null); + return waitable.image; } private static class ThrowableHolder { diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/button/ButtonDemo.java b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/button/ButtonDemo.java index 358ae49d64b..f9bcd0a5ef9 100644 --- a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/button/ButtonDemo.java +++ b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/button/ButtonDemo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 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 @@ -218,6 +218,7 @@ public static void main(String args[]) throws InterruptedException, InvocationTa JFrame frame = new JFrame(DEMO_TITLE); frame.add(buttonDemo); frame.pack(); + frame.setLocationRelativeTo(null); frame.setVisible(true); }); } diff --git a/test/jdk/sun/security/ec/ECDSAJavaVerify.java b/test/jdk/sun/security/ec/ECDSAJavaVerify.java index ac4e5cdc5ee..77aad015b8b 100644 --- a/test/jdk/sun/security/ec/ECDSAJavaVerify.java +++ b/test/jdk/sun/security/ec/ECDSAJavaVerify.java @@ -66,10 +66,7 @@ public class ECDSAJavaVerify { "SHA1withECDSA", "SHA256withECDSA", "SHA384withECDSA", "SHA512withECDSA"}; static final String[] ALL_CURVES = new String[] { - "secp128r1", "secp256k1", "secp256r1", "secp384r1", "secp521r1"}; - - static final List<String> ALL_JAVA_CURVES - = List.of("secp256r1", "secp384r1", "secp521r1"); + "secp256r1", "secp384r1", "secp521r1"}; public static void main(String[] args) throws Exception { if (args.length == 1) { @@ -100,8 +97,7 @@ static void debug() throws Exception { = launchingConnector.defaultArguments(); arguments.get("main").setValue(ECDSAJavaVerify.class.getName()); arguments.get("options").setValue( - "-cp " + System.getProperty("test.classes") + - " -Djdk.sunec.disableNative=false"); + "-cp " + System.getProperty("test.classes")); VirtualMachine vm = launchingConnector.launch(arguments); MethodEntryRequest req = vm.eventRequestManager() @@ -117,7 +113,7 @@ static void debug() throws Exception { int pos = 0; for (String dummy : ALL_ALGS) { for (String curve : ALL_CURVES) { - char caller = ALL_JAVA_CURVES.contains(curve) ? 'J' : 'N'; + char caller = 'J'; // For each case, Signature::verify is called twice expected[pos++] = caller; expected[pos++] = caller; @@ -150,9 +146,6 @@ static void debug() throws Exception { case "verifySignedDigestImpl": // the java impl result[pos] = expected[pos] != 'J' ? 'x' : 'v'; break; - case "verifySignedDigest": // the native impl - result[pos] = expected[pos] != 'N' ? 'x' : 'v'; - break; } } vm.resume(); diff --git a/test/jdk/sun/security/ec/SignatureDigestTruncate.java b/test/jdk/sun/security/ec/SignatureDigestTruncate.java index 549ffc4af53..384568eda0f 100644 --- a/test/jdk/sun/security/ec/SignatureDigestTruncate.java +++ b/test/jdk/sun/security/ec/SignatureDigestTruncate.java @@ -36,7 +36,7 @@ * group order. * @library /test/lib * @build jdk.test.lib.Convert - * @run main/othervm -Djdk.sunec.disableNative=false SignatureDigestTruncate + * @run main/othervm SignatureDigestTruncate */ public class SignatureDigestTruncate { @@ -117,12 +117,12 @@ private static void runTest(String alg, String curveName, } public static void main(String[] args) throws Exception { - runTest("SHA384withECDSAinP1363Format", "sect283r1", + runTest("SHA384withECDSAinP1363Format", "secp256r1", "abcdef10234567", "010203040506070809", "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d" + - "1e1f20212223", - "01d7544b5d3935216bd45e2f8042537e1e0296a11e0eb96666199281b409" + - "42abccd5358a035de8a314d3e6c2a97614daebf5fb1313540eec3f9a3272" + - "068aa10922ccae87d255c84c"); + "1e1f20212223", + "d83534beccde787f9a4c6b0408337d9b9ca2e0a0259228526c15cc17a1d6" + + "4da6b34bf21b3bc4488c591d8ac9c33d93c7c6137e2ab4c503a42da7" + + "2fe0b6dda4c4"); } } diff --git a/test/jdk/sun/security/ec/TestEC.java b/test/jdk/sun/security/ec/TestEC.java index c9e44a6b954..de4f47ca5ed 100644 --- a/test/jdk/sun/security/ec/TestEC.java +++ b/test/jdk/sun/security/ec/TestEC.java @@ -37,8 +37,9 @@ * @library ../../../java/security/testlibrary * @library ../../../javax/net/ssl/TLSCommon * @modules jdk.crypto.cryptoki/sun.security.pkcs11.wrapper - * @run main/othervm -Djdk.tls.namedGroups="secp256r1,sect193r1" -Djdk.sunec.disableNative=false TestEC - * @run main/othervm -Djava.security.policy=TestEC.policy -Djdk.tls.namedGroups="secp256r1,sect193r1" -Djdk.sunec.disableNative=false TestEC + * @run main/othervm -Djdk.tls.namedGroups="secp256r1" TestEC + * @run main/othervm -Djava.security.policy=TestEC.policy + * -Djdk.tls.namedGroups="secp256r1" TestEC */ import java.security.NoSuchProviderException; @@ -48,13 +49,12 @@ /* * Leverage the collection of EC tests used by PKCS11 * - * NOTE: the following 6 files were copied here from the PKCS11 EC Test area + * NOTE: the following 5 files were copied here from the PKCS11 EC Test area * and must be kept in sync with the originals: * * ../pkcs11/ec/p12passwords.txt * ../pkcs11/ec/certs/sunlabscerts.pem * ../pkcs11/ec/pkcs12/secp256r1server-secp384r1ca.p12 - * ../pkcs11/ec/pkcs12/sect193r1server-rsa1024ca.p12 * ../pkcs11/sslecc/keystore * ../pkcs11/sslecc/truststore */ @@ -99,14 +99,21 @@ public static void main0(String[] args) throws Exception { * The entry point used for each test is its instance method * called main (not its static method called main). */ + System.out.println("TestECDH"); new TestECDH().main(p); + System.out.println("TestECDSA"); new TestECDSA().main(p); + System.out.println("TestCurves"); new TestCurves().main(p); + System.out.println("TestKeyFactory"); new TestKeyFactory().main(p); + System.out.println("TestECGenSpec"); new TestECGenSpec().main(p); + System.out.println("ReadPKCS12"); new ReadPKCS12().main(p); + System.out.println("ReadCertificate"); new ReadCertificates().main(p); - + System.out.println("ClientJSSEServerJSSE"); new ClientJSSEServerJSSE().main(p); long stop = System.currentTimeMillis(); diff --git a/test/jdk/sun/security/ec/keystore b/test/jdk/sun/security/ec/keystore index b59a2ab43c6..c8a09d1a6de 100644 Binary files a/test/jdk/sun/security/ec/keystore and b/test/jdk/sun/security/ec/keystore differ diff --git a/test/jdk/sun/security/ec/pkcs12/sect193r1server-rsa1024ca.p12 b/test/jdk/sun/security/ec/pkcs12/sect193r1server-rsa1024ca.p12 deleted file mode 100644 index ed4d861e4ca..00000000000 Binary files a/test/jdk/sun/security/ec/pkcs12/sect193r1server-rsa1024ca.p12 and /dev/null differ diff --git a/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java b/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java index 5e73bd9a602..9114d9154b3 100644 --- a/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java +++ b/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java @@ -267,6 +267,10 @@ public class VerifyCACerts { add("addtrustexternalca [jdk]"); // Valid until: Sat May 30 10:44:50 GMT 2020 add("addtrustqualifiedca [jdk]"); + // Valid until: Fri Jan 01 15:59:59 PST 2021 + add("verisigntsaca [jdk]"); + // Valid until: Fri Jan 01 15:59:59 PST 2021 + add("thawtepremiumserverca [jdk]"); } }; diff --git a/test/jdk/sun/security/pkcs11/PKCS11Test.java b/test/jdk/sun/security/pkcs11/PKCS11Test.java index ee71c7ace3f..9a38fff1ee3 100644 --- a/test/jdk/sun/security/pkcs11/PKCS11Test.java +++ b/test/jdk/sun/security/pkcs11/PKCS11Test.java @@ -96,7 +96,7 @@ public abstract class PKCS11Test { // NSS version info public static enum ECCState { None, Basic, Extended }; static double nss_version = -1; - static ECCState nss_ecc_status = ECCState.Extended; + static ECCState nss_ecc_status = ECCState.Basic; // The NSS library we need to search for in getNSSLibDir() // Default is "libsoftokn3.so", listed as "softokn3" diff --git a/test/jdk/sun/security/pkcs11/ec/ReadPKCS12.java b/test/jdk/sun/security/pkcs11/ec/ReadPKCS12.java index 50a86c0192a..edfe9fdccaf 100644 --- a/test/jdk/sun/security/pkcs11/ec/ReadPKCS12.java +++ b/test/jdk/sun/security/pkcs11/ec/ReadPKCS12.java @@ -29,9 +29,9 @@ * @library /test/lib .. * @library ../../../../java/security/testlibrary * @key randomness - * @modules jdk.crypto.cryptoki - * @run main/othervm -Djdk.sunec.disableNative=false ReadPKCS12 - * @run main/othervm -Djdk.sunec.disableNative=false ReadPKCS12 sm policy + * @modules jdk.crypto.cryptoki jdk.crypto.ec/sun.security.ec + * @run main/othervm ReadPKCS12 + * @run main/othervm ReadPKCS12 sm policy */ import java.io.BufferedReader; diff --git a/test/jdk/sun/security/pkcs11/ec/TestECDH.java b/test/jdk/sun/security/pkcs11/ec/TestECDH.java index 58d6b4b4181..83d19bc9150 100644 --- a/test/jdk/sun/security/pkcs11/ec/TestECDH.java +++ b/test/jdk/sun/security/pkcs11/ec/TestECDH.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -124,9 +124,12 @@ protected boolean skipTest(Provider p) { return; } - test(p, pub192a, priv192a, pub192b, priv192b, secret192); - test(p, pub163a, priv163a, pub163b, priv163b, secret163); - + if (getSupportedECParameterSpec("secp192r1", p).isPresent()) { + test(p, pub192a, priv192a, pub192b, priv192b, secret192); + } + if (getSupportedECParameterSpec("sect163r1", p).isPresent()) { + test(p, pub163a, priv163a, pub163b, priv163b, secret163); + } if (getSupportedECParameterSpec("brainpoolP256r1", p).isPresent()) { test(p, pubBrainpoolP256r1a, privBrainpoolP256r1a, pubBrainpoolP256r1b, privBrainpoolP256r1b, secretBrainpoolP256r1); } diff --git a/test/jdk/sun/security/pkcs11/ec/TestECDSA.java b/test/jdk/sun/security/pkcs11/ec/TestECDSA.java index f025ea9babb..7dd8904311a 100644 --- a/test/jdk/sun/security/pkcs11/ec/TestECDSA.java +++ b/test/jdk/sun/security/pkcs11/ec/TestECDSA.java @@ -156,12 +156,14 @@ public void main(Provider provider) throws Exception { return; } - if (getNSSECC() != ECCState.Basic) { + if (getSupportedECParameterSpec("secp192r1", provider).isPresent()) { test(provider, pub192, priv192, sig192); + } + if (getSupportedECParameterSpec("sect163r1", provider).isPresent()) { test(provider, pub163, priv163, sig163); + } + if (getSupportedECParameterSpec("sect571r1", provider).isPresent()) { test(provider, pub571, priv571, sig571); - } else { - System.out.println("ECC Basic only, skipping 192, 163 and 571."); } test(provider, pub521, priv521, sig521); diff --git a/test/jdk/sun/security/pkcs11/ec/TestKeyFactory.java b/test/jdk/sun/security/pkcs11/ec/TestKeyFactory.java index 29f93ea493e..ae0c84edba6 100644 --- a/test/jdk/sun/security/pkcs11/ec/TestKeyFactory.java +++ b/test/jdk/sun/security/pkcs11/ec/TestKeyFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -130,17 +130,12 @@ public void main(Provider p) throws Exception { System.out.println("Provider does not support EC, skipping"); return; } - int[] keyLengths = {192, 163, 409, 521}; - int len = 0; - if (getNSSECC() == ECCState.Basic) { - System.out.println("NSS Basic ECC only. Skipping 192, 163, & 409"); - len = 3; - } + int[] keyLengths = {256, 521}; KeyFactory kf = KeyFactory.getInstance("EC", p); - for (; keyLengths.length > len ; len++) { - System.out.println("Length "+keyLengths[len]); + for (int len : keyLengths) { + System.out.println("Length " + len); KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC", p); - kpg.initialize(keyLengths[len]); + kpg.initialize(len); KeyPair kp = kpg.generateKeyPair(); test(kf, kp.getPrivate()); test(kf, kp.getPublic()); diff --git a/test/jdk/sun/security/pkcs11/ec/pkcs12/sect193r1server-rsa1024ca.p12 b/test/jdk/sun/security/pkcs11/ec/pkcs12/sect193r1server-rsa1024ca.p12 deleted file mode 100644 index ed4d861e4ca..00000000000 Binary files a/test/jdk/sun/security/pkcs11/ec/pkcs12/sect193r1server-rsa1024ca.p12 and /dev/null differ diff --git a/test/jdk/sun/security/pkcs11/sslecc/keystore b/test/jdk/sun/security/pkcs11/sslecc/keystore index b59a2ab43c6..c8a09d1a6de 100644 Binary files a/test/jdk/sun/security/pkcs11/sslecc/keystore and b/test/jdk/sun/security/pkcs11/sslecc/keystore differ diff --git a/test/jdk/sun/security/provider/KeyStore/DKSTest.java b/test/jdk/sun/security/provider/KeyStore/DKSTest.java index dc63e82ecbd..56e8c37cd00 100644 --- a/test/jdk/sun/security/provider/KeyStore/DKSTest.java +++ b/test/jdk/sun/security/provider/KeyStore/DKSTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -52,8 +52,6 @@ public class DKSTest { new KeyStore.PasswordProtection("test12".toCharArray())); put("eckeystore1", new KeyStore.PasswordProtection("password".toCharArray())); - put("eckeystore2", - new KeyStore.PasswordProtection("password".toCharArray())); put("truststore", new KeyStore.PasswordProtection("changeit".toCharArray())); put("empty", @@ -69,8 +67,6 @@ public class DKSTest { new KeyStore.PasswordProtection("wrong".toCharArray())); put("eckeystore1", new KeyStore.PasswordProtection("wrong".toCharArray())); - put("eckeystore2", - new KeyStore.PasswordProtection("wrong".toCharArray())); }}; public static void main(String[] args) throws Exception { @@ -154,7 +150,7 @@ public static void main(String[] args) throws Exception { * domain keystore: keystores */ config = new URI(CONFIG + "#keystores"); - expected = 2 + 1 + 1 + 1; + expected = 2 + 1 + 1; keystore = KeyStore.getInstance("DKS"); // load entries keystore.load(new DomainLoadStoreParameter(config, PASSWORDS)); diff --git a/test/jdk/sun/security/provider/KeyStore/domains.cfg b/test/jdk/sun/security/provider/KeyStore/domains.cfg index f26d6f08fe1..da739377a7d 100644 --- a/test/jdk/sun/security/provider/KeyStore/domains.cfg +++ b/test/jdk/sun/security/provider/KeyStore/domains.cfg @@ -25,8 +25,6 @@ domain keystores keystoreType="CaseExactJKS" keystoreURI="${test.src}/pw.jks"; keystore eckeystore1 - keystoreURI="${test.src}/../../pkcs11/ec/pkcs12/sect193r1server-rsa1024ca.p12"; - keystore eckeystore2 keystoreURI="${test.src}/../../pkcs11/ec/pkcs12/secp256r1server-secp384r1ca.p12"; }; @@ -40,8 +38,6 @@ domain keystores_tmp keystoreType="CaseExactJKS" keystoreURI="${user.dir}/pw.jks_tmp"; keystore eckeystore1 - keystoreURI="${user.dir}/sect193r1server-rsa1024ca.p12_tmp"; - keystore eckeystore2 keystoreURI="${user.dir}/secp256r1server-secp384r1ca.p12_tmp"; }; diff --git a/test/jdk/sun/security/ssl/CipherSuite/DisabledCurve.java b/test/jdk/sun/security/ssl/CipherSuite/DisabledCurve.java index 620b11b773e..49b6105eff4 100644 --- a/test/jdk/sun/security/ssl/CipherSuite/DisabledCurve.java +++ b/test/jdk/sun/security/ssl/CipherSuite/DisabledCurve.java @@ -25,10 +25,10 @@ * @test * @bug 8246330 * @library /javax/net/ssl/templates - * @run main/othervm -Djdk.tls.namedGroups="sect283r1" + * @run main/othervm -Djdk.tls.namedGroups="secp384r1" DisabledCurve DISABLE_NONE PASS - * @run main/othervm -Djdk.tls.namedGroups="sect283r1" - DisabledCurve sect283r1 FAIL + * @run main/othervm -Djdk.tls.namedGroups="secp384r1" + DisabledCurve secp384r1 FAIL */ import java.security.Security; import java.util.Arrays; @@ -49,18 +49,18 @@ public class DisabledCurve extends SSLSocketTemplate { protected SSLContext createClientSSLContext() throws Exception { return createSSLContext( new SSLSocketTemplate.Cert[] { - SSLSocketTemplate.Cert.CA_ECDSA_SECT283R1 }, + SSLSocketTemplate.Cert.CA_ECDSA_SECP384R1 }, new SSLSocketTemplate.Cert[] { - SSLSocketTemplate.Cert.EE_ECDSA_SECT283R1 }, + SSLSocketTemplate.Cert.EE_ECDSA_SECP384R1 }, getClientContextParameters()); } protected SSLContext createServerSSLContext() throws Exception { return createSSLContext( new SSLSocketTemplate.Cert[] { - SSLSocketTemplate.Cert.CA_ECDSA_SECT283R1 }, + SSLSocketTemplate.Cert.CA_ECDSA_SECP384R1 }, new SSLSocketTemplate.Cert[] { - SSLSocketTemplate.Cert.EE_ECDSA_SECT283R1 }, + SSLSocketTemplate.Cert.EE_ECDSA_SECP384R1 }, getServerContextParameters()); } @@ -89,22 +89,23 @@ protected void configureServerSocket(SSLServerSocket serverSocket) { public static void main(String[] args) throws Exception { String expected = args[1]; String disabledName = ("DISABLE_NONE".equals(args[0]) ? "" : args[0]); + boolean disabled = false; if (disabledName.equals("")) { Security.setProperty("jdk.disabled.namedCurves", ""); + } else { + disabled = true; + Security.setProperty("jdk.certpath.disabledAlgorithms", "secp384r1"); } - System.setProperty("jdk.sunec.disableNative", "false"); for (index = 0; index < protocols.length; index++) { try { (new DisabledCurve()).run(); if (expected.equals("FAIL")) { throw new RuntimeException( - "The test case should not reach here"); + "Expected test to fail, but it passed"); } } catch (SSLException | IllegalStateException ssle) { - if ((expected.equals("FAIL")) - && Security.getProperty("jdk.disabled.namedCurves") - .contains(disabledName)) { + if (expected.equals("FAIL") && disabled) { System.out.println( "Expected exception was thrown: TEST PASSED"); } else { diff --git a/test/jdk/sun/security/tools/jarsigner/RestrictedAlgo.java b/test/jdk/sun/security/tools/jarsigner/RestrictedAlgo.java index 07dc2e47b4b..65fb1374bdc 100644 --- a/test/jdk/sun/security/tools/jarsigner/RestrictedAlgo.java +++ b/test/jdk/sun/security/tools/jarsigner/RestrictedAlgo.java @@ -93,11 +93,6 @@ public static void main(String[] args) throws Exception { System.out.println("\nTesting DSA Keysize: DSA keySize < 1024\n"); test("DSA", "SHA256withDSA", "KeySizeDSA", "SHA256", true, "-keysize", "512"); - - System.out.println("\nTesting Native Curve:" - + " include jdk.disabled.namedCurves\n"); - test("EC", "SHA256withECDSA", "curve", "SHA256", true, - "-groupname", "secp112r1"); } private static void test(String keyAlg, String sigAlg, String aliasPrefix, @@ -123,8 +118,7 @@ private static void testKeytool(String keyAlg, String sigAlg, String alias, "-ext", "bc:c", "-keyalg", keyAlg, "-sigalg", sigAlg, - "-alias", alias, - "-J-Djdk.sunec.disableNative=false"); + "-alias", alias); for (String additionalCMDArg : additionalCmdArgs) { cmd.add(additionalCMDArg); } @@ -147,8 +141,7 @@ private static void testJarSignerSigning(String sigAlg, String alias, "-digestalg", digestAlg, "-signedjar", SIGNED_JARFILE, UNSIGNED_JARFILE, - alias, - "-J-Djdk.sunec.disableNative=false"); + alias); OutputAnalyzer analyzer = SecurityTools.jarsigner(cmd) .shouldHaveExitValue(0); @@ -162,8 +155,7 @@ private static void testJarSignerVerification() System.out.println("\nTesting JarSigner Verification\n"); List<String> cmd = prepareCommand( "-verify", - SIGNED_JARFILE, - "-J-Djdk.sunec.disableNative=false"); + SIGNED_JARFILE); OutputAnalyzer analyzer = SecurityTools.jarsigner(cmd) .shouldHaveExitValue(0); diff --git a/test/jdk/sun/security/tools/keytool/GroupName.java b/test/jdk/sun/security/tools/keytool/GroupName.java index 6b8c57dd98c..2251ca47fe9 100644 --- a/test/jdk/sun/security/tools/keytool/GroupName.java +++ b/test/jdk/sun/security/tools/keytool/GroupName.java @@ -65,11 +65,6 @@ public static void main(String[] args) throws Throwable { .shouldNotContain("Specifying -keysize for generating EC keys is deprecated"); checkCurveName("e", "secp256r1"); - gen("f", "-J-Djdk.sunec.disableNative=false -keyalg EC -groupname brainpoolP256r1") - .shouldHaveExitValue(0) - .shouldNotContain("Specifying -keysize for generating EC keys is deprecated"); - checkCurveName("f", "brainpoolP256r1"); - kt("-list -v") .shouldHaveExitValue(0) .shouldContain("Subject Public Key Algorithm: 256-bit EC (secp256r1) key"); diff --git a/test/jdk/sun/security/tools/keytool/KeyAlg.java b/test/jdk/sun/security/tools/keytool/KeyAlg.java index 5a85ece04f9..044568ca624 100644 --- a/test/jdk/sun/security/tools/keytool/KeyAlg.java +++ b/test/jdk/sun/security/tools/keytool/KeyAlg.java @@ -41,10 +41,6 @@ public static void main(String[] args) throws Exception { keytool("-printcert -file user.crt") .shouldMatch("Signature algorithm name:.*SHA1withECDSA") .shouldMatch("Subject Public Key Algorithm:.*1024.*RSA"); - keytool("-genkeypair -alias e -dname CN=e " + - "-J-Djdk.sunec.disableNative=false -keyalg EC " + - "-groupname brainpoolP256r1") - .shouldContain("Generating 256 bit EC (brainpoolP256r1) key pair"); keytool("-genkeypair -alias f -dname CN=f -keyalg EC") .shouldContain("Generating 256 bit EC (secp256r1) key pair"); keytool("-genkeypair -alias g -dname CN=g -keyalg EC -keysize 384") diff --git a/test/jdk/sun/security/tools/keytool/fakegen/DefaultSignatureAlgorithm.java b/test/jdk/sun/security/tools/keytool/fakegen/DefaultSignatureAlgorithm.java index fbe8e63bdf0..b4ae0e21c76 100644 --- a/test/jdk/sun/security/tools/keytool/fakegen/DefaultSignatureAlgorithm.java +++ b/test/jdk/sun/security/tools/keytool/fakegen/DefaultSignatureAlgorithm.java @@ -55,11 +55,9 @@ public static void main(String[] args) throws Exception { check("DSA", 1024, null, "SHA256withDSA"); check("DSA", 3072, null, "SHA256withDSA"); - check("EC", 192, null, "SHA256withECDSA"); check("EC", 384, null, "SHA384withECDSA"); - check("EC", 571, null, "SHA512withECDSA"); - check("EC", 571, "SHA256withECDSA", "SHA256withECDSA"); + check("EC", 384, "SHA256withECDSA", "SHA256withECDSA"); } private static void check(String keyAlg, int keySize, @@ -82,8 +80,7 @@ private static void check(String keyAlg, int keySize, static OutputAnalyzer genkeypair(String alias, String options) throws Exception { - String patchArg = "-J-Djdk.sunec.disableNative=false " + - "-J--patch-module=java.base=" + String patchArg = "-J--patch-module=java.base=" + System.getProperty("test.classes") + File.separator + "patches" + File.separator + "java.base" + " -J--patch-module=jdk.crypto.ec=" diff --git a/test/jdk/sun/security/tools/keytool/fakegen/jdk.crypto.ec/sun/security/ec/ECKeyPairGenerator.java b/test/jdk/sun/security/tools/keytool/fakegen/jdk.crypto.ec/sun/security/ec/ECKeyPairGenerator.java index 68da125087f..f688da1c635 100644 --- a/test/jdk/sun/security/tools/keytool/fakegen/jdk.crypto.ec/sun/security/ec/ECKeyPairGenerator.java +++ b/test/jdk/sun/security/tools/keytool/fakegen/jdk.crypto.ec/sun/security/ec/ECKeyPairGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 @@ -58,14 +58,6 @@ public void initialize(AlgorithmParameterSpec params, SecureRandom random) public KeyPair generateKeyPair() { BigInteger s, x, y; switch (keySize) { - case 192: - s = new BigInteger("144089953963995451666433763881605261867377" - + "0287449914970417"); - x = new BigInteger("527580219290493448707803038403444129676461" - + "560927008883862"); - y = new BigInteger("171489247081620145247240656640887886126295" - + "376102134763235"); - break; case 384: s = new BigInteger("230878276322370828604837367594276033697165" + "328633328282930557390817326627704675451851870430805" @@ -77,22 +69,10 @@ public KeyPair generateKeyPair() { + "792287657810480793861620950159864617021540168828129" + "97920015041145259782242"); break; - case 571: - s = new BigInteger("102950007413729156017516513076331886543538" - + "947044937190140406420556321983301533699021909556189" - + "150601557539520495361099574425100081169640300555562" - + "4280643194744140660275077121"); - x = new BigInteger("640598847385582251482893323029655037929442" - + "593800810090252942944624854811134311418807076811195" - + "132373308708007447666896675761104237802118413642543" - + "8277858107132017492037336593"); - y = new BigInteger("254271270803422773271985083014247202480077" - + "131823713050110789460550383275777195766342550786766" - + "080401402424961690914429074822281551140068729472439" - + "477216613432839953714415981"); - break; default: - throw new AssertionError("Unsupported keysize " + keySize); + throw new AssertionError("SunEC ECKeyPairGenerator" + + "has been patched. Key size " + keySize + + " is not supported"); } ECParameterSpec ecParams = ECUtil.getECParameterSpec(null, keySize); try { diff --git a/test/jdk/sun/security/util/DerInputBuffer/DerInputBufferEqualsHashCode.java b/test/jdk/sun/security/util/DerInputBuffer/DerInputBufferEqualsHashCode.java deleted file mode 100644 index 2d040923a4f..00000000000 --- a/test/jdk/sun/security/util/DerInputBuffer/DerInputBufferEqualsHashCode.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @author Gary Ellison - * @bug 4170635 - * @summary Verify equals()/hashCode() contract honored - * @modules java.base/sun.security.util:+open - * java.base/sun.security.x509 - * @run main/othervm/policy=Allow.policy DerInputBufferEqualsHashCode - */ - -import java.io.*; -import sun.security.util.*; -import sun.security.x509.*; -import java.lang.reflect.*; - - -public class DerInputBufferEqualsHashCode { - - public static void main(String[] args) throws Exception { - - String name1 = "CN=eve s. dropper"; - DerOutputStream deros; - byte[] ba; - // encode - X500Name dn1 = new X500Name(name1); - - deros = new DerOutputStream(); - dn1.encode(deros); - ba = deros.toByteArray(); - - GetDIBConstructor a = new GetDIBConstructor(); - java.security.AccessController.doPrivileged(a); - Constructor c = a.getCons(); - - Object[] objs = new Object[1]; - objs[0] = ba; - - Object db1 = null, db2 = null; - try { - db1 = c.newInstance(objs); - db2 = c.newInstance(objs); - } catch (Exception e) { - System.out.println("Caught unexpected exception " + e); - throw e; - } - - if ( (db1.equals(db2)) == (db1.hashCode()==db2.hashCode()) ) - System.out.println("PASSED"); - else - throw new Exception("FAILED equals()/hashCode() contract"); - - } -} - - -class GetDIBConstructor implements java.security.PrivilegedExceptionAction { - - private Class dibClass = null; - private Constructor dibCons = null; - - public Object run() throws Exception { - try { - dibClass = Class.forName("sun.security.util.DerInputBuffer"); - Constructor[] cons = dibClass.getDeclaredConstructors(); - - int i; - for (i = 0; i < cons.length; i++) { - Class [] parms = cons[i].getParameterTypes(); - if (parms.length == 1) { - if (parms[0].getName().equalsIgnoreCase("[B")) { - cons[i].setAccessible(true); - break; - } - } - } - dibCons = cons[i]; - } catch (Exception e) { - System.out.println("Caught unexpected exception " + e); - throw e; - } - return dibCons; - } - - public Constructor getCons(){ - return dibCons; - } - -} diff --git a/test/jdk/sun/security/util/DerValue/DeepOctets.java b/test/jdk/sun/security/util/DerValue/DeepOctets.java new file mode 100644 index 00000000000..cceaa739768 --- /dev/null +++ b/test/jdk/sun/security/util/DerValue/DeepOctets.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8249783 + * @summary read very deep constructed OCTET STRING + * @modules java.base/sun.security.util + * @library /test/lib + */ + +import jdk.test.lib.Asserts; +import jdk.test.lib.Utils; +import sun.security.util.DerInputStream; +import sun.security.util.DerValue; + +import java.io.IOException; + +public class DeepOctets { + + public static void main(String[] args) throws Exception { + byte[] input = { + 0x24, 24, + 0x24, 8, 4, 2, 'a', 'b', 4, 2, 'c', 'd', + 0x24, 8, 4, 2, 'e', 'f', 4, 2, 'g', 'h', + 4, 2, 'i', 'j' + }; + + // DerValue::getOctetString supports constructed BER + byte[] s = new DerValue(input).getOctetString(); + Asserts.assertEQ(new String(s), "abcdefghij"); + + // DerInputStream::getOctetString does not + Utils.runAndCheckException( + () -> new DerInputStream(input).getOctetString(), + IOException.class); + } +} diff --git a/test/jdk/sun/security/util/DerValue/Indefinite.java b/test/jdk/sun/security/util/DerValue/Indefinite.java index c5064315a4f..17270c6642f 100644 --- a/test/jdk/sun/security/util/DerValue/Indefinite.java +++ b/test/jdk/sun/security/util/DerValue/Indefinite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -23,23 +23,78 @@ /* * @test - * @bug 6731685 + * @bug 6731685 8249783 * @summary CertificateFactory.generateCertificates throws IOException on PKCS7 cert chain * @modules java.base/sun.security.util + * @library /test/lib */ import java.io.*; +import java.lang.reflect.Field; +import java.util.Arrays; + +import jdk.test.lib.Asserts; +import jdk.test.lib.Utils; +import jdk.test.lib.hexdump.HexPrinter; import sun.security.util.*; public class Indefinite { public static void main(String[] args) throws Exception { - byte[] input = { - // An OCTET-STRING in 2 parts - 4, (byte)0x80, 4, 2, 'a', 'b', 4, 2, 'c', 'd', 0, 0, - // Garbage follows, may be falsely recognized as EOC - 0, 0, 0, 0 - }; - new DerValue(new ByteArrayInputStream(input)); + + // Indefinite length with trailing bytes + test(true, new byte[] { + // An OCTET-STRING in 2 parts + 0x24, (byte) 0x80, 4, 2, 'a', 'b', 4, 2, 'c', 'd', 0, 0, + // Garbage follows, may be falsely recognized as EOC + 0, 0, 0, 0, + // and more + 7, 8, 9, 10}); + + // Definite length with trailing bytes + test(false, new byte[] { + 4, 4, 'a', 'b', 'c', 'd', + 0, 0, 0, 0, 7, 8, 9, 10 }); + } + + static void test(boolean indefinite, byte[] input) throws Exception { + + // 1. parse stream + InputStream ins = new ByteArrayInputStream(input); + DerValue v = new DerValue(ins); + Asserts.assertEQ(new String(v.getOctetString()), "abcd"); + + if (indefinite) { + // Trailing bytes might be consumed by the conversion but can + // be found in DerValue "after end". + Field buffer = DerValue.class.getDeclaredField("buffer"); + Field end = DerValue.class.getDeclaredField("end"); + buffer.setAccessible(true); + end.setAccessible(true); + int bufferLen = ((byte[])buffer.get(v)).length; + int endPos = end.getInt(v); + // Data "after end": bufferLen - endPos + // Data remained in stream: ins.available()x` + Asserts.assertEQ(bufferLen - endPos + ins.available(), 8); + } else { + // Trailing bytes remain in the stream for definite length + Asserts.assertEQ(ins.available(), 8); + } + + // 2. parse DerInputStream + DerInputStream ds = new DerInputStream(input); + Asserts.assertEQ(new String(ds.getDerValue().getOctetString()), "abcd"); + Asserts.assertEQ(ds.available(), 8); + Asserts.assertTrue(Arrays.equals(ds.toByteArray(), + new byte[]{0,0,0,0,7,8,9,10})); + + // 3. Parse full byte array + Utils.runAndCheckException(() -> new DerValue(input), + e -> Asserts.assertTrue(e instanceof IOException + && e.getMessage().equals("extra data at the end"))); + + // 4. Parse exact byte array + Asserts.assertEQ(new String(new DerValue(Arrays.copyOf(input, input.length - 8)) + .getOctetString()), "abcd"); } } diff --git a/test/jdk/sun/security/x509/AlgorithmId/OmitAlgIdParam.java b/test/jdk/sun/security/x509/AlgorithmId/OmitAlgIdParam.java new file mode 100644 index 00000000000..bdbfe96201c --- /dev/null +++ b/test/jdk/sun/security/x509/AlgorithmId/OmitAlgIdParam.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8252377 + * @library /test/lib + * @modules java.base/sun.security.util + * java.base/sun.security.x509 + * @summary The AlgorithmIdentifier for ECDSA should omit the parameters field + */ + +import jdk.test.lib.Asserts; +import jdk.test.lib.SecurityTools; +import jdk.test.lib.process.OutputAnalyzer; +import static jdk.test.lib.security.DerUtils.*; + +import java.io.File; +import java.security.KeyStore; +import java.security.cert.X509Certificate; +import sun.security.util.*; + +public class OmitAlgIdParam { + + public static void main(String[] args) throws Exception { + keytool("-genkeypair -keyalg ec -dname CN=EC1 -alias ecsha224 " + + "-sigalg SHA224withECDSA -keystore ks -storepass changeit"); + + keytool("-genkeypair -keyalg ec -dname CN=EC2 -alias ecsha256 " + + "-sigalg SHA256withECDSA -keystore ks -storepass changeit"); + + keytool("-genkeypair -keyalg ec -dname CN=EC3 -alias ecsha384 " + + "-sigalg SHA384withECDSA -keystore ks -storepass changeit"); + + keytool("-genkeypair -keyalg ec -dname CN=EC4 -alias ecsha512 " + + "-sigalg SHA512withECDSA -keystore ks -storepass changeit"); + + KeyStore kstore = KeyStore.getInstance( + new File("ks"), "changeit".toCharArray()); + + // SHA224withECDSA + checkAlgId(kstore, "ecsha224", "SHA224withECDSA", + ObjectIdentifier.of(KnownOIDs.SHA224withECDSA)); + + // SHA256withECDSA + checkAlgId(kstore, "ecsha256", "SHA256withECDSA", + ObjectIdentifier.of(KnownOIDs.SHA256withECDSA)); + + // SHA384withECDSA + checkAlgId(kstore, "ecsha384", "SHA384withECDSA", + ObjectIdentifier.of(KnownOIDs.SHA384withECDSA)); + + // SHA512withECDSA + checkAlgId(kstore, "ecsha512", "SHA512withECDSA", + ObjectIdentifier.of(KnownOIDs.SHA512withECDSA)); + } + + private static void checkAlgId(KeyStore ks, String alias, String alg, + ObjectIdentifier oid) throws Exception { + X509Certificate cert = (X509Certificate)ks.getCertificate(alias); + System.out.println("SigAlgName = " + cert.getSigAlgName()); + + Asserts.assertEQ(cert.getPublicKey().getAlgorithm(), "EC"); + Asserts.assertEQ(cert.getSigAlgName(), alg); + + byte[] data = cert.getEncoded(); + // Parameters field in the specified AlgorithmIdentifier should be omitted + // Checking the first signature AlgorithmIdentifier in the cert + checkAlg(data, "020", oid); + shouldNotExist(data, "021"); + // Checking the second signature AlgorithmIdentifier in the cert + checkAlg(data, "10", oid); + shouldNotExist(data, "11"); + } + + static OutputAnalyzer keytool(String cmd) throws Exception { + return SecurityTools.keytool(cmd).shouldHaveExitValue(0); + } +} diff --git a/test/jdk/tools/jar/mmrjar/Basic.java b/test/jdk/tools/jar/mmrjar/Basic.java index 22a7a927357..14c11edd47a 100644 --- a/test/jdk/tools/jar/mmrjar/Basic.java +++ b/test/jdk/tools/jar/mmrjar/Basic.java @@ -269,7 +269,7 @@ public void test5() throws IOException { jar("-d --file mr.jar"); String uri = (Paths.get("mr.jar")).toUri().toString(); - uri = "jar:" + uri + "/!module-info.class"; + uri = "jar:" + uri + "!/module-info.class"; actual = lines(outbytes); expected = Set.of( @@ -423,7 +423,7 @@ public void test7() throws IOException { actual = lines(outbytes); expected = Set.of( "releases: 9 10", - "m1 " + uriPrefix + "/!META-INF/versions/9/module-info.class", + "m1 " + uriPrefix + "!/META-INF/versions/9/module-info.class", "requires java.base mandated", "exports p", "main-class p.Main" @@ -434,7 +434,7 @@ public void test7() throws IOException { actual = lines(outbytes); expected = Set.of( "releases: 9 10", - "m1 " + uriPrefix + "/!META-INF/versions/10/module-info.class", + "m1 " + uriPrefix + "!/META-INF/versions/10/module-info.class", "requires java.base mandated", "exports p", "main-class p.Main" diff --git a/test/jdk/tools/jar/modularJar/Basic.java b/test/jdk/tools/jar/modularJar/Basic.java index 2808c974136..4ae99842461 100644 --- a/test/jdk/tools/jar/modularJar/Basic.java +++ b/test/jdk/tools/jar/modularJar/Basic.java @@ -494,9 +494,9 @@ public void partialUpdateFooModuleInfo() throws IOException { "--file=" + modularJar.toString()) .assertSuccess() .resultChecker(r -> { - // Expect "bar jar:file:/.../!module-info.class" + // Expect "bar jar:file:/...!/module-info.class" // conceals jdk.test.foo, conceals jdk.test.foo.internal" - String uri = "jar:" + modularJar.toUri().toString() + "/!module-info.class"; + String uri = "jar:" + modularJar.toUri().toString() + "!/module-info.class"; assertTrue(r.output.contains("bar " + uri), "Expecting to find \"bar " + uri + "\"", "in output, but did not: [" + r.output + "]"); @@ -848,10 +848,14 @@ public void describeModuleFoo() throws IOException { jar(option, "--file=" + modularJar.toString()) .assertSuccess() - .resultChecker(r -> + .resultChecker(r -> { assertTrue(r.output.contains(FOO.moduleName + "@" + FOO.version), "Expected to find ", FOO.moduleName + "@" + FOO.version, - " in [", r.output, "]") + " in [", r.output, "]"); + assertTrue(r.output.contains(modularJar.toUri().toString()), + "Expected to find ", modularJar.toUri().toString(), + " in [", r.output, "]"); + } ); jar(option, diff --git a/test/jdk/tools/jlink/IntegrationTest.java b/test/jdk/tools/jlink/IntegrationTest.java index c9df229a448..dce03bea6d0 100644 --- a/test/jdk/tools/jlink/IntegrationTest.java +++ b/test/jdk/tools/jlink/IntegrationTest.java @@ -168,16 +168,20 @@ private static void test() throws Exception { //Strip debug { Map<String, String> config1 = new HashMap<>(); - config1.put(DefaultStripDebugPlugin.NAME, ""); Plugin strip = Jlink.newPlugin("strip-debug", config1, null); + config1.put(strip.getName(), ""); lst.add(strip); } // compress { Map<String, String> config1 = new HashMap<>(); - config1.put(DefaultCompressPlugin.NAME, "2"); + String pluginName = "compress"; + config1.put(pluginName, "2"); Plugin compress - = Jlink.newPlugin("compress", config1, null); + = Jlink.newPlugin(pluginName, config1, null); + if(!pluginName.equals(compress.getName())) { + throw new AssertionError("compress plugin name doesn't match test constant"); + } lst.add(compress); } // Post processor diff --git a/test/jdk/tools/jlink/JLinkReproducible2Test.java b/test/jdk/tools/jlink/JLinkReproducible2Test.java index c11025c30fe..4723bd0eb8f 100644 --- a/test/jdk/tools/jlink/JLinkReproducible2Test.java +++ b/test/jdk/tools/jlink/JLinkReproducible2Test.java @@ -32,6 +32,9 @@ * @bug 8241602 * @modules jdk.jlink * java.se + * jdk.management + * jdk.unsupported + * jdk.charsets * @run main JLinkReproducible2Test */ public class JLinkReproducible2Test { @@ -48,7 +51,17 @@ public static void main(String[] args) throws Exception { JLINK_TOOL.run(System.out, System.err, "--add-modules", "java.se", "--output", image2.toString()); if (Files.mismatch(image1.resolve("lib").resolve("modules"), image2.resolve("lib").resolve("modules")) != -1L) { - new RuntimeException("jlink producing inconsistent result"); + throw new RuntimeException("jlink producing inconsistent result"); + } + + Path image3 = Paths.get("./image3"); + Path image4 = Paths.get("./image4"); + + JLINK_TOOL.run(System.out, System.err, "--add-modules", "java.base,jdk.management,jdk.unsupported,jdk.charsets", "--output", image3.toString()); + JLINK_TOOL.run(System.out, System.err, "--add-modules", "java.base,jdk.management,jdk.unsupported,jdk.charsets", "--output", image4.toString()); + + if (Files.mismatch(image3.resolve("lib").resolve("modules"), image4.resolve("lib").resolve("modules")) != -1L) { + throw new RuntimeException("jlink producing inconsistent result with multiple named modules"); } } } diff --git a/test/jdk/tools/jlink/JLinkReproducible3Test.java b/test/jdk/tools/jlink/JLinkReproducible3Test.java new file mode 100644 index 00000000000..6d37cff4ee4 --- /dev/null +++ b/test/jdk/tools/jlink/JLinkReproducible3Test.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import jdk.test.lib.process.ProcessTools; + +import java.io.File; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.file.*; + +import java.nio.file.attribute.BasicFileAttributes; +import java.util.Optional; + +/* + * @test + * @summary Make sure that jimages are consistent when created by jlink. Copies test jdk and runs against original. + * @bug 8252730 + * @modules jdk.jlink + * jdk.management + * jdk.unsupported + * jdk.charsets + * @library /test/lib + * @run main JLinkReproducible3Test + */ +public class JLinkReproducible3Test { + + public static void main(String[] args) throws Exception { + Path image1 = Paths.get("./image1"); + Path image2 = Paths.get("./image2"); + + Path copyJdk1Dir = Path.of("./copy-jdk1-tmpdir"); + Files.createDirectory(copyJdk1Dir); + + Path copyJdk2Dir = Path.of("./copy-jdk2-tmpdir"); + Files.createDirectory(copyJdk2Dir); + + Path jdkTestDir = Path.of( + Optional.of( + System.getProperty("test.jdk")) + .orElseThrow(() -> new RuntimeException("Couldn't load JDK Test Dir")) + ); + + copyJDK(jdkTestDir, copyJdk1Dir); + copyJDK(jdkTestDir, copyJdk2Dir); + + Path copiedJlink1 = Optional.of( + Paths.get(copyJdk1Dir.toString(), "bin", "jlink")) + .orElseThrow(() -> new RuntimeException("Unable to load copied jlink") + ); + + Path copiedJlink2 = Optional.of( + Paths.get(copyJdk2Dir.toString(), "bin", "jlink")) + .orElseThrow(() -> new RuntimeException("Unable to load copied jlink") + ); + + runCopiedJlink(copiedJlink1.toString(), "--add-modules", "java.base,jdk.management,jdk.unsupported,jdk.charsets", "--output", image1.toString()); + runCopiedJlink(copiedJlink2.toString(), "--add-modules", "java.base,jdk.management,jdk.unsupported,jdk.charsets", "--output", image2.toString()); + + long mismatch = Files.mismatch(image1.resolve("lib").resolve("modules"), image2.resolve("lib").resolve("modules")); + if (mismatch != -1L) { + throw new RuntimeException("jlink producing inconsistent result in modules. Mismatch in modules file occurred at byte position " + mismatch); + } + } + + private static void runCopiedJlink(String... args) throws Exception { + var process = new ProcessBuilder(args); + var res = ProcessTools.executeProcess(process); + res.shouldHaveExitValue(0); + } + + private static void copyJDK(Path src, Path dst) throws Exception { + Files.walk(src).skip(1).forEach(file -> { + try { + Files.copy(file, dst.resolve(src.relativize(file)), StandardCopyOption.COPY_ATTRIBUTES); + } catch (IOException ioe) { + throw new UncheckedIOException(ioe); + } + }); + } +} + diff --git a/test/jdk/tools/jlink/JLinkTest.java b/test/jdk/tools/jlink/JLinkTest.java index cf6077fef4b..bfea2789b92 100644 --- a/test/jdk/tools/jlink/JLinkTest.java +++ b/test/jdk/tools/jlink/JLinkTest.java @@ -32,6 +32,8 @@ import java.util.Collections; import java.util.List; import java.util.spi.ToolProvider; +import java.util.stream.Collectors; +import java.util.stream.IntStream; import java.util.stream.Stream; import jdk.tools.jlink.plugin.Plugin; @@ -243,13 +245,22 @@ public static void main(String[] args) throws Exception { JLINK_TOOL.run(pw, pw, "--list-plugins"); String output = writer.toString(); - long number = Stream.of(output.split("\\R")) - .filter((s) -> s.matches("Plugin Name:.*")) - .count(); + List<String> commands = Stream.of(output.split("\\R")) + .filter((s) -> s.matches(" --.*")) + .collect(Collectors.toList()); + int number = commands.size(); if (number != totalPlugins) { System.err.println(output); throw new AssertionError("Found: " + number + " expected " + totalPlugins); } + + boolean isSorted = IntStream.range(1, number) + .allMatch((int index) -> commands.get(index).compareTo(commands.get(index - 1)) >= 0); + + if(!isSorted) { + throw new AssertionError("--list-plugins not presented in alphabetical order"); + } + } // filter out files and resources + Skip debug + compress diff --git a/test/jdk/tools/jlink/plugins/ExcludeFilesPluginTest.java b/test/jdk/tools/jlink/plugins/ExcludeFilesPluginTest.java index 29ee71ff522..5550d227778 100644 --- a/test/jdk/tools/jlink/plugins/ExcludeFilesPluginTest.java +++ b/test/jdk/tools/jlink/plugins/ExcludeFilesPluginTest.java @@ -69,8 +69,8 @@ public void test() throws Exception { public void checkFiles(String s, String sample, String module, boolean exclude) throws Exception { Map<String, String> prop = new HashMap<>(); - prop.put(ExcludeFilesPlugin.NAME, s); ExcludeFilesPlugin fplug = new ExcludeFilesPlugin(); + prop.put(fplug.getName(), s); fplug.configure(prop); ResourcePoolManager files = new ResourcePoolManager(); ResourcePoolManager fresult = new ResourcePoolManager(); diff --git a/test/jdk/tools/jlink/plugins/ExcludeModuleInfoTest.java b/test/jdk/tools/jlink/plugins/ExcludeModuleInfoTest.java index 77a8cb0c770..11e15df8142 100644 --- a/test/jdk/tools/jlink/plugins/ExcludeModuleInfoTest.java +++ b/test/jdk/tools/jlink/plugins/ExcludeModuleInfoTest.java @@ -56,8 +56,8 @@ public void test() throws Exception { public void check(String s, String sample) throws Exception { Map<String, String> prop = new HashMap<>(); - prop.put(ExcludePlugin.NAME, s); ExcludePlugin excludePlugin = new ExcludePlugin(); + prop.put(excludePlugin.getName(), s); excludePlugin.configure(prop); ResourcePoolManager resourcesMgr = new ResourcePoolManager(); ResourcePoolEntry resource = ResourcePoolEntry.create(sample, new byte[0]); diff --git a/test/jdk/tools/jlink/plugins/ExcludePluginTest.java b/test/jdk/tools/jlink/plugins/ExcludePluginTest.java index fee21c97e43..badbf951cc9 100644 --- a/test/jdk/tools/jlink/plugins/ExcludePluginTest.java +++ b/test/jdk/tools/jlink/plugins/ExcludePluginTest.java @@ -74,8 +74,8 @@ public void test() throws Exception { public void check(String s, String sample, boolean exclude) throws Exception { Map<String, String> prop = new HashMap<>(); - prop.put(ExcludePlugin.NAME, s); ExcludePlugin excludePlugin = new ExcludePlugin(); + prop.put(excludePlugin.getName(), s); excludePlugin.configure(prop); ResourcePoolManager resourcesMgr = new ResourcePoolManager(); ResourcePoolEntry resource = ResourcePoolEntry.create(sample, new byte[0]); diff --git a/test/jdk/tools/jlink/plugins/ExcludeVMPluginTest.java b/test/jdk/tools/jlink/plugins/ExcludeVMPluginTest.java index 44ded75a6d7..2326244f504 100644 --- a/test/jdk/tools/jlink/plugins/ExcludeVMPluginTest.java +++ b/test/jdk/tools/jlink/plugins/ExcludeVMPluginTest.java @@ -187,7 +187,7 @@ private void doCheckVM(String vm, String[] input, String jvmcfg, String[] expect Plugin p = new ExcludeVMPlugin(); Map<String, String> config = new HashMap<>(); if (vm != null) { - config.put(ExcludeVMPlugin.NAME, vm); + config.put(p.getName(), vm); } p.configure(config); ResourcePool out = p.transform(poolMgr.resourcePool(), outMgr.resourcePoolBuilder()); diff --git a/test/jdk/tools/jlink/plugins/OrderResourcesPluginTest.java b/test/jdk/tools/jlink/plugins/OrderResourcesPluginTest.java index fe9d2272d84..b384db3b984 100644 --- a/test/jdk/tools/jlink/plugins/OrderResourcesPluginTest.java +++ b/test/jdk/tools/jlink/plugins/OrderResourcesPluginTest.java @@ -93,7 +93,7 @@ public void test() throws Exception { { ResourcePoolManager out = new ResourcePoolManager(); Map<String, String> config = new HashMap<>(); - config.put(OrderResourcesPlugin.NAME, "/zazou/**,**/module-info.class"); + config.put("order-resources", "/zazou/**,**/module-info.class"); Plugin p = new OrderResourcesPlugin(); p.configure(config); ResourcePool resPool = p.transform(resources.resourcePool(), out.resourcePoolBuilder()); @@ -116,7 +116,7 @@ public void test() throws Exception { ResourcePoolManager out = new ResourcePoolManager(); Map<String, String> config = new HashMap<>(); - config.put(OrderResourcesPlugin.NAME, "@" + order.getAbsolutePath()); + config.put("order-resources", "@" + order.getAbsolutePath()); Plugin p = new OrderResourcesPlugin(); p.configure(config); ResourcePool resPool = p.transform(resources.resourcePool(), out.resourcePoolBuilder()); diff --git a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AdditionalLauncher.java b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AdditionalLauncher.java index ee28452c500..6aaa1375d01 100644 --- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AdditionalLauncher.java +++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AdditionalLauncher.java @@ -32,6 +32,7 @@ import java.util.Optional; import java.util.function.BiConsumer; import java.util.stream.Stream; +import jdk.incubator.jpackage.internal.ApplicationLayout; import jdk.jpackage.test.Functional.ThrowingBiConsumer; public final class AdditionalLauncher { @@ -110,6 +111,7 @@ public void applyTo(JPackageCommand cmd) { } public void applyTo(PackageTest test) { + test.addLauncherName(name); test.addInitializer(this::initialize); test.addInstallVerifier(this::verify); } diff --git a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java index 899286ca44a..b8f10693f82 100644 --- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java +++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java @@ -791,11 +791,11 @@ public void verifyIsOfType(PackageType ... types) { } } - public CfgFile readLaunherCfgFile() { - return readLaunherCfgFile(null); + public CfgFile readLauncherCfgFile() { + return readLauncherCfgFile(null); } - public CfgFile readLaunherCfgFile(String launcherName) { + public CfgFile readLauncherCfgFile(String launcherName) { verifyIsOfType(PackageType.IMAGE); if (isRuntime()) { return null; diff --git a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LinuxHelper.java b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LinuxHelper.java index f7906406f2f..787f4418f1d 100644 --- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LinuxHelper.java +++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LinuxHelper.java @@ -229,11 +229,22 @@ static long getInstalledPackageSizeKB(JPackageCommand cmd) { final Path packageFile = cmd.outputBundle(); switch (cmd.packageType()) { case LINUX_DEB: - return Long.parseLong(getDebBundleProperty(packageFile, + Long estimate = Long.parseLong(getDebBundleProperty(packageFile, "Installed-Size")); + if (estimate == 0L) { + // if the estimate in KB is 0, check if it is really empty + // or just < 1KB as with AppImagePackageTest.testEmpty() + if (getPackageFiles(cmd).count() > 01L) { + // there is something there so round up to 1 KB + estimate = 01L; + } + } + return estimate; case LINUX_RPM: - return Long.parseLong(getRpmBundleProperty(packageFile, "Size")) >> 10; + String size = getRpmBundleProperty(packageFile, "Size"); + return (Long.parseLong(size) + 1023L) >> 10; // in KB rounded up + } return 0; @@ -254,10 +265,10 @@ static String getRpmBundleProperty(Path bundle, String fieldName) { static void verifyPackageBundleEssential(JPackageCommand cmd) { String packageName = LinuxHelper.getPackageName(cmd); - TKit.assertNotEquals(0L, LinuxHelper.getInstalledPackageSizeKB( - cmd), String.format( - "Check installed size of [%s] package in KB is not zero", - packageName)); + Long packageSize = LinuxHelper.getInstalledPackageSizeKB(cmd); + TKit.trace("InstalledPackageSize: " + packageSize); + TKit.assertNotEquals(0L, packageSize, String.format( + "Check installed size of [%s] package in not zero", packageName)); final boolean checkPrerequisites; if (cmd.isRuntime()) { @@ -270,7 +281,9 @@ static void verifyPackageBundleEssential(JPackageCommand cmd) { checkPrerequisites = expectedCriticalRuntimePaths.equals( actualCriticalRuntimePaths); } else { - checkPrerequisites = true; + // AppImagePackageTest.testEmpty() will have no dependencies, + // but will have more then 0 and less than 1K content size. + checkPrerequisites = packageSize > 1; } List<String> prerequisites = LinuxHelper.getPrerequisitePackages(cmd); diff --git a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageTest.java b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageTest.java index 5f09859062b..0acb196c2ba 100644 --- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageTest.java +++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageTest.java @@ -317,6 +317,11 @@ public PackageTest configureHelloApp(String javaAppDesc) { return this; } + public PackageTest addLauncherName(String name) { + launcherNames.add(name); + return this; + } + public final static class Group extends RunnablePackageTest { public Group(PackageTest... tests) { handlers = Stream.of(tests) @@ -556,7 +561,12 @@ private void verifyPackageInstalled(JPackageCommand cmd) { if (PackageType.WINDOWS.contains(cmd.packageType()) && !cmd.isPackageUnpacked( "Not verifying desktop integration")) { - new WindowsHelper.DesktopIntegrationVerifier(cmd); + // Check main launcher + new WindowsHelper.DesktopIntegrationVerifier(cmd, null); + // Check additional launchers + launcherNames.forEach(name -> { + new WindowsHelper.DesktopIntegrationVerifier(cmd, name); + }); } } cmd.assertAppLayout(); @@ -571,7 +581,12 @@ private void verifyPackageUninstalled(JPackageCommand cmd) { TKit.assertPathExists(cmd.appLauncherPath(), false); if (PackageType.WINDOWS.contains(cmd.packageType())) { - new WindowsHelper.DesktopIntegrationVerifier(cmd); + // Check main launcher + new WindowsHelper.DesktopIntegrationVerifier(cmd, null); + // Check additional launchers + launcherNames.forEach(name -> { + new WindowsHelper.DesktopIntegrationVerifier(cmd, name); + }); } } @@ -618,6 +633,7 @@ private static Map<PackageType, PackageHandlers> createDefaultPackageHandlers() private Map<PackageType, Handler> handlers; private Set<String> namedInitializers; private Map<PackageType, PackageHandlers> packageHandlers; + private final List<String> launcherNames = new ArrayList(); private final static File BUNDLE_OUTPUT_DIR; diff --git a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WindowsHelper.java b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WindowsHelper.java index 329627307ea..debba096364 100644 --- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WindowsHelper.java +++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WindowsHelper.java @@ -134,16 +134,17 @@ private static boolean isUserLocalInstall(JPackageCommand cmd) { static class DesktopIntegrationVerifier { - DesktopIntegrationVerifier(JPackageCommand cmd) { + DesktopIntegrationVerifier(JPackageCommand cmd, String name) { cmd.verifyIsOfType(PackageType.WINDOWS); this.cmd = cmd; + this.name = (name == null ? cmd.name() : name); verifyStartMenuShortcut(); verifyDesktopShortcut(); verifyFileAssociationsRegistry(); } private void verifyDesktopShortcut() { - boolean appInstalled = cmd.appLauncherPath().toFile().exists(); + boolean appInstalled = cmd.appLauncherPath(name).toFile().exists(); if (cmd.hasArgument("--win-shortcut")) { if (isUserLocalInstall(cmd)) { verifyUserLocalDesktopShortcut(appInstalled); @@ -159,7 +160,7 @@ private void verifyDesktopShortcut() { } private Path desktopShortcutPath() { - return Path.of(cmd.name() + ".lnk"); + return Path.of(name + ".lnk"); } private void verifyShortcut(Path path, boolean exists) { @@ -183,7 +184,7 @@ private void verifyUserLocalDesktopShortcut(boolean exists) { } private void verifyStartMenuShortcut() { - boolean appInstalled = cmd.appLauncherPath().toFile().exists(); + boolean appInstalled = cmd.appLauncherPath(name).toFile().exists(); if (cmd.hasArgument("--win-menu")) { if (isUserLocalInstall(cmd)) { verifyUserLocalStartMenuShortcut(appInstalled); @@ -200,7 +201,7 @@ private void verifyStartMenuShortcut() { private Path startMenuShortcutPath() { return Path.of(cmd.getArgumentValue("--win-menu-group", - () -> "Unknown"), cmd.name() + ".lnk"); + () -> "Unknown"), name + ".lnk"); } private void verifyStartMenuShortcut(Path shortcutsRoot, boolean exists) { @@ -228,7 +229,7 @@ private void verifyFileAssociationsRegistry() { } private void verifyFileAssociationsRegistry(Path faFile) { - boolean appInstalled = cmd.appLauncherPath().toFile().exists(); + boolean appInstalled = cmd.appLauncherPath(name).toFile().exists(); try { TKit.trace(String.format( "Get file association properties from [%s] file", @@ -279,6 +280,7 @@ private void verifyFileAssociations(boolean exists, String suffix, } private final JPackageCommand cmd; + private final String name; } private static String queryRegistryValue(String keyPath, String valueName) { diff --git a/test/jdk/tools/jpackage/share/AddLauncherTest.java b/test/jdk/tools/jpackage/share/AddLauncherTest.java index 431f1a2b764..2c0edc9d26c 100644 --- a/test/jdk/tools/jpackage/share/AddLauncherTest.java +++ b/test/jdk/tools/jpackage/share/AddLauncherTest.java @@ -22,6 +22,7 @@ */ import java.nio.file.Path; +import java.io.File; import java.util.Map; import java.lang.invoke.MethodHandles; import jdk.jpackage.test.PackageTest; @@ -32,6 +33,7 @@ import jdk.jpackage.test.TKit; import jdk.jpackage.test.Annotations.Test; import jdk.jpackage.test.Annotations.Parameter; +import jdk.jpackage.test.CfgFile; /** * Test --add-launcher parameter. Output of the test should be @@ -200,6 +202,30 @@ public void testMainLauncherIsModular(boolean mainLauncherIsModular) { .applyTo(cmd); cmd.executeAndAssertHelloAppImageCreated(); + + // check value of app.mainmodule in ModularAppLauncher's cfg file + CfgFile cfg = cmd.readLauncherCfgFile("ModularAppLauncher"); + String moduleValue = cfg.getValue("Application", "app.mainmodule"); + String mainClass = null; + String classpath = null; + String expectedMod = JavaAppDesc.parse( + modularAppDesc.toString()).setBundleFileName(null).toString(); + TKit.assertEquals(expectedMod, moduleValue, + String.format("Check value of app.mainmodule=[%s]" + + "in ModularAppLauncher cfg file is as expected", expectedMod)); + + // check values of app.mainclass and app.classpath in cfg file + cfg = cmd.readLauncherCfgFile("NonModularAppLauncher"); + moduleValue = null; + mainClass = cfg.getValue("Application", "app.mainclass"); + classpath = cfg.getValue("Application", "app.classpath"); + String ExpectedCN = nonModularAppDesc.className(); + TKit.assertEquals(ExpectedCN, mainClass, + String.format("Check value of app.mainclass=[%s]" + + "in NonModularAppLauncher cfg file is as expected", ExpectedCN)); + TKit.assertTrue(classpath.startsWith("$APPDIR" + File.separator + + nonModularAppDesc.jarFileName()), + "Check app.classpath value in ModularAppLauncher cfg file"); } private final static Path GOLDEN_ICON = TKit.TEST_SRC_ROOT.resolve(Path.of( diff --git a/test/jdk/tools/jpackage/share/AppImagePackageTest.java b/test/jdk/tools/jpackage/share/AppImagePackageTest.java index 979aaea0ce9..2ee998af447 100644 --- a/test/jdk/tools/jpackage/share/AppImagePackageTest.java +++ b/test/jdk/tools/jpackage/share/AppImagePackageTest.java @@ -22,9 +22,14 @@ */ import java.nio.file.Path; +import java.nio.file.Files; +import java.io.IOException; +import java.util.List; import jdk.jpackage.test.TKit; import jdk.jpackage.test.JPackageCommand; import jdk.jpackage.test.PackageTest; +import jdk.jpackage.test.PackageType; +import jdk.jpackage.test.RunnablePackageTest.Action; import jdk.jpackage.test.Annotations.Test; /** @@ -61,4 +66,29 @@ public static void test() { cmd.removeArgumentWithValue("--input"); }).addBundleDesktopIntegrationVerifier(false).run(); } + + @Test + public static void testEmpty() throws IOException { + final String name = "EmptyAppImagePackageTest"; + final String imageName = name + (TKit.isOSX() ? ".app" : ""); + Path appImageDir = TKit.createTempDirectory(null).resolve(imageName); + + Files.createDirectories(appImageDir.resolve("bin")); + Path libDir = Files.createDirectories(appImageDir.resolve("lib")); + TKit.createTextFile(libDir.resolve("README"), + List.of("This is some arbitrary text for the README file\n")); + + new PackageTest() + .addInitializer(cmd -> { + cmd.addArguments("--app-image", appImageDir); + cmd.removeArgumentWithValue("--input"); + + // on mac, with --app-image and without --mac-package-identifier, + // will try to infer it from the image, so foreign image needs it. + if (TKit.isOSX()) { + cmd.addArguments("--mac-package-identifier", name); + } + }).run(new Action[] { Action.CREATE, Action.UNPACK }); + // default: {CREATE, UNPACK, VERIFY}, but we can't verify foreign image + } } diff --git a/test/jdk/tools/jpackage/share/MultiLauncherTwoPhaseTest.java b/test/jdk/tools/jpackage/share/MultiLauncherTwoPhaseTest.java new file mode 100644 index 00000000000..423ea5b9608 --- /dev/null +++ b/test/jdk/tools/jpackage/share/MultiLauncherTwoPhaseTest.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.nio.file.Path; +import java.io.IOException; +import jdk.jpackage.test.AdditionalLauncher; +import jdk.jpackage.test.PackageTest; +import jdk.jpackage.test.PackageType; +import jdk.jpackage.test.TKit; +import jdk.jpackage.test.Annotations.Test; +import jdk.jpackage.test.JPackageCommand; + +/** + * Test multiple launchers in two phases. First test creates app image and then + * creates installer from this image. Output of the test should be + * MultiLauncherTwoPhaseTest*.* installer. The output installer should be basic + * installer with 3 launcher MultiLauncherTwoPhaseTest, bar and foo. On Windows + * we should have start menu integration under MultiLauncherTwoPhaseTest and + * desktop shortcuts for all 3 launchers. Linux should also create shortcuts for + * all launchers. + */ + +/* + * @test + * @summary Multiple launchers in two phases + * @library ../helpers + * @library /test/lib + * @key jpackagePlatformPackage + * @build jdk.jpackage.test.* + * @modules jdk.incubator.jpackage/jdk.incubator.jpackage.internal + * @compile MultiLauncherTwoPhaseTest.java + * @run main/othervm/timeout=360 -Xmx512m jdk.jpackage.test.Main + * --jpt-run=MultiLauncherTwoPhaseTest + */ + +public class MultiLauncherTwoPhaseTest { + + @Test + public static void test() throws IOException { + Path appimageOutput = TKit.createTempDirectory("appimage"); + + JPackageCommand appImageCmd = JPackageCommand.helloAppImage() + .setArgumentValue("--dest", appimageOutput); + + AdditionalLauncher launcher1 = new AdditionalLauncher("bar"); + launcher1.setDefaultArguments().applyTo(appImageCmd); + + AdditionalLauncher launcher2 = new AdditionalLauncher("foo"); + launcher2.applyTo(appImageCmd); + + PackageTest packageTest = new PackageTest() + .addLauncherName("bar") // Add launchers name for verification + .addLauncherName("foo") + .addRunOnceInitializer(() -> appImageCmd.execute()) + .addBundleDesktopIntegrationVerifier(true) + .addInitializer(cmd -> { + cmd.addArguments("--app-image", appImageCmd.outputBundle()); + cmd.removeArgumentWithValue("--input"); + }) + .forTypes(PackageType.WINDOWS) + .addInitializer(cmd -> { + cmd.addArguments("--win-shortcut", "--win-menu", + "--win-menu-group", "MultiLauncherTwoPhaseTest"); + }) + .forTypes(PackageType.LINUX) + .addInitializer(cmd -> { + cmd.addArguments("--linux-shortcut"); + }); + + packageTest.run(); + } +} diff --git a/test/jdk/tools/jpackage/windows/WinL10nTest.java b/test/jdk/tools/jpackage/windows/WinL10nTest.java index b022b365214..72496b9b6d5 100644 --- a/test/jdk/tools/jpackage/windows/WinL10nTest.java +++ b/test/jdk/tools/jpackage/windows/WinL10nTest.java @@ -95,9 +95,7 @@ public static List<Object[]> data() { private final static Stream<String> getLightCommandLine( Executor.Result result) { return result.getOutput().stream() - .filter(s -> s.contains("Running")) - .filter(s -> s.contains("light.exe")) - .filter(s -> !s.contains("/?")); + .filter(s -> s.trim().startsWith("light.exe")); } @Test diff --git a/test/langtools/jdk/javadoc/doclet/constantValues/TestConstantValuesDriver.java b/test/langtools/jdk/javadoc/doclet/constantValues/TestConstantValuesDriver.java index ff3f77adbbc..42da3acdea7 100644 --- a/test/langtools/jdk/javadoc/doclet/constantValues/TestConstantValuesDriver.java +++ b/test/langtools/jdk/javadoc/doclet/constantValues/TestConstantValuesDriver.java @@ -57,15 +57,15 @@ public void test() { """ <code id="TestConstantValues.BYTE_MAX_VALUE">public static final byte</code></td> <th class="col-second" scope="row"><code><a href="TestConstantValues.html#BYTE_MAX_VALUE">BYTE_MAX_VALUE</a></code></th> - <td class="col-last"><code>127</code></td>""", + <td class="col-last"><code>0x7f</code></td>""", """ <code id="TestConstantValues.BYTE_MIN_VALUE">public static final byte</code></td> <th class="col-second" scope="row"><code><a href="TestConstantValues.html#BYTE_MIN_VALUE">BYTE_MIN_VALUE</a></code></th> - <td class="col-last"><code>-127</code></td>""", + <td class="col-last"><code>0x81</code></td>""", """ <code id="TestConstantValues.CHAR_MAX_VALUE">public static final char</code></td> <th class="col-second" scope="row"><code><a href="TestConstantValues.html#CHAR_MAX_VALUE">CHAR_MAX_VALUE</a></code></th> - <td class="col-last"><code>65535</code></td>""", + <td class="col-last"><code>'\\uffff'</code></td>""", """ <code id="TestConstantValues.DOUBLE_MAX_VALUE">public static final double</code></td>""", """ diff --git a/test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java b/test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java index d0b3535c911..b75b174af12 100644 --- a/test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java +++ b/test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java @@ -46,6 +46,7 @@ public static void main(String... args) throws Exception { public void test() { javadoc("-d", "out-1", "-sourcepath", testSrc, + "--no-platform-links", "pkg"); checkExit(Exit.OK); @@ -108,6 +109,7 @@ public void test() { public void testLinkSource() { javadoc("-d", "out-2", "-linksource", + "--no-platform-links", "-sourcepath", testSrc, "pkg"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java b/test/langtools/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java index 65c240effac..c5145c148d7 100644 --- a/test/langtools/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java +++ b/test/langtools/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java @@ -50,6 +50,7 @@ public void test() { "-Xdoclint:none", "-sourcepath", testSrc, "-linkoffline", uri, testSrc, + "--no-platform-links", testSrc("C.java")); checkExit(Exit.OK); @@ -82,6 +83,7 @@ public void test_warning() { "-Xdoclint:none", "-sourcepath", testSrc, "-linkoffline", uri, testSrc, + "--no-platform-links", testSrc("C.java")); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testClassLinks/TestClassLinks.java b/test/langtools/jdk/javadoc/doclet/testClassLinks/TestClassLinks.java index 6ef3f1e9cfc..a18cf462292 100644 --- a/test/langtools/jdk/javadoc/doclet/testClassLinks/TestClassLinks.java +++ b/test/langtools/jdk/javadoc/doclet/testClassLinks/TestClassLinks.java @@ -46,6 +46,7 @@ public void test() { javadoc("-d", "out", "-Xdoclint:none", + "--no-platform-links", "-sourcepath", testSrc, "-package", "p"); diff --git a/test/langtools/jdk/javadoc/doclet/testClassTree/TestClassTree.java b/test/langtools/jdk/javadoc/doclet/testClassTree/TestClassTree.java index bf40c0d994d..e9264b38888 100644 --- a/test/langtools/jdk/javadoc/doclet/testClassTree/TestClassTree.java +++ b/test/langtools/jdk/javadoc/doclet/testClassTree/TestClassTree.java @@ -46,6 +46,7 @@ public static void main(String... args) throws Exception { @Test public void test() { javadoc("-d", "out", + "--no-platform-links", "-sourcepath", testSrc, "pkg"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java b/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java index 81732538029..87279039754 100644 --- a/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java +++ b/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java @@ -44,6 +44,7 @@ public static void main(String... args) throws Exception { @Test public void test() { javadoc("-d", "out", + "--no-platform-links", "-sourcepath", testSrc, "pkg"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testDocLintOption/TestDocLintOption.java b/test/langtools/jdk/javadoc/doclet/testDocLintOption/TestDocLintOption.java index be01d44a440..55f696ec80b 100644 --- a/test/langtools/jdk/javadoc/doclet/testDocLintOption/TestDocLintOption.java +++ b/test/langtools/jdk/javadoc/doclet/testDocLintOption/TestDocLintOption.java @@ -26,7 +26,7 @@ * @bug 8236949 8238259 * @summary javadoc -Xdoclint does not accumulate options correctly * @library /tools/lib ../../lib - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * jdk.javadoc/jdk.javadoc.internal.tool * @build toolbox.ToolBox javadoc.tester.* * @run main TestDocLintOption @@ -40,8 +40,8 @@ import java.nio.file.Path; import java.nio.file.Paths; -import com.sun.tools.doclint.Messages.Group; -import static com.sun.tools.doclint.Messages.Group.*; +import jdk.javadoc.internal.doclint.Messages.Group; +import static jdk.javadoc.internal.doclint.Messages.Group.*; import javadoc.tester.JavadocTester; import toolbox.ToolBox; diff --git a/test/langtools/jdk/javadoc/doclet/testGrandParentTypes/TestGrandParentTypes.java b/test/langtools/jdk/javadoc/doclet/testGrandParentTypes/TestGrandParentTypes.java index ab74d24b1a8..3d20cf8a95b 100644 --- a/test/langtools/jdk/javadoc/doclet/testGrandParentTypes/TestGrandParentTypes.java +++ b/test/langtools/jdk/javadoc/doclet/testGrandParentTypes/TestGrandParentTypes.java @@ -44,6 +44,7 @@ public static void main(String... args) throws Exception { @Test public void test1() { javadoc("-d", "out-1", + "--no-platform-links", "-package", "-sourcepath", testSrc, "pkg1"); diff --git a/test/langtools/jdk/javadoc/doclet/testHeadings/TestHeadings.java b/test/langtools/jdk/javadoc/doclet/testHeadings/TestHeadings.java index 7832a2981e0..3ab17f9e12a 100644 --- a/test/langtools/jdk/javadoc/doclet/testHeadings/TestHeadings.java +++ b/test/langtools/jdk/javadoc/doclet/testHeadings/TestHeadings.java @@ -45,6 +45,7 @@ public static void main(String... args) throws Exception { public void test() { javadoc("-d", "out", "-sourcepath", testSrc, + "--no-platform-links", "-use", "-header", "Test Files", "pkg1", "pkg2"); diff --git a/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java b/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java index f73bec498fa..4b884752d91 100644 --- a/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java +++ b/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java @@ -49,6 +49,7 @@ public static void main(String... args) throws Exception { public void test_Comment_Deprecated() { javadoc("-Xdoclint:none", "-d", "out-1", + "--no-platform-links", "-sourcepath", testSrc, "pkg1"); checkExit(Exit.OK); @@ -61,6 +62,7 @@ public void test_NoComment_Deprecated() { javadoc("-Xdoclint:none", "-d", "out-2", "-nocomment", + "--no-platform-links", "-sourcepath", testSrc, "pkg1"); checkExit(Exit.OK); @@ -73,6 +75,7 @@ public void test_Comment_NoDeprecated() { javadoc("-Xdoclint:none", "-d", "out-3", "-nodeprecated", + "--no-platform-links", "-sourcepath", testSrc, "pkg1"); checkExit(Exit.OK); @@ -87,6 +90,7 @@ public void testNoCommentNoDeprecated() { "-d", "out-4", "-nocomment", "-nodeprecated", + "--no-platform-links", "-sourcepath", testSrc, "pkg1"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testHtmlTag/TestHtmlTag.java b/test/langtools/jdk/javadoc/doclet/testHtmlTag/TestHtmlTag.java index 66783d12995..ac9452962ff 100644 --- a/test/langtools/jdk/javadoc/doclet/testHtmlTag/TestHtmlTag.java +++ b/test/langtools/jdk/javadoc/doclet/testHtmlTag/TestHtmlTag.java @@ -101,6 +101,7 @@ public void test_en_US() { @Test public void test_other() { javadoc("-locale", "en_US", + "--no-platform-links", "-d", "out-other", "-sourcepath", testSrc, "pkg3"); diff --git a/test/langtools/jdk/javadoc/doclet/testIndentation/TestIndentation.java b/test/langtools/jdk/javadoc/doclet/testIndentation/TestIndentation.java index fa019056bf9..a2eb6926782 100644 --- a/test/langtools/jdk/javadoc/doclet/testIndentation/TestIndentation.java +++ b/test/langtools/jdk/javadoc/doclet/testIndentation/TestIndentation.java @@ -43,6 +43,7 @@ public static void main(String... args) throws Exception { @Test public void test() { javadoc("-d", "out", + "--no-platform-links", "-sourcepath", testSrc, "p"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java b/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java index 88b42ef07ea..833d737e975 100644 --- a/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java +++ b/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java @@ -61,6 +61,7 @@ public static void main(String... args) throws Exception { @Test public void test() { javadoc("-d", "out", + "--no-platform-links", "-sourcepath", testSrc, "pkg"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java b/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java index ffa4896846c..fa37b9996d5 100644 --- a/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java +++ b/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java @@ -234,6 +234,7 @@ public void test2() { "-sourcepath", testSrc, "-javafx", "--disable-javafx-strict-checks", + "--no-platform-links", "-package", "pkg2"); checkExit(Exit.OK); @@ -297,6 +298,7 @@ public void test2() { public void test3() { javadoc("-d", "out2b", "-sourcepath", testSrc, + "--no-platform-links", "-package", "pkg2"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java b/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java index d64dbc7f4f5..0487373cd9a 100644 --- a/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java +++ b/test/langtools/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java @@ -24,6 +24,7 @@ /* * @test * @bug 4720957 5020118 8026567 8038976 8184969 8164407 8182765 8205593 + * 8216497 * @summary Test to make sure that -link and -linkoffline link to * right files, and URLs with and without trailing slash are accepted. * @library ../../lib @@ -149,6 +150,7 @@ Resource Identifiers (URI): Generic Syntax</i></a>, <br><a href="http://www.iet\ "-sourcepath", testSrc, "-link", "../" + "out1", "-link", "../" + "out2", + "--no-platform-links", "pkg3"); checkExit(Exit.OK); checkOutput("pkg3/A.html", true, @@ -172,6 +174,7 @@ Resource Identifiers (URI): Generic Syntax</i></a>, <br><a href="http://www.iet\ "-sourcepath", testSrc, "-linkoffline", "../copy/out1", "out1", "-linkoffline", "../copy/out2", "out2", + "--no-platform-links", "pkg3"); checkExit(Exit.OK); checkOutput("pkg3/A.html", true, diff --git a/test/langtools/jdk/javadoc/doclet/testLinkPlatform/TestLinkPlatform.java b/test/langtools/jdk/javadoc/doclet/testLinkPlatform/TestLinkPlatform.java new file mode 100644 index 00000000000..d036b9046a6 --- /dev/null +++ b/test/langtools/jdk/javadoc/doclet/testLinkPlatform/TestLinkPlatform.java @@ -0,0 +1,195 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8216497 + * @summary javadoc should auto-link to platform classes + * @library /tools/lib ../../lib + * @modules + * jdk.javadoc/jdk.javadoc.internal.tool + * jdk.compiler/com.sun.tools.javac.api + * jdk.compiler/com.sun.tools.javac.main + * @build javadoc.tester.* + * @run main TestLinkPlatform + */ + +import javadoc.tester.JavadocTester; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Formatter; + +import builder.ClassBuilder; +import builder.ClassBuilder.*; +import toolbox.ModuleBuilder; +import toolbox.ToolBox; + +import javax.lang.model.SourceVersion; + +public class TestLinkPlatform extends JavadocTester { + + final static String OLD_PLATFORM_URL = "https://docs.oracle.com/javase/%d/docs/api/java/lang/Object.html"; + final static String NEW_PLATFORM_URL = "https://docs.oracle.com/en/java/javase/%d/docs/api/java.base/java/lang/Object.html"; + final static String PRE_PLATFORM_URL = "https://download.java.net/java/early_access/jdk%d/docs/api/java.base/java/lang/Object.html"; + + final static String NON_MODULAR_CUSTOM_PLATFORM_URL = "https://some.domain/docs/%d/api/java/lang/Object.html"; + final static String MODULAR_CUSTOM_PLATFORM_URL = "https://some.domain/docs/%d/api/java.base/java/lang/Object.html"; + + final static int EARLIEST_VERSION = 7; + final static int LATEST_VERSION = Integer.parseInt(SourceVersion.latest().name().substring(8)); + + /** + * The entry point of the test. + * + * @param args the array of command line arguments. + */ + public static void main(String... args) throws Exception { + TestLinkPlatform tester = new TestLinkPlatform(); + tester.runTests(m -> new Object[]{Paths.get(m.getName())}); + } + + final ToolBox tb; + private final Path packageSrc; + + TestLinkPlatform() throws Exception { + tb = new ToolBox(); + packageSrc = Paths.get("src", "packages"); + initCode(); + } + + @Test + public void testPlatformLinkWithReleaseOption(Path base) throws Exception { + testPlatformLinkWithSupportedVersions(base, "--release"); + } + + @Test + public void testPlatformLinkWithSourceOption(Path base) throws Exception { + testPlatformLinkWithSupportedVersions(base, "--source"); + } + + private void testPlatformLinkWithSupportedVersions(Path base, String versionOption) throws Exception { + for (int version = EARLIEST_VERSION; version <= LATEST_VERSION; version++) { + Path out = base.resolve("out_" + version); + + javadoc("-d", out.toString(), + "-sourcepath", packageSrc.toString(), + versionOption, Integer.toString(version), + "p.q"); + + checkExit(Exit.OK); + // Make sure there is no message about missing element-list resource + checkOutput(Output.OUT, false, "element-list"); + String url = getPlatformUrlString(version); + checkOutput("p/q/A.html", true, + "<a href=\"" + url + "\"", + "<a href=\"" + url + "#clone()\" title=\"class or interface in java.lang\" class=\"external-link\">", + "<a href=\"" + url + "#equals(java.lang.Object)\" title=\"class or interface in java.lang\" class=\"external-link\">", + "<a href=\"" + url + "#finalize()\" title=\"class or interface in java.lang\" class=\"external-link\">"); + } + } + + @Test + public void testPlatformLinkWithCustomPropertyURL(Path base) throws Exception { + for (int version = EARLIEST_VERSION; version <= LATEST_VERSION; version++) { + Path out = base.resolve("out_" + version); + + javadoc("-d", out.toString(), + "-sourcepath", packageSrc.toString(), + "--release", Integer.toString(version), + "--link-platform-properties", "file:" + testSrc("linkplatform.properties"), + "p.q"); + + checkExit(Exit.OK); + String url = getCustomPlatformUrlString(version); + checkOutput("p/q/A.html", true, + "<a href=\"" + url + "\"", + "<a href=\"" + url + "#clone()\" title=\"class or interface in java.lang\" class=\"external-link\">", + "<a href=\"" + url + "#equals(java.lang.Object)\" title=\"class or interface in java.lang\" class=\"external-link\">", + "<a href=\"" + url + "#finalize()\" title=\"class or interface in java.lang\" class=\"external-link\">"); + } + } + + @Test + public void testPlatformLinkWithCustomPropertyFile(Path base) throws Exception { + for (int version = EARLIEST_VERSION; version <= LATEST_VERSION; version++) { + Path out = base.resolve("out_" + version); + + javadoc("-d", out.toString(), + "-sourcepath", packageSrc.toString(), + "--release", Integer.toString(version), + "--link-platform-properties", testSrc("linkplatform.properties"), + "p.q"); + + checkExit(Exit.OK); + String url = getCustomPlatformUrlString(version); + checkOutput("p/q/A.html", true, + "<a href=\"" + url + "\"", + "<a href=\"" + url + "#clone()\" title=\"class or interface in java.lang\" class=\"external-link\">", + "<a href=\"" + url + "#equals(java.lang.Object)\" title=\"class or interface in java.lang\" class=\"external-link\">", + "<a href=\"" + url + "#finalize()\" title=\"class or interface in java.lang\" class=\"external-link\">"); + } + } + + @Test + public void testPlatformLinkWithInvalidPropertyFile(Path base) throws Exception { + for (int version = EARLIEST_VERSION; version <= LATEST_VERSION; version++) { + Path out = base.resolve("out_" + version); + + javadoc("-d", out.toString(), + "-sourcepath", packageSrc.toString(), + "--release", Integer.toString(version), + "--link-platform-properties", testSrc("invalid-properties-file"), + "p.q"); + + checkExit(Exit.ERROR); + checkOutput(Output.OUT, true, "Error reading file"); + checkOutput("p/q/A.html", false); + } + } + + void initCode() throws Exception { + new ClassBuilder(tb, "p.q.A") + .setModifiers("public","class") + .write(packageSrc); + } + + String getPlatformUrlString(int version) { + String urlString; + Runtime.Version runtimeVersion = Runtime.version(); + if (version == runtimeVersion.feature() && runtimeVersion.pre().isPresent()) { + urlString = PRE_PLATFORM_URL; + } else { + urlString = version <= 10 ? OLD_PLATFORM_URL : NEW_PLATFORM_URL; + } + return urlString.formatted(version); + } + + String getCustomPlatformUrlString(int version) { + return version <= 10 + ? NON_MODULAR_CUSTOM_PLATFORM_URL.formatted(version) + : MODULAR_CUSTOM_PLATFORM_URL.formatted(version); + } +} diff --git a/test/langtools/jdk/javadoc/doclet/testLinkPlatform/linkplatform.properties b/test/langtools/jdk/javadoc/doclet/testLinkPlatform/linkplatform.properties new file mode 100644 index 00000000000..e77d2ffb11b --- /dev/null +++ b/test/langtools/jdk/javadoc/doclet/testLinkPlatform/linkplatform.properties @@ -0,0 +1,10 @@ +doclet.platform.docs.7= https://some.domain/docs/7/api/ +doclet.platform.docs.8= https://some.domain/docs/8/api/ +doclet.platform.docs.9= https://some.domain/docs/9/api/ +doclet.platform.docs.10=https://some.domain/docs/10/api/ +doclet.platform.docs.11=https://some.domain/docs/11/api/ +doclet.platform.docs.12=https://some.domain/docs/12/api/ +doclet.platform.docs.13=https://some.domain/docs/13/api/ +doclet.platform.docs.14=https://some.domain/docs/14/api/ +doclet.platform.docs.15=https://some.domain/docs/15/api/ +doclet.platform.docs.16=https://some.domain/docs/16/api/ diff --git a/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java b/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java index 374f30db30b..0c10cb064b0 100644 --- a/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java +++ b/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java @@ -46,6 +46,7 @@ public static void main(String... args) throws Exception { public void test() { javadoc("-d", "out", "-sourcepath", testSrc, + "--no-platform-links", "pkg", "diamond", "inheritDist", "pkg1", "pkg2", "pkg3"); checkExit(Exit.OK); @@ -218,6 +219,7 @@ public void testSplitIndex() { javadoc("-d", "out-split", "-splitindex", "-sourcepath", testSrc, + "--no-platform-links", "pkg", "diamond", "inheritDist", "pkg1", "pkg2", "pkg3"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testMethodSignature/TestMethodSignature.java b/test/langtools/jdk/javadoc/doclet/testMethodSignature/TestMethodSignature.java index e1f00c31f8e..91644b194bc 100644 --- a/test/langtools/jdk/javadoc/doclet/testMethodSignature/TestMethodSignature.java +++ b/test/langtools/jdk/javadoc/doclet/testMethodSignature/TestMethodSignature.java @@ -44,6 +44,7 @@ public static void main(String... args) throws Exception { public void test() { javadoc("-d", "out", "-sourcepath", testSrc, + "--no-platform-links", "pkg"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java index 20badb0af07..07d5ccdeb1b 100644 --- a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java +++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java @@ -74,6 +74,7 @@ public void testHtml5NoComment() { "-nocomment", "-use", "-Xdoclint:none", + "--no-platform-links", "-overview", testSrc("overview.html"), "--module-source-path", testSrc, "--module", "moduleA,moduleB", @@ -170,6 +171,7 @@ public void testModuleFilesAndLinks() { public void testModuleDeprecation() { javadoc("-d", "out-moduledepr", "-Xdoclint:none", + "--no-platform-links", "-tag", "regular:a:Regular Tag:", "-tag", "moduletag:s:Module Tag:", "--module-source-path", testSrc, @@ -430,6 +432,7 @@ public void testLinkSource() { javadoc("-d", "out-linksource", "-use", "-linksource", + "--no-platform-links", "-Xdoclint:none", "--module-source-path", testSrc, "--module", "moduleA,moduleB"); @@ -447,6 +450,7 @@ public void testLinkSourcePrivate() { "-use", "-private", "-linksource", + "--no-platform-links", "-Xdoclint:none", "--module-source-path", testSrc, "--module", "moduleA,moduleB"); diff --git a/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java b/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java index 990609d0eb0..cb5ac433fff 100644 --- a/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java +++ b/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java @@ -48,6 +48,7 @@ public void test() { javadoc("-Xdoclint:none", "-d", "out", "-use", + "--no-platform-links", "-sourcepath", testSrc, "pkg", "pkg1", "pkg2"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java b/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java index ef9c2519848..a09a3445430 100644 --- a/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java +++ b/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java @@ -185,6 +185,7 @@ public void testInvalidAdditionalStylesheetFiles() { public void testLinkSource() { javadoc("-d", "out-9", "-linksource", + "--no-platform-links", "-javafx", "--disable-javafx-strict-checks", "-sourcepath", testSrc, diff --git a/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java b/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java index 0c208ef4b41..6a11932f92e 100644 --- a/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java +++ b/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java @@ -120,6 +120,7 @@ class NamedPackagesForClassUseTest { public void run() { javadoc("-d", "out-1", "-sourcepath", testSrc, + "--no-platform-links", "-use", "pkg1"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenDeprecatedMethods.java b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenDeprecatedMethods.java index 15d8cf0e6ff..79701086d1e 100644 --- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenDeprecatedMethods.java +++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenDeprecatedMethods.java @@ -44,6 +44,7 @@ public static void main(String args[]) throws Exception { public void test() { javadoc("-d", "out-deprecated", "-sourcepath", testSrc, + "--no-platform-links", "--override-methods","summary", "pkg1"); diff --git a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java index e05421d2d4c..fbfb4dc3a5e 100644 --- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java +++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java @@ -69,6 +69,7 @@ public void testDetail() { public void testSummary() { javadoc("-d", "out-summary", "-sourcepath", testSrc, + "--no-platform-links", "-javafx", "--disable-javafx-strict-checks", "--override-methods=summary", diff --git a/test/langtools/jdk/javadoc/doclet/testPackageAnnotation/TestPackageAnnotation.java b/test/langtools/jdk/javadoc/doclet/testPackageAnnotation/TestPackageAnnotation.java index 8f7eed2d5d8..2b7d64b97af 100644 --- a/test/langtools/jdk/javadoc/doclet/testPackageAnnotation/TestPackageAnnotation.java +++ b/test/langtools/jdk/javadoc/doclet/testPackageAnnotation/TestPackageAnnotation.java @@ -44,6 +44,7 @@ public static void main(String... args) throws Exception { public void testPackageInfoAnnotationNoComment() { javadoc("-d", "out-annotation", "-sourcepath", testSrc, + "--no-platform-links", "-use", "pkg1"); checkExit(Exit.OK); @@ -78,6 +79,7 @@ public void testPackageHtmlTag() { public void testPackageInfoAndHtml() { javadoc("-d", "out-annotation-3", "-sourcepath", testSrc, + "--no-platform-links", "-use", "pkg3"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java b/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java index 246dac4259a..4959b0bc490 100644 --- a/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java +++ b/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java @@ -54,6 +54,7 @@ public static void main(String... args) throws Exception { public void testDefault() { javadoc("-d", "out-default", "-sourcepath", testSrc, + "--no-platform-links", "pkg", "pkg2"); checkExit(Exit.OK); @@ -149,6 +150,7 @@ public void testDefault() { public void testPrivate() { javadoc("-d", "out-private", "-sourcepath", testSrc, + "--no-platform-links", "-private", "pkg", "pkg2"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java b/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java index 65c80141850..cab8d0b5252 100644 --- a/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java +++ b/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java @@ -43,6 +43,7 @@ public static void main(String... args) throws Exception { @Test public void testArrays() { javadoc("-d", "out", + "--no-platform-links", "-javafx", "--disable-javafx-strict-checks", "-sourcepath", testSrc, diff --git a/test/langtools/jdk/javadoc/doclet/testRecordTypes/TestRecordTypes.java b/test/langtools/jdk/javadoc/doclet/testRecordTypes/TestRecordTypes.java index 9fe92eb4382..830bee551d7 100644 --- a/test/langtools/jdk/javadoc/doclet/testRecordTypes/TestRecordTypes.java +++ b/test/langtools/jdk/javadoc/doclet/testRecordTypes/TestRecordTypes.java @@ -347,6 +347,7 @@ public record R(""" + comps + ") { }"); javadoc("-d", base.resolve("out").toString(), "-quiet", "-noindex", + "--no-platform-links", "-sourcepath", src.toString(), "--enable-preview", "--source", thisRelease, "p"); @@ -464,6 +465,7 @@ void testAnnotations(Path base, Set<ElementType> types) throws IOException { javadoc("-d", dir.resolve("out").toString(), "-quiet", "-noindex", + "--no-platform-links", "-sourcepath", src.toString(), "-private", "--enable-preview", "--source", thisRelease, diff --git a/test/langtools/jdk/javadoc/doclet/testSealedTypes/TestSealedTypes.java b/test/langtools/jdk/javadoc/doclet/testSealedTypes/TestSealedTypes.java index aa6d8c9629d..5e0b5c4e114 100644 --- a/test/langtools/jdk/javadoc/doclet/testSealedTypes/TestSealedTypes.java +++ b/test/langtools/jdk/javadoc/doclet/testSealedTypes/TestSealedTypes.java @@ -167,6 +167,7 @@ public void testSinglePermits(Path base) throws IOException { javadoc("-d", base.resolve("out").toString(), "--source-path", src.toString(), + "--no-platform-links", "--enable-preview", "--source", thisRelease, "p"); checkExit(Exit.OK); @@ -188,6 +189,7 @@ public void testMultiplePermits(Path base) throws IOException { javadoc("-d", base.resolve("out").toString(), "--source-path", src.toString(), + "--no-platform-links", "--enable-preview", "--source", thisRelease, "p"); checkExit(Exit.OK); @@ -211,6 +213,7 @@ public void testPartialMultiplePermits(Path base) throws IOException { javadoc("-d", base.resolve("out").toString(), "--source-path", src.toString(), + "--no-platform-links", "--enable-preview", "--source", thisRelease, "p"); checkExit(Exit.OK); @@ -260,6 +263,7 @@ public void testPartialMultiplePermitsWithSubtypes2(Path base) throws IOExceptio javadoc("-d", base.resolve("out").toString(), "--source-path", src.toString(), + "--no-platform-links", "--enable-preview", "--source", thisRelease, "p"); checkExit(Exit.OK); @@ -283,6 +287,7 @@ public void testImplicitPermitsAuxiliary(Path base) throws IOException { javadoc("-d", base.resolve("out").toString(), "--source-path", src.toString(), + "--no-platform-links", "-package", "--enable-preview", "--source", thisRelease, "p"); @@ -308,6 +313,7 @@ public void testImplicitPermitsNested(Path base) throws IOException { javadoc("-d", base.resolve("out").toString(), "--source-path", src.toString(), + "--no-platform-links", "--enable-preview", "--source", thisRelease, "p"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTag.java b/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTag.java index f75ae30f882..ae46e7939c1 100644 --- a/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTag.java +++ b/test/langtools/jdk/javadoc/doclet/testSeeTag/TestSeeTag.java @@ -72,6 +72,7 @@ public void test() { public void testBadReference() { javadoc("-d", "out-badref", "-sourcepath", testSrc, + "--no-platform-links", "badref"); checkExit(Exit.ERROR); diff --git a/test/langtools/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java b/test/langtools/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java index c0ab27705ca..6d195fe595f 100644 --- a/test/langtools/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java +++ b/test/langtools/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java @@ -115,6 +115,7 @@ public void testPrivate() { javadoc("-private", "-d", "out-private", "-sourcepath", testSrc, + "--no-platform-links", testSrc("SerializedForm.java"), testSrc("ExternalizedForm.java"), "pkg1"); checkExit(Exit.OK); @@ -166,6 +167,7 @@ public void test2() { javadoc("-private", "-d", "out-2", "-sourcepath", testSrc, + "--no-platform-links", "pkg2"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java b/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java index a76ce19086e..90994592ae4 100644 --- a/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java +++ b/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java @@ -44,6 +44,7 @@ public static void main(String... args) throws Exception { public void testDefault() { javadoc("-d", "out-default", "-sourcepath", testSrc, + "--no-platform-links", "pkg1"); checkExit(Exit.OK); @@ -68,6 +69,7 @@ public void testNoDeprecated() { javadoc("-d", "out-nodepr", "-nodeprecated", "-sourcepath", testSrc, + "--no-platform-links", "pkg1"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testSerializedFormWithClassFile/TestSerializedFormWithClassFile.java b/test/langtools/jdk/javadoc/doclet/testSerializedFormWithClassFile/TestSerializedFormWithClassFile.java index 552e5a6051a..14cc5c251dd 100644 --- a/test/langtools/jdk/javadoc/doclet/testSerializedFormWithClassFile/TestSerializedFormWithClassFile.java +++ b/test/langtools/jdk/javadoc/doclet/testSerializedFormWithClassFile/TestSerializedFormWithClassFile.java @@ -66,6 +66,7 @@ public void test(Path base) throws Exception { Path outDir = base.resolve("out"); javadoc("-d", outDir.toString(), "-linksource", + "--no-platform-links", "-classpath", base.resolve("classes").toString(), "-sourcepath", "", srcDir.resolve("B.java").toString()); diff --git a/test/langtools/jdk/javadoc/doclet/testThrows/TestThrows.java b/test/langtools/jdk/javadoc/doclet/testThrows/TestThrows.java new file mode 100644 index 00000000000..4f116ab7ce9 --- /dev/null +++ b/test/langtools/jdk/javadoc/doclet/testThrows/TestThrows.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2002, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + + /* + * @test + * @bug 8253700 + * @summary spurious "extends Throwable" at end of method declaration + * throws section. Make sure that the link is below a Throws heading. + * @library /tools/lib ../../lib + * @modules jdk.javadoc/jdk.javadoc.internal.tool + * @build javadoc.tester.* toolbox.ToolBox + * @run main TestThrows + */ + + import java.io.IOException; + import java.nio.file.Path; + + import toolbox.ToolBox; + + import javadoc.tester.JavadocTester; + + public class TestThrows extends JavadocTester { + + public static void main(String... args) throws Exception { + TestThrows tester = new TestThrows(); + tester.runTests(m -> new Object[] { Path.of(m.getName()) }); + } + + private final ToolBox tb = new ToolBox(); + + @Test + public void testThrowsWithBound(Path base) throws IOException { + Path src = base.resolve("src"); + tb.writeJavaFiles(src, + """ + /** + * This is interface C. + */ + public interface C { + /** + * Method m. + * @param <T> the throwable + * @throws T if a specific error occurs + * @throws Exception if an exception occurs + */ + <T extends Throwable> void m() throws T, Exception; + } + """); + + javadoc("-d", base.resolve("out").toString(), + "--no-platform-links", + src.resolve("C.java").toString()); + checkExit(Exit.OK); + + checkOutput("C.html", true, + """ + <div class="member-signature"><span class="type-parameters"><T extends java\ + .lang.Throwable></span> <span class="return-type">void</span> <sp\ + an class="member-name">m</span>() + throws <span class="exceptions">T, + java.lang.Exception</span></div> + """, + """ + <dl class="notes"> + <dt>Type Parameters:</dt> + <dd><code>T</code> - the throwable</dd> + <dt>Throws:</dt> + <dd><code>T</code> - if a specific error occurs</dd> + <dd><code>java.lang.Exception</code> - if an exception occurs</dd> + </dl> + """); + } +} diff --git a/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java b/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java index bab91c4252d..2990e2aa1a7 100644 --- a/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java +++ b/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java @@ -44,6 +44,7 @@ public static void main(String... args) throws Exception { @Test public void test() { javadoc("-d", "out", + "--no-platform-links", "-sourcepath", testSrc, "-private", "typeannos"); diff --git a/test/langtools/jdk/javadoc/doclet/testTypeParams/TestTypeParameters.java b/test/langtools/jdk/javadoc/doclet/testTypeParams/TestTypeParameters.java index 8d4f51720a7..b28bdf241c4 100644 --- a/test/langtools/jdk/javadoc/doclet/testTypeParams/TestTypeParameters.java +++ b/test/langtools/jdk/javadoc/doclet/testTypeParams/TestTypeParameters.java @@ -48,6 +48,7 @@ public static void main(String... args) throws Exception { public void test1() { javadoc("-d", "out-1", "-use", + "--no-platform-links", "-sourcepath", testSrc, "pkg"); checkExit(Exit.OK); @@ -80,6 +81,7 @@ public void test1() { public void test2() { javadoc("-d", "out-2", "-linksource", + "--no-platform-links", "-sourcepath", testSrc, "pkg"); checkExit(Exit.OK); diff --git a/test/langtools/jdk/javadoc/doclet/testTypeVariableLinks/TestTypeVariableLinks.java b/test/langtools/jdk/javadoc/doclet/testTypeVariableLinks/TestTypeVariableLinks.java index 43af1221aa1..913f2d3ae98 100644 --- a/test/langtools/jdk/javadoc/doclet/testTypeVariableLinks/TestTypeVariableLinks.java +++ b/test/langtools/jdk/javadoc/doclet/testTypeVariableLinks/TestTypeVariableLinks.java @@ -43,6 +43,7 @@ public static void main(String... args) throws Exception { @Test public void test1() { javadoc("-d", "out", + "--no-platform-links", "-sourcepath", testSrc, "-package", "pkg1"); diff --git a/test/langtools/jdk/javadoc/doclet/testVisibleMembers/TestVisibleMembers.java b/test/langtools/jdk/javadoc/doclet/testVisibleMembers/TestVisibleMembers.java index 0b569ee881a..12803881469 100644 --- a/test/langtools/jdk/javadoc/doclet/testVisibleMembers/TestVisibleMembers.java +++ b/test/langtools/jdk/javadoc/doclet/testVisibleMembers/TestVisibleMembers.java @@ -266,6 +266,7 @@ public void testStreamsMissingLinksDetail(Path base) throws Exception { javadoc("-d", outDir.toString(), "-html5", "--override-methods=detail", + "--no-platform-links", "-sourcepath", srcDir.toString(), "p"); checkExit(Exit.OK); @@ -301,6 +302,7 @@ public void testStreamsMissingLinksSummary(Path base) throws Exception { javadoc("-d", outDir.toString(), "-html5", "--override-methods=summary", + "--no-platform-links", "-sourcepath", srcDir.toString(), "p"); checkExit(Exit.OK); diff --git a/test/langtools/tools/doclint/AccessTest.java b/test/langtools/tools/doclint/AccessTest.java index 1ba8c18bce5..a8d3699d607 100644 --- a/test/langtools/tools/doclint/AccessTest.java +++ b/test/langtools/tools/doclint/AccessTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref AccessTest.protected.out AccessTest.java * @run main DocLintTester -Xmsgs -ref AccessTest.private.out AccessTest.java diff --git a/test/langtools/tools/doclint/AccessibilityTest.java b/test/langtools/tools/doclint/AccessibilityTest.java index 50bfabcd9b0..5d7e34fe00d 100644 --- a/test/langtools/tools/doclint/AccessibilityTest.java +++ b/test/langtools/tools/doclint/AccessibilityTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-accessibility AccessibilityTest.java * @run main DocLintTester -ref AccessibilityTest.out AccessibilityTest.java diff --git a/test/langtools/tools/doclint/AccessibilityTest5.java b/test/langtools/tools/doclint/AccessibilityTest5.java index 5e357ab15cd..a5393b3d544 100644 --- a/test/langtools/tools/doclint/AccessibilityTest5.java +++ b/test/langtools/tools/doclint/AccessibilityTest5.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8247955 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -XhtmlVersion:html5 -Xmsgs:-accessibility AccessibilityTest5.java * @run main DocLintTester -XhtmlVersion:html5 -ref AccessibilityTest5.out AccessibilityTest5.java diff --git a/test/langtools/tools/doclint/AnchorTest.java b/test/langtools/tools/doclint/AnchorTest.java index c867b7d9e2b..d2d9324189d 100644 --- a/test/langtools/tools/doclint/AnchorTest.java +++ b/test/langtools/tools/doclint/AnchorTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref AnchorTest.out AnchorTest.java */ diff --git a/test/langtools/tools/doclint/AnchorTest2.java b/test/langtools/tools/doclint/AnchorTest2.java index 179f9009cf6..79b668677f1 100644 --- a/test/langtools/tools/doclint/AnchorTest2.java +++ b/test/langtools/tools/doclint/AnchorTest2.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8020313 * @summary doclint doesn't reset HTML anchors correctly - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref AnchorTest2.out AnchorTest2.java AnchorTest2a.java * @run main DocLintTester -ref AnchorTest2.out AnchorTest2a.java AnchorTest2.java diff --git a/test/langtools/tools/doclint/BadPackageCommentTest.java b/test/langtools/tools/doclint/BadPackageCommentTest.java index 6fbb73fdb39..85d24e05fda 100644 --- a/test/langtools/tools/doclint/BadPackageCommentTest.java +++ b/test/langtools/tools/doclint/BadPackageCommentTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8020278 * @summary NPE in javadoc (bad handling of bad tag in package-info.java) - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref BadPackageCommentTest.out BadPackageCommentTest.java */ diff --git a/test/langtools/tools/doclint/CoverageExtras.java b/test/langtools/tools/doclint/CoverageExtras.java index 67288cfa41c..5a6c90c4b74 100644 --- a/test/langtools/tools/doclint/CoverageExtras.java +++ b/test/langtools/tools/doclint/CoverageExtras.java @@ -25,14 +25,15 @@ * @test * @bug 8006263 * @summary Supplementary test cases needed for doclint - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint */ -import com.sun.tools.doclint.Checker; -import com.sun.tools.doclint.HtmlTag; -import com.sun.tools.doclint.Messages; import java.util.Objects; +import jdk.javadoc.internal.doclint.Checker; +import jdk.javadoc.internal.doclint.HtmlTag; +import jdk.javadoc.internal.doclint.Messages; + public class CoverageExtras { public static void main(String... args) { new CoverageExtras().run(); diff --git a/test/langtools/tools/doclint/CustomTagTest.java b/test/langtools/tools/doclint/CustomTagTest.java index 61dcea94e47..2aba557669c 100644 --- a/test/langtools/tools/doclint/CustomTagTest.java +++ b/test/langtools/tools/doclint/CustomTagTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8006248 8028318 * @summary DocLint should report unknown tags - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester CustomTagTest.java * @run main DocLintTester -XcustomTags: -ref CustomTagTest.out CustomTagTest.java diff --git a/test/langtools/tools/doclint/DocLintTester.java b/test/langtools/tools/doclint/DocLintTester.java index a24ea4636cd..7110d983b10 100644 --- a/test/langtools/tools/doclint/DocLintTester.java +++ b/test/langtools/tools/doclint/DocLintTester.java @@ -33,8 +33,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import com.sun.tools.doclint.DocLint; -import com.sun.tools.doclint.DocLint.BadArgs; +import jdk.javadoc.internal.doclint.DocLint; +import jdk.javadoc.internal.doclint.DocLint.BadArgs; public class DocLintTester { diff --git a/test/langtools/tools/doclint/DuplicateParamTest.java b/test/langtools/tools/doclint/DuplicateParamTest.java index 346d4e46df1..2a83a4f1b1b 100644 --- a/test/langtools/tools/doclint/DuplicateParamTest.java +++ b/test/langtools/tools/doclint/DuplicateParamTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8081820 * @summary Validate parameter names uniqueness - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-reference DuplicateParamTest.java * @run main DocLintTester -ref DuplicateParamTest.out DuplicateParamTest.java diff --git a/test/langtools/tools/doclint/DuplicateReturnTest.java b/test/langtools/tools/doclint/DuplicateReturnTest.java index d6246efc582..c3815c89ef0 100644 --- a/test/langtools/tools/doclint/DuplicateReturnTest.java +++ b/test/langtools/tools/doclint/DuplicateReturnTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8081820 * @summary Validate return uniqueness - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-reference DuplicateReturnTest.java * @run main DocLintTester -ref DuplicateReturnTest.out DuplicateReturnTest.java diff --git a/test/langtools/tools/doclint/EmptyAuthorTest.java b/test/langtools/tools/doclint/EmptyAuthorTest.java index ecd7e91271c..e1950fb6a30 100644 --- a/test/langtools/tools/doclint/EmptyAuthorTest.java +++ b/test/langtools/tools/doclint/EmptyAuthorTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 8247815 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-missing EmptyAuthorTest.java * @run main DocLintTester -Xmsgs:missing -ref EmptyAuthorTest.out EmptyAuthorTest.java diff --git a/test/langtools/tools/doclint/EmptyExceptionTest.java b/test/langtools/tools/doclint/EmptyExceptionTest.java index 8a93ec69d02..0177974c763 100644 --- a/test/langtools/tools/doclint/EmptyExceptionTest.java +++ b/test/langtools/tools/doclint/EmptyExceptionTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 8247815 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-missing EmptyExceptionTest.java * @run main DocLintTester -Xmsgs:missing -ref EmptyExceptionTest.out EmptyExceptionTest.java diff --git a/test/langtools/tools/doclint/EmptyHtmlTest.java b/test/langtools/tools/doclint/EmptyHtmlTest.java index 1984edf0fd5..7b07fa58825 100644 --- a/test/langtools/tools/doclint/EmptyHtmlTest.java +++ b/test/langtools/tools/doclint/EmptyHtmlTest.java @@ -26,7 +26,7 @@ * @test * @bug 8246712 * @summary doclint incorrectly reports some HTML elements as empty - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @library /tools/lib * @build toolbox.TestRunner toolbox.ToolBox * @run main EmptyHtmlTest @@ -41,7 +41,7 @@ import com.sun.source.doctree.DocTreeVisitor; import com.sun.source.doctree.InlineTagTree; -import com.sun.tools.doclint.DocLint; +import jdk.javadoc.internal.doclint.DocLint; import toolbox.TestRunner; import toolbox.ToolBox; diff --git a/test/langtools/tools/doclint/EmptyParamTest.java b/test/langtools/tools/doclint/EmptyParamTest.java index ce92ecc19e5..fd33784ad96 100644 --- a/test/langtools/tools/doclint/EmptyParamTest.java +++ b/test/langtools/tools/doclint/EmptyParamTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 8247815 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-missing EmptyParamTest.java * @run main DocLintTester -Xmsgs:missing -ref EmptyParamTest.out EmptyParamTest.java diff --git a/test/langtools/tools/doclint/EmptyPreTest.java b/test/langtools/tools/doclint/EmptyPreTest.java index 79cc01bc587..0ab71859af5 100644 --- a/test/langtools/tools/doclint/EmptyPreTest.java +++ b/test/langtools/tools/doclint/EmptyPreTest.java @@ -25,7 +25,7 @@ * @test * @bug 8010317 * @summary DocLint incorrectly reports some <pre> tags as empty - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:html EmptyPreTest.java */ diff --git a/test/langtools/tools/doclint/EmptyReturnTest.java b/test/langtools/tools/doclint/EmptyReturnTest.java index 34ff7f4cbd8..6e10caf6b14 100644 --- a/test/langtools/tools/doclint/EmptyReturnTest.java +++ b/test/langtools/tools/doclint/EmptyReturnTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 8247815 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-missing EmptyReturnTest.java * @run main DocLintTester -Xmsgs:missing -ref EmptyReturnTest.out EmptyReturnTest.java diff --git a/test/langtools/tools/doclint/EmptySerialDataTest.java b/test/langtools/tools/doclint/EmptySerialDataTest.java index f6c353069e8..06a6e7fb0d1 100644 --- a/test/langtools/tools/doclint/EmptySerialDataTest.java +++ b/test/langtools/tools/doclint/EmptySerialDataTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 8247815 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-missing EmptySerialDataTest.java * @run main DocLintTester -Xmsgs:missing -ref EmptySerialDataTest.out EmptySerialDataTest.java diff --git a/test/langtools/tools/doclint/EmptySerialFieldTest.java b/test/langtools/tools/doclint/EmptySerialFieldTest.java index 79789cc6588..8e8322971a3 100644 --- a/test/langtools/tools/doclint/EmptySerialFieldTest.java +++ b/test/langtools/tools/doclint/EmptySerialFieldTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 8247815 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-missing EmptySerialFieldTest.java * @run main DocLintTester -Xmsgs:missing -ref EmptySerialFieldTest.out EmptySerialFieldTest.java diff --git a/test/langtools/tools/doclint/EmptySinceTest.java b/test/langtools/tools/doclint/EmptySinceTest.java index 5992cc9d901..18fea545bf5 100644 --- a/test/langtools/tools/doclint/EmptySinceTest.java +++ b/test/langtools/tools/doclint/EmptySinceTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 8247815 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-missing EmptySinceTest.java * @run main DocLintTester -Xmsgs:missing -ref EmptySinceTest.out EmptySinceTest.java diff --git a/test/langtools/tools/doclint/EmptyVersionTest.java b/test/langtools/tools/doclint/EmptyVersionTest.java index e2c3799410f..6d40b4b49de 100644 --- a/test/langtools/tools/doclint/EmptyVersionTest.java +++ b/test/langtools/tools/doclint/EmptyVersionTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 8247815 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-missing EmptyVersionTest.java * @run main DocLintTester -Xmsgs:missing -ref EmptyVersionTest.out EmptyVersionTest.java diff --git a/test/langtools/tools/doclint/EndTagsTest.java b/test/langtools/tools/doclint/EndTagsTest.java index 512c1ecf710..ad2d1cebc68 100644 --- a/test/langtools/tools/doclint/EndTagsTest.java +++ b/test/langtools/tools/doclint/EndTagsTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8006236 * @summary doclint: structural issue hidden - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-html EndTagsTest.java * @run main DocLintTester -ref EndTagsTest.out EndTagsTest.java diff --git a/test/langtools/tools/doclint/EndWithIdentifierTest.java b/test/langtools/tools/doclint/EndWithIdentifierTest.java index 11b7b0b6e0f..c9ca44f9372 100644 --- a/test/langtools/tools/doclint/EndWithIdentifierTest.java +++ b/test/langtools/tools/doclint/EndWithIdentifierTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8007096 * @summary DocLint parsing problems with some comments - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-html EndWithIdentifierTest.java * @run main DocLintTester -Xmsgs -ref EndWithIdentifierTest.out EndWithIdentifierTest.java diff --git a/test/langtools/tools/doclint/HtmlAttrsTest.java b/test/langtools/tools/doclint/HtmlAttrsTest.java index 330af137081..3067e7b6050 100644 --- a/test/langtools/tools/doclint/HtmlAttrsTest.java +++ b/test/langtools/tools/doclint/HtmlAttrsTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-html HtmlAttrsTest.java * @run main DocLintTester -ref HtmlAttrsTest.out HtmlAttrsTest.java diff --git a/test/langtools/tools/doclint/HtmlTagsTest.java b/test/langtools/tools/doclint/HtmlTagsTest.java index 216b8acd47d..8f1926cf17a 100644 --- a/test/langtools/tools/doclint/HtmlTagsTest.java +++ b/test/langtools/tools/doclint/HtmlTagsTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-html HtmlTagsTest.java * @run main DocLintTester -ref HtmlTagsTest.out HtmlTagsTest.java diff --git a/test/langtools/tools/doclint/HtmlVersionTest.java b/test/langtools/tools/doclint/HtmlVersionTest.java index 600302529bd..04ea2af3bd1 100644 --- a/test/langtools/tools/doclint/HtmlVersionTest.java +++ b/test/langtools/tools/doclint/HtmlVersionTest.java @@ -26,7 +26,7 @@ * @bug 8072945 * @summary test HTML version * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -XhtmlVersion:html5 HtmlVersionTest.java * @run main DocLintTester -XhtmlVersion:html4 HtmlVersionTest.java diff --git a/test/langtools/tools/doclint/LambdaTest.java b/test/langtools/tools/doclint/LambdaTest.java index 84555288ed4..2634d29c43f 100644 --- a/test/langtools/tools/doclint/LambdaTest.java +++ b/test/langtools/tools/doclint/LambdaTest.java @@ -25,7 +25,7 @@ * @test * @bug 8194069 * @summary ignore declarations in lambda expressions - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:all SyntheticTest.java */ diff --git a/test/langtools/tools/doclint/LiteralTest.java b/test/langtools/tools/doclint/LiteralTest.java index 25e0d5ece54..e87d51695bb 100644 --- a/test/langtools/tools/doclint/LiteralTest.java +++ b/test/langtools/tools/doclint/LiteralTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8006228 * @summary Doclint doesn't detect <code> {@code nested inline} </code> - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref LiteralTest.out LiteralTest.java */ diff --git a/test/langtools/tools/doclint/MissingCommentTest.java b/test/langtools/tools/doclint/MissingCommentTest.java index 163a701eda8..131a9aa7c56 100644 --- a/test/langtools/tools/doclint/MissingCommentTest.java +++ b/test/langtools/tools/doclint/MissingCommentTest.java @@ -1,6 +1,6 @@ /* * @test /nodynamiccopyright/ - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-missing MissingCommentTest.java * @run main DocLintTester -Xmsgs:missing -ref MissingCommentTest.out MissingCommentTest.java diff --git a/test/langtools/tools/doclint/MissingParamsTest.java b/test/langtools/tools/doclint/MissingParamsTest.java index a16dbd40c09..f862cb83362 100644 --- a/test/langtools/tools/doclint/MissingParamsTest.java +++ b/test/langtools/tools/doclint/MissingParamsTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-missing MissingParamsTest.java * @run main DocLintTester -Xmsgs:missing -ref MissingParamsTest.out MissingParamsTest.java diff --git a/test/langtools/tools/doclint/MissingReturnTest.java b/test/langtools/tools/doclint/MissingReturnTest.java index 471a2ee1443..42a8ac248d7 100644 --- a/test/langtools/tools/doclint/MissingReturnTest.java +++ b/test/langtools/tools/doclint/MissingReturnTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-missing MissingReturnTest.java * @run main DocLintTester -Xmsgs:missing -ref MissingReturnTest.out MissingReturnTest.java diff --git a/test/langtools/tools/doclint/MissingThrowsTest.java b/test/langtools/tools/doclint/MissingThrowsTest.java index 9876e42c3ac..17f3e128e93 100644 --- a/test/langtools/tools/doclint/MissingThrowsTest.java +++ b/test/langtools/tools/doclint/MissingThrowsTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-missing MissingThrowsTest.java * @run main DocLintTester -Xmsgs:missing -ref MissingThrowsTest.out MissingThrowsTest.java diff --git a/test/langtools/tools/doclint/OptionTest.java b/test/langtools/tools/doclint/OptionTest.java index e03df80fa02..ec1414ab85c 100644 --- a/test/langtools/tools/doclint/OptionTest.java +++ b/test/langtools/tools/doclint/OptionTest.java @@ -25,10 +25,10 @@ * @test * @bug 8004832 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint */ -import com.sun.tools.doclint.DocLint; +import jdk.javadoc.internal.doclint.DocLint; public class OptionTest { public static void main(String... args) throws Exception { @@ -80,9 +80,10 @@ void run() throws Exception { } void test(String[] tests, boolean expect) { + DocLint docLint = new DocLint(); for (String test: tests) { System.err.println("test: " + test); - boolean found = DocLint.isValidOption(test); + boolean found = docLint.isValidOption(test); if (found != expect) error("Unexpected result: " + found + ",expected: " + expect); } diff --git a/test/langtools/tools/doclint/OverridesTest.java b/test/langtools/tools/doclint/OverridesTest.java index beb7a5af250..f30e1ace982 100644 --- a/test/langtools/tools/doclint/OverridesTest.java +++ b/test/langtools/tools/doclint/OverridesTest.java @@ -25,7 +25,7 @@ * @test * @bug 8004832 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:all OverridesTest.java */ diff --git a/test/langtools/tools/doclint/ParaTagTest.java b/test/langtools/tools/doclint/ParaTagTest.java index 6a629c56072..db719b75368 100644 --- a/test/langtools/tools/doclint/ParaTagTest.java +++ b/test/langtools/tools/doclint/ParaTagTest.java @@ -25,7 +25,7 @@ * @test * @bug 8007566 * @summary DocLint too aggressive with not allowed here: <p> - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs ParaTagTest.java */ diff --git a/test/langtools/tools/doclint/ProvidesTest.java b/test/langtools/tools/doclint/ProvidesTest.java index db904d458d4..3987af16074 100644 --- a/test/langtools/tools/doclint/ProvidesTest.java +++ b/test/langtools/tools/doclint/ProvidesTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8160196 * @summary Module summary page should display information based on "api" or "detail" mode. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref ProvidesTest.out ProvidesTest.java */ diff --git a/test/langtools/tools/doclint/ReferenceTest.java b/test/langtools/tools/doclint/ReferenceTest.java index 48d4cecc46e..4f962446553 100644 --- a/test/langtools/tools/doclint/ReferenceTest.java +++ b/test/langtools/tools/doclint/ReferenceTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 8020556 8002154 8200432 8177280 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-reference ReferenceTest.java * @run main DocLintTester -ref ReferenceTest.out ReferenceTest.java diff --git a/test/langtools/tools/doclint/ResourceTest.java b/test/langtools/tools/doclint/ResourceTest.java index 6384be7ab16..b7261e413d3 100644 --- a/test/langtools/tools/doclint/ResourceTest.java +++ b/test/langtools/tools/doclint/ResourceTest.java @@ -25,7 +25,7 @@ * @test * @bug 8006615 * @summary move remaining messages into resource bundle - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint */ import java.io.IOException; @@ -35,7 +35,7 @@ import java.util.List; import java.util.Locale; -import com.sun.tools.doclint.DocLint; +import jdk.javadoc.internal.doclint.DocLint; public class ResourceTest { public static void main(String... args) throws Exception { diff --git a/test/langtools/tools/doclint/RunTest.java b/test/langtools/tools/doclint/RunTest.java index 2dfeefbc41c..2d287136b47 100644 --- a/test/langtools/tools/doclint/RunTest.java +++ b/test/langtools/tools/doclint/RunTest.java @@ -25,7 +25,7 @@ * @bug 8004832 8000103 * @summary Add new doclint package * @summary Create doclint utility - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint */ import java.io.File; @@ -38,8 +38,8 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import com.sun.tools.doclint.DocLint; -import com.sun.tools.doclint.DocLint.BadArgs; +import jdk.javadoc.internal.doclint.DocLint; +import jdk.javadoc.internal.doclint.DocLint.BadArgs; /** javadoc error on toplevel: a & b. */ public class RunTest { diff --git a/test/langtools/tools/doclint/SummaryTest.java b/test/langtools/tools/doclint/SummaryTest.java index a58eb5e7ba0..1b78b955e61 100644 --- a/test/langtools/tools/doclint/SummaryTest.java +++ b/test/langtools/tools/doclint/SummaryTest.java @@ -1,6 +1,6 @@ /* * @test /nodynamiccopyright/ - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref SummaryTest.out SummaryTest.java */ diff --git a/test/langtools/tools/doclint/SyntaxTest.java b/test/langtools/tools/doclint/SyntaxTest.java index b030a0c84ff..da4716ce65b 100644 --- a/test/langtools/tools/doclint/SyntaxTest.java +++ b/test/langtools/tools/doclint/SyntaxTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8004832 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-syntax SyntaxTest.java * @run main DocLintTester -ref SyntaxTest.out SyntaxTest.java diff --git a/test/langtools/tools/doclint/SyntheticTest.java b/test/langtools/tools/doclint/SyntheticTest.java index 6d7ac87cf12..fa2cc77b6b4 100644 --- a/test/langtools/tools/doclint/SyntheticTest.java +++ b/test/langtools/tools/doclint/SyntheticTest.java @@ -25,7 +25,7 @@ * @test * @bug 8004832 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:all SyntheticTest.java */ diff --git a/test/langtools/tools/doclint/UnfinishedInlineTagTest.java b/test/langtools/tools/doclint/UnfinishedInlineTagTest.java index 80d4c71ce27..175ac11b99c 100644 --- a/test/langtools/tools/doclint/UnfinishedInlineTagTest.java +++ b/test/langtools/tools/doclint/UnfinishedInlineTagTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8007096 * @summary DocLint parsing problems with some comments - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-html UnfinishedInlineTagTest.java * @run main DocLintTester -Xmsgs -ref UnfinishedInlineTagTest.out UnfinishedInlineTagTest.java diff --git a/test/langtools/tools/doclint/UsesTest.java b/test/langtools/tools/doclint/UsesTest.java index 9f203817d9d..29f7b77ff99 100644 --- a/test/langtools/tools/doclint/UsesTest.java +++ b/test/langtools/tools/doclint/UsesTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8160196 * @summary Module summary page should display information based on "api" or "detail" mode. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref UsesTest.out UsesTest.java */ diff --git a/test/langtools/tools/doclint/ValidTest.java b/test/langtools/tools/doclint/ValidTest.java index fb1f73457a5..d15172db231 100644 --- a/test/langtools/tools/doclint/ValidTest.java +++ b/test/langtools/tools/doclint/ValidTest.java @@ -25,7 +25,7 @@ * @test * @bug 8004832 8048806 * @summary Add new doclint package - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester ValidTest.java */ diff --git a/test/langtools/tools/doclint/ValueTest.java b/test/langtools/tools/doclint/ValueTest.java index 8b7a5c027f0..34b449dc6fa 100644 --- a/test/langtools/tools/doclint/ValueTest.java +++ b/test/langtools/tools/doclint/ValueTest.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8025272 * @summary doclint needs to check for valid usage of at-value tag - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref ValueTest.out ValueTest.java */ diff --git a/test/langtools/tools/doclint/anchorTests/p/Test.java b/test/langtools/tools/doclint/anchorTests/p/Test.java index abac0617feb..bc734c9eb5b 100644 --- a/test/langtools/tools/doclint/anchorTests/p/Test.java +++ b/test/langtools/tools/doclint/anchorTests/p/Test.java @@ -2,7 +2,7 @@ * @bug 8025246 * @summary doclint is showing error on anchor already defined when it's not * @library ../.. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref Test.out Test.java * @compile/fail/ref=Test.javac.out -XDrawDiagnostics -Werror -Xdoclint:all Test.java diff --git a/test/langtools/tools/doclint/anchorTests/p/package-info.java b/test/langtools/tools/doclint/anchorTests/p/package-info.java index c2a35a2f824..9a586ad6af0 100644 --- a/test/langtools/tools/doclint/anchorTests/p/package-info.java +++ b/test/langtools/tools/doclint/anchorTests/p/package-info.java @@ -2,7 +2,7 @@ * @bug 8025246 * @summary doclint is showing error on anchor already defined when it's not * @library ../.. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref package-info.out package-info.java * @compile/fail/ref=package-info.javac.out -XDrawDiagnostics -Werror -Xdoclint:all package-info.java diff --git a/test/langtools/tools/doclint/html/BlockTagsTest.java b/test/langtools/tools/doclint/html/BlockTagsTest.java index 4042dc49e00..baf0e93261b 100644 --- a/test/langtools/tools/doclint/html/BlockTagsTest.java +++ b/test/langtools/tools/doclint/html/BlockTagsTest.java @@ -26,7 +26,7 @@ * @bug 8006251 * @summary test block tags * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-accessibility BlockTagsTest.java */ diff --git a/test/langtools/tools/doclint/html/EntitiesTest.java b/test/langtools/tools/doclint/html/EntitiesTest.java index 081093c7269..de67da72815 100644 --- a/test/langtools/tools/doclint/html/EntitiesTest.java +++ b/test/langtools/tools/doclint/html/EntitiesTest.java @@ -26,7 +26,7 @@ * @bug 8006263 * @summary Supplementary test cases needed for doclint * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs:-html EntitiesTest.java * @run main DocLintTester -Xmsgs:html -ref EntitiesTest.out EntitiesTest.java diff --git a/test/langtools/tools/doclint/html/HtmlVersionTagsAttrsTest.java b/test/langtools/tools/doclint/html/HtmlVersionTagsAttrsTest.java index f65431cd81b..21da610ff31 100644 --- a/test/langtools/tools/doclint/html/HtmlVersionTagsAttrsTest.java +++ b/test/langtools/tools/doclint/html/HtmlVersionTagsAttrsTest.java @@ -3,7 +3,7 @@ * @bug 8072945 * @summary test tags and attributes specific to the output HTML version * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -XhtmlVersion:html5 -ref HtmlVersionTagsAttrsTestHtml5.out HtmlVersionTagsAttrsTest.java * @run main DocLintTester -XhtmlVersion:html4 -ref HtmlVersionTagsAttrsTestHtml4.out HtmlVersionTagsAttrsTest.java diff --git a/test/langtools/tools/doclint/html/InlineTagsTest.java b/test/langtools/tools/doclint/html/InlineTagsTest.java index b6ca83d5dbe..0285c9cf477 100644 --- a/test/langtools/tools/doclint/html/InlineTagsTest.java +++ b/test/langtools/tools/doclint/html/InlineTagsTest.java @@ -26,7 +26,7 @@ * @bug 8006251 * @summary test inline tags * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs InlineTagsTest.java */ diff --git a/test/langtools/tools/doclint/html/ListTagsTest.java b/test/langtools/tools/doclint/html/ListTagsTest.java index c1d99c6bfd2..288dbf26681 100644 --- a/test/langtools/tools/doclint/html/ListTagsTest.java +++ b/test/langtools/tools/doclint/html/ListTagsTest.java @@ -3,7 +3,7 @@ * @bug 8006251 8013405 8022173 * @summary test list tags * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs -ref ListTagsTest.out ListTagsTest.java */ diff --git a/test/langtools/tools/doclint/html/OtherTagsTest.java b/test/langtools/tools/doclint/html/OtherTagsTest.java index c2e52e5aa41..ec04a418a8f 100644 --- a/test/langtools/tools/doclint/html/OtherTagsTest.java +++ b/test/langtools/tools/doclint/html/OtherTagsTest.java @@ -3,7 +3,7 @@ * @bug 8006251 8022173 * @summary test other tags * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs -ref OtherTagsTest.out OtherTagsTest.java */ diff --git a/test/langtools/tools/doclint/html/TableTagsTest.java b/test/langtools/tools/doclint/html/TableTagsTest.java index ea15fdfb683..b7967698931 100644 --- a/test/langtools/tools/doclint/html/TableTagsTest.java +++ b/test/langtools/tools/doclint/html/TableTagsTest.java @@ -26,7 +26,7 @@ * @bug 8006251 8022173 * @summary test table tags * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -Xmsgs TableTagsTest.java */ diff --git a/test/langtools/tools/doclint/html/TagNotAllowed.java b/test/langtools/tools/doclint/html/TagNotAllowed.java index c18392b45ac..e8836e2dbe5 100644 --- a/test/langtools/tools/doclint/html/TagNotAllowed.java +++ b/test/langtools/tools/doclint/html/TagNotAllowed.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref TagNotAllowed.out TagNotAllowed.java */ diff --git a/test/langtools/tools/doclint/html/TextNotAllowed.java b/test/langtools/tools/doclint/html/TextNotAllowed.java index 24ead99187a..626740903b2 100644 --- a/test/langtools/tools/doclint/html/TextNotAllowed.java +++ b/test/langtools/tools/doclint/html/TextNotAllowed.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref TextNotAllowed.out TextNotAllowed.java */ diff --git a/test/langtools/tools/doclint/moduleTests/bad/module-info.java b/test/langtools/tools/doclint/moduleTests/bad/module-info.java index 779fc29cbaf..e5dca5521d8 100644 --- a/test/langtools/tools/doclint/moduleTests/bad/module-info.java +++ b/test/langtools/tools/doclint/moduleTests/bad/module-info.java @@ -3,7 +3,7 @@ * @bug 8162576 * @summary Missing doclint check missing for modules * @library ../.. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref module-info.out module-info.java * @compile/fail/ref=module-info.javac.out -XDrawDiagnostics -Werror -Xlint:-options -Xdoclint:all module-info.java diff --git a/test/langtools/tools/doclint/moduleTests/good/module-info.java b/test/langtools/tools/doclint/moduleTests/good/module-info.java index 72d3629fc81..45eff53f489 100644 --- a/test/langtools/tools/doclint/moduleTests/good/module-info.java +++ b/test/langtools/tools/doclint/moduleTests/good/module-info.java @@ -26,7 +26,7 @@ * @bug 8162576 * @summary Missing doclint check missing for modules * @library ../.. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester module-info.java * @compile -Xdoclint:all -Werror -Xlint:-options module-info.java diff --git a/test/langtools/tools/doclint/packageTests/bad/Test.java b/test/langtools/tools/doclint/packageTests/bad/Test.java index ea550cfe372..2112b6fadd3 100644 --- a/test/langtools/tools/doclint/packageTests/bad/Test.java +++ b/test/langtools/tools/doclint/packageTests/bad/Test.java @@ -3,7 +3,7 @@ * @bug 8020664 8021215 * @summary doclint gives incorrect warnings on normal package statements * @library ../.. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref Test.out Test.java * @compile/fail/ref=Test.javac.out -XDrawDiagnostics -Werror -Xdoclint:all Test.java diff --git a/test/langtools/tools/doclint/packageTests/bad/package-info.java b/test/langtools/tools/doclint/packageTests/bad/package-info.java index 0a23ae41a4a..2be90b104d8 100644 --- a/test/langtools/tools/doclint/packageTests/bad/package-info.java +++ b/test/langtools/tools/doclint/packageTests/bad/package-info.java @@ -3,7 +3,7 @@ * @bug 8020664 8021215 * @summary doclint gives incorrect warnings on normal package statements * @library ../.. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref package-info.out package-info.java * @compile/fail/ref=package-info.javac.out -XDrawDiagnostics -Werror -Xdoclint:all package-info.java diff --git a/test/langtools/tools/doclint/packageTests/good/Test.java b/test/langtools/tools/doclint/packageTests/good/Test.java index 7a5030a56b1..5b4f621a323 100644 --- a/test/langtools/tools/doclint/packageTests/good/Test.java +++ b/test/langtools/tools/doclint/packageTests/good/Test.java @@ -26,7 +26,7 @@ * @bug 8020664 8021215 * @summary doclint gives incorrect warnings on normal package statements * @library ../.. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester Test.java * @compile -Xdoclint:all Test.java diff --git a/test/langtools/tools/doclint/packageTests/good/package-info.java b/test/langtools/tools/doclint/packageTests/good/package-info.java index a0670707636..c688314cd99 100644 --- a/test/langtools/tools/doclint/packageTests/good/package-info.java +++ b/test/langtools/tools/doclint/packageTests/good/package-info.java @@ -26,7 +26,7 @@ * @bug 8020664 8021215 * @summary doclint gives incorrect warnings on normal package statements * @library ../.. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester package-info.java * @compile -Xdoclint:all package-info.java diff --git a/test/langtools/tools/doclint/tidy/AnchorAlreadyDefined.java b/test/langtools/tools/doclint/tidy/AnchorAlreadyDefined.java index efcc4eef11c..23df06b4178 100644 --- a/test/langtools/tools/doclint/tidy/AnchorAlreadyDefined.java +++ b/test/langtools/tools/doclint/tidy/AnchorAlreadyDefined.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref AnchorAlreadyDefined.out AnchorAlreadyDefined.java */ diff --git a/test/langtools/tools/doclint/tidy/BadEnd.java b/test/langtools/tools/doclint/tidy/BadEnd.java index 752291f999f..9d8643da22d 100644 --- a/test/langtools/tools/doclint/tidy/BadEnd.java +++ b/test/langtools/tools/doclint/tidy/BadEnd.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref BadEnd.out BadEnd.java */ diff --git a/test/langtools/tools/doclint/tidy/InsertImplicit.java b/test/langtools/tools/doclint/tidy/InsertImplicit.java index 21e86242af6..2153dd8f748 100644 --- a/test/langtools/tools/doclint/tidy/InsertImplicit.java +++ b/test/langtools/tools/doclint/tidy/InsertImplicit.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref InsertImplicit.out InsertImplicit.java */ diff --git a/test/langtools/tools/doclint/tidy/InvalidEntity.java b/test/langtools/tools/doclint/tidy/InvalidEntity.java index a2698a80ef2..1814a3e85f1 100644 --- a/test/langtools/tools/doclint/tidy/InvalidEntity.java +++ b/test/langtools/tools/doclint/tidy/InvalidEntity.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref InvalidEntity.out InvalidEntity.java */ diff --git a/test/langtools/tools/doclint/tidy/InvalidName.java b/test/langtools/tools/doclint/tidy/InvalidName.java index 35b0a2737c8..e47e297ce4c 100644 --- a/test/langtools/tools/doclint/tidy/InvalidName.java +++ b/test/langtools/tools/doclint/tidy/InvalidName.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref InvalidName.out InvalidName.java */ diff --git a/test/langtools/tools/doclint/tidy/InvalidTag.java b/test/langtools/tools/doclint/tidy/InvalidTag.java index ad22dffe59e..1ae4c352b56 100644 --- a/test/langtools/tools/doclint/tidy/InvalidTag.java +++ b/test/langtools/tools/doclint/tidy/InvalidTag.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref InvalidTag.out InvalidTag.java */ diff --git a/test/langtools/tools/doclint/tidy/InvalidURI.java b/test/langtools/tools/doclint/tidy/InvalidURI.java index fb5ae2059e6..41ddc36cedf 100644 --- a/test/langtools/tools/doclint/tidy/InvalidURI.java +++ b/test/langtools/tools/doclint/tidy/InvalidURI.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref InvalidURI.out InvalidURI.java */ diff --git a/test/langtools/tools/doclint/tidy/MissingGT.java b/test/langtools/tools/doclint/tidy/MissingGT.java index 1f2767c1002..08460edfedd 100644 --- a/test/langtools/tools/doclint/tidy/MissingGT.java +++ b/test/langtools/tools/doclint/tidy/MissingGT.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref MissingGT.out MissingGT.java */ diff --git a/test/langtools/tools/doclint/tidy/MissingTag.java b/test/langtools/tools/doclint/tidy/MissingTag.java index 973de870900..de227b1de92 100644 --- a/test/langtools/tools/doclint/tidy/MissingTag.java +++ b/test/langtools/tools/doclint/tidy/MissingTag.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref MissingTag.out MissingTag.java */ diff --git a/test/langtools/tools/doclint/tidy/NestedTag.java b/test/langtools/tools/doclint/tidy/NestedTag.java index 71e2a52c0b0..01e67b2d8c3 100644 --- a/test/langtools/tools/doclint/tidy/NestedTag.java +++ b/test/langtools/tools/doclint/tidy/NestedTag.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref NestedTag.out NestedTag.java */ diff --git a/test/langtools/tools/doclint/tidy/ParaInPre.java b/test/langtools/tools/doclint/tidy/ParaInPre.java index 91b4eb705e2..d1221fbae29 100644 --- a/test/langtools/tools/doclint/tidy/ParaInPre.java +++ b/test/langtools/tools/doclint/tidy/ParaInPre.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref ParaInPre.out ParaInPre.java */ diff --git a/test/langtools/tools/doclint/tidy/RepeatedAttr.java b/test/langtools/tools/doclint/tidy/RepeatedAttr.java index be3ce44cb0e..e28a481155a 100644 --- a/test/langtools/tools/doclint/tidy/RepeatedAttr.java +++ b/test/langtools/tools/doclint/tidy/RepeatedAttr.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref RepeatedAttr.out RepeatedAttr.java */ diff --git a/test/langtools/tools/doclint/tidy/TextNotAllowed.java b/test/langtools/tools/doclint/tidy/TextNotAllowed.java index f8cdccf33c5..8fc7046e216 100644 --- a/test/langtools/tools/doclint/tidy/TextNotAllowed.java +++ b/test/langtools/tools/doclint/tidy/TextNotAllowed.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref TextNotAllowed.out TextNotAllowed.java */ diff --git a/test/langtools/tools/doclint/tidy/TrimmingEmptyTag.java b/test/langtools/tools/doclint/tidy/TrimmingEmptyTag.java index dc6e5592086..3078e26c718 100644 --- a/test/langtools/tools/doclint/tidy/TrimmingEmptyTag.java +++ b/test/langtools/tools/doclint/tidy/TrimmingEmptyTag.java @@ -3,7 +3,7 @@ * @bug 8004832 8026368 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref TrimmingEmptyTag.out TrimmingEmptyTag.java */ diff --git a/test/langtools/tools/doclint/tidy/UnescapedOrUnknownEntity.java b/test/langtools/tools/doclint/tidy/UnescapedOrUnknownEntity.java index 45e9b5c7dcd..406a4f6a7f7 100644 --- a/test/langtools/tools/doclint/tidy/UnescapedOrUnknownEntity.java +++ b/test/langtools/tools/doclint/tidy/UnescapedOrUnknownEntity.java @@ -3,7 +3,7 @@ * @bug 8004832 * @summary Add new doclint package * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref UnescapedOrUnknownEntity.out UnescapedOrUnknownEntity.java */ diff --git a/test/langtools/tools/doclint/tool/HelpTest.java b/test/langtools/tools/doclint/tool/HelpTest.java index 93d0e77559b..63db02f1c93 100644 --- a/test/langtools/tools/doclint/tool/HelpTest.java +++ b/test/langtools/tools/doclint/tool/HelpTest.java @@ -26,7 +26,7 @@ * @bug 8006263 * @summary Supplementary test cases needed for doclint * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref HelpTest.out * @run main DocLintTester -ref HelpTest.out -h diff --git a/test/langtools/tools/doclint/tool/MaxDiagsTest.java b/test/langtools/tools/doclint/tool/MaxDiagsTest.java index 8db98797819..53377dbd096 100644 --- a/test/langtools/tools/doclint/tool/MaxDiagsTest.java +++ b/test/langtools/tools/doclint/tool/MaxDiagsTest.java @@ -3,7 +3,7 @@ * @bug 8006263 * @summary Supplementary test cases needed for doclint * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref MaxDiagsTest.out -Xmaxerrs 2 -Xmaxwarns 2 MaxDiagsTest.java * @run main DocLintTester -badargs -Xmaxerrs diff --git a/test/langtools/tools/doclint/tool/PathsTest.java b/test/langtools/tools/doclint/tool/PathsTest.java index 05c2374e67d..a99d307e950 100644 --- a/test/langtools/tools/doclint/tool/PathsTest.java +++ b/test/langtools/tools/doclint/tool/PathsTest.java @@ -26,9 +26,9 @@ * @bug 8006263 * @summary Supplementary test cases needed for doclint * @library /tools/lib - * @modules jdk.compiler/com.sun.tools.doclint - * jdk.compiler/com.sun.tools.javac.api + * @modules jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.main + * jdk.javadoc/jdk.javadoc.internal.doclint * @build toolbox.ToolBox toolbox.JarTask * @run main PathsTest */ @@ -43,8 +43,8 @@ import javax.tools.JavaFileManager; import javax.tools.ToolProvider; -import com.sun.tools.doclint.DocLint; -import com.sun.tools.doclint.DocLint.BadArgs; +import jdk.javadoc.internal.doclint.DocLint; +import jdk.javadoc.internal.doclint.DocLint.BadArgs; import toolbox.JarTask; import toolbox.ToolBox; diff --git a/test/langtools/tools/doclint/tool/RunTest.java b/test/langtools/tools/doclint/tool/RunTest.java index 5f495266b7e..92d26895563 100644 --- a/test/langtools/tools/doclint/tool/RunTest.java +++ b/test/langtools/tools/doclint/tool/RunTest.java @@ -25,14 +25,10 @@ * @test * @bug 8006263 * @summary Supplementary test cases needed for doclint - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * jdk.compiler/com.sun.tools.javac.api */ -import com.sun.source.util.JavacTask; -import com.sun.tools.doclint.DocLint; -import com.sun.tools.doclint.DocLint.BadArgs; -import com.sun.tools.javac.api.JavacTool; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; @@ -46,6 +42,12 @@ import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; +import com.sun.source.util.JavacTask; +import com.sun.tools.javac.api.JavacTool; + +import jdk.javadoc.internal.doclint.DocLint; +import jdk.javadoc.internal.doclint.DocLint.BadArgs; + public class RunTest { static class SimpleSecurityManager extends SecurityManager { boolean allowExit = false; diff --git a/test/langtools/tools/doclint/tool/StatsTest.java b/test/langtools/tools/doclint/tool/StatsTest.java index e43f71b3fb9..2c19b6714b8 100644 --- a/test/langtools/tools/doclint/tool/StatsTest.java +++ b/test/langtools/tools/doclint/tool/StatsTest.java @@ -3,7 +3,7 @@ * @bug 8006263 * @summary Supplementary test cases needed for doclint * @library .. - * @modules jdk.compiler/com.sun.tools.doclint + * @modules jdk.javadoc/jdk.javadoc.internal.doclint * @build DocLintTester * @run main DocLintTester -ref StatsTest.out -stats -Xmsgs:all StatsTest.java */ diff --git a/test/langtools/tools/javac/lambda/lambdaExpression/LambdaTest6.java b/test/langtools/tools/javac/lambda/lambdaExpression/LambdaTest6.java index 40b232b4f42..c9fe5db6917 100644 --- a/test/langtools/tools/javac/lambda/lambdaExpression/LambdaTest6.java +++ b/test/langtools/tools/javac/lambda/lambdaExpression/LambdaTest6.java @@ -26,11 +26,9 @@ * @bug 8003280 * @summary Add lambda tests * Test bridge methods for certain SAM conversions - * Tests that jdk.internal.lambda.disableEagerInitialization=true creates a - * get$Lambda method for non-capturing lambdas + * Test the set of generated methods * @compile LambdaTest6.java * @run main LambdaTest6 - * @run main/othervm -Djdk.internal.lambda.disableEagerInitialization=true LambdaTest6 */ import java.lang.reflect.Method; diff --git a/test/langtools/tools/javac/lambda/methodReference/BridgeMethod.java b/test/langtools/tools/javac/lambda/methodReference/BridgeMethod.java index ca32d3c7d21..fb5c29ca4ca 100644 --- a/test/langtools/tools/javac/lambda/methodReference/BridgeMethod.java +++ b/test/langtools/tools/javac/lambda/methodReference/BridgeMethod.java @@ -26,15 +26,11 @@ * @bug 8003280 * @summary Add lambda tests * Test bridge methods in certain SAM conversion - * Tests that jdk.internal.lambda.disableEagerInitialization=true creates a - * get$Lambda method for non-capturing lambdas * @compile BridgeMethod.java * @run main BridgeMethod - * @run main/othervm -Djdk.internal.lambda.disableEagerInitialization=true BridgeMethod */ import java.lang.reflect.Method; -import java.util.Arrays; import java.util.HashSet; import java.util.Set; @@ -72,35 +68,19 @@ private static Set<String> setOfStringObject() { return s; } - private static Set<String> allowedMethods() { - Set<String> s = new HashSet<>(); - s.add("m"); - return s; - } - - private static boolean matchingMethodNames(Method[] methods) { - Set<String> methodNames = new HashSet<>(); - for (Method m : methods) { - methodNames.add(m.getName()); - } - return methodNames.equals(allowedMethods()); - } - public static void main(String[] args) { L la = BridgeMethod::bar; //static reference la.m("hi"); Class<? extends L> c1 = la.getClass(); Method[] methods = c1.getDeclaredMethods(); - assertTrue(matchingMethodNames(methods)); Set<String> types = setOfStringObject(); System.out.println("methods in SAM conversion of L:"); for(Method m : methods) { - if (m.getName().equals("m")) { - System.out.println(m.toGenericString()); - Class[] parameterTypes = m.getParameterTypes(); - assertTrue(parameterTypes.length == 1); - assertTrue(types.remove(parameterTypes[0].getName())); - } + assertTrue(m.getName().equals("m")); + System.out.println(m.toGenericString()); + Class[] parameterTypes = m.getParameterTypes(); + assertTrue(parameterTypes.length == 1); + assertTrue(types.remove(parameterTypes[0].getName())); } assertTrue(types.isEmpty() || (types.size() == 1 && types.contains("java.lang.String"))); @@ -108,16 +88,14 @@ public static void main(String[] args) { //km.m("hi"); //will be uncommented when CR7028808 fixed Class<? extends KM> c2 = km.getClass(); methods = c2.getDeclaredMethods(); - assertTrue(matchingMethodNames(methods)); types = setOfStringObject(); System.out.println("methods in SAM conversion of KM:"); for(Method m : methods) { - if (m.getName().equals("m")) { - System.out.println(m.toGenericString()); - Class<?>[] parameterTypes = m.getParameterTypes(); - assertTrue(parameterTypes.length == 1); - assertTrue(types.remove(parameterTypes[0].getName())); - } + assertTrue(m.getName().equals("m")); + System.out.println(m.toGenericString()); + Class<?>[] parameterTypes = m.getParameterTypes(); + assertTrue(parameterTypes.length == 1); + assertTrue(types.remove(parameterTypes[0].getName())); } assertTrue(types.isEmpty()); diff --git a/test/langtools/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestVarHandle.java b/test/langtools/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestVarHandle.java new file mode 100644 index 00000000000..aaf9df950d4 --- /dev/null +++ b/test/langtools/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestVarHandle.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @summary test for VarHandle signature polymorphic methods + * @run testng MethodReferenceTestVarHandle + */ + +import java.lang.invoke.*; +import java.util.*; + +import org.testng.annotations.Test; +import static org.testng.Assert.assertEquals; + +@Test +public class MethodReferenceTestVarHandle { + + interface Setter { + void apply(int[] arr, int idx, int val); + } + + interface Getter { + int apply(int[] arr, int idx); + } + + public void testSet() throws Throwable { + VarHandle vh = MethodHandles.arrayElementVarHandle(int[].class); + + Setter f = vh::set; + + int[] data = {0}; + f.apply(data, 0, 42); + assertEquals(42, data[0]); + } + + public void testGet() throws Throwable { + VarHandle vh = MethodHandles.arrayElementVarHandle(int[].class); + + Getter f = vh::get; + + int[] data = {42}; + int v = f.apply(data, 0); + assertEquals(42, v); + } +} diff --git a/test/langtools/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestVarHandle_neg.java b/test/langtools/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestVarHandle_neg.java new file mode 100644 index 00000000000..96dd4262692 --- /dev/null +++ b/test/langtools/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestVarHandle_neg.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @summary test for VarHandle signature polymorphic methods with wrong return type + * @compile/fail/ref=MethodReferenceTestVarHandle_neg.out -XDrawDiagnostics MethodReferenceTestVarHandle_neg.java + */ + +import java.lang.invoke.*; +import java.util.*; + +public class MethodReferenceTestVarHandle_neg { + + interface Setter { + int apply(int[] arr, int idx, int val); + } + + public static void main(String[] args) { + VarHandle vh = MethodHandles.arrayElementVarHandle(int[].class); + + // Return type of Setter::apply does not match return type of VarHandle::set + Setter f = vh::set; + } +} diff --git a/test/langtools/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestVarHandle_neg.out b/test/langtools/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestVarHandle_neg.out new file mode 100644 index 00000000000..3b57af5e5d7 --- /dev/null +++ b/test/langtools/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestVarHandle_neg.out @@ -0,0 +1,2 @@ +MethodReferenceTestVarHandle_neg.java:43:18: compiler.err.prob.found.req: (compiler.misc.incompatible.ret.type.in.mref: (compiler.misc.inconvertible.types: void, int)) +1 error \ No newline at end of file diff --git a/test/langtools/tools/javac/launcher/SourceLauncherTest.java b/test/langtools/tools/javac/launcher/SourceLauncherTest.java index 3ca75f176d0..76082210850 100644 --- a/test/langtools/tools/javac/launcher/SourceLauncherTest.java +++ b/test/langtools/tools/javac/launcher/SourceLauncherTest.java @@ -423,9 +423,9 @@ public void testSyntaxErr(Path base) throws IOException { @Test public void testNoSourceOnClassPath(Path base) throws IOException { - Path auxSrc = base.resolve("auxSrc"); - tb.writeJavaFiles(auxSrc, - "public class Aux {\n" + + Path extraSrc = base.resolve("extraSrc"); + tb.writeJavaFiles(extraSrc, + "public class Extra {\n" + " static final String MESSAGE = \"Hello World\";\n" + "}\n"); @@ -434,18 +434,18 @@ public void testNoSourceOnClassPath(Path base) throws IOException { "import java.util.Arrays;\n" + "class HelloWorld {\n" + " public static void main(String... args) {\n" + - " System.out.println(Aux.MESSAGE + Arrays.toString(args));\n" + + " System.out.println(Extra.MESSAGE + Arrays.toString(args));\n" + " }\n" + "}"); - List<String> javacArgs = List.of("-classpath", auxSrc.toString()); + List<String> javacArgs = List.of("-classpath", extraSrc.toString()); List<String> classArgs = List.of("1", "2", "3"); String FS = File.separator; String expectStdErr = "testNoSourceOnClassPath" + FS + "mainSrc" + FS + "HelloWorld.java:4: error: cannot find symbol\n" + - " System.out.println(Aux.MESSAGE + Arrays.toString(args));\n" + + " System.out.println(Extra.MESSAGE + Arrays.toString(args));\n" + " ^\n" + - " symbol: variable Aux\n" + + " symbol: variable Extra\n" + " location: class HelloWorld\n" + "1 error\n"; Result r = run(mainSrc.resolve("HelloWorld.java"), javacArgs, classArgs); diff --git a/test/langtools/tools/javac/parser/JavacParserTest.java b/test/langtools/tools/javac/parser/JavacParserTest.java index d50e2eb40da..cb7b8d01382 100644 --- a/test/langtools/tools/javac/parser/JavacParserTest.java +++ b/test/langtools/tools/javac/parser/JavacParserTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 7073631 7159445 7156633 8028235 8065753 8205418 8205913 8228451 8237041 + * @bug 7073631 7159445 7156633 8028235 8065753 8205418 8205913 8228451 8237041 8253584 * @summary tests error and diagnostics positions * @author Jan Lahoda * @modules jdk.compiler/com.sun.tools.javac.api @@ -1564,6 +1564,53 @@ public class B { assertEquals("Unexpected AST, got:\n" + ast, expected, ast); } + @Test //JDK-8253584 + void testElseRecovery() throws IOException { + //verify the errors and AST form produced for member selects which are + //missing the selected member name: + String code = """ + package t; + class Test { + void t() { + if (true) { + s(). + } else { + } + } + String s() { + return null; + } + } + """; + StringWriter out = new StringWriter(); + JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(out, fm, null, List.of("-XDrawDiagnostics"), + null, Arrays.asList(new MyFileObject(code))); + String ast = ct.parse().iterator().next().toString().replaceAll("\\R", "\n"); + String expected = """ + package t; + \n\ + class Test { + \n\ + void t() { + if (true) { + (ERROR); + } else { + } + } + \n\ + String s() { + return null; + } + } """; + assertEquals("Unexpected AST, got:\n" + ast, expected, ast); + assertEquals("Unexpected errors, got:\n" + out.toString(), + out.toString().replaceAll("\\R", "\n"), + """ + Test.java:5:17: compiler.err.expected: token.identifier + Test.java:5:16: compiler.err.not.stmt + """); + } + void run(String[] args) throws Exception { int passed = 0, failed = 0; final Pattern p = (args != null && args.length > 0) diff --git a/test/langtools/tools/javac/records/RecordCompilationTests.java b/test/langtools/tools/javac/records/RecordCompilationTests.java index 55911df1ebd..279ded7443d 100644 --- a/test/langtools/tools/javac/records/RecordCompilationTests.java +++ b/test/langtools/tools/javac/records/RecordCompilationTests.java @@ -26,7 +26,7 @@ /** * RecordCompilationTests * - * @test 8250629 8252307 8247352 + * @test 8250629 8252307 8247352 8241151 * @summary Negative compilation tests, and positive compilation (smoke) tests for records * @library /lib/combo /tools/lib /tools/javac/lib * @modules @@ -145,8 +145,10 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment } } + boolean useAP; + public RecordCompilationTests() { - boolean useAP = System.getProperty("useAP") == null ? false : System.getProperty("useAP").equals("true"); + useAP = System.getProperty("useAP", "false").equals("true"); setDefaultFilename("R.java"); setCompileOptions(useAP ? PREVIEW_OPTIONS_WITH_AP : PREVIEW_OPTIONS); System.out.println(useAP ? "running all tests using an annotation processor" : "running all tests without annotation processor"); @@ -1664,4 +1666,20 @@ record R<T>(T t[]) {} """ ); } + + public void testNoWarningForSerializableRecords() { + if (!useAP) { + /* dont execute this test when the default annotation processor is on as it will fail due to + * spurious warnings + */ + appendCompileOptions("-Werror", "-Xlint:serial"); + assertOK( + """ + import java.io.*; + record R() implements java.io.Serializable {} + """ + ); + removeLastCompileOptions(2); + } + } } diff --git a/test/langtools/tools/lib/toolbox/ToolBox.java b/test/langtools/tools/lib/toolbox/ToolBox.java index cfcd1472d4b..af02161bbbc 100644 --- a/test/langtools/tools/lib/toolbox/ToolBox.java +++ b/test/langtools/tools/lib/toolbox/ToolBox.java @@ -676,12 +676,15 @@ static String getJavaFileNameFromSource(String source) { return "module-info.java"; matcher = packagePattern.matcher(source); - if (matcher.find()) + if (matcher.find()) { packageName = matcher.group(1).replace(".", "/"); + validateName(packageName); + } matcher = classPattern.matcher(source); if (matcher.find()) { String className = matcher.group(1) + ".java"; + validateName(className); return (packageName == null) ? className : packageName + "/" + className; } else if (packageName != null) { return packageName + "/package-info.java"; @@ -706,6 +709,24 @@ public static String getJavaFileNameFromSource(String source) { return JavaSource.getJavaFileNameFromSource(source); } + private static final Set<String> RESERVED_NAMES = Set.of( + "con", "prn", "aux", "nul", + "com1", "com2", "com3", "com4", "com5", "com6", "com7", "com8", "com9", + "lpt1", "lpt2", "lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9" + ); + + /**Validate if a given name is a valid file name + * or path name on known platforms. + */ + public static void validateName(String name) { + for (String part : name.split("\\.|/|\\\\")) { + if (RESERVED_NAMES.contains(part.toLowerCase(Locale.US))) { + throw new IllegalArgumentException("Name: " + name + " is" + + "a reserved name on Windows, " + + "and will not work!"); + } + } + } /** * A memory file manager, for saving generated files in memory. * The file manager delegates to a separate file manager for listing and diff --git a/test/lib-test/ProblemList.txt b/test/lib-test/ProblemList.txt index 3d3ff27ad2f..8732bf87f2c 100644 --- a/test/lib-test/ProblemList.txt +++ b/test/lib-test/ProblemList.txt @@ -38,3 +38,5 @@ # ############################################################################# + +jdk/test/lib/hexdump/ASN1FormatterTest.java 8253876 generic-all diff --git a/test/lib-test/jdk/test/lib/RandomGeneratorTest.java b/test/lib-test/jdk/test/lib/RandomGeneratorTest.java index e05a1635015..ce57ebfe65f 100644 --- a/test/lib-test/jdk/test/lib/RandomGeneratorTest.java +++ b/test/lib-test/jdk/test/lib/RandomGeneratorTest.java @@ -46,9 +46,10 @@ /** * The test verifies correctness of work {@link jdk.test.lib.Utils#getRandomInstance()}. * Test works in three modes: same seed provided, no seed provided and - * different seed provided. In the first case the test expects that all random numbers - * will be repeated in all next iterations. For other two modes test expects that - * randomly generated numbers differ from original. + * different seed provided. + * In the first case, the test expects that all random numbers will be repeated in all next iterations. + * In the second case, the numbers are expected to be the same for promotable builds and different for other builds. + * In the last case, the test expects the randomly generated numbers differ from original. */ public class RandomGeneratorTest { private static final String SEED_VM_OPTION = "-D" + Utils.SEED_PROPERTY_NAME + "="; @@ -102,12 +103,22 @@ public void verify(String orig, String[] cmdLine) { cmdLine[0] = getSeedOption(); super.verify(orig, cmdLine); } + + @Override + protected boolean isOutputExpected(String orig, String output) { + return !output.equals(orig); + } }, NO_SEED { @Override public String getSeedOption() { return null; } + + @Override + protected boolean isOutputExpected(String orig, String output) { + return Runtime.version().build().orElse(0) > 0 ^ !output.equals(orig); + } }; /** @@ -118,9 +129,7 @@ public String getSeedOption() { */ public abstract String getSeedOption(); - protected boolean isOutputExpected(String orig, String output) { - return !output.equals(orig); - } + protected abstract boolean isOutputExpected(String orig, String output); /** * Verifies that the original output meets expectations diff --git a/test/lib-test/jdk/test/lib/hexdump/ASN1FormatterTest.java b/test/lib-test/jdk/test/lib/hexdump/ASN1FormatterTest.java new file mode 100644 index 00000000000..8993f6f54f0 --- /dev/null +++ b/test/lib-test/jdk/test/lib/hexdump/ASN1FormatterTest.java @@ -0,0 +1,129 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.test.lib.hexdump; + +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.io.DataInputStream; +import java.io.EOFException; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Base64; + +import static org.testng.Assert.*; + +/* + * @test + * @summary ASN.1 formatting + * @library /test/lib + * @compile ASN1FormatterTest.java + * @run testng jdk.test.lib.hexdump.ASN1FormatterTest + */ +@Test +public class ASN1FormatterTest { + private static final String DIR = System.getProperty("test.src", "."); + + @Test + static void testPEM() throws IOException { + String certFile = "openssl.p12.pem"; + Path certPath = Path.of(DIR, certFile); + System.out.println("certPath: " + certPath); + + try (InputStream certStream = Files.newInputStream(certPath)) { + while (certStream.read() != '\n') { + // Skip first line "-----BEGIN CERTIFICATE-----" + } + // Mime decoder for Certificate + InputStream wis = Base64.getMimeDecoder().wrap(certStream); + DataInputStream is = new DataInputStream(wis); + String result = ASN1Formatter.formatter().annotate(is); + System.out.println(result); + + Assert.assertEquals(result.lines().count(), 76, "Lines"); + Assert.assertEquals(result.lines().filter(s -> s.contains("SEQUENCE")).count(),24, "Sequences"); + Assert.assertEquals(result.lines().filter(s -> s.contains("OBJECT ID")).count(), 17, "ObjectIDs"); + Assert.assertEquals(result.lines().filter(s -> s.contains("UTCTIME")).count(), 2, "UTCTIME"); + Assert.assertEquals(result.lines().filter(s -> s.contains("BIT STRING")).count(), 3, "BitStrings"); + } catch (EOFException eof) { + // done + } + } + + @Test + static void dumpPEM() throws IOException { + String file = "openssl.p12.pem"; + Path path = Path.of(DIR, file); + System.out.println("path: " + path); + + try (InputStream certStream = Files.newInputStream(path)) { + while (certStream.read() != '\n') { + // Skip first line "-----BEGIN CERTIFICATE-----" + } + // Mime decoder for Certificate + InputStream wis = Base64.getMimeDecoder().wrap(certStream); + + HexPrinter p = HexPrinter.simple() + .formatter(ASN1Formatter.formatter(), "; ", 100); + String result = p.toString(wis); + System.out.println(result); + + Assert.assertEquals(result.lines().count(), 126, "Lines"); + Assert.assertEquals(result.lines().filter(s -> s.contains("SEQUENCE")).count(), 24, "Sequences"); + Assert.assertEquals(result.lines().filter(s -> s.contains("OBJECT ID")).count(), 17, "ObjectIDs"); + Assert.assertEquals(result.lines().filter(s -> s.contains("UTCTIME")).count(), 2, "UTCTIME"); + Assert.assertEquals(result.lines().filter(s -> s.contains("BIT STRING")).count(), 3, "BitStrings"); + } catch (EOFException eof) { + // done + } + } + + @Test + static void testIndefinate() { + byte[] bytes = {0x24, (byte) 0x80, 4, 2, 'a', 'b', 4, 2, 'c', 'd', 0, 0}; + HexPrinter p = HexPrinter.simple() + .formatter(ASN1Formatter.formatter(), "; ", 100); + String result = p.toString(bytes); + System.out.println(result); + + Assert.assertEquals(result.lines().filter(s -> s.contains("OCTET STRING [INDEFINITE]")).count(), + 1, "Indefinite length"); + Assert.assertEquals(result.lines().filter(s -> s.contains("; OCTET STRING [2]")).count(), + 2, "Octet Sequences"); + Assert.assertEquals(result.lines().filter(s -> s.contains("; END-OF-CONTENT")).count(), + 1, "end of content"); + } + + @Test + static void testMain() { + String file = "openssl.p12.pem"; + Path path = Path.of(DIR, file); + String[] args = { path.toString() }; + System.out.println("path: " + path); + ASN1Formatter.main(args); + } + +} diff --git a/test/lib-test/jdk/test/lib/hexdump/HexPrinterTest.java b/test/lib-test/jdk/test/lib/hexdump/HexPrinterTest.java index 3cf4b760719..2351a85beda 100644 --- a/test/lib-test/jdk/test/lib/hexdump/HexPrinterTest.java +++ b/test/lib-test/jdk/test/lib/hexdump/HexPrinterTest.java @@ -78,7 +78,7 @@ Object[][] builtinParams() { return new Object[][]{ {"minimal", "", "%02x", 16, "", 64, HexPrinter.Formatters.NONE, ""}, {"canonical", "%08x ", "%02x ", 16, "|", 31, HexPrinter.Formatters.PRINTABLE, "|" + System.lineSeparator()}, - {"simple", "%5d: ", "%02x ", 16, " // ", 64, HexPrinter.Formatters.ASCII, System.lineSeparator()}, + {"simple", "%04x: ", "%02x ", 16, " // ", 64, HexPrinter.Formatters.ASCII, System.lineSeparator()}, {"source", " ", "(byte)%3d, ", 8, " // ", 64, HexPrinter.Formatters.PRINTABLE, System.lineSeparator()}, }; } diff --git a/test/lib-test/jdk/test/lib/hexdump/openssl.p12.pem b/test/lib-test/jdk/test/lib/hexdump/openssl.p12.pem new file mode 100644 index 00000000000..0243a379e38 --- /dev/null +++ b/test/lib-test/jdk/test/lib/hexdump/openssl.p12.pem @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDjjCCAnagAwIBAgIBAzANBgkqhkiG9w0BAQsFADBMMQswCQYDVQQGEwJJTjEL +MAkGA1UECAwCS0ExDzANBgNVBAoMBk9yYWNsZTENMAsGA1UECwwESmF2YTEQMA4G +A1UEAwwHQ2xpZW50MTAeFw0xNTA1MjYyMjE3MThaFw0yNTA1MjMyMjE3MThaMEwx +CzAJBgNVBAYTAklOMQswCQYDVQQIDAJLQTEPMA0GA1UECgwGT3JhY2xlMQ0wCwYD +VQQLDARKYXZhMRAwDgYDVQQDDAdDbGllbnQyMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEA2HADVMaKPd7xAYK0BTsCcQzglk8H2qp0Sg5nDYgb7KqB/1cb +RyMB3g3FG4Isv6L0Lp2GLAeHVn35YljHNrcBUU5fG/+DNJPNiM+srevblMeksOcA +frPnxmog+GMgiO97O2/3Xtgl0ailsOHidPH9hBXr+WikNu7ITPXkJiYi0d1n8p2N +e/p4W4cBitxIUlZm2OTSW4d3EDW86saf657kSpTlb2zBT/r9fjWluHlTg+jGnGIz +UdpYP7sSnye8oym5PxT2IMPU6vRgF9Gzwg+6bPaZnrYNURifGJIuQH+/wDaqA+Ix +g2Q2Ij8SiDhkNrCoeLf77Aot9d5ZPtledJPSRQIDAQABo3sweTAJBgNVHRMEAjAA +MCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAd +BgNVHQ4EFgQUhxNmvHpNjpjnl/vMVkEnyF5Msk0wHwYDVR0jBBgwFoAUHyFP2xAx +0GeDCQPTzfxG7M8di7QwDQYJKoZIhvcNAQELBQADggEBAD4rXzKq8PdSK7rzuwfu +q+RzeYZnNM7OsoBGhMfHQKnnI3LH5bgyttuCoV665X2mgy6+LZcrXqom/ZrLXQ6x +JVtGxNHr7rqbnC/9tB2/s9HHN3YiRs966shWHGkhCubsUGre7Z25Pq55K6Pyl+nU +hb+K8aQ54z4oDt+raAdbuILq91fUjw5j1qex3d62fHvf4IO3spcKY4HhnwBPifg2 +YZCiZRZOoVysi2FTdsvW2NfQCYgtUftbkfNrKglkRuIa9rQEduhDy1cwn4fc9S1f +6WTvuJNoIp3o1nQppFjfO7fzfIDCrlaEkkXU7O54KQ5HTKu62tZp9xKW71oolOnZ +bZQ= +-----END CERTIFICATE----- diff --git a/test/lib-test/sun/hotspot/whitebox/CPUInfoTest.java b/test/lib-test/sun/hotspot/whitebox/CPUInfoTest.java index c0a92054c6a..fbc53faf907 100644 --- a/test/lib-test/sun/hotspot/whitebox/CPUInfoTest.java +++ b/test/lib-test/sun/hotspot/whitebox/CPUInfoTest.java @@ -47,12 +47,25 @@ public class CPUInfoTest { static { if (Platform.isX86() || Platform.isX64()) { + // @formatter:off + // Checkstyle: stop + // See hotspot/cpu/x86/vm_version_x86.hpp for the list of supported features. wellKnownCPUFeatures = Set.of( - "adx", "aes", "bmi1", "bmi2", "cmov", "cx8", "fxsr", "mmx", "clmul", "clflush", "clflushopt", "clwb", - "sha", "fma", "popcnt", "vzeroupper", "erms", "rtm", "mmxext", "3dnowpref", "lzcnt", "ht", - "tsc", "tscinvbit", "tscinv", "sse", "sse2", "sse3", "ssse3", "sse4.1", "sse4.2", "sse4a", "avx", "avx2", - "avx512f", "avx512dq", "avx512pf", "avx512er", "avx512cd", "avx512bw", "avx512vl", - "avx512_vpopcntdq", "avx512_vpclmulqdq", "avx512_vbmi2", "avx512_vaes", "avx512_vnni"); + "cx8", "cmov", "fxsr", "ht", + "mmx", "3dnowpref", "sse", "sse2", + "sse3", "ssse3", "sse4a", "sse4.1", + "sse4.2", "popcnt", "lzcnt", "tsc", + "tscinvbit", "tscinv", "avx", "avx2", + "aes", "erms", "clmul", "bmi1", + "bmi2", "rtm", "adx", "avx512f", + "avx512dq", "avx512pf", "avx512er", "avx512cd", + "avx512bw", "avx512vl", "sha", "fma", + "vzeroupper", "avx512_vpopcntdq", "avx512_vpclmulqdq", "avx512_vaes", + "avx512_vnni", "clflush", "clflushopt", "clwb", + "avx512_vmbi2", "avx512_vmbi", "hv" + ); + // @formatter:on + // Checkstyle: resume } else { wellKnownCPUFeatures = null; } diff --git a/test/lib/jdk/test/lib/Utils.java b/test/lib/jdk/test/lib/Utils.java index 11b8a137900..a77141105be 100644 --- a/test/lib/jdk/test/lib/Utils.java +++ b/test/lib/jdk/test/lib/Utils.java @@ -25,8 +25,6 @@ import java.io.File; import java.io.IOException; -import java.lang.annotation.Annotation; -import java.lang.reflect.Method; import java.net.Inet6Address; import java.net.InetAddress; import java.net.InetSocketAddress; @@ -35,11 +33,15 @@ import java.net.URL; import java.net.URLClassLoader; import java.net.UnknownHostException; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.attribute.FileAttribute; import java.nio.channels.SocketChannel; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -127,9 +129,8 @@ public final class Utils { */ public static final String SEED_PROPERTY_NAME = "jdk.test.lib.random.seed"; - /* (non-javadoc) - * Random generator with (or without) predefined seed. Depends on - * "jdk.test.lib.random.seed" property value. + /** + * Random generator with predefined seed. */ private static volatile Random RANDOM_GENERATOR; @@ -141,7 +142,32 @@ public final class Utils { /** * Contains the seed value used for {@link java.util.Random} creation. */ - public static final long SEED = Long.getLong(SEED_PROPERTY_NAME, new Random().nextLong()); + public static final long SEED; + static { + var seed = Long.getLong(SEED_PROPERTY_NAME); + if (seed != null) { + // use explicitly set seed + SEED = seed; + } else { + var v = Runtime.version(); + // promotable builds have build number, and it's greater than 0 + if (v.build().orElse(0) > 0) { + // promotable build -> use 1st 8 bytes of md5($version) + try { + var md = MessageDigest.getInstance("MD5"); + var bytes = v.toString() + .getBytes(StandardCharsets.UTF_8); + bytes = md.digest(bytes); + SEED = ByteBuffer.wrap(bytes).getLong(); + } catch (NoSuchAlgorithmException e) { + throw new Error(e); + } + } else { + // "personal" build -> use random seed + SEED = new Random().nextLong(); + } + } + } /** * Returns the value of 'test.timeout.factor' system property * converted to {@code double}. @@ -531,9 +557,13 @@ public static byte[] toByteArray(String hex) { /** * Returns {@link java.util.Random} generator initialized with particular seed. - * The seed could be provided via system property {@link Utils#SEED_PROPERTY_NAME} - * In case no seed is provided, the method uses a random number. + * The seed could be provided via system property {@link Utils#SEED_PROPERTY_NAME}. + * In case no seed is provided and the build under test is "promotable" + * (its build number ({@code $BUILD} in {@link Runtime.Version}) is greater than 0, + * the seed based on string representation of {@link Runtime#version()} is used. + * Otherwise, the seed is randomly generated. * The used seed printed to stdout. + * * @return {@link java.util.Random} generator with particular seed. */ public static Random getRandomInstance() { @@ -823,17 +853,6 @@ public static OutputAnalyzer uname(String... args) throws Throwable { return ProcessTools.executeCommand(cmds); } - /* - * Returns the system distro. - */ - public static String distro() { - try { - return uname("-v").asLines().get(0); - } catch (Throwable t) { - throw new RuntimeException("Failed to determine distro.", t); - } - } - /** * Creates an empty file in "user.dir" if the property set. * <p> diff --git a/test/lib/jdk/test/lib/apps/LingeredApp.java b/test/lib/jdk/test/lib/apps/LingeredApp.java index 68381053aa9..8c9cce0bd97 100644 --- a/test/lib/jdk/test/lib/apps/LingeredApp.java +++ b/test/lib/jdk/test/lib/apps/LingeredApp.java @@ -92,7 +92,7 @@ public class LingeredApp { protected Process appProcess; protected OutputBuffer output; protected static final int appWaitTime = 100; - protected static final int appCoreWaitTime = 240; + protected static final int appCoreWaitTime = 480; protected final String lockFileName; protected boolean forceCrash = false; // set true to force a crash and core file diff --git a/test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV1.java b/test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV1.java index 0c16b07449f..6239a6de769 100644 --- a/test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV1.java +++ b/test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV1.java @@ -293,29 +293,33 @@ public void testMemorySubsystem() { } // Memory and Swap - oldVal = metrics.getMemoryAndSwapFailCount(); - newVal = getLongValueFromFile(Controller.MEMORY, "memory.memsw.failcnt"); - if (!CgroupMetricsTester.compareWithErrorMargin(oldVal, newVal)) { - fail(Controller.MEMORY, "memory.memsw.failcnt", oldVal, newVal); - } - oldVal = metrics.getMemoryAndSwapLimit(); - newVal = getLongValueFromFile(Controller.MEMORY, "memory.memsw.limit_in_bytes"); - newVal = newVal > unlimited_minimum ? CgroupSubsystem.LONG_RETVAL_UNLIMITED : newVal; - if (!CgroupMetricsTester.compareWithErrorMargin(oldVal, newVal)) { - fail(Controller.MEMORY, "memory.memsw.limit_in_bytes", oldVal, newVal); - } + // Skip swap tests if no swap is configured. + if (metrics.getMemoryAndSwapLimit() > metrics.getMemoryLimit()) { + oldVal = metrics.getMemoryAndSwapFailCount(); + newVal = getLongValueFromFile(Controller.MEMORY, "memory.memsw.failcnt"); + if (!CgroupMetricsTester.compareWithErrorMargin(oldVal, newVal)) { + fail(Controller.MEMORY, "memory.memsw.failcnt", oldVal, newVal); + } - oldVal = metrics.getMemoryAndSwapMaxUsage(); - newVal = getLongValueFromFile(Controller.MEMORY, "memory.memsw.max_usage_in_bytes"); - if (!CgroupMetricsTester.compareWithErrorMargin(oldVal, newVal)) { - fail(Controller.MEMORY, "memory.memsw.max_usage_in_bytes", oldVal, newVal); - } + oldVal = metrics.getMemoryAndSwapLimit(); + newVal = getLongValueFromFile(Controller.MEMORY, "memory.memsw.limit_in_bytes"); + newVal = newVal > unlimited_minimum ? CgroupSubsystem.LONG_RETVAL_UNLIMITED : newVal; + if (!CgroupMetricsTester.compareWithErrorMargin(oldVal, newVal)) { + fail(Controller.MEMORY, "memory.memsw.limit_in_bytes", oldVal, newVal); + } - oldVal = metrics.getMemoryAndSwapUsage(); - newVal = getLongValueFromFile(Controller.MEMORY, "memory.memsw.usage_in_bytes"); - if (!CgroupMetricsTester.compareWithErrorMargin(oldVal, newVal)) { - fail(Controller.MEMORY, "memory.memsw.usage_in_bytes", oldVal, newVal); + oldVal = metrics.getMemoryAndSwapMaxUsage(); + newVal = getLongValueFromFile(Controller.MEMORY, "memory.memsw.max_usage_in_bytes"); + if (!CgroupMetricsTester.compareWithErrorMargin(oldVal, newVal)) { + fail(Controller.MEMORY, "memory.memsw.max_usage_in_bytes", oldVal, newVal); + } + + oldVal = metrics.getMemoryAndSwapUsage(); + newVal = getLongValueFromFile(Controller.MEMORY, "memory.memsw.usage_in_bytes"); + if (!CgroupMetricsTester.compareWithErrorMargin(oldVal, newVal)) { + fail(Controller.MEMORY, "memory.memsw.usage_in_bytes", oldVal, newVal); + } } oldVal = metrics.getMemorySoftLimit(); diff --git a/test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV2.java b/test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV2.java index e67ead0ef41..ec2970a7af5 100644 --- a/test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV2.java +++ b/test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV2.java @@ -240,21 +240,30 @@ public void testMemorySubsystem() { } oldVal = metrics.getMemoryAndSwapLimit(); - newVal = getLongLimitValueFromFile("memory.swap.max"); + long valSwap = getLongLimitValueFromFile("memory.swap.max"); + long valMemory = getLongLimitValueFromFile("memory.max"); + if (valSwap == UNLIMITED) { + newVal = valSwap; + } else { + assert valMemory >= 0; + newVal = valSwap + valMemory; + } if (!CgroupMetricsTester.compareWithErrorMargin(oldVal, newVal)) { fail("memory.swap.max", oldVal, newVal); } oldVal = metrics.getMemoryAndSwapUsage(); - newVal = getLongValueFromFile("memory.swap.current"); + long swapUsage = getLongValueFromFile("memory.swap.current"); + long memUsage = getLongValueFromFile("memory.current"); + newVal = swapUsage + memUsage; if (!CgroupMetricsTester.compareWithErrorMargin(oldVal, newVal)) { fail("memory.swap.current", oldVal, newVal); } oldVal = metrics.getMemorySoftLimit(); - newVal = getLongLimitValueFromFile("memory.high"); + newVal = getLongLimitValueFromFile("memory.low"); if (!CgroupMetricsTester.compareWithErrorMargin(oldVal, newVal)) { - fail("memory.high", oldVal, newVal); + fail("memory.low", oldVal, newVal); } } diff --git a/test/lib/jdk/test/lib/hexdump/ASN1Formatter.java b/test/lib/jdk/test/lib/hexdump/ASN1Formatter.java new file mode 100644 index 00000000000..3a3fff6bb84 --- /dev/null +++ b/test/lib/jdk/test/lib/hexdump/ASN1Formatter.java @@ -0,0 +1,627 @@ +/* + * Copyright (c) 2019, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package jdk.test.lib.hexdump; + +import java.io.BufferedInputStream; +import java.io.DataInputStream; +import java.io.EOFException; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.math.BigInteger; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Base64; + +/** + * ASN.1 stream formatter; a debugging utility for visualizing the contents of an ASN.1 stream. + * The ANS1Formatter can be used standalone by calling the {@link #annotate(DataInputStream)} + * or {@link #annotate(DataInputStream, Appendable)} methods. + * The ASN1Formatter implements the Formatter interface so it can be used + * with the {@code HexPrinter} as a formatter to display the ASN.1 tagged values + * with the corresponding bytes. + * <p> + * The formatter reads a single tag from the stream and prints a description + * of the tag and its contents. If the tag is a constructed tag, set or sequence, + * each of the contained tags is read and printed. + * Generally, each tagged value is printed on a separate line. For constructed and application + * tags the nested tagged values are indented. + * There are few consistency checks and an improperly encoded stream may produce + * unpredictable output. + * <p> + * For example, to show the contents of a stream from a file. + * <pre>{@code + * Path path = Path.of(DIR, "xxx.pem"); + * try (InputStream certStream = Files.newInputStream(path)) { + * while (certStream.read() != '\n') { + * // Skip first line "-----BEGIN CERTIFICATE-----" + * } + * // Mime decoder for Certificate + * InputStream wis = Base64.getMimeDecoder().wrap(certStream); + * DataInputStream dis = new DataInputStream(wis); + * String result = ASN1Formatter.formatter().annotate(dis); + * System.out.println(result); + * } catch (EOFException eof) { + * // done + * } + * }</pre> + * When used as the formatter with {@code jdk.test.lib.hexdump.HexPrinter}, + * the formatted ASN.1 stream is displayed with the corresponding hex dump + * of the stream contents. + * <pre>{@code + * Path path = Path.of(DIR, "xxx.pem"); + * try (InputStream certStream = Files.newInputStream(path)) { + * while (certStream.read() != '\n') { + * // Skip first line "-----BEGIN CERTIFICATE-----" + * } + * // Mime decoder for Certificate + * InputStream wis = Base64.getMimeDecoder().wrap(certStream); + * + * HexPrinter p = HexPrinter.simple() + * .formatter(ASN1Formatter.formatter(), "; ", 100); + * String result = p.toString(wis); + * System.out.println(result); + * } catch (EOFException eof) { + * // done + * } + * }</pre> + */ +public class ASN1Formatter implements HexPrinter.Formatter { + + /** + * Returns an ASN1Formatter. + * @return an ASN1Formatter + */ + public static ASN1Formatter formatter() { + return new ASN1Formatter(); + } + + /** + * Create a ANS1Formatter. + */ + private ASN1Formatter() { + } + + /** + * Read bytes from the stream and annotate the stream as an ASN.1 stream. + * A single well formed tagged-value is read and annotated. + * + * @param in a DataInputStream + * @throws IOException if an I/O error occurs + */ + public String annotate(DataInputStream in) throws IOException { + StringBuilder sb = new StringBuilder(); + try { + this.annotate(in, sb); + } finally { + return sb.toString(); + } + } + + /** + * Read bytes from the stream and annotate the stream as a ASN.1. + * A single well formed tagged-value is read and annotated. + * + * @param in a DataInputStream + * @param out an Appendable for the output + * @throws IOException if an I/O error occurs + */ + public void annotate(DataInputStream in, Appendable out) throws IOException { + annotate(in, out, -1, ""); + } + + /** + * Read bytes from the stream and annotate the stream as ASN.1. + * + * @param in a DataInputStream + * @param out an Appendable for the output + * @param available the number of bytes to read from the stream (if greater than zero) + * @param prefix a string to prefix each line of output, used for indentation + * @throws IOException if an I/O error occurs + */ + private int annotate(DataInputStream in, Appendable out, int available, String prefix) throws IOException { + int origAvailable = available; + while (available != 0 || origAvailable < 0) { + // Read the tag + int tag = in.readByte() & 0xff; + available--; + if (tagType(tag) == 0x1f) { + // Multi-byte tag + tag = 0; + int tagbits; + do { + tagbits = in.readByte(); + available--; + tag = (tag << 7) | (tagbits & 0x7f); + } while ((tagbits & 0x80) == 0x80); + } + // Decode the length + int len = in.readByte() & 0xff; + available--; + if (len > 0x80) { + // multi-byte encoded length + int nbytes = len & 0x7f; + if (nbytes > 4) { + out.append("***** Tag: " + tagName(tag) + + ", Range of length error: " + len + " bytes" + System.lineSeparator()); + return available; // return the unread length + } + len = 0; + for (; nbytes > 0; nbytes--) { + int inc = in.readByte() & 0xff; + len = (len << 8) | inc; + available -= 1; + } + } else if (len == 0x80) { + // Tag with Indefinite-length; flag the length as unknown + len = -1; + } else if (available < 0 && origAvailable < 0) { + // started out unknown; set available to the length of this tagged value + available = len; + } + out.append(prefix); // start with indent + switch (tag) { + case TAG_EndOfContent: // End-of-contents octets; len == 0 + out.append("END-OF-CONTENT " + System.lineSeparator()); + // end of indefinite-length constructed, return any remaining + return 0; // unknown, but nothing left + case TAG_Integer: + case TAG_Enumerated: + switch (len) { + case 1: + out.append(String.format("BYTE %d. ", in.readByte())); + available -= 1; + break; + case 2: + out.append(String.format("SHORT %d. ", in.readShort())); + available -= 2; + break; + case 4: + out.append(String.format("INTEGER %d. ", in.readInt())); + available -= 4; + break; + case 8: + out.append(String.format("LONG %d. ", in.readLong())); + available -= 8; + break; + default: + byte[] bytes = new byte[len]; + int l = in.read(bytes); + BigInteger big = new BigInteger(bytes); + out.append("BIG INTEGER [" + len + "] "); + out.append(big.toString()); + out.append("."); + available -= len; + break; + } + break; + case TAG_ObjectId: + byte[] oid = new byte[len]; + int l1 = in.read(oid); + available -= l1; + String s = oidName(oid); + out.append(tagName(tag) + " [" + len + "] "); + out.append(s); + out.append(' '); + break; + + case TAG_OctetString: + case TAG_UtcTime: + case TAG_GeneralizedTime: + out.append(tagName(tag) + " [" + len + "] "); + // fall through + case TAG_PrintableString: + case TAG_IA5String: + case TAG_GeneralString: { + // Check if the contents are too long or not printable + byte[] buf = new byte[Math.min(32, len)]; + int l = in.read(buf, 0, buf.length); + if (countPrintable(buf, l) > l / 2) { + // If more than 1/2 are printable, show the string + out.append("'"); + for (int i = 0; i < l; i++) { + char c = toASNPrintable((char) buf[i]); + out.append((c > 0) ? c : '.'); + } + out.append("'"); + if (l < len) { + out.append("..."); // identify the truncation + } + out.append(' '); + } else { + out.append("<Unprintable> "); + } + // Skip the rest + while (l < len) { + l += (int)in.skip(len - l); + } + available -= len; + break; + } + case TAG_Null: + out.append("NULL "); + break; + case TAG_Boolean: + int b = in.readByte(); + available--; + out.append((b == 0) ? "FALSE " : "TRUE "); + break; + case TAG_UTF8String: + out.append(getString(in, len, StandardCharsets.UTF_8)); + out.append(' '); + available -= len; + break; + case TAG_T61String: + out.append(getString(in, len, StandardCharsets.ISO_8859_1)); + out.append(' '); + available -= len; + break; + case TAG_UniversalString: + case TAG_BMPString: + out.append(getString(in, len, StandardCharsets.UTF_16BE)); + out.append(' '); + available -= len; + break; + case TAG_BitString: + out.append(String.format("%s [%d]", tagName(tag), len)); + do { + var skipped = in.skip(len); + len -= skipped; + available -= skipped; + } while (len > 0); + break; + default: { + if (tag == TAG_Sequence || + tag == TAG_Set || + isApplication(tag) || + isConstructed(tag)) { + String lenStr = (len < 0) ? "INDEFINITE" : Integer.toString(len); + // Handle nesting + if (isApplication(tag)) { + out.append(String.format("APPLICATION %d. [%s] {%n", tagType(tag), lenStr)); + } else { + out.append(String.format("%s [%s]%n", tagName(tag), lenStr)); + } + int remaining = annotate(in, out, len, prefix + " "); + if (len > 0) { + available -= len - remaining; + } + continue; + } else { + // Any other tag not already handled, dump the bytes + out.append(String.format("%s[%d]: ", tagName(tag), len)); + formatBytes(in, out, len); + available -= len; + break; + } + } + } + out.append(System.lineSeparator()); // End with EOL + } + return available; + } + + /** + * Reads bytes from the stream and annotates them as hexadecimal. + * @param in an inputStream + * @param out the Appendable for the formatted bytes + * @param len the number of bytes to read + * @throws IOException if an I/O error occurs + */ + private void formatBytes(DataInputStream in, Appendable out, int len) throws IOException { + int b = in.readByte() & 0xff; + out.append(String.format("%02x", b)); + for (int i = 1; i < len; i++) { + b = in.readByte() & 0xff; + out.append(String.format(",%02x", b)); + } + } + + /** + * Returns a string read from the stream converted to the Charset. + * @param in an inputStream + * @param len the number of bytes to read + * @param charset the Charset + * @return a string read from the stream converted to the Charset. + * @throws IOException if an I/O error occurs + */ + private String getString(DataInputStream in, int len, Charset charset) throws IOException { + byte[] bytes = new byte[len]; + int l = in.read(bytes); + return new String(bytes, charset); + } + + /** + * Returns the tagname based on the tag value. + * @param tag the tag value + * @return a String representation of the tag. + */ + private String tagName(int tag) { + String tagString = (isConstructed(tag) ? "CONSTRUCTED " : "") + tagNames[tagType(tag)]; + switch (tag & 0xc0) { + case TAG_APPLICATION: + return "APPLICATION " + tagString; + case TAG_PRIVATE: + return "PRIVATE " + tagString; + case TAG_CONTEXT: + return tagString; + case TAG_UNIVERSAL: + if (tag > 0 && tag < tagNames.length) + return tagNames[tag]; + if (tag == TAG_Set) + return "SET"; + if (tag == TAG_Sequence) + return "SEQUENCE"; + return "UNIVERSAL " + tagString; + default: + return "TAG__" + (tag & 0xc0); + } + } + + /** + * Returns the string representation of the OID extracted from the bytes. + * The numeric OID is looked up in the internal sun.security.util.KnownOIDs class. + * If a name is found it is added to the returned string. + * @param bytes bytes holding the OID + * @return a string representing OID or the numeric OID + */ + private static String oidName(byte[] bytes) { + StringBuilder sb = new StringBuilder(bytes.length * 4); + int first = bytes[0] / 40; + int second = bytes[0] % 40; + sb.append(first).append('.').append(second); + int valn = 0; + for (int i = 1; i < bytes.length; i++) { + valn = valn * 128 + (bytes[i] & 0x7f); + if ((bytes[i] & 0x80) == 0) { + sb.append('.'); + sb.append(valn); + valn = 0; + } + } + String noid = sb.toString(); + try { + // Look up the OID; if the class is not accessible just return the numeric form + Class<?> cl = Class.forName("sun.security.util.KnownOIDs"); + Method findMatch = cl.getDeclaredMethod("findMatch", String.class); + findMatch.setAccessible(true); + Object oid = findMatch.invoke(null, noid); + return (oid == null) ? noid : noid + " (" + oid.toString() + ")"; + } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { + return noid; + } + } + + /** + * Returns a printable character or zero for unprintable. + * @param ch a character + * @return a printable character or zero for unprintable + */ + private static char toASNPrintable(char ch) { + if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || + (ch >= '0' && ch <= '9')) { + return ch; + } else { + switch (ch) { + case ' ': /* space */ + case '\'': /* apostrophe */ + case '(': /* left paren */ + case ')': /* right paren */ + case '+': /* plus */ + case ',': /* comma */ + case '-': /* hyphen */ + case '.': /* period */ + case '/': /* slash */ + case ':': /* colon */ + case '=': /* equals */ + case '?': /* question mark */ + return ch; + default: + return 0; + } + } + } + + /** + * Returns the number of printable characters in the buffer range. + * @param bytes a byte array + * @param len the length of the bytes to check + * @return the count of printable bytes + */ + private static int countPrintable(byte[] bytes, int len) { + int count = 0; + for (int i = 0; i < len; i++) { + count += (toASNPrintable((char)bytes[i]) > 0) ? 1 : 0; + } + return count; + } + + /** The tag class types */ + private static final int TAG_UNIVERSAL = 0x00; + private static final int TAG_APPLICATION = 0x40; + private static final int TAG_CONTEXT = 0x80; + private static final int TAG_PRIVATE = 0xc0; + + /* + * The type starts at the first byte of the encoding, and + * is one of these TAG_* values. That may be all the type + * data that is needed. + */ + + /* + * These tags are the "universal" tags ... they mean the same + * in all contexts. (Mask with 0x1f -- five bits.) + */ + + private int tagType(int tag) { + return tag & TAG_MASK; + } + + private static final byte TAG_MASK = 0x1f; + + /** Tag value indicating an ASN.1 "EndOfContent" value. */ + private static final byte TAG_EndOfContent = 0x0; + + /** Tag value indicating an ASN.1 "BOOLEAN" value. */ + private static final byte TAG_Boolean = 0x1; + + /** Tag value indicating an ASN.1 "INTEGER" value. */ + private static final byte TAG_Integer = 0x2; + + /** Tag value indicating an ASN.1 "BIT STRING" value. */ + private static final byte TAG_BitString = 0x3; + + /** Tag value indicating an ASN.1 "OCTET STRING" value. */ + private static final byte TAG_OctetString = 0x4; + + /** Tag value indicating an ASN.1 "NULL" value. */ + private static final byte TAG_Null = 0x5; + + /** Tag value indicating an ASN.1 "OBJECT IDENTIFIER" value. */ + private static final byte TAG_ObjectId = 0x6; + + /** Tag value including an ASN.1 "ENUMERATED" value */ + private static final byte TAG_Enumerated = 0xA; + + /** Tag value indicating an ASN.1 "UTF8String" value. */ + private static final byte TAG_UTF8String = 0xC; + + /** Tag value including a "printable" string */ + private static final byte TAG_PrintableString = 0x13; + + /** Tag value including a "teletype" string */ + private static final byte TAG_T61String = 0x14; + + /** Tag value including an ASCII string */ + private static final byte TAG_IA5String = 0x16; + + /** Tag value indicating an ASN.1 "UTCTime" value. */ + private static final byte TAG_UtcTime = 0x17; + + /** Tag value indicating an ASN.1 "GeneralizedTime" value. */ + private static final byte TAG_GeneralizedTime = 0x18; + + /** Tag value indicating an ASN.1 "GenerallString" value. */ + private static final byte TAG_GeneralString = 0x1B; + + /** Tag value indicating an ASN.1 "UniversalString" value. */ + private static final byte TAG_UniversalString = 0x1C; + + /** Tag value indicating an ASN.1 "BMPString" value. */ + private static final byte TAG_BMPString = 0x1E; + + // CONSTRUCTED seq/set + + /** + * Tag value indicating an ASN.1 + * "SEQUENCE" (zero to N elements, order is significant). + */ + private static final byte TAG_Sequence = 0x30; + + /** + * Tag value indicating an ASN.1 + * "SET" (zero to N members, order does not matter). + */ + private static final byte TAG_Set = 0x31; + + /* + * These values are the high order bits for the other kinds of tags. + */ + + /** + * Returns true if the tag class is UNIVERSAL. + */ + private boolean isUniversal(int tag) { return ((tag & 0xc0) == 0x0); } + + /** + * Returns true if the tag class is APPLICATION. + */ + private boolean isApplication(int tag) { return ((tag & 0xc0) == TAG_APPLICATION); } + + /** Returns true iff the CONSTRUCTED bit is set in the type tag. */ + private boolean isConstructed(int tag) { return ((tag & 0x20) == 0x20); } + + // Names for tags. + private static final String[] tagNames = new String[] { + "ANY", "BOOLEAN", "INTEGER", "BIT STRING", "OCTET STRING", + "NULL", "OBJECT ID", "OBJECT DESCRIPTION", "EXTERNAL", "REAL", + "ENUMERATION", "u11", "UTF8 STRING", "u13", "u14", + "u15", "SEQUENCE", "SET", "NUMERIC STRING", "STRING", + "T61", "VIDEOTEXT", "IA5", "UTCTIME", "GENERAL TIME", + "GRAPHIC STRING", "ISO64STRING", "GENERAL STRING", "UNIVERSAL STRING", "u29", + "BMP STRING", "MULTIBYTE TAG", + }; + + /** + * Simple utility to open and print contents of a file as ASN.1. + * If the first line of the file looks like a certificate + * it will be Base64 decoded and passed to the ASN.1 formatter. + * @param args file names + */ + public static void main(String[] args) { + if (args.length < 1) { + System.out.println("Usage: <asn.1 files>"); + return; + } + ASN1Formatter fmt = ASN1Formatter.formatter(); + for (String file : args) { + System.out.printf("%s%n", file); + try (InputStream fis = Files.newInputStream(Path.of(file)); + BufferedInputStream is = new BufferedInputStream(fis); + InputStream in = wrapIfBase64Mime(is)) { + + DataInputStream dis = new DataInputStream(in); + HexPrinter p = HexPrinter.simple() + .dest(System.out) + .formatter(ASN1Formatter.formatter(), "; ", 100); + p.format(dis); + } catch (EOFException eof) { + System.out.println(); + } catch (IOException ioe) { + System.out.printf("%s: %s%n", file, ioe); + } + } + } + + /** + * Returns an InputStream, either the original on a wrapped to decode Base64Mime encoding. + * @param bis an InputStream + * @return the InputStream or the wrapped decoder of Base64Mime. + * @throws IOException if an I/O error occurs + */ + private static InputStream wrapIfBase64Mime(BufferedInputStream bis) throws IOException { + bis.mark(256); + DataInputStream dis = new DataInputStream(bis); + String line1 = dis.readLine(); // Good enough for our purposes + if (line1.startsWith("-----") && line1.endsWith("-----")) { + // Probable Base64 Mime encoding + return Base64.getMimeDecoder().wrap(bis); + } + bis.reset(); + return bis; + } + +} diff --git a/test/lib/jdk/test/lib/hexdump/HexPrinter.java b/test/lib/jdk/test/lib/hexdump/HexPrinter.java index 850f1735923..4f32f5d3ebb 100644 --- a/test/lib/jdk/test/lib/hexdump/HexPrinter.java +++ b/test/lib/jdk/test/lib/hexdump/HexPrinter.java @@ -162,7 +162,6 @@ public final class HexPrinter { "dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb", "can", "em", "sub", "esc", "fs", "gs", "rs", "us" }; - private static final String initOffsetFormat = "%5d: "; private static final int initBytesCount = 16; // 16 byte values private static final String initBytesFormat = "%02x "; private static final int initAnnoWidth = initBytesCount * 4; @@ -265,7 +264,7 @@ public static HexPrinter canonical() { * to a multi-line string. * The parameters are set to: * <UL> - * <LI>byte offset format: signed decimal width 5 and a space, {@code "%5d: "}, + * <LI>byte offset format: hexadecimal width 4, colon, and a space, {@code "%04x: "}, * <LI>each byte value is formatted as 2 hex digits and a space: {@code "%02x "}, * <LI>maximum number of byte values per line: {@value initBytesCount}, * <LI>delimiter for the annotation: {@code " // "}, @@ -288,7 +287,7 @@ public static HexPrinter canonical() { * @return a new HexPrinter */ public static HexPrinter simple() { - return new HexPrinter(Formatters.ASCII, initOffsetFormat, + return new HexPrinter(Formatters.ASCII, "%04x: ", initBytesFormat, initBytesCount, initAnnoDelim, initAnnoWidth, System.lineSeparator(), System.out); @@ -604,11 +603,14 @@ public HexPrinter withOffsetFormat(String offsetFormat) { * If the byteFormat is an empty String, there are no byte values in the output. * * @param byteFormat a format string for each byte - * @param bytesCount the maximum number of byte values per line + * @param bytesCount the maximum number of byte values per line; greater than zero * @return a new HexPrinter + * @throws IllegalArgumentException if bytesCount is less than or equal to zero */ public HexPrinter withBytesFormat(String byteFormat, int bytesCount) { Objects.requireNonNull(bytesFormat, "bytesFormat"); + if (bytesCount <= 0) + throw new IllegalArgumentException("bytesCount should be greater than zero"); return new HexPrinter(annoFormatter, offsetFormat, byteFormat, bytesCount, annoDelim, annoWidth, lineSeparator, dest); } @@ -946,6 +948,7 @@ private static final class AnnotationWriter extends CharArrayWriter { private final transient DataInputStream in; private final transient int baseOffset; private final transient HexPrinter params; + private final transient int bytesSingleWidth; private final transient int bytesColWidth; private final transient int annoWidth; private final transient Appendable dest; @@ -966,7 +969,8 @@ private static final class AnnotationWriter extends CharArrayWriter { this.source = new OffsetInputStream(source); this.source.mark(1024); this.in = new DataInputStream(this.source); - this.bytesColWidth = params.bytesCount * String.format(params.bytesFormat, 255).length(); + this.bytesSingleWidth = String.format(params.bytesFormat, 255).length(); + this.bytesColWidth = params.bytesCount * bytesSingleWidth; this.annoWidth = params.annoWidth; this.dest = dest; } @@ -1062,11 +1066,16 @@ private void process() { int count = source.markedByteCount(); try { source.reset(); - long binColOffset = source.byteOffset(); + int binColOffset = (int)source.byteOffset(); while (count > 0 || info.length() > 0) { - dest.append(String.format(params.offsetFormat, binColOffset + baseOffset)); - int colWidth = 0; - int byteCount = Math.min(params.bytesCount, count); + int offset = binColOffset + baseOffset; // offset of first byte on the line + dest.append(String.format(params.offsetFormat, offset)); + // Compute indent based on offset modulo bytesCount + int colOffset = offset % params.bytesCount; + int colWidth = colOffset * bytesSingleWidth; + dest.append(" ".repeat(colWidth)); + // Append the bytes that fit on this line + int byteCount = Math.min(params.bytesCount - colOffset, count); for (int i = 0; i < byteCount; i++) { int b = source.read(); if (b == -1) diff --git a/test/lib/sun/hotspot/WhiteBox.java b/test/lib/sun/hotspot/WhiteBox.java index d087cd48460..0090e3fb4bc 100644 --- a/test/lib/sun/hotspot/WhiteBox.java +++ b/test/lib/sun/hotspot/WhiteBox.java @@ -601,6 +601,7 @@ public Object getMethodOption(Executable method, String name) { // Handshakes public native int handshakeWalkStack(Thread t, boolean all_threads); + public native void asyncHandshakeWalkStack(Thread t); // Returns true on linux if library has the noexecstack flag set. public native boolean checkLibSpecifiesNoexecstack(String libfilename); @@ -630,4 +631,6 @@ public native int validateCgroup(String procCgroups, public native void checkThreadObjOfTerminatingThread(Thread target); public native boolean isJVMTIIncluded(); + + public native void waitUnsafe(int time_ms); } diff --git a/test/micro/org/openjdk/bench/java/util/ListArgs.java b/test/micro/org/openjdk/bench/java/util/ListArgs.java new file mode 100644 index 00000000000..a3e19271259 --- /dev/null +++ b/test/micro/org/openjdk/bench/java/util/ListArgs.java @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2019, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package org.openjdk.bench.java.util; + +import org.openjdk.jmh.annotations.*; + +import java.util.*; +import java.util.concurrent.TimeUnit; + +/** + * Microbenchmarks for List.of fixed vs varargs implementations. + * Run with -Xint to avoid JIT compilation, in order to test + * common use cases of these methods being called from static + * initializers. Use parallel GC and set initial heap size to avoid + * GC during runs. + */ +@State(Scope.Benchmark) +@OutputTimeUnit(TimeUnit.MILLISECONDS) +@Fork(value = 3, jvmArgsAppend = { "-verbose:gc", "-XX:+UseParallelGC", "-Xms4g", "-Xmx4g", "-Xint" }) +@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS) +@Measurement(iterations = 5, time = 2, timeUnit = TimeUnit.SECONDS) +public class ListArgs { + + @Benchmark + public Object list00() { + return List.of(); + } + + @Benchmark + public Object list01() { + return List.of("a"); + } + + @Benchmark + public Object list02() { + return List.of("a", "b"); + } + + @Benchmark + public Object list03() { + return List.of("a", "b", "c"); + } + + @Benchmark + public Object list04() { + return List.of("a", "b", "c", "d"); + } + + @Benchmark + public Object list05() { + return List.of("a", "b", "c", "d", "e"); + } + + @Benchmark + public Object list06() { + return List.of("a", "b", "c", "d", "e", + "f"); + } + + @Benchmark + public Object list07() { + return List.of("a", "b", "c", "d", "e", + "f", "g"); + } + + @Benchmark + public Object list08() { + return List.of("a", "b", "c", "d", "e", + "f", "g", "h"); + } + + @Benchmark + public Object list09() { + return List.of("a", "b", "c", "d", "e", + "f", "g", "h", "i"); + } + + @Benchmark + public Object list10() { + return List.of("a", "b", "c", "d", "e", + "f", "g", "h", "i", "j"); + } + + @Benchmark + public Object list11() { + return List.of("a", "b", "c", "d", "e", + "f", "g", "h", "i", "j", "k"); + } +}