Skip to content

Commit 0f39b7e

Browse files
authored
Merge branch 'openjdk:master' into backport-sendaoYan-7312eea3-master
2 parents 209a0cf + cb258e5 commit 0f39b7e

File tree

302 files changed

+10601
-4996
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

302 files changed

+10601
-4996
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ jobs:
235235
uses: ./.github/workflows/build-macos.yml
236236
with:
237237
platform: macos-x64
238-
runs-on: 'macos-13'
239-
xcode-toolset-version: '14.3.1'
238+
runs-on: 'macos-15-intel'
239+
xcode-toolset-version: '16.4'
240240
configure-arguments: ${{ github.event.inputs.configure-arguments }}
241241
make-arguments: ${{ github.event.inputs.make-arguments }}
242242
if: needs.prepare.outputs.macos-x64 == 'true'
@@ -247,8 +247,8 @@ jobs:
247247
uses: ./.github/workflows/build-macos.yml
248248
with:
249249
platform: macos-aarch64
250-
runs-on: 'macos-14'
251-
xcode-toolset-version: '15.4'
250+
runs-on: 'macos-15'
251+
xcode-toolset-version: '16.4'
252252
configure-arguments: ${{ github.event.inputs.configure-arguments }}
253253
make-arguments: ${{ github.event.inputs.make-arguments }}
254254
if: needs.prepare.outputs.macos-aarch64 == 'true'
@@ -293,17 +293,6 @@ jobs:
293293
bootjdk-platform: linux-x64
294294
runs-on: ubuntu-22.04
295295

296-
test-macos-x64:
297-
name: macos-x64
298-
needs:
299-
- build-macos-x64
300-
uses: ./.github/workflows/test.yml
301-
with:
302-
platform: macos-x64
303-
bootjdk-platform: macos-x64
304-
runs-on: macos-13
305-
xcode-toolset-version: '14.3.1'
306-
307296
test-macos-aarch64:
308297
name: macos-aarch64
309298
needs:
@@ -312,8 +301,8 @@ jobs:
312301
with:
313302
platform: macos-aarch64
314303
bootjdk-platform: macos-aarch64
315-
runs-on: macos-14
316-
xcode-toolset-version: '15.4'
304+
runs-on: macos-15
305+
xcode-toolset-version: '16.4'
317306

318307
test-windows-x64:
319308
name: windows-x64
@@ -325,46 +314,3 @@ jobs:
325314
bootjdk-platform: windows-x64
326315
runs-on: windows-2025
327316

328-
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
329-
remove-bundles:
330-
name: 'Remove bundle artifacts'
331-
runs-on: ubuntu-22.04
332-
if: always()
333-
needs:
334-
- build-linux-x64
335-
- build-linux-x86-hs
336-
- build-linux-x64-hs-nopch
337-
- build-linux-x64-hs-zero
338-
- build-linux-x64-hs-minimal
339-
- build-linux-x64-hs-optimized
340-
- build-linux-cross-compile
341-
- build-macos-x64
342-
- build-macos-aarch64
343-
- build-windows-x64
344-
- build-windows-aarch64
345-
- test-linux-x64
346-
- test-macos-x64
347-
- test-macos-aarch64
348-
- test-windows-x64
349-
350-
steps:
351-
- name: 'Remove bundle artifacts'
352-
run: |
353-
# Find and remove all bundle artifacts
354-
# See: https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28
355-
ALL_ARTIFACT_IDS="$(curl -sL \
356-
-H 'Accept: application/vnd.github+json' \
357-
-H 'Authorization: Bearer ${{ github.token }}' \
358-
-H 'X-GitHub-Api-Version: 2022-11-28' \
359-
'${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts?per_page=100')"
360-
BUNDLE_ARTIFACT_IDS="$(echo "$ALL_ARTIFACT_IDS" | jq -r -c '.artifacts | map(select(.name|startswith("bundles-"))) | .[].id')"
361-
for id in $BUNDLE_ARTIFACT_IDS; do
362-
echo "Removing $id"
363-
curl -sL \
364-
-X DELETE \
365-
-H 'Accept: application/vnd.github+json' \
366-
-H 'Authorization: Bearer ${{ github.token }}' \
367-
-H 'X-GitHub-Api-Version: 2022-11-28' \
368-
"${{ github.api_url }}/repos/${{ github.repository }}/actions/artifacts/$id" \
369-
|| echo "Failed to remove bundle"
370-
done

