Skip to content

Commit 6b0629a

Browse files
Merge tag 'jdk-25+18' into labsjdk/adopt-jdk-25+18-master
Added tag jdk-25+18 for changeset bcac42a
2 parents 9486ef5 + bcac42a commit 6b0629a

File tree

637 files changed

+18567
-16026
lines changed

Some content is hidden

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

637 files changed

+18567
-16026
lines changed

Diff for: .editorconfig

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
root = true
2+
3+
[*.{cpp,hpp,c,h,java,cc,hh,m,mm,S,md,properties,gmk,m4,ac}]
4+
trim_trailing_whitespace = true
5+
6+
[Makefile]
7+
trim_trailing_whitespace = true

Diff for: .github/actions/do-build/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2022, 2025, 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
@@ -42,7 +42,7 @@ runs:
4242
- name: 'Build'
4343
id: build
4444
run: >
45-
make LOG=info ${{ inputs.make-target }}
45+
make -k LOG=info ${{ inputs.make-target }}
4646
|| bash ./.github/scripts/gen-build-failure-report.sh "$GITHUB_STEP_SUMMARY"
4747
shell: bash
4848

Diff for: CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Contributing to the JDK
22

3-
Please see the [OpenJDK Developers Guide](https://openjdk.org/guide/).
3+
Please see the [OpenJDK Developers' Guide](https://openjdk.org/guide/).

Diff for: doc/hotspot-unit-tests.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Prefer having checks inside test code.
106106

107107
Not only does having test logic outside, e.g. verification method,
108108
depending on asserts in product code contradict with several items
109-
above but also decreases tests readability and stability. It is much
109+
above but also decreases test's readability and stability. It is much
110110
easier to understand that a test is testing when all testing logic is
111111
located inside a test or nearby in shared test libraries. As a rule of
112112
thumb, the closer a check to a test, the better.
@@ -119,7 +119,7 @@ Prefer `EXPECT` over `ASSERT` if possible.
119119

120120
This is related to the [informativeness](#informativeness) property of
121121
tests, information for other checks can help to better localize a
122-
defects root-cause. One should use `ASSERT` if it is impossible to
122+
defect's root-cause. One should use `ASSERT` if it is impossible to
123123
continue test execution or if it does not make much sense. Later in
124124
the text, `EXPECT` forms will be used to refer to both
125125
`ASSERT/EXPECT`.
@@ -160,7 +160,7 @@ value of the difference between `v1` and `v2` is not greater than `eps`.
160160

161161
Use string special macros for C strings comparisons.
162162

163-
`EXPECT_EQ` just compares pointers values, which is hardly what one
163+
`EXPECT_EQ` just compares pointers' values, which is hardly what one
164164
wants comparing C strings. GoogleTest provides `EXPECT_STREQ` and
165165
`EXPECT_STRNE` macros to compare C string contents. There are also
166166
case-insensitive versions `EXPECT_STRCASEEQ`, `EXPECT_STRCASENE`.
@@ -226,7 +226,7 @@ subsystem, etc.
226226

227227
This naming scheme helps to find tests, filter them and simplifies
228228
test failure analysis. For example, class `Foo` - test group `Foo`,
229-
compiler logging subsystem - test group `CompilerLogging`, G1 GC test
229+
compiler logging subsystem - test group `CompilerLogging`, G1 GC - test
230230
group `G1GC`, and so forth.
231231

232232
### Filename
@@ -287,7 +287,7 @@ Fixture classes should be named after tested classes, subsystems, etc
287287

288288
All test purpose friends should have either `Test` or `Testable` suffix.
289289

290-
It greatly simplifies understanding of friendships purpose and allows
290+
It greatly simplifies understanding of friendship's purpose and allows
291291
statically check that private members are not exposed unexpectedly.
292292
Having `FooTest` as a friend of `Foo` without any comments will be
293293
understood as a necessary evil to get testability.
@@ -397,7 +397,7 @@ and filter out inapplicable tests.
397397
Restore changed flags.
398398

399399
It is quite common for tests to configure JVM in a certain way
400-
changing flags values. GoogleTest provides two ways to set up
400+
changing flags' values. GoogleTest provides two ways to set up
401401
environment before a test and restore it afterward: using either
402402
constructor and destructor or `SetUp` and `TearDown` functions. Both ways
403403
require to use a test fixture class, which sometimes is too wordy. The
@@ -406,7 +406,7 @@ be used in such cases to restore/set values.
406406

407407
Caveats:
408408

409-
* Changing a flags value could break the invariants between flags' values and hence could lead to unexpected/unsupported JVM state.
409+
* Changing a flag's value could break the invariants between flags' values and hence could lead to unexpected/unsupported JVM state.
410410

411411
* `FLAG_SET_*` macros can change more than one flag (in order to
412412
maintain invariants) so it is hard to predict what flags will be

Diff for: make/Bundles.gmk

+4-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,10 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
242242
)
243243

244244
JDK_SYMBOLS_BUNDLE_FILES := \
245-
$(call FindFiles, $(SYMBOLS_IMAGE_DIR))
245+
$(filter-out \
246+
%.stripped.pdb, \
247+
$(call FindFiles, $(SYMBOLS_IMAGE_DIR)) \
248+
)
246249

247250
TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_DEMOS_IMAGE_HOMEDIR)/demo/%, \
248251
$(ALL_JDK_DEMOS_FILES))

