Skip to content

Commit 98815bc

Browse files
committed
Merge master jdk8u422-b01 into openj9-staging
Conflicts: common/autoconf/generated-configure.sh common/autoconf/toolchain.m4 jdk/make/gensrc/GensrcSwing.gmk Signed-off-by: Jason Feng <[email protected]>
2 parents 140062d + 6897d90 commit 98815bc

File tree

446 files changed

+3628
-1043
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

446 files changed

+3628
-1043
lines changed

.jcheck/conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[general]
22
project=jdk8u
33
jbs=JDK
4-
version=openjdk8u412
4+
version=openjdk8u422
55

66
[checks]
77
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace

common/autoconf/generated-configure.sh

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,6 @@ infodir
10181018
docdir
10191019
oldincludedir
10201020
includedir
1021-
runstatedir
10221021
localstatedir
10231022
sharedstatedir
10241023
sysconfdir
@@ -1266,7 +1265,6 @@ datadir='${datarootdir}'
12661265
sysconfdir='${prefix}/etc'
12671266
sharedstatedir='${prefix}/com'
12681267
localstatedir='${prefix}/var'
1269-
runstatedir='${localstatedir}/run'
12701268
includedir='${prefix}/include'
12711269
oldincludedir='/usr/include'
12721270
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1519,15 +1517,6 @@ do
15191517
| -silent | --silent | --silen | --sile | --sil)
15201518
silent=yes ;;
15211519

1522-
-runstatedir | --runstatedir | --runstatedi | --runstated \
1523-
| --runstate | --runstat | --runsta | --runst | --runs \
1524-
| --run | --ru | --r)
1525-
ac_prev=runstatedir ;;
1526-
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1527-
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1528-
| --run=* | --ru=* | --r=*)
1529-
runstatedir=$ac_optarg ;;
1530-
15311520
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
15321521
ac_prev=sbindir ;;
15331522
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1665,7 +1654,7 @@ fi
16651654
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
16661655
datadir sysconfdir sharedstatedir localstatedir includedir \
16671656
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1668-
libdir localedir mandir runstatedir
1657+
libdir localedir mandir
16691658
do
16701659
eval ac_val=\$$ac_var
16711660
# Remove trailing slashes.
@@ -1818,7 +1807,6 @@ Fine tuning of the installation directories:
18181807
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
18191808
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
18201809
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
1821-
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
18221810
--libdir=DIR object code libraries [EPREFIX/lib]
18231811
--includedir=DIR C header files [PREFIX/include]
18241812
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -4203,10 +4191,6 @@ fi
42034191
# questions.
42044192
#
42054193

4206-
# ===========================================================================
4207-
# (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved
4208-
# ===========================================================================
4209-
42104194
########################################################################
42114195
# This file is responsible for detecting, verifying and setting up the
42124196
# toolchain, i.e. the compiler, linker and related utilities. It will setup
@@ -4467,7 +4451,7 @@ VS_TOOLSET_SUPPORTED_2022=true
44674451
#CUSTOM_AUTOCONF_INCLUDE
44684452

44694453
# Do not change or remove the following line, it is needed for consistency checks:
4470-
DATE_WHEN_GENERATED=1712682033
4454+
DATE_WHEN_GENERATED=1714325248
44714455

44724456
###############################################################################
44734457
#
@@ -27618,13 +27602,6 @@ fi
2761827602
as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
2761927603
fi
2762027604

27621-
# Fail-fast: verify we're building on a supported Xcode version
27622-
XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
27623-
XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
27624-
if test "${XC_VERSION_PARTS[0]}" != "6" -a "${XC_VERSION_PARTS[0]}" != "9" -a "${XC_VERSION_PARTS[0]}" != "10" -a "${XC_VERSION_PARTS[0]}" != "11" -a "${XC_VERSION_PARTS[0]}" != "12" -a "${XC_VERSION_PARTS[0]}" != "13" -a "${XC_VERSION_PARTS[0]}" != "14" ; then
27625-
as_fn_error $? "Xcode 6, 9-14 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode or make Xcode active by using xcode-select." "$LINENO" 5
27626-
fi
27627-
2762827605
# Some versions of Xcode command line tools install gcc and g++ as symlinks to
2762927606
# clang and clang++, which will break the build. So handle that here if we need to.
2763027607
if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then

common/autoconf/toolchain.m4

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
# questions.
2424
#
2525

