Skip to content

Commit

Permalink
Merge master jdk8u422-b01 into openj9-staging
Browse files Browse the repository at this point in the history
Conflicts:
	common/autoconf/generated-configure.sh
	common/autoconf/toolchain.m4
	jdk/make/gensrc/GensrcSwing.gmk

Signed-off-by: Jason Feng <fengj@ca.ibm.com>
  • Loading branch information
JasonFengJ9 committed Apr 28, 2024
2 parents 140062d + 6897d90 commit 98815bc
Show file tree
Hide file tree
Showing 446 changed files with 3,628 additions and 1,043 deletions.
2 changes: 1 addition & 1 deletion .jcheck/conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
project=jdk8u
jbs=JDK
version=openjdk8u412
version=openjdk8u422

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace
Expand Down
27 changes: 2 additions & 25 deletions common/autoconf/generated-configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -1266,7 +1265,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
Expand Down Expand Up @@ -1519,15 +1517,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;

-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;

-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
Expand Down Expand Up @@ -1665,7 +1654,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
Expand Down Expand Up @@ -1818,7 +1807,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
Expand Down Expand Up @@ -4203,10 +4191,6 @@ fi
# questions.
#

# ===========================================================================
# (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved
# ===========================================================================

########################################################################
# This file is responsible for detecting, verifying and setting up the
# toolchain, i.e. the compiler, linker and related utilities. It will setup
Expand Down Expand Up @@ -4467,7 +4451,7 @@ VS_TOOLSET_SUPPORTED_2022=true
#CUSTOM_AUTOCONF_INCLUDE

# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1712682033
DATE_WHEN_GENERATED=1714325248

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

# Fail-fast: verify we're building on a supported Xcode version
XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
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
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
fi

# Some versions of Xcode command line tools install gcc and g++ as symlinks to
# clang and clang++, which will break the build. So handle that here if we need to.
if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
Expand Down
11 changes: 0 additions & 11 deletions common/autoconf/toolchain.m4
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
# questions.
#

# ===========================================================================
# (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved
# ===========================================================================

########################################################################
# This file is responsible for detecting, verifying and setting up the
# toolchain, i.e. the compiler, linker and related utilities. It will setup
Expand Down Expand Up @@ -291,13 +287,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
AC_MSG_ERROR([The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X])
fi
# Fail-fast: verify we're building on a supported Xcode version
XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
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
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.])
fi
# Some versions of Xcode command line tools install gcc and g++ as symlinks to
# clang and clang++, which will break the build. So handle that here if we need to.
if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
Expand Down
4 changes: 2 additions & 2 deletions common/autoconf/version-numbers
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 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 @@ -26,7 +26,7 @@
JDK_MAJOR_VERSION=1
JDK_MINOR_VERSION=8
JDK_MICRO_VERSION=0
JDK_UPDATE_VERSION=412
JDK_UPDATE_VERSION=422
LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK
PRODUCT_SUFFIX="Runtime Environment"
Expand Down
27 changes: 2 additions & 25 deletions jdk/make/closed/autoconf/generated-configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -1331,7 +1330,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
Expand Down Expand Up @@ -1584,15 +1582,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;

-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;

-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
Expand Down Expand Up @@ -1730,7 +1719,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
Expand Down Expand Up @@ -1883,7 +1872,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
Expand Down Expand Up @@ -4310,10 +4298,6 @@ fi
# questions.
#

# ===========================================================================
# (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved
# ===========================================================================

########################################################################
# This file is responsible for detecting, verifying and setting up the
# toolchain, i.e. the compiler, linker and related utilities. It will setup
Expand Down Expand Up @@ -4641,7 +4625,7 @@ VS_TOOLSET_SUPPORTED_2022=true


# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1712682033
DATE_WHEN_GENERATED=1714325248

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

# Fail-fast: verify we're building on a supported Xcode version
XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
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
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
fi

