RFR(M): 6700100: optimize inline_native_clone() for small objects with exact klass

Roland Westrelin roland.westrelin at oracle.com
Fri Oct 10 12:07:00 UTC 2014

>>> Why you skip klasses with injected fields? I thought nof_nonstatic_fields() includes them. Add comment.
>> I skip them because they are rare and it seems simpler to simply skip them.
> But you do the check (scanning all fields) for all classes. That is what I am concern about. May be it is better to add a flag to InstanceKlass during class parsing when fields are injected?

The computation is done lazily when we actually need it and it’s only needed when there’s a clone so is it really such a big deal?

>>> How we benefit from doing this optimization during parsing? Why you need StressArrayCopyMacroNode?
>> It’s a stress option. The Ideal transformation is often applied at parse time and I wanted to make sure I could stress test the Ideal transformation during IGVN because it performs somewhat trickier graph transformations. Why would I need to make it diagnostic?
> My question was why not to do that always after parse, during IGVN? You expand arraycopy node to several memory nodes which increase nodes count and complicate the graph. It may be premature to do that during parsing. On other hand ClearArrayNode::Ideal() is executed during parsing too.

If we wanted to delay that transformation, wouldn’t we also want a few passes of IGVN to happen before we do the transformation?


More information about the hotspot-compiler-dev mailing list