Skip to content

Commit 1efd3d3

Browse files
Merge tag 'jdk-24.0.1+9' into ola/24.2_jdk-24.0.1+9
Added tag jdk-24.0.1+9 for changeset a9cfe9e
2 parents 1173205 + a9cfe9e commit 1efd3d3

File tree

104 files changed

+1742
-773
lines changed

Some content is hidden

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

104 files changed

+1742
-773
lines changed

.jcheck/conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[general]
2-
project=jdk
2+
project=jdk-updates
33
jbs=JDK
4-
version=24
4+
version=24.0.1
55

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

make/conf/version-numbers.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828

2929
DEFAULT_VERSION_FEATURE=24
3030
DEFAULT_VERSION_INTERIM=0
31-
DEFAULT_VERSION_UPDATE=0
31+
DEFAULT_VERSION_UPDATE=1
3232
DEFAULT_VERSION_PATCH=0
3333
DEFAULT_VERSION_EXTRA1=0
3434
DEFAULT_VERSION_EXTRA2=0
3535
DEFAULT_VERSION_EXTRA3=0
36-
DEFAULT_VERSION_DATE=2025-03-18
36+
DEFAULT_VERSION_DATE=2025-04-15
3737
DEFAULT_VERSION_CLASSFILE_MAJOR=68 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
3838
DEFAULT_VERSION_CLASSFILE_MINOR=0
3939
DEFAULT_VERSION_DOCS_API_SINCE=11

src/hotspot/cpu/riscv/codeBuffer_riscv.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333

3434
public:
3535
void flush_bundle(bool start_new_bundle) {}
36-
static bool supports_shared_stubs() { return false; }
36+
static bool supports_shared_stubs() { return true; }
3737

3838
#endif // CPU_RISCV_CODEBUFFER_RISCV_HPP

src/hotspot/os/linux/cgroupSubsystem_linux.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include "utilities/globalDefinitions.hpp"
3838

3939
// controller names have to match the *_IDX indices
40-
static const char* cg_controller_name[] = { "cpu", "cpuset", "cpuacct", "memory", "pids" };
40+
static const char* cg_controller_name[] = { "cpuset", "cpu", "cpuacct", "memory", "pids" };
4141

