Skip to content

Commit b2ddb4e

Browse files
authored
Merge pull request #2187 from SAP/pr-jdk-27+10
Merge to tag jdk-27+10
2 parents 1aa9cd5 + 296e35f commit b2ddb4e

File tree

447 files changed

+34905
-28932
lines changed

Some content is hidden

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

447 files changed

+34905
-28932
lines changed

make/devkit/Tools.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ else ifeq ($(BASE_OS), Fedora)
7878
endif
7979
BASE_URL := http://fedora.riscv.rocks/repos-dist/f$(BASE_OS_VERSION)/latest/$(ARCH)/Packages/
8080
else
81-
LATEST_ARCHIVED_OS_VERSION := 36
81+
LATEST_ARCHIVED_OS_VERSION := 41
8282
ifeq ($(filter aarch64 armhfp x86_64, $(ARCH)), )
8383
FEDORA_TYPE := fedora-secondary
8484
else

src/hotspot/cpu/aarch64/vm_version_aarch64.cpp

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2015, 2020, Red Hat Inc. All rights reserved.
44
* Copyright 2025 Arm Limited and/or its affiliates.
55
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -664,16 +664,52 @@ void VM_Version::initialize() {
664664
void VM_Version::insert_features_names(uint64_t features, stringStream& ss) {
665665
int i = 0;
666666
ss.join([&]() {
667-
while (i < MAX_CPU_FEATURES) {
668-
if (supports_feature((VM_Version::Feature_Flag)i)) {
669-
return _features_names[i++];
667+
const char* str = nullptr;
668+
while ((i < MAX_CPU_FEATURES) && (str == nullptr)) {
669+
if (supports_feature(features, (VM_Version::Feature_Flag)i)) {
670+
str = _features_names[i];
670671
}
671672
i += 1;
672673
}
673-
return (const char*)nullptr;
674+
return str;
674675
}, ", ");
675676
}
676677

678+
void VM_Version::get_cpu_features_name(void* features_buffer, stringStream& ss) {
679+
uint64_t features = *(uint64_t*)features_buffer;
680+
insert_features_names(features, ss);
681+
}
682+
683+
void VM_Version::get_missing_features_name(void* features_set1, void* features_set2, stringStream& ss) {
684+
uint64_t vm_features_set1 = *(uint64_t*)features_set1;
685+
uint64_t vm_features_set2 = *(uint64_t*)features_set2;
686+
int i = 0;
687+
ss.join([&]() {
688+
const char* str = nullptr;
689+
while ((i < MAX_CPU_FEATURES) && (str == nullptr)) {
690+
Feature_Flag flag = (Feature_Flag)i;
691+
if (supports_feature(vm_features_set1, flag) && !supports_feature(vm_features_set2, flag)) {
692+
str = _features_names[i];
693+
}
694+
i += 1;
695+
}
696+
return str;
697+
}, ", ");
698+
}
699+
700+
int VM_Version::cpu_features_size() {
701+
return sizeof(_features);
702+
}
703+
704+
void VM_Version::store_cpu_features(void* buf) {
705+
*(uint64_t*)buf = _features;
706+
}
707+
708+
bool VM_Version::supports_features(void* features_buffer) {
709+
uint64_t features_to_test = *(uint64_t*)features_buffer;
710+
return (_features & features_to_test) == features_to_test;
711+
}
712+
677713
#if defined(LINUX)
678714
static bool check_info_file(const char* fpath,
679715
const char* virt1, VirtualizationType vt1,

src/hotspot/cpu/aarch64/vm_version_aarch64.hpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -184,6 +184,9 @@ class VM_Version : public Abstract_VM_Version {
184184
static bool supports_feature(Feature_Flag flag) {
185185
return (_features & BIT_MASK(flag)) != 0;
186186
}
187+
static bool supports_feature(uint64_t features, Feature_Flag flag) {
188+
return (features & BIT_MASK(flag)) != 0;
189+
}
187190

188191
static int cpu_family() { return _cpu; }
189192
static int cpu_model() { return _model; }
@@ -244,6 +247,20 @@ class VM_Version : public Abstract_VM_Version {
244247
static bool use_neon_for_vector(int vector_length_in_bytes) {
245248
return vector_length_in_bytes <= 16;
246249
}
250+
251+
static void get_cpu_features_name(void* features_buffer, stringStream& ss);
252+
253+
// Returns names of features present in features_set1 but not in features_set2
254+
static void get_missing_features_name(void* features_set1, void* features_set2, stringStream& ss);
255+
256+
// Returns number of bytes required to store cpu features representation
257+
static int cpu_features_size();
258+
259+
// Stores cpu features representation in the provided buffer. This representation is arch dependent.
260+
// Size of the buffer must be same as returned by cpu_features_size()
261+
static void store_cpu_features(void* buf);
262+
263+
static bool supports_features(void* features_to_test);
247264
};
248265

249266
#endif // CPU_AARCH64_VM_VERSION_AARCH64_HPP

src/hotspot/cpu/ppc/c2_globals_ppc.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
3-
* Copyright (c) 2012, 2019 SAP SE. All rights reserved.
2+
* Copyright (c) 2000, 2026, Oracle and/or its affiliates. All rights reserved.
3+
* Copyright (c) 2012, 2026 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,7 @@ define_pd_global(intx, CompileThreshold, 10000);
4444

4545
define_pd_global(intx, OnStackReplacePercentage, 140);
4646
define_pd_global(intx, ConditionalMoveLimit, 3);
47-
define_pd_global(intx, FreqInlineSize, 175);
47+
define_pd_global(intx, FreqInlineSize, 325);
4848
define_pd_global(intx, MinJumpTableSize, 10);
4949
define_pd_global(intx, InteriorEntryAlignment, 16);
5050
define_pd_global(size_t, NewSizeThreadIncrease, ScaleForWordSize(4*K));

src/hotspot/cpu/ppc/methodHandles_ppc.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
3-
* Copyright (c) 2012, 2025 SAP SE. All rights reserved.
2+
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
3+
* Copyright (c) 2012, 2026 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* This code is free software; you can redistribute it and/or modify it
@@ -49,11 +49,6 @@
4949

5050
#define BIND(label) bind(label); BLOCK_COMMENT(#label ":")
5151

52-
// Workaround for C++ overloading nastiness on '0' for RegisterOrConstant.
53-
inline static RegisterOrConstant constant(int value) {
54-
return RegisterOrConstant(value);
55-
}
56-
5752
void MethodHandles::load_klass_from_Class(MacroAssembler* _masm, Register klass_reg,
5853
Register temp_reg, Register temp2_reg) {
5954
if (VerifyMethodHandles) {

src/hotspot/cpu/s390/compiledIC_s390.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2016, 2019 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -29,17 +29,13 @@
2929
#include "memory/resourceArea.hpp"
3030
#include "runtime/mutexLocker.hpp"
3131
#include "runtime/safepoint.hpp"
32-
#ifdef COMPILER2
33-
#include "opto/matcher.hpp"
34-
#endif
3532

3633
// ----------------------------------------------------------------------------
3734

3835
#undef __
3936
#define __ masm->
4037

4138
address CompiledDirectCall::emit_to_interp_stub(MacroAssembler *masm, address mark/* = nullptr*/) {
42-
#ifdef COMPILER2
4339
// Stub is fixed up when the corresponding call is converted from calling
4440
// compiled code to calling interpreted code.
4541
if (mark == nullptr) {
@@ -55,7 +51,7 @@ address CompiledDirectCall::emit_to_interp_stub(MacroAssembler *masm, address ma
5551
__ relocate(static_stub_Relocation::spec(mark));
5652

5753
AddressLiteral meta = __ allocate_metadata_address(nullptr);
58-
bool success = __ load_const_from_toc(as_Register(Matcher::inline_cache_reg_encode()), meta);
54+
bool success = __ load_const_from_toc(Z_inline_cache, meta);
5955

6056
__ set_inst_mark();
6157
AddressLiteral a((address)-1);
@@ -67,10 +63,6 @@ address CompiledDirectCall::emit_to_interp_stub(MacroAssembler *masm, address ma
6763
__ z_br(Z_R1);
6864
__ end_a_stub(); // Update current stubs pointer and restore insts_end.
6965
return stub;
70-
#else
71-
ShouldNotReachHere();
72-
return nullptr;
73-
#endif
7466
}
7567

7668
#undef __

src/hotspot/cpu/x86/vm_version_x86.cpp

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int VM_Version::_stepping;
4848
bool VM_Version::_has_intel_jcc_erratum;
4949
VM_Version::CpuidInfo VM_Version::_cpuid_info = { 0, };
5050

51-
#define DECLARE_CPU_FEATURE_NAME(id, name, bit) name,
51+
#define DECLARE_CPU_FEATURE_NAME(id, name, bit) XSTR(name),
5252
const char* VM_Version::_features_names[] = { CPU_FEATURE_FLAGS(DECLARE_CPU_FEATURE_NAME)};
5353
#undef DECLARE_CPU_FEATURE_NAME
5454

@@ -3297,12 +3297,50 @@ bool VM_Version::is_intrinsic_supported(vmIntrinsicID id) {
32973297
void VM_Version::insert_features_names(VM_Version::VM_Features features, stringStream& ss) {
32983298
int i = 0;
32993299
ss.join([&]() {
3300-
while (i < MAX_CPU_FEATURES) {
3301-
if (_features.supports_feature((VM_Version::Feature_Flag)i)) {
3302-
return _features_names[i++];
3300+
const char* str = nullptr;
3301+
while ((i < MAX_CPU_FEATURES) && (str == nullptr)) {
3302+
if (features.supports_feature((VM_Version::Feature_Flag)i)) {
3303+
str = _features_names[i];
33033304
}
33043305
i += 1;
33053306
}
3306-
return (const char*)nullptr;
3307+
return str;
33073308
}, ", ");
33083309
}
3310+
3311+
void VM_Version::get_cpu_features_name(void* features_buffer, stringStream& ss) {
3312+
VM_Features* features = (VM_Features*)features_buffer;
3313+
insert_features_names(*features, ss);
3314+
}
3315+
3316+
void VM_Version::get_missing_features_name(void* features_set1, void* features_set2, stringStream& ss) {
3317+
VM_Features* vm_features_set1 = (VM_Features*)features_set1;
3318+
VM_Features* vm_features_set2 = (VM_Features*)features_set2;
3319+
int i = 0;
3320+
ss.join([&]() {
3321+
const char* str = nullptr;
3322+
while ((i < MAX_CPU_FEATURES) && (str == nullptr)) {
3323+
Feature_Flag flag = (Feature_Flag)i;
3324+
if (vm_features_set1->supports_feature(flag) && !vm_features_set2->supports_feature(flag)) {
3325+
str = _features_names[i];
3326+
}
3327+
i += 1;
3328+
}
3329+
return str;
3330+
}, ", ");
3331+
}
3332+
3333+
int VM_Version::cpu_features_size() {
3334+
return sizeof(VM_Features);
3335+
}
3336+
3337+
void VM_Version::store_cpu_features(void* buf) {
3338+
VM_Features copy = _features;
3339+
copy.clear_feature(CPU_HT); // HT does not result in incompatibility of aot code cache
3340+
memcpy(buf, &copy, sizeof(VM_Features));
3341+
}
3342+
3343+
bool VM_Version::supports_features(void* features_buffer) {
3344+
VM_Features* features_to_test = (VM_Features*)features_buffer;
3345+
return _features.supports_features(features_to_test);
3346+
}

0 commit comments

Comments
 (0)