Skip to content

Commit 672b8b0

Browse files
Merge branch 'master' into JDK-8333664
2 parents f503874 + caaf409 commit 672b8b0

File tree

727 files changed

+14353
-13912
lines changed

Some content is hidden

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

727 files changed

+14353
-13912
lines changed

.github/actions/upload-bundles/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ inputs:
3232
debug-suffix:
3333
description: 'File name suffix denoting debug level, possibly empty'
3434
required: false
35+
bundle-suffix:
36+
description: 'Bundle name suffix, possibly empty'
37+
required: false
3538

3639
runs:
3740
using: composite
@@ -75,7 +78,7 @@ runs:
7578
- name: 'Upload bundles artifact'
7679
uses: actions/upload-artifact@v4
7780
with:
78-
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
81+
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.bundle-suffix }}
7982
path: bundles
8083
retention-days: 1
8184
if: steps.bundles.outputs.bundles-found == 'true'

.github/workflows/build-linux.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ on:
6161
make-arguments:
6262
required: false
6363
type: string
64+
bundle-suffix:
65+
required: false
66+
type: string
6467

6568
jobs:
6669
build-linux:
@@ -71,10 +74,6 @@ jobs:
7174
fail-fast: false
7275
matrix:
7376
debug-level: ${{ fromJSON(inputs.debug-levels) }}
74-
include:
75-
- debug-level: debug
76-
flags: --with-debug-level=fastdebug
77-
suffix: -debug
7877

7978
steps:
8079
- name: 'Checkout the JDK source'
@@ -118,7 +117,7 @@ jobs:
118117
run: >
119118
bash configure
120119
--with-conf-name=${{ inputs.platform }}
121-
${{ matrix.flags }}
120+
${{ matrix.debug-level == 'debug' && '--with-debug-level=fastdebug' || '' }}
122121
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
123122
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
124123
--with-jtreg=${{ steps.jtreg.outputs.path }}
@@ -133,17 +132,14 @@ jobs:
133132
- name: 'Build'
134133
id: build
135134
uses: ./.github/actions/do-build
136-
env:
137-
# Only build static-libs-bundles for release builds.
138-
# For debug builds, building static-libs often exceeds disk space.
139-
STATIC_LIBS: ${{ matrix.debug-level == 'release' && 'static-libs-bundles' }}
140135
with:
141-
make-target: '${{ inputs.make-target }} ${STATIC_LIBS} ${{ inputs.make-arguments }}'
136+
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
142137
platform: ${{ inputs.platform }}
143-
debug-suffix: '${{ matrix.suffix }}'
138+
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
144139

145140
- name: 'Upload bundles'
146141
uses: ./.github/actions/upload-bundles
147142
with:
148143
platform: ${{ inputs.platform }}
149-
debug-suffix: '${{ matrix.suffix }}'
144+
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
145+
bundle-suffix: ${{ inputs.bundle-suffix }}

.github/workflows/main.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,43 @@ jobs:
225225
make-arguments: ${{ github.event.inputs.make-arguments }}
226226
if: needs.prepare.outputs.linux-x64-variants == 'true'
227227

228+
build-linux-x64-static:
229+
name: linux-x64-static
230+
needs: prepare
231+
uses: ./.github/workflows/build-linux.yml
232+
with:
233+
platform: linux-x64
234+
make-target: 'static-jdk-image'
235+
# There are issues with fastdebug static build in GHA due to space limit.
236+
# Only do release build for now.
237+
debug-levels: '[ "release" ]'
238+
gcc-major-version: '10'
239+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
240+
make-arguments: ${{ github.event.inputs.make-arguments }}
241+
# It currently doesn't produce any bundles, but probably will do in
242+
# the future.
243+
bundle-suffix: "-static"
244+
if: needs.prepare.outputs.linux-x64 == 'true'
245+
246+
build-linux-x64-static-libs:
247+
name: linux-x64-static-libs
248+
needs: prepare
249+
uses: ./.github/workflows/build-linux.yml
250+
with:
251+
platform: linux-x64
252+
make-target: 'static-libs-bundles'
253+
# Only build static-libs-bundles for release builds.
254+
# For debug builds, building static-libs often exceeds disk space.
255+
debug-levels: '[ "release" ]'
256+
gcc-major-version: '10'
257+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
258+
make-arguments: ${{ github.event.inputs.make-arguments }}
259+
# Upload static libs bundles separately to avoid interference with normal linux-x64 bundle.
260+
# This bundle is not used by testing jobs, but downstreams use it to check that
261+
# dependent projects, e.g. libgraal, builds fine.
262+
bundle-suffix: "-static-libs"
263+
if: needs.prepare.outputs.linux-x64-variants == 'true'
264+
228265
build-linux-cross-compile:
229266
name: linux-cross-compile
230267
needs: prepare

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ NashornProfile.txt
2222
/.cache
2323
/.gdbinit
2424
/.lldbinit
25+
**/core.[0-9]*

