Skip to content

Commit

Permalink
Merge branch 'master' into 8314491-jexec-resolve-symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
vpa1977 committed Aug 30, 2023
2 parents 5354ceb + 3eac890 commit be995fc
Show file tree
Hide file tree
Showing 244 changed files with 9,251 additions and 3,927 deletions.
6 changes: 3 additions & 3 deletions .github/actions/get-bootjdk/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2023, 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 @@ -104,6 +104,6 @@ runs:
- name: 'Export path to where BootJDK is installed'
id: path-name
run: |
# Export the path
echo 'path=bootjdk/jdk' >> $GITHUB_OUTPUT
# Export the absolute path
echo "path=`pwd`/bootjdk/jdk" >> $GITHUB_OUTPUT
shell: bash
24 changes: 23 additions & 1 deletion make/Bundles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,27 @@ endif

################################################################################

ifneq ($(filter static-libs-graal-bundles, $(MAKECMDGOALS)), )
STATIC_LIBS_GRAAL_BUNDLE_FILES := $(call FindFiles, $(STATIC_LIBS_GRAAL_IMAGE_DIR))

ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
STATIC_LIBS_GRAAL_BUNDLE_SUBDIR := $(JDK_MACOSX_CONTENTS_SUBDIR)/Home
else
STATIC_LIBS_GRAAL_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)
endif

$(eval $(call SetupBundleFile, BUILD_STATIC_LIBS_GRAAL_BUNDLE, \
BUNDLE_NAME := $(STATIC_LIBS_GRAAL_BUNDLE_NAME), \
FILES := $(STATIC_LIBS_GRAAL_BUNDLE_FILES), \
BASE_DIRS := $(STATIC_LIBS_GRAAL_IMAGE_DIR), \
SUBDIR := $(STATIC_LIBS_GRAAL_BUNDLE_SUBDIR), \
))

STATIC_LIBS_GRAAL_TARGETS += $(BUILD_STATIC_LIBS_GRAAL_BUNDLE)
endif

################################################################################

# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, Bundles.gmk))

Expand All @@ -490,8 +511,9 @@ docs-jdk-bundles: $(DOCS_JDK_TARGETS)
docs-javase-bundles: $(DOCS_JAVASE_TARGETS)
docs-reference-bundles: $(DOCS_REFERENCE_TARGETS)
static-libs-bundles: $(STATIC_LIBS_TARGETS)
static-libs-graal-bundles: $(STATIC_LIBS_GRAAL_TARGETS)
jcov-bundles: $(JCOV_TARGETS)

.PHONY: all default product-bundles test-bundles \
docs-jdk-bundles docs-javase-bundles docs-reference-bundles \
static-libs-bundles jcov-bundles
static-libs-bundles static-libs-graal-bundles jcov-bundles
4 changes: 0 additions & 4 deletions make/Docs.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) )
# In order to get a specific ordering it's necessary to specify the total
# ordering of tags as the tags are otherwise ordered in order of definition.
JAVADOC_TAGS := \
-tag beaninfo:X \
-tag since.unbundled:X \
-tag Note:X \
-tag ToDo:X \
-tag 'apiNote:a:API Note:' \
-tag 'implSpec:a:Implementation Requirements:' \
-tag 'implNote:a:Implementation Note:' \
Expand Down
6 changes: 6 additions & 0 deletions make/Main.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,12 @@ $(eval $(call SetupTarget, static-libs-bundles, \
DEPS := static-libs-image, \
))

$(eval $(call SetupTarget, static-libs-graal-bundles, \
MAKEFILE := Bundles, \
TARGET := static-libs-graal-bundles, \
DEPS := static-libs-graal-image, \
))