Diff for: make/Docs.gmk

+4-6
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ REFERENCE_TAGS := $(JAVADOC_TAGS)
9292
JAVADOC_DISABLED_DOCLINT_WARNINGS := missing
9393
JAVADOC_DISABLED_DOCLINT_PACKAGES := org.w3c.* javax.smartcardio
9494

95-
# Allow overriding on the command line
96-
# (intentionally sharing name with the javac option)
97-
JAVA_WARNINGS_ARE_ERRORS ?= -Werror
98-
9995
# The initial set of options for javadoc
10096
JAVADOC_OPTIONS := -use -keywords -notimestamp \
10197
-serialwarn -encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
@@ -264,7 +260,7 @@ define create_overview_file
264260
$$($1_OVERVIEW): $$($1_OVERVIEW_VARDEPS_FILE)
265261
$$(call LogInfo, Creating overview.html for $1)
266262
$$(call MakeDir, $$(@D))
267-
$$(PRINTF) > $$@ '$$($1_OVERVIEW_TEXT)'
263+
$$(ECHO) -n '$$($1_OVERVIEW_TEXT)' > $$@
268264
endef
269265

270266
################################################################################
@@ -322,7 +318,9 @@ define SetupApiDocsGenerationBody
322318
# Ignore the doclint warnings in certain packages
323319
$1_OPTIONS += -Xdoclint/package:$$(call CommaList, $$(addprefix -, \
324320
$$(JAVADOC_DISABLED_DOCLINT_PACKAGES)))
325-
$1_OPTIONS += $$(JAVA_WARNINGS_ARE_ERRORS)
321+
ifeq ($$(JAVA_WARNINGS_AS_ERRORS), true)
322+
$1_OPTIONS += -Werror
323+
endif
326324

327325
$1_DOC_TITLE := $$($1_LONG_NAME)<br>Version $$(VERSION_SPECIFICATION) API \
328326
Specification
File renamed without changes.

Diff for: make/Init.gmk

+7-7
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ include MakeFileStart.gmk
3737
include $(TOPDIR)/make/InitSupport.gmk
3838
include LogUtils.gmk
3939

40-
# Force early generation of module-deps.gmk and find-tests.gmk
40+
# Force early generation of module-deps.gmk
4141
GENERATE_MODULE_DEPS_FILE := true
4242
include Modules.gmk
43-
GENERATE_FIND_TESTS_FILE := true
44-
include FindTests.gmk
4543

