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


Greetings,

 

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:

 

ClassLoaderData::Dependendencies;

ClassLoaderData::ChunkedHandleList;

ClassLoaderData

ClassLoaderDataGraph

Iterators

 

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

 

Thank you

Markus

 

 

 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20171221/7ffa2130/attachment.html>


More information about the hotspot-gc-dev mailing list