make/autoconf/basic_tools.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
373373
374374
# Check if it's a GNU date compatible version
375375
AC_MSG_CHECKING([if date is a GNU compatible version])
376-
check_date=`$DATE --version 2>&1 | $GREP "GNU\|BusyBox"`
376+
check_date=`$DATE --version 2>&1 | $GREP "GNU\|BusyBox\|uutils"`
377377
if test "x$check_date" != x; then
378378
AC_MSG_RESULT([yes])
379379
IS_GNU_DATE=yes

make/autoconf/flags-cflags.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
544544
TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced \
545545
-qalias=noansi -qstrict -qtls=default -qnortti -qnoeh -qignerrno -qstackprotect"
546546
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
547-
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -MP"
548-
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:wchar_t-"
547+
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:strictStrings -MP"
548+
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:strictStrings -Zc:wchar_t-"
549549
fi
550550
551551
# CFLAGS C language level for JDK sources (hotspot only uses C++)

make/common/MakeBase.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ $(eval $(call SetupLogging))
199199

200200
################################################################################
201201

202-
MAX_PARAMS := 36
202+
MAX_PARAMS := 96
203203
PARAM_SEQUENCE := $(call sequence, 2, $(MAX_PARAMS))
204204

205205
# Template for creating a macro taking named parameters. To use it, assign the

make/common/NativeCompilation.gmk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,18 +363,20 @@ define SetupCompileNativeFileBody
363363
endif
364364

365365
$1_BASE_CFLAGS := $$($$($1_BASE)_CFLAGS) $$($$($1_BASE)_EXTRA_CFLAGS) \
366-
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_WARNINGS_FLAGS)
366+
$$($$($1_BASE)_SYSROOT_CFLAGS)
367367
$1_BASE_CXXFLAGS := $$($$($1_BASE)_CXXFLAGS) $$($$($1_BASE)_EXTRA_CXXFLAGS) \
368-
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_WARNINGS_FLAGS)
368+
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS)
369369
$1_BASE_ASFLAGS := $$($$($1_BASE)_ASFLAGS) $$($$($1_BASE)_EXTRA_ASFLAGS)
370370

371371
ifneq ($$(filter %.c, $$($1_FILENAME)), )
372372
# Compile as a C file
373+
$1_CFLAGS += $$($1_WARNINGS_FLAGS)
373374
$1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CFLAGS) \
374375
$$($1_OPT_CFLAGS) $$($1_CFLAGS) -c
375376
$1_COMPILER := $$($$($1_BASE)_CC)
376377
else ifneq ($$(filter %.m, $$($1_FILENAME)), )
377378
# Compile as an Objective-C file
379+
$1_CFLAGS += $$($1_WARNINGS_FLAGS)
378380
$1_FLAGS := -x objective-c $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) \
379381
$$($1_BASE_CFLAGS) $$($1_OPT_CFLAGS) $$($1_CFLAGS) -c
380382
$1_COMPILER := $$($$($1_BASE)_CC)
@@ -398,6 +400,7 @@ define SetupCompileNativeFileBody
398400
endif
399401
else ifneq ($$(filter %.cpp %.cc %.mm, $$($1_FILENAME)), )
400402
# Compile as a C++ or Objective-C++ file
403+
$1_CXXFLAGS += $$($1_WARNINGS_FLAGS)
401404
$1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CXXFLAGS) \
402405
$$($1_OPT_CXXFLAGS) $$($1_CXXFLAGS) -c
403406
$1_COMPILER := $$($$($1_BASE)_CXX)

make/hotspot/lib/CompileGtest.gmk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,12 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
103103
CFLAGS_macosx := -DGTEST_OS_MAC=1, \
104104
DISABLED_WARNINGS_gcc := $(DISABLED_WARNINGS_gcc) \
105105
undef stringop-overflow, \
106+
DISABLED_WARNINGS_gcc_test_threadCpuLoad.cpp := address, \
106107
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang) \
107108
undef switch format-nonliteral tautological-undefined-compare \
108109
self-assign-overloaded, \
110+
DISABLED_WARNINGS_clang_test_g1ServiceThread.cpp := delete-abstract-non-virtual-dtor, \
111+
DISABLED_WARNINGS_clang_test_logDecorations.cpp := missing-field-initializers, \
109112
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
110113
LDFLAGS := $(JVM_LDFLAGS), \
111114
LDFLAGS_unix := -L$(JVM_OUTPUTDIR)/libgtest, \

