Skip to content

Commit

Permalink
Merge master HEAD into openj9-staging
Browse files Browse the repository at this point in the history
Signed-off-by: J9 Build <[email protected]>
  • Loading branch information
j9build committed Jan 24, 2025
2 parents 53833ff + 6455bd6 commit 83e4d85
Show file tree
Hide file tree
Showing 49 changed files with 777 additions and 718 deletions.
14 changes: 8 additions & 6 deletions make/InitSupport.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2025, 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 @@ -215,13 +215,15 @@ ifeq ($(HAS_SPEC), )
$$(if $$(findstring $$(CONF), $$(var)), $$(var))))
endif
ifneq ($$(filter $$(CONF), $$(matching_confs)), )
ifneq ($$(word 2, $$(matching_confs)), )
# Don't repeat this output on make restarts caused by including
# generated files.
ifeq ($$(MAKE_RESTARTS), )
$$(info Using exact match for CONF=$$(CONF) (other matches are possible))
endif
endif
# If we found an exact match, use that
matching_confs := $$(CONF)
# Don't repeat this output on make restarts caused by including
# generated files.
ifeq ($$(MAKE_RESTARTS), )
$$(info Using exact match for CONF=$$(CONF) (other matches are possible))
endif
endif
endif
ifeq ($$(matching_confs), )
Expand Down
6 changes: 6 additions & 0 deletions make/autoconf/basic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,15 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
# We get the top-level directory from the supporting wrappers.
BASIC_WINDOWS_VERIFY_DIR($TOPDIR, source)
orig_topdir="$TOPDIR"
UTIL_FIXUP_PATH(TOPDIR)
AC_MSG_CHECKING([for top-level directory])
AC_MSG_RESULT([$TOPDIR])
if test "x$TOPDIR" != "x$orig_topdir"; then
AC_MSG_WARN([Your top dir was originally represented as $orig_topdir,])
AC_MSG_WARN([but after rewriting it became $TOPDIR.])
AC_MSG_WARN([This typically means you have characters like space in the path, which can cause all kind of trouble.])
fi
AC_SUBST(TOPDIR)
if test "x$CUSTOM_ROOT" != x; then
Expand Down
7 changes: 6 additions & 1 deletion make/autoconf/util_paths.m4
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ AC_DEFUN([UTIL_FIXUP_PATH],
imported_path=""
fi
fi
if test "x$imported_path" != "x$path"; then
[ imported_path_lower=`$ECHO $imported_path | $TR '[:upper:]' '[:lower:]'` ]
[ orig_path_lower=`$ECHO $path | $TR '[:upper:]' '[:lower:]'` ]
# If only case differs, keep original path
if test "x$imported_path_lower" != "x$orig_path_lower"; then
$1="$imported_path"
fi
else
Expand Down Expand Up @@ -357,6 +360,8 @@ AC_DEFUN([UTIL_SETUP_TOOL],
fi
$1="$tool_command"
fi
# Make sure we add fixpath if needed
UTIL_FIXUP_EXECUTABLE($1)
if test "x$tool_args" != x; then
# If we got arguments, re-append them to the command after the fixup.
$1="[$]$1 $tool_args"
Expand Down
4 changes: 2 additions & 2 deletions make/modules/jdk.incubator.vector/Lib.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2021, 2025, 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 @@ -64,7 +64,7 @@ ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, aarch64)+$(INCLUDE_COMPILER2
EXTRA_SRC := libsleef/generated, \
DISABLED_WARNINGS_gcc := unused-function sign-compare tautological-compare ignored-qualifiers, \
DISABLED_WARNINGS_clang := unused-function sign-compare tautological-compare ignored-qualifiers, \
CFLAGS := $(SVE_CFLAGS), \
vector_math_sve.c_CFLAGS := $(SVE_CFLAGS), \
))

