Skip to content

Commit 4c625ab

Browse files
Merge tag 'jdk-23+29' into labsjdk/automation-6-27-2024-3137
Added tag jdk-23+29 for changeset b5fbdb2
2 parents e505eb7 + b5fbdb2 commit 4c625ab

File tree

144 files changed

+1844
-981
lines changed

Some content is hidden

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

144 files changed

+1844
-981
lines changed

make/jdk/src/classes/build/tools/intpoly/FieldGen.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ private String generate(FieldParams params) throws IOException {
778778
result.appendLine("}");
779779

780780
result.appendLine("@Override");
781-
result.appendLine("protected int mult(long[] a, long[] b, long[] r) {");
781+
result.appendLine("protected void mult(long[] a, long[] b, long[] r) {");
782782
result.incrIndent();
783783
for (int i = 0; i < 2 * params.getNumLimbs() - 1; i++) {
784784
result.appendIndent();
@@ -804,9 +804,6 @@ private String generate(FieldParams params) throws IOException {
804804
}
805805
}
806806
result.append(");\n");
807-
result.appendIndent();
808-
result.append("return 0;");
809-
result.appendLine();
810807
result.decrIndent();
811808
result.appendLine("}");
812809

@@ -836,7 +833,7 @@ private String generate(FieldParams params) throws IOException {
836833
// }
837834
// }
838835
result.appendLine("@Override");
839-
result.appendLine("protected int square(long[] a, long[] r) {");
836+
result.appendLine("protected void square(long[] a, long[] r) {");
840837
result.incrIndent();
841838
for (int i = 0; i < 2 * params.getNumLimbs() - 1; i++) {
842839
result.appendIndent();
@@ -877,9 +874,6 @@ private String generate(FieldParams params) throws IOException {
877874
}
878875
}
879876
result.append(");\n");
880-
result.appendIndent();
881-
result.append("return 0;");
882-
result.appendLine();
883877
result.decrIndent();
884878
result.appendLine("}");
885879

src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ address StubGenerator::generate_intpoly_montgomeryMult_P256() {
249249
const Register tmp = r9;
250250

251251
montgomeryMultiply(aLimbs, bLimbs, rLimbs, tmp, _masm);
252-
__ mov64(rax, 0x1); // Return 1 (Fig. 5, Step 6 [1] skipped in montgomeryMultiply)
253252

254253
__ leave();
255254
__ ret(0);

src/hotspot/share/classfile/vmIntrinsics.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,8 @@ class methodHandle;
529529
/* support for sun.security.util.math.intpoly.MontgomeryIntegerPolynomialP256 */ \
530530
do_class(sun_security_util_math_intpoly_MontgomeryIntegerPolynomialP256, "sun/security/util/math/intpoly/MontgomeryIntegerPolynomialP256") \
531531
do_intrinsic(_intpoly_montgomeryMult_P256, sun_security_util_math_intpoly_MontgomeryIntegerPolynomialP256, intPolyMult_name, intPolyMult_signature, F_R) \
532-
do_name(intPolyMult_name, "mult") \
533-
do_signature(intPolyMult_signature, "([J[J[J)I") \
532+
do_name(intPolyMult_name, "multImpl") \
533+
do_signature(intPolyMult_signature, "([J[J[J)V") \
534534
\
535535
do_class(sun_security_util_math_intpoly_IntegerPolynomial, "sun/security/util/math/intpoly/IntegerPolynomial") \
536536
do_intrinsic(_intpoly_assign, sun_security_util_math_intpoly_IntegerPolynomial, intPolyAssign_name, intPolyAssign_signature, F_S) \

src/hotspot/share/gc/shared/gcVMOperations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ bool VM_GC_Operation::doit_prologue() {
132132
void VM_GC_Operation::doit_epilogue() {
133133
// GC thread root traversal likely used OopMapCache a lot, which
134134
// might have created lots of old entries. Trigger the cleanup now.
135-
OopMapCache::trigger_cleanup();
135+
OopMapCache::try_trigger_cleanup();
136136
if (Universe::has_reference_pending_list()) {
137137
Heap_lock->notify_all();
138138
}

src/hotspot/share/gc/shenandoah/shenandoahVMOperations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void VM_ShenandoahOperation::doit_epilogue() {
4444
assert(!ShenandoahHeap::heap()->has_gc_state_changed(), "GC State was not synchronized to java threads.");
4545
// GC thread root traversal likely used OopMapCache a lot, which
4646
// might have created lots of old entries. Trigger the cleanup now.
47-
OopMapCache::trigger_cleanup();
47+
OopMapCache::try_trigger_cleanup();
4848
}
4949

5050
bool VM_ShenandoahReferenceOperation::doit_prologue() {

src/hotspot/share/gc/x/xDriver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class VM_XOperation : public VM_Operation {
134134

135135
// GC thread root traversal likely used OopMapCache a lot, which
136136
// might have created lots of old entries. Trigger the cleanup now.
137-
OopMapCache::trigger_cleanup();
137+
OopMapCache::try_trigger_cleanup();
138138
}
139139

140140
bool gc_locked() const {

src/hotspot/share/gc/z/zDirector.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,10 @@ static bool rule_major_allocation_rate(const ZDirectorStats& stats) {
524524
}
525525

526526
static double calculate_young_to_old_worker_ratio(const ZDirectorStats& stats) {
527+
if (!stats._old_stats._cycle._is_time_trustable) {
528+
return 1.0;
529+
}
530+
527531
const double young_gc_time = gc_time(stats._young_stats);
528532
const double old_gc_time = gc_time(stats._old_stats);
529533
const size_t reclaimed_per_young_gc = stats._young_stats._stat_heap._reclaimed_avg;

src/hotspot/share/gc/z/zGeneration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ class VM_ZOperation : public VM_Operation {
456456

457457
// GC thread root traversal likely used OopMapCache a lot, which
458458
// might have created lots of old entries. Trigger the cleanup now.
459-
OopMapCache::trigger_cleanup();
459+
OopMapCache::try_trigger_cleanup();
460460
}
461461

462462
bool success() const {

src/hotspot/share/interpreter/oopMapCache.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,13 @@ bool OopMapCache::has_cleanup_work() {
592592
return Atomic::load(&_old_entries) != nullptr;
593593
}
594594

595-
void OopMapCache::trigger_cleanup() {
596-
if (has_cleanup_work()) {
597-
MutexLocker ml(Service_lock, Mutex::_no_safepoint_check_flag);
595+
void OopMapCache::try_trigger_cleanup() {
596+
// See we can take the lock for the notification without blocking.
597+
// This allows triggering the cleanup from GC paths, that can hold
598+
// the service lock for e.g. oop iteration in service thread.
599+
if (has_cleanup_work() && Service_lock->try_lock_without_rank_check()) {
598600
Service_lock->notify_all();
601+
Service_lock->unlock();
599602
}
600603
}
601604

src/hotspot/share/interpreter/oopMapCache.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ class OopMapCache : public CHeapObj<mtClass> {
183183
// Check if we need to clean up old entries
184184
static bool has_cleanup_work();
185185

186-
// Request cleanup if work is needed
187-
static void trigger_cleanup();
186+
// Request cleanup if work is needed and notification is currently possible
187+
static void try_trigger_cleanup();
188188

189189
// Clean up the old entries
190190
static void cleanup();

0 commit comments

Comments
 (0)