Skip to content

Commit 3111873

Browse files
[Automated] Merge in tag jdk-24+25
PullRequest: labsjdk-ce/129
2 parents 9213944 + 8779d2d commit 3111873

File tree

1,437 files changed

+43305
-44740
lines changed

Some content is hidden

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

1,437 files changed

+43305
-44740
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ NashornProfile.txt
2020
/.settings/
2121
/compile_commands.json
2222
/.cache
23+
/.gdbinit
24+
/.lldbinit

make/Global.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ help:
102102
$(info $(_) # method is 'auto', 'ignore' or 'fail' (default))
103103
$(info $(_) TEST="test1 ..." # Use the given test descriptor(s) for testing, e.g.)
104104
$(info $(_) # make test TEST="jdk_lang gtest:all")
105-
$(info $(_) TEST_DEPS="dependency1 ..." # Specify additional dependencies for running tests, e.g docs-jdk
105+
$(info $(_) TEST_DEPS="dependency1 ..." # Specify additional dependencies for running tests, e.g docs-jdk)
106106
$(info $(_) JTREG="OPT1=x;OPT2=y" # Control the JTREG test harness, use 'make test-only JTREG=help' to list)
107107
$(info $(_) GTEST="OPT1=x;OPT2=y" # Control the GTEST test harness, use 'make test-only GTEST=help' to list)
108108
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness, use 'make test-only MICRO=help' to list)

make/RunTests.gmk

Lines changed: 69 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ifneq ($(TEST_VM_OPTS), )
4545
endif
4646

4747
$(eval $(call ParseKeywordVariable, TEST_OPTS, \
48-
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV JCOV_DIFF_CHANGESET, \
48+
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV JCOV_DIFF_CHANGESET AOT_JDK, \
4949
STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS, \
5050
))
5151

@@ -202,11 +202,12 @@ $(eval $(call SetTestOpt,JOBS,JTREG))
202202
$(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
203203
$(eval $(call SetTestOpt,FAILURE_HANDLER_TIMEOUT,JTREG))
204204
$(eval $(call SetTestOpt,REPORT,JTREG))
205+
$(eval $(call SetTestOpt,AOT_JDK,JTREG))
205206

206207
$(eval $(call ParseKeywordVariable, JTREG, \
207208
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
208209
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY MAX_MEM RUN_PROBLEM_LISTS \
209-
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
210+
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT AOT_JDK $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
210211
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
211212
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
212213
$(CUSTOM_JTREG_STRING_KEYWORDS), \
@@ -702,6 +703,58 @@ define SetJtregValue
702703
endif
703704
endef
704705

706+
707+
# Parameter 1 is the name of the rule.
708+
#
709+
# Remaining parameters are named arguments.
710+
# VM_OPTIONS List of JVM arguments to use when creating AOT cache
711+
#
712+
# After calling this, the following variables are defined
713+
# $1_AOT_TARGETS List of all targets that the test rule will need to depend on
714+
# $1_AOT_JDK_CACHE The AOT cache file to be used to run the test with
715+
#
716+
SetupAot = $(NamedParamsMacroTemplate)
717+
define SetupAotBody
718+
$1_AOT_JDK_CONF := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotconf
719+
$1_AOT_JDK_CACHE := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotcache
720+
721+
$1_JAVA_TOOL_OPTS := $$(addprefix -J, $$($1_VM_OPTIONS))
722+
723+
$$($1_AOT_JDK_CACHE): $$(JDK_IMAGE_DIR)/release
724+
$$(call MakeDir, $$($1_TEST_SUPPORT_DIR)/aot)
725+
726+
$(foreach jtool, javac javap jlink jar, \
727+
$(info AOT: Create cache configuration for $(jtool)) \
728+
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot.$(jtool), ( \
729+
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/$(jtool) $$($1_JAVA_TOOL_OPTS) \
730+
-J-XX:AOTMode=record -J-XX:AOTConfiguration=$$($1_AOT_JDK_CONF).$(jtool) --help \
731+
))
732+
)
733+
734+
$$(info AOT: Copy $(JDK_UNDER_TEST)/lib/classlist to $$($1_AOT_JDK_CONF).jdk )
735+
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
736+
$$(FIXPATH) $(CP) $(JDK_UNDER_TEST)/lib/classlist $$($1_AOT_JDK_CONF).jdk \
737+
))
738+
739+
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).* > $$($1_AOT_JDK_CONF).temp
740+
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) -v '#' | $(GREP) -v '@' | $(SORT) | \
741+
$(SED) -e 's/id:.*//g' | uniq \
742+
> $$($1_AOT_JDK_CONF)
743+
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) '@cp' | $(SORT) \
744+
>> $$($1_AOT_JDK_CONF)
745+
746+
$$(info AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
747+
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
748+
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
749+
$$($1_VM_OPTIONS) -Xlog:cds,cds+class=debug:file=$$($1_AOT_JDK_CACHE).log \
750+
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
751+
))
752+
753+
$1_AOT_TARGETS += $$($1_AOT_JDK_CACHE)
754+
755+
endef
756+
757+
705758
SetupRunJtregTest = $(NamedParamsMacroTemplate)
706759
define SetupRunJtregTestBody
707760
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1
@@ -762,6 +815,7 @@ define SetupRunJtregTestBody
762815
JTREG_RETRY_COUNT ?= 0
763816
JTREG_REPEAT_COUNT ?= 0
764817
JTREG_REPORT ?= files
818+
JTREG_AOT_JDK ?= false
765819

766820
ifneq ($$(JTREG_RETRY_COUNT), 0)
767821
ifneq ($$(JTREG_REPEAT_COUNT), 0)
@@ -891,6 +945,17 @@ define SetupRunJtregTestBody
891945
endif
892946
endif
893947

948+
ifeq ($$(JTREG_AOT_JDK), true)
949+
$$(info Add AOT target for $1)
950+
$$(eval $$(call SetupAot, $1, VM_OPTIONS := $$(JTREG_ALL_OPTIONS) ))
951+
952+
$$(info AOT_TARGETS=$$($1_AOT_TARGETS))
953+
$$(info AOT_JDK_CACHE=$$($1_AOT_JDK_CACHE))
954+
955+
$1_JTREG_BASIC_OPTIONS += -vmoption:-XX:AOTCache="$$($1_AOT_JDK_CACHE)"
956+
endif
957+
958+
894959
$$(eval $$(call SetupRunJtregTestCustom, $1))
895960

896961
# SetupRunJtregTestCustom might also adjust JTREG_AUTO_ variables
@@ -906,6 +971,7 @@ define SetupRunJtregTestBody
906971
JTREG_TIMEOUT_FACTOR ?= $$(JTREG_AUTO_TIMEOUT_FACTOR)
907972

908973
clean-outputdirs-$1:
974+
$$(call LogWarn, Clean up dirs for $1)
909975
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
910976
$$(RM) -r $$($1_TEST_RESULTS_DIR)
911977

@@ -953,7 +1019,7 @@ define SetupRunJtregTestBody
9531019
done
9541020
endif
9551021

956-
run-test-$1: pre-run-test clean-outputdirs-$1
1022+
run-test-$1: clean-outputdirs-$1 pre-run-test $$($1_AOT_TARGETS)
9571023
$$(call LogWarn)
9581024
$$(call LogWarn, Running test '$$($1_TEST)')
9591025
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \

make/ZipSecurity.gmk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2014, 2024, 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
@@ -27,7 +27,7 @@ default: all
2727

2828
include $(SPEC)
2929
include MakeBase.gmk
30-
include JavaCompilation.gmk
30+
include ZipArchive.gmk
3131

3232
################################################################################
3333
#

make/ZipSource.gmk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2014, 2024, 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
@@ -27,8 +27,8 @@ default: all
2727

2828
include $(SPEC)
2929
include MakeBase.gmk
30-
include JavaCompilation.gmk
3130
include Modules.gmk
31+
include ZipArchive.gmk
3232

3333
SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src
3434
$(if $(filter $(TOPDIR)/%, $(SUPPORT_OUTPUTDIR)), $(eval SRC_ZIP_BASE := $(TOPDIR)), $(eval SRC_ZIP_BASE := $(SUPPORT_OUTPUTDIR)))

make/common/modules/LauncherCommon.gmk

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,8 @@ ifeq ($(call isTargetOsType, unix)+$(MAKEFILE_PREFIX), true+Launcher)
178178
# We assume all our man pages should reside in section 1.
179179

180180
MAN_FILES_MD := $(wildcard $(addsuffix /*.md, $(call FindModuleManDirs, $(MODULE))))
181-
MAN_FILES_TROFF := $(wildcard $(addsuffix /*.1, $(call FindModuleManDirs, $(MODULE))))
182181

183182
ifneq ($(MAN_FILES_MD), )
184-
# If we got markdown files, ignore the troff files
185183
ifeq ($(ENABLE_PANDOC), false)
186184
$(info Warning: pandoc not found. Not generating man pages)
187185
else
@@ -226,13 +224,5 @@ ifeq ($(call isTargetOsType, unix)+$(MAKEFILE_PREFIX), true+Launcher)
226224

227225
TARGETS += $(BUILD_MAN_PAGES)
228226
endif
229-
else
230-
# No markdown man pages present
231-
$(eval $(call SetupCopyFiles, COPY_MAN_PAGES, \
232-
DEST := $(SUPPORT_OUTPUTDIR)/modules_man/$(MODULE)/man1, \
233-
FILES := $(MAN_FILES_TROFF), \
234-
))
235-
236-
TARGETS += $(COPY_MAN_PAGES)
237227
endif
238228
endif

make/conf/jib-profiles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ var getJibProfilesCommon = function (input, data) {
253253
configure_args: concat(
254254
"--with-exclude-translations=es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
255255
"--disable-jvm-feature-shenandoahgc",
256+
"--disable-cds-archive-coh",
256257
versionArgs(input, common))
257258
};
258259

make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,6 +1896,11 @@ private void finishClassLoading(ClassList classes, Map<String, ModuleDescription
18961896
continue;
18971897
}
18981898

1899+
if (ed.packageName.equals("jdk/internal/javac")) {
1900+
//keep jdk/internal/javac untouched. It is used to determine participates in preview:
1901+
continue;
1902+
}
1903+
18991904
Set<String> usingModules = package2ModulesUsingIt.getOrDefault(ed.packageName(), Set.of());
19001905

19011906
ed.to.retainAll(usingModules);

make/test/BuildMicrobenchmark.gmk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ include $(SPEC)
3030
include MakeBase.gmk
3131

3232
include CopyFiles.gmk
33+
include JarArchive.gmk
3334
include JavaCompilation.gmk
3435
include TestFilesCompilation.gmk
3536

src/demo/share/jfc/SampleTree/SampleTree.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
33
*
44
* Redistribution and use in source and binary forms, with or without
55
* modification, are permitted provided that the following conditions
@@ -142,7 +142,6 @@ public SampleTree() {
142142

143143
/** Constructs a JPanel containing check boxes for the different
144144
* options that tree supports. */
145-
@SuppressWarnings("serial")
146145
private JPanel constructOptionsPanel() {
147146
JCheckBox aCheckbox;
148147
JPanel retPanel = new JPanel(false);

0 commit comments

Comments
 (0)