make/hotspot/lib/CompileJvm.gmk

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,17 @@ endif
7777
################################################################################
7878
# Disabled warnings
7979

80-
DISABLED_WARNINGS_gcc := parentheses comment unknown-pragmas address \
81-
delete-non-virtual-dtor char-subscripts array-bounds int-in-bool-context \
82-
ignored-qualifiers missing-field-initializers implicit-fallthrough \
83-
empty-body strict-overflow sequence-point maybe-uninitialized \
84-
misleading-indentation cast-function-type shift-negative-value
85-
86-
ifeq ($(call check-jvm-feature, zero), true)
87-
DISABLED_WARNINGS_gcc += return-type switch clobbered
80+
DISABLED_WARNINGS_gcc := array-bounds comment delete-non-virtual-dtor \
81+
empty-body ignored-qualifiers implicit-fallthrough int-in-bool-context \
82+
maybe-uninitialized missing-field-initializers parentheses \
83+
shift-negative-value unknown-pragmas strict-overflow
84+
85+
DISABLED_WARNINGS_clang := ignored-qualifiers sometimes-uninitialized \
86+
missing-braces delete-non-abstract-non-virtual-dtor unknown-pragmas
87+
88+
ifneq ($(DEBUG_LEVEL), release)
89+
# Assert macro gives warning
90+
DISABLED_WARNINGS_clang += tautological-constant-out-of-range-compare
8891
endif
8992

9093
ifeq ($(DEBUG_LEVEL), fastdebug)
@@ -94,16 +97,9 @@ ifeq ($(DEBUG_LEVEL), fastdebug)
9497
endif
9598
endif
9699

97-
DISABLED_WARNINGS_clang := tautological-compare \
98-
undefined-var-template sometimes-uninitialized unknown-pragmas \
99-
delete-non-virtual-dtor missing-braces char-subscripts \
100-
ignored-qualifiers missing-field-initializers mismatched-tags \
101-
shift-negative-value misleading-indentation
102-
103100
DISABLED_WARNINGS_xlc := tautological-compare shift-negative-value
104101

105-
DISABLED_WARNINGS_microsoft := 4100 4127 4146 4201 4244 4291 4351 \
106-
4511 4512 4514 4624 4996
102+
DISABLED_WARNINGS_microsoft := 4624 4244 4291 4146 4127 4996
107103

