Request for Review (XS) - 8149643: Remove check of counters in VirtualSpaceNode::inc_container_count

Jon Masamitsu jon.masamitsu at oracle.com
Thu Feb 11 17:56:22 UTC 2016


https://bugs.openjdk.java.net/browse/JDK-8149643

As part of managing Metaspaces a running count of the
number of Metachunks in a virtual-space is maintained.
The count is incremented as chunks are allocated from the
virtual-space.  The count can be verified by walking over
all the Metachunks in the virtual space.  This change
removes the verification code which was called each time
the running count was incremented.  The verification is
costly and no longer worth doing at each increment.  It is
still verified when the virtual-space is being retired.

Contributed by: dmitry.dmitriev at oracle.com

http://cr.openjdk.java.net/~jmasa/8149643/webrev.00/

The change is the deletion of 1 line.

--- a/src/share/vm/memory/metaspace.cpp

+++ b/src/share/vm/memory/metaspace.cpp

@@ -791,7 +791,6 @@

  void VirtualSpaceNode::inc_container_count() {

    assert_lock_strong(SpaceManager::expand_lock());

    _container_count++;

-  DEBUG_ONLY(verify_container_count();)

  }


Testing with some specjvm benchmarks.

Thanks.

Jon


More information about the hotspot-gc-dev mailing list