Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
1680243
8366572: Bump update version of OpenJDK: 11.0.30
gnu-andrew Sep 3, 2025
43b28ee
8364597: Replace THL A29 Limited with Tencent
Sep 15, 2025
465fb7d
8359402: Test CloseDescriptors.java should throw SkippedException whe…
Sep 16, 2025
26a8aca
8354941: Build failure with glibc 2.42 due to uabs() name collision
fandreuz Sep 19, 2025
156d998
8224087: Compile C code for at least C99 Standard compliance
zzambers Sep 22, 2025
7c21bad
8299748: java/util/zip/Deinflate.java failing on s390x
Sep 23, 2025
2721380
8271456: Avoid looking up standard charsets in "java.desktop" module
TimPushkin Sep 23, 2025
78b8b24
8336854: CAInterop.java#actalisauthenticationrootca conflicted with /…
jerboaa Sep 26, 2025
8a13967
8351933: Inaccurate masking of TC subfield decrement in ForkJoinPool
Oct 2, 2025
b638bb3
8263622: The java.awt.color.ICC_Profile#setData invert the order of b…
Oct 7, 2025
c3e442a
8355528: Update HarfBuzz to 11.2.0
Oct 21, 2025
fd23a93
8274893: Update java.desktop classes to use try-with-resources
TimPushkin Oct 21, 2025
f0bb682
8358004: Delete applications/scimark/Scimark.java test
Oct 22, 2025
c5f39c9
8366359: Test should throw SkippedException when there is no lpstat
Oct 22, 2025
085a7f1
8347911: Limit the length of inflated text chunks
TimPushkin Oct 22, 2025
94dfb3e
8350813: Rendering of bulky sound bank from MIDI sequence can cause O…
Oct 27, 2025
9c5f0dd
Merge
gnu-andrew Nov 2, 2025
c40bce3
8339280: jarsigner -verify performs cross-checking between CEN and LOC
franferrax Nov 6, 2025
89b48ae
8341861: GHA: Use only retention mechanism to remove bundles
shipilev Nov 12, 2025
c3be801
8295301: Problem list TrayIcon tests that fail on Ubuntu 22.04
mrserb Nov 12, 2025
2eaffb0
8264524: jdk/internal/platform/docker/TestDockerMemoryMetrics.java fa…
Nov 13, 2025
912a12b
8357657: [11u][windows] cannot stat '/jdk.crypto.ec/*': No such file …
mrserb Nov 13, 2025
9b9babc
8347129: cpuset cgroups controller is required for no good reason
antonvoznia Nov 13, 2025
22942ef
8366125: [11u] Test compiler/loopopts/TestRangeCheckPredicatesControl…
Nov 19, 2025
1b0f612
8369226: GHA: Switch to MacOS 15
Nov 19, 2025
a9de6b6
8336451: [11u] GHA macos-13 and macos-15 builders are unable to resol…
Nov 19, 2025
9b42765
8313083: Print 'rss' and 'cache' as part of the container information
Nov 19, 2025
2df5d20
8368192: Test java/lang/ProcessBuilder/Basic.java#id0 fails with Exce…
Nov 20, 2025
37f8029
8341964: Add mechanism to disable different parts of TLS cipher suite
TheMangovnik Nov 26, 2025
3cc55c3
8368982: Test sun/security/tools/jarsigner/EC.java completed and time…
Dec 3, 2025
c5cef8c
8257709: C1: Double assignment in InstructionPrinter::print_stack
elifaslan1 Dec 3, 2025
1939efc
8213781: web page background renders blue in JEditorPane
TheMangovnik Dec 3, 2025
463e25f
8245545: Disable TLS_RSA cipher suites
TheMangovnik Dec 3, 2025
b99b989
8337506: Disable "best-fit" mapping on Windows command line
Dec 5, 2025
b034713
8347381: Upgrade jQuery UI to version 1.14.1
Dec 5, 2025
7003054
8317970: Bump target macosx-x64 version to 11.00.00
Dec 20, 2025
be7966c
8372534: Update Libpng to 1.6.51
gnu-andrew Dec 26, 2025
f662256
8265429: Improve GCM encryption
franferrax Jan 8, 2026
eea83ee
8341496: Improve JMX connections
franferrax Jan 2, 2026
93af47b
8364660: ClassVerifier::ends_in_athrow() should be removed
gnu-andrew Dec 17, 2025
dc85930
8359501: Enhance Handling of URIs
Dec 22, 2025
1d49c29
8362308: Enhance Bitmap operations
Dec 23, 2025
8eaf265
8362632: Improve HttpServer Request handling
Dec 3, 2025
095d8a3
8364214: Enhance polygon data support
Dec 15, 2025
32f6b3c
8365058: Enhance CopyOnWriteArraySet
Dec 15, 2025
689dd65
8365271: Improve Swing supports
Dec 12, 2025
5d80a0e
8368032: Enhance Certificate Checking
Dec 10, 2025
550a829
Merge tag 'jdk-11.0.30+7' into dragonwell_standard-11.0.30.26.7
Ann-1024 Feb 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ on:
jobs:
build-macos:
name: build
runs-on: macos-13
runs-on: macos-15-intel

