RFR (M): 8014659: NPG: performance counters for compressed klass space

'Erik Helin' erik.helin at oracle.com
Thu Aug 15 16:52:42 UTC 2013


On 2013-08-15, Christian Tornqvist wrote:
> Hi Erik,

Hi Christian,

thanks for reviewing the test code!

On 2013-08-15, Christian Tornqvist wrote:
> First of all, I've only reviewed the test part of this change. Please add a
> small test for the Asserts class, this would make it a lot easier to
> fix/change it in the future.

Great idea! I've added a test, AssertsTests.java, for the Asserts class
in the following webrev:
http://cr.openjdk.java.net/~ehelin/8014659/webrev.03/

For the changes leading up to webrev.03, please see:
http://cr.openjdk.java.net/~ehelin/8014659/webrev.00-01/
http://cr.openjdk.java.net/~ehelin/8014659/webrev.01-02/
http://cr.openjdk.java.net/~ehelin/8014659/webrev.02-03/

On 2013-08-15, Christian Tornqvist wrote:
> Otherwise I think the change looks good, thanks
> for adding Asserts and the other classes to testlibrary collection :)

Thanks!
Erik

> Thanks,
> Christian
> 
> -----Original Message-----
> From: hotspot-runtime-dev-bounces at openjdk.java.net
> [mailto:hotspot-runtime-dev-bounces at openjdk.java.net] On Behalf Of Erik
> Helin
> Sent: Wednesday, August 14, 2013 10:49 AM
> To: hotspot-gc-dev at openjdk.java.net; hotspot-runtime-dev at openjdk.java.net
> Subject: RFR (M): 8014659: NPG: performance counters for compressed klass
> space
> 
> Hi all,
> 
> this change adds performance counters for compressed class space.
> 
> Webrev:
> http://cr.openjdk.java.net/~ehelin/8014659/webrev.00/
> 
> 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
> counters.
> 
> 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.
> 
> Testing:
> - Added the new test TestMetaspacePerfCounters.java
> - JPRT
> 
> Bug:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8014659
> 
> Thanks,
> Erik
> 



More information about the hotspot-gc-dev mailing list