# Some versions of Xcode command line tools install gcc and g++ as symlinks to
# clang and clang++, which will break the build. So handle that here if we need to.
if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
Expand Down
2 changes: 1 addition & 1 deletion jdk/make/gensrc/GensrcSwing.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) \
$(ECHO) Generating beaninfo
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing
$(JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) \
-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" \
-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" \
-doclet build.tools.swingbeaninfo.GenDocletBeanInfo \
-x $(SWINGBEAN_DEBUG_FLAG) -d $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing \
-t $(DOCLET_DATA_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \
Expand Down
1 change: 1 addition & 0 deletions jdk/make/mapfiles/libmanagement/mapfile-vers
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ SUNWprivate_1.1 {
Java_sun_management_ThreadImpl_getThreadUserCpuTime1;
Java_sun_management_ThreadImpl_getThreadAllocatedMemory0;
Java_sun_management_ThreadImpl_getThreadAllocatedMemory1;
Java_sun_management_ThreadImpl_getTotalThreadAllocatedMemory;
Java_sun_management_ThreadImpl_resetContentionTimes0;
Java_sun_management_ThreadImpl_resetPeakThreadCount0;
Java_sun_management_ThreadImpl_setThreadContentionMonitoringEnabled0;
Expand Down
80 changes: 76 additions & 4 deletions jdk/src/macosx/classes/sun/lwawt/macosx/CTextPipe.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2022, 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 @@ -81,17 +81,89 @@ public void drawString(final SunGraphics2D sg2d, final String s, final double x,
}
}

public void drawGlyphVector(final SunGraphics2D sg2d, final GlyphVector gV, final float x, final float y) {
final Font prevFont = sg2d.getFont();
sg2d.setFont(gV.getFont());
private boolean hasSlotData(GlyphVector gv) {
final int length = gv.getNumGlyphs();
for (int i = 0; i < length; i++) {
if ((gv.getGlyphCode(i) & CompositeGlyphMapper.SLOTMASK) != 0) {
return true;
}
}
return false;
}

private Font getSlotFont(Font font, int slot) {
Font2D f2d = FontUtilities.getFont2D(font);
if (f2d instanceof CFont) {
CompositeFont cf = ((CFont)f2d).getCompositeFont2D();
PhysicalFont pf = cf.getSlotFont(slot);
Font f = new Font(pf.getFontName(null),
font.getStyle(), font.getSize());
return f;
}
return null;
}

private GlyphVector getGlyphVectorWithRange(final Font font, final GlyphVector gV, int start, int count) {
int[] glyphs = new int[count];
for (int i = 0; i < count; i++) {
glyphs[i] = gV.getGlyphCode(start+i) & CompositeGlyphMapper.GLYPHMASK;
}
// Positions should be null to recalculate by native methods,
// if GV was segmented.
StandardGlyphVector sgv = new StandardGlyphVector(font,
gV.getFontRenderContext(),
glyphs,
null, // positions
null, // indices
gV.getLayoutFlags());
return sgv;
}

private int getLengthOfSameSlot(final GlyphVector gV, final int targetSlot, final int start, final int length) {
int count = 1;
for (; start + count < length; count++) {
int slot = (gV.getGlyphCode(start + count) &
CompositeGlyphMapper.SLOTMASK) >> 24;
if (targetSlot != slot) {
break;
}
}
return count;
}

private void drawGlyphVectorImpl(final SunGraphics2D sg2d, final GlyphVector gV, final float x, final float y) {
final long nativeStrikePtr = getNativeStrikePtr(sg2d);
if (OSXSurfaceData.IsSimpleColor(sg2d.paint) && nativeStrikePtr != 0) {
final OSXSurfaceData surfaceData = (OSXSurfaceData)sg2d.getSurfaceData();
surfaceData.drawGlyphs(this, sg2d, nativeStrikePtr, gV, x, y);
} else {
drawGlyphVectorAsShape(sg2d, gV, x, y);
}
}

public void drawGlyphVector(final SunGraphics2D sg2d, final GlyphVector gV, final float x, final float y) {
final Font prevFont = sg2d.getFont();
sg2d.setFont(gV.getFont());

if (hasSlotData(gV)) {
final int length = gV.getNumGlyphs();
float[] positions = gV.getGlyphPositions(0, length, null);
int start = 0;
while (start < length) {
int slot = (gV.getGlyphCode(start) &
CompositeGlyphMapper.SLOTMASK) >> 24;
sg2d.setFont(getSlotFont(gV.getFont(), slot));
int count = getLengthOfSameSlot(gV, slot, start, length);
GlyphVector rangeGV = getGlyphVectorWithRange(sg2d.getFont(),
gV, start, count);
drawGlyphVectorImpl(sg2d, rangeGV,
x + positions[start * 2],
y + positions[start * 2 + 1]);
start += count;
}
} else {
drawGlyphVectorImpl(sg2d, gV, x, y);
}
sg2d.setFont(prevFont);
}

Expand Down
36 changes: 36 additions & 0 deletions jdk/src/share/classes/com/sun/management/ThreadMXBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,42 @@ public interface ThreadMXBean extends java.lang.management.ThreadMXBean {
*/
public long[] getThreadUserTime(long[] ids);

/**
* Returns an approximation of the total amount of memory, in bytes, allocated
* in heap memory by all threads since the Java virtual machine started.
* The returned value is an approximation because some Java virtual machine
* implementations may use object allocation mechanisms that result in a
* delay between the time an object is allocated and the time its size is
* recorded.
*
* @implSpec The default implementation throws {@code UnsupportedOperationException}
* if the Java virtual machine implementation does not support thread
* memory allocation measurement, and otherwise acts as though thread
* memory allocation measurement is disabled.
*
* @return an approximation of the total memory allocated, in bytes, in
* heap memory since the Java virtual machine was started,
* if thread memory allocation measurement is enabled;
* {@code -1} otherwise.
*
* @throws UnsupportedOperationException if the Java virtual
* machine implementation does not support thread memory allocation
* measurement.
*
* @see #isThreadAllocatedMemorySupported
* @see #isThreadAllocatedMemoryEnabled
* @see #setThreadAllocatedMemoryEnabled
*
* @since 8u412
*/
public default long getTotalThreadAllocatedBytes() {
if (!isThreadAllocatedMemorySupported()) {
throw new UnsupportedOperationException(
"Thread allocated memory measurement is not supported.");
}
return -1;
}

/**
* Returns an approximation of the total amount of memory, in bytes,
* allocated in heap memory for the current thread.
Expand Down
10 changes: 10 additions & 0 deletions jdk/src/share/classes/java/net/doc-files/net-properties.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@ <H2>Misc HTTP properties</H2>
If HTTP keepalive is enabled (see above) this value determines the
maximum number of idle connections that will be simultaneously kept
alive, per destination.</P>
<LI><P><B>http.keepAlive.time.server</B> and
<B>http.keepAlive.time.proxy</B> </P>
<P>These properties modify the behavior of the HTTP keepalive cache in the case
where the server (or proxy) has not specified a keepalive time. If the
property is set in this case, then idle connections will be closed after the
specified number of seconds. If the property is set, and the server does
specify a keepalive time in a "Keep-Alive" response header, then the time specified
by the server is used. If the property is not set and also the server
does not specify a keepalive time, then connections are kept alive for an
implementation defined time, assuming {@code http.keepAlive} is {@code true}.</P>
<LI><P><B>http.maxRedirects</B> (default: 20)<BR>
This integer value determines the maximum number, for a given request,
of HTTP redirects that will be automatically followed by the
Expand Down
Loading

0 comments on commit 98815bc

Please sign in to comment.