for pre-review (M): 6912064: type profiles need to be more thorough for dynamic language support
John.Rose at Sun.COM
Tue Jan 26 18:30:03 PST 2010
On Jan 26, 2010, at 3:44 PM, Vladimir Kozlov wrote:
> Since I am looking on type profiling code (for bimorphic call fix)
> I noticed that new code in gen_instanceof() does not check
> for type check failures when the code in gen_checkcast() does:
> data->as_CounterData()->count() >= 0
> Was it intentional?
Yes, otherwise I would have factored that check into maybe_cast_profiled_receiver.
The type profile collected at an instanceof, checkcast, or aastore contains all operand klasses seen, not just those klasses which matched the query type.
Usually checkcast and aastore match the query type but instanceof often does not match it.
The check (data->as_CounterData()->count() >= 0) is questionable; I think it could be deleted, but I don't seen any reason to change it.
Shall I put in a comment?
More information about the hotspot-compiler-dev