RFR (S) 8134758: Final String field values should be trusted as stable
vladimir.kozlov at oracle.com
Mon Aug 31 16:25:33 UTC 2015
On 8/31/15 7:59 AM, Aleksey Shipilev wrote:
> I would like to make a forward move and make VM to trust all final
> String fields. I cannot quickly find the scenario where it helps current
> JDK -- there is only String.value field, which components are not
> treated as constants anyway. But, it helps a lot the upcoming Compact
> Strings change, which introduces String.coder field.
> String.value is actually handled as stable in the GraphKit with
> UseImplicitStableValues, but it does not affect "normal" Java code.
What do you mean by "normal" code?
> Therefore, in a way, this change extends the same behavior to the normal
> code. See more here:
> Here is a patch:
Do we still need UseImplicitStableValues code in GraphKit::load_String_value() and library_call.cpp?
> Passes JPRT and eyeballed assembly looks fine on Linux x86_64.
> Does the change itself look generic enough to consider straight in the
> mainline? Otherwise, we can keep it in Compact Strings sandbox, but it
> will eventually arrive back entangled in a much larger code change, and
> shall still require review.
More information about the hotspot-compiler-dev