Skip to content

Commit

Permalink
[Automated] Merge in tag jdk-24+25
Browse files Browse the repository at this point in the history
PullRequest: labsjdk-ce/129
  • Loading branch information
OracleLabsAutomation authored and marwan-hallaoui committed Nov 22, 2024
2 parents 9213944 + 8779d2d commit 3111873
Show file tree
Hide file tree
Showing 1,437 changed files with 43,305 additions and 44,740 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
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,11 @@ private void finishClassLoading(ClassList classes, Map<String, ModuleDescription
continue;
}

if (ed.packageName.equals("jdk/internal/javac")) {
//keep jdk/internal/javac untouched. It is used to determine participates in preview:
continue;
}

Set<String> usingModules = package2ModulesUsingIt.getOrDefault(ed.packageName(), Set.of());

ed.to.retainAll(usingModules);
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
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
9 changes: 0 additions & 9 deletions src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2690,12 +2690,3 @@ bool C2_MacroAssembler::in_scratch_emit_size() {
}
return MacroAssembler::in_scratch_emit_size();
}

void C2_MacroAssembler::load_narrow_klass_compact_c2(Register dst, Register obj, int disp) {
// Note: Don't clobber obj anywhere in that method!

// The incoming address is pointing into obj-start + klass_offset_in_bytes. We need to extract
// obj-start, so that we can load from the object's mark-word instead.
ldr(dst, Address(obj, disp - oopDesc::klass_offset_in_bytes()));
lsr(dst, dst, markWord::klass_shift);
}
2 changes: 0 additions & 2 deletions src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,4 @@
void vector_signum_sve(FloatRegister dst, FloatRegister src, FloatRegister zero,
FloatRegister one, FloatRegister vtmp, PRegister pgtmp, SIMD_RegVariant T);

void load_narrow_klass_compact_c2(Register dst, Register obj, int disp);

#endif // CPU_AARCH64_C2_MACROASSEMBLER_AARCH64_HPP
1 change: 1 addition & 0 deletions src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ define_pd_global(bool, OptoScheduling, false);
define_pd_global(bool, OptoBundling, false);
define_pd_global(bool, OptoRegScheduling, false);
define_pd_global(bool, SuperWordLoopUnrollAnalysis, true);
define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 8);
define_pd_global(bool, IdealizeClearArrayNode, true);

define_pd_global(intx, ReservedCodeCacheSize, 48*M);
Expand Down
8 changes: 7 additions & 1 deletion src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,13 @@ void InterpreterMacroAssembler::dispatch_base(TosState state,
bool verifyoop,
bool generate_poll) {
if (VerifyActivationFrameSize) {
Unimplemented();
Label L;
sub(rscratch2, rfp, esp);
int min_frame_size = (frame::link_offset - frame::interpreter_frame_initial_sp_offset) * wordSize;
subs(rscratch2, rscratch2, min_frame_size);
br(Assembler::GE, L);
stop("broken stack frame");
bind(L);
}
if (verifyoop) {
interp_verify_oop(r0, state);
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/cpu/arm/c2_globals_arm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ define_pd_global(bool, OptoBundling, false);
define_pd_global(bool, OptoScheduling, true);
define_pd_global(bool, OptoRegScheduling, false);
define_pd_global(bool, SuperWordLoopUnrollAnalysis, false);
define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 16);
define_pd_global(bool, IdealizeClearArrayNode, true);

#ifdef _LP64
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/cpu/ppc/c2_globals_ppc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ define_pd_global(bool, UseCISCSpill, false);
define_pd_global(bool, OptoBundling, false);
define_pd_global(bool, OptoRegScheduling, false);
define_pd_global(bool, SuperWordLoopUnrollAnalysis, true);
define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 16);
// GL:
// Detected a problem with unscaled compressed oops and
// narrow_oop_use_complex_address() == false.
Expand Down
Loading

0 comments on commit 3111873

Please sign in to comment.