RFR: 8261731: shallow copy the internal buffer of a scalar-replaced java.lang.String object
Xin Liu
xliu at openjdk.java.net
Mon Feb 22 10:19:54 UTC 2021
On Wed, 17 Feb 2021 17:46:54 GMT, Volker Simonis <simonis at openjdk.org> wrote:
> What about GC? What happens if the original String isn't reachable any more? Do you put a reference to the byte array into the corresponding oop maps to make sure it can't be garbage collected?
hi, Volker,
I don't know OopMap very much. IMHO, it should be discovered by GC because I put the byte array oop to `jvm->locals`
I do that for all safepoints nodes.
// 1. src oop
sfpt->add_req(ac->in(ArrayCopyNode::Src));
https://github.com/openjdk/jdk/pull/2570/files#diff-2faebd05d08f9115f8d9ef771644cf05087a6986c2f9013d7163c6aa720169c3R995
-------------
PR: https://git.openjdk.java.net/jdk/pull/2570
More information about the hotspot-compiler-dev
mailing list