Skip to content

Commit

Permalink
Merge branch 'master' into jdk-8333446-systemd-slice-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jerboaa committed Jun 20, 2024
2 parents 98d780a + 01ee424 commit 00b528a
Show file tree
Hide file tree
Showing 1,122 changed files with 30,692 additions and 17,436 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
apt-architecture: 'i386'
# Some multilib libraries do not have proper inter-dependencies, so we have to
# install their dependencies manually.
apt-extra-packages: 'libfreetype-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386 libgcc-s1:i386 libstdc++6:i386 libffi-dev:i386'
apt-extra-packages: 'libfreetype-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libffi-dev:i386'
extra-conf-options: '--with-target-bits=32 --enable-fallback-linker --enable-libffi-bundling'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
Expand Down
4 changes: 2 additions & 2 deletions .jcheck/conf
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[general]
project=jdk
jbs=JDK
version=23
version=24

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
warning=issuestitle

[repository]
tags=(?:jdk-(?:[1-9]([0-9]*)(?:\.(?:0|[1-9][0-9]*)){0,4})(?:\+(?:(?:[0-9]+))|(?:-ga)))|(?:jdk[4-9](?:u\d{1,3})?-(?:(?:b\d{2,3})|(?:ga)))|(?:hs\d\d(?:\.\d{1,2})?-b\d\d)
branches=
branches=.*

[census]
version=0
Expand Down
13 changes: 11 additions & 2 deletions make/GenerateLinkOptData.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,23 @@ ifeq ($(EXTERNAL_BUILDJDK), true)
INTERIM_IMAGE_DIR := $(BUILD_JDK)
endif

# These are needed for deterministic classlist:
# - The classlist can be influenced by locale. Always set it to en/US.
# - Run with -Xint, as the compiler can speculatively resolve constant pool entries.
# - ForkJoinPool parallelism can cause constant pool resolution to be non-deterministic.
CLASSLIST_FILE_VM_OPTS = \
-Duser.language=en -Duser.country=US \
-Xint \
-Djava.util.concurrent.ForkJoinPool.common.parallelism=0

# Save the stderr output of the command and print it along with stdout in case
# something goes wrong.
$(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST_JAR)
$(call MakeDir, $(LINK_OPT_DIR))
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $@))
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:[email protected] \
-Duser.language=en -Duser.country=US \
$(CLASSLIST_FILE_VM_OPTS) \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.HelloClasslist $(LOG_DEBUG)
$(GREP) -v HelloClasslist [email protected] > [email protected]
Expand All @@ -79,7 +88,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:[email protected] \
-XX:[email protected] -XX:[email protected] \
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
-Duser.language=en -Duser.country=US \
$(CLASSLIST_FILE_VM_OPTS) \
--module-path $(SUPPORT_OUTPUTDIR)/classlist.jar \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.HelloClasslist \
Expand Down
4 changes: 2 additions & 2 deletions make/autoconf/lib-tests.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 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 @@ -28,7 +28,7 @@
################################################################################

# Minimum supported versions
JTREG_MINIMUM_VERSION=7.3.1
JTREG_MINIMUM_VERSION=7.4
GTEST_MINIMUM_VERSION=1.14.0

###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion make/conf/github-actions.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Versions and download locations for dependencies used by GitHub Actions (GHA)

GTEST_VERSION=1.14.0
JTREG_VERSION=7.3.1+1
JTREG_VERSION=7.4+1