TARGETS += $(BUILD_LIBSLEEF)
Expand Down
114 changes: 113 additions & 1 deletion src/java.base/share/classes/jdk/internal/misc/CDS.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2025, 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 @@ -31,6 +31,10 @@
import java.io.InputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.net.URL;
import java.net.URLClassLoader;
import java.nio.file.InvalidPathException;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -337,4 +341,112 @@ private static String dumpSharedArchive(boolean isStatic, String fileName) throw
System.out.println("The process was attached by jcmd and dumped a " + (isStatic ? "static" : "dynamic") + " archive " + archiveFilePath);
return archiveFilePath;
}

/**
* This class is used only by native JVM code at CDS dump time for loading
* "unregistered classes", which are archived classes that are intended to
* be loaded by custom class loaders during runtime.
* See src/hotspot/share/cds/unregisteredClasses.cpp.
*/
private static class UnregisteredClassLoader extends URLClassLoader {
private String currentClassName;
private Class<?> currentSuperClass;
private Class<?>[] currentInterfaces;

/**
* Used only by native code. Construct an UnregisteredClassLoader for loading
* unregistered classes from the specified file. If the file doesn't exist,
* the exception will be caughted by native code which will print a warning message and continue.
*
* @param fileName path of the the JAR file to load unregistered classes from.
*/
private UnregisteredClassLoader(String fileName) throws InvalidPathException, IOException {
super(toURLArray(fileName), /*parent*/null);
currentClassName = null;
currentSuperClass = null;
currentInterfaces = null;
}

private static URL[] toURLArray(String fileName) throws InvalidPathException, IOException {
if (!((new File(fileName)).exists())) {
throw new IOException("No such file: " + fileName);
}
return new URL[] {
// Use an intermediate File object to construct a URI/URL without
// authority component as URLClassPath can't handle URLs with a UNC
// server name in the authority component.
Path.of(fileName).toRealPath().toFile().toURI().toURL()
};
}


/**
* Load the class of the given <code>/name<code> from the JAR file that was given to
* the constructor of the current UnregisteredClassLoader instance. This class must be
* a direct subclass of <code>superClass</code>. This class must be declared to implement
* the specified <code>interfaces</code>.
* <p>
* This method must be called in a single threaded context. It will never be recursed (thus
* the asserts)
*
* @param name the name of the class to be loaded.
* @param superClass must not be null. The named class must have a super class.
* @param interfaces could be null if the named class does not implement any interfaces.
*/
private Class<?> load(String name, Class<?> superClass, Class<?>[] interfaces)
throws ClassNotFoundException
{
assert currentClassName == null;
assert currentSuperClass == null;
assert currentInterfaces == null;

try {
currentClassName = name;
currentSuperClass = superClass;
currentInterfaces = interfaces;

return findClass(name);
} finally {
currentClassName = null;
currentSuperClass = null;
currentInterfaces = null;
}
}

/**
* This method must be called from inside the <code>load()</code> method. The <code>/name<code>
* can be only:
* <ul>
* <li> the <code>name</code> parameter for <code>load()</code>
* <li> the name of the <code>superClass</code> parameter for <code>load()</code>
* <li> the name of one of the interfaces in <code>interfaces</code> parameter for <code>load()</code>
* <ul>
*
* For all other cases, a <code>ClassNotFoundException</code> will be thrown.
*/
protected Class<?> findClass(final String name)
throws ClassNotFoundException
{
Objects.requireNonNull(currentClassName);
Objects.requireNonNull(currentSuperClass);

if (name.equals(currentClassName)) {
// Note: the following call will call back to <code>this.findClass(name)</code> to
// resolve the super types of the named class.
return super.findClass(name);
}
if (name.equals(currentSuperClass.getName())) {
return currentSuperClass;
}
if (currentInterfaces != null) {
for (Class<?> c : currentInterfaces) {
if (name.equals(c.getName())) {
return c;
}
}
}

throw new ClassNotFoundException(name);
}
}
}
2 changes: 1 addition & 1 deletion src/java.base/share/data/tzdata/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
tzdata2024b
tzdata2025a
2 changes: 2 additions & 0 deletions src/java.base/share/data/tzdata/antarctica
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ Zone Antarctica/Mawson 0 - -00 1954 Feb 13