4644
# Inclusion of this pseudo-target will cause make to execute this file
4745
# serially, regardless of -j.
@@ -139,7 +137,7 @@ main: MAKEOVERRIDES :=
139137
main: $(INIT_TARGETS)
140138
ifneq ($(SEQUENTIAL_TARGETS)$(PARALLEL_TARGETS), )
141139
$(call RotateLogFiles)
142-
$(PRINTF) "Building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE_SIMPLE)
140+
$(ECHO) "Building $(TARGET_DESCRIPTION)" $(BUILD_LOG_PIPE_SIMPLE)
143141
ifneq ($(SEQUENTIAL_TARGETS), )
144142
# Don't touch build output dir since we might be cleaning. That
145143
# means no log pipe.
@@ -160,7 +158,8 @@ main: $(INIT_TARGETS)
160158
-f make/Main.gmk $(USER_MAKE_VARS) \
161159
$(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE) $(BUILD_LOG_PIPE) || \
162160
( exitcode=$$? && \
163-
$(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode) \n" \
161+
$(ECHO) "" $(BUILD_LOG_PIPE_SIMPLE) && \
162+
$(ECHO) "ERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode)" \
164163
$(BUILD_LOG_PIPE_SIMPLE) && \
165164
cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -j 1 -f make/Init.gmk \
166165
on-failure ; \
@@ -172,7 +171,7 @@ main: $(INIT_TARGETS)
172171
if test -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error ; then \
173172
exit 1 ; \
174173
fi
175-
$(PRINTF) "Finished building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE_SIMPLE)
174+
$(ECHO) "Finished building $(TARGET_DESCRIPTION)" $(BUILD_LOG_PIPE_SIMPLE)
176175
$(call ReportProfileTimes)
177176
endif
178177

@@ -183,7 +182,8 @@ on-failure:
183182
$(call PrintFailureReports)
184183
$(call PrintBuildLogFailures)
185184
$(call ReportProfileTimes)
186-
$(PRINTF) "HELP: Run 'make doctor' to diagnose build problems.\n\n"
185+
$(ECHO) "HELP: Run 'make doctor' to diagnose build problems."
186+
$(ECHO) ""
187187
ifneq ($(COMPARE_BUILD), )
188188
$(call CleanupCompareBuild)
189189
endif

Diff for: make/InitSupport.gmk

+14-9
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,10 @@ define PrintFailureReports
173173
$(RM) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
174174
$(if $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log), \
175175
( \
176-
$(PRINTF) "\n=== Output from failing command(s) repeated here ===\n" ; \
176+
$(ECHO) "" ; \
177+
$(ECHO) "=== Output from failing command(s) repeated here ===" ; \
177178
$(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log)), \
178-
$(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" ; \
179+
$(ECHO) "* For target $(notdir $(basename $(logfile))):" ; \
179180
$(if $(filter all, $(LOG_REPORT)), \
180181
$(GREP) -v -e "^Note: including file:" < $(logfile) || true ; \
181182
, \
@@ -185,8 +186,9 @@ define PrintFailureReports
185186
fi ; \
186187
) \
187188
) \
188-
$(PRINTF) "\n* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs.\n" ; \
189-
$(PRINTF) "=== End of repeated output ===\n" ; \
189+
$(ECHO) "" ; \
190+
$(ECHO) "* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs." ; \
191+
$(ECHO) "=== End of repeated output ===" ; \
190192
) >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
191193
) \
192194
)
@@ -195,13 +197,16 @@ endef
195197
define PrintBuildLogFailures
196198
$(if $(filter none, $(LOG_REPORT)), , \
197199
if $(GREP) -q "recipe for target .* failed" $(BUILD_LOG) 2> /dev/null; then \
198-
$(PRINTF) "\n=== Make failed targets repeated here ===\n" ; \
200+
$(ECHO) "" ; \
201+
$(ECHO) "=== Make failed targets repeated here ===" ; \
199202
$(GREP) "recipe for target .* failed" $(BUILD_LOG) ; \
200-
$(PRINTF) "=== End of repeated output ===\n" ; \
201-
$(PRINTF) "\nHELP: Try searching the build log for the name of the first failed target.\n" ; \
203+
$(ECHO) "=== End of repeated output ===" ; \
204+
$(ECHO) "" ; \
205+
$(ECHO) "HELP: Try searching the build log for the name of the first failed target." ; \
202206
else \
203-
$(PRINTF) "\nNo indication of failed target found.\n" ; \
204-
$(PRINTF) "HELP: Try searching the build log for '] Error'.\n" ; \
207+
$(ECHO) "" ; \
208+
$(ECHO) "No indication of failed target found." ; \
209+
$(ECHO) "HELP: Try searching the build log for '] Error'." ; \
205210
fi >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
206211
$(CAT) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
207212
)

