Skip to content

Commit

Permalink
Merge pull request #1938 from SAP/pr-jdk-25+13
Browse files Browse the repository at this point in the history
Merge to tag jdk-25+13
  • Loading branch information
RealCLanger authored Mar 10, 2025
2 parents cb29a87 + 11a37c8 commit 2a2cbbf
Show file tree
Hide file tree
Showing 804 changed files with 14,307 additions and 13,754 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ NashornProfile.txt
/.cache
/.gdbinit
/.lldbinit
**/core.[0-9]*
92 changes: 73 additions & 19 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -530,21 +530,34 @@ define SetupRunGtestTestBody
$$(call LogWarn, Test report is stored in $$(strip \
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR))))
$$(if $$(wildcard $$($1_RESULT_FILE)), \
$$(eval $1_TOTAL := $$(shell $$(AWK) '/==========.* tests? from .* \
test (cases?|suites?) ran/ { print $$$$2 }' $$($1_RESULT_FILE))) \
$$(if $$($1_TOTAL), , $$(eval $1_TOTAL := 0)) \
$$(eval $1_RUN := $$(shell $$(AWK) \
'/==========.* tests? from .* test (cases?|suites?) ran/ { print $$$$2 }' \
$$($1_RESULT_FILE))) \
$$(if $$($1_RUN), , $$(eval $1_RUN := 0)) \
$$(eval $1_PASSED := $$(shell $$(AWK) '/\[ PASSED \] .* tests?./ \
{ print $$$$4 }' $$($1_RESULT_FILE))) \
$$(if $$($1_PASSED), , $$(eval $1_PASSED := 0)) \
$$(eval $1_SKIPPED := $$(shell $$(AWK) \
'/YOU HAVE [0-9]+ DISABLED TEST/ { \
if (match($$$$0, /[0-9]+/, arr)) { \
print arr[0]; \
found=1; \
} \
if (!found) { print 0; } \
}' \
$$($1_RESULT_FILE))) \
$$(eval $1_FAILED := $$(shell $$(AWK) '/\[ FAILED \] .* tests?, \
listed below/ { print $$$$4 }' $$($1_RESULT_FILE))) \
$$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) \
$$(eval $1_ERROR := $$(shell \
$$(EXPR) $$($1_TOTAL) - $$($1_PASSED) - $$($1_FAILED))) \
$$(EXPR) $$($1_RUN) - $$($1_PASSED) - $$($1_FAILED))) \
$$(eval $1_TOTAL := $$(shell \
$$(EXPR) $$($1_RUN) + $$($1_SKIPPED))) \
, \
$$(eval $1_PASSED := 0) \
$$(eval $1_FAILED := 0) \
$$(eval $1_ERROR := 1) \
$$(eval $1_SKIPPED := 0) \
$$(eval $1_TOTAL := 1) \
)

Expand Down Expand Up @@ -668,6 +681,7 @@ define SetupRunMicroTestBody
$$(eval $1_ERROR := 1) \
$$(eval $1_TOTAL := 1) \
)
$$(eval $1_SKIPPED := 0)

$1: run-test-$1 parse-test-$1

Expand Down Expand Up @@ -1036,23 +1050,64 @@ define SetupRunJtregTestBody
$$(call LogWarn, Finished running test '$$($1_TEST)')
$$(call LogWarn, Test report is stored in $$(strip \
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR))))

# Read jtreg documentation to learn on the test stats categories:
# https://github.com/openjdk/jtreg/blob/master/src/share/doc/javatest/regtest/faq.md#what-do-all-those-numbers-in-the-test-results-line-mean
# In jtreg, "skipped:" category accounts for tests that threw jtreg.SkippedException at runtime.
# At the same time these tests contribute to "passed:" tests.
# In here we don't want that and so we substract number of "skipped:" from "passed:".

