RFR: 8200105: Remove cyclic dependency between oop.inline.hpp and collectedHeap.inline.hpp

Kim Barrett kim.barrett at oracle.com
Thu Mar 22 18:44:16 UTC 2018


> On Mar 22, 2018, at 12:10 PM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
> 
> Hi all,
> 
> Please review this patch to remove a cyclic dependency between oop.inline.hpp and collectedHeap.inline.hpp:
> 
> http://cr.openjdk.java.net/~stefank/8200105/webrev.01/
> https://bugs.openjdk.java.net/browse/JDK-8200105
> 
> The ground work for this cleanup had already been done with:
> 8199728: Remove oopDesc::is_scavengable
> 
> What's done in this trivial patch is:
> 1) Move some debug functions out from the collectedHeap.inline.hpp and into collectedHeap.hpp.
> 
> 2) Removed collectedHeap.inline.hpp and fixed missing includes to make it compile again.
> 
> Thanks,
> StefanK

Very nice cleanup.  I assume you will update copyrights.

Looks good.

------------------------------------------------------------------------------ 
src/hotspot/share/oops/oop.inline.hpp

I think this file nearly doesn't need to include collectedHeap.hpp at
all; not having that dependency would be nice.  The only use I see is
in an assert in oopDesc::size_given_klass that uses Universe::heap().

Doing anything about this is likely pulling on a lot more string
though, so I wouldn't want it added to this change.  So file a new RFE
if you think eliminating the dependency is worthwhile.

------------------------------------------------------------------------------
src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp

There seems to be a stray blank line removal after line 186.

------------------------------------------------------------------------------



More information about the hotspot-dev mailing list