Skip to content

Commit c29e79d

Browse files
authored
Merge branch 'openjdk:master' into backport-sendaoYan-fe29cad5-master
2 parents 2514b75 + 6bf719d commit c29e79d

File tree

365 files changed

+16205
-4018
lines changed

Some content is hidden

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

365 files changed

+16205
-4018
lines changed

.github/workflows/build-cross-compile.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,33 +60,33 @@ jobs:
6060
gnu-arch: aarch64
6161
debian-arch: arm64
6262
debian-repository: https://httpredir.debian.org/debian/
63-
debian-version: bookworm
63+
debian-version: trixie
6464
tolerate-sysroot-errors: false
6565
- target-cpu: arm
6666
gnu-arch: arm
6767
debian-arch: armhf
6868
debian-repository: https://httpredir.debian.org/debian/
69-
debian-version: bookworm
69+
debian-version: trixie
7070
tolerate-sysroot-errors: false
7171
gnu-abi: eabihf
7272
- target-cpu: s390x
7373
gnu-arch: s390x
7474
debian-arch: s390x
7575
debian-repository: https://httpredir.debian.org/debian/
76-
debian-version: bookworm
76+
debian-version: trixie
7777
tolerate-sysroot-errors: false
7878
- target-cpu: ppc64le
7979
gnu-arch: powerpc64le
8080
debian-arch: ppc64el
8181
debian-repository: https://httpredir.debian.org/debian/
82-
debian-version: bookworm
82+
debian-version: trixie
8383
tolerate-sysroot-errors: false
8484
- target-cpu: riscv64
8585
gnu-arch: riscv64
8686
debian-arch: riscv64
8787
debian-repository: https://httpredir.debian.org/debian/
88-
debian-version: sid
89-
tolerate-sysroot-errors: true
88+
debian-version: trixie
89+
tolerate-sysroot-errors: false
9090

9191
steps:
9292
- name: 'Checkout the JDK source'

doc/building.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler
539539
<tbody>
540540
<tr class="odd">
541541
<td>Linux</td>
542-
<td>gcc 11.2.0</td>
542+
<td>gcc 13.2.0</td>
543543
</tr>
544544
<tr class="even">
545545
<td>macOS</td>
@@ -560,7 +560,7 @@ <h3 id="gcc">gcc</h3>
560560
generate a warning by <code>configure</code> and are unlikely to
561561
work.</p>
562562
<p>The JDK is currently known to be able to compile with at least
563-
version 11.2 of gcc.</p>
563+
version 13.2 of gcc.</p>
564564
<p>In general, any version between these two should be usable.</p>
565565
<h3 id="clang">clang</h3>
566566
<p>The minimum accepted version of clang is 3.5. Older versions will not

doc/building.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ issues.
336336

337337
| Operating system | Toolchain version |
338338
| ------------------ | ------------------------------------------ |
339-
| Linux | gcc 11.2.0 |
339+
| Linux | gcc 13.2.0 |
340340
| macOS | Apple Xcode 10.1 (using clang 10.0.0) |
341341
| Windows | Microsoft Visual Studio 2022 update 17.1.0 |
342342

@@ -350,7 +350,7 @@ features that it does support.
350350
The minimum accepted version of gcc is 5.0. Older versions will generate a warning
351351
by `configure` and are unlikely to work.
352352

353-
The JDK is currently known to be able to compile with at least version 11.2 of
353+
The JDK is currently known to be able to compile with at least version 13.2 of
354354
gcc.
355355

356356
In general, any version between these two should be usable.