4242
CgroupSubsystem* CgroupSubsystemFactory::create() {
4343
CgroupV1MemoryController* memory = nullptr;
@@ -226,9 +226,10 @@ bool CgroupSubsystemFactory::determine_type(CgroupInfo* cg_infos,
226226
char buf[MAXPATHLEN+1];
227227
char *p;
228228
bool is_cgroupsV2;
229-
// true iff all required controllers, memory, cpu, cpuset, cpuacct are enabled
229+
// true iff all required controllers, memory, cpu, cpuacct are enabled
230230
// at the kernel level.
231231
// pids might not be enabled on older Linux distros (SLES 12.1, RHEL 7.1)
232+
// cpuset might not be enabled on newer Linux distros (Fedora 41)
232233
bool all_required_controllers_enabled;
233234

234235
/*
@@ -260,6 +261,7 @@ bool CgroupSubsystemFactory::determine_type(CgroupInfo* cg_infos,
260261
cg_infos[MEMORY_IDX]._hierarchy_id = hierarchy_id;
261262
cg_infos[MEMORY_IDX]._enabled = (enabled == 1);
262263
} else if (strcmp(name, "cpuset") == 0) {
264+
log_debug(os, container)("Detected optional cpuset controller entry in %s", proc_cgroups);
263265
cg_infos[CPUSET_IDX]._name = os::strdup(name);
264266
cg_infos[CPUSET_IDX]._hierarchy_id = hierarchy_id;
265267
cg_infos[CPUSET_IDX]._enabled = (enabled == 1);
@@ -283,8 +285,8 @@ bool CgroupSubsystemFactory::determine_type(CgroupInfo* cg_infos,
283285
is_cgroupsV2 = true;
284286
all_required_controllers_enabled = true;
285287
for (int i = 0; i < CG_INFO_LENGTH; i++) {
286-
// pids controller is optional. All other controllers are required
287-
if (i != PIDS_IDX) {
288+
// pids and cpuset controllers are optional. All other controllers are required
289+
if (i != PIDS_IDX && i != CPUSET_IDX) {
288290
is_cgroupsV2 = is_cgroupsV2 && cg_infos[i]._hierarchy_id == 0;
289291
all_required_controllers_enabled = all_required_controllers_enabled && cg_infos[i]._enabled;
290292
}

src/hotspot/share/classfile/javaClasses.cpp

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4674,28 +4674,31 @@ int java_lang_invoke_MethodType::rtype_slot_count(oop mt) {
46744674
// Support for java_lang_invoke_CallSite
46754675

46764676
int java_lang_invoke_CallSite::_target_offset;
4677-
int java_lang_invoke_CallSite::_context_offset;
4677+
int java_lang_invoke_CallSite::_vmdependencies_offset;
4678+
int java_lang_invoke_CallSite::_last_cleanup_offset;
46784679

46794680
#define CALLSITE_FIELDS_DO(macro) \
46804681
macro(_target_offset, k, "target", java_lang_invoke_MethodHandle_signature, false); \
4681-
macro(_context_offset, k, "context", java_lang_invoke_MethodHandleNatives_CallSiteContext_signature, false)
46824682

46834683
void java_lang_invoke_CallSite::compute_offsets() {
46844684
InstanceKlass* k = vmClasses::CallSite_klass();
46854685
CALLSITE_FIELDS_DO(FIELD_COMPUTE_OFFSET);
4686+
CALLSITE_INJECTED_FIELDS(INJECTED_FIELD_COMPUTE_OFFSET);
46864687
}
46874688

46884689
#if INCLUDE_CDS
46894690
void java_lang_invoke_CallSite::serialize_offsets(SerializeClosure* f) {
46904691
CALLSITE_FIELDS_DO(FIELD_SERIALIZE_OFFSET);
4692+
CALLSITE_INJECTED_FIELDS(INJECTED_FIELD_SERIALIZE_OFFSET);
46914693
}
46924694
#endif
46934695

4694-
oop java_lang_invoke_CallSite::context_no_keepalive(oop call_site) {
4696+
DependencyContext java_lang_invoke_CallSite::vmdependencies(oop call_site) {
46954697
assert(java_lang_invoke_CallSite::is_instance(call_site), "");
4696-
4697-
oop dep_oop = call_site->obj_field_access<AS_NO_KEEPALIVE>(_context_offset);
4698-
return dep_oop;
4698+
nmethodBucket* volatile* vmdeps_addr = call_site->field_addr<nmethodBucket* volatile>(_vmdependencies_offset);
4699+
volatile uint64_t* last_cleanup_addr = call_site->field_addr<volatile uint64_t>(_last_cleanup_offset);
4700+
DependencyContext dep_ctx(vmdeps_addr, last_cleanup_addr);
4701+
return dep_ctx;
46994702
}
47004703

47014704
// Support for java_lang_invoke_ConstantCallSite
@@ -4716,30 +4719,6 @@ void java_lang_invoke_ConstantCallSite::serialize_offsets(SerializeClosure* f) {
47164719
}
47174720
#endif
47184721

4719-
// Support for java_lang_invoke_MethodHandleNatives_CallSiteContext
4720-
4721-
int java_lang_invoke_MethodHandleNatives_CallSiteContext::_vmdependencies_offset;
4722-
int java_lang_invoke_MethodHandleNatives_CallSiteContext::_last_cleanup_offset;
4723-
4724-
void java_lang_invoke_MethodHandleNatives_CallSiteContext::compute_offsets() {
4725-
InstanceKlass* k = vmClasses::Context_klass();
4726-
CALLSITECONTEXT_INJECTED_FIELDS(INJECTED_FIELD_COMPUTE_OFFSET);
4727-
}
4728-
4729-
#if INCLUDE_CDS
4730-
void java_lang_invoke_MethodHandleNatives_CallSiteContext::serialize_offsets(SerializeClosure* f) {
4731-
CALLSITECONTEXT_INJECTED_FIELDS(INJECTED_FIELD_SERIALIZE_OFFSET);
4732-
}
4733-
#endif
4734-
4735-
DependencyContext java_lang_invoke_MethodHandleNatives_CallSiteContext::vmdependencies(oop call_site) {
4736-
assert(java_lang_invoke_MethodHandleNatives_CallSiteContext::is_instance(call_site), "");
4737-
nmethodBucket* volatile* vmdeps_addr = call_site->field_addr<nmethodBucket* volatile>(_vmdependencies_offset);
4738-
volatile uint64_t* last_cleanup_addr = call_site->field_addr<volatile uint64_t>(_last_cleanup_offset);
4739-
DependencyContext dep_ctx(vmdeps_addr, last_cleanup_addr);
4740-
return dep_ctx;
4741-
}
4742-
47434722
// Support for java_lang_ClassLoader
47444723

47454724
int java_lang_ClassLoader::_loader_data_offset;
@@ -5389,7 +5368,6 @@ void java_lang_InternalError::serialize_offsets(SerializeClosure* f) {
53895368
f(java_lang_invoke_MethodType) \
53905369
f(java_lang_invoke_CallSite) \
53915370
f(java_lang_invoke_ConstantCallSite) \
5392-
f(java_lang_invoke_MethodHandleNatives_CallSiteContext) \
53935371
f(java_lang_reflect_AccessibleObject) \
53945372
f(java_lang_reflect_Method) \
53955373
f(java_lang_reflect_Constructor) \
@@ -5455,8 +5433,7 @@ bool JavaClasses::is_supported_for_archiving(oop obj) {
54555433
if (!CDSConfig::is_dumping_invokedynamic()) {
54565434
// These are supported by CDS only when CDSConfig::is_dumping_invokedynamic() is enabled.
54575435
if (klass == vmClasses::ResolvedMethodName_klass() ||
5458-
klass == vmClasses::MemberName_klass() ||
5459-
klass == vmClasses::Context_klass()) {
5436+
klass == vmClasses::MemberName_klass()) {
54605437
return false;
54615438
}
54625439
}

src/hotspot/share/classfile/javaClasses.hpp

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,13 +1409,17 @@ class java_lang_invoke_MethodType: AllStatic {
14091409

14101410

14111411
// Interface to java.lang.invoke.CallSite objects
1412+
#define CALLSITE_INJECTED_FIELDS(macro) \
1413+
macro(java_lang_invoke_CallSite, vmdependencies, intptr_signature, false) \
1414+
macro(java_lang_invoke_CallSite, last_cleanup, long_signature, false)
14121415

14131416
class java_lang_invoke_CallSite: AllStatic {
14141417
friend class JavaClasses;
14151418

14161419
private:
14171420
static int _target_offset;
1418-
static int _context_offset;
1421+
static int _vmdependencies_offset;
1422+
static int _last_cleanup_offset;
14191423

14201424
static void compute_offsets();
14211425

@@ -1426,7 +1430,7 @@ class java_lang_invoke_CallSite: AllStatic {
14261430
static void set_target( oop site, oop target);
14271431
static void set_target_volatile( oop site, oop target);
14281432

1429-
static oop context_no_keepalive(oop site);
1433+
static DependencyContext vmdependencies(oop call_site);
14301434

14311435
// Testers
14321436
static bool is_subclass(Klass* klass) {
@@ -1436,7 +1440,6 @@ class java_lang_invoke_CallSite: AllStatic {
14361440

14371441
// Accessors for code generation:
14381442
static int target_offset() { CHECK_INIT(_target_offset); }
1439-
static int context_offset() { CHECK_INIT(_context_offset); }
14401443
};
14411444

14421445
// Interface to java.lang.invoke.ConstantCallSite objects
@@ -1461,35 +1464,6 @@ class java_lang_invoke_ConstantCallSite: AllStatic {
14611464
static bool is_instance(oop obj);
14621465
};
14631466

1464-
// Interface to java.lang.invoke.MethodHandleNatives$CallSiteContext objects
1465-
1466-
#define CALLSITECONTEXT_INJECTED_FIELDS(macro) \
1467-
macro(java_lang_invoke_MethodHandleNatives_CallSiteContext, vmdependencies, intptr_signature, false) \
1468-
macro(java_lang_invoke_MethodHandleNatives_CallSiteContext, last_cleanup, long_signature, false)
1469-
1470-
class DependencyContext;
1471-
1472-
class java_lang_invoke_MethodHandleNatives_CallSiteContext : AllStatic {
1473-
friend class JavaClasses;
1474-
1475-
private:
1476-
static int _vmdependencies_offset;
1477-
static int _last_cleanup_offset;
1478-
1479-
static void compute_offsets();
1480-
1481-
public:
1482-
static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
1483-
// Accessors
1484-
static DependencyContext vmdependencies(oop context);
1485-
1486-
// Testers
1487-
static bool is_subclass(Klass* klass) {
1488-
return klass->is_subclass_of(vmClasses::Context_klass());
1489-
}
1490-
static bool is_instance(oop obj);
1491-
};
1492-
14931467
// Interface to java.lang.ClassLoader objects
14941468

14951469
#define CLASSLOADER_INJECTED_FIELDS(macro) \

src/hotspot/share/classfile/javaClasses.inline.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,6 @@ inline bool java_lang_invoke_ConstantCallSite::is_instance(oop obj) {
263263
return obj != nullptr && is_subclass(obj->klass());
264264
}
265265

266-
inline bool java_lang_invoke_MethodHandleNatives_CallSiteContext::is_instance(oop obj) {
267-
return obj != nullptr && is_subclass(obj->klass());
268-
}
269-
270266
inline bool java_lang_invoke_MemberName::is_instance(oop obj) {
271267
return obj != nullptr && obj->klass() == vmClasses::MemberName_klass();
272268
}

src/hotspot/share/classfile/javaClassesImpl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
CLASSLOADER_INJECTED_FIELDS(macro) \
3737
RESOLVEDMETHOD_INJECTED_FIELDS(macro) \
3838
MEMBERNAME_INJECTED_FIELDS(macro) \
39-
CALLSITECONTEXT_INJECTED_FIELDS(macro) \
39+
CALLSITE_INJECTED_FIELDS(macro) \
4040
STACKFRAMEINFO_INJECTED_FIELDS(macro) \
4141
MODULE_INJECTED_FIELDS(macro) \
4242
THREAD_INJECTED_FIELDS(macro) \

src/hotspot/share/classfile/vmClassMacros.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@
123123
do_klass(ABIDescriptor_klass, jdk_internal_foreign_abi_ABIDescriptor ) \
124124
do_klass(VMStorage_klass, jdk_internal_foreign_abi_VMStorage ) \
125125
do_klass(CallConv_klass, jdk_internal_foreign_abi_CallConv ) \
126-
do_klass(Context_klass, java_lang_invoke_MethodHandleNatives_CallSiteContext ) \
127126
do_klass(ConstantCallSite_klass, java_lang_invoke_ConstantCallSite ) \
128127
do_klass(MutableCallSite_klass, java_lang_invoke_MutableCallSite ) \
129128
do_klass(VolatileCallSite_klass, java_lang_invoke_VolatileCallSite ) \

src/hotspot/share/classfile/vmSymbols.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,9 @@ class SerializeClosure;
326326
template(java_lang_invoke_MemberName, "java/lang/invoke/MemberName") \
327327
template(java_lang_invoke_ResolvedMethodName, "java/lang/invoke/ResolvedMethodName") \
328328
template(java_lang_invoke_MethodHandleNatives, "java/lang/invoke/MethodHandleNatives") \
329-
template(java_lang_invoke_MethodHandleNatives_CallSiteContext, "java/lang/invoke/MethodHandleNatives$CallSiteContext") \
330329
template(java_lang_invoke_LambdaForm, "java/lang/invoke/LambdaForm") \
331330
template(java_lang_invoke_InjectedProfile_signature, "Ljava/lang/invoke/InjectedProfile;") \
332331
template(java_lang_invoke_LambdaForm_Compiled_signature, "Ljava/lang/invoke/LambdaForm$Compiled;") \
333-
template(java_lang_invoke_MethodHandleNatives_CallSiteContext_signature, "Ljava/lang/invoke/MethodHandleNatives$CallSiteContext;") \
334332
/* internal up-calls made only by the JVM, via class sun.invoke.MethodHandleNatives: */ \
335333
template(findMethodHandleType_name, "findMethodHandleType") \
336334
template(findMethodHandleType_signature, "(Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;") \

src/hotspot/share/code/dependencyContext.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,6 @@ void DependencyContext::clean_unloading_dependents() {
168168
}
169169
}
170170

171-
nmethodBucket* DependencyContext::release_and_get_next_not_unloading(nmethodBucket* b) {
172-
nmethodBucket* next = b->next_not_unloading();
173-
release(b);
174-
return next;
175-
}
176-
177171
//
178172
// Invalidate all dependencies in the context
179173
void DependencyContext::remove_all_dependents() {
@@ -214,18 +208,6 @@ void DependencyContext::remove_all_dependents() {
214208
set_dependencies(nullptr);
215209
}
216210

217-
void DependencyContext::remove_and_mark_for_deoptimization_all_dependents(DeoptimizationScope* deopt_scope) {
218-
nmethodBucket* b = dependencies_not_unloading();
219-
set_dependencies(nullptr);
220-
while (b != nullptr) {
221-
nmethod* nm = b->get_nmethod();
222-
// Also count already (concurrently) marked nmethods to make sure
223-
// deoptimization is triggered before execution in this thread continues.
224-
deopt_scope->mark(nm);
225-
b = release_and_get_next_not_unloading(b);
226-
}
227-
}
228-
229211
#ifndef PRODUCT
230212
bool DependencyContext::is_empty() {
231213
return dependencies() == nullptr;

src/hotspot/share/code/dependencyContext.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class nmethodBucket: public CHeapObj<mtClass> {
6363
//
6464
// Utility class to manipulate nmethod dependency context.
6565
// Dependency context can be attached either to an InstanceKlass (_dep_context field)
66-
// or CallSiteContext oop for call_site_target dependencies (see javaClasses.hpp).
66+
// or CallSite oop for call_site_target dependencies (see javaClasses.hpp).
6767
// DependencyContext class operates on some location which holds a nmethodBucket* value
6868
// and uint64_t integer recording the safepoint counter at the last cleanup.
6969
//
@@ -92,7 +92,6 @@ class DependencyContext : public StackObj {
9292
#ifdef ASSERT
9393
// Safepoints are forbidden during DC lifetime. GC can invalidate
9494
// _dependency_context_addr if it relocates the holder
95-
// (e.g. CallSiteContext Java object).
9695
SafepointStateTracker _safepoint_tracker;
9796

9897
DependencyContext(nmethodBucket* volatile* bucket_addr, volatile uint64_t* last_cleanup_addr)
@@ -114,9 +113,7 @@ class DependencyContext : public StackObj {
114113
void mark_dependent_nmethods(DeoptimizationScope* deopt_scope, DepChange& changes);
115114
void add_dependent_nmethod(nmethod* nm);
116115
void remove_all_dependents();
117-
void remove_and_mark_for_deoptimization_all_dependents(DeoptimizationScope* deopt_scope);
118116
void clean_unloading_dependents();
119-
static nmethodBucket* release_and_get_next_not_unloading(nmethodBucket* b);
120117
static void purge_dependency_contexts();
121118
static void release(nmethodBucket* b);
122119
static void cleaning_start();

src/hotspot/share/gc/epsilon/epsilonInitLogger.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,6 @@
3232
#include "utilities/globalDefinitions.hpp"
3333

3434
void EpsilonInitLogger::print_gc_specific() {
35-
// Warn users that non-resizable heap might be better for some configurations.
36-
// We are not adjusting the heap size by ourselves, because it affects startup time.
37-
if (InitialHeapSize != MaxHeapSize) {
38-
log_warning(gc, init)("Consider setting -Xms equal to -Xmx to avoid resizing hiccups");
39-
}
40-
41-
// Warn users that AlwaysPreTouch might be better for some configurations.
42-
// We are not turning this on by ourselves, because it affects startup time.
43-
if (FLAG_IS_DEFAULT(AlwaysPreTouch) && !AlwaysPreTouch) {
44-
log_warning(gc, init)("Consider enabling -XX:+AlwaysPreTouch to avoid memory commit hiccups");
45-
}
46-
4735
if (UseTLAB) {
4836
size_t max_tlab = EpsilonHeap::heap()->max_tlab_size() * HeapWordSize;
4937
log_info(gc, init)("TLAB Size Max: " SIZE_FORMAT "%s",
@@ -57,6 +45,18 @@ void EpsilonInitLogger::print_gc_specific() {
5745
} else {
5846
log_info(gc, init)("TLAB: Disabled");
5947
}
48+
49+
// Suggest that non-resizable heap might be better for some configurations.
50+
// We are not adjusting the heap size by ourselves, because it affects startup time.
51+
if (InitialHeapSize != MaxHeapSize) {
52+
log_info(gc)("Consider setting -Xms equal to -Xmx to avoid resizing hiccups");
53+
}
54+
55+
// Suggest that AlwaysPreTouch might be better for some configurations.
56+
// We are not turning this on by ourselves, because it affects startup time.
57+
if (FLAG_IS_DEFAULT(AlwaysPreTouch) && !AlwaysPreTouch) {
58+
log_info(gc)("Consider enabling -XX:+AlwaysPreTouch to avoid memory commit hiccups");
59+
}
6060
}
6161

6262
void EpsilonInitLogger::print() {

0 commit comments

Comments
 (0)