Request for reviews (M): 7112478: after 7105605 JRuby bench_define_method_methods.rb fails with NPE
Vladimir Kozlov
vladimir.kozlov at oracle.com
Mon Nov 21 21:47:10 PST 2011
Thank you, Christian
On 11/21/2011 1:12 AM, Christian Thalinger wrote:
> src/share/vm/opto/escape.cpp:
>
> + // always add reference to NULL since we don't
> + // known which element if referenced.
>
> I think this should be "know which element is referenced."
Yes, it is typo.
>
> - add_edge_from_fields(pt, _phantom_object, Type::OffsetBot);
> + add_edge_from_fields(pt, _phantom_object, Type::OffsetTop);
>
> This change is correct?
It is intentional. It is special case to indicate that values in fields
escaped during call. There is new code in add_edge_from_fields() which
checks this value and convert offset back to Bottom.
>
> I didn't see anything obviously wrong but I can't tell if the new code works as it should.
Thanks,
Vladimir
>
> -- Chris
>
> On Nov 18, 2011, at 8:51 PM, Vladimir Kozlov wrote:
>
>> http://cr.openjdk.java.net/~kvn/7112478/webrev
>>
>> 7112478: after 7105605 JRuby bench_define_method_methods.rb fails with NPE
>>
>> 7105605 optimization is good stress test for EA :)
>>
>> Added missing edges from arraycopy's destination fields to fields of source object. Mark source object as global escape if we are not sure that all edges are created.
>>
>> EA bytecode analyzer gives incorrect information about returned object if there were state merges with processed block. Also call's result missed reference to returned arguments and unknown object when not only arguments is returned.
>>
>> Added missing reference to NULL from array elements with OffsetBot offset.
>>
>> Make sure that LocalVar and Field have edge to at least unknown object before removing deferred edges from the graph.
>>
>> Moved escaped state propagation code to execute it after Connection Graph is completed and skip the rest of code if all objects globally escaped.
>>
>> Also added accessors to check for null and unknown pointers. And don't add fields edges to NULL pointer object.
>>
>> Tested with CTW, nsk, compiler regression tests, failed java/util tests
>>
>> Thanks,
>> Vladimir
>
More information about the hotspot-compiler-dev
mailing list