review request (M): 6912064: type profiles need to be more thorough for dynamic language support

Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Jul 16 09:58:05 PDT 2010


Actually it was not last mail, I replied:

Vladimir Kozlov wrote:
 > I see, I missed that for instanceof case you just compare object's klass
 > with profiled klass and don't check that it is subtype of require_klass
 > (which is NULL for this case). Fine.

About last changes. Why you not do 'stopped()' check after that call?:

2668     cast_obj = maybe_cast_profiled_receiver(not_null_obj, data, tk->klass());

Vladimir

John Rose wrote:
> I got a pre-review for 6912064 in January.  These changes still work well; I just used them successfully with a performance tuning experiment.
> 
> There was a corner case bug which required an additional 'stopped()' check in graphKit.  Here's the update:
>   http://cr.openjdk.java.net/~jrose/6912064/webrev.02/
> 
> The four lines in this file starting "// Profile disagrees with this path." are new:
>   http://cr.openjdk.java.net/~jrose/6912064/webrev.02/src/share/vm/opto/graphKit.cpp.udiff.html
> 
> That is the only difference from January.
> 
> Any further comments on this change set?
> 
> -- John
> 
> FTR, here is the previous communication.  (Yes, it's been a while.)
> 
> From: John Rose <John.Rose at Sun.COM>
> Date: January 26, 2010 7:14:13 PM PST
> To: Vladimir Kozlov <Vladimir.Kozlov at Sun.COM>
> Cc: Igor Veresov <Igor.Veresov at Sun.COM>, hotspot-compiler-dev compiler <hotspot-compiler-dev at openjdk.java.net>
> Subject: Re: for pre-review (M): 6912064: type profiles need to be more thorough for dynamic language support
> 
> On Jan 26, 2010, at 6:59 PM, Vladimir Kozlov wrote:
> 
>> Then why you generate the klass check with uncommon trap for instanceof
>> for cases when profiling shows that it will fail?
> 
> For code like this:
> 
>  if (x instanceof String)
>    doString((String) x);
>  else if (x instanceof Number)
>    doNumber((Number) x);
> 
> If the 'x' is always an Integer, I want to fold all the tests up from the first instanceof, not the second.
> 
> The profile will show when 'x' is of a monomorphic type.  That is more interesting than whether the first check happens to go true or false.
> 
> -- John
> 
> 


More information about the hotspot-compiler-dev mailing list