Skip to content

Commit

Permalink
Merge upstream-jdk8u
Browse files Browse the repository at this point in the history
  • Loading branch information
chadrako committed Feb 1, 2024
2 parents 82f76c7 + 552c686 commit a6b06a8
Show file tree
Hide file tree
Showing 72 changed files with 1,730 additions and 5,743 deletions.
2 changes: 1 addition & 1 deletion .jcheck/conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
project=jdk8u
jbs=JDK
version=openjdk8u402
version=openjdk8u412

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace
Expand Down
10 changes: 0 additions & 10 deletions README

This file was deleted.

15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,18 @@ _preview-release_

_release-8.XXX.YY.Z_
: The source code for each release is recorded by a branch or a tag with a name of this form. XXX stands for the OpenJDK 8 update number, YY for the OpenJDK 8 build number, and Z for the Corretto-specific revision number. The latter starts at 1 and is incremented in subsequent releases as long as the update and build number remain constant.

### OpenJDK Readme
```
Welcome to the JDK!
===================
For build instructions please see https://openjdk.java.net/groups/build/doc/building.html,
or either of these files:
- doc/building.html (html version)
- doc/building.md (markdown version)
See https://openjdk.java.net for more information about the OpenJDK Community and the JDK.
```
2 changes: 1 addition & 1 deletion common/autoconf/version-numbers
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
JDK_MAJOR_VERSION=1
JDK_MINOR_VERSION=8
JDK_MICRO_VERSION=0
JDK_UPDATE_VERSION=402
JDK_UPDATE_VERSION=412
LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK
PRODUCT_SUFFIX="Runtime Environment"
Expand Down
1 change: 0 additions & 1 deletion hotspot/test/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
runtime/SharedArchiveFile/SharedBaseAddress.java 8044600 solaris-sparc
runtime/6929067/Test6929067.sh 8028740 generic-all
runtime/CDSCompressedKPtrs/XShareAuto.java 8026154 generic-all
runtime/XCheckJniJsig/XCheckJSig.java 8023735 generic-all
runtime/6626217/Test6626217.sh 8028733 generic-all
runtime/jsig/Test8017498.sh 8028806 generic-all
runtime/LoadClass/LoadClassNegative.java 8028095 generic-all
Expand Down
6 changes: 5 additions & 1 deletion hotspot/test/TEST.ROOT
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ groups=TEST.groups [closed/TEST.groups]
requires.extraPropDefns = ../../test/jtreg-ext/requires/VMProps.java
requires.properties=sun.arch.data.model \
vm.flavor \
vm.bits
vm.bits \
vm.debug

# Minimum jtreg version
requiredVersion=4.2 b13