LINUX_X64_BOOT_JDK_EXT=tar.gz
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk22/830ec9fcccef480bb3e73fb7ecafe059/36/GPL/openjdk-22_linux-x64_bin.tar.gz
Expand Down
6 changes: 3 additions & 3 deletions make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1184,9 +1184,9 @@ var getJibProfilesDependencies = function (input, common) {
jtreg: {
server: "jpg",
product: "jtreg",
version: "7.3.1",
version: "7.4",
build_number: "1",
file: "bundles/jtreg-7.3.1+1.zip",
file: "bundles/jtreg-7.4+1.zip",
environment_name: "JT_HOME",
environment_path: input.get("jtreg", "home_path") + "/bin",
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
Expand All @@ -1200,7 +1200,7 @@ var getJibProfilesDependencies = function (input, common) {

jcov: {
organization: common.organization,
revision: "3.0-16-jdk-asm+1.0",
revision: "3.0-17-jdk-asm+1.0",
ext: "zip",
environment_name: "JCOV_HOME",
},
Expand Down
10 changes: 5 additions & 5 deletions make/conf/version-numbers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
# Default version, product, and vendor information to use,
# unless overridden by configure

DEFAULT_VERSION_FEATURE=23
DEFAULT_VERSION_FEATURE=24
DEFAULT_VERSION_INTERIM=0
DEFAULT_VERSION_UPDATE=0
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_EXTRA1=0
DEFAULT_VERSION_EXTRA2=0
DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2024-09-17
DEFAULT_VERSION_CLASSFILE_MAJOR=67 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_DATE=2025-03-18
DEFAULT_VERSION_CLASSFILE_MAJOR=68 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_VERSION_DOCS_API_SINCE=11
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="22 23"
DEFAULT_JDK_SOURCE_TARGET_VERSION=23
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="22 23 24"
DEFAULT_JDK_SOURCE_TARGET_VERSION=24
DEFAULT_PROMOTED_VERSION_PRE=ea
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,10 @@ public void createSymbols(String ctDescriptionFileExtra, String ctDescriptionFil
"Ljdk/internal/javac/PreviewFeature;";
private static final String PREVIEW_FEATURE_ANNOTATION_INTERNAL =
"Ljdk/internal/PreviewFeature+Annotation;";
private static final String RESTRICTED_ANNOTATION =
"Ljdk/internal/javac/Restricted;";
private static final String RESTRICTED_ANNOTATION_INTERNAL =
"Ljdk/internal/javac/Restricted+Annotation;";
private static final String VALUE_BASED_ANNOTATION =
"Ljdk/internal/ValueBased;";
private static final String VALUE_BASED_ANNOTATION_INTERNAL =
Expand All @@ -349,7 +353,8 @@ public void createSymbols(String ctDescriptionFileExtra, String ctDescriptionFil
"Lsun/Proprietary+Annotation;",
PREVIEW_FEATURE_ANNOTATION_OLD,
PREVIEW_FEATURE_ANNOTATION_NEW,
VALUE_BASED_ANNOTATION));
VALUE_BASED_ANNOTATION,
RESTRICTED_ANNOTATION));

private void stripNonExistentAnnotations(LoadDescriptions data) {
Set<String> allClasses = data.classes.name2Class.keySet();
Expand Down Expand Up @@ -1247,6 +1252,12 @@ private Annotation createAnnotation(List<CPInfo> constantPool, AnnotationDescrip
annotationType = VALUE_BASED_ANNOTATION_INTERNAL;
}

if (RESTRICTED_ANNOTATION.equals(annotationType)) {
//the non-public Restricted annotation will not be available in ct.sym,
//replace with purely synthetic javac-internal annotation:
annotationType = RESTRICTED_ANNOTATION_INTERNAL;
}

return new Annotation(null,
addString(constantPool, annotationType),
createElementPairs(constantPool, values));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public enum SimpleType implements MessageType {
TOKEN("token", "TokenKind", "com.sun.tools.javac.parser.Tokens"),
TREE_TAG("tree tag", "Tag", "com.sun.tools.javac.tree.JCTree"),
TYPE("type", "Type", "com.sun.tools.javac.code"),
ANNOTATED_TYPE("annotated-type", "AnnotatedType", "com.sun.tools.javac.util.JCDiagnostic"),
URL("url", "URL", "java.net"),
SET("set", "Set", "java.util"),
LIST("list", "List", "java.util"),
Expand Down
1 change: 1 addition & 0 deletions make/modules/java.desktop/lib/ClientLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ endif
ifeq ($(USE_EXTERNAL_HARFBUZZ), true)
LIBFONTMANAGER_EXTRA_SRC =
LIBFONTMANAGER_LIBS += $(HARFBUZZ_LIBS)
LIBFONTMANAGER_CFLAGS += $(HARFBUZZ_CFLAGS)
else
LIBFONTMANAGER_EXTRA_SRC = libharfbuzz

Expand Down
2 changes: 1 addition & 1 deletion make/modules/jdk.jpackage/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ DISABLED_WARNINGS_java += dangling-doc-comments

COPY += .gif .png .txt .spec .script .prerm .preinst \
.postrm .postinst .list .sh .desktop .copyright .control .plist .template \
.icns .scpt .wxs .wxl .wxi .ico .bmp .tiff .service
.icns .scpt .wxs .wxl .wxi .ico .bmp .tiff .service .xsl

CLEAN += .properties
133 changes: 74 additions & 59 deletions make/scripts/update_copyright_year.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash -f

#
# Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2010, 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 All @@ -27,8 +27,10 @@
# (Originally from xdono, Thanks!)

#------------------------------------------------------------
copyright="Copyright (c)"
copyright="Copyright"
copyright_symbol="(c)"
company="Oracle"
year=`date +%Y`
#------------------------------------------------------------

awk="awk"
Expand All @@ -49,66 +51,75 @@ rm -f -r ${tmp}
mkdir -p ${tmp}
total=0

# Default or supplied company name
if [ "$3" != "" ] ; then
company="$3"
fi

# This year or supplied year
if [ "$2" != "" ] ; then
year="$2"
else
year=`date +%Y`
fi

# VCS select
vcs="$1"
usage="Usage: `basename "$0"` [-c company] [-y year] [-h|f]"
Help()
{
# Display Help
echo "Updates the Copyright year range in Git sources."
echo
echo "By default, the tool limits the processed changesets "
echo "to those in the current branch and the current year."
echo
echo "Note, cancelling the script will skip cleanup in /tmp."
echo
echo $usage
echo "options:"
echo "-c Specifies the company. Set to Oracle by default."
echo "-y Specifies the copyright year. Set to current year by default."
echo "-f Updates the copyright for all change sets in a given year,"
echo " as specified by -y."
echo "-h Print this help."
echo
}

if [ -z "$vcs" ] ; then
git_found=false
hg_found=false
full_year=false

[ -d "${this_script_dir}/../../.git" ] && git_found=true
[ -d "${this_script_dir}/../../.hg" ] && hg_found=true
# Process options
while getopts "c:fhy:" option; do
case $option in
c) # supplied company year
company=${OPTARG}
;;
f) # update all change sets in a full year
full_year=true
;;
h) # display help
Help
exit 0
;;
y) # supplied company year
year=${OPTARG}
;;
\?) # illegal option
echo "$usage"
exit 1
;;
esac
done