# France & Italy - year-round base
# Concordia, -750600+1232000, since 2005
# https://en.wikipedia.org/wiki/Concordia_Station
# Can use Asia/Singapore, which it has agreed with since inception.

# Germany - year-round base
# Neumayer III, -704080-0081602, since 2009
Expand Down
113 changes: 82 additions & 31 deletions src/java.base/share/data/tzdata/asia
Original file line number Diff line number Diff line change
Expand Up @@ -3688,21 +3688,70 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct
# be immediately followed by 1845-01-01; see R.H. van Gent's
# History of the International Date Line
# https://webspace.science.uu.nl/~gent0113/idl/idl_philippines.htm
# The rest of the data entries are from Shanks & Pottenger.

# From Jesper Nørgaard Welen (2006-04-26):
# ... claims that Philippines had DST last time in 1990:
# http://story.philippinetimes.com/p.x/ct/9/id/145be20cc6b121c0/cid/3e5bbccc730d258c/
# [a story dated 2006-04-25 by Cris Larano of Dow Jones Newswires,
# but no details]

# From Paul Eggert (2014-08-14):
# The following source says DST may be instituted November-January and again
# March-June, but this is not definite. It also says DST was last proclaimed
# during the Ramos administration (1992-1998); but again, no details.
# Carcamo D. PNoy urged to declare use of daylight saving time.
# Philippine Star 2014-08-05
# http://www.philstar.com/headlines/2014/08/05/1354152/pnoy-urged-declare-use-daylight-saving-time

# From P Chan (2021-05-10):
# Here's a fairly comprehensive article in Japanese:
# https://wiki.suikawiki.org/n/Philippine%20Time
# (2021-05-16):
# According to the references listed in the article,
# the periods that the Philippines (Manila) observed DST or used +9 are:
#
# 1936-10-31 24:00 to 1937-01-15 24:00
# (Proclamation No. 104, Proclamation No. 126)
# 1941-12-15 24:00 to 1945-11-30 24:00
# (Proclamation No. 789, Proclamation No. 20)
# 1954-04-11 24:00 to 1954-06-04 24:00
# (Proclamation No. 13, Proclamation No. 33)
# 1977-03-27 24:00 to 1977-09-21 24:00
# (Proclamation No. 1629, Proclamation No. 1641)
# 1990-05-21 00:00 to 1990-07-28 24:00
# (National Emergency Memorandum Order No. 17, Executive Order No. 415)
#
# Proclamation No. 104 ... October 30, 1936
# https://www.officialgazette.gov.ph/1936/10/30/proclamation-no-104-s-1936/
# Proclamation No. 126 ... January 15, 1937
# https://www.officialgazette.gov.ph/1937/01/15/proclamation-no-126-s-1937/
# Proclamation No. 789 ... December 13, 1941
# https://www.officialgazette.gov.ph/1941/12/13/proclamation-no-789-s-1941/
# Proclamation No. 20 ... November 11, 1945
# https://www.officialgazette.gov.ph/1945/11/11/proclamation-no-20-s-1945/
# Proclamation No. 13 ... April 6, 1954
# https://www.officialgazette.gov.ph/1954/04/06/proclamation-no-13-s-1954/
# Proclamation No. 33 ... June 3, 1954
# https://www.officialgazette.gov.ph/1954/06/03/proclamation-no-33-s-1954/
# Proclamation No. 1629 ... March 25, 1977
# https://www.officialgazette.gov.ph/1977/03/25/proclamation-no-1629-s-1977/
# Proclamation No. 1641 ...May 26, 1977
# https://www.officialgazette.gov.ph/1977/05/26/proclamation-no-1641-s-1977/
# National Emergency Memorandum Order No. 17 ... May 2, 1990
# https://www.officialgazette.gov.ph/1990/05/02/national-emergency-memorandum-order-no-17-s-1990/
# Executive Order No. 415 ... July 20, 1990
# https://www.officialgazette.gov.ph/1990/07/20/executive-order-no-415-s-1990/
#
# During WWII, Proclamation No. 789 fixed two periods of DST. The first period
# was set to continue only until January 31, 1942. But Manila was occupied by
# the Japanese earlier in the month....
#
# For the date of the adoption of standard time, Shank[s] gives 1899-05-11.
# The article is not able to state the basis of that. I guess it was based on
# a US War Department Circular issued on that date.
# https://books.google.com/books?id=JZ1PAAAAYAAJ&pg=RA3-PA8
#
# However, according to other sources, standard time was adopted on
# 1899-09-06. Also, the LMT was GMT+8:03:52
# https://books.google.com/books?id=MOYIAQAAIAAJ&pg=PA521
# https://books.google.com/books?id=lSnqqatpYikC&pg=PA21
#
# From Paul Eggert (2024-09-05):
# The penultimate URL in P Chan's email refers to page 521 of
# Selga M, The Time Service in the Philippines.
# Proc Pan-Pacific Science Congress. Vol. 1 (1923), 519-532.
# It says, "The change from the meridian 120° 58' 04" to the 120th implied a
# change of 3 min. 52s.26 in time; consequently on 6th September, 1899,
# Manila Observatory gave the noon signal 3 min. 52s.26 later than before".
#
# Wikipedia says the US declared Manila liberated on March 4, 1945;
# this doesn't affect clocks, just our time zone abbreviation and DST flag.