make/Docs.gmk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ JAVA_WARNINGS_ARE_ERRORS ?= -Werror
9898

9999
# The initial set of options for javadoc
100100
JAVADOC_OPTIONS := -use -keywords -notimestamp \
101-
-encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
101+
-serialwarn -encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
102102
-splitIndex --system none -javafx --expand-requires transitive \
103103
--override-methods=summary
104104

105105
# The reference options must stay stable to allow for comparisons across the
106106
# development cycle.
107107
REFERENCE_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
108-
-encoding ISO-8859-1 -breakiterator -splitIndex --system none \
108+
-serialwarn -encoding ISO-8859-1 -breakiterator -splitIndex --system none \
109109
-html5 -javafx --expand-requires transitive
110110

111111
# Should we add DRAFT stamps to the generated javadoc?

make/RunTests.gmk

Lines changed: 73 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -530,21 +530,34 @@ define SetupRunGtestTestBody
530530
$$(call LogWarn, Test report is stored in $$(strip \
531531
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR))))
532532
$$(if $$(wildcard $$($1_RESULT_FILE)), \
533-
$$(eval $1_TOTAL := $$(shell $$(AWK) '/==========.* tests? from .* \
534-
test (cases?|suites?) ran/ { print $$$$2 }' $$($1_RESULT_FILE))) \
535-
$$(if $$($1_TOTAL), , $$(eval $1_TOTAL := 0)) \
533+
$$(eval $1_RUN := $$(shell $$(AWK) \
534+
'/==========.* tests? from .* test (cases?|suites?) ran/ { print $$$$2 }' \
535+
$$($1_RESULT_FILE))) \
536+
$$(if $$($1_RUN), , $$(eval $1_RUN := 0)) \
536537
$$(eval $1_PASSED := $$(shell $$(AWK) '/\[ PASSED \] .* tests?./ \
537538
{ print $$$$4 }' $$($1_RESULT_FILE))) \
538539
$$(if $$($1_PASSED), , $$(eval $1_PASSED := 0)) \
540+
$$(eval $1_SKIPPED := $$(shell $$(AWK) \
541+
'/YOU HAVE [0-9]+ DISABLED TEST/ { \
542+
if (match($$$$0, /[0-9]+/, arr)) { \
543+
print arr[0]; \
544+
found=1; \
545+
} \
546+
if (!found) { print 0; } \
547+
}' \
548+
$$($1_RESULT_FILE))) \
539549
$$(eval $1_FAILED := $$(shell $$(AWK) '/\[ FAILED \] .* tests?, \
540550
listed below/ { print $$$$4 }' $$($1_RESULT_FILE))) \
541551
$$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) \
542552
$$(eval $1_ERROR := $$(shell \
543-
$$(EXPR) $$($1_TOTAL) - $$($1_PASSED) - $$($1_FAILED))) \
553+
$$(EXPR) $$($1_RUN) - $$($1_PASSED) - $$($1_FAILED))) \
554+
$$(eval $1_TOTAL := $$(shell \
555+
$$(EXPR) $$($1_RUN) + $$($1_SKIPPED))) \
544556
, \
545557
$$(eval $1_PASSED := 0) \
546558
$$(eval $1_FAILED := 0) \
547559
$$(eval $1_ERROR := 1) \
560+
$$(eval $1_SKIPPED := 0) \
548561
$$(eval $1_TOTAL := 1) \
549562
)
550563

@@ -668,6 +681,7 @@ define SetupRunMicroTestBody
668681
$$(eval $1_ERROR := 1) \
669682
$$(eval $1_TOTAL := 1) \
670683
)
684+
$$(eval $1_SKIPPED := 0)
671685

672686
$1: run-test-$1 parse-test-$1
673687

@@ -1036,23 +1050,64 @@ define SetupRunJtregTestBody
10361050
$$(call LogWarn, Finished running test '$$($1_TEST)')
10371051
$$(call LogWarn, Test report is stored in $$(strip \
10381052
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR))))
1053+
1054+
# Read jtreg documentation to learn on the test stats categories:
1055+
# 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
1056+
# In jtreg, "skipped:" category accounts for tests that threw jtreg.SkippedException at runtime.
1057+
# At the same time these tests contribute to "passed:" tests.
1058+
# In here we don't want that and so we substract number of "skipped:" from "passed:".
1059+
10391060
$$(if $$(wildcard $$($1_RESULT_FILE)), \
1040-
$$(eval $1_PASSED := $$(shell $$(AWK) '{ gsub(/[,;]/, ""); \
1061+
$$(eval $1_PASSED_AND_RUNTIME_SKIPPED := $$(shell $$(AWK) '{ gsub(/[,;]/, ""); \
10411062
for (i=1; i<=NF; i++) { if ($$$$i == "passed:") \
10421063
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
1043-
$$(if $$($1_PASSED), , $$(eval $1_PASSED := 0)) \
1064+
$$(if $$($1_PASSED_AND_RUNTIME_SKIPPED), , $$(eval $1_PASSED_AND_RUNTIME_SKIPPED := 0)) \
10441065
$$(eval $1_FAILED := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \
10451066
for (i=1; i<=NF; i++) { if ($$$$i == "failed:") \
10461067
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
10471068
$$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) \
1069+
$$(eval $1_RUNTIME_SKIPPED := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \
1070+
for (i=1; i<=NF; i++) { if ($$$$i == "skipped:") \
1071+
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
1072+
$$(if $$($1_RUNTIME_SKIPPED), , $$(eval $1_RUNTIME_SKIPPED := 0)) \
1073+
$$(eval $1_SKIPPED := $$(shell \
1074+
$$(AWK) \
1075+
'BEGIN { \
1076+
overall_skipped = 0; \
1077+
patterns[1] = "skipped"; \
1078+
patterns[2] = "excluded"; \
1079+
patterns[3] = "not in match-list"; \
1080+
patterns[4] = "did not match keywords"; \
1081+
patterns[5] = "did not meet module requirements"; \
1082+
patterns[6] = "did not meet platform requirements"; \
1083+
patterns[7] = "did not match prior status"; \
1084+
patterns[8] = "did not meet time-limit requirements"; \
1085+
} { \
1086+
split($$$$0, arr, ";"); \
1087+
for (item in arr) { \
1088+
for (p in patterns) { \
1089+
if (match(arr[item], patterns[p] ": [0-9]+")) { \
1090+
overall_skipped += substr(arr[item], RSTART + length(patterns[p]) + 2, RLENGTH); \
1091+
} \
1092+
} \
1093+
} \
1094+
print overall_skipped; \
1095+
}' \
1096+
$$($1_RESULT_FILE) \
1097+
)) \
10481098
$$(eval $1_ERROR := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \
10491099
for (i=1; i<=NF; i++) { if ($$$$i == "error:") \
10501100
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
10511101
$$(if $$($1_ERROR), , $$(eval $1_ERROR := 0)) \
1102+
\
1103+
$$(eval $1_PASSED := $$(shell \
1104+
$$(EXPR) $$($1_PASSED_AND_RUNTIME_SKIPPED) - $$($1_RUNTIME_SKIPPED))) \
10521105
$$(eval $1_TOTAL := $$(shell \
1053-
$$(EXPR) $$($1_PASSED) + $$($1_FAILED) + $$($1_ERROR))) \
1106+
$$(EXPR) $$($1_PASSED) + $$($1_FAILED) + $$($1_ERROR) + $$($1_SKIPPED))) \
10541107
, \
1055-
$$(eval $1_PASSED := 0) \
1108+
$$(eval $1_PASSED_AND_RUNTIME_SKIPPED := 0) \
1109+
$$(eval $1_RUNTIME_SKIPPED := 0) \
1110+
$$(eval $1_SKIPPED := 0) \
10561111
$$(eval $1_FAILED := 0) \
10571112
$$(eval $1_ERROR := 1) \
10581113
$$(eval $1_TOTAL := 1) \
@@ -1111,8 +1166,6 @@ define SetupRunSpecialTestBody
11111166
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
11121167
))
11131168

1114-
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt
1115-
11161169
# We can not parse the various "special" tests.
11171170
parse-test-$1: run-test-$1
11181171
$$(call LogWarn, Finished running test '$$($1_TEST)')
@@ -1122,6 +1175,7 @@ define SetupRunSpecialTestBody
11221175
$$(eval $1_PASSED := $$(shell \
11231176
if [ `$(CAT) $$($1_EXITCODE)` = "0" ]; then $(ECHO) 1; else $(ECHO) 0; fi \
11241177
))
1178+
$$(eval $1_SKIPPED := 0)
11251179
$$(eval $1_FAILED := $$(shell \
11261180
if [ `$(CAT) $$($1_EXITCODE)` = "0" ]; then $(ECHO) 0; else $(ECHO) 1; fi \
11271181
))
@@ -1231,8 +1285,8 @@ run-test-report: post-run-test
12311285
$(ECHO) >> $(TEST_SUMMARY) ==============================
12321286
$(ECHO) >> $(TEST_SUMMARY) Test summary
12331287
$(ECHO) >> $(TEST_SUMMARY) ==============================
1234-
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5s %5s %5s %5s %2s\n" " " \
1235-
TEST TOTAL PASS FAIL ERROR " "
1288+
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5s %5s %5s %5s %5s %2s\n" " " \
1289+
TEST TOTAL PASS FAIL ERROR SKIP " "
12361290
$(foreach test, $(TESTS_TO_RUN), \
12371291
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
12381292
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
@@ -1244,15 +1298,15 @@ run-test-report: post-run-test
12441298
, \
12451299
$(eval TEST_NAME := $(test)) \
12461300
) \
1247-
$(if $(filter $($(TEST_ID)_PASSED), $($(TEST_ID)_TOTAL)), \
1248-
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %2s\n" \
1249-
" " "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \
1250-
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) " " $(NEWLINE) \
1251-
, \
1252-
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %2s\n" \
1301+
$(if $(filter-out 0, $($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR)), \
1302+
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %5d %2s\n" \
12531303
">>" "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \
1254-
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) "<<" $(NEWLINE) \
1304+
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) $($(TEST_ID)_SKIPPED) "<<" $(NEWLINE) \
12551305
$(eval TEST_FAILURE := true) \
1306+
, \
1307+
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %5d %2s\n" \
1308+
" " "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \
1309+
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) $($(TEST_ID)_SKIPPED) " " $(NEWLINE) \
12561310
) \
12571311
)
12581312
$(ECHO) >> $(TEST_SUMMARY) ==============================

make/autoconf/flags-cflags.m4

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,16 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
482482
else
483483
DEBUG_CFLAGS_JDK="-DDEBUG"
484484
485+
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang ; then
486+
INIT_PATTERN_FLAG="-ftrivial-auto-var-init=pattern"
487+
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$INIT_PATTERN_FLAG],
488+
IF_TRUE: [
489+
DEBUG_CFLAGS_JDK="$DEBUG_CFLAGS_JDK $INIT_PATTERN_FLAG"
490+
DEBUG_CFLAGS_JVM="$INIT_PATTERN_FLAG"
491+
]
492+
)
493+
fi
494+
485495
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
486496
DEBUG_CFLAGS_JVM="-fpic -mcmodel=large"
487497
fi