make/RunTests.gmk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ UseSpecialTestHandler = \
10771077
# Now process each test to run and setup a proper make rule
10781078
$(foreach test, $(TESTS_TO_RUN), \
10791079
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
1080-
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
1080+
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
10811081
$(eval ALL_TEST_IDS += $(TEST_ID)) \
10821082
$(if $(call UseCustomTestHandler, $(test)), \
10831083
$(eval $(call SetupRunCustomTest, $(TEST_ID), \
@@ -1157,9 +1157,9 @@ run-test-report: post-run-test
11571157
TEST TOTAL PASS FAIL ERROR " "
11581158
$(foreach test, $(TESTS_TO_RUN), \
11591159
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
1160-
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
1160+
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
11611161
$(ECHO) >> $(TEST_LAST_IDS) $(TEST_ID) $(NEWLINE) \
1162-
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '[_*1000]')) \
1162+
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '_')) \
11631163
$(if $(filter __________________________________________________%, $(NAME_PATTERN)), \
11641164
$(eval TEST_NAME := ) \
11651165
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s\n" " " "$(test)" $(NEWLINE) \

make/autoconf/configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER
223223
# LeakSanitizer
224224
JDKOPT_SETUP_LEAK_SANITIZER
225225

226+
# Setup static analyzer
227+
JDKOPT_SETUP_STATIC_ANALYZER
228+
226229
# Fallback linker
227230
# This needs to go before 'LIB_DETERMINE_DEPENDENCIES'
228231
JDKOPT_SETUP_FALLBACK_LINKER

make/autoconf/jdk-options.m4

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,31 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
462462

463463
###############################################################################
464464
#
465+
# Static analyzer
466+
#
467+
AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_ANALYZER],
468+
[
469+
UTIL_ARG_ENABLE(NAME: static-analyzer, DEFAULT: false, RESULT: STATIC_ANALYZER_ENABLED,
470+
DESC: [enable the GCC static analyzer],
471+
CHECK_AVAILABLE: [
472+
AC_MSG_CHECKING([if static analyzer is available])
473+
if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
474+
AC_MSG_RESULT([yes])
475+
else
476+
AC_MSG_RESULT([no])
477+
AVAILABLE=false
478+
fi
479+
],
480+
IF_ENABLED: [
481+
STATIC_ANALYZER_CFLAGS="-fanalyzer -Wno-analyzer-fd-leak"
482+
CFLAGS_JDKLIB="$CFLAGS_JDKLIB $STATIC_ANALYZER_CFLAGS"
483+
CFLAGS_JDKEXE="$CFLAGS_JDKEXE $STATIC_ANALYZER_CFLAGS"
484+
])
485+
AC_SUBST(STATIC_ANALYZER_ENABLED)
486+
])
487+
488+
################################################################################
489+
#
465490
# LeakSanitizer
466491
#
467492
AC_DEFUN_ONCE([JDKOPT_SETUP_LEAK_SANITIZER],

make/conf/jib-profiles.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,10 +1080,10 @@ var getJibProfilesProfiles = function (input, common, data) {
10801080
var getJibProfilesDependencies = function (input, common) {
10811081

10821082
var devkit_platform_revisions = {
1083-
linux_x64: "gcc11.2.0-OL6.4+1.0",
1083+
linux_x64: "gcc13.2.0-OL6.4+1.0",
10841084
macosx: "Xcode12.4+1.1",
10851085
windows_x64: "VS2022-17.1.0+1.1",
1086-
linux_aarch64: input.build_cpu == "x64" ? "gcc11.2.0-OL7.6+1.1" : "gcc11.2.0-OL7.6+1.0",
1086+
linux_aarch64: "gcc13.2.0-OL7.6+1.0",
10871087
linux_arm: "gcc8.2.0-Fedora27+1.0",
10881088
linux_ppc64le: "gcc8.2.0-Fedora27+1.0",
10891089
linux_s390x: "gcc8.2.0-Fedora27+1.0",

make/devkit/Tools.gmk

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ KERNEL_HEADERS_RPM := kernel-headers
5555

5656
ifeq ($(BASE_OS), OL)
5757
ifeq ($(ARCH), aarch64)
58-
BASE_URL := http://yum.oracle.com/repo/OracleLinux/OL7/6/base/$(ARCH)/
58+
BASE_URL := https://yum.oracle.com/repo/OracleLinux/OL7/6/base/$(ARCH)/
5959
LINUX_VERSION := OL7.6
6060
KERNEL_HEADERS_RPM := kernel-uek-headers
6161
else
62-
BASE_URL := http://yum.oracle.com/repo/OracleLinux/OL6/4/base/$(ARCH)/
62+
BASE_URL := https://yum.oracle.com/repo/OracleLinux/OL6/4/base/$(ARCH)/
6363
LINUX_VERSION := OL6.4
6464
endif
6565
else ifeq ($(BASE_OS), Fedora)
@@ -96,8 +96,17 @@ endif
9696
# Define external dependencies
9797

9898
# Latest that could be made to work.
99-
GCC_VER := 11.3.0
100-
ifeq ($(GCC_VER), 11.3.0)
99+
GCC_VER := 13.2.0
100+
ifeq ($(GCC_VER), 13.2.0)
101+
gcc_ver := gcc-13.2.0
102+
binutils_ver := binutils-2.41
103+
ccache_ver := ccache-3.7.12
104+
mpfr_ver := mpfr-4.2.0
105+
gmp_ver := gmp-6.3.0
106+
mpc_ver := mpc-1.3.1
107+
gdb_ver := gdb-13.2
108+
REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
109+
else ifeq ($(GCC_VER), 11.3.0)
101110
gcc_ver := gcc-11.3.0
102111
binutils_ver := binutils-2.39
103112
ccache_ver := ccache-3.7.12
@@ -671,7 +680,11 @@ $(PREFIX)/Tools.gmk: ./Tools.gmk
671680
rm -rf $@
672681
cp $< $@
673682

674-
THESE_MAKEFILES := $(PREFIX)/Makefile $(PREFIX)/Tools.gmk
683+
$(PREFIX)/Tars.gmk: ./Tars.gmk
684+
rm -rf $@
685+
cp $< $@
686+
687+
THESE_MAKEFILES := $(PREFIX)/Makefile $(PREFIX)/Tools.gmk $(PREFIX)/Tars.gmk
675688

676689
##########################################################################################
677690

src/hotspot/cpu/riscv/javaFrameAnchor_riscv.hpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,23 @@
3939
// 3 - restoring an old state (javaCalls)
4040

4141
void clear(void) {
42+
// No hardware barriers are necessary. All members are volatile and the profiler
43+
// is run from a signal handler and the only observer is the thread its running on.
44+
4245
// clearing _last_Java_sp must be first
4346
_last_Java_sp = nullptr;
44-
OrderAccess::release();
4547
_last_Java_fp = nullptr;
4648
_last_Java_pc = nullptr;
4749
}
4850

4951
void copy(JavaFrameAnchor* src) {
50-
// In order to make sure the transition state is valid for "this"
52+
// No hardware barriers are necessary. All members are volatile and the profiler
53+
// is run from a signal handler and the only observer is the thread its running on.
54+
5155
// We must clear _last_Java_sp before copying the rest of the new data
52-
//
53-
// Hack Alert: Temporary bugfix for 4717480/4721647
54-
// To act like previous version (pd_cache_state) don't null _last_Java_sp
55-
// unless the value is changing
56-
//
5756
assert(src != nullptr, "Src should not be null.");
5857
if (_last_Java_sp != src->_last_Java_sp) {
5958
_last_Java_sp = nullptr;
60-
OrderAccess::release();
6159
}
6260
_last_Java_fp = src->_last_Java_fp;
6361
_last_Java_pc = src->_last_Java_pc;

src/hotspot/cpu/riscv/macroAssembler_riscv.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,14 @@ void MacroAssembler::set_last_Java_frame(Register last_java_sp,
244244
last_java_sp = esp;
245245
}
246246

247-
sd(last_java_sp, Address(xthread, JavaThread::last_Java_sp_offset()));
248-
249247
// last_java_fp is optional
250248
if (last_java_fp->is_valid()) {
251249
sd(last_java_fp, Address(xthread, JavaThread::last_Java_fp_offset()));
252250
}
251+
252+
// We must set sp last.
253+
sd(last_java_sp, Address(xthread, JavaThread::last_Java_sp_offset()));
254+
253255
}
254256

255257
void MacroAssembler::set_last_Java_frame(Register last_java_sp,

0 commit comments

Comments
 (0)