108104
################################################################################
109105
# Platform specific setup
@@ -157,9 +153,42 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
157153
abstract_vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
158154
arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
159155
DISABLED_WARNINGS_gcc := $(DISABLED_WARNINGS_gcc), \
156+
DISABLED_WARNINGS_gcc_ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp := nonnull, \
157+
DISABLED_WARNINGS_gcc_assembler_aarch64.cpp := misleading-indentation, \
158+
DISABLED_WARNINGS_gcc_c1_LIR.cpp := misleading-indentation, \
159+
DISABLED_WARNINGS_gcc_cgroupV1Subsystem_linux.cpp := address, \
160+
DISABLED_WARNINGS_gcc_cgroupV2Subsystem_linux.cpp := address, \
161+
DISABLED_WARNINGS_gcc_dict.cpp := char-subscripts, \
162+
DISABLED_WARNINGS_gcc_interp_masm_x86.cpp := uninitialized, \
163+
DISABLED_WARNINGS_gcc_javaClasses.cpp := misleading-indentation, \
164+
DISABLED_WARNINGS_gcc_loopnode.cpp := sequence-point, \
165+
DISABLED_WARNINGS_gcc_postaloc.cpp := address, \
166+
DISABLED_WARNINGS_gcc_sharedRuntimeTrig.cpp := misleading-indentation, \
167+
DISABLED_WARNINGS_gcc_shenandoahBarrierSet.cpp := misleading-indentation, \
168+
DISABLED_WARNINGS_gcc_shenandoahBarrierSetAssembler_aarch64.cpp := misleading-indentation, \
169+
DISABLED_WARNINGS_gcc_shenandoahBarrierSetAssembler_ppc.cpp := misleading-indentation, \
170+
DISABLED_WARNINGS_gcc_shenandoahBarrierSetAssembler_riscv.cpp := misleading-indentation, \
171+
DISABLED_WARNINGS_gcc_shenandoahBarrierSetAssembler_x86.cpp := misleading-indentation, \
172+
DISABLED_WARNINGS_gcc_shenandoahBarrierSetC1_aarch64.cpp := misleading-indentation, \
173+
DISABLED_WARNINGS_gcc_shenandoahBarrierSetC1_ppc.cpp := misleading-indentation, \
174+
DISABLED_WARNINGS_gcc_shenandoahBarrierSetC1_riscv.cpp := misleading-indentation, \
175+
DISABLED_WARNINGS_gcc_shenandoahBarrierSetC1_x86.cpp := misleading-indentation, \
176+
DISABLED_WARNINGS_gcc_shenandoahBarrierSetC1.cpp := misleading-indentation, \
160177
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang), \
178+
DISABLED_WARNINGS_clang_arguments.cpp := missing-field-initializers, \
179+
DISABLED_WARNINGS_clang_codeBuffer.cpp := tautological-undefined-compare, \
180+
DISABLED_WARNINGS_clang_dict.cpp := char-subscripts, \
181+
DISABLED_WARNINGS_clang_directivesParser.cpp := missing-field-initializers, \
182+
DISABLED_WARNINGS_clang_g1ParScanThreadState.cpp := delete-abstract-non-virtual-dtor, \
183+
DISABLED_WARNINGS_clang_g1YoungGCPostEvacuateTasks.cpp := delete-abstract-non-virtual-dtor, \
184+
DISABLED_WARNINGS_clang_heapShared.cpp := missing-field-initializers, \
185+
DISABLED_WARNINGS_clang_management.cpp := missing-field-initializers, \
161186
DISABLED_WARNINGS_clang_notificationThread.cpp := bitwise-instead-of-logical, \
187+
DISABLED_WARNINGS_clang_os_posix.cpp := mismatched-tags missing-field-initializers, \
188+
DISABLED_WARNINGS_clang_postaloc.cpp := tautological-undefined-compare, \
162189
DISABLED_WARNINGS_clang_serviceThread.cpp := bitwise-instead-of-logical, \
190+
DISABLED_WARNINGS_clang_vm_version_x86.cpp := missing-field-initializers, \
191+
DISABLED_WARNINGS_clang_zTracer.cpp := undefined-var-template, \
163192
DISABLED_WARNINGS_xlc := $(DISABLED_WARNINGS_xlc), \
164193
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
165194
ASFLAGS := $(JVM_ASFLAGS), \

make/hotspot/lib/JvmOverrideFiles.gmk

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -33,9 +33,6 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
3333
BUILD_LIBJVM_vmStructs.cpp_CXXFLAGS := -fno-var-tracking-assignments
3434
BUILD_LIBJVM_jvmciCompilerToVM.cpp_CXXFLAGS := -fno-var-tracking-assignments
3535
BUILD_LIBJVM_jvmciCompilerToVMInit.cpp_CXXFLAGS := -fno-var-tracking-assignments
36-
BUILD_LIBJVM_assembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized
37-
BUILD_LIBJVM_cardTableBarrierSetAssembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized
38-
BUILD_LIBJVM_interp_masm_x86.cpp_CXXFLAGS := -Wno-uninitialized
3936
ifeq ($(DEBUG_LEVEL), release)
4037
# Need extra inlining to collapse shared marking code into the hot marking loop
4138
BUILD_LIBJVM_shenandoahMark.cpp_CXXFLAGS := --param inline-unit-growth=1000

src/hotspot/cpu/aarch64/aarch64.ad

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3398,7 +3398,7 @@ encode %{
33983398
}
33993399
%}
34003400

3401-
/// mov envcodings
3401+
// mov encodings
34023402

34033403
enc_class aarch64_enc_movw_imm(iRegI dst, immI src) %{
34043404
C2_MacroAssembler _masm(&cbuf);

src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,3 +1850,15 @@ void InterpreterMacroAssembler::profile_parameters_type(Register mdp, Register t
18501850
bind(profile_continue);
18511851
}
18521852
}
1853+
1854+
#ifdef ASSERT
1855+
void InterpreterMacroAssembler::verify_field_offset(Register reg) {
1856+
// Verify the field offset is not in the header, implicitly checks for 0
1857+
Label L;
1858+
subs(zr, reg, static_cast<int>(sizeof(markWord) + (UseCompressedClassPointers ? sizeof(narrowKlass) : sizeof(Klass*))));
1859+
br(Assembler::GE, L);
1860+
stop("bad field offset");
1861+
bind(L);
1862+
}
1863+
#endif
1864+

0 commit comments

Comments
 (0)