26-
# ===========================================================================
27-
# (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved
28-
# ===========================================================================
29-
3026
########################################################################
3127
# This file is responsible for detecting, verifying and setting up the
3228
# toolchain, i.e. the compiler, linker and related utilities. It will setup
@@ -291,13 +287,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
291287
AC_MSG_ERROR([The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X])
292288
fi
293289
294-
# Fail-fast: verify we're building on a supported Xcode version
295-
XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
296-
XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
297-
if test "${XC_VERSION_PARTS[[0]]}" != "6" -a "${XC_VERSION_PARTS[[0]]}" != "9" -a "${XC_VERSION_PARTS[[0]]}" != "10" -a "${XC_VERSION_PARTS[[0]]}" != "11" -a "${XC_VERSION_PARTS[[0]]}" != "12" -a "${XC_VERSION_PARTS[[0]]}" != "13" -a "${XC_VERSION_PARTS[[0]]}" != "14" ; then
298-
AC_MSG_ERROR([Xcode 6, 9-14 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode or make Xcode active by using xcode-select.])
299-
fi
300-
301290
# Some versions of Xcode command line tools install gcc and g++ as symlinks to
302291
# clang and clang++, which will break the build. So handle that here if we need to.
303292
if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then

common/autoconf/version-numbers

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
2626
JDK_MAJOR_VERSION=1
2727
JDK_MINOR_VERSION=8
2828
JDK_MICRO_VERSION=0
29-
JDK_UPDATE_VERSION=412
29+
JDK_UPDATE_VERSION=422
3030
LAUNCHER_NAME=openjdk
3131
PRODUCT_NAME=OpenJDK
3232
PRODUCT_SUFFIX="Runtime Environment"

jdk/make/closed/autoconf/generated-configure.sh

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,6 @@ infodir
10571057
docdir
10581058
oldincludedir
10591059
includedir
1060-
runstatedir
10611060
localstatedir
10621061
sharedstatedir
10631062
sysconfdir
@@ -1331,7 +1330,6 @@ datadir='${datarootdir}'
13311330
sysconfdir='${prefix}/etc'
13321331
sharedstatedir='${prefix}/com'
13331332
localstatedir='${prefix}/var'
1334-
runstatedir='${localstatedir}/run'
13351333
includedir='${prefix}/include'
13361334
oldincludedir='/usr/include'
13371335
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1584,15 +1582,6 @@ do
15841582
| -silent | --silent | --silen | --sile | --sil)
15851583
silent=yes ;;
15861584

1587-
-runstatedir | --runstatedir | --runstatedi | --runstated \
1588-
| --runstate | --runstat | --runsta | --runst | --runs \
1589-
| --run | --ru | --r)
1590-
ac_prev=runstatedir ;;
1591-
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1592-
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1593-
| --run=* | --ru=* | --r=*)
1594-
runstatedir=$ac_optarg ;;
1595-
15961585
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
15971586
ac_prev=sbindir ;;
15981587
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1730,7 +1719,7 @@ fi
17301719
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
17311720
datadir sysconfdir sharedstatedir localstatedir includedir \
17321721
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1733-
libdir localedir mandir runstatedir
1722+
libdir localedir mandir
17341723
do
17351724
eval ac_val=\$$ac_var
17361725
# Remove trailing slashes.
@@ -1883,7 +1872,6 @@ Fine tuning of the installation directories:
18831872
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
18841873
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
18851874
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
1886-
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
18871875
--libdir=DIR object code libraries [EPREFIX/lib]
18881876
--includedir=DIR C header files [PREFIX/include]
18891877
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -4310,10 +4298,6 @@ fi
43104298
# questions.
43114299
#
43124300

4313-
# ===========================================================================
4314-
# (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved
4315-
# ===========================================================================
4316-
43174301
########################################################################
43184302
# This file is responsible for detecting, verifying and setting up the
43194303
# toolchain, i.e. the compiler, linker and related utilities. It will setup
@@ -4641,7 +4625,7 @@ VS_TOOLSET_SUPPORTED_2022=true
46414625

46424626

46434627
# Do not change or remove the following line, it is needed for consistency checks:
4644-
DATE_WHEN_GENERATED=1712682033
4628+
DATE_WHEN_GENERATED=1714325248
46454629

46464630
###############################################################################
46474631
#
@@ -30629,13 +30613,6 @@ fi
3062930613
as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
3063030614
fi
3063130615

30632-
# Fail-fast: verify we're building on a supported Xcode version
30633-
XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
30634-
XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
30635-
if test "${XC_VERSION_PARTS[0]}" != "6" -a "${XC_VERSION_PARTS[0]}" != "9" -a "${XC_VERSION_PARTS[0]}" != "10" -a "${XC_VERSION_PARTS[0]}" != "11" -a "${XC_VERSION_PARTS[0]}" != "12" -a "${XC_VERSION_PARTS[0]}" != "13" -a "${XC_VERSION_PARTS[0]}" != "14" ; then
30636-
as_fn_error $? "Xcode 6, 9-14 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode or make Xcode active by using xcode-select." "$LINENO" 5
30637-
fi
30638-
3063930616
# Some versions of Xcode command line tools install gcc and g++ as symlinks to
3064030617
# clang and clang++, which will break the build. So handle that here if we need to.
3064130618
if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then

