Skip to content

Commit 7429c37

Browse files
committed
8334598: Default classlist in JDK is not deterministic after JDK-8293980
Reviewed-by: ccheung, dholmes, stuefe, erikj
1 parent 9c89f08 commit 7429c37

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Diff for: make/GenerateLinkOptData.gmk

+8-7
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ ifeq ($(EXTERNAL_BUILDJDK), true)
6262
INTERIM_IMAGE_DIR := $(BUILD_JDK)
6363
endif
6464

65-
# These are needed for deterministic classlist:
65+
# To make the classlist deterministic:
6666
# - The classlist can be influenced by locale. Always set it to en/US.
67-
# - Run with -Xint, as the compiler can speculatively resolve constant pool entries.
68-
# - ForkJoinPool parallelism can cause constant pool resolution to be non-deterministic.
67+
# - Concurrency in the core libraries can cause constant pool resolution
68+
# to be non-deterministic. Since the benefits of resolved CP references in the
69+
# default classlist is minimal, let's filter out the '@cp' lines until we can
70+
# find a proper solution.
6971
CLASSLIST_FILE_VM_OPTS = \
70-
-Duser.language=en -Duser.country=US \
71-
-Xint \
72-
-Djava.util.concurrent.ForkJoinPool.common.parallelism=0
72+
-Duser.language=en -Duser.country=US
7373

7474
# Save the stderr output of the command and print it along with stdout in case
7575
# something goes wrong.
@@ -101,9 +101,10 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
101101
exit $$exitcode \
102102
)
103103
$(GREP) -v HelloClasslist [email protected] > [email protected]
104+
104105
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \
105106
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
106-
build.tools.classlist.SortClasslist [email protected].3 > $@
107+
build.tools.classlist.SortClasslist [email protected].4 > $@
107108

108109
# The jli trace is created by the same recipe as classlist. By declaring these
109110
# dependencies, make will correctly rebuild both jli trace and classlist

0 commit comments

Comments
 (0)