Skip to content

Commit

Permalink
Merge branch 'master' of https://git.openjdk.org/jdk into JDK-8344171
Browse files Browse the repository at this point in the history
  • Loading branch information
chhagedorn committed Nov 25, 2024
2 parents 76c609b + 8de158a commit dfcbf45
Show file tree
Hide file tree
Showing 1,798 changed files with 63,743 additions and 55,392 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ NashornProfile.txt
/.settings/
/compile_commands.json
/.cache
/.gdbinit
/.lldbinit
2 changes: 1 addition & 1 deletion make/Global.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ help:
$(info $(_) # method is 'auto', 'ignore' or 'fail' (default))
$(info $(_) TEST="test1 ..." # Use the given test descriptor(s) for testing, e.g.)
$(info $(_) # make test TEST="jdk_lang gtest:all")
$(info $(_) TEST_DEPS="dependency1 ..." # Specify additional dependencies for running tests, e.g docs-jdk
$(info $(_) TEST_DEPS="dependency1 ..." # Specify additional dependencies for running tests, e.g docs-jdk)
$(info $(_) JTREG="OPT1=x;OPT2=y" # Control the JTREG test harness, use 'make test-only JTREG=help' to list)
$(info $(_) GTEST="OPT1=x;OPT2=y" # Control the GTEST test harness, use 'make test-only GTEST=help' to list)
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness, use 'make test-only MICRO=help' to list)
Expand Down
72 changes: 69 additions & 3 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ifneq ($(TEST_VM_OPTS), )
endif

$(eval $(call ParseKeywordVariable, TEST_OPTS, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV JCOV_DIFF_CHANGESET, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV JCOV_DIFF_CHANGESET AOT_JDK, \
STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS, \
))

Expand Down Expand Up @@ -202,11 +202,12 @@ $(eval $(call SetTestOpt,JOBS,JTREG))
$(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
$(eval $(call SetTestOpt,FAILURE_HANDLER_TIMEOUT,JTREG))
$(eval $(call SetTestOpt,REPORT,JTREG))
$(eval $(call SetTestOpt,AOT_JDK,JTREG))

$(eval $(call ParseKeywordVariable, JTREG, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY MAX_MEM RUN_PROBLEM_LISTS \
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT AOT_JDK $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
$(CUSTOM_JTREG_STRING_KEYWORDS), \
Expand Down Expand Up @@ -702,6 +703,58 @@ define SetJtregValue
endif
endef


# Parameter 1 is the name of the rule.
#
# Remaining parameters are named arguments.
# VM_OPTIONS List of JVM arguments to use when creating AOT cache
#
# After calling this, the following variables are defined
# $1_AOT_TARGETS List of all targets that the test rule will need to depend on
# $1_AOT_JDK_CACHE The AOT cache file to be used to run the test with
#
SetupAot = $(NamedParamsMacroTemplate)
define SetupAotBody
$1_AOT_JDK_CONF := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotconf
$1_AOT_JDK_CACHE := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotcache

$1_JAVA_TOOL_OPTS := $$(addprefix -J, $$($1_VM_OPTIONS))

$$($1_AOT_JDK_CACHE): $$(JDK_IMAGE_DIR)/release
$$(call MakeDir, $$($1_TEST_SUPPORT_DIR)/aot)

$(foreach jtool, javac javap jlink jar, \
$(info AOT: Create cache configuration for $(jtool)) \
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot.$(jtool), ( \
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/$(jtool) $$($1_JAVA_TOOL_OPTS) \
-J-XX:AOTMode=record -J-XX:AOTConfiguration=$$($1_AOT_JDK_CONF).$(jtool) --help \
))
)

$$(info AOT: Copy $(JDK_UNDER_TEST)/lib/classlist to $$($1_AOT_JDK_CONF).jdk )
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
$$(FIXPATH) $(CP) $(JDK_UNDER_TEST)/lib/classlist $$($1_AOT_JDK_CONF).jdk \
))

$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).* > $$($1_AOT_JDK_CONF).temp
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) -v '#' | $(GREP) -v '@' | $(SORT) | \
$(SED) -e 's/id:.*//g' | uniq \
> $$($1_AOT_JDK_CONF)
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) '@cp' | $(SORT) \
>> $$($1_AOT_JDK_CONF)

$$(info AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
$$($1_VM_OPTIONS) -Xlog:cds,cds+class=debug:file=$$($1_AOT_JDK_CACHE).log \
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
))

$1_AOT_TARGETS += $$($1_AOT_JDK_CACHE)

endef


SetupRunJtregTest = $(NamedParamsMacroTemplate)
define SetupRunJtregTestBody
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1
Expand Down Expand Up @@ -762,6 +815,7 @@ define SetupRunJtregTestBody
JTREG_RETRY_COUNT ?= 0
JTREG_REPEAT_COUNT ?= 0
JTREG_REPORT ?= files
JTREG_AOT_JDK ?= false

ifneq ($$(JTREG_RETRY_COUNT), 0)
ifneq ($$(JTREG_REPEAT_COUNT), 0)
Expand Down Expand Up @@ -891,6 +945,17 @@ define SetupRunJtregTestBody
endif
endif

ifeq ($$(JTREG_AOT_JDK), true)
$$(info Add AOT target for $1)
$$(eval $$(call SetupAot, $1, VM_OPTIONS := $$(JTREG_ALL_OPTIONS) ))

$$(info AOT_TARGETS=$$($1_AOT_TARGETS))
$$(info AOT_JDK_CACHE=$$($1_AOT_JDK_CACHE))

$1_JTREG_BASIC_OPTIONS += -vmoption:-XX:AOTCache="$$($1_AOT_JDK_CACHE)"
endif


$$(eval $$(call SetupRunJtregTestCustom, $1))

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

clean-outputdirs-$1:
$$(call LogWarn, Clean up dirs for $1)
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
$$(RM) -r $$($1_TEST_RESULTS_DIR)

Expand Down Expand Up @@ -953,7 +1019,7 @@ define SetupRunJtregTestBody
done
endif

run-test-$1: pre-run-test clean-outputdirs-$1
run-test-$1: clean-outputdirs-$1 pre-run-test $$($1_AOT_TARGETS)
$$(call LogWarn)
$$(call LogWarn, Running test '$$($1_TEST)')
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \
Expand Down
4 changes: 2 additions & 2 deletions make/ZipSecurity.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2024, 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 @@ -27,7 +27,7 @@ default: all

include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include ZipArchive.gmk

################################################################################
#
Expand Down
4 changes: 2 additions & 2 deletions make/ZipSource.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2024, 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 @@ -27,8 +27,8 @@ default: all

include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include Modules.gmk
include ZipArchive.gmk

SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src
$(if $(filter $(TOPDIR)/%, $(SUPPORT_OUTPUTDIR)), $(eval SRC_ZIP_BASE := $(TOPDIR)), $(eval SRC_ZIP_BASE := $(SUPPORT_OUTPUTDIR)))
Expand Down
10 changes: 0 additions & 10 deletions make/common/modules/LauncherCommon.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,8 @@ ifeq ($(call isTargetOsType, unix)+$(MAKEFILE_PREFIX), true+Launcher)
# We assume all our man pages should reside in section 1.

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

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

TARGETS += $(BUILD_MAN_PAGES)
endif
else
# No markdown man pages present
$(eval $(call SetupCopyFiles, COPY_MAN_PAGES, \
DEST := $(SUPPORT_OUTPUTDIR)/modules_man/$(MODULE)/man1, \
FILES := $(MAN_FILES_TROFF), \
))

TARGETS += $(COPY_MAN_PAGES)
endif
endif
1 change: 1 addition & 0 deletions make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ var getJibProfilesCommon = function (input, data) {
configure_args: concat(
"--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",
"--disable-jvm-feature-shenandoahgc",
"--disable-cds-archive-coh",
versionArgs(input, common))
};

Expand Down
4 changes: 4 additions & 0 deletions make/hotspot/lib/JvmOverrideFiles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
# Need extra inlining to collapse shared marking code into the hot marking loop
BUILD_LIBJVM_shenandoahMark.cpp_CXXFLAGS := --param inline-unit-growth=1000
endif
# disable lto in g1ParScanThreadState because of special inlining/flattening used there
ifeq ($(call check-jvm-feature, link-time-opt), true)
BUILD_LIBJVM_g1ParScanThreadState.cpp_CXXFLAGS := -fno-lto
endif
endif

LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NONE)
Expand Down
12 changes: 0 additions & 12 deletions make/modules/java.desktop/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@ EXCLUDE_FILES += \
javax/swing/plaf/nimbus/SpinnerPainter.java \
javax/swing/plaf/nimbus/SplitPanePainter.java \
javax/swing/plaf/nimbus/TabbedPanePainter.java \
sun/awt/resources/security-icon-bw16.png \
sun/awt/resources/security-icon-bw24.png \
sun/awt/resources/security-icon-bw32.png \
sun/awt/resources/security-icon-bw48.png \
sun/awt/resources/security-icon-interim16.png \
sun/awt/resources/security-icon-interim24.png \
sun/awt/resources/security-icon-interim32.png \
sun/awt/resources/security-icon-interim48.png \
sun/awt/resources/security-icon-yellow16.png \
sun/awt/resources/security-icon-yellow24.png \
sun/awt/resources/security-icon-yellow32.png \
sun/awt/resources/security-icon-yellow48.png \
sun/awt/X11/java-icon16.png \
sun/awt/X11/java-icon24.png \
sun/awt/X11/java-icon32.png \
Expand Down
17 changes: 0 additions & 17 deletions make/modules/java.desktop/gensrc/GensrcIcons.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,6 @@ GENSRC_AWT_ICONS_SRC += \
$(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
$(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png


AWT_ICONPATH := $(MODULE_SRC)/share/classes/sun/awt/resources

GENSRC_AWT_ICONS_SRC += \
$(AWT_ICONPATH)/security-icon-bw16.png \
$(AWT_ICONPATH)/security-icon-interim16.png \
$(AWT_ICONPATH)/security-icon-yellow16.png \
$(AWT_ICONPATH)/security-icon-bw24.png \
$(AWT_ICONPATH)/security-icon-interim24.png \
$(AWT_ICONPATH)/security-icon-yellow24.png \
$(AWT_ICONPATH)/security-icon-bw32.png \
$(AWT_ICONPATH)/security-icon-interim32.png \
$(AWT_ICONPATH)/security-icon-yellow32.png \
$(AWT_ICONPATH)/security-icon-bw48.png \
$(AWT_ICONPATH)/security-icon-interim48.png \
$(AWT_ICONPATH)/security-icon-yellow48.png

GENSRC_AWT_ICONS_FILES := $(notdir $(GENSRC_AWT_ICONS_SRC))

GENSRC_AWT_ICONS_SHORT_NAME = $(subst .,_,$(subst -,_,$(1)))
Expand Down
1 change: 1 addition & 0 deletions make/test/BuildMicrobenchmark.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ include $(SPEC)
include MakeBase.gmk

include CopyFiles.gmk
include JarArchive.gmk
include JavaCompilation.gmk
include TestFilesCompilation.gmk

Expand Down
8 changes: 1 addition & 7 deletions src/demo/share/jfc/Font2DTest/FontPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -1114,13 +1114,7 @@ public void showZoomed() {
/// Position and set size of zoom window as needed
zoomWindow.setLocation( canvasLoc.x + zoomAreaX, canvasLoc.y + zoomAreaY );
if ( !nowZooming ) {
if ( zoomWindow.getWarningString() != null )
/// If this is not opened as a "secure" window,
/// it has a banner below the zoom dialog which makes it look really BAD
/// So enlarge it by a bit
zoomWindow.setSize( zoomAreaWidth + 1, zoomAreaHeight + 20 );
else
zoomWindow.setSize( zoomAreaWidth + 1, zoomAreaHeight + 1 );
zoomWindow.setSize( zoomAreaWidth + 1, zoomAreaHeight + 1 );
}

/// Prepare zoomed image
Expand Down
3 changes: 1 addition & 2 deletions src/demo/share/jfc/SampleTree/SampleTree.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -142,7 +142,6 @@ public SampleTree() {

/** Constructs a JPanel containing check boxes for the different
* options that tree supports. */
@SuppressWarnings("serial")
private JPanel constructOptionsPanel() {
JCheckBox aCheckbox;
JPanel retPanel = new JPanel(false);
Expand Down
3 changes: 1 addition & 2 deletions src/demo/share/jfc/TableExample/TableExample3.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -97,7 +97,6 @@ public void windowClosing(WindowEvent e) {
};

// Create a model of the data.
@SuppressWarnings("serial")
TableModel dataModel = new AbstractTableModel() {
// These methods always need to be implemented.

Expand Down
4 changes: 1 addition & 3 deletions src/demo/share/jfc/TableExample/TableExample4.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -99,7 +99,6 @@ public void windowClosing(WindowEvent e) {
};

// Create a model of the data.
@SuppressWarnings("serial")
TableModel dataModel = new AbstractTableModel() {
// These methods always need to be implemented.

Expand Down Expand Up @@ -180,7 +179,6 @@ public void setValueAt(Object aValue, int row, int column) {

// Show the values in the "Favorite Number" column in different colors.
TableColumn numbersColumn = tableView.getColumn("Favorite Number");
@SuppressWarnings("serial")
DefaultTableCellRenderer numberColumnRenderer
= new DefaultTableCellRenderer() {

Expand Down
34 changes: 26 additions & 8 deletions src/hotspot/cpu/aarch64/aarch64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -2632,6 +2632,23 @@ bool Matcher::pd_clone_node(Node* n, Node* m, Matcher::MStack& mstack) {
// to be subsumed into complex addressing expressions or compute them
// into registers?
bool Matcher::pd_clone_address_expressions(AddPNode* m, Matcher::MStack& mstack, VectorSet& address_visited) {

// Loads and stores with indirect memory input (e.g., volatile loads and
// stores) do not subsume the input into complex addressing expressions. If
// the addressing expression is input to at least one such load or store, do
// not clone the addressing expression. Query needs_acquiring_load and
// needs_releasing_store as a proxy for indirect memory input, as it is not
// possible to directly query for indirect memory input at this stage.
for (DUIterator_Fast imax, i = m->fast_outs(imax); i < imax; i++) {
Node* n = m->fast_out(i);
if (n->is_Load() && needs_acquiring_load(n)) {
return false;
}
if (n->is_Store() && needs_releasing_store(n)) {
return false;
}
}

if (clone_base_plus_offset_address(m, mstack, address_visited)) {
return true;
}
Expand Down Expand Up @@ -5755,10 +5772,6 @@ opclass memory(indirect, indIndexScaled, indIndexScaledI2L, indIndexI2L, indInde
indirectN, indIndexScaledN, indIndexScaledI2LN, indIndexI2LN, indIndexN, indOffIN, indOffLN, indirectX2P, indOffX2P);


opclass memory_noindex(indirect,
indOffI1, indOffL1,indOffI2, indOffL2, indOffI4, indOffL4, indOffI8, indOffL8,
indirectN, indOffIN, indOffLN, indirectX2P, indOffX2P);

// iRegIorL2I is used for src inputs in rules for 32 bit int (I)
// operations. it allows the src to be either an iRegI or a (ConvL2I
// iRegL). in the latter case the l2i normally planted for a ConvL2I
Expand Down Expand Up @@ -6695,16 +6708,21 @@ instruct loadNKlass(iRegNNoSp dst, memory4 mem)
ins_pipe(iload_reg_mem);
%}

instruct loadNKlassCompactHeaders(iRegNNoSp dst, memory_noindex mem)
instruct loadNKlassCompactHeaders(iRegNNoSp dst, memory4 mem)
%{
match(Set dst (LoadNKlass mem));
predicate(!needs_acquiring_load(n) && UseCompactObjectHeaders);

ins_cost(4 * INSN_COST);
format %{ "load_narrow_klass_compact $dst, $mem\t# compressed class ptr" %}
format %{
"ldrw $dst, $mem\t# compressed class ptr, shifted\n\t"
"lsrw $dst, $dst, markWord::klass_shift_at_offset"
%}
ins_encode %{
assert($mem$$index$$Register == noreg, "must not have indexed address");
__ load_narrow_klass_compact_c2($dst$$Register, $mem$$base$$Register, $mem$$disp);
// inlined aarch64_enc_ldrw
loadStore(masm, &MacroAssembler::ldrw, $dst$$Register, $mem->opcode(),
as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp, 4);
__ lsrw($dst$$Register, $dst$$Register, markWord::klass_shift_at_offset);
%}
ins_pipe(iload_reg_mem);
%}
Expand Down
Loading

0 comments on commit dfcbf45

Please sign in to comment.