metaspaceShared.hpp is included indirectly into over 500 files due to this single use in oop.inline.hpp
http://hg.openjdk.java.net/jdk/jdk/file/9c6d5e31618e/src/hotspot/share/oops/oop.inline.hpp#l355
void oopDesc::forward_to(oop p) {
...
assert(!MetaspaceShared::is_archive_object(oop(this)) &&
!MetaspaceShared::is_archive_object(p),
"forwarding archive object");
The problem is whenever I work on metaspceShared.hpp or compactHashtable.hpp (included by the former), I have to repeatedly compile almost every file.
The use in oopDesc::forward_to should be refactored to avoid the excessive inclusion.