jdk/make/gensrc/GensrcSwing.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) \
8080
$(ECHO) Generating beaninfo
8181
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing
8282
$(JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) \
83-
-sourcepath "$(JDK_TOPDIR)/src/share/classes$(PATH_SEP)$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes$(PATH_SEP)$(JDK_OUTPUTDIR)/gensrc$(PATH_SEP)$(J9JCL_SOURCES_DIR)/jdk/src/share/classes" \
83+
-sourcepath "$(JDK_TOPDIR)/src/share/classes$(PATH_SEP)$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes$(PATH_SEP)$(J9JCL_SOURCES_DIR)/jdk/src/share/classes" \
8484
-doclet build.tools.swingbeaninfo.GenDocletBeanInfo \
8585
-x $(SWINGBEAN_DEBUG_FLAG) -d $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing \
8686
-t $(DOCLET_DATA_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \

jdk/make/mapfiles/libmanagement/mapfile-vers

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ SUNWprivate_1.1 {
8989
Java_sun_management_ThreadImpl_getThreadUserCpuTime1;
9090
Java_sun_management_ThreadImpl_getThreadAllocatedMemory0;
9191
Java_sun_management_ThreadImpl_getThreadAllocatedMemory1;
92+
Java_sun_management_ThreadImpl_getTotalThreadAllocatedMemory;
9293
Java_sun_management_ThreadImpl_resetContentionTimes0;
9394
Java_sun_management_ThreadImpl_resetPeakThreadCount0;
9495
Java_sun_management_ThreadImpl_setThreadContentionMonitoringEnabled0;

jdk/src/macosx/classes/sun/lwawt/macosx/CTextPipe.java

Lines changed: 76 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -81,17 +81,89 @@ public void drawString(final SunGraphics2D sg2d, final String s, final double x,
8181
}
8282
}
8383

84-
public void drawGlyphVector(final SunGraphics2D sg2d, final GlyphVector gV, final float x, final float y) {
85-
final Font prevFont = sg2d.getFont();
86-
sg2d.setFont(gV.getFont());
84+
private boolean hasSlotData(GlyphVector gv) {
85+
final int length = gv.getNumGlyphs();
86+
for (int i = 0; i < length; i++) {
87+
if ((gv.getGlyphCode(i) & CompositeGlyphMapper.SLOTMASK) != 0) {
88+
return true;
89+
}
90+
}
91+
return false;
92+
}
93+
94+
private Font getSlotFont(Font font, int slot) {
95+
Font2D f2d = FontUtilities.getFont2D(font);
96+
if (f2d instanceof CFont) {
97+
CompositeFont cf = ((CFont)f2d).getCompositeFont2D();
98+
PhysicalFont pf = cf.getSlotFont(slot);
99+
Font f = new Font(pf.getFontName(null),
100+
font.getStyle(), font.getSize());
101+
return f;
102+
}
103+
return null;
104+
}
105+
106+
private GlyphVector getGlyphVectorWithRange(final Font font, final GlyphVector gV, int start, int count) {
107+
int[] glyphs = new int[count];
108+
for (int i = 0; i < count; i++) {
109+
glyphs[i] = gV.getGlyphCode(start+i) & CompositeGlyphMapper.GLYPHMASK;
110+
}
111+
// Positions should be null to recalculate by native methods,
112+
// if GV was segmented.
113+
StandardGlyphVector sgv = new StandardGlyphVector(font,
114+
gV.getFontRenderContext(),
115+
glyphs,
116+
null, // positions
117+
null, // indices
118+
gV.getLayoutFlags());
119+
return sgv;
120+
}
121+
122+
private int getLengthOfSameSlot(final GlyphVector gV, final int targetSlot, final int start, final int length) {
123+
int count = 1;
124+
for (; start + count < length; count++) {
125+
int slot = (gV.getGlyphCode(start + count) &
126+
CompositeGlyphMapper.SLOTMASK) >> 24;
127+
if (targetSlot != slot) {
128+
break;
129+
}
130+
}
131+
return count;
132+
}
87133

134+
private void drawGlyphVectorImpl(final SunGraphics2D sg2d, final GlyphVector gV, final float x, final float y) {
88135
final long nativeStrikePtr = getNativeStrikePtr(sg2d);
89136
if (OSXSurfaceData.IsSimpleColor(sg2d.paint) && nativeStrikePtr != 0) {
90137
final OSXSurfaceData surfaceData = (OSXSurfaceData)sg2d.getSurfaceData();
91138
surfaceData.drawGlyphs(this, sg2d, nativeStrikePtr, gV, x, y);
92139
} else {
93140
drawGlyphVectorAsShape(sg2d, gV, x, y);
94141
}
142+
}
143+
144+
public void drawGlyphVector(final SunGraphics2D sg2d, final GlyphVector gV, final float x, final float y) {
145+
final Font prevFont = sg2d.getFont();
146+
sg2d.setFont(gV.getFont());
147+
148+
if (hasSlotData(gV)) {
149+
final int length = gV.getNumGlyphs();
150+
float[] positions = gV.getGlyphPositions(0, length, null);
151+
int start = 0;
152+
while (start < length) {
153+
int slot = (gV.getGlyphCode(start) &
154+
CompositeGlyphMapper.SLOTMASK) >> 24;
155+
sg2d.setFont(getSlotFont(gV.getFont(), slot));
156+
int count = getLengthOfSameSlot(gV, slot, start, length);
157+
GlyphVector rangeGV = getGlyphVectorWithRange(sg2d.getFont(),
158+
gV, start, count);
159+
drawGlyphVectorImpl(sg2d, rangeGV,
160+
x + positions[start * 2],
161+
y + positions[start * 2 + 1]);
162+
start += count;
163+
}
164+
} else {
165+
drawGlyphVectorImpl(sg2d, gV, x, y);
166+
}
95167
sg2d.setFont(prevFont);
96168
}
97169

jdk/src/share/classes/com/sun/management/ThreadMXBean.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,42 @@ public interface ThreadMXBean extends java.lang.management.ThreadMXBean {
109109
*/
110110
public long[] getThreadUserTime(long[] ids);
111111

112+
/**
113+
* Returns an approximation of the total amount of memory, in bytes, allocated
114+
* in heap memory by all threads since the Java virtual machine started.
115+
* The returned value is an approximation because some Java virtual machine
116+
* implementations may use object allocation mechanisms that result in a
117+
* delay between the time an object is allocated and the time its size is
118+
* recorded.
119+
*
120+
* @implSpec The default implementation throws {@code UnsupportedOperationException}
121+
* if the Java virtual machine implementation does not support thread
122+
* memory allocation measurement, and otherwise acts as though thread
123+
* memory allocation measurement is disabled.
124+
*
125+
* @return an approximation of the total memory allocated, in bytes, in
126+
* heap memory since the Java virtual machine was started,
127+
* if thread memory allocation measurement is enabled;
128+
* {@code -1} otherwise.
129+
*
130+
* @throws UnsupportedOperationException if the Java virtual
131+
* machine implementation does not support thread memory allocation
132+
* measurement.
133+
*
134+
* @see #isThreadAllocatedMemorySupported
135+
* @see #isThreadAllocatedMemoryEnabled
136+
* @see #setThreadAllocatedMemoryEnabled
137+
*
138+
* @since 8u412
139+
*/
140+
public default long getTotalThreadAllocatedBytes() {
141+
if (!isThreadAllocatedMemorySupported()) {
142+
throw new UnsupportedOperationException(
143+
"Thread allocated memory measurement is not supported.");
144+
}
145+
return -1;
146+
}
147+
112148
/**
113149
* Returns an approximation of the total amount of memory, in bytes,
114150
* allocated in heap memory for the current thread.

jdk/src/share/classes/java/net/doc-files/net-properties.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,16 @@ <H2>Misc HTTP properties</H2>
172172
If HTTP keepalive is enabled (see above) this value determines the
173173
maximum number of idle connections that will be simultaneously kept
174174
alive, per destination.</P>
175+
<LI><P><B>http.keepAlive.time.server</B> and
176+
<B>http.keepAlive.time.proxy</B> </P>
177+
<P>These properties modify the behavior of the HTTP keepalive cache in the case
178+
where the server (or proxy) has not specified a keepalive time. If the
179+
property is set in this case, then idle connections will be closed after the
180+
specified number of seconds. If the property is set, and the server does
181+
specify a keepalive time in a "Keep-Alive" response header, then the time specified
182+
by the server is used. If the property is not set and also the server
183+
does not specify a keepalive time, then connections are kept alive for an
184+
implementation defined time, assuming {@code http.keepAlive} is {@code true}.</P>
175185
<LI><P><B>http.maxRedirects</B> (default: 20)<BR>
176186
This integer value determines the maximum number, for a given request,
177187
of HTTP redirects that will be automatically followed by the

0 commit comments

Comments
 (0)