Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/hotspot/share/oops/method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,8 @@ address Method::make_adapters(const methodHandle& mh, TRAPS) {
}
}

assert(!mh->has_scalarized_args() || adapter->get_sig_cc() != nullptr, "sigcc should not be null here");

mh->set_adapter_entry(adapter);
return adapter->get_c2i_entry();
}
Expand Down
28 changes: 15 additions & 13 deletions src/hotspot/share/runtime/sharedRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2912,19 +2912,6 @@ void CompiledEntrySignature::compute_calling_conventions(bool init) {
GrowableArray<Method*>* supers = get_supers();
for (int i = 0; i < supers->length(); ++i) {
Method* super_method = supers->at(i);
if (AOTCodeCache::is_using_adapter() && super_method->adapter()->get_sig_cc() == nullptr) {
// Calling conventions have to be regenerated at runtime and are accessed through method adapters,
// which are archived in the AOT code cache. If the adapters are not regenerated, the
// calling conventions should be regenerated here.
CompiledEntrySignature ces(super_method);
ces.compute_calling_conventions();
if (ces.has_scalarized_args()) {
// Save a C heap allocated version of the scalarized signature and store it in the adapter
GrowableArray<SigEntry>* heap_sig = new (mtInternal) GrowableArray<SigEntry>(ces.sig_cc()->length(), mtInternal);
heap_sig->appendAll(ces.sig_cc());
super_method->adapter()->set_sig_cc(heap_sig);
}
}
if (super_method->is_scalarized_arg(arg_num)) {
scalar_super = true;
} else {
Expand Down Expand Up @@ -3460,9 +3447,24 @@ void AdapterHandlerEntry::link() {
log_warning(aot)("Failed to link AdapterHandlerEntry (fp=%s) to its code in the AOT code cache", _fingerprint->as_basic_args_string());
generate_code = true;
}

if (get_sig_cc() == nullptr) {
// Calling conventions have to be regenerated at runtime and are accessed through method adapters,
// which are archived in the AOT code cache. If the adapters are not regenerated, the
// calling conventions should be regenerated here.
CompiledEntrySignature ces;
ces.initialize_from_fingerprint(_fingerprint);
if (ces.has_scalarized_args()) {
// Save a C heap allocated version of the scalarized signature and store it in the adapter
GrowableArray<SigEntry>* heap_sig = new (mtInternal) GrowableArray<SigEntry>(ces.sig_cc()->length(), mtInternal);
heap_sig->appendAll(ces.sig_cc());
set_sig_cc(heap_sig);
}
}
} else {
generate_code = true;
}

if (generate_code) {
CompiledEntrySignature ces;
ces.initialize_from_fingerprint(_fingerprint);
Expand Down
2 changes: 0 additions & 2 deletions test/hotspot/jtreg/ProblemList-enable-preview.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,4 @@ compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJav
runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java#id1 8369045 macosx-aarch64

# Runtime (all Valhalla):
runtime/cds/appcds/aotCode/AOTCodeCompressedOopsTest.java 8372602 generic-all
runtime/cds/appcds/aotCode/AOTCodeFlags.java 8372602 generic-all
runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.java 8372599 generic-all
2 changes: 0 additions & 2 deletions test/hotspot/jtreg/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ runtime/valhalla/inlinetypes/verifier/StrictStaticFieldsTest.java CODETOOLS-7904
runtime/cds/TestDefaultArchiveLoading.java#coops_nocoh 8366774 generic-all
runtime/cds/TestDefaultArchiveLoading.java#nocoops_nocoh 8366774 generic-all

# Valhalla + AOT
runtime/cds/appcds/methodHandles/MethodHandlesGeneralTest.java#aot 8367408 generic-all
#############################################################################

# :hotspot_serviceability
Expand Down