# Path to libraries in the topmost test directory. This is needed so @library
# does not need ../../ notation to reach them
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ static private void makeSureIsCompiled(Method m) {
*/
static public void main(String[] args) throws Exception {
// (1) Load an anonymous version of this class using the corresponding Unsafe method
URL classUrl = TestAnonymousClassUnloading.class.getResource("TestAnonymousClassUnloading.class");
String rn = TestAnonymousClassUnloading.class.getSimpleName() + ".class";
URL classUrl = TestAnonymousClassUnloading.class.getResource(rn);
URLConnection connection = classUrl.openConnection();

int length = connection.getContentLength();
Expand Down
10 changes: 7 additions & 3 deletions hotspot/test/compiler/tiered/ConstantGettersTransitionsTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -21,12 +21,14 @@
* questions.
*/

import jtreg.SkippedException;

import java.lang.reflect.Executable;
import java.util.concurrent.Callable;

/**
* @test ConstantGettersTransitionsTest
* @library /testlibrary /testlibrary/whitebox /compiler/whitebox
* @library /testlibrary /testlibrary/whitebox /compiler/whitebox /test/lib
* @build TransitionsTestExecutor ConstantGettersTransitionsTest
* @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
* @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
Expand All @@ -37,7 +39,9 @@
*/
public class ConstantGettersTransitionsTest extends LevelTransitionTest {
public static void main(String[] args) {
assert (!CompilerWhiteBoxTest.skipOnTieredCompilation(false));
if (CompilerWhiteBoxTest.skipOnTieredCompilation(false)) {
throw new SkippedException("Test isn't applicable for non-tiered mode");
}

// run test cases
for (TestCase testCase : ConstantGettersTestCase.values()) {
Expand Down
8 changes: 6 additions & 2 deletions hotspot/test/compiler/tiered/LevelTransitionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@
* questions.
*/

import jtreg.SkippedException;

import java.lang.reflect.Executable;
import java.lang.reflect.Method;
import java.util.Objects;
import java.util.concurrent.Callable;

/**
* @test LevelTransitionTest
* @library /testlibrary /testlibrary/whitebox /compiler/whitebox
* @library /testlibrary /testlibrary/whitebox /compiler/whitebox /test/lib
* @build TransitionsTestExecutor LevelTransitionTest
* @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
* @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
Expand All @@ -44,7 +46,9 @@ public class LevelTransitionTest extends TieredLevelsTest {
private int transitionCount;

public static void main(String[] args) throws Throwable {
assert (!CompilerWhiteBoxTest.skipOnTieredCompilation(false));
if (CompilerWhiteBoxTest.skipOnTieredCompilation(false)) {
throw new SkippedException("Test isn't applicable for non-tiered mode");
}

CompilerWhiteBoxTest.main(LevelTransitionTest::new, args);
// run extended test cases
Expand Down
7 changes: 4 additions & 3 deletions hotspot/test/compiler/tiered/NonTieredLevelsTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -22,10 +22,11 @@
*/

import java.util.function.IntPredicate;
import jtreg.SkippedException;

/**
* @test NonTieredLevelsTest
* @library /testlibrary /testlibrary/whitebox /compiler/whitebox
* @library /testlibrary /testlibrary/whitebox /compiler/whitebox /test/lib
* @build NonTieredLevelsTest
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:-TieredCompilation
Expand Down Expand Up @@ -54,7 +55,7 @@ public class NonTieredLevelsTest extends CompLevelsTest {
}
public static void main(String[] args) throws Exception {
if (CompilerWhiteBoxTest.skipOnTieredCompilation(true)) {
return;
throw new SkippedException("Test isn't applicable for tiered mode");
}
CompilerWhiteBoxTest.main(NonTieredLevelsTest::new, args);
}
Expand Down
9 changes: 6 additions & 3 deletions hotspot/test/compiler/tiered/TieredLevelsTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -23,7 +23,7 @@

/**
* @test TieredLevelsTest
* @library /testlibrary /testlibrary/whitebox /compiler/whitebox
* @library /testlibrary /testlibrary/whitebox /compiler/whitebox /test/lib
* @build TieredLevelsTest
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+TieredCompilation
Expand All @@ -33,10 +33,13 @@
* @summary Verify that all levels < 'TieredStopAtLevel' can be used
* @author [email protected]
*/

import jtreg.SkippedException;

public class TieredLevelsTest extends CompLevelsTest {
public static void main(String[] args) throws Exception, Throwable {
if (CompilerWhiteBoxTest.skipOnTieredCompilation(false)) {
return;
throw new SkippedException("Test isn't applicable for non-tiered mode");
}
CompilerWhiteBoxTest.main(TieredLevelsTest::new, args);
}
Expand Down
9 changes: 4 additions & 5 deletions hotspot/test/gc/arguments/TestAggressiveHeap.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -26,7 +26,7 @@
* @key gc
* @bug 8179084
* @summary Test argument processing for -XX:+AggressiveHeap.
* @library /testlibrary
* @library /testlibrary /test/lib
* @run driver TestAggressiveHeap
*/

Expand All @@ -36,6 +36,7 @@

import com.oracle.java.testlibrary.OutputAnalyzer;
import com.oracle.java.testlibrary.ProcessTools;
import jtreg.SkippedException;

public class TestAggressiveHeap {

Expand Down Expand Up @@ -86,9 +87,7 @@ private static boolean haveRequiredMemory() throws Exception {

private static boolean canUseAggressiveHeapOption() throws Exception {
if (!haveRequiredMemory()) {
System.out.println(
"Skipping test of " + option + " : insufficient memory");
return false;
throw new SkippedException("Skipping test of " + option + " : insufficient memory");
}
return true;
}
Expand Down
11 changes: 5 additions & 6 deletions hotspot/test/gc/g1/TestHumongousShrinkHeap.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -27,7 +27,7 @@
* @requires vm.gc=="G1" | vm.gc=="null"
* @summary Verify that heap shrinks after GC in the presence of fragmentation
* due to humongous objects
* @library /testlibrary
* @library /testlibrary /test/lib
* @run main/othervm -XX:-ExplicitGCInvokesConcurrent -XX:MinHeapFreeRatio=10
* -XX:MaxHeapFreeRatio=12 -XX:+UseG1GC -XX:G1HeapRegionSize=1M -verbose:gc
* TestHumongousShrinkHeap
Expand All @@ -39,6 +39,7 @@
import java.util.List;
import sun.management.ManagementFactoryHelper;
import static com.oracle.java.testlibrary.Asserts.*;
import jtreg.SkippedException;

public class TestHumongousShrinkHeap {

Expand All @@ -57,13 +58,11 @@ public class TestHumongousShrinkHeap {

public static void main(String[] args) {
if (HUMON_COUNT == 0) {
System.out.println("Skipped. Heap is too small");
return;
throw new SkippedException("Heap is too small");
}

if (TOTAL_MEMORY + REGION_SIZE * HUMON_COUNT > MAX_MEMORY) {
System.out.println("Skipped. Initial heap size is to close to max heap size.");
return;
throw new SkippedException("Initial heap size is to close to max heap size.");
}

System.out.format("Running with %s initial heap size of %s maximum heap size. "
Expand Down
15 changes: 5 additions & 10 deletions hotspot/test/gc/g1/TestLargePageUseForAuxMemory.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -25,8 +25,8 @@
* @test TestLargePageUseForAuxMemory.java
* @bug 8058354
* @key gc
* @library /testlibrary /testlibrary/whitebox
* @requires (vm.gc=="G1" | vm.gc=="null")
* @library /testlibrary /testlibrary/whitebox /test/lib
* @requires (vm.gc=="G1" | vm.gc=="null") & vm.debug
* @build TestLargePageUseForAuxMemory
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
Expand All @@ -35,6 +35,7 @@
*/

import com.oracle.java.testlibrary.*;
import jtreg.SkippedException;
import sun.hotspot.WhiteBox;

public class TestLargePageUseForAuxMemory {
Expand Down Expand Up @@ -88,18 +89,12 @@ static void testVM(long heapsize, boolean cardsShouldUseLargePages, boolean bitm
}

public static void main(String[] args) throws Exception {
if (!Platform.isDebugBuild()) {
System.out.println("Skip tests on non-debug builds because the required option TracePageSizes is a debug-only option.");
return;
}

WhiteBox wb = WhiteBox.getWhiteBox();
smallPageSize = wb.getVMPageSize();
largePageSize = wb.getVMLargePageSize();

if (largePageSize == 0) {
System.out.println("Skip tests because large page support does not seem to be available on this platform.");
return;
throw new SkippedException("Large page support does not seem to be available on this platform.");
}

// To get large pages for the card table etc. we need at least a 1G heap (with 4k page size).
Expand Down
11 changes: 6 additions & 5 deletions hotspot/test/gc/g1/TestShrinkAuxiliaryData.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -26,6 +26,8 @@
import com.oracle.java.testlibrary.Platform;
import com.oracle.java.testlibrary.ProcessTools;
import com.oracle.java.testlibrary.Utils;
import jtreg.SkippedException;

import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryUsage;
Expand Down Expand Up @@ -67,10 +69,9 @@ protected void test() throws Exception {

int maxCacheSize = Math.max(0, Math.min(31, getMaxCacheSize()));
if (maxCacheSize < hotCardTableSize) {
System.out.format("Skiping test for %d cache size due max cache size %d",
hotCardTableSize, maxCacheSize
);
return;
throw new SkippedException(String.format(
"Skiping test for %d cache size due max cache size %d",
hotCardTableSize, maxCacheSize));
}

printTestInfo(maxCacheSize);
Expand Down
2 changes: 1 addition & 1 deletion hotspot/test/gc/g1/TestShrinkAuxiliaryData00.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @summary Checks that decommitment occurs for JVM with different
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc=="G1" | vm.gc=="null"
* @library /testlibrary /testlibrary/whitebox
* @library /testlibrary /testlibrary/whitebox /test/lib
* @build com.oracle.java.testlibrary.* sun.hotspot.WhiteBox
* TestShrinkAuxiliaryData TestShrinkAuxiliaryData00
* @run main ClassFileInstaller sun.hotspot.WhiteBox
Expand Down
2 changes: 1 addition & 1 deletion hotspot/test/gc/g1/TestShrinkAuxiliaryData05.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @summary Checks that decommitment occurs for JVM with different
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc=="G1" | vm.gc=="null"
* @library /testlibrary /testlibrary/whitebox
* @library /testlibrary /testlibrary/whitebox /test/lib
* @build com.oracle.java.testlibrary.* sun.hotspot.WhiteBox
* TestShrinkAuxiliaryData TestShrinkAuxiliaryData05
* @run main ClassFileInstaller sun.hotspot.WhiteBox
Expand Down
2 changes: 1 addition & 1 deletion hotspot/test/gc/g1/TestShrinkAuxiliaryData10.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @summary Checks that decommitment occurs for JVM with different
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc=="G1" | vm.gc=="null"
* @library /testlibrary /testlibrary/whitebox
* @library /testlibrary /testlibrary/whitebox /test/lib
* @build com.oracle.java.testlibrary.* sun.hotspot.WhiteBox
* @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData10
* @run main ClassFileInstaller sun.hotspot.WhiteBox
Expand Down
2 changes: 1 addition & 1 deletion hotspot/test/gc/g1/TestShrinkAuxiliaryData15.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @summary Checks that decommitment occurs for JVM with different
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc=="G1" | vm.gc=="null"
* @library /testlibrary /testlibrary/whitebox
* @library /testlibrary /testlibrary/whitebox /test/lib
* @build com.oracle.java.testlibrary.* sun.hotspot.WhiteBox
* @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData15
* @run main ClassFileInstaller sun.hotspot.WhiteBox
Expand Down
2 changes: 1 addition & 1 deletion hotspot/test/gc/g1/TestShrinkAuxiliaryData20.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @summary Checks that decommitment occurs for JVM with different
* G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
* @requires vm.gc=="G1" | vm.gc=="null"
* @library /testlibrary /testlibrary/whitebox
* @library /testlibrary /testlibrary/whitebox /test/lib
* @build com.oracle.java.testlibrary.* sun.hotspot.WhiteBox
* @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData20
* @run main ClassFileInstaller sun.hotspot.WhiteBox
Expand Down
Loading

0 comments on commit a6b06a8

Please sign in to comment.