RFR(S): 8189613: [MVT] __Value oop not preserved when safepointing at return
Tobias Hartmann
tobias.hartmann at oracle.com
Fri Oct 20 09:47:42 UTC 2017
Hi Roland,
thanks for the review!
On 18.10.2017 14:51, Roland Westrelin wrote:
> Wouldn't it be cleaner to change is_returning_oop() so it returns true
> if the method returns __Value or ValueTypeReturnedAsFields is disabled?
Yes but to determine if the method returns __Value we need a Klass lookup like it's done in
Method::returned_value_type() which is very slow. We could also check if the returned oop is tagged but I don't think we
should duplicate that code in 'is_returning_oop()' because it depends on the register map.
For consistency with other code where we treat T_OBJECT and T_VALUETYPE equally, I think 'is_returning_oop()' should
return true for value types. We can then special case depending on if the value type can be returned as fields.
I've refactored the code and added additional verification code that should catch future oop problems earlier:
http://cr.openjdk.java.net/~thartmann/8189613/webrev.01/
What do you think?
Thanks,
Tobias
More information about the valhalla-dev
mailing list