RFR(S) 8210864 Reduce the use of metaspaceShared.hpp

Ioi Lam ioi.lam at oracle.com
Tue Sep 18 17:03:56 UTC 2018


I really hate it whenever I edit metaspaceShared.hpp I have to
rebuild almost every source file in HotSpot. That's due to this
usage in the popular header file oop.inline.hpp:

     void oopDesc::forward_to(oop p) {
       assert(!MetaspaceShared::is_archive_object(oop(this)) &&
              "forwarding archive object");

The fix is to change the call to oopDesc::is_archive_object() which is
defined out-of-line.

With this change, the number of dependent .o files reduced from 500+ to

I added metaspaceShared.inline.hpp so oopDesc::forward_to should be
as fast as before, and all other callers of 
should be a little faster (probably not measurable).

I also removed a few unnecessary includes of metaspaceShared.hpp

- Ioi

More information about the hotspot-runtime-dev mailing list