Diff for: make/MainSupport.gmk

+29-29
Original file line numberDiff line numberDiff line change
@@ -57,77 +57,77 @@ define SetupTargetBody
5757
endef
5858

5959
define CleanDocs
60-
@$(PRINTF) "Cleaning docs ..."
61-
@$(PRINTF) "\n" $(LOG_DEBUG)
60+
@$(ECHO) -n "Cleaning docs ..."
61+
@$(ECHO) "" $(LOG_DEBUG)
6262
$(RM) -r $(SUPPORT_OUTPUTDIR)/docs
6363
$(RM) -r $(SUPPORT_OUTPUTDIR)/javadoc
6464
$(RM) -r $(IMAGES_OUTPUTDIR)/docs
65-
@$(PRINTF) " done\n"
65+
@$(ECHO) " done"
6666
endef
6767

6868
# Cleans the dir given as $1
6969
define CleanDir
70-
@$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
71-
@$(PRINTF) "\n" $(LOG_DEBUG)
70+
@$(ECHO) -n "Cleaning $(strip $1) build artifacts ..."
71+
@$(ECHO) "" $(LOG_DEBUG)
7272
($(CD) $(OUTPUTDIR) && $(RM) -r $1)
73-
@$(PRINTF) " done\n"
73+
@$(ECHO) " done"
7474
endef
7575

7676
define CleanSupportDir
77-
@$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
78-
@$(PRINTF) "\n" $(LOG_DEBUG)
77+
@$(ECHO) -n "Cleaning$(strip $1) build artifacts ..."
78+
@$(ECHO) "" $(LOG_DEBUG)
7979
$(RM) -r $(SUPPORT_OUTPUTDIR)/$(strip $1)
80-
@$(PRINTF) " done\n"
80+
@$(ECHO) " done"
8181
endef
8282

8383
define CleanMakeSupportDir
84-
@$(PRINTF) "Cleaning $(strip $1) make support artifacts ..."
85-
@$(PRINTF) "\n" $(LOG_DEBUG)
84+
@$(ECHO) -n "Cleaning $(strip $1) make support artifacts ..."
85+
@$(ECHO) "" $(LOG_DEBUG)
8686
$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/$(strip $1)
87-
@$(PRINTF) " done\n"
87+
@$(ECHO) " done"
8888
endef
8989

9090
define CleanTest
91-
@$(PRINTF) "Cleaning test $(strip $1) ..."
92-
@$(PRINTF) "\n" $(LOG_DEBUG)
91+
@$(ECHO) -n "Cleaning test $(strip $1) ..."
92+
@$(ECHO) "" $(LOG_DEBUG)
9393
$(RM) -r $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))
9494
# Remove as much of the test directory structure as is empty
9595
$(RMDIR) -p $(dir $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))) 2> /dev/null || true
96-
@$(PRINTF) " done\n"
96+
@$(ECHO) " done"
9797
endef
9898

9999
define Clean-gensrc
100-
@$(PRINTF) "Cleaning gensrc $(if $1,for $(strip $1) )..."
101-
@$(PRINTF) "\n" $(LOG_DEBUG)
100+
@$(ECHO) -n "Cleaning gensrc $(if $1,for $(strip $1) )..."
101+
@$(ECHO) "" $(LOG_DEBUG)
102102
$(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)
103-
@$(PRINTF) " done\n"
103+
@$(ECHO) " done"
104104
endef
105105