# From Paul Goyette (2018-06-15) with URLs updated by Guy Harris (2024-02-15):
# In the Philippines, there is a national law, Republic Act No. 10535
Expand All @@ -3720,24 +3769,26 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct
# influence of the sources. There is no current abbreviation for DST,
# so use "PDT", the usual American style.

# From P Chan (2021-05-10):
# Here's a fairly comprehensive article in Japanese:
# https://wiki.suikawiki.org/n/Philippine%20Time
# From Paul Eggert (2021-05-10):
# The info in the Japanese table has not been absorbed (yet) below.

# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Phil 1936 only - Nov 1 0:00 1:00 D
Rule Phil 1937 only - Feb 1 0:00 0 S
Rule Phil 1954 only - Apr 12 0:00 1:00 D
Rule Phil 1954 only - Jul 1 0:00 0 S
Rule Phil 1978 only - Mar 22 0:00 1:00 D
Rule Phil 1978 only - Sep 21 0:00 0 S
Rule Phil 1936 only - Oct 31 24:00 1:00 D
Rule Phil 1937 only - Jan 15 24:00 0 S
Rule Phil 1941 only - Dec 15 24:00 1:00 D
# The following three rules were canceled by Japan:
#Rule Phil 1942 only - Jan 31 24:00 0 S
#Rule Phil 1942 only - Mar 1 0:00 1:00 D
#Rule Phil 1942 only - Jun 30 24:00 0 S
Rule Phil 1945 only - Nov 30 24:00 0 S
Rule Phil 1954 only - Apr 11 24:00 1:00 D
Rule Phil 1954 only - Jun 4 24:00 0 S
Rule Phil 1977 only - Mar 27 24:00 1:00 D
Rule Phil 1977 only - Sep 21 24:00 0 S
Rule Phil 1990 only - May 21 0:00 1:00 D
Rule Phil 1990 only - Jul 28 24:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31
8:04:00 - LMT 1899 May 11
8:00 Phil P%sT 1942 May
9:00 - JST 1944 Nov
Zone Asia/Manila -15:56:08 - LMT 1844 Dec 31
8:03:52 - LMT 1899 Sep 6 4:00u
8:00 Phil P%sT 1942 Feb 11 24:00
9:00 - JST 1945 Mar 4
8:00 Phil P%sT

# Bahrain
Expand Down
Loading

0 comments on commit 83e4d85

Please sign in to comment.