Skip to content

Commit

Permalink
Merge pull request #588 from dragonwell-project/wip_dragonwell_standa…
Browse files Browse the repository at this point in the history
…rd_squash_branch

Merge branch 'standard' into wip_dragonwell_standard_merge_branch
  • Loading branch information
Accelerator1996 authored Aug 8, 2023
2 parents 4b1b66e + f4e6334 commit 05c1d7f
Show file tree
Hide file tree
Showing 280 changed files with 902,569 additions and 1,834 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=openjdk8u372
version=openjdk8u382

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace
Expand Down
6 changes: 3 additions & 3 deletions THIRD_PARTY_README
Original file line number Diff line number Diff line change
Expand Up @@ -2990,14 +2990,14 @@ performance, or use of this material.

-------------------------------------------------------------------------------

%% This notice is provided with respect to zlib v1.2.11, which may be included
%% This notice is provided with respect to zlib v1.2.13, which may be included
with JRE 8, JDK 8, and OpenJDK 8.

--- begin of LICENSE ---

version 1.2.11, January 15th, 2017
version 1.2.13, October 13th, 2022

Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
17 changes: 16 additions & 1 deletion common/autoconf/generated-configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4308,7 +4308,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"

################################################################################
# The order of these defines the priority by which we try to find them.
VALID_VS_VERSIONS="2010 2012 2013 2015 2017 2019"
VALID_VS_VERSIONS="2010 2012 2013 2015 2017 2019 2022"

VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
VS_VERSION_INTERNAL_2010=100
Expand Down Expand Up @@ -4381,6 +4381,21 @@ VS_SDK_PLATFORM_NAME_2019=
VS_SUPPORTED_2019=false
VS_TOOLSET_SUPPORTED_2019=false

VS_DESCRIPTION_2022="Microsoft Visual Studio 2022"
VS_VERSION_INTERNAL_2022=143
VS_MSVCR_2022=vcruntime140.dll
VS_VCRUNTIME_1_2022=vcruntime140_1.dll
VS_MSVCP_2022=msvcp140.dll
VS_ENVVAR_2022="VS170COMNTOOLS"
VS_USE_UCRT_2022="true"
VS_VS_INSTALLDIR_2022="Microsoft Visual Studio/2022"
VS_EDITIONS_2022="BuildTools Community Professional Enterprise"
VS_SDK_INSTALLDIR_2022=
VS_VS_PLATFORM_NAME_2022="v143"
VS_SDK_PLATFORM_NAME_2022=
VS_SUPPORTED_2022=true
VS_TOOLSET_SUPPORTED_2022=true

################################################################################


Expand Down
17 changes: 16 additions & 1 deletion common/autoconf/toolchain_windows.m4
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

################################################################################
# The order of these defines the priority by which we try to find them.
VALID_VS_VERSIONS="2010 2012 2013 2015 2017 2019"
VALID_VS_VERSIONS="2010 2012 2013 2015 2017 2019 2022"

VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
VS_VERSION_INTERNAL_2010=100
Expand Down Expand Up @@ -98,6 +98,21 @@ VS_SDK_PLATFORM_NAME_2019=
VS_SUPPORTED_2019=false
VS_TOOLSET_SUPPORTED_2019=false

VS_DESCRIPTION_2022="Microsoft Visual Studio 2022"
VS_VERSION_INTERNAL_2022=143
VS_MSVCR_2022=vcruntime140.dll
VS_VCRUNTIME_1_2022=vcruntime140_1.dll
VS_MSVCP_2022=msvcp140.dll
VS_ENVVAR_2022="VS170COMNTOOLS"
VS_USE_UCRT_2022="true"
VS_VS_INSTALLDIR_2022="Microsoft Visual Studio/2022"
VS_EDITIONS_2022="BuildTools Community Professional Enterprise"
VS_SDK_INSTALLDIR_2022=
VS_VS_PLATFORM_NAME_2022="v143"
VS_SDK_PLATFORM_NAME_2022=
VS_SUPPORTED_2022=true
VS_TOOLSET_SUPPORTED_2022=true