106106
define Clean-java
107-
@$(PRINTF) "Cleaning java $(if $1,for $(strip $1) )..."
108-
@$(PRINTF) "\n" $(LOG_DEBUG)
107+
@$(ECHO) -n "Cleaning java $(if $1,for $(strip $1) )..."
108+
@$(ECHO) "" $(LOG_DEBUG)
109109
$(RM) -r $(JDK_OUTPUTDIR)/modules/$(strip $1)
110110
$(RM) -r $(SUPPORT_OUTPUTDIR)/special_classes/$(strip $1)
111-
$(PRINTF) " done\n"
112-
$(PRINTF) "Cleaning headers $(if $1,for $(strip $1)) ..."
111+
$(ECHO) " done"
112+
$(ECHO) -n "Cleaning headers $(if $1,for $(strip $1) )..."
113113
$(RM) -r $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)
114-
@$(PRINTF) " done\n"
114+
@$(ECHO) " done"
115115
endef
116116

117117
define Clean-native
118-
@$(PRINTF) "Cleaning native $(if $1,for $(strip $1) )..."
119-
@$(PRINTF) "\n" $(LOG_DEBUG)
118+
@$(ECHO) -n "Cleaning native $(if $1,for $(strip $1) )..."
119+
@$(ECHO) "" $(LOG_DEBUG)
120120
$(RM) -r $(SUPPORT_OUTPUTDIR)/native/$(strip $1)
121121
$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
122122
$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
123-
@$(PRINTF) " done\n"
123+
@$(ECHO) " done"
124124
endef
125125

126126
define Clean-include
127-
@$(PRINTF) "Cleaning include $(if $1,for $(strip $1) )..."
128-
@$(PRINTF) "\n" $(LOG_DEBUG)
127+
@$(ECHO) -n "Cleaning include $(if $1,for $(strip $1) )..."
128+
@$(ECHO) "" $(LOG_DEBUG)
129129
$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_include/$(strip $1)
130-
@$(PRINTF) " done\n"
130+
@$(ECHO) " done"
131131
endef
132132

133133
define CleanModule

Diff for: make/PreInit.gmk

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ include $(TOPDIR)/make/common/LogUtils.gmk
4848
# a configuration. This will define ALL_GLOBAL_TARGETS.
4949
include $(TOPDIR)/make/Global.gmk
5050

51+
# Targets provided by Init.gmk.
52+
ALL_INIT_TARGETS := print-modules print-targets print-configuration \
53+
print-tests reconfigure pre-compare-build post-compare-build
54+
5155
# CALLED_TARGETS is the list of targets that the user provided,
5256
# or "default" if unspecified.
5357
CALLED_TARGETS := $(if $(MAKECMDGOALS), $(MAKECMDGOALS), default)
@@ -93,10 +97,6 @@ ifneq ($(SKIP_SPEC), true)
9397
# This will setup ALL_MAIN_TARGETS.
9498
$(eval $(call DefineMainTargets, FORCE, $(firstword $(SPECS))))
9599

96-
# Targets provided by Init.gmk.
97-
ALL_INIT_TARGETS := print-modules print-targets print-configuration \
98-
print-tests reconfigure pre-compare-build post-compare-build
99-
100100
# Separate called targets depending on type.
101101
INIT_TARGETS := $(filter $(ALL_INIT_TARGETS), $(CALLED_SPEC_TARGETS))
102102
MAIN_TARGETS := $(filter $(ALL_MAIN_TARGETS), $(CALLED_SPEC_TARGETS))

Diff for: make/PreInitSupport.gmk

+3
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ define DefineMainTargets
267267

268268
$$(main_targets_file):
269269
@( cd $$(TOPDIR) && \
270+
$$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/GenerateFindTests.gmk \
271+
-I $$(TOPDIR)/make/common SPEC=$(strip $2) )
272+
@( cd $$(TOPDIR) && \
270273
$$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/Main.gmk \
271274
-I $$(TOPDIR)/make/common SPEC=$(strip $2) NO_RECIPES=true \
272275
$$(MAKE_LOG_VARS) \

0 commit comments

Comments
 (0)