Skip to content

Commit e1991f5

Browse files
authored
Merge pull request #2217 from SAP/pr-jdk-27+17
Merge to tag jdk-27+17
2 parents b0b9dcf + dc81630 commit e1991f5

297 files changed

Lines changed: 12760 additions & 3244 deletions

File tree

Some content is hidden

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

doc/testing.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,10 @@ <h3 id="jtreg">JTReg</h3>
284284
<h3 id="gtest">Gtest</h3>
285285
<p><strong>Note:</strong> To be able to run the Gtest suite, you need to
286286
configure your build to be able to find a proper version of the gtest
287-
source. For details, see the section <a
288-
href="building.html#running-tests">"Running Tests" in the build
289-
documentation</a>.</p>
287+
source. For details, see the section <strong>"Running Tests" in the
288+
build documentation</strong> (<a
289+
href="building.html#running-tests">html</a>, <a
290+
href="building.md#running-tests">markdown</a>).</p>
290291
<p>Since the Hotspot Gtest suite is so quick, the default is to run all
291292
tests. This is specified by just <code>gtest</code>, or as a fully
292293
qualified test descriptor <code>gtest:all</code>.</p>

doc/testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ use a fully qualified test descriptor, add `jtreg:`, e.g.
198198

199199
**Note:** To be able to run the Gtest suite, you need to configure your build
200200
to be able to find a proper version of the gtest source. For details, see the
201-
section ["Running Tests" in the build
202-
documentation](building.html#running-tests).
201+
section **"Running Tests" in the build
202+
documentation** ([html](building.html#running-tests), [markdown](building.md#running-tests)).
203203

204204
Since the Hotspot Gtest suite is so quick, the default is to run all tests.
205205
This is specified by just `gtest`, or as a fully qualified test descriptor

make/autoconf/toolchain_microsoft.m4

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,12 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
217217
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
218218
[$PROGRAMFILES_X86/$VS_INSTALL_DIR], [well-known name])
219219
fi
220+
# Derive system drive root from CMD (which is at <drive>/windows/system32/cmd.exe)
221+
WINSYSDRIVE_ROOT="$(dirname "$(dirname "$(dirname "$CMD")")")"
220222
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
221-
[c:/program files/$VS_INSTALL_DIR], [well-known name])
223+
[$WINSYSDRIVE_ROOT/program files/$VS_INSTALL_DIR], [well-known name])
222224
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
223-
[c:/program files (x86)/$VS_INSTALL_DIR], [well-known name])
225+
[$WINSYSDRIVE_ROOT/program files (x86)/$VS_INSTALL_DIR], [well-known name])
224226
if test "x$SDK_INSTALL_DIR" != x; then
225227
if test "x$ProgramW6432" != x; then
226228
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
@@ -235,9 +237,9 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
235237
[$PROGRAMFILES/$SDK_INSTALL_DIR], [well-known name])
236238
fi
237239
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
238-
[c:/program files/$SDK_INSTALL_DIR], [well-known name])
240+
[$WINSYSDRIVE_ROOT/program files/$SDK_INSTALL_DIR], [well-known name])
239241
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
240-
[c:/program files (x86)/$SDK_INSTALL_DIR], [well-known name])
242+
[$WINSYSDRIVE_ROOT/program files (x86)/$SDK_INSTALL_DIR], [well-known name])
241243
fi
242244
243245
VCVARS_VER=auto
@@ -338,7 +340,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_VISUAL_STUDIO_ENV],
338340
OLDPATH="$PATH"
339341
# Make sure we only capture additions to PATH needed by VS.
340342
# Clear out path, but need system dir present for vsvars cmd file to be able to run
341-
export PATH=$WINENV_PREFIX/c/windows/system32
343+
export PATH="$(dirname "$CMD")"
342344
# The "| cat" is to stop SetEnv.Cmd to mess with system colors on some systems
343345
# We can't pass -vcvars_ver=$VCVARS_VER here because cmd.exe eats all '='
344346
# in bat file arguments. :-(

