RFR (M): 8014659: NPG: performance counters for compressed klass space
erik.helin at oracle.com
Wed Aug 14 14:49:06 UTC 2013
this change adds performance counters for compressed class space.
Changes to hotspot:
The main changes are in metaspaceCounters.hpp and metaspaceCounters.cpp,
where the class MetaspaceCounters has been split up into
MetaspaceCounters and MetaspacePerfCounters. MetaspaceCounters now owns
an instance of MetaspacePerfCounters. The class
CompressedClassSpaceCounters has been added which also has its own
instance of MetaspacePerfCounters. MetaspacePerfCounters initializes and
updates the actual performance counters.
The changes in metaspace.hpp/cpp were needed to get some additional data
from the metaspace data structures. The method
free_chunks_in_total(mdtype) was made public and the method
free_bytes(mdtype) was added. Some common functionality was extracted
into get_space_list(mdtype) which got rid of some duplicated code.
The changes in:
are only "one-liners" that either update or initialize the new performance
Changes to the testlibrary:
- Added Asserts.java for writing asserts like "assertTrue",
- Added PerfCounter.java and PerfCounters.java to make it easy to
inspect performance counters for the currently running VM.
- Added InputArguments.java so a test can check the arguments it got
- Added InMemoryJavaCompiler.java for compiling a string into bytecode.
Useful for loading classes generated at runtime without using files.
- Added ByteCodeLoader.java for defining a new class when you already
have the bytecode.
- Added the new test TestMetaspacePerfCounters.java
More information about the hotspot-gc-dev