################################################################################

AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
Expand Down
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=372
JDK_UPDATE_VERSION=382
LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK
PRODUCT_SUFFIX="Runtime Environment"
Expand Down
22 changes: 10 additions & 12 deletions hotspot/src/share/vm/c1/c1_RangeCheckElimination.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -249,17 +249,16 @@ void RangeCheckEliminator::Visitor::do_ArithmeticOp(ArithmeticOp *ao) {

Bound * bound = _rce->get_bound(y);
if (bound->has_upper() && bound->has_lower()) {
int new_lower = bound->lower() + const_value;
jlong new_lowerl = ((jlong)bound->lower()) + const_value;
int new_upper = bound->upper() + const_value;
jlong new_upperl = ((jlong)bound->upper()) + const_value;

if (((jlong)new_lower) == new_lowerl && ((jlong)new_upper == new_upperl)) {
Bound *newBound = new Bound(new_lower, bound->lower_instr(), new_upper, bound->upper_instr());
_bound = newBound;
} else {
// overflow
jint t_lo = bound->lower();
jint t_hi = bound->upper();
jint new_lower = java_add(t_lo, const_value);
jint new_upper = java_add(t_hi, const_value);
bool overflow = ((const_value < 0 && (new_lower > t_lo)) ||
(const_value > 0 && (new_upper < t_hi)));
if (overflow) {
_bound = new Bound();
} else {
_bound = new Bound(new_lower, bound->lower_instr(), new_upper, bound->upper_instr());
}
} else {
_bound = new Bound();
Expand Down Expand Up @@ -1485,7 +1484,6 @@ void RangeCheckEliminator::Bound::add_assertion(Instruction *instruction, Instru
NOT_PRODUCT(ao->set_printable_bci(position->printable_bci()));
result = result->insert_after(ao);
compare_with = ao;
// TODO: Check that add operation does not overflow!
}
}
assert(compare_with != NULL, "You have to compare with something!");
Expand Down
9 changes: 9 additions & 0 deletions hotspot/src/share/vm/opto/doCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,7 @@ void Parse::catch_call_exceptions(ciExceptionHandlerStream& handlers) {
GrowableArray<const Type*>* extypes = new (C->node_arena()) GrowableArray<const Type*>(C->node_arena(), 8, 0, NULL);
GrowableArray<int>* saw_unloaded = new (C->node_arena()) GrowableArray<int>(C->node_arena(), 8, 0, 0);

bool default_handler = false;
for (; !handlers.is_done(); handlers.next()) {
ciExceptionHandler* h = handlers.handler();
int h_bci = h->handler_bci();
Expand All @@ -724,6 +725,14 @@ void Parse::catch_call_exceptions(ciExceptionHandlerStream& handlers) {
// Note: It's OK if the BCIs repeat themselves.
bcis->append(h_bci);
extypes->append(h_extype);
if (h_bci == -1) {
default_handler = true;
}
}

if (!default_handler) {
bcis->append(-1);
extypes->append(TypeOopPtr::make_from_klass(env()->Throwable_klass())->is_instptr());
}

int len = bcis->length();
Expand Down
1 change: 1 addition & 0 deletions hotspot/src/share/vm/opto/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,7 @@ void Compile::FillExceptionTables(uint cnt, uint *call_returns, uint *inct_start
}

// Set the offset of the return from the call
assert(handler_bcis.find(-1) != -1, "must have default handler");
_handler_table.add_subtable(call_return, &handler_bcis, NULL, &handler_pcos);
continue;
}
Expand Down
7 changes: 0 additions & 7 deletions hotspot/src/share/vm/prims/jvmtiExport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1239,14 +1239,7 @@ void JvmtiExport::post_method_exit(JavaThread *thread, Method* method, frame cur
}
}

#ifdef AARCH64
// FIXME: this is just a kludge to get JVMTI going. Compiled
// MethodHandle code doesn't call the JVMTI notify routines, so the
// stack depth we see here is wrong.
state->invalidate_cur_stack_depth();
#else
state->decr_cur_stack_depth();
#endif
}


Expand Down
1 change: 1 addition & 0 deletions hotspot/src/share/vm/prims/jvmtiThreadState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ JvmtiThreadState::JvmtiThreadState(JavaThread* thread)
_vm_object_alloc_event_collector = NULL;
_the_class_for_redefinition_verification = NULL;
_scratch_class_for_redefinition_verification = NULL;
_cur_stack_depth = UNKNOWN_STACK_DEPTH;

// JVMTI ForceEarlyReturn support
_pending_step_for_earlyret = false;
Expand Down
6 changes: 3 additions & 3 deletions hotspot/src/share/vm/runtime/thread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ class Thread: public ThreadShadow {
}

// Sweeper support
void nmethods_do(CodeBlobClosure* cf);
virtual void nmethods_do(CodeBlobClosure* cf);

// jvmtiRedefineClasses support
void metadata_do(void f(Metadata*));
Expand Down Expand Up @@ -1450,10 +1450,10 @@ class JavaThread: public Thread {
void frames_do(void f(frame*, const RegisterMap*));

// Memory operations
void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
virtual void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);

// Sweeper operations
void nmethods_do(CodeBlobClosure* cf);
virtual void nmethods_do(CodeBlobClosure* cf);

// RedefineClasses Support
void metadata_do(void f(Metadata*));
Expand Down
6 changes: 5 additions & 1 deletion hotspot/src/share/vm/runtime/vm_version.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -263,6 +263,10 @@ const char* Abstract_VM_Version::internal_vm_info_string() {
#define HOTSPOT_BUILD_COMPILER "MS VC++ 16.8 / 16.9 (VS2019)"
#elif _MSC_VER == 1929
#define HOTSPOT_BUILD_COMPILER "MS VC++ 16.10 / 16.11 (VS2019)"
#elif _MSC_VER == 1930
#define HOTSPOT_BUILD_COMPILER "MS VC++ 17.0 (VS2022)"
#elif _MSC_VER == 1931
#define HOTSPOT_BUILD_COMPILER "MS VC++ 17.1 (VS2022)"
#else
#define HOTSPOT_BUILD_COMPILER "unknown MS VC++:" XSTR(_MSC_VER)
#endif
Expand Down
8 changes: 7 additions & 1 deletion hotspot/test/TEST.ROOT
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@
keys=cte_test jcmd nmt regression gc stress

groups=TEST.groups [closed/TEST.groups]
requires.properties=sun.arch.data.model

# Source files for classes that will be used at the beginning of each test suite run,
# to determine additional characteristics of the system for use with the @requires tag.
requires.extraPropDefns = ../../test/jtreg-ext/requires/VMProps.java
requires.properties=sun.arch.data.model \
vm.flavor \
vm.bits
3 changes: 3 additions & 0 deletions hotspot/test/gc/metaspace/TestMetaspacePerfCounters.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ private static void checkEmptyPerfCounters(String ns) throws Exception {
}

private static void checkUsedIncreasesWhenLoadingClass(String ns) throws Exception {
// Need to ensure that used is up to date and that all unreachable
// classes are unloaded before doing this check.
System.gc();
long before = getUsed(ns);
fooClass = compileAndLoad("Foo", "public class Foo { }");
System.gc();
Expand Down
26 changes: 17 additions & 9 deletions hotspot/test/gc/metaspace/TestPerfCountersAndMemoryPools.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
* @requires vm.gc=="Serial" | vm.gc=="null"
* @summary Tests that a MemoryPoolMXBeans and PerfCounters for metaspace
* report the same data.
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedKlassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint TestPerfCountersAndMemoryPools
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedKlassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint TestPerfCountersAndMemoryPools
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint TestPerfCountersAndMemoryPools
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint TestPerfCountersAndMemoryPools
*/
public class TestPerfCountersAndMemoryPools {
public static void main(String[] args) throws Exception {
checkMemoryUsage("Metaspace", "sun.gc.metaspace");

if (InputArguments.contains("-XX:+UseCompressedKlassPointers") && Platform.is64bit()) {
if (InputArguments.contains("-XX:+UseCompressedClassPointers") && Platform.is64bit()) {
checkMemoryUsage("Compressed Class Space", "sun.gc.compressedclassspace");
}
}
Expand All @@ -61,16 +61,24 @@ private static void checkMemoryUsage(String memoryPoolName, String perfNS)
throws Exception {
MemoryPoolMXBean pool = getMemoryPool(memoryPoolName);

// First, call all the methods to let them allocate their own slab of metadata
getMinCapacity(perfNS);
getCapacity(perfNS);
getUsed(perfNS);
pool.getUsage().getInit();
pool.getUsage().getUsed();
pool.getUsage().getCommitted();
assertEQ(1L, 1L, "Make assert load");

// Must do a GC to update performance counters
System.gc();
assertEQ(getMinCapacity(perfNS), pool.getUsage().getInit());
assertEQ(getMinCapacity(perfNS), pool.getUsage().getInit(), "MinCapacity out of sync");

// Must do a second GC to update the perfomance counters again, since
// the call pool.getUsage().getInit() could have allocated some
// metadata.
// Adding a second GC due to metadata allocations caused by getting the
// initial size from the pool. This is needed when running with -Xcomp.
System.gc();
assertEQ(getUsed(perfNS), pool.getUsage().getUsed());
assertEQ(getCapacity(perfNS), pool.getUsage().getCommitted());
assertEQ(getUsed(perfNS), pool.getUsage().getUsed(), "Used out of sync");
assertEQ(getCapacity(perfNS), pool.getUsage().getCommitted(), "Committed out of sync");
}

private static long getMinCapacity(String ns) throws Exception {
Expand Down
6 changes: 1 addition & 5 deletions hotspot/test/runtime/Metaspace/MaxMetaspaceSizeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,17 @@

import com.oracle.java.testlibrary.ProcessTools;
import com.oracle.java.testlibrary.OutputAnalyzer;
import com.oracle.java.testlibrary.Platform;

/*
* @test MaxMetaspaceSizeTest
* @requires vm.bits == "64"
* @bug 8087291
* @library /testlibrary
* @run main/othervm MaxMetaspaceSizeTest
*/

public class MaxMetaspaceSizeTest {
public static void main(String... args) throws Exception {
if (!Platform.is64bit()) {
System.out.println("Test requires 64-bit JVM. Skipping...");
return;
}
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-Xmx1g",
"-XX:InitialBootClassLoaderMetaspaceSize=4195328",
Expand Down
5 changes: 1 addition & 4 deletions hotspot/test/runtime/NMT/HugeArenaTracking.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* @test
* @key nmt jcmd
* @library /testlibrary /testlibrary/whitebox
* @requires vm.bits == 64
* @build HugeArenaTracking
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail HugeArenaTracking
Expand All @@ -38,10 +39,6 @@ public class HugeArenaTracking {
private static final long GB = 1024 * 1024 * 1024;

public static void main(String args[]) throws Exception {
if (!Platform.is64bit()) {
System.out.println("Test requires 64-bit JVM. Skipping...");
return;
}
OutputAnalyzer output;
final WhiteBox wb = WhiteBox.getWhiteBox();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
/*
* @test DefaultUseWithClient
* @summary Test default behavior of sharing with -client
* @requires os.family == "windows" & vm.bits == "32" & vm.flavor == "client"
* @library /testlibrary
* @run main/othervm -client DefaultUseWithClient
* @run main/othervm DefaultUseWithClient
* @bug 8032224
*/

Expand All @@ -37,12 +38,6 @@ public static void main(String[] args) throws Exception {
String fileName = "test.jsa";

// On 32-bit windows CDS should be on by default in "-client" config
// Skip this test on any other platform
boolean is32BitWindowsClient = (Platform.isWindows() && Platform.is32bit() && Platform.isClient());
if (!is32BitWindowsClient) {
System.out.println("Test only applicable on 32-bit Windows Client VM. Skipping");
return;
}

// create the archive
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
Expand Down
Loading

0 comments on commit 05c1d7f

Please sign in to comment.