Skip to content

Commit

Permalink
Merge branch 'upstream-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Datadog Syncup Service committed Dec 9, 2024
2 parents 4f55caf + 166c127 commit 83689cd
Show file tree
Hide file tree
Showing 16 changed files with 55 additions and 93 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -66,7 +66,6 @@ jobs:
- 'hs/tier1 compiler part 1'
- 'hs/tier1 compiler part 2'
- 'hs/tier1 compiler part 3'
- 'hs/tier1 compiler not-xcomp'
- 'hs/tier1 gc'
- 'hs/tier1 runtime'
- 'hs/tier1 serviceability'
Expand Down Expand Up @@ -101,10 +100,6 @@ jobs:
test-suite: 'test/hotspot/jtreg/:tier1_compiler_3'
debug-suffix: -debug

- test-name: 'hs/tier1 compiler not-xcomp'
test-suite: 'test/hotspot/jtreg/:tier1_compiler_not_xcomp'
debug-suffix: -debug

- test-name: 'hs/tier1 gc'
test-suite: 'test/hotspot/jtreg/:tier1_gc'
debug-suffix: -debug
Expand Down
2 changes: 1 addition & 1 deletion make/RunTestsPrebuiltSpec.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ TEST_JOBS ?= 0

# Use hard-coded values for java flags (one size, fits all!)
JAVA_FLAGS := -Duser.language=en -Duser.country=US
JAVA_FLAGS_BIG := -Xms64M -Xmx1600M
JAVA_FLAGS_BIG := -Xms64M -Xmx2048M
JAVA_FLAGS_SMALL := -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
BUILDJDK_JAVA_FLAGS_SMALL := -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
BUILD_JAVA_FLAGS := $(JAVA_FLAGS_BIG)
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/x86/stubRoutines_x86.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ enum platform_dependent_constants {
// AVX512 intrinsics add more code in 64-bit VM,
// Windows have more code to save/restore registers
_compiler_stubs_code_size = 20000 LP64_ONLY(+47000) WINDOWS_ONLY(+2000),
_final_stubs_code_size = 10000 LP64_ONLY(+20000) WINDOWS_ONLY(+2000) ZGC_ONLY(+20000)
_final_stubs_code_size = 10000 LP64_ONLY(+20000) WINDOWS_ONLY(+22000) ZGC_ONLY(+20000)
};

class x86 {
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/share/classfile/modules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,7 @@ const char* Modules::get_numbered_property_as_sorted_string(const char* property
}
}

const char* result = (const char*)os::strdup(st.as_string()); // Example: "java.base,java.compiler"
return strcmp(result, "") != 0 ? result : nullptr;
return (st.size() > 0) ? os::strdup(st.as_string()) : nullptr; // Example: "java.base,java.compiler"
}