strategy:
fail-fast: false
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
run: |
# Run Homebrew installation and xcode-select
brew install make
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer
# This will make GNU make available as 'make' and not only as 'gmake'
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH

Expand Down
49 changes: 3 additions & 46 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-x64
xcode-toolset-version: '14.3.1'
xcode-toolset-version: '16.4'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.macos-x64 == 'true'
Expand All @@ -234,7 +234,7 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-aarch64
xcode-toolset-version: '14.3.1'
xcode-toolset-version: '16.4'
extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
Expand Down Expand Up @@ -298,7 +298,7 @@ jobs:
with:
platform: macos-x64
bootjdk-platform: macos-x64
runs-on: macos-13
runs-on: macos-15-intel

test-windows-x64:
name: windows-x64
Expand All @@ -310,46 +310,3 @@ jobs:
bootjdk-platform: windows-x64
runs-on: windows-2025

# Remove bundles so they are not misconstrued as binary distributions from the JDK project
remove-bundles:
name: 'Remove bundle artifacts'
runs-on: ubuntu-22.04
if: always()
needs:
- build-linux-x64
- build-linux-x86
- build-linux-x64-hs-nopch
- build-linux-x64-hs-zero
- build-linux-x64-hs-minimal
- build-linux-x64-hs-optimized
- build-linux-cross-compile
- build-macos-x64
- build-macos-aarch64
- build-windows-x64
- build-windows-aarch64
- test-linux-x64
- test-linux-x86
- test-macos-x64
- test-windows-x64

steps:
- name: 'Remove bundle artifacts'
run: |
# Find and remove all bundle artifacts
# See: https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28
ALL_ARTIFACT_IDS="$(curl -sL \
-H 'Accept: application/vnd.github+json' \
-H 'Authorization: Bearer ${{ github.token }}' \
-H 'X-GitHub-Api-Version: 2022-11-28' \
'${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts?per_page=100')"
BUNDLE_ARTIFACT_IDS="$(echo "$ALL_ARTIFACT_IDS" | jq -r -c '.artifacts | map(select(.name|startswith("bundles-"))) | .[].id')"
for id in $BUNDLE_ARTIFACT_IDS; do
echo "Removing $id"
curl -sL \
-X DELETE \
-H 'Accept: application/vnd.github+json' \
-H 'Authorization: Bearer ${{ github.token }}' \
-H 'X-GitHub-Api-Version: 2022-11-28' \
"${{ github.api_url }}/repos/${{ github.repository }}/actions/artifacts/$id" \
|| echo "Failed to remove bundle"
done
9 changes: 8 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,18 @@ jobs:
run: |
# On macOS we need to install some dependencies for testing
brew install make
sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer
# This will make GNU make available as 'make' and not only as 'gmake'
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
if: runner.os == 'macOS'

# Fixes JDK-8336451
- name: 'Update /etc/hosts on macos'
run: |
echo -e "127.0.0.1 $(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts
echo -e "" | sudo tee -a /etc/hosts
if: runner.os == 'macOS'

- name: 'Set PATH'
id: path
run: |
Expand Down
2 changes: 1 addition & 1 deletion .jcheck/conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
project=jdk-updates
jbs=JDK
version=11.0.29
version=11.0.30

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
Expand Down
4 changes: 4 additions & 0 deletions doc/building.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requ
</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 4.8. 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 7.4 of gcc.</p>
Expand Down
5 changes: 5 additions & 0 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ issues.
| Solaris | Oracle Solaris Studio 12.4 (with compiler version 5.13) |
| Windows | Microsoft Visual Studio 2017 update 15.9.16 |

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.