make/conf/jib-profiles.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ var getJibProfiles = function (input) {
207207
// Exclude list to use when Jib creates a source bundle
208208
data.src_bundle_excludes = [
209209
"build", "{,**/}webrev*", "{,**/}.hg", "{,**/}JTwork*", "{,**/}JTreport*",
210-
"{,**/}.git"
210+
"{,**/}.git",
211+
"{,**/}core.[0-9]*"
211212
];
212213
// Include list to use when creating a minimal jib source bundle which
213214
// contains just the jib configuration files.

make/hotspot/lib/CompileGtest.gmk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
104104
undef stringop-overflow, \
105105
DISABLED_WARNINGS_gcc_test_metaspace_misc.cpp := unused-const-variable, \
106106
DISABLED_WARNINGS_gcc_test_threadCpuLoad.cpp := address, \
107+
DISABLED_WARNINGS_gcc_test_tribool.cpp := uninitialized, \
107108
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang) \
108109
undef switch format-nonliteral tautological-undefined-compare \
109110
self-assign-overloaded, \

make/hotspot/lib/CompileJvm.gmk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ CFLAGS_VM_VERSION := \
8989
-DHOTSPOT_VM_DISTRO='"$(HOTSPOT_VM_DISTRO)"' \
9090
-DCPU='"$(OPENJDK_TARGET_CPU_VM_VERSION)"' \
9191
-DHOTSPOT_BUILD_TIME='"$(HOTSPOT_BUILD_TIME)"' \
92+
-DJVM_VARIANT='"$(JVM_VARIANT)"' \
9293
#
9394

9495
################################################################################

0 commit comments

Comments
 (0)