RFR: 8229839: Break circular dependency between oop.inline.hpp and markWord.inline.hpp

Per Liden per.liden at oracle.com
Tue Aug 20 08:43:40 UTC 2019


Looks good!

/Per

On 2019-08-19 16:11, Stefan Karlsson wrote:
> Hi all,
> 
> Please review this patch to break the circular dependency between 
> oop.inline.hpp and markWord.inline.hpp.
> 
> http://cr.openjdk.java.net/~stefank/8229839/webrev.01/
> https://bugs.openjdk.java.net/browse/JDK-8229839
> 
> The patch removes the call to oopDesc::klass() from markWord.inline.hpp. 
> This is done by passing in the klass from callers to the different 
> markWord::must_be_preserved functions.
> 
> Some of the paths inside markWord::must_be:preserved don't need the 
> klass, and calling oopDesc::klass() in those cases would be wasteful. To 
> prevent this, I changed the code to allow the callers to provide a 
> KlassProxy that can resolve to a const Klass* when and if a Klass is 
> needed. I'm not sure if this is needed or not, but I didn't want to 
> pessimise the code by introducing new calls to oopDesc::klass().
> 
> I also took the opportunity to consolidate and remove some code 
> duplication in must_be_preserved functions. This could of course be 
> split into a separate patch if that's requested.
> 
> Testing done locally. Will run tier123.
> 
> Thanks,
> StefanK



More information about the hotspot-gc-dev mailing list