RFR: 8138659: Speed up InstanceKlass subclass discrimination

Kim Barrett kim.barrett at oracle.com
Tue Oct 6 15:59:13 UTC 2015


On Oct 5, 2015, at 4:02 PM, Coleen Phillimore <coleen.phillimore at oracle.com> wrote:
> 
> 
> In http://cr.openjdk.java.net/~kbarrett/8138659/webrev.00/src/share/vm/oops/instanceKlass.hpp.udiff.html
> 
> There are right_n_bits() and bitfield functions in globalDefinitions.hpp that would make some bit manipulation in this set_kind() easier to read.

I tried to do that, but ran into signed vs unsigned warning problems,
because I used unsigned types here but the globalDefinitions.hpp
bitfield operations are wired for signed types.  I believe unsigned is
right for the changes I'm making, and I don't feel like generalizing
the bitfield operations today.

I did make a couple of small tweaks for readability though.

> Minor comment: I'd put kind_is_instance() .. kind_is_class_loader() functions on one line each and not use so much vertical space.

I reformatted the second (ordinary member function) block, but left
the first (static member function) block alone because the line
lengths became a little excessive for my taste.

New full and incremental webrevs:
http://cr.openjdk.java.net/~kbarrett/8138659/webrev.01/
http://cr.openjdk.java.net/~kbarrett/8138659/webrev.01.inc/

Testing: JPRT



More information about the hotspot-dev mailing list