Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/upstream-amber/master' int…
Browse files Browse the repository at this point in the history
…o matchers-experiment

# Conflicts:
#	src/java.base/share/classes/java/lang/Class.java
  • Loading branch information
biboudis committed Jun 17, 2024
2 parents 61327bf + c4702ca commit 80a3f46
Show file tree
Hide file tree
Showing 607 changed files with 12,672 additions and 9,566 deletions.
2 changes: 1 addition & 1 deletion make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
42 changes: 24 additions & 18 deletions src/hotspot/cpu/aarch64/aarch64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -5628,24 +5628,24 @@ operand cmpOpLtGe()
// used for certain unsigned integral comparisons which can be
// converted to cbxx or tbxx instructions

operand cmpOpUEqNeLtGe()
operand cmpOpUEqNeLeGt()
%{
match(Bool);
op_cost(0);

predicate(n->as_Bool()->_test._test == BoolTest::eq
|| n->as_Bool()->_test._test == BoolTest::ne
|| n->as_Bool()->_test._test == BoolTest::lt
|| n->as_Bool()->_test._test == BoolTest::ge);
predicate(n->as_Bool()->_test._test == BoolTest::eq ||
n->as_Bool()->_test._test == BoolTest::ne ||
n->as_Bool()->_test._test == BoolTest::le ||
n->as_Bool()->_test._test == BoolTest::gt);

format %{ "" %}
interface(COND_INTER) %{
equal(0x0, "eq");
not_equal(0x1, "ne");
less(0xb, "lt");
greater_equal(0xa, "ge");
less_equal(0xd, "le");
greater(0xc, "gt");
less(0x3, "lo");
greater_equal(0x2, "hs");
less_equal(0x9, "ls");
greater(0x8, "hi");
overflow(0x6, "vs");
no_overflow(0x7, "vc");
%}
Expand Down Expand Up @@ -7780,7 +7780,7 @@ instruct membar_acquire() %{
ins_cost(VOLATILE_REF_COST);

format %{ "membar_acquire\n\t"
"dmb ish" %}
"dmb ishld" %}

ins_encode %{
__ block_comment("membar_acquire");
Expand Down Expand Up @@ -7834,11 +7834,13 @@ instruct membar_release() %{
ins_cost(VOLATILE_REF_COST);

format %{ "membar_release\n\t"
"dmb ish" %}
"dmb ishst\n\tdmb ishld" %}

ins_encode %{
__ block_comment("membar_release");
__ membar(Assembler::LoadStore|Assembler::StoreStore);
// These will be merged if AlwaysMergeDMB is enabled.
__ membar(Assembler::StoreStore);
__ membar(Assembler::LoadStore);
%}
ins_pipe(pipe_serial);
%}
Expand Down Expand Up @@ -15685,7 +15687,7 @@ instruct cmpP_narrowOop_imm0_branch(cmpOpEqNe cmp, iRegN oop, immP0 zero, label
ins_pipe(pipe_cmp_branch);
%}

instruct cmpUI_imm0_branch(cmpOpUEqNeLtGe cmp, iRegIorL2I op1, immI0 op2, label labl, rFlagsRegU cr) %{
instruct cmpUI_imm0_branch(cmpOpUEqNeLeGt cmp, iRegIorL2I op1, immI0 op2, label labl) %{
match(If cmp (CmpU op1 op2));
effect(USE labl);

Expand All @@ -15694,15 +15696,17 @@ instruct cmpUI_imm0_branch(cmpOpUEqNeLtGe cmp, iRegIorL2I op1, immI0 op2, label
ins_encode %{
Label* L = $labl$$label;
Assembler::Condition cond = (Assembler::Condition)$cmp$$cmpcode;
if (cond == Assembler::EQ || cond == Assembler::LS)
if (cond == Assembler::EQ || cond == Assembler::LS) {
__ cbzw($op1$$Register, *L);
else
} else {
assert(cond == Assembler::NE || cond == Assembler::HI, "unexpected condition");
__ cbnzw($op1$$Register, *L);
}
%}
ins_pipe(pipe_cmp_branch);
%}

instruct cmpUL_imm0_branch(cmpOpUEqNeLtGe cmp, iRegL op1, immL0 op2, label labl, rFlagsRegU cr) %{
instruct cmpUL_imm0_branch(cmpOpUEqNeLeGt cmp, iRegL op1, immL0 op2, label labl) %{
match(If cmp (CmpUL op1 op2));
effect(USE labl);

Expand All @@ -15711,10 +15715,12 @@ instruct cmpUL_imm0_branch(cmpOpUEqNeLtGe cmp, iRegL op1, immL0 op2, label labl,
ins_encode %{
Label* L = $labl$$label;
Assembler::Condition cond = (Assembler::Condition)$cmp$$cmpcode;
if (cond == Assembler::EQ || cond == Assembler::LS)
if (cond == Assembler::EQ || cond == Assembler::LS) {
__ cbz($op1$$Register, *L);
else
} else {
assert(cond == Assembler::NE || cond == Assembler::HI, "unexpected condition");
__ cbnz($op1$$Register, *L);
}
%}
ins_pipe(pipe_cmp_branch);
%}
Expand Down
Loading

0 comments on commit 80a3f46

Please sign in to comment.