### gcc

The minimum accepted version of gcc is 4.8. Older versions will generate a warning
Expand Down
15 changes: 10 additions & 5 deletions make/CompileJavaModules.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,13 @@ jdk.jfr_ADD_JAVAC_FLAGS := -XDstringConcat=inline -Xlint:-exports
################################################################################
# If this is an imported module that has prebuilt classes, only compile
# module-info.java.
ifneq ($(wildcard $(IMPORT_MODULES_CLASSES)/$(MODULE)), )
$(MODULE)_INCLUDE_FILES := module-info.java
ifneq ($(IMPORT_MODULES_CLASSES), )
IMPORT_MODULE_DIR := $(IMPORT_MODULES_CLASSES)/$(MODULE)
ifneq ($(wildcard $(IMPORT_MODULE_DIR)), )
$(MODULE)_INCLUDE_FILES := module-info.java
endif
else
IMPORT_MODULE_DIR :=
endif

################################################################################
Expand Down Expand Up @@ -638,13 +643,13 @@ endif
# If this is an imported module, copy the pre built classes and resources into
# the modules output dir

ifneq ($(wildcard $(IMPORT_MODULES_CLASSES)/$(MODULE)), )
ifneq ($(wildcard $(IMPORT_MODULE_DIR)), )
$(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker: \
$(call FindFiles, $(IMPORT_MODULES_CLASSES)/$(MODULE))
$(call FindFiles, $(IMPORT_MODULE_DIR))
$(call MakeDir, $(@D))
# Do not delete marker and build meta data files
$(RM) -r $(filter-out $(@D)/_%, $(wildcard $(@D)/*))
$(CP) -R $(IMPORT_MODULES_CLASSES)/$(MODULE)/* $(@D)/
$(CP) -R $(IMPORT_MODULE_DIR)/* $(@D)/
$(TOUCH) $@

TARGETS += $(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker
Expand Down
26 changes: 25 additions & 1 deletion make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
TOOLCHAIN_CFLAGS="-errshort=tags"

TOOLCHAIN_CFLAGS_JDK="-mt $TOOLCHAIN_FLAGS"
TOOLCHAIN_CFLAGS_JDK_CONLY="-xCC -Xa -W0,-noglobal $TOOLCHAIN_CFLAGS" # C only
TOOLCHAIN_CFLAGS_JDK_CONLY="-W0,-noglobal $TOOLCHAIN_CFLAGS" # C only
TOOLCHAIN_CFLAGS_JDK_CXXONLY="-features=no%except -norunpath -xnolib" # CXX only
TOOLCHAIN_CFLAGS_JVM="-template=no%extdef -features=no%split_init \
-library=stlport4 -mt -features=no%except $TOOLCHAIN_FLAGS"
Expand All @@ -584,6 +584,30 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:wchar_t-"
fi

# CFLAGS C language level for JDK sources (hotspot only uses C++)
# Ideally we would have a common level across all toolchains so that all sources
# are sure to conform to the same standard. Unfortunately neither our sources nor
# our toolchains are in a condition to support that. But what we loosely aim for is
# C99 level.
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then
# This raises the language level for older 4.8 gcc, while lowering it for later
# versions. clang and xlclang support the same flag.
LANGSTD_CFLAGS="-std=c99"
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
# We can't turn on -std=c99 without breaking compilation of the splashscreen/png
# utilities. But we can enable c99 as below (previously achieved by using -Xa).
# It is the no_lib that makes the difference.
LANGSTD_CFLAGS="-xc99=all,no_lib"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# MSVC doesn't support C99/C11 explicitly, unless you compile as C++:
# LANGSTD_CFLAGS="/TP"
# but that requires numerous changes to the sources files. So we are limited
# to C89/C90 plus whatever extensions Visual Studio has decided to implement.
# This is the lowest bar for shared code.
LANGSTD_CFLAGS=""
fi
TOOLCHAIN_CFLAGS_JDK_CONLY="$LANGSTD_CFLAGS $TOOLCHAIN_CFLAGS_JDK_CONLY"

# CFLAGS WARNINGS STUFF
# Set JVM_CFLAGS warning handling
if test "x$TOOLCHAIN_TYPE" = xgcc; then
Expand Down
10 changes: 3 additions & 7 deletions make/autoconf/flags.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 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 @@ -114,16 +114,12 @@ AC_DEFUN([FLAGS_SETUP_MACOSX_VERSION],
# The expected format for <version> is either nn.n.n or nn.nn.nn. See
# /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/AvailabilityVersions.h

# MACOSX_VERSION_MIN specifies the lowest version of Macosx that the built
# MACOSX_VERSION_MIN specifies the lowest version of macOS that the built
# binaries should be compatible with, even if compiled on a newer version
# of the OS. It currently has a hard coded value. Setting this also limits
# exposure to API changes in header files. Bumping this is likely to
# require code changes to build.
if test "x$OPENJDK_TARGET_CPU_ARCH" = xaarch64; then
MACOSX_VERSION_MIN=11.00.00
else
MACOSX_VERSION_MIN=10.12.0
fi
MACOSX_VERSION_MIN=11.00.00
MACOSX_VERSION_MIN_NODOTS=${MACOSX_VERSION_MIN//\./}

AC_SUBST(MACOSX_VERSION_MIN)
Expand Down
4 changes: 2 additions & 2 deletions make/autoconf/version-numbers
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@

DEFAULT_VERSION_FEATURE=11
DEFAULT_VERSION_INTERIM=0
DEFAULT_VERSION_UPDATE=29
DEFAULT_VERSION_UPDATE=30
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_EXTRA1=0
DEFAULT_VERSION_EXTRA2=0
DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2025-10-21
DEFAULT_VERSION_DATE=2026-01-20
DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="10 11"
Expand Down
4 changes: 2 additions & 2 deletions make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
* 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 @@ -415,7 +415,7 @@ var getJibProfilesProfiles = function (input, common, data) {
target_cpu: "x64",
dependencies: ["devkit", "graalunit_lib"],
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
"--with-macosx-version-max=10.12.00"),
"--with-macosx-version-max=11.00.00"),
},

"solaris-x64": {
Expand Down
1 change: 0 additions & 1 deletion make/lib/Awt2dLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBLCMS, \
OPTIMIZATION := HIGHEST, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LCMS_CFLAGS), \
CFLAGS_solaris := -xc99=no_lib, \
CFLAGS_windows := -DCMS_IS_WINDOWS_, \
EXTRA_HEADER_DIRS := \
common/awt/debug \
Expand Down
5 changes: 5 additions & 0 deletions src/bsd/doc/man/jarsigner.1
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,11 @@ Informational warnings include those that are not errors but regarded as bad pra
hasExpiringCert
This jar contains entries whose signer certificate will expire within six months\&.
.TP
internalInconsistenciesDetected
This jar contains internal inconsistencies detected during verification
that may result in different contents when reading via JarFile
and JarInputStream\&.
.TP
noTimestamp
This jar contains signatures that does not include a timestamp\&. Without a timestamp, users may not be able to validate this JAR file after the signer certificate\&'s expiration date (\f3YYYY-MM-DD\fR) or after any future revocation date\&.
.SH EXAMPLES
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/assembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,7 @@ void Assembler::add_sub_immediate(Register Rd, Register Rn, unsigned uimm, int o
}

bool Assembler::operand_valid_for_add_sub_immediate(int64_t imm) {
uint64_t uimm = (uint64_t)uabs((jlong)imm);
uint64_t uimm = (uint64_t)g_uabs((jlong)imm);
if (uimm < (1 << 12))
return true;
if (uimm < (1 << 24)
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/assembler_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ class Assembler : public AbstractAssembler {
static const uint64_t branch_range = NOT_DEBUG(128 * M) DEBUG_ONLY(2 * M);

static bool reachable_from_branch_at(address branch, address target) {
return uabs(target - branch) < branch_range;
return g_uabs(target - branch) < branch_range;
}

// Unconditional branch (immediate)
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,7 @@ void MacroAssembler::wrap_add_sub_imm_insn(Register Rd, Register Rn, unsigned im
if (operand_valid_for_add_sub_immediate((int)imm)) {
(this->*insn1)(Rd, Rn, imm);
} else {
if (uabs(imm) < (1 << 24)) {
if (g_uabs(imm) < (1 << 24)) {
(this->*insn1)(Rd, Rn, imm & -(1 << 12));
(this->*insn1)(Rd, Rd, imm & ((1 << 12)-1));
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ class StubGenerator: public StubCodeGenerator {

void copy_memory_small(Register s, Register d, Register count, Register tmp, int step) {
bool is_backwards = step < 0;
size_t granularity = uabs(step);
size_t granularity = g_uabs(step);
int direction = is_backwards ? -1 : 1;
int unit = wordSize * direction;

Expand Down Expand Up @@ -1065,7 +1065,7 @@ class StubGenerator: public StubCodeGenerator {
Register count, Register tmp, int step) {
copy_direction direction = step < 0 ? copy_backwards : copy_forwards;
bool is_backwards = step < 0;
unsigned int granularity = uabs(step);
unsigned int granularity = g_uabs(step);
const Register t0 = r3, t1 = r4;

// <= 80 (or 96 for SIMD) bytes do inline. Direction doesn't matter because we always
Expand Down
10 changes: 6 additions & 4 deletions src/hotspot/os/linux/cgroupSubsystem_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "utilities/globalDefinitions.hpp"

// controller names have to match the *_IDX indices
static const char* cg_controller_name[] = { "cpu", "cpuset", "cpuacct", "memory", "pids" };
static const char* cg_controller_name[] = { "cpuset", "cpu", "cpuacct", "memory", "pids" };

CgroupSubsystem* CgroupSubsystemFactory::create() {
CgroupV1MemoryController* memory = NULL;
Expand Down Expand Up @@ -159,9 +159,10 @@ bool CgroupSubsystemFactory::determine_type(CgroupInfo* cg_infos,
char buf[MAXPATHLEN+1];
char *p;
bool is_cgroupsV2;
// true iff all required controllers, memory, cpu, cpuset, cpuacct are enabled
// true iff all required controllers, memory, cpu, cpuacct are enabled
// at the kernel level.
// pids might not be enabled on older Linux distros (SLES 12.1, RHEL 7.1)
// cpuset might not be enabled on newer Linux distros (Fedora 41)
bool all_required_controllers_enabled;

/*
Expand Down Expand Up @@ -193,6 +194,7 @@ bool CgroupSubsystemFactory::determine_type(CgroupInfo* cg_infos,
cg_infos[MEMORY_IDX]._hierarchy_id = hierarchy_id;
cg_infos[MEMORY_IDX]._enabled = (enabled == 1);
} else if (strcmp(name, "cpuset") == 0) {
log_debug(os, container)("Detected optional cpuset controller entry in %s", proc_cgroups);
cg_infos[CPUSET_IDX]._name = os::strdup(name);
cg_infos[CPUSET_IDX]._hierarchy_id = hierarchy_id;
cg_infos[CPUSET_IDX]._enabled = (enabled == 1);
Expand All @@ -216,8 +218,8 @@ bool CgroupSubsystemFactory::determine_type(CgroupInfo* cg_infos,
is_cgroupsV2 = true;
all_required_controllers_enabled = true;
for (int i = 0; i < CG_INFO_LENGTH; i++) {
// pids controller is optional. All other controllers are required
if (i != PIDS_IDX) {
// pids and cpuset controllers are optional. All other controllers are required
if (i != PIDS_IDX && i != CPUSET_IDX) {
is_cgroupsV2 = is_cgroupsV2 && cg_infos[i]._hierarchy_id == 0;
all_required_controllers_enabled = all_required_controllers_enabled && cg_infos[i]._enabled;
}
Expand Down
2 changes: 2 additions & 0 deletions src/hotspot/os/linux/cgroupSubsystem_linux.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ class CgroupSubsystem: public CHeapObj<mtInternal> {
virtual jlong memory_and_swap_limit_in_bytes() = 0;
virtual jlong memory_soft_limit_in_bytes() = 0;
virtual jlong memory_max_usage_in_bytes() = 0;
virtual jlong rss_usage_in_bytes() = 0;
virtual jlong cache_usage_in_bytes() = 0;

virtual char * cpu_cpuset_cpus() = 0;
virtual char * cpu_cpuset_memory_nodes() = 0;
Expand Down
Loading
Loading