if [ "$git_found" == "true" ] && [ "$hg_found" == "false" ] ; then
vcs="git"
elif [ "$hg_found" == "true" ] && [ "$git_found" == "false" ] ; then
vcs="hg"
# VCS check
git_found=false
[ -d "${this_script_dir}/../../.git" ] && git_found=true
if [ "$git_found" != "true" ]; then
echo "Error: Please execute script from within make/scripts."
exit 1
else
echo "Using Git version control system"
vcs_status=(git ls-files -m)
if [ "$full_year" = "true" ]; then
vcs_list_changesets=(git log --no-merges --since="${year}-01-01T00:00:00Z" --until="${year}-12-31T23:59:59Z" --pretty=tformat:"%H")
else
echo "Error: could not auto-detect version control system"
vcs=""
vcs_list_changesets=(git log --no-merges 'master..HEAD' --since="${year}-01-01T00:00:00Z" --until="${year}-12-31T23:59:59Z" --pretty=tformat:"%H")
fi
vcs_changeset_message=(git log -1 --pretty=tformat:"%B") # followed by ${changeset}
vcs_changeset_files=(git diff-tree --no-commit-id --name-only -r) # followed by ${changeset}
fi

case "$vcs" in
"git")
echo "Using Git version control system"
vcs_status=(git ls-files -m)
vcs_list_changesets=(git log --no-merges --since="${year}-01-01T00:00:00Z" --until="${year}-12-31T23:59:59Z" --pretty=tformat:"%H")
vcs_changeset_message=(git log -1 --pretty=tformat:"%B") # followed by ${changeset}
vcs_changeset_files=(git diff-tree --no-commit-id --name-only -r) # followed by ${changeset}
;;

"hg")
echo "Using Mercurial version control system"
vcs_status=(hg status)
vcs_list_changesets=(hg log --no-merges -v -d "${year}-01-01 to ${year}-12-31" --template '{node}\n')
vcs_changeset_message=(hg log -l1 --template '{desc}\n' --rev) # followed by ${changeset}
vcs_changeset_files=(hg log -l1 -v --template '{files}\n' --rev) # followed by ${changeset}
;;

*)
echo "Usage: `basename "$0"` <git|hg> [year [company]]"
exit 1
;;
esac