void Modules::define_archived_modules(Handle h_platform_loader, Handle h_system_loader, TRAPS) {
Expand Down
16 changes: 1 addition & 15 deletions src/hotspot/share/runtime/arguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@ static SpecialFlag const special_jvm_flags[] = {
{ "DynamicDumpSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() },
{ "RequireSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() },
{ "UseSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() },
{ "DontYieldALot", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
#ifdef LINUX
{ "UseLinuxPosixThreadCPUClocks", JDK_Version::jdk(24), JDK_Version::jdk(25), JDK_Version::jdk(26) },
#endif
Expand All @@ -534,20 +533,7 @@ static SpecialFlag const special_jvm_flags[] = {

{ "MetaspaceReclaimPolicy", JDK_Version::undefined(), JDK_Version::jdk(21), JDK_Version::undefined() },
{ "ZGenerational", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::undefined() },
{ "UseNotificationThread", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
{ "PreserveAllAnnotations", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
{ "UseEmptySlotsInSupers", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
{ "OldSize", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
#if defined(X86)
{ "UseRTMLocking", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
{ "UseRTMDeopt", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
{ "RTMRetryCount", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
#endif // X86


{ "BaseFootPrintEstimate", JDK_Version::undefined(), JDK_Version::jdk(24), JDK_Version::jdk(25) },
{ "HeapFirstMaximumCompactionCount", JDK_Version::undefined(), JDK_Version::jdk(24), JDK_Version::jdk(25) },
{ "UseVtableBasedCHA", JDK_Version::undefined(), JDK_Version::jdk(24), JDK_Version::jdk(25) },

#ifdef ASSERT
{ "DummyObsoleteTestFlag", JDK_Version::undefined(), JDK_Version::jdk(18), JDK_Version::undefined() },
#endif
Expand Down
11 changes: 2 additions & 9 deletions src/hotspot/share/runtime/os.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
#include "jvm_md.h"
#include "runtime/osInfo.hpp"
#include "utilities/exceptions.hpp"
#include "utilities/ostream.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
#include "utilities/ostream.hpp"
#ifdef __APPLE__
# include <mach/mach_time.h>
#endif
Expand Down Expand Up @@ -1027,14 +1028,6 @@ class os: AllStatic {
class Posix;
#endif

// FIXME - some random stuff that was in os_windows.hpp
#ifdef _WINDOWS
// strtok_s is the Windows thread-safe equivalent of POSIX strtok_r
# define strtok_r strtok_s
# define S_ISCHR(mode) (((mode) & _S_IFCHR) == _S_IFCHR)
# define S_ISFIFO(mode) (((mode) & _S_IFIFO) == _S_IFIFO)
#endif

#ifndef OS_NATIVE_THREAD_CREATION_FAILED_MSG
#define OS_NATIVE_THREAD_CREATION_FAILED_MSG "unable to create native thread: possibly out of memory or process/resource limits reached"
#endif
Expand Down
13 changes: 13 additions & 0 deletions src/hotspot/share/utilities/globalDefinitions_visCPP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
# include <stdlib.h>
# include <stdint.h>
# include <stddef.h>// for offsetof
# include <sys/stat.h>
# include <io.h> // for stream.cpp
# include <float.h> // for _isnan
# include <stdio.h> // for va_list
Expand Down Expand Up @@ -80,6 +81,18 @@ inline int strncasecmp(const char *s1, const char *s2, size_t n) {
return _strnicmp(s1,s2,n);
}

// VS doesn't provide strtok_r, which is a POSIX function. Instead, it
// provides the same function under the name strtok_s. Note that this is
// *not* the same as the C99 Annex K strtok_s. VS provides that function
// under the name strtok_s_l. Make strtok_r a synonym so we can use that name
// in shared code.
const auto strtok_r = strtok_s;

// VS doesn't provide POSIX macros S_ISFIFO or S_IFIFO. It doesn't even
// provide _S_ISFIFO, per its usual naming convention for POSIX stuff. But it
// does provide _S_IFIFO, so we can roll our own S_ISFIFO.
#define S_ISFIFO(mode) (((mode) & _S_IFIFO) == _S_IFIFO)

// Checking for nanness

inline int g_isnan(jfloat f) { return _isnan(f); }
Expand Down
58 changes: 8 additions & 50 deletions src/java.base/share/man/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -2895,6 +2895,12 @@ when they're used.
396](https://openjdk.org/jeps/396) and made obsolete in JDK 17
by [JEP 403](https://openjdk.org/jeps/403).

## Removed Java Options

These `java` options have been removed in JDK @@VERSION_SPECIFICATION@@ and using them results in an error of:

> `Unrecognized VM option` *option-name*
`-XX:RTMAbortRatio=`*abort\_ratio*
: Specifies the RTM abort ratio is specified as a percentage (%) of all
executed RTM transactions. If a number of aborted transactions becomes
Expand Down Expand Up @@ -2954,58 +2960,10 @@ when they're used.
processors, which forces them to read from main memory instead of their
cache.

## Removed Java Options

These `java` options have been removed in JDK @@VERSION_SPECIFICATION@@ and using them results in an error of:

> `Unrecognized VM option` *option-name*
`-XX:InitialRAMFraction=`*ratio*
: Sets the initial amount of memory that the JVM may use for the Java heap
before applying ergonomics heuristics as a ratio of the maximum amount
determined as described in the `-XX:MaxRAM` option. The default value is
64.

Use the option `-XX:InitialRAMPercentage` instead.

`-XX:MaxRAMFraction=`*ratio*
: Sets the maximum amount of memory that the JVM may use for the Java heap
before applying ergonomics heuristics as a fraction of the maximum amount
determined as described in the `-XX:MaxRAM` option. The default value is 4.

Specifying this option disables automatic use of compressed oops if
the combined result of this and other options influencing the maximum amount
of memory is larger than the range of memory addressable by compressed oops.
See `-XX:UseCompressedOops` for further information about compressed oops.

Use the option `-XX:MaxRAMPercentage` instead.

`-XX:MinRAMFraction=`*ratio*
: Sets the maximum amount of memory that the JVM may use for the Java heap
before applying ergonomics heuristics as a fraction of the maximum amount
determined as described in the `-XX:MaxRAM` option for small heaps. A small
heap is a heap of approximately 125 MB. The default value is 2.

Use the option `-XX:MinRAMPercentage` instead.

`-XX:+ScavengeBeforeFullGC`
: Enables GC of the young generation before each full GC. This option is
enabled by default. It is recommended that you *don't* disable it, because
scavenging the young generation before a full GC can reduce the number of
objects reachable from the old generation space into the young generation
space. To disable GC of the young generation before each full GC, specify
the option `-XX:-ScavengeBeforeFullGC`.

`-Xfuture`
: Enables strict class-file format checks that enforce close conformance to
the class-file format specification. Developers should use this flag when
developing new code. Stricter checks may become the default in future
releases.

Use the option `-Xverify:all` instead.

For the lists and descriptions of options removed in previous releases see the *Removed Java Options* section in:

- [The `java` Command, Release 24](https://docs.oracle.com/en/java/javase/24/docs/specs/man/java.html)

- [The `java` Command, Release 23](https://docs.oracle.com/en/java/javase/23/docs/specs/man/java.html)

- [The `java` Command, Release 22](https://docs.oracle.com/en/java/javase/22/docs/specs/man/java.html)
Expand Down
4 changes: 3 additions & 1 deletion src/java.base/share/native/libjava/ub.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
*
* 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.
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*
* 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.
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*
* 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.
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*
* 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.
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*
* 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.
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*
* 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.
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,13 @@ public double getProcessCpuLoad() {
}

private boolean isCpuSetSameAsHostCpuSet() {
if (containerMetrics != null && containerMetrics.getCpuSetCpus() != null) {
return containerMetrics.getCpuSetCpus().length == getHostOnlineCpuCount0();
if (containerMetrics != null) {
// The return value may change (including from non-null to null) and
// the call may involve I/O, so keep the result in a local variable.
int[] cpuSetCpus = containerMetrics.getCpuSetCpus();
if (cpuSetCpus != null) {
return cpuSetCpus.length == getHostOnlineCpuCount0();
}
}
return false;
}
Expand Down
3 changes: 2 additions & 1 deletion test/jdk/sun/security/tools/jarsigner/TsacertOptionTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -103,6 +103,7 @@ void start() throws Throwable {
"-alias", CA_KEY_ALIAS,
"-keystore", KEYSTORE,
"-storepass", PASSWORD,
"-startdate", "-1M",
"-keypass", PASSWORD,
"-validity", Integer.toString(VALIDITY),
"-infile", "certreq",
Expand Down

0 comments on commit 83689cd

Please sign in to comment.