ifeq ($(JCOV_ENABLED), true)
$(eval $(call SetupTarget, jcov-bundles, \
MAKEFILE := Bundles, \
Expand Down
3 changes: 3 additions & 0 deletions make/ToolsJdk.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,7 @@ PANDOC_HTML_MANPAGE_FILTER := $(BUILDTOOLS_OUTPUTDIR)/manpages/pandoc-html-manpa

##########################################################################################

# Hook to include the corresponding custom post file, if present.
$(eval $(call IncludeCustomExtension, ToolsJdk-post.gmk))

endif # _TOOLS_GMK
5 changes: 4 additions & 1 deletion make/autoconf/build-performance.m4
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,11 @@ AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
fi
fi
# The CCACHE_BASEDIR needs to end with '/' as ccache will otherwise think
# directories next to it, that have the base dir name as a prefix, are sub
# directories of CCACHE_BASEDIR.
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$WORKSPACE_ROOT/ $CCACHE"
if test "x$SET_CCACHE_DIR" != x; then
mkdir -p $CCACHE_DIR > /dev/null 2>&1
Expand Down
6 changes: 4 additions & 2 deletions make/autoconf/platform.m4
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,6 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
HOTSPOT_$1_CPU_DEFINE=PPC64
elif test "x$OPENJDK_$1_CPU" = xppc64le; then
HOTSPOT_$1_CPU_DEFINE=PPC64
elif test "x$OPENJDK_$1_CPU" = xriscv32; then
HOTSPOT_$1_CPU_DEFINE=RISCV32
elif test "x$OPENJDK_$1_CPU" = xriscv64; then
HOTSPOT_$1_CPU_DEFINE=RISCV64
Expand All @@ -577,10 +575,14 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
HOTSPOT_$1_CPU_DEFINE=SPARC
elif test "x$OPENJDK_$1_CPU" = xppc; then
HOTSPOT_$1_CPU_DEFINE=PPC32
elif test "x$OPENJDK_$1_CPU" = xriscv32; then
HOTSPOT_$1_CPU_DEFINE=RISCV32
elif test "x$OPENJDK_$1_CPU" = xs390; then
HOTSPOT_$1_CPU_DEFINE=S390
elif test "x$OPENJDK_$1_CPU" = xs390x; then
HOTSPOT_$1_CPU_DEFINE=S390
elif test "x$OPENJDK_$1_CPU" = xloongarch64; then
HOTSPOT_$1_CPU_DEFINE=LOONGARCH64
elif test "x$OPENJDK_$1_CPU" != x; then
HOTSPOT_$1_CPU_DEFINE=$(echo $OPENJDK_$1_CPU | tr a-z A-Z)
fi
Expand Down
1 change: 1 addition & 0 deletions make/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ DOCS_JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_JAVASE_BUNDLE_NAME := javase-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_REFERENCE_BUNDLE_NAME := jdk-reference-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
STATIC_LIBS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs$(DEBUG_PART).tar.gz
STATIC_LIBS_GRAAL_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs-graal$(DEBUG_PART).tar.gz
JCOV_BUNDLE_NAME := jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)

JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
Expand Down
7 changes: 5 additions & 2 deletions make/common/NativeCompilation.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,12 @@ endif
# object files while CCACHE_BASEDIR will make ccache relativize all paths for
# its compiler. The compiler then produces relative dependency files.
# make does not know a relative and absolute filename is the same so it will
# ignore such dependencies.
# ignore such dependencies. This only applies when the OUTPUTDIR is inside
# the WORKSPACE_ROOT.
ifneq ($(CCACHE), )
REWRITE_PATHS_RELATIVE = true
ifneq ($(filter $(WORKSPACE_ROOT)/%, $(OUTPUTDIR)), )
REWRITE_PATHS_RELATIVE = true
endif
endif

ifeq ($(REWRITE_PATHS_RELATIVE), true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public class CLDRConverter {

private static Set<String> AVAILABLE_TZIDS;
static int copyrightYear;
static String jdkHeaderTemplate;
private static String zoneNameTempFile;
private static String tzDataDir;
private static final Map<String, String> canonicalTZMap = new HashMap<>();
Expand Down Expand Up @@ -229,6 +230,10 @@ public static void main(String[] args) throws Exception {
tzDataDir = args[++i];
break;

case "-jdk-header-template":
jdkHeaderTemplate = Files.readString(Paths.get(args[++i]));
break;

case "-help":
usage();
System.exit(0);
Expand Down Expand Up @@ -304,7 +309,9 @@ private static void usage() {
+ "\t-year year copyright year in output%n"
+ "\t-zntempfile template file for java.time.format.ZoneName.java%n"
+ "\t-tzdatadir tzdata directory for java.time.format.ZoneName.java%n"
+ "\t-utf8 use UTF-8 rather than \\uxxxx (for debug)%n");
+ "\t-utf8 use UTF-8 rather than \\uxxxx (for debug)%n"
+ "\t-jdk-header-template <file>%n"
+ "\t\t override default GPL header with contents of file%n");
}

static void info(String fmt, Object... args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public void generateBundle(String packageName, String baseName, String localeID,

try (PrintWriter out = new PrintWriter(file, encoding)) {
// Output copyright headers
out.println(CopyrightHeaders.getOpenJDKCopyright(CLDRConverter.copyrightYear));
out.println(getOpenJDKCopyright());
out.println(CopyrightHeaders.getUnicodeCopyright());

if (useJava) {
Expand Down Expand Up @@ -294,7 +294,7 @@ public void generateMetaInfo(Map<String, SortedSet<String>> metaInfo) throws IOE
CLDRConverter.info("Generating file " + file);

try (PrintWriter out = new PrintWriter(file, "us-ascii")) {
out.printf(CopyrightHeaders.getOpenJDKCopyright(CLDRConverter.copyrightYear));
out.printf(getOpenJDKCopyright());

out.printf("""
package sun.util.%s;
Expand Down Expand Up @@ -448,4 +448,12 @@ private static SortedSet<String> applyLanguageAliases(SortedSet<String> tags) {
});
return tags;
}

private static String getOpenJDKCopyright() {
if (CLDRConverter.jdkHeaderTemplate != null) {
return String.format(CLDRConverter.jdkHeaderTemplate, CLDRConverter.copyrightYear);
} else {
return CopyrightHeaders.getOpenJDKCopyright(CLDRConverter.copyrightYear);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,38 @@
public class EquivMapsGenerator {

public static void main(String[] args) throws Exception {
if (args.length != 3) {
int i = 0;
boolean valid = true;
if (args.length != 5 && args.length !=3) {
valid = false;
} else if (args.length == 5) {
if ("-jdk-header-template".equals(args[i])) {
jdkHeaderTemplate = Files.readString(Paths.get(args[++i]));
i++;
} else {
valid = false;
}
}
if (!valid) {
System.err.println("Usage: java EquivMapsGenerator"
+ " [-jdk-header-template <file>]"
+ " language-subtag-registry.txt LocaleEquivalentMaps.java copyrightYear");
System.exit(1);
}
copyrightYear = Integer.parseInt(args[2]);
readLSRfile(args[0]);
String lsrFile = args[i++];
String outputFile = args[i++];
copyrightYear = Integer.parseInt(args[i++]);

readLSRfile(lsrFile);
// Builds the maps from the IANA data
generateEquivalentMap();
// Writes the maps out to LocaleEquivalentMaps.java
generateSourceCode(args[1]);
generateSourceCode(outputFile);
}

private static String LSRrevisionDate;
private static int copyrightYear;
private static String jdkHeaderTemplate;
private static Map<String, StringBuilder> initialLanguageMap =
new TreeMap<>();
private static Map<String, StringBuilder> initialRegionVariantMap =
Expand Down Expand Up @@ -225,6 +242,7 @@ private static void generateSourceCode(String fileName) {
try (BufferedWriter writer = Files.newBufferedWriter(
Paths.get(fileName))) {
writer.write(getOpenJDKCopyright());
writer.write("\n");
writer.write(HEADER_TEXT);
writer.write(getMapsText());
writer.write(getLSRText());
Expand All @@ -241,7 +259,8 @@ private static void generateSourceCode(String fileName) {
}

private static String getOpenJDKCopyright() {
return String.format(Locale.US, COPYRIGHT, copyrightYear);
return String.format(Locale.US,
(jdkHeaderTemplate != null ? jdkHeaderTemplate : COPYRIGHT), copyrightYear);
}

private static final String COPYRIGHT =
Expand Down Expand Up @@ -270,7 +289,6 @@ private static String getOpenJDKCopyright() {
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
""";

private static final String HEADER_TEXT =
Expand Down
4 changes: 2 additions & 2 deletions make/jdk/src/classes/build/tools/taglet/Incubating.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2023, 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 @@ -52,7 +52,7 @@ public boolean isInlineTag() {

@Override
public String getName() {
return "Incubating";
return "incubating";
}

private static final String MESSAGE =
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ void InterpreterMacroAssembler::remove_activation(
// Check that all monitors are unlocked
{
Label loop, exception, entry, restart;
const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
const int entry_size = frame::interpreter_frame_monitor_size_in_bytes();
const Address monitor_block_top(
rfp, frame::interpreter_frame_monitor_block_top_offset * wordSize);
const Address monitor_block_bot(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ void TemplateInterpreterGenerator::generate_stack_overflow_check(void) {

// monitor entry size: see picture of stack set
// (generate_method_entry) and frame_amd64.hpp
const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
const int entry_size = frame::interpreter_frame_monitor_size_in_bytes();

// total overhead size: entry_size + (saved rbp through expr stack
// bottom). be sure to change this if you add/subtract anything
Expand Down Expand Up @@ -773,7 +773,7 @@ void TemplateInterpreterGenerator::lock_method() {
const Address monitor_block_top(
rfp,
frame::interpreter_frame_monitor_block_top_offset * wordSize);
const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
const int entry_size = frame::interpreter_frame_monitor_size_in_bytes();

#ifdef ASSERT
{
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3864,7 +3864,7 @@ void TemplateTable::monitorenter()
rfp, frame::interpreter_frame_monitor_block_top_offset * wordSize);
const Address monitor_block_bot(
rfp, frame::interpreter_frame_initial_sp_offset * wordSize);
const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
const int entry_size = frame::interpreter_frame_monitor_size_in_bytes();

Label allocated;

Expand Down Expand Up @@ -3967,7 +3967,7 @@ void TemplateTable::monitorexit()
rfp, frame::interpreter_frame_monitor_block_top_offset * wordSize);
const Address monitor_block_bot(
rfp, frame::interpreter_frame_initial_sp_offset * wordSize);
const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
const int entry_size = frame::interpreter_frame_monitor_size_in_bytes();

Label found;

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/arm/interp_masm_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ void InterpreterMacroAssembler::remove_activation(TosState state, Register ret_a
{
Label loop;

const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
const int entry_size = frame::interpreter_frame_monitor_size_in_bytes();
const Register Rbottom = R3;
const Register Rcur_obj = Rtemp;

Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ void TemplateInterpreterGenerator::generate_stack_overflow_check(void) {
const Register RmaxStack = R2;

// monitor entry size
const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
const int entry_size = frame::interpreter_frame_monitor_size_in_bytes();

// total overhead size: entry_size + (saved registers, thru expr stack bottom).
// be sure to change this if you add/subtract anything to/from the overhead area
Expand Down Expand Up @@ -570,7 +570,7 @@ void TemplateInterpreterGenerator::generate_stack_overflow_check(void) {
void TemplateInterpreterGenerator::lock_method() {
// synchronize method

const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
const int entry_size = frame::interpreter_frame_monitor_size_in_bytes();
assert ((entry_size % StackAlignmentInBytes) == 0, "should keep stack alignment");

#ifdef ASSERT
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/arm/templateTable_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4281,7 +4281,7 @@ void TemplateTable::monitorenter() {
// check for null object
__ null_check(Robj, Rtemp);

const int entry_size = (frame::interpreter_frame_monitor_size() * wordSize);
const int entry_size = (frame::interpreter_frame_monitor_size_in_bytes());
assert (entry_size % StackAlignmentInBytes == 0, "keep stack alignment");
Label allocate_monitor, allocated;

Expand Down Expand Up @@ -4392,7 +4392,7 @@ void TemplateTable::monitorexit() {
// check for null object
__ null_check(Robj, Rtemp);

const int entry_size = (frame::interpreter_frame_monitor_size() * wordSize);
const int entry_size = (frame::interpreter_frame_monitor_size_in_bytes());
Label found, throw_exception;

// find matching slot
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/cpu/ppc/frame_ppc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,6 @@
template <typename RegisterMapT>
static void update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr);

// Size of a monitor in bytes.
static int interpreter_frame_monitor_size_in_bytes();

// The size of a cInterpreter object.
static inline int interpreter_frame_cinterpreterstate_size_in_bytes();

Expand Down

0 comments on commit be995fc

Please sign in to comment.