make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public class CLDRConverter {
8787
static final String EXEMPLAR_CITY_PREFIX = "timezone.excity.";
8888
static final String ZONE_NAME_PREFIX = "timezone.displayname.";
8989
static final String METAZONE_ID_PREFIX = "metazone.id.";
90+
static final String METAZONE_DSTOFFSET_PREFIX = "metazone.dstoffset.";
9091
static final String PARENT_LOCALE_PREFIX = "parentLocale.";
9192
static final String LIKELY_SCRIPT_PREFIX = "likelyScript.";
9293
static final String META_EMPTY_ZONE_NAME = "EMPTY_ZONE";
@@ -139,6 +140,11 @@ public class CLDRConverter {
139140
private static final Map<String, String> tzdbSubstLetters = HashMap.newHashMap(512);
140141
private static final Map<String, String> tzdbLinks = HashMap.newHashMap(512);
141142

143+
// Map of explicit dst offsets for metazones
144+
// key: time zone ID
145+
// value: explicit dstOffset for the corresponding metazone name
146+
static final Map<String, String> explicitDstOffsets = HashMap.newHashMap(32);
147+
142148
static enum DraftType {
143149
UNCONFIRMED,
144150
PROVISIONAL,
@@ -867,6 +873,12 @@ private static Map<String, Object> extractZoneNames(Map<String, Object> map, Str
867873
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
868874
names.putAll(exCities);
869875

876+
// Explicit metazone offsets
877+
if (id.equals("root")) {
878+
explicitDstOffsets.forEach((k, v) ->
879+
names.put(METAZONE_DSTOFFSET_PREFIX + k, v));
880+
}
881+
870882
// If there's no UTC entry at this point, add an empty one
871883
if (!names.isEmpty() && !names.containsKey("UTC")) {
872884
names.putIfAbsent(METAZONE_ID_PREFIX + META_EMPTY_ZONE_NAME, EMPTY_ZONE);

make/jdk/src/classes/build/tools/cldrconverter/MetaZonesParseHandler.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2026, 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
@@ -84,7 +84,15 @@ public void startElement(String uri, String localName, String qName, Attributes
8484

8585
if (fromLDT.isBefore(now) && toLDT.isAfter(now)) {
8686
metazone = attributes.getValue("mzone");
87+
88+
// Explicit metazone DST offsets. Only the "dst" offset is needed,
89+
// as "std" is used by default when it doesn't match.
90+
String dstOffset = attributes.getValue("dstOffset");
91+
if (dstOffset != null) {
92+
CLDRConverter.explicitDstOffsets.put(tzid, dstOffset);
93+
}
8794
}
95+
8896
pushIgnoredContainer(qName);
8997
break;
9098

make/jdk/src/classes/build/tools/cldrconverter/ResourceBundleGenerator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2026, 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
@@ -198,7 +198,8 @@ public void generateBundle(String packageName, String baseName, String localeID,
198198
} else if (value instanceof String) {
199199
String valStr = (String)value;
200200
if (type == BundleType.TIMEZONE &&
201-
!key.startsWith(CLDRConverter.EXEMPLAR_CITY_PREFIX) ||
201+
!(key.startsWith(CLDRConverter.EXEMPLAR_CITY_PREFIX) ||
202+
key.startsWith(CLDRConverter.METAZONE_DSTOFFSET_PREFIX)) ||
202203
valStr.startsWith(META_VALUE_PREFIX)) {
203204
out.printf(" { \"%s\", %s },\n", key, CLDRConverter.saveConvert(valStr, useJava));
204205
} else {

make/langtools/tools/previewfeature/SetupPreviewFeature.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.lang.reflect.Field;
3131
import java.nio.file.Files;
3232
import java.nio.file.Path;
33+
import java.nio.file.StandardCopyOption;
3334
import java.util.HashSet;
3435
import java.util.Set;
3536
import java.util.stream.Collectors;
@@ -76,7 +77,7 @@ public static void main(String... args) throws Exception {
7677
var target = Path.of(args[1]);
7778
Files.createDirectories(target.getParent());
7879
if (constantsToAdd.isEmpty()) {
79-
Files.copy(source, target);
80+
Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING);
8081
} else {
8182
String sourceCode = Files.readString(source);
8283
try (var out = Files.newBufferedWriter(target)) {

make/scripts/fixpath.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ function setup() {
8888
fi
8989

9090
if [[ -z ${CMD+x} ]]; then
91-
CMD="$DRIVEPREFIX/c/windows/system32/cmd.exe"
91+
CMD="$(type -p cmd.exe 2>/dev/null)"
92+
if [[ -z "$CMD" ]]; then
93+
CMD="$DRIVEPREFIX/c/windows/system32/cmd.exe"
94+
fi
9295
fi
9396

9497
if [[ -z ${WINTEMP+x} ]]; then

src/hotspot/cpu/aarch64/aarch64.ad

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,12 +1182,12 @@ class CallStubImpl {
11821182
public:
11831183
// Size of call trampoline stub.
11841184
static uint size_call_trampoline() {
1185-
return 0; // no call trampolines on this platform
1185+
return MacroAssembler::max_trampoline_stub_size();
11861186
}
11871187

11881188
// number of relocations needed by a call trampoline stub
11891189
static uint reloc_call_trampoline() {
1190-
return 0; // no call trampolines on this platform
1190+
return 5; // metadata; call dest; trampoline address; trampoline destination; trampoline_owner_metadata
11911191
}
11921192
};
11931193

src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include "runtime/frame.inline.hpp"
4343
#include "runtime/sharedRuntime.hpp"
4444
#include "runtime/stubRoutines.hpp"
45+
#include "runtime/threadIdentifier.hpp"
4546
#include "utilities/powerOfTwo.hpp"
4647
#include "vmreg_aarch64.inline.hpp"
4748

@@ -520,6 +521,10 @@ void LIR_Assembler::const2reg(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_cod
520521
#if INCLUDE_CDS
521522
if (AOTCodeCache::is_on_for_dump()) {
522523
address b = c->as_pointer();
524+
if (b == (address)ThreadIdentifier::unsafe_offset()) {
525+
__ lea(dest->as_register_lo(), ExternalAddress(b));
526+
break;
527+
}
523528
if (AOTRuntimeConstants::contains(b)) {
524529
__ load_aotrc_address(dest->as_register_lo(), b);
525530
break;

0 commit comments

Comments
 (0)