RFR(S): 8193933: Export ClassLoaderData claim state to support interleaved object traversal

Markus Gronlund markus.gronlund at oracle.com
Thu Dec 21 14:14:11 UTC 2017



Kindly asking for reviews for the following changes:


Bug: https://bugs.openjdk.java.net/browse/JDK-8193933 

Webrev: http://cr.openjdk.java.net/~mgronlun/8193933/webrev01/ 


Additional information about the changes:


The only semantically relevant change here is moving the following member functions from private to public:


.         bool clear_claimed();

.         bool claimed() const;

.         bool claim();


In addition, I took the opportunity to include a few cleanups that have accumulated over time:


For GC folks, removing unused headers from ClassLoaderData.hpp revealed some .cpp's having missing includes for "memory/metaspaceCounters.hpp".


.         genCollectedHeap.cpp

.         parallelScavengeHeap.cpp

.         g1MonitoringSupport.cpp

.         universe.cpp


Each have now received an #include "memory/metaspaceCounters.hpp"


Summary changes to ClassLoaderData.hpp:


.         Removed unused header includes

.         Removed tracing components (moved to classLoaderData.cpp)

.         Removed unused member functions

.         Migrated private member functions to classLoaderData.cpp where possible

.         Reduced to a single private section and a single public section

.         Removed unused static variables ReadOnly and ReadWrite metaspaces

.         Removed/introduced a few forward declarations

.         Some updated member functions now wrapped in Debug/Non-product declarations

.         A very short attempt to group declared functionality (iterators, handles, statics)


Summary changes ClassLoaderData.cpp:


I realize it is pretty hopeless to view the changes to ClassLoaderData.cpp via the webrev. 

Basically the changes attempts to reduce the amount of interleaving regarding the member function definitions for ClassLoaderDataGraph vs ClassLoaderData vs Iterators.


Here is the updated class layout:








In addition, the member function definition order reflects (although not completely) the groupings in ClassLoaderData.hpp.


Thank you






More information about the hotspot-runtime-dev mailing list