RFR (M): 8014659: NPG: performance counters for compressed klass space
erik.helin at oracle.com
Thu Aug 15 02:20:01 PDT 2013
(Adding hotspot-gc-dev at openjdk.java.net)
thanks for the review!
On 2013-08-14, Coleen Phillimore wrote:
> I didn't review the test code but the product code looks good,
> except that after Harold's change there won't be a compressed class
> space allocated if !UseCompressedKlassPointers. It appears that you
> allocate a performance counter for the compressed class space, but
> don't fill it in if !UseCompressedKlassPointers. The code in
> metaspace.cpp assumes that a class_space_list() returns non-null, so
> that works now but won't (soon, I hope). Can you write the code to
> still work if class_space_list() returns null because otherwise
> there's going to be a merge conflict that hg won't detect. lines
> 2564 and 2571.
Sure, thanks for reminding me of Harold's change.
I've uploaded a new webrev at:
For the difference between webrev.00 and webrev.01, please see:
> On 8/14/2013 10:49 AM, Erik Helin wrote:
> >Hi all,
> >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:
> >- g1MonitorinSupport.cpp
> >- parallelScavengeHeap.cpp
> >- genCollectedHeap.cpp
> >- universe.cpp
> >are only "one-liners" that either update or initialize the new performance
> >Changes to the testlibrary:
> >- Added Asserts.java for writing asserts like "assertTrue",
> > "assertEquals", etc.
> >- 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
> > passed.
> >- 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
> >- JPRT
More information about the hotspot-gc-dev