# Return true if it makes sense to edit this file
saneFileToCheck()
{
if [ "$1" != "" -a -f $1 ] ; then
isText=`file "$1" | egrep -i '(text|source)' | cat`
isText=`file "$1" | grep -i -E '(text|source)' | cat`
hasCopyright=`grep 'Copyright' "$1" | cat`
lastLineCount=`tail -1 "$1" | wc -l`
if [ "${isText}" != "" \
Expand All @@ -131,9 +142,13 @@ updateFile() # file
rm -f $1.OLD
mv $1 $1.OLD
cat $1.OLD | \
sed -e "s@\(${copyright} [12][0-9][0-9][0-9],\) [12][0-9][0-9][0-9], ${company}@\1 ${year}, ${company}@" | \
sed -e "s@\(${copyright} [12][0-9][0-9][0-9],\) ${company}@\1 ${year}, ${company}@" | \
sed -e "s@${copyright} ${year}, ${year}, ${company}@${copyright} ${year}, ${company}@" \
sed -e "s@\(${copyright} \(${copyright_symbol} \)\{0,1\}[12][0-9][0-9][0-9],\) [12][0-9][0-9][0-9], ${company}@\1 ${year}, ${company}@" | \
sed -e "s@\(${copyright} \(${copyright_symbol} \)\{0,1\}[12][0-9][0-9][0-9],\) [12][0-9][0-9][0-9] ${company}@\1 ${year} ${company}@" | \
sed -e "s@\(${copyright} \(${copyright_symbol} \)\{0,1\}[12][0-9][0-9][0-9],\) ${company}@\1 ${year}, ${company}@" | \
sed -e "s@\(${copyright} \(${copyright_symbol} \)\{0,1\}[12][0-9][0-9][0-9],\) ${company}@\1, ${year}, ${company}@" | \
sed -e "s@\(${copyright} \(${copyright_symbol} \)\{0,1\}[12][0-9][0-9][0-9]\) ${company}@\1, ${year} ${company}@" | \
sed -e "s@${copyright} ${year}, ${year}, ${company}@${copyright} ${year}, ${company}@" | \
sed -e "s@${copyright} ${copyright_symbol} ${year}, ${year}, ${company}@${copyright} ${copyright_symbol} ${year}, ${company}@" \
> $1
if ! diff -b -w $1.OLD $1 > /dev/null ; then \
changed="true"
Expand Down Expand Up @@ -205,19 +220,19 @@ if [ -s ${all_changesets} ] ; then
"${vcs_changeset_message[@]}" "${changeset}" > ${desc}
printf "%d: %s\n%s\n" ${index} "${changeset}" "`cat ${desc}|head -1`"
if [ "${year}" = "2010" ] ; then
if cat ${desc} | fgrep -i "Added tag" > /dev/null ; then
if cat ${desc} | grep -i -F "Added tag" > /dev/null ; then
printf " EXCLUDED tag changeset.\n"
elif cat ${desc} | fgrep -i rebrand > /dev/null ; then
elif cat ${desc} | grep -i -F rebrand > /dev/null ; then
printf " EXCLUDED rebrand changeset.\n"
elif cat ${desc} | fgrep -i copyright > /dev/null ; then
elif cat ${desc} | grep -i -F copyright > /dev/null ; then
printf " EXCLUDED copyright changeset.\n"
else
updateChangesetFiles ${changeset}
fi
else
if cat ${desc} | fgrep -i "Added tag" > /dev/null ; then
if cat ${desc} | grep -i -F "Added tag" > /dev/null ; then
printf " EXCLUDED tag changeset.\n"
elif cat ${desc} | fgrep -i "copyright year" > /dev/null ; then
elif cat ${desc} | grep -i -F "copyright year" > /dev/null ; then
printf " EXCLUDED copyright year changeset.\n"
else
updateChangesetFiles ${changeset}
Expand Down
4 changes: 2 additions & 2 deletions make/src/classes/build/tools/jfr/GenerateJfrFiles.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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 @@ -663,7 +663,7 @@ private static void printJfrEventControlHpp(Metadata metadata, File outputFile)
out.write("");
out.write("union JfrNativeSettings {");
out.write(" // Array version.");
out.write(" jfrNativeEventSetting bits[NUMBER_OF_EVENTS];");
out.write(" jfrNativeEventSetting bits[NUMBER_OF_EVENTS + NUMBER_OF_RESERVED_EVENTS];");
out.write(" // Then, to make it easy to debug,");
out.write(" // add named struct members also.");
out.write(" struct {");
Expand Down
Loading

0 comments on commit 00b528a

Please sign in to comment.