$$(if $$(wildcard $$($1_RESULT_FILE)), \
$$(eval $1_PASSED := $$(shell $$(AWK) '{ gsub(/[,;]/, ""); \
$$(eval $1_PASSED_AND_RUNTIME_SKIPPED := $$(shell $$(AWK) '{ gsub(/[,;]/, ""); \
for (i=1; i<=NF; i++) { if ($$$$i == "passed:") \
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
$$(if $$($1_PASSED), , $$(eval $1_PASSED := 0)) \
$$(if $$($1_PASSED_AND_RUNTIME_SKIPPED), , $$(eval $1_PASSED_AND_RUNTIME_SKIPPED := 0)) \
$$(eval $1_FAILED := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \
for (i=1; i<=NF; i++) { if ($$$$i == "failed:") \
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
$$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) \
$$(eval $1_RUNTIME_SKIPPED := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \
for (i=1; i<=NF; i++) { if ($$$$i == "skipped:") \
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
$$(if $$($1_RUNTIME_SKIPPED), , $$(eval $1_RUNTIME_SKIPPED := 0)) \
$$(eval $1_SKIPPED := $$(shell \
$$(AWK) \
'BEGIN { \
overall_skipped = 0; \
patterns[1] = "skipped"; \
patterns[2] = "excluded"; \
patterns[3] = "not in match-list"; \
patterns[4] = "did not match keywords"; \
patterns[5] = "did not meet module requirements"; \
patterns[6] = "did not meet platform requirements"; \
patterns[7] = "did not match prior status"; \
patterns[8] = "did not meet time-limit requirements"; \
} { \
split($$$$0, arr, ";"); \
for (item in arr) { \
for (p in patterns) { \
if (match(arr[item], patterns[p] ": [0-9]+")) { \
overall_skipped += substr(arr[item], RSTART + length(patterns[p]) + 2, RLENGTH); \
} \
} \
} \
print overall_skipped; \
}' \
$$($1_RESULT_FILE) \
)) \
$$(eval $1_ERROR := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \
for (i=1; i<=NF; i++) { if ($$$$i == "error:") \
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
$$(if $$($1_ERROR), , $$(eval $1_ERROR := 0)) \
\
$$(eval $1_PASSED := $$(shell \
$$(EXPR) $$($1_PASSED_AND_RUNTIME_SKIPPED) - $$($1_RUNTIME_SKIPPED))) \
$$(eval $1_TOTAL := $$(shell \
$$(EXPR) $$($1_PASSED) + $$($1_FAILED) + $$($1_ERROR))) \
$$(EXPR) $$($1_PASSED) + $$($1_FAILED) + $$($1_ERROR) + $$($1_SKIPPED))) \
, \
$$(eval $1_PASSED := 0) \
$$(eval $1_PASSED_AND_RUNTIME_SKIPPED := 0) \
$$(eval $1_RUNTIME_SKIPPED := 0) \
$$(eval $1_SKIPPED := 0) \
$$(eval $1_FAILED := 0) \
$$(eval $1_ERROR := 1) \
$$(eval $1_TOTAL := 1) \
Expand Down Expand Up @@ -1111,8 +1166,6 @@ define SetupRunSpecialTestBody
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
))

$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt

# We can not parse the various "special" tests.
parse-test-$1: run-test-$1
$$(call LogWarn, Finished running test '$$($1_TEST)')
Expand All @@ -1122,6 +1175,7 @@ define SetupRunSpecialTestBody
$$(eval $1_PASSED := $$(shell \
if [ `$(CAT) $$($1_EXITCODE)` = "0" ]; then $(ECHO) 1; else $(ECHO) 0; fi \
))
$$(eval $1_SKIPPED := 0)
$$(eval $1_FAILED := $$(shell \
if [ `$(CAT) $$($1_EXITCODE)` = "0" ]; then $(ECHO) 0; else $(ECHO) 1; fi \
))
Expand Down Expand Up @@ -1231,8 +1285,8 @@ run-test-report: post-run-test
$(ECHO) >> $(TEST_SUMMARY) ==============================
$(ECHO) >> $(TEST_SUMMARY) Test summary
$(ECHO) >> $(TEST_SUMMARY) ==============================
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5s %5s %5s %5s %2s\n" " " \
TEST TOTAL PASS FAIL ERROR " "
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5s %5s %5s %5s %5s %2s\n" " " \
TEST TOTAL PASS FAIL ERROR SKIP " "
$(foreach test, $(TESTS_TO_RUN), \
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
Expand All @@ -1244,15 +1298,15 @@ run-test-report: post-run-test
, \
$(eval TEST_NAME := $(test)) \
) \
$(if $(filter $($(TEST_ID)_PASSED), $($(TEST_ID)_TOTAL)), \
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %2s\n" \
" " "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) " " $(NEWLINE) \
, \
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %2s\n" \
$(if $(filter-out 0, $($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR)), \
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %5d %2s\n" \
">>" "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) "<<" $(NEWLINE) \
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) $($(TEST_ID)_SKIPPED) "<<" $(NEWLINE) \
$(eval TEST_FAILURE := true) \
, \
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %5d %2s\n" \
" " "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) $($(TEST_ID)_SKIPPED) " " $(NEWLINE) \
) \
)
$(ECHO) >> $(TEST_SUMMARY) ==============================
Expand Down
10 changes: 10 additions & 0 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,16 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
else
DEBUG_CFLAGS_JDK="-DDEBUG"
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang ; then
INIT_PATTERN_FLAG="-ftrivial-auto-var-init=pattern"
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$INIT_PATTERN_FLAG],
IF_TRUE: [
DEBUG_CFLAGS_JDK="$DEBUG_CFLAGS_JDK $INIT_PATTERN_FLAG"
DEBUG_CFLAGS_JVM="$INIT_PATTERN_FLAG"
]
)
fi
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
DEBUG_CFLAGS_JVM="-fpic -mcmodel=large"
fi
Expand Down
3 changes: 2 additions & 1 deletion make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ var getJibProfiles = function (input) {
// Exclude list to use when Jib creates a source bundle
data.src_bundle_excludes = [
"build", "{,**/}webrev*", "{,**/}.hg", "{,**/}JTwork*", "{,**/}JTreport*",
"{,**/}.git"
"{,**/}.git",
"{,**/}core.[0-9]*"
];
// Include list to use when creating a minimal jib source bundle which
// contains just the jib configuration files.
Expand Down
1 change: 1 addition & 0 deletions make/hotspot/lib/CompileGtest.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
undef stringop-overflow, \
DISABLED_WARNINGS_gcc_test_metaspace_misc.cpp := unused-const-variable, \
DISABLED_WARNINGS_gcc_test_threadCpuLoad.cpp := address, \
DISABLED_WARNINGS_gcc_test_tribool.cpp := uninitialized, \
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang) \
undef switch format-nonliteral tautological-undefined-compare \
self-assign-overloaded, \
Expand Down
1 change: 1 addition & 0 deletions make/hotspot/lib/CompileJvm.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ CFLAGS_VM_VERSION := \
-DHOTSPOT_VM_DISTRO='"$(HOTSPOT_VM_DISTRO)"' \
-DCPU='"$(OPENJDK_TARGET_CPU_VM_VERSION)"' \
-DHOTSPOT_BUILD_TIME='"$(HOTSPOT_BUILD_TIME)"' \
-DJVM_VARIANT='"$(JVM_VARIANT)"' \
#

################################################################################
Expand Down
3 changes: 0 additions & 3 deletions make/hotspot/lib/JvmFeatures.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,9 @@ ifeq ($(call check-jvm-feature, opt-size), true)
frame_ppc.cpp \
frame_s390.cpp \
frame_x86.cpp \
genCollectedHeap.cpp \
generation.cpp \
growableArray.cpp \
handles.cpp \
hashtable.cpp \
heap.cpp \
icache.cpp \
icache_arm.cpp \
Expand All @@ -246,7 +244,6 @@ ifeq ($(call check-jvm-feature, opt-size), true)
linkResolver.cpp \
klass.cpp \
klassVtable.cpp \
markSweep.cpp \
memRegion.cpp \
memoryPool.cpp \
method.cpp \
Expand Down
3 changes: 1 addition & 2 deletions make/jdk/src/classes/build/tools/cldrconverter/Bundle.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 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 @@ -198,7 +198,6 @@ Map<String, Object> getTargetMap() throws Exception {
String[] cldrBundles = getCLDRPath().split(",");

// myMap contains resources for id.
@SuppressWarnings("unchecked")
Map<String, Object> myMap = new HashMap<>();
int index;
for (index = 0; index < cldrBundles.length; index++) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 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 @@ -1079,7 +1079,6 @@ private String getTarget(String path, String calType, String context, String wid
}

@Override
@SuppressWarnings("fallthrough")
public void endElement(String uri, String localName, String qName) throws SAXException {
assert qName.equals(currentContainer.getqName()) : "current=" + currentContainer.getqName() + ", param=" + qName;
switch (qName) {
Expand Down
24 changes: 18 additions & 6 deletions make/modules/java.base/gensrc/GensrcScopedMemoryAccess.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ define GenerateScopedOp

$1_Type := $2

ifeq ($$($1_Type), Boolean)
$1_type := boolean
$1_BoxType := $$($1_Type)

$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)

$1_ARGS += -KCAS
endif

ifeq ($$($1_Type), Byte)
$1_type := byte
$1_BoxType := $$($1_Type)
Expand All @@ -50,6 +61,7 @@ define GenerateScopedOp
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)

$1_ARGS += -KCAS
$1_ARGS += -Kbyte
endif

Expand All @@ -60,6 +72,8 @@ define GenerateScopedOp
$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)

$1_ARGS += -KCAS
$1_ARGS += -KUnaligned
endif

Expand All @@ -70,6 +84,8 @@ define GenerateScopedOp
$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)

$1_ARGS += -KCAS
$1_ARGS += -KUnaligned
endif

Expand All @@ -82,8 +98,6 @@ define GenerateScopedOp
$1_RawBoxType := $$($1_BoxType)

$1_ARGS += -KCAS
$1_ARGS += -KAtomicAdd
$1_ARGS += -KBitwise
$1_ARGS += -KUnaligned
endif

Expand All @@ -96,8 +110,6 @@ define GenerateScopedOp
$1_RawBoxType := $$($1_BoxType)

$1_ARGS += -KCAS
$1_ARGS += -KAtomicAdd
$1_ARGS += -KBitwise
$1_ARGS += -KUnaligned
endif

Expand Down Expand Up @@ -133,15 +145,15 @@ define GenerateScopedOp
$1_ARGS += -KBitwise
endif

ifneq ($$(findstring $$($1_Type), Byte Short Char), )
ifneq ($$(findstring $$($1_Type), Boolean Byte Short Char), )
$1_ARGS += -KShorterThanInt
endif
endef

################################################################################
# Setup a rule for generating the ScopedMemoryAccess java class

SCOPE_MEMORY_ACCESS_TYPES := Byte Short Char Int Long Float Double
SCOPE_MEMORY_ACCESS_TYPES := Boolean Byte Short Char Int Long Float Double
$(foreach t, $(SCOPE_MEMORY_ACCESS_TYPES), \
$(eval $(call GenerateScopedOp,BIN_$t,$t)))

Expand Down
19 changes: 18 additions & 1 deletion make/modules/java.base/gensrc/GensrcVarHandles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,18 @@ define GenerateVarHandleMemorySegment

$1_FILENAME := $(VARHANDLES_GENSRC_DIR)/VarHandleSegmentAs$$($1_Type)s.java

ifeq ($$($1_Type), Boolean)
$1_type := boolean
$1_BoxType := $$($1_Type)

$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)

$1_ARGS += -Kbyte
$1_ARGS += -KShorterThanInt
endif

ifeq ($$($1_Type), Byte)
$1_type := byte
$1_BoxType := $$($1_Type)
Expand All @@ -183,6 +195,7 @@ define GenerateVarHandleMemorySegment
$1_RawBoxType := $$($1_BoxType)

$1_ARGS += -Kbyte
$1_ARGS += -KShorterThanInt
endif

ifeq ($$($1_Type), Short)
Expand All @@ -192,6 +205,8 @@ define GenerateVarHandleMemorySegment
$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)

$1_ARGS += -KShorterThanInt
endif

ifeq ($$($1_Type), Char)
Expand All @@ -201,6 +216,8 @@ define GenerateVarHandleMemorySegment
$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)

$1_ARGS += -KShorterThanInt
endif

ifeq ($$($1_Type), Int)
Expand Down Expand Up @@ -277,7 +294,7 @@ $(foreach t, $(VARHANDLES_BYTE_ARRAY_TYPES), \
$(eval $(call GenerateVarHandleByteArray,VAR_HANDLE_BYTE_ARRAY_$t,$t)))

# List the types to generate source for, with capitalized first letter
VARHANDLES_MEMORY_SEGMENT_TYPES := Byte Short Char Int Long Float Double
VARHANDLES_MEMORY_SEGMENT_TYPES := Boolean Byte Short Char Int Long Float Double
$(foreach t, $(VARHANDLES_MEMORY_SEGMENT_TYPES), \
$(eval $(call GenerateVarHandleMemorySegment,VAR_HANDLE_MEMORY_SEGMENT_$t,$t)))

Expand Down
Loading

0 comments on commit 2a2cbbf

Please sign in to comment.