RFR(L): 8185265 [MVT] improve performance of return of value types with new calling convention
Roland Westrelin
rwestrel at redhat.com
Wed Aug 9 08:18:27 UTC 2017
> http://cr.openjdk.java.net/~roland/8185265/webrev.00/
The following patch on top of the webrev above is needed to not break
the 32 bit build.
Roland.
--- a/src/cpu/x86/vm/sharedRuntime_x86_32.cpp
+++ b/src/cpu/x86/vm/sharedRuntime_x86_32.cpp
@@ -3147,6 +3147,6 @@
}
BufferedValueTypeBlob* SharedRuntime::generate_buffered_value_type_adapter(const ValueKlass* vk) {
- ShouldNotReachHere();
+ Unimplemented();
return NULL;
}
diff --git a/src/share/vm/oops/valueKlass.cpp b/src/share/vm/oops/valueKlass.cpp
--- a/src/share/vm/oops/valueKlass.cpp
+++ b/src/share/vm/oops/valueKlass.cpp
@@ -344,6 +344,7 @@
}
void ValueKlass::initialize_calling_convention() {
+ if (ValueTypeReturnedAsFields || ValueTypePassFieldsAsArgs) {
Thread* THREAD = Thread::current();
assert(!HAS_PENDING_EXCEPTION, "should have no exception");
ResourceMark rm;
@@ -355,6 +356,7 @@
extended_sig->at_put(i, sig_vk.at(i));
}
+ if (ValueTypeReturnedAsFields) {
BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, nb_fields);
sig_bt[0] = T_METADATA;
SigEntry::fill_sig_bt(sig_vk, sig_bt+1, nb_fields-1, true);
@@ -373,6 +375,8 @@
*((address*)adr_unpack_handler()) = buffered_blob->unpack_fields();
assert(CodeCache::find_blob(pack_handler()) == buffered_blob, "lost track of blob");
}
+ }
+ }
assert(vtable_length() == 0, "a value klass with a vtable?");
}
More information about the valhalla-dev
mailing list