Metaspace coding has grown and would benefit from a bit of code grooming.
Note: out of scope for this enhancement is regrouping code to different files - seeJDK-8176808.
- ChunkManager::verify_free_chunks_total() and ChunkManager::verify_free_chunks_count() are not used anywhere and could be removed
- ChunkManager::print_on is unused and seems only half implemented.
- ~SpaceManager: do not print the same stuff twice
- ChunkManager::locked_print_free_chunks() and ChunkManager::locked_print_sum_free_chunks() print exactly the same. locked_print_sum_free_chunks() gets its numbers by adding all (four) freelist statistics, whereas locked_print_free_chunks() just uses the running total in ChunkManager. Both are printed when a SpaceManager dies, so this leads to a repeated output
- Consolidate the different versions of MetaspaceAux::print_on(), MetaspaceAux::dump() and MetaspaceAux::print_metadata_for_nmt()
(DONE as part ofJDK-8201572)
- Consolidate MetaspaceAux::print_waste, MetaspaceAux::print_class_waste
(DONE as part ofJDK-8201572)
- More const correctness would be nice.
- rename MetaspaceAux::free_bytes() to something remotely useful, e.g. MetaspaceAux::committed_but_not_yet_allocated_bytes()
(DONE as part ofJDK-8201572)
- rename MetaspaceAux to MetaspaceUtils
(DONE,JDK-8199430)
- split the Metaspace class into two classes. One class (ClassLoaderMetaspace) holds the metaspace for one classloader. The other class receives the static helper functions which are now part of class Metaspace. Potentially move parts of them to MetaspaceUtils.
(DONE,JDK-8199431)
Note: out of scope for this enhancement is regrouping code to different files - see
- ChunkManager::verify_free_chunks_total() and ChunkManager::verify_free_chunks_count() are not used anywhere and could be removed
- ChunkManager::print_on is unused and seems only half implemented.
- ~SpaceManager: do not print the same stuff twice
- ChunkManager::locked_print_free_chunks() and ChunkManager::locked_print_sum_free_chunks() print exactly the same. locked_print_sum_free_chunks() gets its numbers by adding all (four) freelist statistics, whereas locked_print_free_chunks() just uses the running total in ChunkManager. Both are printed when a SpaceManager dies, so this leads to a repeated output
- Consolidate the different versions of MetaspaceAux::print_on(), MetaspaceAux::dump() and MetaspaceAux::print_metadata_for_nmt()
(DONE as part of
- Consolidate MetaspaceAux::print_waste, MetaspaceAux::print_class_waste
(DONE as part of
- More const correctness would be nice.
- rename MetaspaceAux::free_bytes() to something remotely useful, e.g. MetaspaceAux::committed_but_not_yet_allocated_bytes()
(DONE as part of
- rename MetaspaceAux to MetaspaceUtils
(DONE,
- split the Metaspace class into two classes. One class (ClassLoaderMetaspace) holds the metaspace for one classloader. The other class receives the static helper functions which are now part of class Metaspace. Potentially move parts of them to MetaspaceUtils.
(DONE,
- duplicates
-
JDK-8190864 Clean up overlapping functionality for printing/dumping statistics, etc. in metaspace
-
- Closed
-
- relates to
-
JDK-8198760 Move global lock SpaceManager::_expand_lock to MutexLocker.cpp
-
- Resolved
-
-
JDK-8199430 Rename MetaspaceAux to something more meaningful
-
- Resolved
-
-
JDK-8176808 Split up metaspace.cpp
-
- Resolved
-
-
JDK-8199431 Split up Metaspace class into a static and a non-static part
-
- Resolved
-
-
JDK-8201572 Improve Metaspace reporting
-
- Resolved
-
(1 relates to)