RFR: leverage profiling for tableswitch/lookup switch

Aleksey Shipilev shade at redhat.com
Fri Jan 12 15:20:22 UTC 2018


On 01/12/2018 03:27 PM, Roland Westrelin wrote:
> http://cr.openjdk.java.net/~roland/shenandoah/switch-profiling/webrev.00/

Not qualified of judging on intricate details for C2, so cursory review:

*) Maybe we should guard the feature with "chicken" diagnostic flag, like
ShenandoahTableSwitchProfiling? This would also mark the paths we would need to remove/refresh once
the change trickles down from upstream.

*) gcm.cpp, comment is outdated:
 1870     // Divide the frequency between all successors evenly

*) parse2.cpp, this one is just table[3*j + 0], etc:

 498       table[j+j+j+0] = iter().get_int_table(2+j+j);
 499       table[j+j+j+1] = iter().get_dest_table(2+j+j+1);
 500       table[j+j+j+2] = profile == NULL ? 1 : profile->count_at(j);

 527     jint match_int   = table[j+j+j+0];
 528     int  dest        = table[j+j+j+1];
 529     int  cnt         = table[j+j+j+2];

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list